Engauge Digitizer
2
Loading...
Searching...
No Matches
Cmd
CmdRedoForTest.cpp
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
#include "
CmdRedoForTest.h
"
8
#include "
DataKey.h
"
9
#include "
Document.h
"
10
#include "
DocumentSerialize.h
"
11
#include "
Logger.h
"
12
#include "
MainWindow.h
"
13
#include <QXmlStreamReader>
14
#include "
Xml.h
"
15
16
const
QString
CMD_DESCRIPTION
(
"RedoForTest"
);
17
18
CmdRedoForTest::CmdRedoForTest
(
MainWindow
&
mainWindow
,
19
Document
&
document
) :
20
CmdAbstract
(
mainWindow
,
21
document
,
22
CMD_DESCRIPTION
)
23
{
24
LOG4CPP_INFO_S
((*
mainCat
)) <<
"CmdRedoForTest::CmdRedoForTest"
;
25
}
26
27
CmdRedoForTest::CmdRedoForTest
(
MainWindow
&
mainWindow
,
28
Document
&
document
,
29
const
QString &cmdDescription,
30
QXmlStreamReader &
/* reader */
) :
31
CmdAbstract
(
mainWindow
,
32
document
,
33
cmdDescription)
34
{
35
LOG4CPP_INFO_S
((*
mainCat
)) <<
"CmdRedoForTest::CmdRedoForTest"
;
36
}
37
38
CmdRedoForTest::~CmdRedoForTest
()
39
{
40
}
41
42
void
CmdRedoForTest::cmdRedo
()
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
}
50
51
void
CmdRedoForTest::cmdUndo
()
52
{
53
LOG4CPP_INFO_S
((*
mainCat
)) <<
"CmdRedoForTest::cmdUndo"
;
54
55
// Noop. Undo of an undo does not even make sense
56
57
restoreState
();
58
}
59
60
void
CmdRedoForTest::saveXml
(QXmlStreamWriter &
/* writer */
)
const
61
{
62
// Noop. This command must be manually added to xml test files
63
}
CMD_DESCRIPTION
const QString CMD_DESCRIPTION("Add axis point")
CMD_DESCRIPTION
const QString CMD_DESCRIPTION("RedoForTest")
CmdRedoForTest.h
DataKey.h
DocumentSerialize.h
Document.h
mainCat
log4cpp::Category * mainCat
Definition
Logger.cpp:14
Logger.h
MainWindow.h
Xml.h
CmdAbstract::document
Document & document()
Return the Document that this command will modify during redo and undo.
Definition
CmdAbstract.cpp:48
CmdAbstract::mainWindow
MainWindow & mainWindow()
Return the MainWindow so it can be updated by this command as a last step.
Definition
CmdAbstract.cpp:96
CmdAbstract::restoreState
void restoreState()
Before any other operations associated with a Cmd class are performed, this method is called to resto...
Definition
CmdAbstract.cpp:153
CmdAbstract::CmdAbstract
CmdAbstract(MainWindow &mainWindow, Document &document, const QString &cmdDescription)
Single constructor.
Definition
CmdAbstract.cpp:26
CmdRedoForTest::cmdRedo
virtual void cmdRedo()
Redo method that is called when QUndoStack is moved one command forward.
Definition
CmdRedoForTest.cpp:42
CmdRedoForTest::cmdUndo
virtual void cmdUndo()
Undo method that is called when QUndoStack is moved one command backward.
Definition
CmdRedoForTest.cpp:51
CmdRedoForTest::CmdRedoForTest
CmdRedoForTest(MainWindow &mainWindow, Document &document)
Constructor for normal creation.
Definition
CmdRedoForTest.cpp:18
CmdRedoForTest::saveXml
virtual void saveXml(QXmlStreamWriter &writer) const
Save commands as xml for later uploading.
Definition
CmdRedoForTest.cpp:60
CmdRedoForTest::~CmdRedoForTest
virtual ~CmdRedoForTest()
Definition
CmdRedoForTest.cpp:38
Document
Storage of one imported image and the data attached to that image.
Definition
Document.h:44
MainWindow
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition
MainWindow.h:95
LOG4CPP_INFO_S
#define LOG4CPP_INFO_S(logger)
Definition
convenience.h:18
Generated on
for Engauge Digitizer by
1.14.0