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

This is the inverse operation to the KDSME::CreateElementCommand command. More...

#include <deleteelementcommand_p.h>

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

Public Member Functions

 DeleteElementCommand (StateMachineScene *scene, Element *deletedElement, QUndoCommand *parent=nullptr)
 
 ~DeleteElementCommand ()
 
int id () const override
 
void redo () override
 
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

This is the inverse operation to the KDSME::CreateElementCommand command.

On redo it removes an element from the model, but still keeping a reference on it. On undo this element is registered in the model again.

Definition at line 35 of file deleteelementcommand_p.h.

Constructor & Destructor Documentation

◆ DeleteElementCommand()

DeleteElementCommand::DeleteElementCommand ( StateMachineScene scene,
Element deletedElement,
QUndoCommand *  parent = nullptr 
)
explicit

Definition at line 27 of file deleteelementcommand.cpp.

◆ ~DeleteElementCommand()

DeleteElementCommand::~DeleteElementCommand ( )

Definition at line 37 of file deleteelementcommand.cpp.

Member Function Documentation

◆ id()

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

Definition at line 43 of file deleteelementcommand_p.h.

◆ redo()

void DeleteElementCommand::redo ( )
override

◆ undo()

void DeleteElementCommand::undo ( )
override

Definition at line 59 of file deleteelementcommand.cpp.

References KDSME::Command::model().


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