Maki
Formally verfied low-code orchestration
Loading...
Searching...
No Matches
NodeSaveInfo Class Reference

Represents a node that can be saved and loaded. More...

#include <node_info.h>

Inheritance diagram for NodeSaveInfo:

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.
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.
QPixmap getPixmap () const
 Gets the pixmap 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 setPixmap (const QPixmap &arg)
 Sets the pixmap 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 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 (std::shared_ptr< IFlow > flow)
 Removes a flow from the node by reference.
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.
QPointF mPosition
 The parent ID of the node.
QSizeF mSize
 The position of the node.
qreal mScale
 The size of the node.
QPixmap mPixmap
 The scale of the node.
QString mIconPath
 The pixmap 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.

Detailed Description

Represents a node that can be saved and loaded.

Member Function Documentation

◆ addChild()

void NodeSaveInfo::addChild ( std::shared_ptr< INode > child)

Adds a child to the node.

Parameters
childThe new child as a shared pointer to INode.

◆ addEvent()

void NodeSaveInfo::addEvent ( std::shared_ptr< IFlow > event)

Adds a flow to the node.

Parameters
flowThe new flow as a shared pointer to IFlow.

◆ addField()

void NodeSaveInfo::addField ( std::shared_ptr< IParameter > property)

Adds a field to the node.

Parameters
propertyThe new field as a shared pointer to IParameter.

◆ addFlow()

void NodeSaveInfo::addFlow ( std::shared_ptr< IFlow > flow)

Adds a flow to the node.

Parameters
flowThe new flow as a shared pointer to IFlow.

◆ addProperty()

void NodeSaveInfo::addProperty ( std::shared_ptr< PropertyInfo > parameter)

Adds a property to the node.

Parameters
keyThe property key as a QString.
valueThe property value as a QVariant.

◆ fromJson()

NodeSaveInfo NodeSaveInfo::fromJson ( const QJsonObject & data)
static

Creates a NodeSaveInfo object from a JSON object.

Parameters
dataThe QJsonObject containing the node data.
Returns
A new NodeSaveInfo object.

◆ getchildren()

QVector< std::shared_ptr< INode > > NodeSaveInfo::getchildren ( ) const
override

Gets the children of the node.

Returns
A QVector of shared pointers to INode objects.

◆ getevents()

QVector< std::shared_ptr< IFlow > > NodeSaveInfo::getevents ( ) const
override

Gets the events of the node.

Returns
A QVector of shared pointers to IFlow objects.

◆ getField()

PropertyInfo NodeSaveInfo::getField ( const QString & key) const

Gets a field by key.

Parameters
keyThe field key as a QString.
Returns
The field as a PropertyInfo object.

◆ getfields()

QVector< std::shared_ptr< IParameter > > NodeSaveInfo::getfields ( ) const
override

Gets the fields of the node.

Returns
A QVector of shared pointers to IParameter objects.

◆ getflows()

QVector< std::shared_ptr< IFlow > > NodeSaveInfo::getflows ( ) const
override

Gets the flows of the node.

Returns
A QVector of shared pointers to IFlow objects.

◆ getIcon()

QString NodeSaveInfo::getIcon ( ) const

Gets the icon path of the node.

Returns
The icon path as a QString.

◆ getid()

QString NodeSaveInfo::getid ( ) const
override

Gets the ID of the node.

Returns
The ID as a QString.

◆ getnodeId()

QString NodeSaveInfo::getnodeId ( ) const
override

Gets the node ID.

Returns
The node ID as a QString.

◆ getparentId()

QString NodeSaveInfo::getparentId ( ) const
override

Gets the parent ID of the node.

Returns
The parent ID as a QString.

◆ getPixmap()

QPixmap NodeSaveInfo::getPixmap ( ) const

Gets the pixmap of the node.

Returns
The pixmap as a QPixmap.

◆ getposition()

QPointF NodeSaveInfo::getposition ( ) const
override

Gets the position of the node.

Returns
The position as a QPointF.

◆ getproperties()

QVector< std::shared_ptr< IParameter > > NodeSaveInfo::getproperties ( ) const
override

Gets the properties of the node.

Returns
A QMap of QString keys and QVariant values.

◆ getProperty()

const PropertyInfo * NodeSaveInfo::getProperty ( const QString & key) const

Gets a property by key.

Parameters
keyThe property key as a QString.
Returns
The property value as a QVariant.

◆ getScale()

qreal NodeSaveInfo::getScale ( ) const

Gets the scale of the node.

Returns
The scale as a qreal.

◆ getSize()

QSizeF NodeSaveInfo::getSize ( ) const

Gets the size of the node.

Returns
The size as a QSizeF.

◆ removeChild()

void NodeSaveInfo::removeChild ( const QString & childId)

Removes a child from the node by ID.

Parameters
childIdThe ID of the child to remove as a QString.

◆ removeEvent()

void NodeSaveInfo::removeEvent ( std::shared_ptr< IFlow > event)

Removes a flow from the node by reference.

Parameters
flowThe flow to be removed.

◆ removeField()

void NodeSaveInfo::removeField ( const QString & key)

Removes a field from the node.

Parameters
keyThe field key as a QString.

◆ removeFlow() [1/2]

void NodeSaveInfo::removeFlow ( const QString & flowId)

Removes a flow from the node by ID.

Parameters
flowIdThe ID of the flow to remove as a QString.

◆ removeFlow() [2/2]

void NodeSaveInfo::removeFlow ( std::shared_ptr< IFlow > flow)

Removes a flow from the node by reference.

Parameters
flowThe flow to be removed.

◆ removeProperty()

void NodeSaveInfo::removeProperty ( const QString & key)

Removes a property from the node.

Parameters
keyThe property key as a QString.

◆ setField()

void NodeSaveInfo::setField ( const QString & key,
std::shared_ptr< IParameter > property )

Sets a field for the node.

Parameters
keyThe field key as a QString.
propertyThe new field as a shared pointer to IParameter.

◆ setIcon()

void NodeSaveInfo::setIcon ( const QString & iconPath)

Sets the icon path of the node.

Parameters
iconPathThe new icon path as a QString.

◆ setId()

void NodeSaveInfo::setId ( const QString & arg)

Sets the ID of the node.

Parameters
argThe new ID as a QString.

◆ setNodeId()

void NodeSaveInfo::setNodeId ( const QString & arg)

Sets the node ID.

Parameters
argThe new node ID as a QString.

◆ setParentId()

void NodeSaveInfo::setParentId ( const QString & arg)

Sets the parent ID of the node.

Parameters
argThe new parent ID as a QString.

◆ setPixmap()

void NodeSaveInfo::setPixmap ( const QPixmap & arg)

Sets the pixmap of the node.

Parameters
argThe new pixmap as a QPixmap.

◆ setPosition()

void NodeSaveInfo::setPosition ( const QPointF & arg)

Sets the position of the node.

Parameters
argThe new position as a QPointF.

◆ setScale()

void NodeSaveInfo::setScale ( qreal arg)

Sets the scale of the node.

Parameters
argThe new scale as a qreal.

◆ setSize()

void NodeSaveInfo::setSize ( const QSizeF & arg)

Sets the size of the node.

Parameters
argThe new size as a QSizeF.

◆ toJson()

QJsonObject NodeSaveInfo::toJson ( ) const

Converts the node to a JSON object.

Returns
A QJsonObject representing the node.

The documentation for this class was generated from the following files:
  • /__w/maki/maki/app/document/node_info.h
  • /__w/maki/maki/app/document/node_info.cpp