Engauge Digitizer
2
Main Page
Classes
Files
File List
File Members
Cmd
CmdAbstract.h
1
#ifndef CMD_ABSTRACT_H
2
#define CMD_ABSTRACT_H
3
4
#include <QUndoCommand>
5
6
class
Document
;
7
class
MainWindow
;
8
class
QXmlStreamWriter;
9
11
class
CmdAbstract
:
public
QUndoCommand
12
{
13
public
:
15
CmdAbstract
(
MainWindow
&
mainWindow
,
16
Document
&
document
,
17
const
QString &cmdDescription);
18
19
virtual
~
CmdAbstract
();
20
22
virtual
void
cmdRedo
() = 0;
23
25
virtual
void
cmdUndo
() = 0;
26
28
virtual
void
saveXml
(QXmlStreamWriter &writer)
const
= 0;
29
30
protected
:
32
Document
&
document
();
33
35
const
Document
&
document
()
const
;
36
38
MainWindow
&
mainWindow
();
39
40
private
:
41
CmdAbstract
();
42
43
virtual
void
redo ();
// Calls cmdRedo
44
virtual
void
undo ();
// Calls cmdUndo
45
46
MainWindow
&m_mainWindow;
47
Document
&m_document;
48
49
// Snapshots of GraphicsPointAbstractBase::identifierIndex before and after redo
50
bool
m_isFirstRedo;
51
unsigned
int
m_identifierIndexBeforeRedo;
52
unsigned
int
m_identifierIndexAfterRedo;
53
};
54
55
#endif // CMD_ABSTRACT_H
CmdAbstract
Wrapper around QUndoCommand. This simplifies the more complicated feature set of QUndoCommand.
Definition:
CmdAbstract.h:11
CmdAbstract::cmdRedo
virtual void cmdRedo()=0
Redo method that is called when QUndoStack is moved one command forward.
CmdAbstract::mainWindow
MainWindow & mainWindow()
Return the MainWindow so it can be updated by this command as a last step.
Definition:
CmdAbstract.cpp:32
Document
Storage of one imported image and the data attached to that image.
Definition:
Document.h:28
CmdAbstract::cmdUndo
virtual void cmdUndo()=0
Undo method that is called when QUndoStack is moved one command backward.
CmdAbstract::saveXml
virtual void saveXml(QXmlStreamWriter &writer) const =0
Save commands as xml for later uploading.
CmdAbstract::document
Document & document()
Return the Document that this command will modify during redo and undo.
Definition:
CmdAbstract.cpp:22
MainWindow
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition:
MainWindow.h:60
Generated on Sat Nov 21 2015 03:14:07 for Engauge Digitizer by
1.8.9.1