All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
StyleDockWidget.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/StyleDockWidget.h
22 
23  \brief A dock widget used control the geographic data style using SE elements and a property browser to show its properties.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_SE_INTERNAL_STYLEDOCKWIDGET_H
27 #define __TERRALIB_QT_WIDGETS_SE_INTERNAL_STYLEDOCKWIDGET_H
28 
29 // TerraLib
30 #include "../../../se.h"
31 #include "../Config.h"
32 
33 // Qt
34 #include <QDockWidget>
35 #include <QTabWidget>
36 
37 namespace te
38 {
39  namespace map {class AbstractLayer; }
40 
41  namespace se { class Symbolizer; }
42 
43  namespace qt
44  {
45  namespace widgets
46  {
47  // Forward declarations
48  class PolygonSymbolizerProperty;
49  class LineSymbolizerProperty;
50  class PointSymbolizerProperty;
51  class RasterSymbolizerWidget;
52  class StyleControllerWidget;
53 
54  /*!
55  \class StyleDockWidget
56 
57  \brief A dock widget used control the geographic data style using SE elements and a property browser to show its properties.
58  */
59  class TEQTWIDGETSEXPORT StyleDockWidget : public QDockWidget
60  {
61  Q_OBJECT
62 
63  public:
64 
65  /** @name Initializer Methods
66  * Methods related to instantiation and destruction.
67  */
68  //@{
69 
70  /*! \brief Constructs a StyleDockWidget. */
71  StyleDockWidget(const QString& title, QWidget* parent = 0, Qt::WindowFlags flags = 0);
72 
73  /*! \brief Destructor. */
74  ~StyleDockWidget();
75 
76  //@}
77 
78  public:
79 
80  /*!
81  \brief Sets a style element to this widget.
82 
83  \param style A valid style element.
84  \param layer A valid layer element.
85 
86  \note The widget will NOT take the ownership of the given pointers.
87  */
88  void setStyle(te::se::Style* style, te::map::AbstractLayer* layer);
89 
90  void setTabStatus(bool status);
91 
92  protected:
93 
94  void updateUi();
95 
96  QWidget* buildUi();
97 
98  protected slots:
99 
100  void onSymbolizerSelected(te::se::Symbolizer* s);
101 
102  void onPolygonSymbolizerChanged();
103  void onLineSymbolizerChanged();
104  void onPointSymbolizerChanged();
105  void onRasterSymbolizerChanged();
106  void onMapRefresh();
107 
108  signals:
109 
110  void symbolizerChanged(te::se::Symbolizer* s);
111 
112  void repaintMapDisplay();
113 
114  private:
115 
116  QTabWidget* m_tabWidget;
117 
123 
124  te::map::AbstractLayer* m_currentLayer; //!< Current Layer pointer (used for raster symbolizer information)
125  };
126 
127  } // end namespace widgets
128  } // end namespace qt
129 } // end namespace te
130 
131 #endif // __TERRALIB_QT_WIDGETS_SE_INTERNAL_STYLEDOCKWIDGET_H
te::map::AbstractLayer * m_currentLayer
Current Layer pointer (used for raster symbolizer information)
The Style defines the styling that is to be applied to a geographic dataset (vector geometries or cov...
Definition: Style.h:65
This is the base class for layers.
Definition: AbstractLayer.h:76
A Symbolizer describes how a feature is to appear on a map.
Definition: Symbolizer.h:80
A widget used to configure a Raster Symbolizer SE element.
A widget used to define the point symbolizer properties, such as:
te::qt::widgets::PointSymbolizerProperty * m_pointWidget
A widget used to controll the style se element.
te::qt::widgets::RasterSymbolizerWidget * m_rasterWidget
A widget used to define the polygon symbolizer properties, such as:
A widget used to define the polygon symbolizer properties, such as:
te::qt::widgets::StyleControllerWidget * m_styleController
te::qt::widgets::PolygonSymbolizerProperty * m_polyWidget
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:66
A dock widget used control the geographic data style using SE elements and a property browser to show...
te::qt::widgets::LineSymbolizerProperty * m_lineWidget