19 #include "qgsconfig.h"
26 #include <QGestureEvent>
41 class QAbstractButton;
71 sipType = sipType_QgsMapToolZoom;
73 sipType = sipType_QgsMapToolPan;
75 sipType = sipType_QgsMapToolEmitPoint;
77 sipType = sipType_QgsMapToolIdentify;
79 sipType = sipType_QgsMapToolDigitizeFeature;
99 AllowZoomRect = 1 << 3,
100 ShowContextMenu = 1 << 4,
102 Q_DECLARE_FLAGS( Flags, Flag )
108 virtual Flags flags()
const {
return Flags(); }
125 virtual void wheelEvent( QWheelEvent *e );
128 virtual void keyPressEvent( QKeyEvent *e );
131 virtual void keyReleaseEvent( QKeyEvent *e );
134 virtual bool gestureEvent( QGestureEvent *e );
142 void setAction( QAction *action );
151 bool isActive()
const;
157 void setButton( QAbstractButton *button );
160 QAbstractButton *button();
163 virtual void setCursor(
const QCursor &cursor );
166 virtual void activate();
169 virtual void deactivate();
172 virtual void clean();
190 static double searchRadiusMM();
220 virtual void populateContextMenu( QMenu *menu );
240 virtual bool populateContextMenuWithEvent( QMenu *menu,
QgsMapMouseEvent *event );
257 void actionDestroyed();
286 QPoint toCanvasCoordinates(
const QgsPointXY &point )
const;
294 void setToolName(
const QString &name );
306 QAction *mAction =
nullptr;
312 QAbstractButton *mButton =
nullptr;
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.