Engauge Digitizer 2
Loading...
Searching...
No Matches
DlgEditPointAxis.h
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2014 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_POINT_AXIS_H
8#define DLG_EDIT_POINT_AXIS_H
9
11#include "DocumentModelCoords.h"
13#include "MainWindowModel.h"
14#include <QDialog>
15#include <QLineEdit>
16#include <QPushButton>
17
19class MainWindow;
20class QVBoxLayout;
21class Transformation;
22
24class DlgEditPointAxis : public QDialog
25{
26 Q_OBJECT;
27
28public:
31 DlgEditPointAxis (MainWindow &mainWindow,
32 const DocumentModelCoords &modelCoords,
33 const DocumentModelGeneral &modelGeneral,
34 const MainWindowModel &modelMainWindow,
35 const Transformation &transformation,
36 DocumentAxesPointsRequired documentAxesPointsRequired,
37 bool isXOnly = false,
38 const double *xInitialValue = 0,
39 const double *yInitialValue = 0);
41
43 QPointF posGraph (bool &isXOnly) const;
44
45private slots:
46 void slotTextChanged (const QString &);
47
48private:
49 void createCoords (QVBoxLayout *layoutOuter);
50 void createHints (QVBoxLayout *layoutOuter,
51 DocumentAxesPointsRequired documentAxesPointsRequired);
52 void createOkCancel (QVBoxLayout *layoutOuter);
53 void initializeGraphCoordinates (const double *xInitialValue,
54 const double *yInitialValue,
55 const Transformation &transformation,
56 bool isX,
57 bool isY);
58 bool isCartesian () const;
59 QChar nameXTheta () const;
60 QChar nameYRadius () const;
61 QString unitsType (bool isXTheta) const;
62 void updateControls ();
63
64 QLineEdit *m_editGraphX;
65 DlgValidatorAbstract *m_validatorGraphX;
66 QLineEdit *m_editGraphY;
67 DlgValidatorAbstract *m_validatorGraphY;
68 QPushButton *m_btnOk;
69 QPushButton *m_btnCancel;
70
71 DocumentAxesPointsRequired m_documentAxesPointsRequired;
72
73 const DocumentModelCoords m_modelCoords;
74 const DocumentModelGeneral m_modelGeneral;
75 const MainWindowModel m_modelMainWindow;
76};
77
78#endif // DLG_EDIT_POINT_AXIS_H
QPointF posGraph(bool &isXOnly) const
Return the graph coordinates position specified by the user. Only applies if dialog was accepted.
DlgEditPointAxis(MainWindow &mainWindow, const DocumentModelCoords &modelCoords, const DocumentModelGeneral &modelGeneral, const MainWindowModel &modelMainWindow, const Transformation &transformation, DocumentAxesPointsRequired documentAxesPointsRequired, bool isXOnly=false, 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.
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:95
Affine transformation between screen and graph coordinates, based on digitized axis points.