29 mRubberBand->setBrush( QBrush( QColor( 70, 50, 255, 25 ) ) );
30 mRubberBand->setPen( QPen( QBrush( QColor( 70, 50, 255, 100 ) ), 0 ) );
37 if ( event->button() != Qt::LeftButton )
42 mRubberBand->finish();
49 if ( event->modifiers() & Qt::AltModifier )
56 startMarqueeZoom( event->pos() );
73 if ( !
mMarqueeZoom || event->button() != Qt::LeftButton )
97 if ( !event->isAutoRepeat() )
100 canvas()->viewport()->setCursor( ( event->modifiers() & Qt::AltModifier ) ?
110 if ( !event->isAutoRepeat() )
113 canvas()->viewport()->setCursor( ( event->modifiers() & Qt::AltModifier ) ?
125 mRubberBand->finish();
159void 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.