11#include "property_info.h"
29 QString
getid()
const override;
47 QVector<std::shared_ptr<IParameter>>
getfields()
const override;
53 QVector<std::shared_ptr<IParameter>>
getproperties()
const override;
59 QVector<std::shared_ptr<IFlow>>
getflows()
const override;
65 QVector<std::shared_ptr<IFlow>>
getevents()
const override;
77 QVector<std::shared_ptr<INode>>
getchildren()
const override;
107 void setId(
const QString& arg);
137 void setIcon(
const QString& iconPath);
143 void setSize(
const QSizeF& arg);
163 void addProperty(std::shared_ptr<PropertyInfo> parameter);
165 void setProperty(
const QString& key,
const maki::Value& parameter);
185 void setField(
const QString& key, std::shared_ptr<IParameter> property);
191 void addField(std::shared_ptr<IParameter> property);
203 void addFlow(std::shared_ptr<IFlow> flow);
221 void addEvent(std::shared_ptr<IFlow> event);
233 void addChild(std::shared_ptr<INode> child);
250 QJsonObject
toJson()
const;
259 friend QDataStream& operator<<(QDataStream& out,
const NodeSaveInfo& info);
260 friend QDataStream& operator>>(QDataStream& in,
NodeSaveInfo& info);
288QDataStream& operator<<(QDataStream& out,
const QVector<std::shared_ptr<INode>>& nodes);
296QDataStream& operator>>(QDataStream& in, QVector<std::shared_ptr<INode>>& nodes);
304QDataStream& operator<<(QDataStream& out,
const QVector<std::shared_ptr<NodeSaveInfo>>& nodes);
312QDataStream& operator>>(QDataStream& in, QVector<std::shared_ptr<NodeSaveInfo>>& nodes);
Configuration for a node.
Definition config.h:209
void removeEvent(std::shared_ptr< IFlow > event)
Removes a flow from the node by reference.
Definition node_info.cpp:247
const PropertyInfo * getProperty(const QString &key) const
Gets a property by key.
Definition node_info.cpp:157
QPointF getposition() const override
Gets the position of the node.
Definition node_info.cpp:67
QString getIcon() const
Gets the icon path of the node.
Definition node_info.cpp:87
void setParentId(const QString &arg)
Sets the parent ID of the node.
Definition node_info.cpp:127
QVector< std::shared_ptr< IFlow > > mFlows
A vector of children nodes.
Definition node_info.h:276
void removeProperty(const QString &key)
Removes a property from the node.
Definition node_info.cpp:186
void removeField(const QString &key)
Removes a field from the node.
Definition node_info.cpp:222
NodeSaveInfo()
Constructs a new NodeSaveInfo object.
Definition node_info.cpp:15
QVector< std::shared_ptr< IParameter > > getproperties() const override
Gets the properties of the node.
Definition node_info.cpp:97
static NodeSaveInfo fromJson(const QJsonObject &data)
Creates a NodeSaveInfo object from a JSON object.
Definition node_info.cpp:319
void addFlow(std::shared_ptr< IFlow > flow)
Adds a flow to the node.
Definition node_info.cpp:227
QPointF mPosition
The parent ID of the node.
Definition node_info.h:267
void setPixmap(const QPixmap &arg)
Sets the pixmap of the node.
Definition node_info.cpp:137
void addField(std::shared_ptr< IParameter > property)
Adds a field to the node.
Definition node_info.cpp:217
QSizeF getSize() const
Gets the size of the node.
Definition node_info.cpp:77
void setNodeId(const QString &arg)
Sets the node ID.
Definition node_info.cpp:122
PropertyInfo getField(const QString &key) const
Gets a field by key.
Definition node_info.cpp:192
void setScale(qreal arg)
Sets the scale of the node.
Definition node_info.cpp:152
QVector< std::shared_ptr< INode > > mChildren
A vector of properties for the node.
Definition node_info.h:275
qreal getScale() const
Gets the scale of the node.
Definition node_info.cpp:72
QVector< std::shared_ptr< IParameter > > mProperties
The icon path of the node.
Definition node_info.h:274
void addEvent(std::shared_ptr< IFlow > event)
Adds a flow to the node.
Definition node_info.cpp:242
void setId(const QString &arg)
Sets the ID of the node.
Definition node_info.cpp:117
void addChild(std::shared_ptr< INode > child)
Adds a child to the node.
Definition node_info.cpp:252
QVector< std::shared_ptr< IFlow > > getevents() const override
Gets the events of the node.
Definition node_info.cpp:107
void setIcon(const QString &iconPath)
Sets the icon path of the node.
Definition node_info.cpp:142
void addProperty(std::shared_ptr< PropertyInfo > parameter)
Adds a property to the node.
Definition node_info.cpp:166
QString getnodeId() const override
Gets the node ID.
Definition node_info.cpp:57
qreal mScale
The size of the node.
Definition node_info.h:269
void removeFlow(std::shared_ptr< IFlow > flow)
Removes a flow from the node by reference.
Definition node_info.cpp:232
QPixmap mPixmap
The scale of the node.
Definition node_info.h:271
void setField(const QString &key, std::shared_ptr< IParameter > property)
Sets a field for the node.
Definition node_info.cpp:201
QString getid() const override
Gets the ID of the node.
Definition node_info.cpp:52
void setSize(const QSizeF &arg)
Sets the size of the node.
Definition node_info.cpp:147
QSizeF mSize
The position of the node.
Definition node_info.h:268
QString mParentId
The node ID.
Definition node_info.h:265
QString mNodeId
The ID of the node.
Definition node_info.h:264
void setPosition(const QPointF &arg)
Sets the position of the node.
Definition node_info.cpp:132
QVector< std::shared_ptr< IFlow > > getflows() const override
Gets the flows of the node.
Definition node_info.cpp:102
QVector< std::shared_ptr< ITransition > > mTransitions
A vector of flows associated with the node.
Definition node_info.h:278
QVector< std::shared_ptr< IParameter > > getfields() const override
Gets the fields of the node.
Definition node_info.cpp:92
QVector< std::shared_ptr< INode > > getchildren() const override
Gets the children of the node.
Definition node_info.cpp:112
QVector< std::shared_ptr< IParameter > > mFields
A vector of transitions for the node.
Definition node_info.h:279
QVector< std::shared_ptr< IFlow > > mEvents
A vector of flows associated with the node.
Definition node_info.h:277
QJsonObject toJson() const
Converts the node to a JSON object.
Definition node_info.cpp:269
QString mIconPath
The pixmap of the node.
Definition node_info.h:272
QPixmap getPixmap() const
Gets the pixmap of the node.
Definition node_info.cpp:82
void removeChild(const QString &childId)
Removes a child from the node by ID.
Definition node_info.cpp:257
QString getparentId() const override
Gets the parent ID of the node.
Definition node_info.cpp:62
void clearChildren()
Clears all children from the node.
Definition node_info.cpp:262
Represents a property with configuration and options.
Definition property_info.h:16