StyleControllerWidget.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/StyleControllerWidget.h
22 
23  \brief A widget used to controll the style se element.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_SE_INTERNAL_STYLECONTROLLERWIDGET_H
27 #define __TERRALIB_QT_WIDGETS_SE_INTERNAL_STYLECONTROLLERWIDGET_H
28 
29 // TerraLib
30 #include "../Config.h"
31 
32 // Qt
33 #include <QWidget>
34 
35 // STL
36 #include <memory>
37 #include <string>
38 #include <vector>
39 
40 // Forward declaraion
41 namespace Ui { class StyleControllerWidgetForm; }
42 
43 namespace te
44 {
45 // Forward declarations
46  namespace se
47  {
48  class Style;
49  class Symbolizer;
50  class Rule;
51  }
52 
53  namespace qt
54  {
55  namespace widgets
56  {
57 // Forward declarations
58  class StyleExplorer;
59 
60  /*!
61  \class StyleControllerWidget
62 
63  \brief A widget used to controll the style se element.
64  */
66  {
67  Q_OBJECT
68 
69  public:
70 
71  /** @name Initializer Methods
72  * Methods related to instantiation and destruction.
73  */
74  //@{
75 
76  /*! \brief Constructs a StyleControllerWidget which is a child of parent, with widget flags set to f. */
77  StyleControllerWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
78 
79  /*! \brief Destructor. */
81 
82  //@}
83 
84  public:
85 
86  /*!
87  \brief Sets a style element to this widget.
88 
89  \param style A valid style element.
90 
91  \note The widget will NOT take the ownership of the given style.
92  \note The widget will be update based on given style parameters.
93  */
94  void setStyle(te::se::Style* style);
95 
96  StyleExplorer* getStyleExplorer() const;
97 
98  protected:
99 
100  /*! \brief Updates the widget form based on internal mark element. */
101  void updateUi();
102 
103  protected slots:
104 
105  void onAddSymbolizerClicked();
106 
107  void onRemoveSymbolizerClicked();
108 
109  void onUpSymbolizerClicked();
110 
111  void onDownSymbolizerClicked();
112 
113  void onLibraryManagerClicked();
114 
115  void onMapRefreshClicked();
116 
117  void changeLegendIconSize(int size);
118 
119  signals:
120 
121  void mapRefresh();
122 
123  private:
124 
125  std::auto_ptr<Ui::StyleControllerWidgetForm> m_ui; //!< Widget form.
126  te::qt::widgets::StyleExplorer* m_explorer; //!< A style explorer used to explore the style.
127  };
128 
129  } // end namespace widgets
130  } // end namespace qt
131 } // end namespace te
132 
133 #endif // __TERRALIB_QT_WIDGETS_SE_INTERNAL_STYLECONTROLLERWIDGET_H
The Style defines the styling that is to be applied to a geographic dataset (vector geometries or cov...
Definition: Style.h:65
std::auto_ptr< Ui::StyleControllerWidgetForm > m_ui
Widget form.
A widget used to explore a style.
Definition: StyleExplorer.h:60
A widget used to controll the style se element.
URI C++ Library.
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
te::qt::widgets::StyleExplorer * m_explorer
A style explorer used to explore the style.