Engauge Digitizer  2
 All Classes Files Functions Variables Enumerations Enumerator Friends Pages
CmdAddPointsGraph.h
1 #ifndef CMD_ADD_POINTS_GRAPH_H
2 #define CMD_ADD_POINTS_GRAPH_H
3 
4 #include "CmdAbstract.h"
5 #include <QList>
6 #include <QPointF>
7 #include <QStringList>
8 
9 class QXmlStreamReader;
10 class Transformation;
11 
14 {
15  public:
19  const QString &curveName,
20  const QList<QPoint> &points,
21  const QList<double> &ordinals);
22 
24  CmdAddPointsGraph(MainWindow &mainWindow,
25  Document &document,
26  const QString &cmdDescription,
27  QXmlStreamReader &reader);
28 
29  virtual ~CmdAddPointsGraph();
30 
31  virtual void cmdRedo ();
32  virtual void cmdUndo ();
33  virtual void saveXml (QXmlStreamWriter &writer) const;
34 
35 private:
37 
38  QString m_curveName;
39 
40  QList<QPoint> m_points; // Screen coordinates
41  QList<double> m_ordinals;
42 
43  QStringList m_identifiersAdded; // Points that got added. This is generated by the Document during the Redo
44 };
45 
46 #endif // CMD_ADD_POINTS_GRAPH_H
Wrapper around QUndoCommand. This simplifies the more complicated feature set of QUndoCommand.
Definition: CmdAbstract.h:11
Affine transformation between screen and graph coordinates, based on digitized axis points...
Command for adding one or more graph points. This is for Segment Fill mode.
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
virtual void saveXml(QXmlStreamWriter &writer) const
Save commands as xml for later uploading.
virtual void cmdRedo()
Redo method that is called when QUndoStack is moved one command forward.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition: MainWindow.h:66