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