00001
00002
00003
00004
00005
00006
00007 #ifndef DLG_EDIT_SCALE_H
00008 #define DLG_EDIT_SCALE_H
00009
00010 #include <QDialog>
00011 #include <QLineEdit>
00012 #include <QPushButton>
00013
00014 class DlgValidatorAbstract;
00015 class DocumentModelCoords;
00016 class DocumentModelGeneral;
00017 class MainWindow;
00018 class MainWindowModel;
00019 class QVBoxLayout;
00020
00022 class DlgEditScale : public QDialog
00023 {
00024 Q_OBJECT;
00025
00026 public:
00028 DlgEditScale (MainWindow &mainWindow,
00029 const DocumentModelCoords &modelCoords,
00030 const DocumentModelGeneral &modelGeneral,
00031 const MainWindowModel &modelMainWindow,
00032 const double *scaleLength = 0);
00033 ~DlgEditScale ();
00034
00036 double scaleLength () const;
00037
00038 private slots:
00039 void slotTextChanged (const QString &);
00040
00041 private:
00042 void createHint (QVBoxLayout *layoutOuter);
00043 void createOkCancel (QVBoxLayout *layoutOuter);
00044 void createScaleLength (QVBoxLayout *layoutOuter);
00045 void initializeScaleLength (const double *scaleLength);
00046 void updateControls ();
00047
00048 QLineEdit *m_editScaleLength;
00049 DlgValidatorAbstract *m_validatorScaleLength;
00050 QPushButton *m_btnOk;
00051 QPushButton *m_btnCancel;
00052
00053 const DocumentModelCoords &m_modelCoords;
00054 const DocumentModelGeneral &m_modelGeneral;
00055 const MainWindowModel &m_modelMainWindow;
00056 };
00057
00058 #endif // DLG_EDIT_SCALE_H