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.
A QgsMapMouseEvent is the result of a user interaction with the mouse on a QgsMapCanvas.
QgsPoint toMapCoordinates(int x, int y) const
double y() const
Returns the point's y-coordinate.
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 y() const
Get the y 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 coordinates.
Point geometry type, with support for z-dimension and m-values.
double x() const
Returns the point's x-coordinate.
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.
const QgsMapSettings & mapSettings() const
Get access to properties used for map rendering.
QVariant value(const QString &key, const QVariant &defaultValue) const
Contains information about the context of a rendering operation.
QgsPoint layerToMapCoordinates(QgsMapLayer *theLayer, QgsPoint point) const
transform point coordinates from layer's CRS to output CRS
const QgsMapToPixel & mapToPixel() const
QgsPoint mapToLayerCoordinates(QgsMapLayer *theLayer, QgsPoint point) const
transform point coordinates from output CRS to layer's CRS
static QgsRenderContext fromMapSettings(const QgsMapSettings &mapSettings)
create initialized QgsRenderContext instance from given QgsMapSettings
const QgsMapToPixel * getCoordinateTransform()
Get the current coordinate transform.
double toDouble(bool *ok) const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
double scaleFactor() const
void destroyed(QObject *obj)
double x() const
Get the x value of the point.