Engauge Digitizer
2
Main Page
Classes
Files
File List
File Members
Cmd
CmdUndoForTest.cpp
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 "CmdUndoForTest.h"
8
#include "DataKey.h"
9
#include "Document.h"
10
#include "DocumentSerialize.h"
11
#include "Logger.h"
12
#include "MainWindow.h"
13
#include "MimePoints.h"
14
#include <QXmlStreamReader>
15
#include "Xml.h"
16
17
const
QString CMD_DESCRIPTION (
"UndoForTest"
);
18
19
CmdUndoForTest::CmdUndoForTest
(
MainWindow
&mainWindow,
20
Document
&document) :
21
CmdAbstract
(mainWindow,
22
document,
23
CMD_DESCRIPTION)
24
{
25
LOG4CPP_INFO_S ((*mainCat)) <<
"CmdUndoForTest::CmdUndoForTest"
;
26
}
27
28
CmdUndoForTest::CmdUndoForTest
(
MainWindow
&
mainWindow
,
29
Document
&
document
,
30
const
QString &cmdDescription,
31
QXmlStreamReader &
/* reader */
) :
32
CmdAbstract
(mainWindow,
33
document,
34
cmdDescription)
35
{
36
LOG4CPP_INFO_S ((*mainCat)) <<
"CmdUndoForTest::CmdUndoForTest"
;
37
}
38
39
CmdUndoForTest::~CmdUndoForTest ()
40
{
41
}
42
43
void
CmdUndoForTest::cmdRedo
()
44
{
45
LOG4CPP_INFO_S ((*mainCat)) <<
"CmdUndoForTest::cmdRedo"
;
46
47
// Noop. Real Undo processing is performed externally on the command stack
48
}
49
50
void
CmdUndoForTest::cmdUndo
()
51
{
52
LOG4CPP_INFO_S ((*mainCat)) <<
"CmdUndoForTest::cmdUndo"
;
53
54
// Noop. Undo of an undo does not even make sense
55
}
56
57
void
CmdUndoForTest::saveXml
(QXmlStreamWriter &
/* writer */
)
const
58
{
59
// Noop. This command must be manually added to xml test files
60
}
CmdAbstract
Wrapper around QUndoCommand. This simplifies the more complicated feature set of QUndoCommand.
Definition:
CmdAbstract.h:19
CmdUndoForTest::saveXml
virtual void saveXml(QXmlStreamWriter &writer) const
Save commands as xml for later uploading.
Definition:
CmdUndoForTest.cpp:57
CmdUndoForTest::CmdUndoForTest
CmdUndoForTest(MainWindow &mainWindow, Document &document)
Constructor for normal creation.
Definition:
CmdUndoForTest.cpp:19
CmdUndoForTest::cmdRedo
virtual void cmdRedo()
Redo method that is called when QUndoStack is moved one command forward.
Definition:
CmdUndoForTest.cpp:43
CmdUndoForTest::cmdUndo
virtual void cmdUndo()
Undo method that is called when QUndoStack is moved one command backward.
Definition:
CmdUndoForTest.cpp:50
CmdAbstract::mainWindow
MainWindow & mainWindow()
Return the MainWindow so it can be updated by this command as a last step.
Definition:
CmdAbstract.cpp:45
Document
Storage of one imported image and the data attached to that image.
Definition:
Document.h:41
CmdAbstract::document
Document & document()
Return the Document that this command will modify during redo and undo.
Definition:
CmdAbstract.cpp:35
MainWindow
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition:
MainWindow.h:86
Generated on Tue Apr 4 2017 18:28:32 for Engauge Digitizer by
1.8.11