Loading...
Searching...
No Matches
GlyphGraphicWidget.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/GlyphGraphicWidget.h
22
23 \brief A widget used to build a graphic associate with a glyph mark element.
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_SE_INTERNAL_GLYPHGRAPHICWIDGET_H
27#define __TERRALIB_QT_WIDGETS_SE_INTERNAL_GLYPHGRAPHICWIDGET_H
28
29// TerraLib
30#include "../Config.h"
32
33// STL
34#include <memory>
35
36// Forward declaraion
37namespace Ui { class GlyphGraphicWidgetForm; }
38
39namespace te
40{
41 namespace qt
42 {
43 namespace widgets
44 {
45// Forward declarations
46 class GlyphMarkWidget;
47
48 /*!
49 \class GlyphGraphicWidget
50
51 \brief A widget used to build a graphic associate with a glyph mark element.
52 */
54 {
55 Q_OBJECT
56
57 public:
58
59 /** @name Initializer Methods
60 * Methods related to instantiation and destruction.
61 */
62 //@{
63
64 /*! \brief Constructs a glyph graphic widget which is a child of parent, with widget flags set to f. */
65 GlyphGraphicWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
66
67 /*! \brief Destructor. */
69
70 //@}
71
72 public:
73
74 /** @name Re-implementation of Pure Virtual Method
75 * AbstractGraphicWidget methods.
76 */
77 //@{
78
79 bool setGraphic(const te::se::Graphic* graphic);
80
81 QString getGraphicType() const;
82
83 QIcon getGraphicIcon(const QSize& size) const;
84
85 //@}
86
87 protected slots:
88
90
91 void onGraphicDisplacementChanged(const QString& text);
92
93 void onGraphicAnchorPointChanged(const QString& text);
94
95 private:
96
97 /*! \brief Updates the widget form based on internal graphic element. */
98 void updateUi();
99
100 private:
101
102 std::unique_ptr<Ui::GlyphGraphicWidgetForm> m_ui; //!< Widget form.
103 te::qt::widgets::GlyphMarkWidget* m_glyphMarkWidget; //!< Glyph mark widget used to configure the glyph mark element.
104 };
105
106 } // end namespace widgets
107 } // end namespace qt
108} // end namespace te
109
110#endif // __TERRALIB_QT_WIDGETS_SE_INTERNAL_GLYPHGRAPHICWIDGET_H
Abstract class that represents a widget that can be used to build a graphic element.
Abstract class that represents a widget that can be used to build a graphic element.
A widget used to build a graphic associate with a glyph mark element.
bool setGraphic(const te::se::Graphic *graphic)
Sets a graphic element to this widget.
void updateUi()
Updates the widget form based on internal graphic element.
std::unique_ptr< Ui::GlyphGraphicWidgetForm > m_ui
Widget form.
void onGraphicDisplacementChanged(const QString &text)
GlyphGraphicWidget(QWidget *parent=0, Qt::WindowFlags f=0)
Constructs a glyph graphic widget which is a child of parent, with widget flags set to f.
te::qt::widgets::GlyphMarkWidget * m_glyphMarkWidget
Glyph mark widget used to configure the glyph mark element.
QIcon getGraphicIcon(const QSize &size) const
Pure virtual method that should return a QIcon that represents the graphic. i.e. a simple preview.
void onGraphicAnchorPointChanged(const QString &text)
QString getGraphicType() const
Pure virtual method that should return a "user friendly" string that informs the graphic type that ca...
A widget used to build a mark element represented by a glyph.
A Graphic is a graphic symbol with an inherent shape, color(s), and possibly size.
Definition: Graphic.h:67
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