QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
25 #include <QAbstractButton>
30 , mCursor( Qt::CrossCursor )
74 qreal x = point.
x(), y = point.
y();
76 return QPoint( std::round( x ), std::round( y ) );
114 disconnect(
mAction, &QObject::destroyed,
this, &QgsMapTool::actionDestroyed );
117 connect(
mAction, &QObject::destroyed,
this, &QgsMapTool::actionDestroyed );
120 void QgsMapTool::actionDestroyed()
const QgsMapToPixel & mapToPixel() const
Returns the context's map to pixel transform, which transforms between map coordinates and device coo...
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.
QVariant value(const QString &key, const QVariant &defaultValue=QVariant(), Section section=NoSection) const
Returns the value for setting key.
static QgsRenderContext fromMapSettings(const QgsMapSettings &mapSettings)
create initialized QgsRenderContext instance from given QgsMapSettings
QgsMapTool * mapTool()
Returns the currently active tool.
Point geometry type, with support for z-dimension and m-values.
#define QgsDebugMsgLevel(str, level)
const QgsMapSettings & mapSettings() const
Gets access to properties used for map rendering.
Map canvas is a class for displaying all GIS data types on a canvas.
Contains information about the context of a rendering operation.
This class is a composition of two QSettings instances:
double scaleFactor() const
Returns the scaling factor for the render to convert painter units to physical sizes.
QgsPointXY toMapCoordinates(int x, int y) const
Transform device coordinates to map (world) coordinates.
A rectangle specified with double values.
const QgsMapToPixel * getCoordinateTransform()
Gets the current coordinate transform.
A class to represent a 2D point.
void transformInPlace(double &x, double &y) const
Transform device coordinates to map coordinates.
A QgsMapMouseEvent is the result of a user interaction with the mouse on a QgsMapCanvas.
Base class for all map layer types.
static const double DEFAULT_SEARCH_RADIUS_MM
Identify search radius in mm.
void unsetMapTool(QgsMapTool *mapTool)
Unset the current map tool or last non zoom tool.
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