All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ChartDisplayDockWidget.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 ChartDisplayDockWidget.h
22 
23  \brief A dock widget for chart display objects.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_INTERNAL_CHARTDISPLAYDOCKWIDGET_H
27 #define __TERRALIB_QT_WIDGETS_INTERNAL_CHARTDISPLAYDOCKWIDGET_H
28 
29 #include "../Config.h"
30 
31 // Qt
32 #include <QDockWidget>
33 
34 namespace te
35 {
36  namespace map { class AbstractLayer; }
37 
38  namespace da
39  {
40  class ObjectIdSet;
41  }
42 
43  namespace qt
44  {
45  namespace widgets
46  {
47  // Forward declarations
48  class ChartDisplayWidget;
49  }
50 
51  namespace af
52  {
53  namespace evt
54  {
55  // Forward declarations
56  struct Event;
57  }
58 
59  /*!
60  \class ChartDisplayDockWidget
61 
62  \brief A dock widget for ChartDisplayWidget objects.
63  */
64  class TEQTAFEXPORT ChartDisplayDockWidget : public QDockWidget
65  {
66  Q_OBJECT
67 
68  public:
69 
70  /*!
71  \brief Constructor.
72 
73  \param display The widget's chart display.
74  \param parent The widget's parent.
75  */
76  ChartDisplayDockWidget(te::qt::widgets::ChartDisplayWidget* displayWidget, QWidget* parent=0);
77 
78  /*!
79  \brief Destructor.
80  */
82 
83  /*!
84  \brief Sets the layer to be showed on view. This DOES NOT takes the ownership of \a layer.
85 
86  \param layer The layer to be showed.
87  */
88  void setLayer(te::map::AbstractLayer* layer);
89 
90  /*!
91  \brief color used to hgihlight selected objects on this display.
92 
93  \param selColor The color used to hgihlight selected objects on this display.
94 
95  */
96  void setSelectionColor(QColor selColor);
97 
98  /*!
99  \brief Returns the layer being used.
100 
101  \return Layer being used.
102  */
103  te::map::AbstractLayer* getLayer() const;
104 
105  protected slots:
106 
107  /*!
108  \brief Used to capture events sent by the application framework.
109  */
110  void onApplicationTriggered(te::qt::af::evt::Event* evt);
111 
112  /*!
113  \brief Used to handle a selection change.
114 
115  \param oids The selected object ids.
116 
117  \param add True to add to previous selection, false to discard older selection.
118 
119  \note This function WILL TAKE the ownership of \a oids. It gives the ownership to the layer.
120  */
121  void selectionChanged(te::da::ObjectIdSet* oids, const bool& add);
122 
123  signals:
124 
125  /*!
126  \brief Emitted before this widget was closed.
127  */
129 
130  protected:
131 
132  te::qt::widgets::ChartDisplayWidget* m_displayWidget; //!< The widget containing the display
133 
134  te::map::AbstractLayer* m_layer; //!< Layer being visualized.
135  };
136  }
137  }
138 }
139 
140 #endif //__TERRALIB_QT_WIDGETS_INTERNAL_CHARTDISPLAYDOCKWIDGET_H
te::qt::widgets::ChartDisplayWidget * m_displayWidget
The widget containing the display.
A dock widget for ChartDisplayWidget objects.
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.
This class represents a set of unique ids created in the same context. i.e. from the same data set...
Definition: ObjectIdSet.h:55
#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.