KDStateMachineEditor API Documentation 2.1
Loading...
Searching...
No Matches
Public Member Functions | List of all members
KDSME::ReparentElementCommand Class Reference

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

#include <reparentelementcommand_p.h>

Inheritance diagram for KDSME::ReparentElementCommand:
Inheritance graph
[legend]
Collaboration diagram for KDSME::ReparentElementCommand:
Collaboration graph
[legend]

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)
 
StateModelmodel () 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.

Member Function Documentation

◆ id()

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

Definition at line 42 of file reparentelementcommand_p.h.

◆ redo()

void ReparentElementCommand::redo ( )
override

Definition at line 41 of file reparentelementcommand.cpp.

◆ 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 Tue Jul 15 2025 15:21:47 for KDStateMachineEditor API Documentation by doxygen 1.9.8