All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 <QtCore/QSize>
34 
35 // Forward declarations
36 class QToolBar;
37 
38 namespace te
39 {
40  namespace qt
41  {
42  namespace widgets
43  {
44  // Forward declarations
45  class MapDisplay;
46  }
47 
48  namespace af
49  {
50  namespace evt
51  {
52  /*!
53  \struct AppClosed
54 
55  \brief This event signals that the application is about to close.
56  */
57  struct AppClosed : public Event
58  {
59  /*!
60  \brief Constructor.
61  */
62  AppClosed() :
64  {
65  }
66  };
67 
68  /*!
69  \struct DisplayResized
70 
71  \brief This event signals that a display was resized.
72  */
73  struct DisplayResized : public Event
74  {
75  /*!
76  \brief Constructor.
77 
78  \param display The pointer to the display resized.
79 
80  \param newSize The new size of the display.
81 
82  \param oldSize The old size if the display.
83  */
84  DisplayResized(te::qt::widgets::MapDisplay* display, const QSize& newSize, const QSize& oldSize) :
86  m_display(display),
87  m_newSize(newSize),
88  m_oldSize(oldSize)
89  {
90  }
91 
92  te::qt::widgets::MapDisplay* m_display; //!< Pointer to associated te::qt::widgets::MapDisplay.
93  QSize m_newSize; //!< New size of the display.
94  QSize m_oldSize; //!< Old size of the display.
95  };
96 
97  /*!
98  \struct ToolBarAdded
99 
100  \brief This event signals that a new toolbar was added.
101  */
102 
103  struct ToolBarAdded : public Event
104  {
105  /*!
106  \brief Constructor.
107 
108  \param toolbar Pointer to the new tool bar.
109  */
110  ToolBarAdded(QToolBar* toolbar) :
112  m_toolbar(toolbar)
113  {
114  }
115 
116  QToolBar* m_toolbar; //!< Pointer to the new QToolBar.
117  };
118 
119  /*!
120  \struct Draw Button Clicked
121 
122  \brief This event signals that the draw button clicked
123  */
124 
125  struct DrawButtonClicked : public Event
126  {
127  /*!
128  \brief Constructor.
129  */
132  {
133  }
134  };
135 
136  /*!
137  \struct Zoom In Button Toggled
138 
139  \brief This event signals that the zoom in button toggled
140  */
141 
142  struct ZoomInButtonToggled : public Event
143  {
144  /*!
145  \brief Constructor.
146  */
149  {
150  }
151  };
152 
153  /*!
154  \struct Zoom Out Button Toggled
155 
156  \brief This event signals that the zoom out button toggled
157  */
158 
159  struct ZoomOutButtonToggled : public Event
160  {
161  /*!
162  \brief Constructor.
163  */
166  {
167  }
168  };
169 
170  /*!
171  \struct Pan Button Toggled
172 
173  \brief This event signals that the pan button toggled
174  */
175 
176  struct PanButtonToggled : public Event
177  {
178  /*!
179  \brief Constructor.
180  */
183  {
184  }
185  };
186 
187  /*!
188  \struct Selection Button Toggled
189 
190  \brief This event signals that the selection button toggled
191  */
192 
194  {
195  /*!
196  \brief Constructor.
197  */
200  {
201  }
202  };
203  }
204  }
205  }
206 }
207 
208 #endif //__TERRALIB_QT_AF_EVENTS_INTERNAL_APPLICATIONREVENTS_H
QToolBar * m_toolbar
Pointer to the new QToolBar.
A base class for application events.
Definition: Event.h:59
A widget to control the display of a set of layers.
Definition: MapDisplay.h:66
ToolBarAdded(QToolBar *toolbar)
Constructor.
QSize m_oldSize
Old size of the display.
This event signals that a display was resized.
This event signals that the application is about to close.
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.
This event signals that a new toolbar was added.
Enumerations for the TerraLib Application Framework.