19 #include "qgsconfig.h"
26 #include <QGestureEvent>
41 class QAbstractButton;
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;
114 AllowZoomRect = 1 << 3,
115 ShowContextMenu = 1 << 4,
117 Q_DECLARE_FLAGS( Flags, Flag )
123 virtual Flags flags()
const {
return Flags(); }
140 virtual void wheelEvent( QWheelEvent *e );
143 virtual void keyPressEvent( QKeyEvent *e );
146 virtual void keyReleaseEvent( QKeyEvent *e );
149 virtual bool gestureEvent( QGestureEvent *e );
156 virtual bool canvasToolTipEvent( QHelpEvent *e );
164 void setAction( QAction *action );
173 bool isActive()
const;
179 void setButton( QAbstractButton *button );
182 QAbstractButton *button();
185 virtual void setCursor(
const QCursor &cursor );
188 virtual void activate();
191 virtual void deactivate();
194 virtual void clean();
212 static double searchRadiusMM();
242 virtual void populateContextMenu( QMenu *menu );
262 virtual bool populateContextMenuWithEvent( QMenu *menu,
QgsMapMouseEvent *event );
279 void actionDestroyed();
314 QPoint toCanvasCoordinates(
const QgsPointXY &point )
const;
333 void setToolName(
const QString &name );
345 QAction *mAction =
nullptr;
351 QAbstractButton *mButton =
nullptr;
356 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.