improved connector UI in node view

This commit is contained in:
itsmattkc
2021-11-10 21:59:54 -08:00
parent 9c650883c2
commit 6033039046
15 changed files with 352 additions and 148 deletions
+9
View File
@@ -6,6 +6,7 @@
#include "node/node.h"
#include "nodeviewcommon.h"
#include "nodeviewedge.h"
namespace olive {
@@ -22,16 +23,24 @@ public:
void SetFlowDirection(NodeViewCommon::FlowDirection dir);
void SetCurvedEdges(bool e);
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr) override;
protected:
virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value) override;
private:
NodeViewEdge *AddEdgeInternal(Node *output, const NodeInput& input, NodeViewItem *from, NodeViewItem *to);
Node *context_;
QString lbl_;
NodeViewCommon::FlowDirection flow_dir_;
bool curved_edges_;
};
}