4#include "elements/transition.h"
26 BehaviourCanvas(
Flow* flow, std::shared_ptr<ConfigurationTable> configTable, std::shared_ptr<EdgeRouter> router, QObject* parent =
nullptr);
33 virtual Types::LibraryTypes
type()
const override;
57 QVector<TransitionSaveInfo> transitionsOfNode(
const QString& nodeId)
override;
85 bool insertDroppedNodeOnTransition(
TransitionItem* transition, std::shared_ptr<NodeSaveInfo> info)
override;
104 std::shared_ptr<const NodeSaveInfo> addInitialNode(
const QString& nodeType,
const QPointF& position);
106 TransitionSaveInfo makeTransitionInfo(
const QString& sourceId,
const QString& destinationId,
const QString& event,
const QString& label)
const;
void cleanFlow()
Deletes the Flow managed by this Canvas. This should not be called if the Flow is created by a NodeIt...
Definition behaviour_canvas.cpp:66
BehaviourCanvas(Flow *flow, std::shared_ptr< ConfigurationTable > configTable, std::shared_ptr< EdgeRouter > router, QObject *parent=nullptr)
Constructs a BehaviourCanvas object.
Definition behaviour_canvas.cpp:11
void setupInitialNodes()
Used to create the start and end nodes of a flow.
Definition behaviour_canvas.cpp:17
bool canAddTransition(NodeItem *node) const override
Checkes whether it is possible to add a new trasition to a node.
Definition behaviour_canvas.cpp:83
TransitionConfig nextTransition(NodeItem *node) const override
Gets the next transition configuration for a given node.
Definition behaviour_canvas.cpp:94
void updateParent(NodeItem *node, std::shared_ptr< NodeSaveInfo > storage, bool adding) override
Updates the parent node of a given node item.
Definition behaviour_canvas.cpp:72
virtual Types::LibraryTypes type() const override
Retrieves the type of library associated with this canvas.
Definition behaviour_canvas.cpp:61
void addTransition(TransitionItem *transition) override
Add the TransitionItem to the Flow managed by this Canvas.
Definition behaviour_canvas.cpp:134
void removeTransition(TransitionItem *transition) override
Removed the TransitionItem from the Flow managed by this Canvas.
Definition behaviour_canvas.cpp:140
void onNodeMoved(const NodeItem *node) override
Callback triggered whenever a node moves significantly.
Definition behaviour_canvas.cpp:149
QVector< QGraphicsItem * > cleanTransitionsOfNode(const QString &nodeId) override
Remove all transitions to and from a node with id nodeId.
Definition behaviour_canvas.cpp:108
Flow * mFlow
A pointer to the Flow object associated with this canvas.
Definition behaviour_canvas.h:91
Canvas(const QString &canvasId, std::shared_ptr< ConfigurationTable > configTable, std::shared_ptr< EdgeRouter > router, QObject *parent=nullptr)
Constructs a new Canvas object.
Definition canvas.cpp:41
Represents a flow in the system.
Definition flow.h:17
Represents a graphical node item in a flowchart.
Definition node.h:26
Configuration for a transition between nodes.
Definition config.h:44
Represents a transition between two nodes in a graphical representation.
Definition transition.h:15
Represents transition save information.
Definition transition_info.h:14