Engauge Digitizer 2
Loading...
Searching...
No Matches
DlgEditScale.h
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2017 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
7#ifndef DLG_EDIT_SCALE_H
8#define DLG_EDIT_SCALE_H
9
10#include <QDialog>
11#include <QLineEdit>
12#include <QPushButton>
13
17class MainWindow;
18class MainWindowModel;
19class QVBoxLayout;
20
22class DlgEditScale : public QDialog
23{
24 Q_OBJECT;
25
26public:
28 DlgEditScale (MainWindow &mainWindow,
29 const DocumentModelCoords &modelCoords,
30 const DocumentModelGeneral &modelGeneral,
31 const MainWindowModel &modelMainWindow,
32 const double *scaleLength = 0);
34
36 double scaleLength () const;
37
38private slots:
39 void slotTextChanged (const QString &);
40
41private:
42 void createHint (QVBoxLayout *layoutOuter);
43 void createOkCancel (QVBoxLayout *layoutOuter);
44 void createScaleLength (QVBoxLayout *layoutOuter);
45 void initializeScaleLength (const double *scaleLength);
46 void updateControls ();
47
48 QLineEdit *m_editScaleLength;
49 DlgValidatorAbstract *m_validatorScaleLength;
50 QPushButton *m_btnOk;
51 QPushButton *m_btnCancel;
52
53 const DocumentModelCoords &m_modelCoords;
54 const DocumentModelGeneral &m_modelGeneral;
55 const MainWindowModel &m_modelMainWindow;
56};
57
58#endif // DLG_EDIT_SCALE_H
Dialog box for editing the information of the map scale.
DlgEditScale(MainWindow &mainWindow, const DocumentModelCoords &modelCoords, const DocumentModelGeneral &modelGeneral, const MainWindowModel &modelMainWindow, const double *scaleLength=0)
Single constructor.
double scaleLength() const
Return the scale bar length specified by the user. Only applies if dialog was accepted.
Abstract validator for all numeric formats.
Model for DlgSettingsCoords and CmdSettingsCoords.
Model for DlgSettingsGeneral and CmdSettingsGeneral.
Model for DlgSettingsMainWindow.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition MainWindow.h:92