Engauge Digitizer
2
Dlg
DlgEditPointGraph.h
1
/******************************************************************************************************
2
* (C) 2016 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_GRAPH_H
8
#define DLG_EDIT_POINT_GRAPH_H
9
10
#include <QDialog>
11
#include <QPointF>
12
#include <QString>
13
14
class
DlgEditPointGraphLineEdit
;
15
class
DlgValidatorAbstract
;
16
class
DocumentModelCoords
;
17
class
DocumentModelGeneral
;
18
class
MainWindow
;
19
class
MainWindowModel
;
20
class
QPushButton;
21
class
QVBoxLayout;
22
class
Transformation
;
23
25
class
DlgEditPointGraph
:
public
QDialog
26
{
27
Q_OBJECT;
28
29
public
:
32
DlgEditPointGraph
(
MainWindow
&mainWindow,
33
const
DocumentModelCoords
&modelCoords,
34
const
DocumentModelGeneral
&modelGeneral,
35
const
MainWindowModel
&modelMainWindow,
36
const
Transformation
&transformation,
37
const
double
*xInitialValue = 0,
38
const
double
*yInitialValue = 0);
39
~
DlgEditPointGraph
();
40
42
void
posGraph
(
bool
&isX,
double
&x,
bool
&isY,
double
&y)
const
;
43
44
private
slots:
45
void
slotTextChanged (
const
QString &);
46
47
private
:
48
DlgEditPointGraph
();
49
50
void
createCoords (QVBoxLayout *layoutOuter);
51
void
createHint (QVBoxLayout *layoutOuter);
52
void
createOkCancel (QVBoxLayout *layoutOuter);
53
void
initializeGraphCoordinates (
const
double
*xInitialValue,
54
const
double
*yInitialValue,
55
const
Transformation
&transformation);
56
bool
isCartesian ()
const
;
57
QChar nameXTheta ()
const
;
58
QChar nameYRadius ()
const
;
59
QString unitsType (
bool
isXTheta)
const
;
60
void
updateControls ();
61
62
DlgValidatorAbstract
*m_validatorGraphX;
63
DlgEditPointGraphLineEdit
*m_editGraphX;
64
DlgValidatorAbstract
*m_validatorGraphY;
65
DlgEditPointGraphLineEdit
*m_editGraphY;
66
QPushButton *m_btnOk;
67
QPushButton *m_btnCancel;
68
69
// Enable Ok button once text has changed. For simplicity, this is true even when original text is restored
70
bool
m_changed;
71
72
const
DocumentModelCoords
&m_modelCoords;
73
const
DocumentModelGeneral
&m_modelGeneral;
74
const
MainWindowModel
&m_modelMainWindow;
75
};
76
77
#endif // DLG_EDIT_POINT_GRAPH_H
DocumentModelGeneral
Model for DlgSettingsGeneral and CmdSettingsGeneral.
Definition:
DocumentModelGeneral.h:16
DlgEditPointGraphLineEdit
Adds hover highlighting to QLineEdit.
Definition:
DlgEditPointGraphLineEdit.h:15
DlgValidatorAbstract
Abstract validator for all numeric formats.
Definition:
DlgValidatorAbstract.h:14
Transformation
Affine transformation between screen and graph coordinates, based on digitized axis points...
Definition:
Transformation.h:31
MainWindowModel
Model for DlgSettingsMainWindow.
Definition:
MainWindowModel.h:27
DocumentModelCoords
Model for DlgSettingsCoords and CmdSettingsCoords.
Definition:
DocumentModelCoords.h:20
DlgEditPointGraph::posGraph
void posGraph(bool &isX, double &x, bool &isY, double &y) const
Return one or both coordinates. Only applies if dialog was accepted.
Definition:
DlgEditPointGraph.cpp:219
DlgEditPointGraph
Dialog box for editing the information of one or more points.
Definition:
DlgEditPointGraph.h:25
MainWindow
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition:
MainWindow.h:89
Generated on Sat Oct 21 2017 12:50:37 for Engauge Digitizer by
1.8.13