implemented arrays and reimplemented expanding
This commit is contained in:
@@ -143,20 +143,23 @@ public:
|
||||
|
||||
void UpdateFlowDirectionOfInputItem(NodeViewItem *child);
|
||||
|
||||
bool CanBeExpanded() const;
|
||||
|
||||
protected:
|
||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr) override;
|
||||
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value) override;
|
||||
|
||||
private:
|
||||
void UpdateContextRect();
|
||||
|
||||
void DrawNodeTitle(QPainter *painter, QString text, const QRectF &rect, Qt::Alignment vertical_align, int icon_size, bool draw_arrow);
|
||||
void DrawNodeTitle(QPainter *painter, QString text, const QRectF &rect, Qt::Alignment vertical_align, int icon_full_size);
|
||||
|
||||
int DrawExpandArrow(QPainter *painter);
|
||||
|
||||
/**
|
||||
* @brief Internal update function when logical position changes
|
||||
@@ -170,6 +173,10 @@ private:
|
||||
|
||||
void SetRectSize(int height_units = 1);
|
||||
|
||||
void UpdateChildrenPositions();
|
||||
|
||||
int GetLogicalHeightWithChildren() const;
|
||||
|
||||
/**
|
||||
* @brief Reference to attached Node
|
||||
*/
|
||||
@@ -200,6 +207,9 @@ private:
|
||||
|
||||
QPointF cached_node_pos_;
|
||||
|
||||
QRect last_arrow_rect_;
|
||||
bool arrow_click_;
|
||||
|
||||
NodeViewItemConnector *input_connector_;
|
||||
NodeViewItemConnector *output_connector_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user