Loading...
Searching...
No Matches
ApplicationEvents.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 ApplicationEvents.h
22
23 \brief Contains the list of the application events.
24*/
25
26#ifndef __TERRALIB_QT_AF_EVENTS_INTERNAL_APPLICATIONREVENTS_H
27#define __TERRALIB_QT_AF_EVENTS_INTERNAL_APPLICATIONREVENTS_H
28
29#include "Event.h"
30#include "Enums.h"
31
32// Qt
33#include <QSize>
34#include <QList>
35
36// Forward declarations
37class QToolBar;
38class QAction;
39
40namespace te
41{
42 namespace qt
43 {
44 namespace widgets
45 {
46 // Forward declarations
47 class MapDisplay;
48 class LayerItemView;
49 }
50
51 namespace af
52 {
53 namespace evt
54 {
55 /*!
56 \struct AppClosed
57
58 \brief This event signals that the application is about to close.
59 */
60 struct AppClosed : public Event
61 {
62 /*!
63 \brief Constructor.
64 */
67 {
68 }
69 };
70
71 /*!
72 \struct DisplayResized
73
74 \brief This event signals that a display was resized.
75 */
76 struct DisplayResized : public Event
77 {
78 /*!
79 \brief Constructor.
80
81 \param display The pointer to the display resized.
82
83 \param newSize The new size of the display.
84
85 \param oldSize The old size if the display.
86 */
87 DisplayResized(te::qt::widgets::MapDisplay* display, const QSize& newSize, const QSize& oldSize) :
89 m_display(display),
90 m_newSize(newSize),
91 m_oldSize(oldSize)
92 {
93 }
94
95 te::qt::widgets::MapDisplay* m_display; //!< Pointer to associated te::qt::widgets::MapDisplay.
96 QSize m_newSize; //!< New size of the display.
97 QSize m_oldSize; //!< Old size of the display.
98 };
99
100 /*!
101 \struct ToolBarAdded
102
103 \brief This event signals that a new toolbar was added.
104 */
105
106 struct ToolBarAdded : public Event
107 {
108 /*!
109 \brief Constructor.
110
111 \param toolbar Pointer to the new tool bar.
112 */
113 ToolBarAdded(QToolBar* toolbar) :
115 m_toolbar(toolbar)
116 {
117 }
118
119 QToolBar* m_toolbar; //!< Pointer to the new QToolBar.
120 };
121
122 /*!
123 \struct Draw Button Clicked
124
125 \brief This event signals that the draw button clicked
126 */
127
128 struct DrawButtonClicked : public Event
129 {
130 /*!
131 \brief Constructor.
132 */
135 {
136 }
137 };
138
139 /*!
140 \struct Zoom In Button Toggled
141
142 \brief This event signals that the zoom in button toggled
143 */
144
146 {
147 /*!
148 \brief Constructor.
149 */
152 {
153 }
154 };
155
156 /*!
157 \struct Zoom Out Button Toggled
158
159 \brief This event signals that the zoom out button toggled
160 */
161
163 {
164 /*!
165 \brief Constructor.
166 */
169 {
170 }
171 };
172
173 /*!
174 \struct Pan Button Toggled
175
176 \brief This event signals that the pan button toggled
177 */
178
179 struct PanButtonToggled : public Event
180 {
181 /*!
182 \brief Constructor.
183 */
186 {
187 }
188 };
189
190 /*!
191 \struct Selection Button Toggled
192
193 \brief This event signals that the selection button toggled
194 */
195
197 {
198 /*!
199 \brief Constructor.
200 */
203 {
204 }
205 };
206
208 {
211 m_toolbar(0)
212 {
213
214 }
215
216 std::string m_plgName;
217 std::string m_category;
218 QToolBar* m_toolbar;
219 QList<QAction*> m_actions;
220 };
221
222 struct GetLayerExplorer : public Event
223 {
227 {
228
229 }
230
232 };
233 }
234 }
235 }
236}
237
238#endif //__TERRALIB_QT_AF_EVENTS_INTERNAL_APPLICATIONREVENTS_H
A specialization of QTreeView for manipulate layers.
Definition: LayerItemView.h:79
A widget to control the display of a set of layers.
Definition: MapDisplay.h:72
@ NEW_ACTIONS_AVAILABLE
Definition: Enums.h:77
@ ZOOM_OUT_BUTTON_TOGGLED
Definition: Enums.h:72
@ GET_LAYERS_VIEW
Definition: Enums.h:79
@ TOOLBAR_ADDED
Definition: Enums.h:43
@ DRAW_BUTTON_CLICKED
Definition: Enums.h:70
@ SELECTION_BUTTON_TOGGLED
Definition: Enums.h:74
@ DISPLAY_RESIZED
Definition: Enums.h:44
@ ZOOM_IN_BUTTON_TOGGLED
Definition: Enums.h:71
@ PAN_BUTTON_TOGGLED
Definition: Enums.h:73
TerraLib.
This file contains a class to represent an event.
This event signals that the application is about to close.
This event signals that a display was resized.
QSize m_oldSize
Old size of the display.
QSize m_newSize
New size of the display.
te::qt::widgets::MapDisplay * m_display
Pointer to associated te::qt::widgets::MapDisplay.
DisplayResized(te::qt::widgets::MapDisplay *display, const QSize &newSize, const QSize &oldSize)
Constructor.
A base class for application events.
Definition: Event.h:60
te::qt::widgets::LayerItemView * m_layerExplorer
This event signals that a new toolbar was added.
ToolBarAdded(QToolBar *toolbar)
Constructor.
QToolBar * m_toolbar
Pointer to the new QToolBar.
Enumerations of XML module.