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"
36 
37 // Qt
38 class QWidget;
39 
40 class QtProperty;
41 
42 
43 namespace te
44 {
45 // Forward declarations
46  namespace se
47  {
48  class GraphicStroke;
49  class PolygonSymbolizer;
50  }
51 
52  namespace qt
53  {
54  namespace widgets
55  {
56  class FillPropertyItem;
57  class StrokePropertyItem;
58  class LinePerpendicularOffsetPropertyItem;
59  /*!
60  \class PolygonSymbolizerProperty
61 
62  \brief A widget used to define the polygon symbolizer
63  properties, such as:
64  - basic fill
65  - basic stroke
66 
67  */
68 
70  {
71  Q_OBJECT
72 
73  public:
74  /** @name Initializer Methods
75  * Methods related to instantiation and destruction.
76  */
77  //@{
78 
79  /*! \brief Constructor */
80  PolygonSymbolizerProperty(QWidget* parent);
81 
82  /*! \brief Destructor. */
84 
85  //@}
86 
87  public:
88 
89  /*!
90  \brief Sets a polygon symbolizer element to this widget.
91 
92  \param symb A valid polygon symbolizer element.
93 
94  \note The widget will NOT take the ownership of the given symbolizer.
95  \note The widget form will be update based on given symbolizer parameters.
96  */
97  virtual void setSymbolizer(const te::se::Symbolizer* symb) override;
98 
99  /*!
100  \brief Gets the configured polygon symbolizer element.
101 
102  \return The configured polygon symbolizer element.
103 
104  \note The caller will take the ownership of the returned symbolizer.
105  */
106  virtual te::se::Symbolizer* getSymbolizer() const override;
107 
108  virtual void handleValueChanged(QtProperty* qProperty, const QVariant& qVariant) override;
109 
110  protected:
111 
112  FillPropertyItem* m_fillPropItem; //!< A widget used to define the Fill Property.
113  StrokePropertyItem* m_strokePropItem; //!< A widget used to define the Stroke Property.
114  LinePerpendicularOffsetPropertyItem* m_perpendicularOffset; //!< A widget used to define the Perpendicular Offset between a line and marks.
115  };
116  }
117  }
118 }
119 
120 #endif //__TERRALIB_QT_WIDGETS_SE_INTERNAL_POLYGONSYMBOLIZERPROPERTY_H
A parent widget used to define the symbolizer properties.
A bse item to represent the style items in property listener.
A parent widget used to define the symbolizer properties.
A widget used to define the fill se object.
A widget used to define the Perpendicular Offset between a line and marks.
A widget used to define the polygon symbolizer properties, such as:
FillPropertyItem * m_fillPropItem
A widget used to define the Fill Property.
PolygonSymbolizerProperty(QWidget *parent)
Constructor.
virtual void handleValueChanged(QtProperty *qProperty, const QVariant &qVariant) override
< This function will be called every time a value has changed
StrokePropertyItem * m_strokePropItem
A widget used to define the Stroke Property.
LinePerpendicularOffsetPropertyItem * m_perpendicularOffset
A widget used to define the Perpendicular Offset between a line and marks.
virtual te::se::Symbolizer * getSymbolizer() const override
Gets the configured polygon symbolizer element.
virtual void setSymbolizer(const te::se::Symbolizer *symb) override
Sets a polygon symbolizer element to this widget.
A widget used to define the stroke se object.
A widget used to define the main property items listener.
A Symbolizer describes how a feature is to appear on a map.
Definition: Symbolizer.h:81
TerraLib.
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63