Loading...
Searching...
No Matches
GraphicFillWidget.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/GraphicFillWidget.h
22
23 \brief A widget used to build a fill element associated with a graphic.
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_SE_INTERNAL_GRAPHICFILLWIDGET_H
27#define __TERRALIB_QT_WIDGETS_SE_INTERNAL_GRAPHICFILLWIDGET_H
28
29// TerraLib
30#include "../Config.h"
31#include "AbstractFillWidget.h"
32
33// STL
34#include <memory>
35
36// Forward declaraion
37namespace Ui { class GraphicFillWidgetForm; }
38
39namespace te
40{
41// Forward declarations
42 namespace se
43 {
44 class Fill;
45 }
46
47 namespace qt
48 {
49 namespace widgets
50 {
51// Forward declarations
52 class GraphicDialog;
53
54 /*!
55 \class GraphicFillWidget
56
57 \brief A widget used to build a fill element associated with a graphic.
58
59 \sa AbstractFillWidget, BasicFillWidget
60 */
62 {
63 Q_OBJECT
64
65 public:
66
67 /** @name Initializer Methods
68 * Methods related to instantiation and destruction.
69 */
70 //@{
71
72 /*! \brief Constructs a graphic fill widget which is a child of parent, with widget flags set to f. */
73 GraphicFillWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
74
75 /*! \brief Destructor. */
77
78 //@}
79
80 public:
81
82 /** @name Re-implementation of Pure Virtual Method
83 * AbstractFillWidget methods.
84 */
85 //@{
86
87 bool setFill(const te::se::Fill* fill);
88
90
91 QString getFillType() const;
92
93 //@}
94
95 protected:
96
97 /*! \brief Updates the widget form based on internal fill element. */
98 void updateUi();
99
100 protected slots:
101
103
104 signals:
105
106 /*! This signal is emitted when the internal fill element is changed. */
108
109 private:
110
111 std::unique_ptr<Ui::GraphicFillWidgetForm> m_ui; //!< Widget form.
112 std::unique_ptr<GraphicDialog> m_graphicDialog; //!< Graphic dialog used to build the graphic element.
113 te::se::Fill* m_fill; //!< Fill element that will be configured by this widget.
114 };
115
116 } // end namespace widgets
117 } // end namespace qt
118} // end namespace te
119
120#endif // __TERRALIB_QT_WIDGETS_SE_INTERNAL_GRAPHICFILLWIDGET_H
Abstract class that represents a widget that can be used to build a fill element.
Abstract class that represents a widget that can be used to build a fill element.
A widget used to build a fill element associated with a graphic.
QString getFillType() const
Pure virtual method that should return a "user friendly" string that informs the fill type that can b...
void updateUi()
Updates the widget form based on internal fill element.
std::unique_ptr< GraphicDialog > m_graphicDialog
Graphic dialog used to build the graphic element.
GraphicFillWidget(QWidget *parent=0, Qt::WindowFlags f=0)
Constructs a graphic fill widget which is a child of parent, with widget flags set to f.
std::unique_ptr< Ui::GraphicFillWidgetForm > m_ui
Widget form.
te::se::Fill * getFill() const
Gets the configured fill element.
bool setFill(const te::se::Fill *fill)
Sets a fill element to this widget.
te::se::Fill * m_fill
Fill element that will be configured by this widget.
A Fill specifies the pattern for filling an area geometry.
Definition: Fill.h:60
TerraLib.
#define slots
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63