All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ViewZoomArea.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/ZoomArea.h
22 
23  \brief This class implements a concrete tool to geographic zoom in operation using a boundary rectangle.
24 */
25 
26 #ifndef __TERRALIB_LAYOUT_INTERNAL_VIEWZOOM_AREA_BAND_H
27 #define __TERRALIB_LAYOUT_INTERNAL_VIEWZOOM_AREA_BAND_H
28 
29 // TerraLib
30 #include "ViewRubberBand.h"
31 
32 namespace te
33 {
34  namespace layout
35  {
36 // Forward declarations
37  class View;
38 
39  /*!
40  \class ZoomArea
41 
42  \brief This class implements a concrete tool to geographic zoom in operation using a boundary rectangle.
43 
44  \ingroup widgets
45  */
47  {
48  public:
49 
50  /** @name Initializer Methods
51  * Methods related to instantiation and destruction.
52  */
53  //@{
54 
55  /*!
56  \brief It constructs a zoom area tool associated with the given map display and with the specified cursor.
57 
58  \param display The map display associated with the tool.
59  \param cursor The tool cursor.
60  \param parent The tool's parent.
61 
62  \note The tool will NOT take the ownership of the given pointers.
63  \note If the given cursor is different of Qt::BlankCursor, it will be setted on map display.
64  */
65  ViewZoomArea(View* view, const QCursor& cursor, QObject* parent = 0);
66 
67  /*! \brief Destructor. */
68  ~ViewZoomArea();
69 
70  //@}
71 
72  /** @name AbstractTool Methods
73  * Methods related with tool behavior.
74  */
75  //@{
76 
77  bool mousePressEvent(QMouseEvent* e);
78 
79  bool mouseMoveEvent(QMouseEvent* e);
80 
81  bool mouseReleaseEvent(QMouseEvent* e);
82 
83  //@}
84 
85  private:
86 
87  /** @name Copy Constructor and Assignment Operator
88  * Copy constructor and assignment operator not allowed.
89  */
90  //@{
91 
92  /*!
93  \brief Copy constructor not allowed.
94 
95  \param rhs The right-hand-side copy that would be used to copy from.
96  */
97  ViewZoomArea(const ViewZoomArea& rhs);
98 
99  /*!
100  \brief Assignment operator not allowed.
101 
102  \param rhs The right-hand-side copy that would be used to copy from.
103 
104  \return A reference to this object.
105  */
106  ViewZoomArea& operator=(const ViewZoomArea& rhs);
107 
108  //@}
109 
110  private:
111 
112  bool m_zoomStarted; //!< Flag that indicates if zoom area operation was started.
113  };
114 
115  } // end namespace qt
116 } // end namespace te
117 
118 #endif // __TERRALIB_QT_WIDGETS_INTERNAL_ZOOMAREA_H
#define TELAYOUTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:99
This class implements a concrete tool to geographic pan operation.
bool m_zoomStarted
Flag that indicates if zoom area operation was started.
Definition: ViewZoomArea.h:112
Class representing the view. This view is child of QGraphicsView, part of Graphics View Framework...
Definition: View.h:89