QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
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
38class GUI_EXPORT QgsPlotToolXAxisZoom : public QgsPlotToolZoom
39{
40
41 Q_OBJECT
42
43 public:
44
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
A canvas for elevation profiles.
QgsPlotRectangularRubberBand is rectangular rubber band for use within QgsPlotCanvas widgets.
Plot tool for zooming into and out of the plot's x-axis only.
~QgsPlotToolXAxisZoom() override
Plot tool for zooming into and out of the plot.
virtual QRectF constrainBounds(const QRectF &sceneBounds) const
Applies constraints to the overall bounds of the rubber band.
virtual QPointF constrainStartPoint(QPointF scenePoint) const
Applies constraints to the start point of the zoom rubber band.
virtual void zoomInClickOn(QPointF scenePoint)
Handles a zoom out click on the given point.
virtual QPointF constrainMovePoint(QPointF scenePoint) const
Applies constraints to a move point of the zoom rubber band.
virtual void zoomOutClickOn(QPointF scenePoint)
Handles a zoom out click on the given point.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53