3#include "elements/behaviour/behaviour_node.h"
8class WithinNode :
public BehaviourNode
11 WithinNode(
const QString&
id, std::shared_ptr<NodeSaveInfo> info,
const QPointF& initialPosition, std::shared_ptr<NodeConfig> nodeConfig,
12 QGraphicsItem* parent =
nullptr);
14 VoidResult
start()
override;
15 SubFlow* subFlow(
const QString& subflow)
const;
19 QRectF sceneAlignRect()
const override;
22 QPainterPath
shape()
const override;
24 void setProperty(
const QString& key,
const maki::Value& value)
override;
27 QRectF extraBoundingRect()
const override;
28 QPointF constrainChildPosition(
const NodeItem* child,
const QPointF& proposedPosition)
const override;
30 QRectF childAreaSceneRect(
const QString& subflow)
const override;
31 bool constrainChildren()
const override;
34 void createPorts()
override;
35 virtual QVariant
itemChange(GraphicsItemChange change,
const QVariant& value)
override;
37 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* style, QWidget* widget)
override;
38 void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event)
override;
44 void layoutSubFlows();
45 void layoutSubFlowMarkers();
47 QRectF childrenSceneRect(
const QString& subFlowId)
const;
48 QList<SubFlow*> subFlows()
const;
50 bool hasExpandedSubFlow()
const;
51 QRectF expandedSubFlowsRect()
const;
52 QRectF expandedSubFlowsSceneRect()
const;
54 void toggleCollapsed(
SubFlow* flow,
bool collapsed);
NodeItem(const QString &id, std::shared_ptr< NodeSaveInfo > info, const QPointF &initialPosition, std::shared_ptr< NodeConfig > nodeConfig, QGraphicsItem *parent=nullptr)
Constructs a new NodeItem with the given parameters.
Definition node.cpp:29
void childRemoved(NodeItem *child) override
Handles when a child is removed from this item.
Definition within_node.cpp:296
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value) override
Handles changes to the item's properties.
Definition within_node.cpp:496
VoidResult start() override
Starts the node.
Definition within_node.cpp:34
void paint(QPainter *painter, const QStyleOptionGraphicsItem *style, QWidget *widget) override
Paints the item using the given painter.
Definition within_node.cpp:513
void addChild(NodeItem *node, std::shared_ptr< NodeSaveInfo > info) override
Adds a child node with the given save information.
Definition within_node.cpp:289
void updateExtrasPosition(Config::NodeMove reason) override
Updates extra positions related to this node.
Definition within_node.cpp:178
void childPositionUpdated(NodeItem *child) override
Called to tell the parent that the position of this node was updated.
Definition within_node.cpp:185
void setProperty(const QString &key, const maki::Value &value) override
Sets a property with a given key and value.
Definition within_node.cpp:303
QPainterPath shape() const override
Returns the shape of this item.
Definition within_node.cpp:173
QRectF nodeRect() const override
Returns the bounding rectangle for this item.
Definition within_node.cpp:165