Loading...
Searching...
No Matches
PolygonSymbolizerWidget.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/se/PolygonSymbolizerWidget.h
22
23 \brief A widget used to build a polygon symbolizer element.
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_SE_INTERNAL_POLYGONSYMBOLIZERWIDGET_H
27#define __TERRALIB_QT_WIDGETS_SE_INTERNAL_POLYGONSYMBOLIZERWIDGET_H
28
29// TerraLib
30#include "../Config.h"
31
32// Qt
33#include <QWidget>
34
35// STL
36#include <memory>
37
38// Forward declaraion
39class QStackedWidget;
40namespace Ui { class PolygonSymbolizerWidgetForm; }
41
42namespace te
43{
44// Forward declarations
45 namespace se
46 {
47 class PolygonSymbolizer;
48 class Symbolizer;
49 }
50
51 namespace qt
52 {
53 namespace widgets
54 {
55// Forward declarations
56 class BasicStrokeWidget;
57
58 /*!
59 \class PolygonSymbolizerWidget
60
61 \brief A widget used to build a polygon symbolizer element.
62 */
64 {
65 Q_OBJECT
66
67 public:
68
69 /** @name Initializer Methods
70 * Methods related to instantiation and destruction.
71 */
72 //@{
73
74 /*! \brief Constructs a polygon symbolizer widget which is a child of parent, with widget flags set to f. */
75 PolygonSymbolizerWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
76
77 /*! \brief Destructor. */
79
80 //@}
81
82 public:
83
84 /*!
85 \brief Sets a polygon symbolizer element to this widget.
86
87 \param symb A valid polygon symbolizer element.
88
89 \note The widget will NOT take the ownership of the given symbolizer.
90 \note The widget form will be update based on given symbolizer parameters.
91 */
93
94 /*!
95 \brief Gets the configured polygon symbolizer element.
96
97 \return The configured polygon symbolizer element.
98
99 \note The caller will take the ownership of the returned symbolizer.
100 */
102
103 protected:
104
105 /*! \brief Updates the widget form based on internal polygon symbolizer element. */
106 void updateUi();
107
108 protected slots:
109
111
113
115
117
119
120 signals:
121
122 /*! This signal is emitted when the internal polygon symbolizer element is changed. */
124
125 private:
126
127 std::unique_ptr<Ui::PolygonSymbolizerWidgetForm> m_ui; //!< Widget form.
128 QStackedWidget* m_fillWidgets; //!< Set of Fill Widgets that can be used to configure the polygon symbolizer element. TODO: need review!
129 te::qt::widgets::BasicStrokeWidget* m_strokeWidget; //!< Basic Stroke Widget used to configure the polygon symbolizer stroke element.
130 te::se::PolygonSymbolizer* m_symb; //!< Polygon symbolizer element that will be configured by this widget.
131 };
132
133 } // end namespace widgets
134 } // end namespace qt
135} // end namespace te
136
137#endif // __TERRALIB_QT_WIDGETS_SE_INTERNAL_POLYGONSYMBOLIZERWIDGET_H
A widget used to build a basic stroke element.
A widget used to build a polygon symbolizer element.
te::se::Symbolizer * getSymbolizer() const
Gets the configured polygon symbolizer element.
QStackedWidget * m_fillWidgets
Set of Fill Widgets that can be used to configure the polygon symbolizer element. TODO: need review!
std::unique_ptr< Ui::PolygonSymbolizerWidgetForm > m_ui
Widget form.
void setSymbolizer(const te::se::PolygonSymbolizer *symb)
Sets a polygon symbolizer element to this widget.
te::se::PolygonSymbolizer * m_symb
Polygon symbolizer element that will be configured by this widget.
PolygonSymbolizerWidget(QWidget *parent=0, Qt::WindowFlags f=0)
Constructs a polygon symbolizer widget which is a child of parent, with widget flags set to f.
te::qt::widgets::BasicStrokeWidget * m_strokeWidget
Basic Stroke Widget used to configure the polygon symbolizer stroke element.
void onPolygonSymbolizerTypeComboBoxCurrentIndexChanged(int index)
void updateUi()
Updates the widget form based on internal polygon symbolizer element.
A PolygonSymbolizer is used to draw a polygon (or other area-type geometries), including filling its ...
A Symbolizer describes how a feature is to appear on a map.
Definition Symbolizer.h:81
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