Quantum GIS API Documentation
1.7.4
|
00001 /*************************************************************************** 00002 qgsmaptoolzoom.h - map tool for zooming 00003 ---------------------- 00004 begin : January 2006 00005 copyright : (C) 2006 by Martin Dobias 00006 email : wonder.sk at gmail dot com 00007 *************************************************************************** 00008 * * 00009 * This program is free software; you can redistribute it and/or modify * 00010 * it under the terms of the GNU General Public License as published by * 00011 * the Free Software Foundation; either version 2 of the License, or * 00012 * (at your option) any later version. * 00013 * * 00014 ***************************************************************************/ 00015 /* $Id$ */ 00016 00017 #ifndef QGSMAPTOOLZOOM_H 00018 #define QGSMAPTOOLZOOM_H 00019 00020 #include "qgsmaptool.h" 00021 #include <QRect> 00022 00023 class QgsRubberBand; 00024 00029 class GUI_EXPORT QgsMapToolZoom : public QgsMapTool 00030 { 00031 public: 00033 QgsMapToolZoom( QgsMapCanvas* canvas, bool zoomOut ); 00034 00035 ~QgsMapToolZoom(); 00036 00038 virtual void canvasMoveEvent( QMouseEvent * e ); 00039 00041 virtual void canvasPressEvent( QMouseEvent * e ); 00042 00044 virtual void canvasReleaseEvent( QMouseEvent * e ); 00045 00046 virtual bool isTransient() { return true; } 00047 00048 virtual void deactivate(); 00049 00050 protected: 00052 QRect mZoomRect; 00053 00055 bool mZoomOut; 00056 00058 bool mDragging; 00059 00060 QgsRubberBand* mRubberBand; 00061 }; 00062 00063 #endif