Loading...
Searching...
No Matches
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
33namespace 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 m_llCoord(false),
91 m_llx(0.),
92 m_lly(0.)
93 {
94 }
95
96 double m_x; //!< The x coordinate value.
97 double m_y; //!< The y coordinate value.
98
99 bool m_llCoord; //!< Flag used to indicate if the event has the converted coord to LL.
100
101 double m_llx; //!< The x coordinate in LL value.
102 double m_lly; //!< The y coordinate in LL value.
103 };
104 }
105 }
106 }
107}
108
109#endif //__TERRALIB_QT_AF_EVENTS_INTERNAL_TOOLSEVENTS_H
This class defines an interface for objects that can receive application events and respond to them,...
Definition: AbstractTool.h:64
@ COORDINATE_TRACKED
Definition: Enums.h:60
@ TOOL_CHANGED
Definition: Enums.h:59
TerraLib.
This file contains a class to represent an event.
Signals a mouse moved over the current display.
Definition: ToolEvents.h:79
double m_x
The x coordinate value.
Definition: ToolEvents.h:96
double m_y
The y coordinate value.
Definition: ToolEvents.h:97
bool m_llCoord
Flag used to indicate if the event has the converted coord to LL.
Definition: ToolEvents.h:99
CoordinateTracked(const double &x, const double &y)
Constructor.
Definition: ToolEvents.h:86
double m_lly
The y coordinate in LL value.
Definition: ToolEvents.h:102
double m_llx
The x coordinate in LL value.
Definition: ToolEvents.h:101
A base class for application events.
Definition: Event.h:60
This event signals that the tool being used, on current map display, changed.
Definition: ToolEvents.h:53
te::qt::widgets::AbstractTool * m_oldTool
Previously tool being used.
Definition: ToolEvents.h:69
te::qt::widgets::AbstractTool * m_newTool
The new tool to be used.
Definition: ToolEvents.h:70
ToolChanged(te::qt::widgets::AbstractTool *newTool, te::qt::widgets::AbstractTool *oldTool)
Constructor.
Definition: ToolEvents.h:62
Enumerations of XML module.