QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
25 #include <QAbstractButton>
30 , mCursor( Qt::CrossCursor )
77 qreal x = point.
x(), y = point.
y();
79 return QPoint( std::round( x ), std::round( y ) );
117 disconnect(
mAction, &QObject::destroyed,
this, &QgsMapTool::actionDestroyed );
120 connect(
mAction, &QObject::destroyed,
this, &QgsMapTool::actionDestroyed );
123 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.
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.
const QgsMapToPixel * getCoordinateTransform()
Gets the current coordinate transform.
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.
void unsetMapTool(QgsMapTool *mapTool)
Unset the current map tool or last non zoom tool.
QgsPointXY layerToMapCoordinates(const QgsMapLayer *layer, QgsPointXY point) const
transform point coordinates from layer's CRS to output CRS