QGIS API Documentation
3.28.0-Firenze (ed3ad0430f)
src
gui
plot
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
29
class
QgsPlotRectangularRubberBand
;
30
class
QgsElevationProfileCanvas
;
31
38
class
GUI_EXPORT
QgsPlotToolXAxisZoom
:
public
QgsPlotToolZoom
39
{
40
41
Q_OBJECT
42
43
public
:
44
48
QgsPlotToolXAxisZoom
(
QgsElevationProfileCanvas
*canvas
SIP_TRANSFERTHIS
);
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
QgsElevationProfileCanvas
A canvas for elevation profiles.
Definition:
qgselevationprofilecanvas.h:47
QgsPlotRectangularRubberBand
QgsPlotRectangularRubberBand is rectangular rubber band for use within QgsPlotCanvas widgets.
Definition:
qgsplotrubberband.h:129
QgsPlotToolXAxisZoom
Plot tool for zooming into and out of the plot's x-axis only.
Definition:
qgsplottoolxaxiszoom.h:39
QgsPlotToolXAxisZoom::~QgsPlotToolXAxisZoom
~QgsPlotToolXAxisZoom() override
QgsPlotToolZoom
Plot tool for zooming into and out of the plot.
Definition:
qgsplottoolzoom.h:35
QgsPlotToolZoom::constrainBounds
virtual QRectF constrainBounds(const QRectF &sceneBounds) const
Applies constraints to the overall bounds of the rubber band.
Definition:
qgsplottoolzoom.cpp:140
QgsPlotToolZoom::constrainStartPoint
virtual QPointF constrainStartPoint(QPointF scenePoint) const
Applies constraints to the start point of the zoom rubber band.
Definition:
qgsplottoolzoom.cpp:130
QgsPlotToolZoom::zoomInClickOn
virtual void zoomInClickOn(QPointF scenePoint)
Handles a zoom out click on the given point.
Definition:
qgsplottoolzoom.cpp:152
QgsPlotToolZoom::constrainMovePoint
virtual QPointF constrainMovePoint(QPointF scenePoint) const
Applies constraints to a move point of the zoom rubber band.
Definition:
qgsplottoolzoom.cpp:135
QgsPlotToolZoom::zoomOutClickOn
virtual void zoomOutClickOn(QPointF scenePoint)
Handles a zoom out click on the given point.
Definition:
qgsplottoolzoom.cpp:145
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition:
qgis_sip.h:53
qgsplottoolzoom.h
Generated on Sat Oct 22 2022 16:10:47 for QGIS API Documentation by
1.9.4