Engauge Digitizer  2
CmdAddPointGraph.h
1 #ifndef CMD_ADD_POINT_GRAPH_H
2 #define CMD_ADD_POINT_GRAPH_H
3 
4 #include "CmdAbstract.h"
5 #include <QPointF>
6 
7 class QXmlStreamReader;
8 class Transformation;
9 
12 {
13  public:
17  const QString &curveName,
18  const QPointF &posScreen,
19  double ordinal);
20 
22  CmdAddPointGraph(MainWindow &mainWindow,
23  Document &document,
24  const QString &cmdDescription,
25  QXmlStreamReader &reader);
26 
27  virtual ~CmdAddPointGraph();
28 
29  virtual void cmdRedo ();
30  virtual void cmdUndo ();
31  virtual void saveXml (QXmlStreamWriter &writer) const;
32 
33 private:
35 
36  QString m_curveName;
37 
38  QPointF m_posScreen;
39  double m_ordinal;
40 
41  QString m_identifierAdded; // Point that got added. This is generated by the Document during the Redo
42 };
43 
44 #endif // CMD_ADD_POINT_GRAPH_H
Wrapper around QUndoCommand. This simplifies the more complicated feature set of QUndoCommand.
Definition: CmdAbstract.h:11
virtual void cmdRedo()
Redo method that is called when QUndoStack is moved one command forward.
Affine transformation between screen and graph coordinates, based on digitized axis points...
Command for adding one graph point.
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
virtual void cmdUndo()
Undo method that is called when QUndoStack is moved one command backward.
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
virtual void saveXml(QXmlStreamWriter &writer) const
Save commands as xml for later uploading.