KDStateMachineEditor API Documentation 2.3
Loading...
Searching...
No Matches
KDSME::ReparentElementCommand Class Reference

Modifies the parent element of a KDSME::Element. More...

#include <reparentelementcommand_p.h>

Inheritance diagram for KDSME::ReparentElementCommand:
Collaboration diagram for KDSME::ReparentElementCommand:

Public Member Functions

 ReparentElementCommand (StateMachineScene *view, Element *element, QUndoCommand *parent=nullptr)
int id () const override
void redo () override
Q_INVOKABLE void setParentElement (KDSME::Element *parentElement)
void undo () override
Public Member Functions inherited from KDSME::Command
 Command (const QString &text=QString(), QUndoCommand *parent=nullptr)
 Command (StateModel *model, QUndoCommand *parent=nullptr)
StateModel * model () const

Additional Inherited Members

Public Types inherited from KDSME::Command
enum  Id {
  CreateElement = 0 , DeleteElement , ReparentElement , LayoutSnapshot ,
  ModifyProperty , ModifyInitialState , ModifyDefaultState , ModifyElement ,
  ModifyTransition , ChangeStateMachine
}

Detailed Description

Modifies the parent element of a KDSME::Element.

This command is useful when dragging & dropping elements into a different level in the state chart hierarchy. On undo, the previous parent is restored.

Definition at line 35 of file reparentelementcommand_p.h.

Constructor & Destructor Documentation

◆ ReparentElementCommand()

ReparentElementCommand::ReparentElementCommand ( StateMachineScene * view,
Element * element,
QUndoCommand * parent = nullptr )

Definition at line 26 of file reparentelementcommand.cpp.

References KDSME::Command::Command().

Member Function Documentation

◆ id()

int KDSME::ReparentElementCommand::id ( ) const
inlineoverride

Definition at line 42 of file reparentelementcommand_p.h.

References KDSME::Command::ReparentElement.

◆ redo()

void ReparentElementCommand::redo ( )
override

Definition at line 41 of file reparentelementcommand.cpp.

References KDSME::Element::parentElement().

◆ setParentElement()

void ReparentElementCommand::setParentElement ( KDSME::Element * parentElement)

Definition at line 36 of file reparentelementcommand.cpp.

◆ undo()

void ReparentElementCommand::undo ( )
override

Definition at line 58 of file reparentelementcommand.cpp.


The documentation for this class was generated from the following files:

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDStateMachineEditor
Create Qt State Machine metacode using a graphical user interface
https://github.com/KDAB/KDStateMachineEditor
Generated on for KDStateMachineEditor API Documentation by doxygen 1.15.0