Engauge Digitizer  2
Public Slots | Signals | Public Member Functions | List of all members
CmdStackShadow Class Reference

Command stack that shadows the CmdMediator command stack at startup when reading commands from an error report file. More...

#include <CmdStackShadow.h>

Inheritance diagram for CmdStackShadow:

Public Slots

void slotRedo ()
 Move next command from list to CmdMediator. Noop if there are no more commands.
 
void slotUndo ()
 Throw away every command since trying to reconcile two different command stacks after an undo is too dangerous.
 

Signals

void signalRedo ()
 Signal used to emulate a shift-control-z redo command from user during testing.
 
void signalUndo ()
 Signal used to emulate a shift-z undo command from user during testing.
 

Public Member Functions

 CmdStackShadow ()
 Single constructor.
 
bool canRedo () const
 Return true if there is a command available.
 
void loadCommands (MainWindow &mainWindow, Document &document, QXmlStreamReader &reader)
 Load commands from serialized xml.
 

Detailed Description

Command stack that shadows the CmdMediator command stack at startup when reading commands from an error report file.

The commands are loaded into this container rather than CmdMediator, since CmdMediator would try to execute all the commands immediately. For the best debugging, we want to be able to execute each command one by one. This container nicely stores commands until we want to copy them to CmdMediator so they can be executed.

This class is not subclassed from QUndoStack since that class is designed to prevent access to individual commands, to preserve their integrity

This class is not named CmdMediatorShadow since does not maintain a Document like CmdMediator, although in some ways that name might be a useful alias

Definition at line 30 of file CmdStackShadow.h.


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