|
Quantum GIS API Documentation
1.8
|
A map tool for panning the map. More...
#include <qgsmaptooltouch.h>


Public Member Functions | |
| QgsMapToolTouch (QgsMapCanvas *canvas) | |
| constructor | |
| ~QgsMapToolTouch () | |
| void | activate () |
| called when set as currently active map tool | |
| void | deactivate () |
| called when map tool is being deactivated | |
| virtual void | canvasMoveEvent (QMouseEvent *e) |
| Overridden mouse move event. | |
| virtual void | canvasReleaseEvent (QMouseEvent *e) |
| Overridden mouse release event. | |
| virtual void | canvasDoubleClickEvent (QMouseEvent *e) |
| Overridden Mouse double click event. | |
| virtual bool | isTransient () |
| Check whether this MapTool performs a zoom or pan operation. | |
Private Member Functions | |
| bool | gestureEvent (QGestureEvent *event) |
| void | pinchTriggered (QPinchGesture *gesture) |
Private Attributes | |
| bool | mDragging |
| Flag to indicate a map canvas drag operation is taking place. | |
| bool | mPinching |
| Flag to indicate a pinch gesture is taking place. | |
A map tool for panning the map.
Definition at line 30 of file qgsmaptooltouch.h.
| QgsMapToolTouch::QgsMapToolTouch | ( | QgsMapCanvas * | canvas | ) |
constructor
Definition at line 26 of file qgsmaptooltouch.cpp.
Definition at line 35 of file qgsmaptooltouch.cpp.
References QgsMapTool::mCanvas.
| void QgsMapToolTouch::activate | ( | ) | [virtual] |
called when set as currently active map tool
Reimplemented from QgsMapTool.
Definition at line 40 of file qgsmaptooltouch.cpp.
References QgsMapTool::mCanvas.
| void QgsMapToolTouch::canvasDoubleClickEvent | ( | QMouseEvent * | e | ) | [virtual] |
Overridden Mouse double click event.
Reimplemented from QgsMapTool.
Definition at line 87 of file qgsmaptooltouch.cpp.
References QgsMapTool::mCanvas, mPinching, and QgsMapCanvas::zoomWithCenter().
| void QgsMapToolTouch::canvasMoveEvent | ( | QMouseEvent * | e | ) | [virtual] |
Overridden mouse move event.
Reimplemented from QgsMapTool.
Definition at line 52 of file qgsmaptooltouch.cpp.
References QgsMapTool::mCanvas, mDragging, mPinching, and QgsMapCanvas::panAction().
| void QgsMapToolTouch::canvasReleaseEvent | ( | QMouseEvent * | e | ) | [virtual] |
Overridden mouse release event.
Reimplemented from QgsMapTool.
Definition at line 65 of file qgsmaptooltouch.cpp.
References QgsMapCanvas::getCoordinateTransform(), QgsMapTool::mCanvas, mDragging, mPinching, QgsMapCanvas::panActionEnd(), QgsMapCanvas::refresh(), QgsMapCanvas::setExtent(), and QgsMapToPixel::toMapPoint().
| void QgsMapToolTouch::deactivate | ( | ) | [virtual] |
called when map tool is being deactivated
Reimplemented from QgsMapTool.
Definition at line 46 of file qgsmaptooltouch.cpp.
References QgsMapTool::mCanvas.
| bool QgsMapToolTouch::gestureEvent | ( | QGestureEvent * | event | ) | [private] |
Definition at line 95 of file qgsmaptooltouch.cpp.
References mPinching, and pinchTriggered().
| virtual bool QgsMapToolTouch::isTransient | ( | ) | [inline, virtual] |
Check whether this MapTool performs a zoom or pan operation.
If it does, we will be able to perform the zoom and then resume operations with the original / previously used tool.
Reimplemented from QgsMapTool.
Definition at line 50 of file qgsmaptooltouch.h.
| void QgsMapToolTouch::pinchTriggered | ( | QPinchGesture * | gesture | ) | [private] |
Definition at line 107 of file qgsmaptooltouch.cpp.
References QgsMapCanvas::extent(), QgsMapCanvas::getCoordinateTransform(), QgsMapTool::mCanvas, mPinching, QgsMapCanvas::refresh(), QgsRectangle::scale(), QgsMapCanvas::setExtent(), QgsMapToPixel::toMapPoint(), and QgsMapCanvas::zoomOut().
Referenced by gestureEvent().
bool QgsMapToolTouch::mDragging [private] |
Flag to indicate a map canvas drag operation is taking place.
Definition at line 55 of file qgsmaptooltouch.h.
Referenced by canvasMoveEvent(), and canvasReleaseEvent().
bool QgsMapToolTouch::mPinching [private] |
Flag to indicate a pinch gesture is taking place.
Definition at line 57 of file qgsmaptooltouch.h.
Referenced by canvasDoubleClickEvent(), canvasMoveEvent(), canvasReleaseEvent(), gestureEvent(), and pinchTriggered().
1.7.6.1