dnai::commands::MoveCanvasCommand Class Reference

#include <movecanvascommand.h>

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

Public Member Functions

 MoveCanvasCommand (views::CanvasNode *canvas, const QPointF &pos, bool save)
 
void execute () const override
 Execute the command. More...
 
void executeSave () override
 Save current state of the command for the reverse unExcute() More...
 
void unExcute () const override
 Reverse the command. More...
 
QString infos () const override
 Get display info for this command. More...
 
- Public Member Functions inherited from dnai::commands::Command
 Command (const QString &name, bool save=false)
 
virtual bool isSave () const override
 Is the command is in a save state. More...
 
const QString & name () const
 Get the command name. More...
 

Private Attributes

QPointF m_pos
 
QPointF m_lastPos
 
views::CanvasNodem_canvas
 

Additional Inherited Members

- Protected Member Functions inherited from dnai::interfaces::ICommand
virtual ~ICommand ()=default
 
- Protected Attributes inherited from dnai::commands::Command
const QString m_name
 
const bool m_save
 

Constructor & Destructor Documentation

dnai::commands::MoveCanvasCommand::MoveCanvasCommand ( views::CanvasNode canvas,
const QPointF &  pos,
bool  save 
)

Member Function Documentation

void dnai::commands::MoveCanvasCommand::execute ( ) const
overridevirtual

Execute the command.

Reimplemented from dnai::commands::Command.

void dnai::commands::MoveCanvasCommand::executeSave ( )
overridevirtual

Save current state of the command for the reverse unExcute()

Reimplemented from dnai::commands::Command.

QString dnai::commands::MoveCanvasCommand::infos ( ) const
overridevirtual

Get display info for this command.

Returns
QString

Reimplemented from dnai::commands::Command.

void dnai::commands::MoveCanvasCommand::unExcute ( ) const
overridevirtual

Reverse the command.

Reimplemented from dnai::commands::Command.

Member Data Documentation

views::CanvasNode* dnai::commands::MoveCanvasCommand::m_canvas
private
QPointF dnai::commands::MoveCanvasCommand::m_lastPos
private
QPointF dnai::commands::MoveCanvasCommand::m_pos
private

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