PolygonSymbolizerProperty.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/PolygonSymbolizerProperty.h
22 
23  \brief A widget used to define the polygon symbolizer
24  properties, such as:
25  - basic fill
26  - basic stroke
27 */
28 
29 #ifndef __TERRALIB_QT_WIDGETS_SE_INTERNAL_POLYGONSYMBOLIZERPROPERTY_H
30 #define __TERRALIB_QT_WIDGETS_SE_INTERNAL_POLYGONSYMBOLIZERPROPERTY_H
31 
32 // TerraLib
33 #include "../Config.h"
34 
35 // Qt
36 #include <QWidget>
37 
38 
39 namespace te
40 {
41 // Forward declarations
42  namespace se
43  {
44  class PolygonSymbolizer;
45  class Symbolizer;
46  }
47 
48  namespace qt
49  {
50  namespace widgets
51  {
52  class BasicFillPropertyItem;
53  class BasicStrokePropertyItem;
54  class GraphicProperty;
55  /*!
56  \class PolygonSymbolizerProperty
57 
58  \brief A widget used to define the polygon symbolizer
59  properties, such as:
60  - basic fill
61  - basic stroke
62 
63  */
64 
66  {
67  Q_OBJECT
68 
69  public:
70  /** @name Initializer Methods
71  * Methods related to instantiation and destruction.
72  */
73  //@{
74 
75  /*! \brief Constructor */
76  PolygonSymbolizerProperty(QWidget* parent);
77 
78  /*! \brief Destructor. */
80 
81  //@}
82 
83  public:
84 
85  /*!
86  \brief Sets a polygon symbolizer element to this widget.
87 
88  \param symb A valid polygon symbolizer element.
89 
90  \note The widget will NOT take the ownership of the given symbolizer.
91  \note The widget form will be update based on given symbolizer parameters.
92  */
93  void setSymbolizer(te::se::PolygonSymbolizer* symb);
94 
95  /*!
96  \brief Gets the configured polygon symbolizer element.
97 
98  \return The configured polygon symbolizer element.
99 
100  \note The caller will take the ownership of the returned symbolizer.
101  */
102  te::se::Symbolizer* getSymbolizer() const;
103 
104  protected slots:
105 
106  void onStrokeChanged();
107 
108  void onFillChanged();
109 
110  void onPolyGraphicChanged();
111 
112  signals:
113 
114  /*! This signal is emitted when the internal polygon symbolizer element is changed. */
115  void symbolizerChanged();
116 
117 
118  protected:
122 
124 
125  te::se::PolygonSymbolizer* m_symb; //!< Polygon symbolizer element that will be configured by this widget.
126  };
127  }
128  }
129 }
130 
131 #endif //__TERRALIB_QT_WIDGETS_SE_INTERNAL_POLYGONSYMBOLIZERPROPERTY_H
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:80
te::se::PolygonSymbolizer * m_symb
Polygon symbolizer element that will be configured by this widget.
A widget used to define the general properties of a se object.
URI C++ Library.
A widget used to define the polygon symbolizer properties, such as:
te::qt::widgets::BasicFillPropertyItem * m_bf
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
A widget used to define the basic fill se object.
te::qt::widgets::BasicStrokePropertyItem * m_bs