#include "InputCoordinateDialog.h"#include "ui_InputCoordinateForm.h"#include "../../../geometry/Coord2D.h"#include "../Exception.h"#include "../canvas/MapDisplay.h"#include <iostream>#include <QDoubleValidator>#include <QPushButton>#include <QRegularExpression>Go to the source code of this file.
Classes | |
| class | DMSValidator |
| Class used to evaluate the coordinates given as degree-minute-second values. More... | |
Functions | |
| QString | DD2DMS (const double &value) |
| Transforms a decimal-degree value in a degree-minute-second formatted string. More... | |
| double | DMS2DD (const int &d, const int &m, const int &s) |
| Transforms a degree-minute-second value into a decimal-degree value. More... | |
| te::gm::Envelope | GetCenteredBox (const te::gm::Envelope &world, const te::gm::Coord2D ¢er) |
| Returns a centralized box maintaining the aspect ratio of the older one. More... | |
| QString | GetDMSAsString (const int &d, const int &m, const int &s) |
| Returns the value as a formatted string. More... | |
| QString | GetLineEditMask (const bool &decimalDegree) |
| Returns the mask to be used by lineEdit objects. More... | |
| QValidator::State | IsAValidDMSValue (const QString &dms, int &d, int &m, int &s) |
| Returns the status of the dms construction. More... | |
| QValidator::State | IsAValidDMSValue (const QString &dms) |
| void | ParseDMS (const QRegularExpressionMatch &match, int &d, int &m, int &s) |
| Extracts the degree, minute and second portions of the match object. More... | |
| QString DD2DMS | ( | const double & | value | ) |
Transforms a decimal-degree value in a degree-minute-second formatted string.
| value | Value in decimal-degrees. |
Definition at line 247 of file InputCoordinateDialog.cpp.
References GetDMSAsString().
Referenced by te::qt::widgets::InputCoordinateDialog::DMS_triggered().
Transforms a degree-minute-second value into a decimal-degree value.
| d | Degrees. |
| m | Minutes. |
| s | Seconds. |
Definition at line 220 of file InputCoordinateDialog.cpp.
References d.
Referenced by te::qt::widgets::InputCoordinateDialog::DD_triggered(), and te::qt::widgets::InputCoordinateDialog::getCoordinate().
| te::gm::Envelope GetCenteredBox | ( | const te::gm::Envelope & | world, |
| const te::gm::Coord2D & | center | ||
| ) |
Returns a centralized box maintaining the aspect ratio of the older one.
| world | The bounding rect of the current visible area. |
| center | Point where to centralize. |
Definition at line 272 of file InputCoordinateDialog.cpp.
References te::gm::Envelope::getHeight(), te::gm::Envelope::getWidth(), te::gm::Coord2D::getX(), and te::gm::Coord2D::getY().
Referenced by te::qt::widgets::InputCoordinateDialog::ok_triggered().
Returns the value as a formatted string.
| d | Degrees. |
| m | Minutes. |
| s | Seconds. |
Definition at line 147 of file InputCoordinateDialog.cpp.
Referenced by DD2DMS(), and DMSValidator::fixup().
| QString GetLineEditMask | ( | const bool & | decimalDegree | ) |
Returns the mask to be used by lineEdit objects.
| decimalDegree | Flag telling what kind of validators we will use. |
Definition at line 199 of file InputCoordinateDialog.cpp.
Referenced by te::qt::widgets::InputCoordinateDialog::updateValidator().
Returns the status of the dms construction.
| dms | The degree-minute-second value. | |
| [out] | d | Degrees. |
| [out] | m | Minutes. |
| [out] | s | Seconds. |
Definition at line 88 of file InputCoordinateDialog.cpp.
References ParseDMS().
Referenced by te::qt::widgets::InputCoordinateDialog::DD_triggered(), DMSValidator::fixup(), te::qt::widgets::InputCoordinateDialog::getCoordinate(), IsAValidDMSValue(), and DMSValidator::validate().
| QValidator::State IsAValidDMSValue | ( | const QString & | dms | ) |
Definition at line 127 of file InputCoordinateDialog.cpp.
References d, and IsAValidDMSValue().
Extracts the degree, minute and second portions of the match object.
| match | Qt structure that has a regular expression. | |
| [out] | d | Degrees. |
| [out] | m | Minutes. |
| [out] | s | Seconds. |
Definition at line 33 of file InputCoordinateDialog.cpp.
Referenced by IsAValidDMSValue().