QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgsplottoolxaxiszoom.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsplottoolxaxiszoom.h
3  ---------------
4  begin : March 2022
5  copyright : (C) 2022 by Nyall Dawson
6  email : nyall dot dawson at gmail dot com
7 ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSPLOTTOOLXAXISZOOM_H
19 #define QGSPLOTTOOLXAXISZOOM_H
20 
21 #include "qgsplottoolzoom.h"
22 #include "qgis_gui.h"
23 #include "qgis_sip.h"
24 
25 // we probably want to generalize this in future to allow for y/other axis constrained
26 // zooms, so let's not get locked to stable api...
27 #define SIP_NO_FILE
28 
31 
38 class GUI_EXPORT QgsPlotToolXAxisZoom : public QgsPlotToolZoom
39 {
40 
41  Q_OBJECT
42 
43  public:
44 
49  ~QgsPlotToolXAxisZoom() override;
50 
51  protected:
52  QPointF constrainStartPoint( QPointF scenePoint ) const override;
53  QPointF constrainMovePoint( QPointF scenePoint ) const override;
54  QRectF constrainBounds( const QRectF &sceneBounds ) const override;
55  void zoomOutClickOn( QPointF scenePoint ) override;
56  void zoomInClickOn( QPointF scenePoint ) override;
57  private:
58  QgsElevationProfileCanvas *mElevationCanvas = nullptr;
59 };
60 
61 #endif // QGSPLOTTOOLXAXISZOOM_H
QgsPlotRectangularRubberBand
QgsPlotRectangularRubberBand is rectangular rubber band for use within QgsPlotCanvas widgets.
Definition: qgsplotrubberband.h:128
QgsPlotToolZoom::constrainBounds
virtual QRectF constrainBounds(const QRectF &sceneBounds) const
Applies constraints to the overall bounds of the rubber band.
Definition: qgsplottoolzoom.cpp:140
qgsplottoolzoom.h
QgsPlotToolZoom::zoomInClickOn
virtual void zoomInClickOn(QPointF scenePoint)
Handles a zoom out click on the given point.
Definition: qgsplottoolzoom.cpp:152
QgsPlotToolZoom::constrainStartPoint
virtual QPointF constrainStartPoint(QPointF scenePoint) const
Applies constraints to the start point of the zoom rubber band.
Definition: qgsplottoolzoom.cpp:130
QgsPlotToolZoom::constrainMovePoint
virtual QPointF constrainMovePoint(QPointF scenePoint) const
Applies constraints to a move point of the zoom rubber band.
Definition: qgsplottoolzoom.cpp:135
QgsElevationProfileCanvas
A canvas for elevation profiles.
Definition: qgselevationprofilecanvas.h:45
qgis_sip.h
QgsPlotToolXAxisZoom
Plot tool for zooming into and out of the plot's x-axis only.
Definition: qgsplottoolxaxiszoom.h:38
QgsPlotToolZoom::zoomOutClickOn
virtual void zoomOutClickOn(QPointF scenePoint)
Handles a zoom out click on the given point.
Definition: qgsplottoolzoom.cpp:145
QgsPlotToolZoom
Plot tool for zooming into and out of the plot.
Definition: qgsplottoolzoom.h:34
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:53