19 #include "qgsconfig.h" 26 #include <QGestureEvent> 40 class QAbstractButton;
67 if ( dynamic_cast<QgsMapToolZoom *>( sipCpp ) != NULL )
68 sipType = sipType_QgsMapToolZoom;
69 else if ( dynamic_cast<QgsMapToolPan *>( sipCpp ) != NULL )
70 sipType = sipType_QgsMapToolPan;
71 else if ( dynamic_cast<QgsMapToolEmitPoint *>( sipCpp ) != NULL )
72 sipType = sipType_QgsMapToolEmitPoint;
73 else if ( dynamic_cast<QgsMapToolIdentify *>( sipCpp ) != NULL )
74 sipType = sipType_QgsMapToolIdentify;
94 AllowZoomRect = 1 << 3,
96 Q_DECLARE_FLAGS( Flags,
Flag )
102 virtual Flags flags()
const {
return Flags(); }
119 virtual void wheelEvent( QWheelEvent *e );
122 virtual void keyPressEvent( QKeyEvent *e );
125 virtual void keyReleaseEvent( QKeyEvent *e );
128 virtual bool gestureEvent( QGestureEvent *e );
135 void setAction( QAction *action );
144 bool isActive()
const;
149 void setButton( QAbstractButton *button );
152 QAbstractButton *button();
155 virtual void setCursor(
const QCursor &cursor );
158 virtual void activate();
161 virtual void deactivate();
164 virtual void clean();
180 static double searchRadiusMM();
199 void messageDiscarded();
209 void actionDestroyed();
238 QPoint toCanvasCoordinates(
const QgsPointXY &point )
const;
250 QAction *mAction =
nullptr;
256 QAbstractButton *mButton =
nullptr;
263 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsMapTool::Flags )
A rectangle specified with double values.
Base class for all map layer types.
A class to represent a 2D point.
A QgsMapMouseEvent is the result of a user interaction with the mouse on a QgsMapCanvas.
MessageLevel
Level for messages This will be used both for message log and message bar in application.
Map canvas is a class for displaying all GIS data types on a canvas.
Point geometry type, with support for z-dimension and m-values.
Contains information about the context of a rendering operation.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)