can visually see connections between parameters in the node view

This commit is contained in:
itsmattkc
2019-07-15 12:43:56 -04:00
parent 837d43fe07
commit 3ec133f254
8 changed files with 233 additions and 36 deletions
+19
View File
@@ -36,15 +36,34 @@ public:
void SetNode(Node* n);
Node* node();
bool IsExpanded();
void SetExpanded(bool e);
const QRectF& GetParameterConnectorRect(int index);
protected:
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr) override;
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
private:
void UpdateGradient();
QRectF expand_hitbox_;
Node* node_;
QColor color_;
QRectF title_bar_rect_;
QRectF content_rect_;
QVector<QRectF> param_rect_;
int node_connector_size_;
bool expanded_;
};
#endif // NODEVIEWITEM_H