Loading...
Searching...
No Matches
DataSetTableDockWidget.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 DataSetTableDockWidget.h
22
23 \brief A dock widget for table view objects.
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_TABLE_INTERNAL_DATASETTABLEDOCKWIDGET_H
27#define __TERRALIB_QT_WIDGETS_TABLE_INTERNAL_DATASETTABLEDOCKWIDGET_H
28
29#include "../Config.h"
30
31// Qt
32#include <QDockWidget>
33
34namespace te
35{
36 // Forward declarations
37 namespace gm
38 {
39 class Envelope;
40 }
41
42 namespace map
43 {
44 class AbstractLayer;
45 }
46
47 namespace da
48 {
49 class ObjectIdSet;
50 }
51
52 namespace qt
53 {
54 namespace widgets
55 {
56 // Forward declarations
57 class DataSetTableView;
58 class ChartDisplayWidget;
59 }
60
61 namespace af
62 {
63 namespace evt
64 {
65 // Forward declarations
66 struct Event;
67 }
68
69 /*!
70 \class DataSetTableDockWidget
71
72 \brief A dock widget for DataSetTableView objects.
73 */
74 class TEQTAFEXPORT DataSetTableDockWidget : public QDockWidget
75 {
76 Q_OBJECT
77
78 public:
79
80 /*!
81 \brief Constructor.
82
83 \param parent The widget parent.
84 */
85 DataSetTableDockWidget(QWidget* parent=0);
86
87 /*!
88 \brief Destructor.
89 */
91
92 /*!
93 \brief Sets the layer to be showed on view. This DOES NOT takes the ownership of \a layer.
94
95 \param layer The layer to be showed.
96
97 \param editable True to allow layer editions.
98 */
99 void setLayer(te::map::AbstractLayer* layer, const bool& editable = true);
100
101 /*!
102 \brief Returns the layer being used.
103
104 \return Layer being used.
105 */
107
108 /*!
109 \brief Defines the color to be used as Highlight.
110
111 \param color the Highlight color;
112 */
113 void setHighlightColor(QColor color);
114
115 protected slots:
116
117 /*!
118 \brief Broadcasts the creation of a new chartWidget to the application
119
120 \param chartWidget The widget containing the generated chart.
121
122 */
124
125 /*!
126 \brief Used for capture events sent by application framework.
127 */
129
130 /*!
131 \brief Used for selection changed on table view.
132
133 \param oids The selected object ids.
134
135 \param add True to add to previous selection, false to discard older selection.
136
137 \param env Bounding box of the last object selected.
138
139 \note This function WILL TAKE the ownership of \a oids. It gives the ownership to the layer.
140 */
141 void selectionChanged(te::da::ObjectIdSet* oids, const bool& add, te::gm::Envelope* env);
142
143 /*!
144 \brief Removes the \a oids from the list of selected in the Layer.
145
146 \param oids Set of objects ids to be removed.
147
148 \note This WILL NOT TAKE the ownership of \a oids.
149 */
151
152 /*!
153 \brief Enable or disable display auto pan to selecteds.
154
155 \param enabled Define enable or disable
156 */
157 void onAutoPanEnabled(const bool& enabled);
158
159 signals:
160
161 /*!
162 \brief Broadcasts the creation of a new chartWidget to the application
163
164 \param chartWidget The widget containing the generated chart.
165
166 */
168
169 /*!
170 \brief Emitted before this widget was closed.
171 */
173
175
176 protected:
177
179
180 te::map::AbstractLayer* m_layer; //!< Layer being visualized.
181 };
182 }
183 }
184}
185
186#endif //__TERRALIB_QT_WIDGETS_TABLE_INTERNAL_DATASETTABLEDOCKWIDGET_H
This class represents a set of unique ids created in the same context. i.e. from the same data set.
Definition: ObjectIdSet.h:56
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:52
This is the base class for layers.
Definition: AbstractLayer.h:78
A dock widget for DataSetTableView objects.
te::map::AbstractLayer * getLayer() const
Returns the layer being used.
te::map::AbstractLayer * m_layer
Layer being visualized.
void onApplicationTriggered(te::qt::af::evt::Event *evt)
Used for capture events sent by application framework.
void setLayer(te::map::AbstractLayer *layer, const bool &editable=true)
Sets the layer to be showed on view. This DOES NOT takes the ownership of layer.
void triggered(te::qt::af::evt::Event *e)
DataSetTableDockWidget(QWidget *parent=0)
Constructor.
void createChartDisplay(te::qt::widgets::ChartDisplayWidget *, te::map::AbstractLayer *layer)
Broadcasts the creation of a new chartWidget to the application.
te::qt::widgets::DataSetTableView * m_view
The table view.
void chartDisplayCreated(te::qt::widgets::ChartDisplayWidget *chartWidget)
Broadcasts the creation of a new chartWidget to the application.
void removeSelectedOIds(te::da::ObjectIdSet *oids)
Removes the oids from the list of selected in the Layer.
void selectionChanged(te::da::ObjectIdSet *oids, const bool &add, te::gm::Envelope *env)
Used for selection changed on table view.
void closed(te::qt::af::DataSetTableDockWidget *)
Emitted before this widget was closed.
void setHighlightColor(QColor color)
Defines the color to be used as Highlight.
void onAutoPanEnabled(const bool &enabled)
Enable or disable display auto pan to selecteds.
A wdiget used to display a chart.
A customized table view for te::map::AbstractLayer objects. Uses a te::qt::widgets::DataSetModel as i...
TerraLib.
#define slots
A base class for application events.
Definition: Event.h:60
#define TEQTAFEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:71