1 #include "CmdAbstract.h"
4 #include "MainWindow.h"
9 const QString &cmdDescription) :
10 QUndoCommand (cmdDescription),
11 m_mainWindow (mainWindow),
12 m_document (document),
15 LOG4CPP_INFO_S ((*mainCat)) <<
"CmdAbstract::CmdAbstract";
18 CmdAbstract::~CmdAbstract()
37 void CmdAbstract::redo ()
40 LOG4CPP_INFO_S ((*mainCat)) <<
"CmdAbstract::redo";
59 m_isFirstRedo =
false;
64 LOG4CPP_INFO_S ((*mainCat)) <<
"CmdAbstract::redo identifierIndex=" << m_identifierIndexBeforeRedo <<
"->"
65 << m_identifierIndexAfterRedo;
68 void CmdAbstract::undo ()
70 LOG4CPP_INFO_S ((*mainCat)) <<
"CmdAbstract::undo identifierIndex=" << m_identifierIndexAfterRedo <<
"->"
71 << m_identifierIndexBeforeRedo;
static void setIdentifierIndex(unsigned int identifierIndex)
Reset the current index while performing a Redo.
static unsigned int identifierIndex()
Return the current index for storage in case we need to reset it later while performing a Redo...
virtual void cmdRedo()=0
Redo method that is called when QUndoStack is moved one command forward.
CmdAbstract(MainWindow &mainWindow, Document &document, const QString &cmdDescription)
Single constructor.
MainWindow & mainWindow()
Return the MainWindow so it can be updated by this command as a last step.
Storage of one imported image and the data attached to that image.
virtual void cmdUndo()=0
Undo method that is called when QUndoStack is moved one command backward.
Document & document()
Return the Document that this command will modify during redo and undo.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...