#include <command.h>

Inheritance diagram for dnai::commands::Command:
Inheritance graph
Collaboration diagram for dnai::commands::Command:
Collaboration graph

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

- Protected Member Functions inherited from dnai::interfaces::ICommand
virtual ~ICommand ()=default
 

Constructor & Destructor Documentation

dnai::commands::Command::Command ( const QString &  name,
bool  save = false 
)
explicit

Member Function Documentation

void dnai::commands::Command::execute ( ) const
overridevirtual
void dnai::commands::Command::executeSave ( )
overridevirtual
QString dnai::commands::Command::infos ( ) const
overridevirtual
bool dnai::commands::Command::isSave ( ) const
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&
void dnai::commands::Command::unExcute ( ) const
overridevirtual

Member Data Documentation

const QEvent::Type dnai::commands::Command::CommandEvent = static_cast<QEvent::Type>(QEvent::registerEventType())
staticprivate
const QString dnai::commands::Command::m_name
protected
const bool dnai::commands::Command::m_save
protected

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