|
Maki
Formally verified low-code orchestration
|
Represents a node that can be saved and loaded. More...
#include <node_info.h>
Public Member Functions | |
| NodeSaveInfo () | |
| Constructs a new NodeSaveInfo object. | |
| QString | getid () const override |
| Gets the ID of the node. | |
| QString | getnodeId () const override |
| Gets the node ID. | |
| QString | getNodeName () const |
| Gets the node name. | |
| QPointF | getposition () const override |
| Gets the position of the node. | |
| QVector< std::shared_ptr< IParameter > > | getfields () const override |
| Gets the fields of the node. | |
| QVector< std::shared_ptr< IParameter > > | getproperties () const override |
| Gets the properties of the node. | |
| QVector< std::shared_ptr< IFlow > > | getflows () const override |
| Gets the flows of the node. | |
| QVector< std::shared_ptr< IFlow > > | getevents () const override |
| Gets the events of the node. | |
| QString | getparentId () const override |
| Gets the parent ID of the node. | |
| QVector< std::shared_ptr< INode > > | getchildren () const override |
| Gets the children of the node. | |
| qreal | getScale () const |
| Gets the scale of the node. | |
| QSizeF | getSize () const |
| Gets the size of the node. | |
| QString | getIcon () const |
| Gets the icon path of the node. | |
| void | setId (const QString &arg) |
| Sets the ID of the node. | |
| void | setNodeId (const QString &arg) |
| Sets the node ID. | |
| void | setParentId (const QString &arg) |
| Sets the parent ID of the node. | |
| void | setPosition (const QPointF &arg) |
| Sets the position of the node. | |
| void | setIcon (const QString &iconPath) |
| Sets the icon path of the node. | |
| void | setSize (const QSizeF &arg) |
| Sets the size of the node. | |
| void | setScale (qreal arg) |
| Sets the scale of the node. | |
| const PropertyInfo * | getProperty (const QString &key) const |
| Gets a property by key. | |
| void | addProperty (std::shared_ptr< PropertyInfo > parameter) |
| Adds a property to the node. | |
| void | setProperty (const QString &key, const maki::Value ¶meter) |
| Sets a property to the node. | |
| void | removeProperty (const QString &key) |
| Removes a property from the node. | |
| PropertyInfo | getField (const QString &key) const |
| Gets a field by key. | |
| void | setField (const QString &key, std::shared_ptr< IParameter > property) |
| Sets a field for the node. | |
| void | addField (std::shared_ptr< IParameter > property) |
| Adds a field to the node. | |
| void | removeField (const QString &key) |
| Removes a field from the node. | |
| void | addFlow (std::shared_ptr< IFlow > flow) |
| Adds a flow to the node. | |
| void | removeFlow (const QString &flowId) |
| Removes a flow from the node by ID. | |
| void | addEvent (std::shared_ptr< IFlow > event) |
| Adds a flow to the node. | |
| void | removeEvent (std::shared_ptr< IFlow > event) |
| Removes a flow from the node by reference. | |
| void | addChild (std::shared_ptr< INode > child) |
| Adds a child to the node. | |
| void | removeChild (const QString &childId) |
| Removes a child from the node by ID. | |
| void | clearChildren () |
| Clears all children from the node. | |
| QJsonObject | toJson () const |
| Converts the node to a JSON object. | |
Static Public Member Functions | |
| static NodeSaveInfo | fromJson (const QJsonObject &data) |
| Creates a NodeSaveInfo object from a JSON object. | |
Private Attributes | |
| QString | mNodeId |
| The ID of the node. | |
| QString | mParentId |
| The node ID. | |
| QString | mParentSubFlow |
| The parent ID of the node. | |
| QPointF | mPosition |
| The subflow ID of this node. | |
| QSizeF | mSize |
| The position of the node. | |
| qreal | mScale |
| The size of the node. | |
| QString | mIconPath |
| The scale of the node. | |
| QVector< std::shared_ptr< IParameter > > | mProperties |
| The icon path of the node. | |
| QVector< std::shared_ptr< INode > > | mChildren |
| A vector of properties for the node. | |
| QVector< std::shared_ptr< IFlow > > | mFlows |
| A vector of children nodes. | |
| QVector< std::shared_ptr< IFlow > > | mEvents |
| A vector of flows associated with the node. | |
| QVector< std::shared_ptr< ITransition > > | mTransitions |
| A vector of flows associated with the node. | |
| QVector< std::shared_ptr< IParameter > > | mFields |
| A vector of transitions for the node. | |
| QVector< PortConfig > | mPorts |
| A vector of fields for the node. | |
Friends | |
| class | DocumentCloner |
Represents a node that can be saved and loaded.
| void NodeSaveInfo::addChild | ( | std::shared_ptr< INode > | child | ) |
Adds a child to the node.
| child | The new child as a shared pointer to INode. |
| void NodeSaveInfo::addEvent | ( | std::shared_ptr< IFlow > | event | ) |
Adds a flow to the node.
| flow | The new flow as a shared pointer to IFlow. |
| void NodeSaveInfo::addField | ( | std::shared_ptr< IParameter > | property | ) |
Adds a field to the node.
| property | The new field as a shared pointer to IParameter. |
| void NodeSaveInfo::addFlow | ( | std::shared_ptr< IFlow > | flow | ) |
Adds a flow to the node.
| flow | The new flow as a shared pointer to IFlow. |
| void NodeSaveInfo::addProperty | ( | std::shared_ptr< PropertyInfo > | parameter | ) |
Adds a property to the node.
| key | The property key as a QString. |
| value | The property value as a QVariant. |
|
static |
Creates a NodeSaveInfo object from a JSON object.
| data | The QJsonObject containing the node data. |
|
override |
Gets the children of the node.
|
override |
Gets the events of the node.
| PropertyInfo NodeSaveInfo::getField | ( | const QString & | key | ) | const |
Gets a field by key.
| key | The field key as a QString. |
|
override |
Gets the fields of the node.
|
override |
Gets the flows of the node.
| QString NodeSaveInfo::getIcon | ( | ) | const |
Gets the icon path of the node.
|
override |
Gets the ID of the node.
|
override |
Gets the node ID.
| QString NodeSaveInfo::getNodeName | ( | ) | const |
Gets the node name.
|
override |
Gets the parent ID of the node.
|
override |
Gets the position of the node.
|
override |
Gets the properties of the node.
| const PropertyInfo * NodeSaveInfo::getProperty | ( | const QString & | key | ) | const |
Gets a property by key.
| key | The property key as a QString. |
| qreal NodeSaveInfo::getScale | ( | ) | const |
Gets the scale of the node.
| QSizeF NodeSaveInfo::getSize | ( | ) | const |
Gets the size of the node.
| void NodeSaveInfo::removeChild | ( | const QString & | childId | ) |
Removes a child from the node by ID.
| childId | The ID of the child to remove as a QString. |
| void NodeSaveInfo::removeEvent | ( | std::shared_ptr< IFlow > | event | ) |
Removes a flow from the node by reference.
| flow | The flow to be removed. |
| void NodeSaveInfo::removeField | ( | const QString & | key | ) |
Removes a field from the node.
| key | The field key as a QString. |
| void NodeSaveInfo::removeFlow | ( | const QString & | flowId | ) |
Removes a flow from the node by ID.
| flowId | The ID of the flow to remove as a QString. |
| void NodeSaveInfo::removeProperty | ( | const QString & | key | ) |
Removes a property from the node.
| key | The property key as a QString. |
| void NodeSaveInfo::setField | ( | const QString & | key, |
| std::shared_ptr< IParameter > | property ) |
Sets a field for the node.
| key | The field key as a QString. |
| property | The new field as a shared pointer to IParameter. |
| void NodeSaveInfo::setIcon | ( | const QString & | iconPath | ) |
Sets the icon path of the node.
| iconPath | The new icon path as a QString. |
| void NodeSaveInfo::setId | ( | const QString & | arg | ) |
Sets the ID of the node.
| arg | The new ID as a QString. |
| void NodeSaveInfo::setNodeId | ( | const QString & | arg | ) |
Sets the node ID.
| arg | The new node ID as a QString. |
| void NodeSaveInfo::setParentId | ( | const QString & | arg | ) |
Sets the parent ID of the node.
| arg | The new parent ID as a QString. |
| void NodeSaveInfo::setPosition | ( | const QPointF & | arg | ) |
Sets the position of the node.
| arg | The new position as a QPointF. |
| void NodeSaveInfo::setProperty | ( | const QString & | key, |
| const maki::Value & | parameter ) |
Sets a property to the node.
| key | The property key as a QString. |
| value | The property value as a QVariant. |
| void NodeSaveInfo::setScale | ( | qreal | arg | ) |
Sets the scale of the node.
| arg | The new scale as a qreal. |
| void NodeSaveInfo::setSize | ( | const QSizeF & | arg | ) |
Sets the size of the node.
| arg | The new size as a QSizeF. |
| QJsonObject NodeSaveInfo::toJson | ( | ) | const |
Converts the node to a JSON object.