22 #include <QMouseEvent> 36 if ( e->
button() == Qt::LeftButton )
43 if (( e->
buttons() & Qt::LeftButton ) )
53 if ( e->
button() == Qt::LeftButton )
QgsPoint toMapPoint(double x, double y) const
A QgsMapMouseEvent is the result of a user interaction with the mouse on a QgsMapCanvas.
void refresh()
Repaints the canvas map.
QString tr(const char *sourceText, const char *disambiguation, int n)
Map canvas is a class for displaying all GIS data types on a canvas.
A class to represent a point.
void panAction(QMouseEvent *event)
Called when mouse is moving and pan is activated.
const QgsMapToPixel * getCoordinateTransform()
Get the current coordinate transform.
void setCenter(const QgsPoint ¢er)
Set the center of the map canvas, in geographical coordinates.
const QPoint & pos() const
void panActionEnd(QPoint releasePoint)
Ends pan action and redraws the canvas.