Engauge Digitizer 2
Loading...
Searching...
No Matches
CmdRedoForTest Class Reference

Command for performing Redo during testing. More...

#include <CmdRedoForTest.h>

Inheritance diagram for CmdRedoForTest:
Inheritance graph
Collaboration diagram for CmdRedoForTest:
Collaboration graph

Public Member Functions

 CmdRedoForTest (MainWindow &mainWindow, Document &document)
 Constructor for normal creation.
 CmdRedoForTest (MainWindow &mainWindow, Document &document, const QString &cmdDescription, QXmlStreamReader &reader)
 Constructor for parsing error report file xml.
virtual ~CmdRedoForTest ()
virtual void cmdRedo ()
 Redo method that is called when QUndoStack is moved one command forward.
virtual void cmdUndo ()
 Undo method that is called when QUndoStack is moved one command backward.
virtual void saveXml (QXmlStreamWriter &writer) const
 Save commands as xml for later uploading.
Public Member Functions inherited from CmdAbstract
 CmdAbstract (MainWindow &mainWindow, Document &document, const QString &cmdDescription)
 Single constructor.
virtual ~CmdAbstract ()

Additional Inherited Members

Protected Member Functions inherited from CmdAbstract
void baseAttributes (QXmlStreamWriter &writer) const
 After writing leaf class attributes, this writes the base class atributes.
Documentdocument ()
 Return the Document that this command will modify during redo and undo.
const Documentdocument () const
 Return a const copy of the Document for non redo/undo interaction.
void leafAttributes (const QXmlStreamAttributes &attributes, const QStringList &requiredAttributesLeaf, QXmlStreamReader &reader)
 Same as often-used leafAndBaseAttributes, except this is used in the special case where a class inherits from another class (e.g.
void leafAndBaseAttributes (const QXmlStreamAttributes &attributes, const QStringList &requiredAttributesLeaf, QXmlStreamReader &reader)
 Before reading leaf class attributes, check all required attributes from leaf and this base class are included, then extract the parent class attributes.
MainWindowmainWindow ()
 Return the MainWindow so it can be updated by this command as a last step.
void resetSelection (const PointIdentifiers &pointIdentifiersToSelect)
 Call this (for consistency) after writing leaf class attributes, to write the base class attributes.
void restoreState ()
 Before any other operations associated with a Cmd class are performed, this method is called to restore original states to all relevant state machines.
void saveOrCheckPostCommandDocumentStateHash (const Document &document)
 Save, when called the first time, a hash value representing the state of the Document.
void saveOrCheckPreCommandDocumentStateHash (const Document &document)
 Save, when called the first time, a hash value representing the state of the Document.
void selectAddedPointForMoving (const QString &pointAdded)
 Select point that was just added so it can be moved by the user next for convenience.
void selectAddedPointsForMoving (const QStringList &pointsAdded)
 Select points that were just added so they can be moved by the user next for convenience.

Detailed Description

Command for performing Redo during testing.

This command is never created automatically, since when the user triggers an Redo that just results in the command stack getting backed up by one command. This command is manually created by editing an xml test file

Definition at line 20 of file CmdRedoForTest.h.

Constructor & Destructor Documentation

◆ CmdRedoForTest() [1/2]

CmdRedoForTest::CmdRedoForTest ( MainWindow & mainWindow,
Document & document )

Constructor for normal creation.

Definition at line 18 of file CmdRedoForTest.cpp.

19 :
23{
24 LOG4CPP_INFO_S ((*mainCat)) << "CmdRedoForTest::CmdRedoForTest";
25}
const QString CMD_DESCRIPTION("Add axis point")
log4cpp::Category * mainCat
Definition Logger.cpp:14
Document & document()
Return the Document that this command will modify during redo and undo.
MainWindow & mainWindow()
Return the MainWindow so it can be updated by this command as a last step.
CmdAbstract(MainWindow &mainWindow, Document &document, const QString &cmdDescription)
Single constructor.
#define LOG4CPP_INFO_S(logger)
Definition convenience.h:18

◆ CmdRedoForTest() [2/2]

CmdRedoForTest::CmdRedoForTest ( MainWindow & mainWindow,
Document & document,
const QString & cmdDescription,
QXmlStreamReader & reader )

Constructor for parsing error report file xml.

Definition at line 27 of file CmdRedoForTest.cpp.

30 :
33 cmdDescription)
34{
35 LOG4CPP_INFO_S ((*mainCat)) << "CmdRedoForTest::CmdRedoForTest";
36}

◆ ~CmdRedoForTest()

CmdRedoForTest::~CmdRedoForTest ( )
virtual

Definition at line 38 of file CmdRedoForTest.cpp.

39{
40}

Member Function Documentation

◆ cmdRedo()

void CmdRedoForTest::cmdRedo ( )
virtual

Redo method that is called when QUndoStack is moved one command forward.

Implements CmdAbstract.

Definition at line 42 of file CmdRedoForTest.cpp.

43{
44 LOG4CPP_INFO_S ((*mainCat)) << "CmdRedoForTest::cmdRedo";
45
46 // Noop. Real Redo processing is performed externally on the command stack
47
48 restoreState ();
49}
void restoreState()
Before any other operations associated with a Cmd class are performed, this method is called to resto...

◆ cmdUndo()

void CmdRedoForTest::cmdUndo ( )
virtual

Undo method that is called when QUndoStack is moved one command backward.

Implements CmdAbstract.

Definition at line 51 of file CmdRedoForTest.cpp.

52{
53 LOG4CPP_INFO_S ((*mainCat)) << "CmdRedoForTest::cmdUndo";
54
55 // Noop. Undo of an undo does not even make sense
56
57 restoreState ();
58}

◆ saveXml()

void CmdRedoForTest::saveXml ( QXmlStreamWriter & writer) const
virtual

Save commands as xml for later uploading.

Implements CmdAbstract.

Definition at line 60 of file CmdRedoForTest.cpp.

61{
62 // Noop. This command must be manually added to xml test files
63}

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