Loading...
Searching...
No Matches
BasicFillDialog.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/BasicFillDialog.h
22
23 \brief A dialog used to build a basic fill element.
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_SE_INTERNAL_BASICFILLDIALOG_H
27#define __TERRALIB_QT_WIDGETS_SE_INTERNAL_BASICFILLDIALOG_H
28
29// TerraLib
30#include "../Config.h"
31
32// Qt
33#include <QDialog>
34
35// STL
36#include <memory>
37
38// Forward declaraion
39namespace Ui { class BasicFillDialogForm; }
40
41namespace te
42{
43// Forward declarations
44 namespace se
45 {
46 class Fill;
47 }
48
49 namespace qt
50 {
51 namespace widgets
52 {
53// Forward declarations
54 class BasicFillWidget;
55
56 /*!
57 \class BasicFillDialog
58
59 \brief A dialog used to build a basic fill element.
60 If you want to use this dialog, you can use commands like:
61 <code>
62 te::se::Fill* f = te::qt::widgets::BasicFillDialog::getFill(0, parent, "Title");
63 te::se::Fill* f = te::qt::widgets::BasicFillDialog::getFill(initialFill, parent, "Title");
64 ...
65 delete f;
66 </code>
67 */
68 class TEQTWIDGETSEXPORT BasicFillDialog : public QDialog
69 {
70 public:
71
72 /** @name Initializer Methods
73 * Methods related to instantiation and destruction.
74 */
75 //@{
76
77 /*! \brief Constructs a basic fill dialog which is a child of parent, with widget flags set to f. */
78 BasicFillDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
79
80 /*! \brief Destructor. */
82
83 //@}
84
85 public:
86
87 /*!
88 \brief Pops up a modal basic fill dialog with the given window title, lets the user configure the fill,
89 and returns that fill. The fill is initially set to initial. The dialog is a child of parent.
90
91 \param initial A initial fill element that will be used. The dialog form will be update based on
92 fill element parameters. It can be NULL.
93 \param parent Dialog parent.
94 \param title Dialog title.
95
96 \note The dialog will NOT take the ownership of the given initial fill.
97 \note The caller will take the ownership of the returned fill.
98 \note It returns a NULL fill element if the user cancels the dialog.
99 */
100 static te::se::Fill* getFill(const te::se::Fill* initial, QWidget* parent = 0, const QString& title = "");
101
102 /*!
103 \brief Gets the configured fill element.
104
105 \return The configured fill element.
106
107 \note The caller will take the ownership of the returned fill.
108 */
110
111 private:
112
113 std::unique_ptr<Ui::BasicFillDialogForm> m_ui; //!< Dialog form.
114 te::qt::widgets::BasicFillWidget* m_fillWidget; //!< Basic Fill Widget used to configure the fill element.
115 };
116
117 } // end namespace widgets
118 } // end namespace qt
119} // end namespace te
120
121#endif // __TERRALIB_QT_WIDGETS_SE_INTERNAL_BASICFILLDIALOG_H
A dialog used to build a basic fill element. If you want to use this dialog, you can use commands lik...
BasicFillDialog(QWidget *parent=0, Qt::WindowFlags f=0)
Constructs a basic fill dialog which is a child of parent, with widget flags set to f.
static te::se::Fill * getFill(const te::se::Fill *initial, QWidget *parent=0, const QString &title="")
Pops up a modal basic fill dialog with the given window title, lets the user configure the fill,...
std::unique_ptr< Ui::BasicFillDialogForm > m_ui
Dialog form.
te::qt::widgets::BasicFillWidget * m_fillWidget
Basic Fill Widget used to configure the fill element.
te::se::Fill * getFill() const
Gets the configured fill element.
A widget used to build a basic fill element.
A Fill specifies the pattern for filling an area geometry.
Definition: Fill.h:60
TerraLib.
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63