27#include "moc_qgsplottoolzoom.cpp"
33 mRubberBand = std::make_unique<QgsPlotRectangularRubberBand>(
canvas );
34 mRubberBand->setBrush( QBrush( QColor( 70, 50, 255, 25 ) ) );
35 mRubberBand->setPen( QPen( QBrush( QColor( 70, 50, 255, 100 ) ), 0 ) );
42 if ( event->button() != Qt::LeftButton )
47 mRubberBand->finish();
54 if ( event->modifiers() & Qt::AltModifier )
61 startMarqueeZoom( event->pos() );
78 if ( !
mMarqueeZoom || event->button() != Qt::LeftButton )
102 if ( !event->isAutoRepeat() )
112 if ( !event->isAutoRepeat() )
124 mRubberBand->finish();
158void 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 mouse event which is the result of a user interaction with a QgsPlotCanvas.