Quantum GIS API Documentation
1.8
|
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 00016 #ifndef QGSMAPTOOLZOOM_H 00017 #define QGSMAPTOOLZOOM_H 00018 00019 #include "qgsmaptool.h" 00020 #include <QRect> 00021 00022 class QgsRubberBand; 00023 00028 class GUI_EXPORT QgsMapToolZoom : public QgsMapTool 00029 { 00030 public: 00032 QgsMapToolZoom( QgsMapCanvas* canvas, bool zoomOut ); 00033 00034 ~QgsMapToolZoom(); 00035 00037 virtual void canvasMoveEvent( QMouseEvent * e ); 00038 00040 virtual void canvasPressEvent( QMouseEvent * e ); 00041 00043 virtual void canvasReleaseEvent( QMouseEvent * e ); 00044 00045 virtual bool isTransient() { return true; } 00046 00047 virtual void deactivate(); 00048 00049 protected: 00051 QRect mZoomRect; 00052 00054 bool mZoomOut; 00055 00057 bool mDragging; 00058 00059 QgsRubberBand* mRubberBand; 00060 }; 00061 00062 #endif