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