Engauge Digitizer  2
 All Classes Files Functions Variables Enumerations Enumerator Friends Pages
CmdMoveBy.h
1 #ifndef CMD_MOVE_BY_H
2 #define CMD_MOVE_BY_H
3 
4 #include "CmdAbstract.h"
5 #include "PointIdentifiers.h"
6 #include <QPointF>
7 #include <QStringList>
8 
9 class QXmlStreamReader;
10 
12 class CmdMoveBy : public CmdAbstract
13 {
14 public:
18  const QPointF &deltaScreen,
19  const QString &moveText,
20  const QStringList &selectedPointIdentifiers);
21 
23  CmdMoveBy(MainWindow &mainWindow,
24  Document &document,
25  const QString &cmdDescription,
26  QXmlStreamReader &reader);
27 
28  virtual ~CmdMoveBy();
29 
30  virtual void cmdRedo ();
31  virtual void cmdUndo ();
32  virtual void saveXml (QXmlStreamWriter &writer) const;
33 
34 private:
35  CmdMoveBy();
36 
37  void moveBy (const QPointF &deltaScreen);
38 
39  QPointF m_deltaScreen;
40  PointIdentifiers m_movedPoints;
41 };
42 
43 #endif // CMD_MOVE_BY_H
Hash table class that tracks point identifiers as the key, with a corresponding boolean value...
Wrapper around QUndoCommand. This simplifies the more complicated feature set of QUndoCommand.
Definition: CmdAbstract.h:11
virtual void cmdUndo()
Undo method that is called when QUndoStack is moved one command backward.
Definition: CmdMoveBy.cpp:76
Command for moving all selected Points by a specified translation.
Definition: CmdMoveBy.h:12
virtual void cmdRedo()
Redo method that is called when QUndoStack is moved one command forward.
Definition: CmdMoveBy.cpp:66
virtual void saveXml(QXmlStreamWriter &writer) const
Save commands as xml for later uploading.
Definition: CmdMoveBy.cpp:128
MainWindow & mainWindow()
Return the MainWindow so it can be updated by this command as a last step.
Definition: CmdAbstract.cpp:32
Storage of one imported image and the data attached to that image.
Definition: Document.h:29
Document & document()
Return the Document that this command will modify during redo and undo.
Definition: CmdAbstract.cpp:22
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition: MainWindow.h:66