23 #include <QAbstractButton> 28 , mCursor( Qt::CrossCursor )
31 , mToolName( QString() )
71 qreal x = point.
x(), y = point.
y();
73 return QPoint( qRound( x ), qRound( y ) );
106 disconnect(
mAction, SIGNAL( destroyed() ),
this, SLOT( actionDestroyed() ) );
108 connect(
mAction, SIGNAL( destroyed() ),
this, SLOT( actionDestroyed() ) );
111 void QgsMapTool::actionDestroyed()
174 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
void transformInPlace(qreal &x, qreal &y) const
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.
double mapUnitsPerPixel() const
Return current map units per pixel.
A class to represent a point.
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