19#include "moc_qgsplottoolzoom.cpp"
30 mRubberBand->setBrush( QBrush( QColor( 70, 50, 255, 25 ) ) );
31 mRubberBand->setPen( QPen( QBrush( QColor( 70, 50, 255, 100 ) ), 0 ) );
38 if ( event->button() != Qt::LeftButton )
43 mRubberBand->finish();
50 if ( event->modifiers() & Qt::AltModifier )
57 startMarqueeZoom( event->pos() );
74 if ( !
mMarqueeZoom || event->button() != Qt::LeftButton )
98 if ( !event->isAutoRepeat() )
101 canvas()->viewport()->setCursor( ( event->modifiers() & Qt::AltModifier ) ?
111 if ( !event->isAutoRepeat() )
114 canvas()->viewport()->setCursor( ( event->modifiers() & Qt::AltModifier ) ?
126 mRubberBand->finish();
160void QgsPlotToolZoom::startMarqueeZoom( QPointF scenePoint )
static QCursor getThemeCursor(Cursor cursor)
Helper to get a theme cursor.
Plot canvas is a class for displaying interactive 2d charts and plots.
virtual void zoomToRect(const QRectF &rect)
Zooms the plot to the specified rect in canvas units.
virtual void scalePlot(double factor)
Scales the plot by a specified scale factor.
virtual void centerPlotOn(double x, double y)
Centers the plot on the plot point corresponding to x, y in canvas units.
A QgsPlotMouseEvent is the result of a user interaction with the mouse on a QgsPlotCanvas.
QgsPlotRectangularRubberBand is rectangular rubber band for use within QgsPlotCanvas widgets.