23 #include <QAbstractButton>
28 , mCursor( Qt::CrossCursor )
31 , mToolName( QString() )
71 double x = point.
x(), y = point.
y();
73 return QPoint( qRound( x ), qRound( y ) );
170 bool QgsMapTool::gestureEvent( QGestureEvent *e )
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.
QgsPoint layerToMapCoordinates(QgsMapLayer *theLayer, QgsPoint point) const
transform point coordinates from layer's CRS to output CRS
const QgsMapSettings & mapSettings() const
Get access to properties used for map rendering.
double scaleFactor() const
QgsPoint mapToLayerCoordinates(QgsMapLayer *theLayer, QgsPoint point) const
transform point coordinates from output CRS to layer's CRS
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
double mapUnitsPerPixel() const
Return current map units per pixel.
A class to represent a point geometry.
static const double DEFAULT_SEARCH_RADIUS_MM
Identify search radius in mm.
QgsPoint toMapCoordinates(int x, int y) const
Contains information about the context of a rendering operation.
static QgsRenderContext fromMapSettings(const QgsMapSettings &mapSettings)
create initialized QgsRenderContext instance from given QgsMapSettings
const QgsMapToPixel * getCoordinateTransform()
Get the current coordinate transform.
const QgsMapToPixel & mapToPixel() const