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
34 #include "../Config.h"
35 
36 // Qt
37 #include <QWidget>
38 
39 
40 namespace te
41 {
42 // Forward declarations
43  namespace se
44  {
45  class TextSymbolizer;
46  class Symbolizer;
47  }
48 
49  namespace qt
50  {
51  namespace widgets
52  {
53  class HaloPropertyItem;
54  class LinePlacementPropertyItem;
55  class PointPlacementPropertyItem;
56  class TextPropertyItem;
57 
58  /*!
59  \class TextSymbolizerProperty
60 
61  \brief A widget used to define the text symbolizer
62  properties, such as:
63  - basic fill
64  - font
65  - halo
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  TextSymbolizerProperty(QWidget* parent);
81 
82  /*! \brief Destructor. */
84 
85  //@}
86 
87  public:
88 
89  /*!
90  \brief Sets a text symbolizer element to this widget.
91 
92  \param symb A valid text 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  void setSymbolizer(te::se::TextSymbolizer* symb);
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  te::se::Symbolizer* getSymbolizer() const;
107 
108 
109  /*!
110  \brief Used to set all properties names to use as label
111  */
112  void setLabels(std::vector<std::string> names);
113 
114  protected slots:
115 
116  void onTextChanged();
117 
118  void onLinePlacementChanged();
119 
120  void onPointPlacementChanged();
121 
122  void onHaloChanged();
123 
124  signals:
125 
126  /*! This signal is emitted when the internal polygon symbolizer element is changed. */
127  void symbolizerChanged();
128 
129  protected:
134 
136 
137  te::se::TextSymbolizer* m_symb; //!< Text symbolizer element that will be configured by this widget.
138  };
139  }
140  }
141 }
142 
143 #endif //__TERRALIB_QT_WIDGETS_SE_INTERNAL_TEXTSYMBOLIZERPROPERTY_H
A TextSymbolizer is used to render text labels according to various graphical parameters.
A widget used to define the text symbolizer properties, such as:
A Symbolizer describes how a feature is to appear on a map.
Definition: Symbolizer.h:80
A widget used to define the PointPlacement se object.
te::qt::widgets::HaloPropertyItem * m_halo
A widget used to define the halo se object.
te::qt::widgets::TextPropertyItem * m_text
URI C++ Library.
A widget used to define the LinePlacement se object.
te::qt::widgets::PointPlacementPropertyItem * m_pp
te::qt::widgets::LinePlacementPropertyItem * m_lp
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
te::se::TextSymbolizer * m_symb
Text symbolizer element that will be configured by this widget.
A widget used to define the text se object.