00001
00002
00003
00004
00005
00006
00007 #ifndef DLG_EDIT_POINT_GRAPH_H
00008 #define DLG_EDIT_POINT_GRAPH_H
00009
00010 #include <QDialog>
00011 #include <QPointF>
00012 #include <QString>
00013
00014 class DlgEditPointGraphLineEdit;
00015 class DlgValidatorAbstract;
00016 class DocumentModelCoords;
00017 class DocumentModelGeneral;
00018 class MainWindow;
00019 class MainWindowModel;
00020 class QPushButton;
00021 class QVBoxLayout;
00022 class Transformation;
00023
00025 class DlgEditPointGraph : public QDialog
00026 {
00027 Q_OBJECT;
00028
00029 public:
00032 DlgEditPointGraph (MainWindow &mainWindow,
00033 const DocumentModelCoords &modelCoords,
00034 const DocumentModelGeneral &modelGeneral,
00035 const MainWindowModel &modelMainWindow,
00036 const Transformation &transformation,
00037 const double *xInitialValue = 0,
00038 const double *yInitialValue = 0);
00039 ~DlgEditPointGraph ();
00040
00042 void posGraph (bool &isX, double &x, bool &isY, double &y) const;
00043
00044 private slots:
00045 void slotTextChanged (const QString &);
00046
00047 private:
00048 DlgEditPointGraph ();
00049
00050 void createCoords (QVBoxLayout *layoutOuter);
00051 void createHint (QVBoxLayout *layoutOuter);
00052 void createOkCancel (QVBoxLayout *layoutOuter);
00053 void initializeGraphCoordinates (const double *xInitialValue,
00054 const double *yInitialValue,
00055 const Transformation &transformation);
00056 bool isCartesian () const;
00057 QChar nameXTheta () const;
00058 QChar nameYRadius () const;
00059 QString unitsType (bool isXTheta) const;
00060 void updateControls ();
00061
00062 DlgValidatorAbstract *m_validatorGraphX;
00063 DlgEditPointGraphLineEdit *m_editGraphX;
00064 DlgValidatorAbstract *m_validatorGraphY;
00065 DlgEditPointGraphLineEdit *m_editGraphY;
00066 QPushButton *m_btnOk;
00067 QPushButton *m_btnCancel;
00068
00069
00070 bool m_changed;
00071
00072 const DocumentModelCoords &m_modelCoords;
00073 const DocumentModelGeneral &m_modelGeneral;
00074 const MainWindowModel &m_modelMainWindow;
00075 };
00076
00077 #endif // DLG_EDIT_POINT_GRAPH_H