All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
34 namespace 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  void setLayer(te::map::AbstractLayer* layer);
98 
99  /*!
100  \brief Returns the layer being used.
101 
102  \return Layer being used.
103  */
104  te::map::AbstractLayer* getLayer() const;
105 
106  protected slots:
107 
108  /*!
109  \brief Broadcasts the creation of a new chartWidget to the application
110 
111  \param chartWidget The widget containing the generated chart.
112 
113  */
114  void chartDisplayCreated(te::qt::widgets::ChartDisplayWidget* chartWidget);
115 
116  /*!
117  \brief Used for capture events sent by application framework.
118  */
119  void onApplicationTriggered(te::qt::af::evt::Event* evt);
120 
121  /*!
122  \brief Used for selection changed on table view.
123 
124  \param oids The selected object ids.
125 
126  \param add True to add to previous selection, false to discard older selection.
127 
128  \param env Bounding box of the last object selected.
129 
130  \note This function WILL TAKE the ownership of \a oids. It gives the ownership to the layer.
131  */
132  void selectionChanged(te::da::ObjectIdSet* oids, const bool& add, te::gm::Envelope* env);
133 
134  /*!
135  \brief Removes the \a oids from the list of selected in the Layer.
136 
137  \param oids Set of objects ids to be removed.
138 
139  \note This WILL NOT TAKE the ownership of \a oids.
140  */
141  void removeSelectedOIds(te::da::ObjectIdSet* oids);
142 
143  signals:
144 
145  /*!
146  \brief Broadcasts the creation of a new chartWidget to the application
147 
148  \param chartWidget The widget containing the generated chart.
149 
150  */
151  void createChartDisplay(te::qt::widgets::ChartDisplayWidget*, te::map::AbstractLayer* layer);
152 
153  /*!
154  \brief Emitted before this widget was closed.
155  */
157 
158  protected:
159 
161 
162  te::map::AbstractLayer* m_layer; //!< Layer being visualized.
163  };
164  }
165  }
166 }
167 
168 #endif //__TERRALIB_QT_WIDGETS_TABLE_INTERNAL_DATASETTABLEDOCKWIDGET_H
This is the base class for layers.
Definition: AbstractLayer.h:76
A base class for application events.
Definition: Event.h:59
te::map::AbstractLayer * m_layer
Layer being visualized.
A dock widget for DataSetTableView objects.
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:51
This class represents a set of unique ids created in the same context. i.e. from the same data set...
Definition: ObjectIdSet.h:55
te::qt::widgets::DataSetTableView * m_view
The table view.
#define TEQTAFEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:81
A wdiget used to display a chart.
A customized table view for te::map::AbstractLayer objects. Uses a te::qt::widgets::DataSetModel as i...