Skip to content

Commit

Permalink
Showing 6 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ Constructor for QgsElevationProfileCanvas, with the specified ``parent`` widget.
Scales the plot axis by the given factors.
%End

virtual void zoomToRect( const QRectF rect );
virtual void zoomToRect( const QRectF &rect );

virtual void wheelZoom( QWheelEvent *event );

2 changes: 1 addition & 1 deletion python/gui/auto_generated/plot/qgsplotcanvas.sip.in
Original file line number Diff line number Diff line change
@@ -109,7 +109,7 @@ Scales the plot by a specified ``scale`` factor.
The default implementation does nothing.
%End

virtual void zoomToRect( const QRectF rect );
virtual void zoomToRect( const QRectF &rect );
%Docstring
Zooms the plot to the specified ``rect`` in canvas units.

2 changes: 1 addition & 1 deletion src/gui/elevation/qgselevationprofilecanvas.cpp
Original file line number Diff line number Diff line change
@@ -394,7 +394,7 @@ void QgsElevationProfileCanvas::scalePlot( double xFactor, double yFactor )
mPlotItem->updatePlot();
}

void QgsElevationProfileCanvas::zoomToRect( const QRectF rect )
void QgsElevationProfileCanvas::zoomToRect( const QRectF &rect )
{
const QRectF intersected = rect.intersected( mPlotItem->plotArea() );

4 changes: 2 additions & 2 deletions src/gui/elevation/qgselevationprofilecanvas.h
Original file line number Diff line number Diff line change
@@ -69,7 +69,7 @@ class GUI_EXPORT QgsElevationProfileCanvas : public QgsPlotCanvas
*/
void scalePlot( double xFactor, double yFactor );

void zoomToRect( const QRectF rect ) override;
void zoomToRect( const QRectF &rect ) override;
void wheelZoom( QWheelEvent *event ) override;
void mouseMoveEvent( QMouseEvent *e ) override;

@@ -210,7 +210,7 @@ class GUI_EXPORT QgsElevationProfileCanvas : public QgsPlotCanvas
/**
* Converts a canvas point to the equivalent plot point.
*/
QgsProfilePoint canvasPointToPlotPoint( const QPointF &point ) const;
QgsProfilePoint canvasPointToPlotPoint( QPointF point ) const;

/**
* Converts a plot point to the equivalent canvas point.
2 changes: 1 addition & 1 deletion src/gui/plot/qgsplotcanvas.cpp
Original file line number Diff line number Diff line change
@@ -287,7 +287,7 @@ void QgsPlotCanvas::scalePlot( double )

}

void QgsPlotCanvas::zoomToRect( const QRectF )
void QgsPlotCanvas::zoomToRect( const QRectF & )
{

}
2 changes: 1 addition & 1 deletion src/gui/plot/qgsplotcanvas.h
Original file line number Diff line number Diff line change
@@ -148,7 +148,7 @@ class GUI_EXPORT QgsPlotCanvas : public QGraphicsView
*
* The default implementation does nothing.
*/
virtual void zoomToRect( const QRectF rect );
virtual void zoomToRect( const QRectF &rect );

/**
* Snap a canvas point to the plot

0 comments on commit 28f02c4

Please sign in to comment.