21 #include "qgssettings.h"
25 #include <QAbstractButton>
30 , mCursor( Qt::CrossCursor )
74 qreal x = point.
x(), y = point.
y();
76 return QPoint( std::round( x ), std::round( y ) );
118 disconnect(
mAction, &QObject::destroyed,
this, &QgsMapTool::actionDestroyed );
121 connect(
mAction, &QObject::destroyed,
this, &QgsMapTool::actionDestroyed );
124 void QgsMapTool::actionDestroyed()
206 QgsSettings settings;
static const double DEFAULT_SEARCH_RADIUS_MM
Identify search radius in mm.
Map canvas is a class for displaying all GIS data types on a canvas.
void unsetMapTool(QgsMapTool *mapTool)
Unset the current map tool or last non zoom tool.
QgsMapTool * mapTool()
Returns the currently active tool.
const QgsMapToPixel * getCoordinateTransform()
Gets the current coordinate transform.
const QgsMapSettings & mapSettings() const
Gets access to properties used for map rendering.
Base class for all map layer types.
A QgsMapMouseEvent is the result of a user interaction with the mouse on a QgsMapCanvas.
The QgsMapSettings class contains configuration for rendering of the map.
QgsPointXY layerToMapCoordinates(const QgsMapLayer *layer, QgsPointXY point) const
transform point coordinates from layer's CRS to output CRS
QgsPointXY mapToLayerCoordinates(const QgsMapLayer *layer, QgsPointXY point) const
transform point coordinates from output CRS to layer's CRS
double mapUnitsPerPixel() const
Returns current map units per pixel.
QgsPointXY toMapCoordinates(int x, int y) const
Transform device coordinates to map (world) coordinates.
void transformInPlace(double &x, double &y) const
Transforms device coordinates to map coordinates.
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.
double scaleFactor() const
Returns the scaling factor for the render to convert painter units to physical sizes.
const QgsMapToPixel & mapToPixel() const
Returns the context's map to pixel transform, which transforms between map coordinates and device coo...
static QgsRenderContext fromMapSettings(const QgsMapSettings &mapSettings)
create initialized QgsRenderContext instance from given QgsMapSettings
#define QgsDebugMsgLevel(str, level)