KDStateMachineEditor API Documentation 2.1
|
Command for modifying properties of KDSME::Element. More...
#include <modifyelementcommand_p.h>
Public Member Functions | |
ModifyElementCommand (Element *item, QUndoCommand *parent=nullptr) | |
int | id () const override |
Element * | item () const |
bool | mergeWith (const QUndoCommand *other) override |
Q_INVOKABLE void | moveBy (qreal dx, qreal dy) |
void | redo () override |
Q_INVOKABLE void | setGeometry (const QRectF &geometry) |
void | undo () override |
![]() | |
Command (const QString &text=QString(), QUndoCommand *parent=nullptr) | |
Command (StateModel *model, QUndoCommand *parent=nullptr) | |
StateModel * | model () const |
Protected Types | |
enum | Operation { NoOperation , MoveOperation , SetGeometryOperation , UserOperation = 100 } |
Protected Attributes | |
int | m_operation |
Additional Inherited Members | |
![]() | |
enum | Id { CreateElement = 0 , DeleteElement , ReparentElement , LayoutSnapshot , ModifyProperty , ModifyInitialState , ModifyDefaultState , ModifyElement , ModifyTransition , ChangeStateMachine } |
Command for modifying properties of KDSME::Element.
A command can only set one property at the time. On undo, the previous value of the property is restored.
Definition at line 35 of file modifyelementcommand_p.h.
|
protected |
Enumerator | |
---|---|
NoOperation | |
MoveOperation | |
SetGeometryOperation | |
UserOperation | Subclass takes care of executing this operation. |
Definition at line 57 of file modifyelementcommand_p.h.
|
explicit |
Definition at line 35 of file modifyelementcommand.cpp.
References item().
|
inlineoverride |
Definition at line 44 of file modifyelementcommand_p.h.
Element * KDSME::ModifyElementCommand::item | ( | ) | const |
Definition at line 43 of file modifyelementcommand.cpp.
Referenced by ModifyElementCommand().
|
override |
Definition at line 97 of file modifyelementcommand.cpp.
References m_operation.
void KDSME::ModifyElementCommand::moveBy | ( | qreal | dx, |
qreal | dy | ||
) |
Definition at line 48 of file modifyelementcommand.cpp.
|
override |
Definition at line 62 of file modifyelementcommand.cpp.
void ModifyElementCommand::setGeometry | ( | const QRectF & | geometry | ) |
Definition at line 55 of file modifyelementcommand.cpp.
References m_operation, and SetGeometryOperation.
|
override |
Definition at line 80 of file modifyelementcommand.cpp.
|
protected |
Definition at line 66 of file modifyelementcommand_p.h.
Referenced by mergeWith(), and setGeometry().