23 #include <QAbstractButton>
28 , mCursor(
Qt::CrossCursor )
77 qreal x = point.
x(), y = point.
y();
79 return QPoint( qRound( x ), qRound( y ) );
118 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.
QgsPoint layerToMapCoordinates(QgsMapLayer *theLayer, QgsPoint point) const
transform point coordinates from layer's CRS to output CRS
A QgsMapMouseEvent is the result of a user interaction with the mouse on a QgsMapCanvas.
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
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
Map canvas is a class for displaying all GIS data types on a canvas.
double x() const
Get the x value of the point.
The QgsMapSettings class contains configuration for rendering of the map.
void transformInPlace(double &x, double &y) const
Transform device coordinates to map (world) coordinates.
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
QVariant value(const QString &key, const QVariant &defaultValue) 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
double y() const
Get the y value of the point.
double toDouble(bool *ok) const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void destroyed(QObject *obj)