Quantum GIS API Documentation  1.7.5-Wroclaw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
qgsmaptoolzoom.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsmaptoolzoom.h - map tool for zooming
3  ----------------------
4  begin : January 2006
5  copyright : (C) 2006 by Martin Dobias
6  email : wonder.sk at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 /* $Id$ */
16 
17 #ifndef QGSMAPTOOLZOOM_H
18 #define QGSMAPTOOLZOOM_H
19 
20 #include "qgsmaptool.h"
21 #include <QRect>
22 
23 class QgsRubberBand;
24 
29 class GUI_EXPORT QgsMapToolZoom : public QgsMapTool
30 {
31  public:
33  QgsMapToolZoom( QgsMapCanvas* canvas, bool zoomOut );
34 
35  ~QgsMapToolZoom();
36 
38  virtual void canvasMoveEvent( QMouseEvent * e );
39 
41  virtual void canvasPressEvent( QMouseEvent * e );
42 
44  virtual void canvasReleaseEvent( QMouseEvent * e );
45 
46  virtual bool isTransient() { return true; }
47 
48  virtual void deactivate();
49 
50  protected:
52  QRect mZoomRect;
53 
55  bool mZoomOut;
56 
58  bool mDragging;
59 
61 };
62 
63 #endif