Loading...
Searching...
No Matches
AbstractFillWidget.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/AbstractFillWidget.h
22
23 \brief Abstract class that represents a widget that can be used to build a fill element.
24*/
25
26#ifndef __TERRALIB_QT_SE_INTERNAL_ABSTRACTFILLWIDGET_H
27#define __TERRALIB_QT_SE_INTERNAL_ABSTRACTFILLWIDGET_H
28
29// Qt
30#include <QWidget>
31
32namespace te
33{
34// Forward declarations
35 namespace se
36 {
37 class Fill;
38 }
39
40 namespace qt
41 {
42 namespace widgets
43 {
44 /*!
45 \class AbstractFillWidget
46
47 \brief Abstract class that represents a widget that can be used to build a fill element.
48
49 \sa BasicFillWidget, GraphicFillWidget
50 */
51 class AbstractFillWidget : public QWidget
52 {
53 public:
54
55 /** @name Initializer Methods
56 * Methods related to instantiation and destruction.
57 */
58 //@{
59
60 /*! \brief Constructs a widget which is a child of parent, with widget flags set to f. */
61 AbstractFillWidget(QWidget* parent = 0, Qt::WindowFlags f = 0) : QWidget(parent, f) { }
62
63 /*! \brief Virtual destructor. */
64 virtual ~AbstractFillWidget() { }
65
66 //@}
67
68 /*!
69 \brief Sets a fill element to this widget.
70
71 \param fill A valid fill element.
72
73 \return It return true if the widget can deal with the given fill. Otherwise, it returns false.
74
75 \note The widget will NOT take the ownership of the given fill.
76 \note The widget form will be update based on given fill parameters.
77 */
78 virtual bool setFill(const te::se::Fill* fill) = 0;
79
80 /*!
81 \brief Gets the configured fill element.
82
83 \return The configured fill element.
84
85 \note The caller will take the ownership of the returned fill.
86 */
87 virtual te::se::Fill* getFill() const = 0;
88
89 /*! \brief Pure virtual method that should return a "user friendly" string that informs the fill type that can be built by the widget. */
90 virtual QString getFillType() const = 0;
91 };
92
93 } // end namespace widgets
94 } // end namespace qt
95} // end namespace te
96
97#endif // __TERRALIB_QT_SE_INTERNAL_ABSTRACTFILLWIDGET_H
Abstract class that represents a widget that can be used to build a fill element.
AbstractFillWidget(QWidget *parent=0, Qt::WindowFlags f=0)
Constructs a widget which is a child of parent, with widget flags set to f.
virtual bool setFill(const te::se::Fill *fill)=0
Sets a fill element to this widget.
virtual QString getFillType() const =0
Pure virtual method that should return a "user friendly" string that informs the fill type that can b...
virtual ~AbstractFillWidget()
Virtual destructor.
virtual te::se::Fill * getFill() const =0
Gets the configured fill element.
A Fill specifies the pattern for filling an area geometry.
Definition: Fill.h:60
TerraLib.