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  class ApplicationController;
54 
55  namespace evt
56  {
57  // Forward declarations
58  struct Event;
59  }
60 
61  /*!
62  \class ChartDisplayDockWidget
63 
64  \brief A dock widget for ChartDisplayWidget objects.
65  */
66  class TEQTAFEXPORT ChartDisplayDockWidget : public QDockWidget
67  {
68  Q_OBJECT
69 
70  public:
71 
72  /*!
73  \brief Constructor.
74 
75  \param display The widget's chart display.
76  \param parent The widget's parent.
77  */
78  ChartDisplayDockWidget(te::qt::widgets::ChartDisplayWidget* displayWidget, QWidget* parent=0);
79 
80  /*!
81  \brief Destructor.
82  */
84 
85  /*!
86  \brief Sets the app controller to emit signal to app. This DOES NOT takes the ownership of \a app controller.
87 
88  \param app The app controller instance from application.
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  */
98 
99  /*!
100  \brief color used to hgihlight selected objects on this display.
101 
102  \param selColor The color used to hgihlight selected objects on this display.
103 
104  */
105  void setSelectionColor(QColor selColor);
106 
107  /*!
108  \brief Returns the layer being used.
109 
110  \return Layer being used.
111  */
113 
114  protected slots:
115 
116  /*!
117  \brief Used to capture events sent by the application framework.
118  */
120 
121  /*!
122  \brief Used to handle a selection change.
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  \note This function WILL TAKE the ownership of \a oids. It gives the ownership to the layer.
129  */
130  void selectionChanged(te::da::ObjectIdSet* oids, const bool& add);
131 
132  signals:
133 
134  /*!
135  \brief Emitted before this widget was closed.
136  */
138 
140 
141  protected:
142 
143  te::qt::widgets::ChartDisplayWidget* m_displayWidget; //!< The widget containing the display
144 
145  te::map::AbstractLayer* m_layer; //!< Layer being visualized.
146 
148  };
149  }
150  }
151 }
152 
153 #endif //__TERRALIB_QT_WIDGETS_INTERNAL_CHARTDISPLAYDOCKWIDGET_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
This is the base class for layers.
Definition: AbstractLayer.h:78
The base API for TerraLib applications.
A dock widget for ChartDisplayWidget objects.
void closed(te::qt::af::ChartDisplayDockWidget *)
Emitted before this widget was closed.
void triggered(te::qt::af::evt::Event *e)
void setLayer(te::map::AbstractLayer *layer)
Sets the layer to be showed on view. This DOES NOT takes the ownership of layer.
ChartDisplayDockWidget(te::qt::widgets::ChartDisplayWidget *displayWidget, QWidget *parent=0)
Constructor.
te::qt::widgets::ChartDisplayWidget * m_displayWidget
The widget containing the display.
void setSelectionColor(QColor selColor)
color used to hgihlight selected objects on this display.
void setAppController(ApplicationController *app)
Sets the app controller to emit signal to app. This DOES NOT takes the ownership of app controller.
te::map::AbstractLayer * m_layer
Layer being visualized.
void selectionChanged(te::da::ObjectIdSet *oids, const bool &add)
Used to handle a selection change.
te::map::AbstractLayer * getLayer() const
Returns the layer being used.
void onApplicationTriggered(te::qt::af::evt::Event *evt)
Used to capture events sent by the application framework.
A wdiget used to display a chart.
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