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

Creates a snapshot of the current layout of the state chart. More...

#include <layoutsnapshotcommand_p.h>

Inheritance diagram for KDSME::LayoutSnapshotCommand:
Collaboration diagram for KDSME::LayoutSnapshotCommand:

Public Member Functions

 LayoutSnapshotCommand (StateMachineScene *scene, const QString &text, QUndoCommand *parent=nullptr)
 LayoutSnapshotCommand (StateMachineScene *scene, QUndoCommand *parent=nullptr)
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)
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

Creates a snapshot of the current layout of the state chart.

This is useful when a user requested an automatic layout manually. This command should be used before the automatic layout happens, so the user can restore the initial layout when undoing the command.

Definition at line 34 of file layoutsnapshotcommand_p.h.

Constructor & Destructor Documentation

◆ LayoutSnapshotCommand() [1/2]

LayoutSnapshotCommand::LayoutSnapshotCommand ( StateMachineScene * scene,
QUndoCommand * parent = nullptr )
explicit

Definition at line 22 of file layoutsnapshotcommand.cpp.

References KDSME::Command::Command().

◆ LayoutSnapshotCommand() [2/2]

LayoutSnapshotCommand::LayoutSnapshotCommand ( StateMachineScene * scene,
const QString & text,
QUndoCommand * parent = nullptr )

Definition at line 28 of file layoutsnapshotcommand.cpp.

References KDSME::Command::Command().

Member Function Documentation

◆ id()

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

Definition at line 42 of file layoutsnapshotcommand_p.h.

References KDSME::Command::LayoutSnapshot.

◆ redo()

void LayoutSnapshotCommand::redo ( )
override

Definition at line 34 of file layoutsnapshotcommand.cpp.

◆ undo()

void LayoutSnapshotCommand::undo ( )
override

Definition at line 39 of file layoutsnapshotcommand.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