19 #include "qgsconfig.h" 29 #include <QGestureEvent> 42 class QAbstractButton;
68 if ( dynamic_cast<QgsMapToolZoom *>( sipCpp ) != NULL )
69 sipType = sipType_QgsMapToolZoom;
70 else if ( dynamic_cast<QgsMapToolPan *>( sipCpp ) != NULL )
71 sipType = sipType_QgsMapToolPan;
72 else if ( dynamic_cast<QgsMapToolEmitPoint *>( sipCpp ) != NULL )
73 sipType = sipType_QgsMapToolEmitPoint;
74 else if ( dynamic_cast<QgsMapToolIdentify *>( sipCpp ) != NULL )
75 sipType = sipType_QgsMapToolIdentify;
95 AllowZoomRect = 1 << 3,
97 Q_DECLARE_FLAGS( Flags,
Flag )
103 virtual Flags flags()
const {
return Flags(); }
120 virtual void wheelEvent( QWheelEvent *e );
123 virtual void keyPressEvent( QKeyEvent *e );
126 virtual void keyReleaseEvent( QKeyEvent *e );
129 virtual bool gestureEvent( QGestureEvent *e );
136 void setAction( QAction *action );
144 void setButton( QAbstractButton *button );
147 QAbstractButton *button();
150 virtual void setCursor(
const QCursor &cursor );
153 virtual void activate();
156 virtual void deactivate();
159 virtual void clean();
175 static double searchRadiusMM();
194 void messageDiscarded();
204 void actionDestroyed();
233 QPoint toCanvasCoordinates(
const QgsPointXY &point );
245 QAction *mAction =
nullptr;
251 QAbstractButton *mButton =
nullptr;
258 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)