24 #include <QAbstractButton> 29 , mCursor( Qt::CrossCursor )
75 qreal x = point.
x(), y = point.
y();
77 return QPoint( std::round( x ), std::round( y ) );
115 disconnect(
mAction, &QObject::destroyed,
this, &QgsMapTool::actionDestroyed );
118 connect(
mAction, &QObject::destroyed,
this, &QgsMapTool::actionDestroyed );
121 void QgsMapTool::actionDestroyed()
void unsetMapTool(QgsMapTool *mapTool)
Unset the current map tool or last non zoom tool.
A rectangle specified with double values.
Base class for all map layer types.
This class is a composition of two QSettings instances:
QVariant value(const QString &key, const QVariant &defaultValue=QVariant(), Section section=NoSection) const
Returns the value for setting key.
A class to represent a 2D point.
A QgsMapMouseEvent is the result of a user interaction with the mouse on a QgsMapCanvas.
Map canvas is a class for displaying all GIS data types on a canvas.
The QgsMapSettings class contains configuration for rendering of the map.
void transformInPlace(double &x, double &y) const
Transform device coordinates to map coordinates.
static const double DEFAULT_SEARCH_RADIUS_MM
Identify search radius in mm.
double mapUnitsPerPixel() const
Returns current map units per pixel.
Point geometry type, with support for z-dimension and m-values.
const QgsMapSettings & mapSettings() const
Gets access to properties used for map rendering.
Contains information about the context of a rendering operation.
const QgsMapToPixel & mapToPixel() const
QgsPointXY layerToMapCoordinates(const QgsMapLayer *layer, QgsPointXY point) const
transform point coordinates from layer's CRS to output CRS
static QgsRenderContext fromMapSettings(const QgsMapSettings &mapSettings)
create initialized QgsRenderContext instance from given QgsMapSettings
const QgsMapToPixel * getCoordinateTransform()
Gets the current coordinate transform.
QgsPointXY mapToLayerCoordinates(const QgsMapLayer *layer, QgsPointXY point) const
transform point coordinates from output CRS to layer's CRS
double scaleFactor() const
Returns the scaling factor for the render to convert painter units to physical sizes.
QgsPointXY toMapCoordinates(int x, int y) const