19 #include "qgsconfig.h"
26 #include <QGestureEvent>
40 class QAbstractButton;
69 sipType = sipType_QgsMapToolZoom;
71 sipType = sipType_QgsMapToolPan;
73 sipType = sipType_QgsMapToolEmitPoint;
75 sipType = sipType_QgsMapToolIdentify;
95 AllowZoomRect = 1 << 3,
96 ShowContextMenu = 1 << 4,
98 Q_DECLARE_FLAGS( Flags, Flag )
104 virtual Flags flags()
const {
return Flags(); }
121 virtual void wheelEvent( QWheelEvent *e );
124 virtual void keyPressEvent( QKeyEvent *e );
127 virtual void keyReleaseEvent( QKeyEvent *e );
130 virtual bool gestureEvent( QGestureEvent *e );
137 void setAction( QAction *action );
146 bool isActive()
const;
151 void setButton( QAbstractButton *button );
154 QAbstractButton *button();
157 virtual void setCursor(
const QCursor &cursor );
160 virtual void activate();
163 virtual void deactivate();
166 virtual void clean();
182 static double searchRadiusMM();
210 virtual void populateContextMenu( QMenu *menu );
217 void messageDiscarded();
227 void actionDestroyed();
256 QPoint toCanvasCoordinates(
const QgsPointXY &point )
const;
268 QAction *mAction =
nullptr;
274 QAbstractButton *mButton =
nullptr;
281 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsMapTool::Flags )