#include <command.h>


Public Member Functions | |
Command (const QString &name, bool save=false) | |
virtual void | execute () const override |
Execute the command. More... | |
virtual void | executeSave () override |
Save current state of the command for the reverse unExcute() More... | |
virtual void | unExcute () const override |
Reverse the execute() function. More... | |
virtual QString | infos () const override |
Get display info for this command. More... | |
virtual bool | isSave () const override |
Is the command is in a save state. More... | |
const QString & | name () const |
Get the command name. More... | |
Protected Attributes | |
const QString | m_name |
const bool | m_save |
Static Private Attributes | |
static const QEvent::Type | CommandEvent = static_cast<QEvent::Type>(QEvent::registerEventType()) |
Additional Inherited Members | |
![]() | |
virtual | ~ICommand ()=default |
Constructor & Destructor Documentation
|
explicit |
Member Function Documentation
|
overridevirtual |
Execute the command.
Implements dnai::interfaces::ICommand.
Reimplemented in dnai::commands::CoreCommand, dnai::commands::MoveNodeCommand, dnai::commands::GenericCommand< Args >, dnai::commands::ZoomCanvasCommand, and dnai::commands::MoveCanvasCommand.
|
overridevirtual |
Save current state of the command for the reverse unExcute()
Implements dnai::interfaces::ICommand.
Reimplemented in dnai::commands::GenericCommand< Args >, dnai::commands::CoreCommand, dnai::commands::MoveNodeCommand, dnai::commands::ZoomCanvasCommand, and dnai::commands::MoveCanvasCommand.
|
overridevirtual |
Get display info for this command.
- Returns
- QString
Implements dnai::interfaces::ICommand.
Reimplemented in dnai::commands::GenericCommand< Args >, dnai::commands::ZoomCanvasCommand, dnai::commands::MoveCanvasCommand, and dnai::commands::MoveNodeCommand.
|
overridevirtual |
Is the command is in a save state.
- Returns
- bool
Implements dnai::interfaces::ICommand.
Reimplemented in dnai::commands::GenericCommand< Args >.
const QString & dnai::commands::Command::name | ( | ) | const |
Get the command name.
- Returns
- const QString&
|
overridevirtual |
Reverse the execute() function.
Implements dnai::interfaces::ICommand.
Reimplemented in dnai::commands::GenericCommand< Args >, dnai::commands::ZoomCanvasCommand, dnai::commands::CoreCommand, dnai::commands::MoveNodeCommand, and dnai::commands::MoveCanvasCommand.
Member Data Documentation
|
staticprivate |
|
protected |
|
protected |
The documentation for this class was generated from the following files:
- Gui/app/include/dnai/commands/command.h
- Gui/app/src/dnai/commands/command.cpp