KDStateMachineEditor API Documentation 2.1
|
Modifies any specific property of a QObject. More...
#include <modifypropertycommand_p.h>
Public Member Functions | |
ModifyPropertyCommand (QObject *object, const char *property, const QVariant &value, const QString &text=QString(), QUndoCommand *parent=nullptr) | |
ModifyPropertyCommand (QObject *object, const QJsonObject &propertyMap, const QString &text=QString(), QUndoCommand *parent=nullptr) | |
int | id () const override |
void | redo () override |
void | undo () override |
![]() | |
Command (const QString &text=QString(), QUndoCommand *parent=nullptr) | |
Command (StateModel *model, QUndoCommand *parent=nullptr) | |
StateModel * | model () const |
Additional Inherited Members | |
![]() | |
enum | Id { CreateElement = 0 , DeleteElement , ReparentElement , LayoutSnapshot , ModifyProperty , ModifyInitialState , ModifyDefaultState , ModifyElement , ModifyTransition , ChangeStateMachine } |
Modifies any specific property of a QObject.
Properties can also be referenced by their name (read: a simple string), so we can have a generic command that is capable of setting individual properties of an object. This is sometimes useful in order to not have to create commands for each and every property modification.
Definition at line 40 of file modifypropertycommand_p.h.
ModifyPropertyCommand::ModifyPropertyCommand | ( | QObject * | object, |
const char * | property, | ||
const QVariant & | value, | ||
const QString & | text = QString() , |
||
QUndoCommand * | parent = nullptr |
||
) |
Definition at line 24 of file modifypropertycommand.cpp.
ModifyPropertyCommand::ModifyPropertyCommand | ( | QObject * | object, |
const QJsonObject & | propertyMap, | ||
const QString & | text = QString() , |
||
QUndoCommand * | parent = nullptr |
||
) |
Definition at line 33 of file modifypropertycommand.cpp.
|
inlineoverride |
Definition at line 48 of file modifypropertycommand_p.h.
|
override |
Definition at line 59 of file modifypropertycommand.cpp.
|
override |
Definition at line 76 of file modifypropertycommand.cpp.