Engauge Digitizer  2
DlgEditPoint.h
1 #ifndef DLG_EDIT_POINT_H
2 #define DLG_EDIT_POINT_H
3 
4 #include "CoordUnitsDate.h"
5 #include "CoordUnitsNonPolarTheta.h"
6 #include "CoordUnitsPolarTheta.h"
7 #include "CoordUnitsTime.h"
8 #include <QCursor>
9 #include <QDialog>
10 #include <QLineEdit>
11 #include <QPushButton>
12 
16 class MainWindow;
17 class QDoubleValidator;
18 class QVBoxLayout;
19 class Transformation;
20 
22 class DlgEditPoint : public QDialog
23 {
24  Q_OBJECT;
25 
26 public:
29  DlgEditPoint (MainWindow &mainWindow,
30  DigitizeStateAbstractBase &digitizeState,
31  const DocumentModelCoords &modelCoords,
32  const QCursor &cursorShape,
33  const Transformation &transformation,
34  const double *xInitialValue = 0,
35  const double *yInitialValue = 0);
36  ~DlgEditPoint ();
37 
39  QPointF posGraph () const;
40 
41 signals:
43  void signalSetOverrideCursor (QCursor);
44 
45 private slots:
46  void slotTextChanged (const QString &);
47 
48 private:
49  void createCoords (QVBoxLayout *layoutOuter);
50  void createOkCancel (QVBoxLayout *layoutOuter);
51  void initializeGraphCoordinates (const double *xInitialValue,
52  const double *yInitialValue,
53  const Transformation &transformation);
54  bool isCartesian () const;
55  QChar nameXTheta () const;
56  QChar nameYRadius () const;
57  QString unitsType (bool isXTheta) const;
58  void updateControls ();
59 
60  QCursor m_cursorShape;
61  QLineEdit *m_editGraphX;
62  DlgValidatorAbstract *m_validatorGraphX;
63  QLineEdit *m_editGraphY;
64  DlgValidatorAbstract *m_validatorGraphY;
65  QPushButton *m_btnOk;
66  QPushButton *m_btnCancel;
67 
68  const DocumentModelCoords &m_modelCoords;
69 };
70 
71 #endif // DLG_EDIT_POINT_H
DlgEditPoint(MainWindow &mainWindow, DigitizeStateAbstractBase &digitizeState, const DocumentModelCoords &modelCoords, const QCursor &cursorShape, const Transformation &transformation, const double *xInitialValue=0, const double *yInitialValue=0)
Constructor for existing point which already has graph coordinates (which may be changed using this d...
Abstract validator for all numeric formats.
void signalSetOverrideCursor(QCursor)
Send a signal to trigger the setting of the override cursor.
QPointF posGraph() const
Return the graph coordinates position specified by the user. Only applies if dialog was accepted...
Affine transformation between screen and graph coordinates, based on digitized axis points...
Model for DlgSettingsCoords and CmdSettingsCoords.
Dialog box for editing the information of one axis point.
Definition: DlgEditPoint.h:22
Base class for all digitizing states. This serves as an interface to DigitizeStateContext.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition: MainWindow.h:60