Engauge Digitizer 2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
DlgEditScale Class Reference

Dialog box for editing the information of the map scale. More...

#include <DlgEditScale.h>

Inheritance diagram for DlgEditScale:
Inheritance graph
Collaboration diagram for DlgEditScale:
Collaboration graph

Public Member Functions

 DlgEditScale (MainWindow &mainWindow, const DocumentModelCoords &modelCoords, const DocumentModelGeneral &modelGeneral, const MainWindowModel &modelMainWindow, const double *scaleLength=0)
 Single constructor.
 
 ~DlgEditScale ()
 
double scaleLength () const
 Return the scale bar length specified by the user. Only applies if dialog was accepted.
 

Detailed Description

Dialog box for editing the information of the map scale.

Definition at line 22 of file DlgEditScale.h.

Constructor & Destructor Documentation

◆ DlgEditScale()

DlgEditScale::DlgEditScale ( MainWindow & mainWindow,
const DocumentModelCoords & modelCoords,
const DocumentModelGeneral & modelGeneral,
const MainWindowModel & modelMainWindow,
const double * scaleLength = 0 )

Single constructor.

Definition at line 34 of file DlgEditScale.cpp.

38 :
39 QDialog (&mainWindow),
40 m_modelCoords (modelCoords),
41 m_modelGeneral (modelGeneral),
42 m_modelMainWindow (modelMainWindow)
43{
44 LOG4CPP_INFO_S ((*mainCat)) << "DlgEditScale::DlgEditScale";
45
47 setLayout (layout);
48
49 setCursor (QCursor (Qt::ArrowCursor));
50 setModal(true);
51 setWindowTitle (tr ("Edit Axis Point"));
52
53 createScaleLength (layout);
54 createHint (layout);
55 createOkCancel (layout);
56
57 initializeScaleLength (scaleLength);
58
59 updateControls ();
60}
const int INNER_RADIUS_MIN
log4cpp::Category * mainCat
Definition Logger.cpp:14
double scaleLength() const
Return the scale bar length specified by the user. Only applies if dialog was accepted.
#define LOG4CPP_INFO_S(logger)
Definition convenience.h:18

◆ ~DlgEditScale()

DlgEditScale::~DlgEditScale ( )

Definition at line 62 of file DlgEditScale.cpp.

63{
64 LOG4CPP_INFO_S ((*mainCat)) << "DlgEditScale::~DlgEditScale";
65}

Member Function Documentation

◆ scaleLength()

double DlgEditScale::scaleLength ( ) const

Return the scale bar length specified by the user. Only applies if dialog was accepted.

Definition at line 134 of file DlgEditScale.cpp.

135{
136 double xTheta, yRadius;
137 const QString DUMMY_Y ("0");
138
139 FormatCoordsUnits format;
140
141 // Format conversion is done using x coordinate. Y coordinate is given a dummy value and the result is ignored
142 format.formattedToUnformatted (m_editScaleLength->text(),
143 DUMMY_Y,
144 m_modelCoords,
145 m_modelMainWindow,
146 xTheta,
147 yRadius);
148
149 return xTheta;
150}
Highest-level wrapper around other Formats classes.
void formattedToUnformatted(const QString &xThetaFormatted, const QString &yRadiusFormatted, const DocumentModelCoords &modelCoords, const MainWindowModel &mainWindowModel, double &xThetaUnformatted, double &yRadiusUnformatted) const
Convert formatted string to unformatted numeric value.

The documentation for this class was generated from the following files: