17#include <QUndoCommand>
18#include <QXmlStreamReader>
22 m_mainWindow (nullptr)
31 bool canRedo = (m_cmdList.count () > 0);
38 QXmlStreamReader &reader)
43 m_mainWindow = &mainWindow;
51 while (!reader.atEnd() && !reader.hasError()) {
57 m_cmdList.push_back (factory.
createCmd (mainWindow,
68 if (m_cmdList.count() > 0) {
71 QUndoCommand *cmd =
dynamic_cast<QUndoCommand*
> (m_cmdList.front());
74 m_cmdList.pop_front();
76 if (m_mainWindow !=
nullptr) {
81 if (cmdRedoForTest !=
nullptr) {
87 }
else if (cmdUndoForTest !=
nullptr) {
107 CmdListInternal::iterator itr;
108 for (itr = m_cmdList.begin(); itr != m_cmdList.end(); itr++) {
const QString DOCUMENT_SERIALIZE_CMD
log4cpp::Category * mainCat
QXmlStreamReader::TokenType loadNextFromReader(QXmlStreamReader &reader)
Load next token from xml reader.
Wrapper around QUndoCommand. This simplifies the more complicated feature set of QUndoCommand.
Factory for CmdAbstractBase objects.
CmdAbstract * createCmd(MainWindow &mainWindow, Document &document, QXmlStreamReader &reader)
Factory method. Input is the xml node from an error report file.
Command for performing Redo during testing.
void signalRedo()
Signal used to emulate a shift-control-z redo command from user during testing.
bool canRedo() const
Return true if there is a command available.
void slotRedo()
Move next command from list to CmdMediator. Noop if there are no more commands.
void signalUndo()
Signal used to emulate a shift-z undo command from user during testing.
void loadCommands(MainWindow &mainWindow, Document &document, QXmlStreamReader &reader)
Load commands from serialized xml.
void slotUndo()
Throw away every command since trying to reconcile two different command stacks after an undo is too ...
CmdStackShadow()
Single constructor.
Command for performing Undo during testing.
Storage of one imported image and the data attached to that image.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
CmdMediator * cmdMediator()
Accessor for commands to process the Document.
#define LOG4CPP_INFO_S(logger)