Engauge Digitizer  2
CmdStackShadow.h
1 #ifndef CMD_STACK_SHADOW_H
2 #define CMD_STACK_SHADOW_H
3 
4 #include <QList>
5 #include <QObject>
6 
7 class CmdAbstract;
8 class Document;
9 class MainWindow;
10 class QXmlStreamReader;
11 
12 typedef QList<CmdAbstract*> CmdListInternal;
13 
24 class CmdStackShadow : public QObject
25 {
26  Q_OBJECT;
27 
28 public:
31 
33  bool canRedo () const;
34 
36  void loadCommands (MainWindow &mainWindow,
37  Document &document,
38  QXmlStreamReader &reader);
39 
40 public slots:
42  void slotRedo ();
43 
45  void slotUndo ();
46 
47 private:
48 
49  MainWindow *m_mainWindow;
50 
51  CmdListInternal m_cmdList;
52 };
53 
54 #endif // CMDSTACKSHADOW_H
Wrapper around QUndoCommand. This simplifies the more complicated feature set of QUndoCommand.
Definition: CmdAbstract.h:11
void slotRedo()
Move next command from list to CmdMediator. Noop if there are no more commands.
CmdStackShadow()
Single constructor.
bool canRedo() const
Return true if there is a command available.
void slotUndo()
Throw away every command since trying to reconcile two different command stacks after an undo is too ...
Storage of one imported image and the data attached to that image.
Definition: Document.h:28
Command stack that shadows the CmdMediator command stack at startup when reading commands from an err...
void loadCommands(MainWindow &mainWindow, Document &document, QXmlStreamReader &reader)
Load commands from serialized xml.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition: MainWindow.h:60