TextSymbolizerProperty.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/TextSymbolizerProperty.h
22 
23  \brief A widget used to define the text symbolizer
24  properties, such as:
25  - basic fill
26  - font
27  - halo
28 */
29 
30 #ifndef __TERRALIB_QT_WIDGETS_SE_INTERNAL_TEXTSYMBOLIZERPROPERTY_H
31 #define __TERRALIB_QT_WIDGETS_SE_INTERNAL_TEXTSYMBOLIZERPROPERTY_H
32 
33 // TerraLib
36 #include "../Config.h"
37 
38 // Qt
39 class QWidget;
40 class QtProperty;
41 
42 namespace te
43 {
44 // Forward declarations
45  namespace se
46  {
47  class Symbolizer;
48  }
49 
50  namespace qt
51  {
52  namespace widgets
53  {
54  class GroupPropertyItemHandler;
55  class HaloPropertyItem;
56  class LinePlacementPropertyItem;
57  class PointPlacementPropertyItem;
58  class TextPropertyItem;
59 
60  /*!
61  \class TextSymbolizerProperty
62 
63  \brief A widget used to define the text symbolizer
64  properties, such as:
65  - basic fill
66  - font
67  - halo
68 
69  */
70 
72  {
73  Q_OBJECT
74 
75  public:
76  /** @name Initializer Methods
77  * Methods related to instantiation and destruction.
78  */
79  //@{
80 
81  /*! \brief Constructor */
82  TextSymbolizerProperty(QWidget* parent);
83 
84  /*! \brief Destructor. */
86 
87  //@}
88 
89  public:
90 
91  /*!
92  \brief Sets a text symbolizer element to this widget.
93 
94  \param symb A valid text symbolizer element.
95 
96  \note The widget will NOT take the ownership of the given symbolizer.
97  \note The widget form will be update based on given symbolizer parameters.
98  */
99  virtual void setSymbolizer(const te::se::Symbolizer* symb) override;
100 
101  /*!
102  \brief Gets the configured polygon symbolizer element.
103 
104  \return The configured polygon symbolizer element.
105 
106  \note The caller will take the ownership of the returned symbolizer.
107  */
108  virtual te::se::Symbolizer* getSymbolizer() const override;
109 
110  /*!
111  \brief Used to set all properties names to use as label
112  */
113  void setLabels(const std::vector<std::string>& names);
114 
115  virtual void handleValueChanged(QtProperty* qProperty, const QVariant& qVariant) override;
116 
117  protected:
123  };
124  }
125  }
126 }
127 
128 #endif //__TERRALIB_QT_WIDGETS_SE_INTERNAL_TEXTSYMBOLIZERPROPERTY_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 halo se object.
A widget used to define the LinePlacement se object.
A widget used to define the PointPlacement se object.
A widget used to define the main property items listener.
A widget used to define the text se object.
A widget used to define the text symbolizer properties, such as:
virtual void handleValueChanged(QtProperty *qProperty, const QVariant &qVariant) override
< This function will be called every time a value has changed
te::qt::widgets::PointPlacementPropertyItem * m_pp
te::qt::widgets::LinePlacementPropertyItem * m_lp
te::qt::widgets::TextPropertyItem * m_text
virtual void setSymbolizer(const te::se::Symbolizer *symb) override
Sets a text symbolizer element to this widget.
TextSymbolizerProperty(QWidget *parent)
Constructor.
void setLabels(const std::vector< std::string > &names)
Used to set all properties names to use as label.
virtual te::se::Symbolizer * getSymbolizer() const override
Gets the configured polygon symbolizer element.
te::qt::widgets::HaloPropertyItem * m_halo
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