Loading...
Searching...
No Matches
ExtentAcquire.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 terralib/qt/widgets/tools/ExtentAcquire.h
22
23 \brief This class implements a concrete tool to define a boundary rectangle.
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_INTERNAL_EXTENTACQUIRE_H
27#define __TERRALIB_QT_WIDGETS_INTERNAL_EXTENTACQUIRE_H
28
29// TerraLib
30#include "../../../geometry/Envelope.h"
31#include "../Config.h"
32#include "RubberBand.h"
33
34namespace te
35{
36 namespace qt
37 {
38 namespace widgets
39 {
40// Forward declarations
41 class MapDisplay;
42
43 /*!
44 \class ExtentAcquire
45
46 \brief This class implements a concrete tool to define a boundary rectangle.
47
48 \ingroup widgets
49 */
51 {
52 Q_OBJECT
53
54 public:
55
56 /** @name Initializer Methods
57 * Methods related to instantiation and destruction.
58 */
59 //@{
60
61 /*!
62 \brief It constructs a extent acquire tool associated with the given map display and with the specified cursor.
63
64 \param display The map display associated with the tool.
65 \param cursor The tool cursor.
66 \param parent The tool's parent.
67
68 \note The tool will NOT take the ownership of the given pointers.
69 \note If the given cursor is different of Qt::BlankCursor, it will be setted on map display.
70 */
71 ExtentAcquire(MapDisplay* display, const QCursor& cursor, QObject* parent = 0);
72
73 /*! \brief Destructor. */
75
76 //@}
77
78 /** @name AbstractTool Methods
79 * Methods related with tool behavior.
80 */
81 //@{
82
83 bool mousePressEvent(QMouseEvent* e);
84
85 bool mouseMoveEvent(QMouseEvent* e);
86
87 bool mouseReleaseEvent(QMouseEvent* e);
88
89 //@}
90
91 private:
92
93 /** @name Copy Constructor and Assignment Operator
94 * Copy constructor and assignment operator not allowed.
95 */
96 //@{
97
98 /*!
99 \brief Copy constructor not allowed.
100
101 \param rhs The right-hand-side copy that would be used to copy from.
102 */
104
105 /*!
106 \brief Assignment operator not allowed.
107
108 \param rhs The right-hand-side copy that would be used to copy from.
109
110 \return A reference to this object.
111 */
113
114 signals:
115
116 /*! This signal is emitted when a envelope was acquired. */
118
119 //@}
120
121 private:
122
123 bool m_started; //!< Flag that indicates if operation was started.
124 };
125
126 } // end namespace widgets
127 } // end namespace qt
128} // end namespace te
129
130#endif // __TERRALIB_QT_WIDGETS_INTERNAL_EXTENTACQUIRE_H
This is a utility class tool that provides a rectangle that can indicate a boundary.
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:52
This class implements a concrete tool to define a boundary rectangle.
Definition: ExtentAcquire.h:51
bool m_started
Flag that indicates if operation was started.
ExtentAcquire(const ExtentAcquire &rhs)
Copy constructor not allowed.
bool mousePressEvent(QMouseEvent *e)
This event handler can be reimplemented in a concrete tool class to receive mouse press events for th...
bool mouseMoveEvent(QMouseEvent *e)
This event handler can be reimplemented in a concrete tool class to receive mouse move events for the...
ExtentAcquire & operator=(const ExtentAcquire &rhs)
Assignment operator not allowed.
bool mouseReleaseEvent(QMouseEvent *e)
This event handler can be reimplemented in a concrete tool class to receive mouse release events for ...
void extentAcquired(te::gm::Envelope env)
ExtentAcquire(MapDisplay *display, const QCursor &cursor, QObject *parent=0)
It constructs a extent acquire tool associated with the given map display and with the specified curs...
A widget to control the display of a set of layers.
Definition: MapDisplay.h:72
This class provides a rectangle that can indicate a boundary.
Definition: RubberBand.h:53
TerraLib.
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63