InputCoordinateDialog.h
Go to the documentation of this file.
1
/* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2
3
This file is part of the TerraLib - a Framework for building GIS enabled applications.
4
5
TerraLib is free software: you can redistribute it and/or modify
6
it under the terms of the GNU Lesser General Public License as published by
7
the Free Software Foundation, either version 3 of the License,
8
or (at your option) any later version.
9
10
TerraLib is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU Lesser General Public License for more details.
14
15
You should have received a copy of the GNU Lesser General Public License
16
along with TerraLib. See COPYING. If not, write to
17
TerraLib Team at <terralib-team@terralib.org>.
18
*/
19
20
/*!
21
* \file InputCoordinateDialog.h
22
*
23
* \brief Implements a dialog used to centralize the area of visualization in some coordinate.
24
*/
25
26
#ifndef __TERRALIB_QT_WIDGETS_INTERNAL_INPUTCOORDINATEDIALOG_H
27
#define __TERRALIB_QT_WIDGETS_INTERNAL_INPUTCOORDINATEDIALOG_H
28
29
#include "../Config.h"
30
31
// Qt
32
#include <QDialog>
33
34
namespace
Ui
35
{
36
// Forward declaration
37
class
InputCoordinateForm;
38
}
39
40
// Forward declarations
41
class
QValidator;
42
43
namespace
te
44
{
45
namespace
gm
46
{
47
// Forward declaration.
48
struct
Coord2D;
49
}
50
51
namespace
qt
52
{
53
namespace
widgets
54
{
55
// Forward declaration
56
class
MapDisplay;
57
58
/*!
59
* \class InputCoordinateDialog
60
*
61
* \brief A dialog that gets a coordinate ad centralize the area of visualization at it.
62
*/
63
class
TEQTWIDGETSEXPORT
InputCoordinateDialog
:
public
QDialog
64
{
65
Q_OBJECT
66
67
public
:
68
69
/*!
70
* \brief Constructor.
71
*
72
* \param display The display to be used.
73
*/
74
InputCoordinateDialog
(
MapDisplay
* display);
75
76
/*!
77
* \brief Destructor.
78
*/
79
~InputCoordinateDialog
();
80
81
protected
slots
:
82
83
/*!
84
* \brief Called when the degree-minute-second button was selected.
85
*/
86
void
DMS_triggered
();
87
88
/*!
89
* \brief Called when the decimal-degree button was selected.
90
*/
91
void
DD_triggered
();
92
93
/*!
94
* \brief Called when the \a Ok button was pressed.
95
*/
96
void
ok_triggered
();
97
98
/*!
99
* \brief Called when the \a Cancel button was pressed.
100
*/
101
void
cancel_triggered
();
102
103
/*!
104
* \brief Called when the line-edits changed its valid state.
105
*/
106
void
validatorStateChanged
();
107
108
protected
:
109
110
/*!
111
* \brief Updates the validator and the mask being used on coordinate line edit.
112
*
113
* \param isDMS If \a true mask and validator for the degree-minute-second input type, and false for decimal-degree validators.
114
*/
115
void
updateValidator
(
const
bool
& isDMS);
116
117
/*!
118
* \brief Returns the coordinate of the input.
119
*
120
* \return Coordinate captured by the dialog.
121
*/
122
te::gm::Coord2D
*
getCoordinate
();
123
124
Ui::InputCoordinateForm*
m_ui
;
//!< Pointer for Qt structure
125
126
QValidator*
m_validator
;
//!< Validator being used.
127
128
MapDisplay
*
m_display
;
//!< Map display to show the result.
129
};
130
}
131
}
132
}
133
134
#endif
// __TERRALIB_QT_WIDGETS_INTERNAL_INPUTCOORDINATEDIALOG_H
te::qt::widgets::InputCoordinateDialog
A dialog that gets a coordinate ad centralize the area of visualization at it.
Definition:
InputCoordinateDialog.h:64
te::qt::widgets::InputCoordinateDialog::ok_triggered
void ok_triggered()
Called when the Ok button was pressed.
te::qt::widgets::InputCoordinateDialog::m_display
MapDisplay * m_display
Map display to show the result.
Definition:
InputCoordinateDialog.h:128
te::qt::widgets::InputCoordinateDialog::InputCoordinateDialog
InputCoordinateDialog(MapDisplay *display)
Constructor.
te::qt::widgets::InputCoordinateDialog::updateValidator
void updateValidator(const bool &isDMS)
Updates the validator and the mask being used on coordinate line edit.
te::qt::widgets::InputCoordinateDialog::cancel_triggered
void cancel_triggered()
Called when the Cancel button was pressed.
te::qt::widgets::InputCoordinateDialog::getCoordinate
te::gm::Coord2D * getCoordinate()
Returns the coordinate of the input.
te::qt::widgets::InputCoordinateDialog::~InputCoordinateDialog
~InputCoordinateDialog()
Destructor.
te::qt::widgets::InputCoordinateDialog::validatorStateChanged
void validatorStateChanged()
Called when the line-edits changed its valid state.
te::qt::widgets::InputCoordinateDialog::DD_triggered
void DD_triggered()
Called when the decimal-degree button was selected.
te::qt::widgets::InputCoordinateDialog::DMS_triggered
void DMS_triggered()
Called when the degree-minute-second button was selected.
te::qt::widgets::InputCoordinateDialog::m_validator
QValidator * m_validator
Validator being used.
Definition:
InputCoordinateDialog.h:126
te::qt::widgets::InputCoordinateDialog::m_ui
Ui::InputCoordinateForm * m_ui
Pointer for Qt structure.
Definition:
InputCoordinateDialog.h:124
te::qt::widgets::MapDisplay
A widget to control the display of a set of layers.
Definition:
MapDisplay.h:72
Ui
Definition:
ConfigInputAddressDialog.h:44
te
TerraLib.
Definition:
AddressGeocodingOp.h:52
slots
#define slots
Definition:
VirtualMachine.h:48
te::gm::Coord2D
An utility struct for representing 2D coordinates.
Definition:
Coord2D.h:41
TEQTWIDGETSEXPORT
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition:
Config.h:63
git_release
src
terralib
qt
widgets
utils
InputCoordinateDialog.h
Generated on Mon Jun 5 2023 10:44:31 for TerraLib by
1.9.1