26#include <QGestureEvent>
76 sipType = sipType_QgsMapToolZoom;
78 sipType = sipType_QgsMapToolPan;
80 sipType = sipType_QgsMapToolEmitPoint;
82 sipType = sipType_QgsMapToolExtent;
84 sipType = sipType_QgsMapToolIdentifyFeature;
86 sipType = sipType_QgsMapToolIdentify;
88 sipType = sipType_QgsMapToolDigitizeFeature;
90 sipType = sipType_QgsMapToolCapture;
92 sipType = sipType_QgsMapToolAdvancedDigitizing;
94 sipType = sipType_QgsMapToolEdit;
95 else if ( sipCpp->inherits(
"QgsMapTool" ) )
96 sipType = sipType_QgsMapTool;
113 AllowZoomRect = 1 << 3,
114 ShowContextMenu = 1 << 4,
116 Q_DECLARE_FLAGS( Flags, Flag )
121 virtual Flags flags()
const {
return Flags(); }
138 virtual void wheelEvent( QWheelEvent *e );
141 virtual void keyPressEvent( QKeyEvent *e );
144 virtual void keyReleaseEvent( QKeyEvent *e );
147 virtual bool gestureEvent( QGestureEvent *e );
154 virtual bool canvasToolTipEvent( QHelpEvent *e );
162 void setAction( QAction *action );
171 bool isActive()
const;
177 void setButton( QAbstractButton *button );
180 QAbstractButton *button();
183 virtual void setCursor(
const QCursor &cursor );
186 virtual void activate();
189 virtual void deactivate();
197 virtual void reactivate();
200 virtual void clean();
216 static double searchRadiusMM();
244 virtual void populateContextMenu( QMenu *menu );
264 virtual bool populateContextMenuWithEvent( QMenu *menu,
QgsMapMouseEvent *event );
287 void actionDestroyed();
319 QPoint toCanvasCoordinates(
const QgsPointXY &point )
const;
338 void setToolName(
const QString &name );
350 QAction *mAction =
nullptr;
356 QAbstractButton *mButton =
nullptr;
362 friend class TestQgsMapToolEdit;
MessageLevel
Level for messages This will be used both for message log and message bar in application.
@ Info
Information message.
Map canvas is a class for displaying all GIS data types on a canvas.
Base class for all map layer types.
A QgsMapMouseEvent is the result of a user interaction with the mouse on a QgsMapCanvas.
A class to represent a 2D point.
Point geometry type, with support for z-dimension and m-values.
A rectangle specified with double values.
Contains information about the context of a rendering operation.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
#define SIP_ENUM_BASETYPE(type)
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsTextRendererUtils::CurvedTextFlags)