Loading...
Searching...
No Matches
SymbolEditorWidget.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/SymbolEditorWidget.h
22
23 \brief A widget used to edit symbols.
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_SE_INTERNAL_SYMBOLEDITORWIDGET_H
27#define __TERRALIB_QT_WIDGETS_SE_INTERNAL_SYMBOLEDITORWIDGET_H
28
29// TerraLib
30#include "../../../se/Enums.h"
31#include "../Config.h"
32#include "Symbol.h"
33
34// Qt
35#include <QWidget>
36
37// STL
38#include <memory>
39#include <vector>
40
41// Forward declarations
42class QStackedWidget;
43namespace Ui { class SymbolEditorWidgetForm; }
44
45namespace te
46{
47// Forward declarations
48 namespace se
49 {
50 class Symbolizer;
51 }
52
53 namespace qt
54 {
55 namespace widgets
56 {
57// Forward declarations
58 class SymbolPreviewWidget;
59 class SymbolTableWidget;
60
61 /*!
62 \class SymbolEditorWidget
63
64 \brief A widget used to edit symbols.
65 */
67 {
68 Q_OBJECT
69
70 public:
71
72 /** @name Initializer Methods
73 * Methods related to instantiation and destruction.
74 */
75 //@{
76
77 /*!
78 \brief Constructs a symbol editor, which is a child of parent, with widget flags set to f.
79
80 \type The Symbol type that will be handled by the widget.
81 \param parent The widget's parent.
82 */
83 SymbolEditorWidget(const SymbolType& type, QWidget* parent = 0);
84
85 /*! \brief Destructor. */
87
88 //@}
89
90 protected:
91
92 /*! \brief Internal method to initialize the widget. */
93 void initialize();
94
95 /*! \brief Updates the widget form based on internal symbolizers elements. */
96 void updateUi();
97
98 /*! \brief Creates a new symbolizer element. */
100
101 /*! \brief Swap two internal symbolizers. */
102 void swapSymbolizers(const int& indexFirst, const int& indexSecond);
103
104 protected slots:
105
107
109
111
113
115
116 private:
117
118 std::unique_ptr<Ui::SymbolEditorWidgetForm> m_ui; //!< Widget form.
119 SymbolPreviewWidget* m_preview; //!< Preview Widget used to visualize the symbol.
120 SymbolTableWidget* m_symbolTable; //!< Table Widget used to visualize the symbol as separated visual layers.
121 QStackedWidget* m_symbolizersStackedWidget; //!< Set of symbolizers widgets.
122 Symbol* m_symbol; //!< Symbol handled by this widget.
123 SymbolType m_type; //!< The Symbol type handled by this widget.
124 };
125
126 } // end namespace widgets
127 } // end namespace qt
128} // end namespace te
129
130#endif // __TERRALIB_QT_WIDGETS_SE_INTERNAL_SYMBOLEDITORWIDGET_H
This class represents a symbol.
A widget used to edit symbols.
void swapSymbolizers(const int &indexFirst, const int &indexSecond)
Swap two internal symbolizers.
void createNewSymbolizer()
Creates a new symbolizer element.
void updateUi()
Updates the widget form based on internal symbolizers elements.
SymbolTableWidget * m_symbolTable
Table Widget used to visualize the symbol as separated visual layers.
QStackedWidget * m_symbolizersStackedWidget
Set of symbolizers widgets.
Symbol * m_symbol
Symbol handled by this widget.
SymbolType m_type
The Symbol type handled by this widget.
SymbolPreviewWidget * m_preview
Preview Widget used to visualize the symbol.
std::unique_ptr< Ui::SymbolEditorWidgetForm > m_ui
Widget form.
SymbolEditorWidget(const SymbolType &type, QWidget *parent=0)
Constructs a symbol editor, which is a child of parent, with widget flags set to f.
void initialize()
Internal method to initialize the widget.
A widget used to preview symbol elements.
A widget used to preview a symbol as separated layers.
This class represents a symbol. TODO: More description!
Definition: Symbol.h:55
TerraLib.
#define slots
Enumeration that indicates the symbol type.
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63