Loading...
Searching...
No Matches
ScalePropertyWidget.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 terralib/qt/widgets/canvas/ScalePropertyWidget.h
22
23\brief Defines a class that presents a widget with the graphic scale properties to be edited.
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_INTERNAL_SCALEPROPERTYWIDGET_H
27#define __TERRALIB_QT_WIDGETS_INTERNAL_SCALEPROPERTYWIDGET_H
28
29//TerraLib
30#include "../Config.h"
31#include "../propertybrowser/AbstractPropertyItem.h"
32
33// Qt
34#include <QAction>
35#include <QDockWidget>
36
37namespace te
38{
39 namespace qt
40 {
41 namespace widgets
42 {
43 // Forward declaration
44 class ScaleWidget;
45
46 /*!
47 \class ScalePropertyWidget
48
49 \brief a QDockWidget that contains a property browser object with graphic scale properties.
50
51 \ingroup widgets
52 */
53 class TEQTWIDGETSEXPORT ScalePropertyWidget : public QDockWidget
54 {
55 Q_OBJECT
56
57 public:
58 /** @name Constructor and destructor methods.
59 * Methods related to instantiation and destruction.
60 */
61 //@{
62
63 /*!
64 \brief Constructor.
65 \param wid A pointer to a graphic scale object.
66 \param parent The parent widget (Used by Qt to control the life cicle of the object).
67 */
68 ScalePropertyWidget(ScaleWidget* wid, QAction* editScale);
69
70 /*!
71 \brief Destructor.
72 */
74
75 protected slots:
76
77 /*!
78 * \brief This function must be called when the Grid related to it was closed.
79 */
81 //@}
82
83 protected:
84
85 QAction* m_editAction; //!< Action used to show the widget.
86 bool m_scaleStatus; //!< Scale widget enabling status.
87 };
88
89
90 /*!
91 \class ScalePropertyBrowser
92
93 \brief Widget with propeties of a ScaleWidget for the users to change the presentation of the graphic scale.
94
95 \ingroup widgets
96 */
98 {
99 Q_OBJECT
100
101 public:
102
103 /** @name Constructor and destructor methods.
104 * Methods related to instantiation and destruction.
105 */
106 //@{
107
108 /*!
109 \brief Constructor.
110 \param pb Property browser.
111 \param wid ScaleWidget object to be used.
112 */
113 ScalePropertyBrowser(QtTreePropertyBrowser* pb, ScaleWidget* wid);
114
115 /*!
116 \brief Destructor.
117 */
119 //@}
120
121 protected slots:
122
123 /** @name Protected slots.
124 * Methods to update the internal attributes of the class, using the signal-slot mechanism of QT.
125 */
126 //@{
127
128 /*!
129 \brief Called when a property of boolean type changed.
130 \param p The property that was changed.
131 \param value The new value.
132 */
133 void valueChanged(QtProperty* p, bool value);
134
135 /*!
136 \brief Called when a property of color type changed.
137 \param p The property that was changed.
138 \param value The new value.
139 */
140 void valueChanged(QtProperty* p, const QColor& value);
141
142 /*!
143 \brief Called when a property of font type changed.
144 \param p The property that was changed.
145 \param value The new value.
146 */
147 void valueChanged(QtProperty* p, const QFont& value);
148
149 /*!
150 \brief Called when a property of int type changed.
151 \param p The property that was changed.
152 \param value The new value.
153 */
154 void valueChanged(QtProperty* p, int value);
155 //@}
156
157 Q_SIGNALS :
158
159 /** @name Signals.
160 * Emmited to the graphic scale to sinalizes the attributes that was changed.
161 */
162 //@{
163
164 /*!
165 \brief Emmited when the interaction mode was changed.
166 */
167 void interactHandleChanged(const bool&);
168
169 /*!
170 \brief Emmited when the header color was changed.
171 */
172 void headerColorChanged(const QColor&);
173
174 /*!
175 \brief Emmited when the ruler color was changed.
176 */
177 void rulerColorChanged(const QColor&);
178
179 /*!
180 \brief Emmited when the footer color was changed.
181 */
182 void footerColorChanged(const QColor&);
183
184 /*!
185 \brief Emmited when the header font was changed.
186 */
187 void headerFontChanged(const QFont&);
188
189 /*!
190 \brief Emmited when the footer font was changed.
191 */
192 void footerFontChanged(const QFont&);
193
194 /*!
195 \brief Emmited when the ruler type was changed.
196 */
197 void scaleTypeChanged(const int&);
198
199 /*!
200 \brief Emmited when the footer visibility was changed.
201 */
203
204 /*!
205 \brief Emmited when the unit of measure of the graphic scale was changed.
206 */
207 void unitChanged(const QString&);
208
209 /*!
210 \brief Emmited when the visibility of the intermediary values of the header was changed.
211 */
213
214 /*!
215 \brief Emmited when the height of the ruler was changed.
216 */
217 void rulerHeightChanged(const int&);
218
219 /*!
220 \brief Emmited when the number of intervals in the ruler was changed.
221 */
222 void numberOfIntervalsChanged(const int&);
223
224 /*!
225 \brief Emmited when the units per interval was changed.
226 */
227 void unitsPerGapChanged(const int&);
228 //@}
229 };
230 }
231 }
232}
233
234#endif //__TERRALIB_QT_WIDGETS_INTERNAL_SCALEPROPERTYWIDGET_H
A widget used to define the main property items that can be used to describe a se object.
Widget with propeties of a ScaleWidget for the users to change the presentation of the graphic scale.
void rulerHeightChanged(const int &)
Emmited when the height of the ruler was changed.
void numberOfIntervalsChanged(const int &)
Emmited when the number of intervals in the ruler was changed.
void rulerColorChanged(const QColor &)
Emmited when the ruler color was changed.
void footerFontChanged(const QFont &)
Emmited when the footer font was changed.
void headerColorChanged(const QColor &)
Emmited when the header color was changed.
void valueChanged(QtProperty *p, bool value)
Called when a property of boolean type changed.
void allIntermediaryValuesChanged(const bool &)
Emmited when the visibility of the intermediary values of the header was changed.
void headerFontChanged(const QFont &)
Emmited when the header font was changed.
void scaleTypeChanged(const int &)
Emmited when the ruler type was changed.
void valueChanged(QtProperty *p, int value)
Called when a property of int type changed.
void valueChanged(QtProperty *p, const QColor &value)
Called when a property of color type changed.
void unitChanged(const QString &)
Emmited when the unit of measure of the graphic scale was changed.
void unitsPerGapChanged(const int &)
Emmited when the units per interval was changed.
void footerColorChanged(const QColor &)
Emmited when the footer color was changed.
void valueChanged(QtProperty *p, const QFont &value)
Called when a property of font type changed.
ScalePropertyBrowser(QtTreePropertyBrowser *pb, ScaleWidget *wid)
Constructor.
void numericScaleVisibilityChanged(const bool &)
Emmited when the footer visibility was changed.
void interactHandleChanged(const bool &)
Emmited when the interaction mode was changed.
a QDockWidget that contains a property browser object with graphic scale properties.
QAction * m_editAction
Action used to show the widget.
ScalePropertyWidget(ScaleWidget *wid, QAction *editScale)
Constructor.
void scaleWidgetClosed()
This function must be called when the Grid related to it was closed.
bool m_scaleStatus
Scale widget enabling status.
A widget that shows the graphic scale associated with a display.
Definition: ScaleWidget.h:100
TerraLib.
#define slots
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63