|
Maki
Formally verfied low-code orchestration
|
Represents a transition between two nodes in a graphical representation. More...
#include <transition.h>
Public Types | |
| enum class | Edge { } |
| Enumerates the types of edges that can be used for transitions. More... | |
Public Member Functions | |
| TransitionItem (std::shared_ptr< TransitionSaveInfo > storage) | |
| Constructs a new TransitionItem with the given storage information. | |
| virtual | ~TransitionItem () |
| Destructor for TransitionItem. | |
| QString | id () const |
| Retrieves the unique identifier of this transition item. | |
| int | type () const override |
| Retrieves the type of this graphics item. | |
| void | setStart (const QString &id, const QPointF &point, const QPointF &controlShift) |
| Sets the start point and control shift for the transition. | |
| void | setEnd (const QString &id, const QPointF &point, const QPointF &controlShift) |
| Sets the end point and control shift for the transition. | |
| void | done (NodeItem *source, NodeItem *destination) |
| Completes the transition by setting source and destination nodes. | |
| NodeItem * | source () const |
| Retrieves the source node of this transition. | |
| NodeItem * | destination () const |
| Retrieves the destination node of this transition. | |
| void | move (const QString &id, QPointF pos) |
| Moves the transition to a new position. | |
| void | updatePath (QPainterPath painterPath={}) |
| Updates the path of this transition item. | |
| void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override |
| Paints this graphics item using the given painter. | |
| QPainterPath | shape () const override |
| Retrieves the shape of this graphics item. | |
| TransitionSaveInfo | saveInfo () const |
| Retrieves the save information for this transition. | |
| std::shared_ptr< TransitionSaveInfo > | storage () const |
| Retrieves the shared pointer to the storage information. | |
| QString | getName () const |
| Retrieves the name of this transition. | |
| void | setName (const QString &name) |
| Sets the name of this transition. | |
| QString | getEvent () const |
| Retrieves the event associated with this transition. | |
| void | setEvent (const QString &name) |
| Sets the event associated with this transition. | |
| void | setEdge (Edge edge) |
| Sets the type of edge for this transition. | |
Public Attributes | |
| std::function< void(TransitionItem *item)> | transitionModified |
| Signal emitted when the transition is deleted. | |
Private Member Functions | |
| void | updateLabelPosition () |
| Shared pointer to the storage information. | |
Private Attributes | |
| const QString | mId |
| Signal emitted when the transition is modified. | |
| bool | mComplete |
| Unique identifier for this transition. | |
| Edge | mEdge = Edge::NONE |
| Flag indicating if the transition is complete. | |
| NodeItem * | mSource |
| Type of edge used in the transition. | |
| NodeItem * | mDestination |
| Pointer to the source node item. | |
| QGraphicsTextItem * | mLabel = nullptr |
| Pointer to the destination node item. | |
| std::shared_ptr< TransitionSaveInfo > | mStorage |
| Pointer to the label text item. | |
Represents a transition between two nodes in a graphical representation.
|
strong |
| TransitionItem::TransitionItem | ( | std::shared_ptr< TransitionSaveInfo > | storage | ) |
Constructs a new TransitionItem with the given storage information.
| storage | Shared pointer to the transition save info. |
| NodeItem * TransitionItem::destination | ( | ) | const |
Retrieves the destination node of this transition.
Completes the transition by setting source and destination nodes.
| source | Pointer to the source node item. |
| destination | Pointer to the destination node item. |
| QString TransitionItem::getEvent | ( | ) | const |
Retrieves the event associated with this transition.
| QString TransitionItem::getName | ( | ) | const |
Retrieves the name of this transition.
| QString TransitionItem::id | ( | ) | const |
Retrieves the unique identifier of this transition item.
| void TransitionItem::move | ( | const QString & | id, |
| QPointF | pos ) |
Moves the transition to a new position.
| id | Unique identifier for the node being moved. |
| pos | New position. |
|
override |
Paints this graphics item using the given painter.
| painter | Pointer to the QPainter object. |
| option | Pointer to the QStyleOptionGraphicsItem object. |
| widget | Pointer to the QWidget object. |
| TransitionSaveInfo TransitionItem::saveInfo | ( | ) | const |
Retrieves the save information for this transition.
| void TransitionItem::setEdge | ( | Edge | edge | ) |
Sets the type of edge for this transition.
| edge | The new Edge value. |
| void TransitionItem::setEnd | ( | const QString & | id, |
| const QPointF & | point, | ||
| const QPointF & | controlShift ) |
Sets the end point and control shift for the transition.
| id | Unique identifier for the end node. |
| point | End position. |
| controlShift | Control point shift. |
| void TransitionItem::setEvent | ( | const QString & | name | ) |
Sets the event associated with this transition.
| name | New event for the transition. |
| void TransitionItem::setName | ( | const QString & | name | ) |
Sets the name of this transition.
| name | New name for the transition. |
| void TransitionItem::setStart | ( | const QString & | id, |
| const QPointF & | point, | ||
| const QPointF & | controlShift ) |
Sets the start point and control shift for the transition.
| id | Unique identifier for the start node. |
| point | Start position. |
| controlShift | Control point shift. |
|
override |
Retrieves the shape of this graphics item.
| NodeItem * TransitionItem::source | ( | ) | const |
Retrieves the source node of this transition.
| std::shared_ptr< TransitionSaveInfo > TransitionItem::storage | ( | ) | const |
Retrieves the shared pointer to the storage information.
|
override |
Retrieves the type of this graphics item.