SymbolTableWidget.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/SymbolTableWidget.h
22
23
\brief A widget used to preview a symbol as separated layers.
24
*/
25
26
#ifndef __TERRALIB_QT_WIDGETS_SE_INTERNAL_SYMBOLTABLEWIDGET_H
27
#define __TERRALIB_QT_WIDGETS_SE_INTERNAL_SYMBOLTABLEWIDGET_H
28
29
// TerraLib
30
#include "../Config.h"
31
32
// Qt
33
#include <QWidget>
34
35
// Forward declarations
36
class
QTableWidget;
37
38
namespace
te
39
{
40
namespace
qt
41
{
42
namespace
widgets
43
{
44
// Forward declaration
45
class
Symbol;
46
47
/*!
48
\class SymbolTableWidget
49
50
\brief A widget used to preview a symbol as separated layers.
51
*/
52
class
TEQTWIDGETSEXPORT
SymbolTableWidget
:
public
QWidget
53
{
54
Q_OBJECT
55
56
public
:
57
58
/** @name Initializer Methods
59
* Methods related to instantiation and destruction.
60
*/
61
//@{
62
63
/*!
64
\brief Constructs a symbol table widget with fixed size, which is a child of parent, with widget flags set to f.
65
66
\param size The preview size.
67
\param parent The widget's parent.
68
*/
69
SymbolTableWidget
(
const
QSize& size, QWidget* parent = 0);
70
71
/*! \brief Destructor. */
72
~SymbolTableWidget
();
73
74
//@}
75
76
public
:
77
78
/*!
79
\brief Preview a symbol element.
80
81
\param symb A valid symbol element.
82
83
\note The widget will NOT take the ownership of the given symbol.
84
*/
85
void
updatePreview
(
Symbol
* symbol);
86
87
/*!
88
\brief Selects the given index on symbol table layer.
89
90
\param index The symbolizer index of symbol.
91
*/
92
void
selectSymbolizer
(
const
int
& index);
93
94
/*!
95
\brief Return the size hint to this widget.
96
97
\return The size hint.
98
*/
99
QSize
sizeHint
()
const
;
100
101
protected
slots
:
102
103
void
onPreviewTableItemSelectionChanged
();
104
105
signals:
106
107
/*!
108
\brief This signal is emitted when a symbolizer of the symbol is clicked.
109
110
\param index The symbolizer index.
111
*/
112
void
symbolizerClicked
(
int
index);
113
114
private
:
115
116
QTableWidget*
m_previewTable
;
//!< Qt element that will be used to visualize preview results.
117
QSize
m_size
;
//!< Preview size.
118
};
119
120
}
// end namespace widgets
121
}
// end namespace qt
122
}
// end namespace te
123
124
#endif
// __TERRALIB_QT_WIDGETS_SE_INTERNAL_SYMBOLTABLEWIDGET_H
te::qt::widgets::SymbolTableWidget
A widget used to preview a symbol as separated layers.
Definition:
SymbolTableWidget.h:53
te::qt::widgets::SymbolTableWidget::updatePreview
void updatePreview(Symbol *symbol)
Preview a symbol element.
te::qt::widgets::SymbolTableWidget::selectSymbolizer
void selectSymbolizer(const int &index)
Selects the given index on symbol table layer.
te::qt::widgets::SymbolTableWidget::m_previewTable
QTableWidget * m_previewTable
Qt element that will be used to visualize preview results.
Definition:
SymbolTableWidget.h:116
te::qt::widgets::SymbolTableWidget::SymbolTableWidget
SymbolTableWidget(const QSize &size, QWidget *parent=0)
Constructs a symbol table widget with fixed size, which is a child of parent, with widget flags set t...
te::qt::widgets::SymbolTableWidget::symbolizerClicked
void symbolizerClicked(int index)
This signal is emitted when a symbolizer of the symbol is clicked.
te::qt::widgets::SymbolTableWidget::m_size
QSize m_size
Preview size.
Definition:
SymbolTableWidget.h:117
te::qt::widgets::SymbolTableWidget::onPreviewTableItemSelectionChanged
void onPreviewTableItemSelectionChanged()
te::qt::widgets::SymbolTableWidget::sizeHint
QSize sizeHint() const
Return the size hint to this widget.
te::qt::widgets::SymbolTableWidget::~SymbolTableWidget
~SymbolTableWidget()
Destructor.
te::qt::widgets::Symbol
This class represents a symbol. TODO: More description!
Definition:
Symbol.h:55
te
TerraLib.
Definition:
AddressGeocodingOp.h:52
slots
#define slots
Definition:
VirtualMachine.h:48
TEQTWIDGETSEXPORT
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition:
Config.h:63
git_release
src
terralib
qt
widgets
se
SymbolTableWidget.h
Generated on Mon Dec 19 2022 08:37:06 for TerraLib by
1.9.1