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