3#include "elements/behaviour/behaviour_node.h"
8class RepeatNode :
public BehaviourNode
11 RepeatNode(
const QString&
id, std::shared_ptr<NodeSaveInfo> info,
const QPointF& initialPosition, std::shared_ptr<NodeConfig> nodeConfig,
12 QGraphicsItem* parent =
nullptr);
14 VoidResult
start()
override;
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;
42 void layoutSubFlowMarkers();
46 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 addChild(NodeItem *node, std::shared_ptr< NodeSaveInfo > info) override
Adds a child node with the given save information.
Definition repeat_node.cpp:129
QPainterPath shape() const override
Returns the shape of this item.
Definition repeat_node.cpp:78
VoidResult start() override
Starts the node.
Definition repeat_node.cpp:31
void updateExtrasPosition(Config::NodeMove reason) override
Updates extra positions related to this node.
Definition repeat_node.cpp:83
void childRemoved(NodeItem *child) override
Handles when a child is removed from this item.
Definition repeat_node.cpp:135
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value) override
Handles changes to the item's properties.
Definition repeat_node.cpp:334
void setProperty(const QString &key, const maki::Value &value) override
Sets a property with a given key and value.
Definition repeat_node.cpp:141
QRectF nodeRect() const override
Returns the bounding rectangle for this item.
Definition repeat_node.cpp:69
void childPositionUpdated(NodeItem *child) override
Called to tell the parent that the position of this node was updated.
Definition repeat_node.cpp:89
void paint(QPainter *painter, const QStyleOptionGraphicsItem *style, QWidget *widget) override
Paints the item using the given painter.
Definition repeat_node.cpp:345