22 #include <QMouseEvent> 31 QBitmap panBmp = QBitmap::fromData( QSize( 16, 16 ),
pan_bits );
32 QBitmap panBmpMask = QBitmap::fromData( QSize( 16, 16 ),
pan_mask_bits );
33 mCursor = QCursor( panBmp, panBmpMask, 5, 5 );
39 if (( e->buttons() & Qt::LeftButton ) )
49 if ( e->button() == Qt::LeftButton )
const unsigned char pan_bits[]
void refresh()
Repaints the canvas map.
Map canvas is a class for displaying all GIS data types on a canvas.
A class to represent a point.
const unsigned char pan_mask_bits[]
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.
QgsPoint toMapPoint(qreal x, qreal y) const
void panActionEnd(QPoint releasePoint)
Ends pan action and redraws the canvas.