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;
116 AllowZoomRect = 1 << 3,
117 ShowContextMenu = 1 << 4,
119 Q_DECLARE_FLAGS( Flags, Flag )
125 virtual Flags flags()
const {
return Flags(); }
142 virtual void wheelEvent( QWheelEvent *e );
145 virtual void keyPressEvent( QKeyEvent *e );
148 virtual void keyReleaseEvent( QKeyEvent *e );
151 virtual bool gestureEvent( QGestureEvent *e );
158 virtual bool canvasToolTipEvent( QHelpEvent *e );
166 void setAction( QAction *action );
175 bool isActive()
const;
181 void setButton( QAbstractButton *button );
184 QAbstractButton *button();
187 virtual void setCursor(
const QCursor &cursor );
190 virtual void activate();
193 virtual void deactivate();
196 virtual void clean();
214 static double searchRadiusMM();
244 virtual void populateContextMenu( QMenu *menu );
264 virtual bool populateContextMenuWithEvent( QMenu *menu,
QgsMapMouseEvent *event );
284 void actionDestroyed();
316 QPoint toCanvasCoordinates(
const QgsPointXY &point )
const;
335 void setToolName(
const QString &name );
347 QAction *mAction =
nullptr;
353 QAbstractButton *mButton =
nullptr;
359 friend class TestQgsMapToolEdit;
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.
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)
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsField::ConfigurationFlags) CORE_EXPORT QDataStream &operator<<(QDataStream &out
Writes the field to stream out. QGIS version compatibility is not guaranteed.