Loading...
Searching...
No Matches
InputCoordinateDialog.h
Go to the documentation of this file.
1/* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2
3This file is part of the TerraLib - a Framework for building GIS enabled applications.
4
5TerraLib is free software: you can redistribute it and/or modify
6it under the terms of the GNU Lesser General Public License as published by
7the Free Software Foundation, either version 3 of the License,
8or (at your option) any later version.
9
10TerraLib is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU Lesser General Public License for more details.
14
15You should have received a copy of the GNU Lesser General Public License
16along with TerraLib. See COPYING. If not, write to
17TerraLib 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
34namespace Ui
35{
36 // Forward declaration
37 class InputCoordinateForm;
38}
39
40// Forward declarations
41class QValidator;
42
43namespace 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 */
64 {
65 Q_OBJECT
66
67 public:
68
69 /*!
70 * \brief Constructor.
71 *
72 * \param display The display to be used.
73 */
75
76 /*!
77 * \brief Destructor.
78 */
80
81 protected slots:
82
83 /*!
84 * \brief Called when the degree-minute-second button was selected.
85 */
87
88 /*!
89 * \brief Called when the decimal-degree button was selected.
90 */
92
93 /*!
94 * \brief Called when the \a Ok button was pressed.
95 */
97
98 /*!
99 * \brief Called when the \a Cancel button was pressed.
100 */
102
103 /*!
104 * \brief Called when the line-edits changed its valid state.
105 */
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 */
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
A dialog that gets a coordinate ad centralize the area of visualization at it.
void ok_triggered()
Called when the Ok button was pressed.
MapDisplay * m_display
Map display to show the result.
InputCoordinateDialog(MapDisplay *display)
Constructor.
void updateValidator(const bool &isDMS)
Updates the validator and the mask being used on coordinate line edit.
void cancel_triggered()
Called when the Cancel button was pressed.
te::gm::Coord2D * getCoordinate()
Returns the coordinate of the input.
void validatorStateChanged()
Called when the line-edits changed its valid state.
void DD_triggered()
Called when the decimal-degree button was selected.
void DMS_triggered()
Called when the degree-minute-second button was selected.
QValidator * m_validator
Validator being used.
Ui::InputCoordinateForm * m_ui
Pointer for Qt structure.
A widget to control the display of a set of layers.
Definition: MapDisplay.h:72
TerraLib.
#define slots
An utility struct for representing 2D coordinates.
Definition: Coord2D.h:41
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63