Engauge Digitizer 2
Loading...
Searching...
No Matches
CmdStackShadow.h
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
7#ifndef CMD_STACK_SHADOW_H
8#define CMD_STACK_SHADOW_H
9
10#include <QList>
11#include <QObject>
12
13class CmdAbstract;
14class Document;
15class MainWindow;
16class QXmlStreamReader;
17
18typedef QList<CmdAbstract*> CmdListInternal;
19
30class CmdStackShadow : public QObject
31{
32 Q_OBJECT;
33
34public:
37
39 bool canRedo () const;
40
42 void loadCommands (MainWindow &mainWindow,
43 Document &document,
44 QXmlStreamReader &reader);
45
46public slots:
48 void slotRedo ();
49
51 void slotUndo ();
52
53signals:
55 void signalRedo();
56
58 void signalUndo();
59
60private:
61
62 MainWindow *m_mainWindow;
63
64 CmdListInternal m_cmdList;
65};
66
67#endif // CMDSTACKSHADOW_H
QList< CmdAbstract * > CmdListInternal
Wrapper around QUndoCommand. This simplifies the more complicated feature set of QUndoCommand.
Definition CmdAbstract.h:20
Command stack that shadows the CmdMediator command stack at startup when reading commands from an err...
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.
Storage of one imported image and the data attached to that image.
Definition Document.h:42
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition MainWindow.h:92