ToolEvents.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 ToolsEvents.h
22 
23  \brief Contains the list of the tools related events.
24 */
25 
26 #ifndef __TERRALIB_QT_AF_EVENTS_INTERNAL_TOOLSEVENTS_H
27 #define __TERRALIB_QT_AF_EVENTS_INTERNAL_TOOLSEVENTS_H
28 
29 // TerraLib
30 #include "Event.h"
31 #include "Enums.h"
32 
33 namespace te
34 {
35  namespace qt
36  {
37 // Forward declaration
38  namespace widgets
39  {
40  class AbstractTool;
41  }
42 
43  namespace af
44  {
45  namespace evt
46  {
47  /*!
48  \struct ToolChanged
49 
50  \brief This event signals that the tool being used, on current map display, changed.
51  */
52  struct ToolChanged : public Event
53  {
54 
55  /*!
56  \brief Constructor.
57 
58  \param newTool Pointer to the new tool to be used.
59 
60  \param oldTool Pointer to the previously used tool.
61  */
64  m_oldTool(oldTool),
65  m_newTool(newTool)
66  {
67  }
68 
69  te::qt::widgets::AbstractTool* m_oldTool; //!< Previously tool being used.
70  te::qt::widgets::AbstractTool* m_newTool; //!< The new tool to be used.
71  };
72 
73  /*!
74  \struct CoordinateTracked
75 
76  \brief Signals a mouse moved over the current display.
77  */
78  struct CoordinateTracked : public Event
79  {
80  /*!
81  \brief Constructor.
82 
83  \param x The x coordinate value.
84  \param y The y coordinate value.
85  */
86  CoordinateTracked(const double& x, const double& y)
88  m_x(x),
89  m_y(y)
90  {
91  }
92 
93  double m_x; //!< The x coordinate value.
94  double m_y; //!< The y coordinate value.
95  };
96  }
97  }
98  }
99 }
100 
101 #endif //__TERRALIB_QT_AF_EVENTS_INTERNAL_TOOLSEVENTS_H
double m_x
The x coordinate value.
Definition: ToolEvents.h:93
CoordinateTracked(const double &x, const double &y)
Constructor.
Definition: ToolEvents.h:86
te::qt::widgets::AbstractTool * m_newTool
The new tool to be used.
Definition: ToolEvents.h:70
A base class for application events.
Definition: Event.h:59
double m_y
The y coordinate value.
Definition: ToolEvents.h:94
This class defines an interface for objects that can receive application events and respond to them...
Definition: AbstractTool.h:62
URI C++ Library.
Signals a mouse moved over the current display.
Definition: ToolEvents.h:78
Enumerations for the TerraLib Application Framework.
ToolChanged(te::qt::widgets::AbstractTool *newTool, te::qt::widgets::AbstractTool *oldTool)
Constructor.
Definition: ToolEvents.h:62
te::qt::widgets::AbstractTool * m_oldTool
Previously tool being used.
Definition: ToolEvents.h:69
This event signals that the tool being used, on current map display, changed.
Definition: ToolEvents.h:52