QGIS API Documentation
3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
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 "qgis_gui.h"
22
#include "
qgis_sip.h
"
23
#include "
qgsplottoolzoom.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
Q_OBJECT
41
42
public
:
46
QgsPlotToolXAxisZoom
(
QgsElevationProfileCanvas
*
canvas
SIP_TRANSFERTHIS
);
47
~QgsPlotToolXAxisZoom
()
override
;
48
49
protected
:
50
QPointF
constrainStartPoint
( QPointF scenePoint )
const override
;
51
QPointF
constrainMovePoint
( QPointF scenePoint )
const override
;
52
QRectF
constrainBounds
(
const
QRectF &sceneBounds )
const override
;
53
void
zoomOutClickOn
( QPointF scenePoint )
override
;
54
void
zoomInClickOn
( QPointF scenePoint )
override
;
55
56
private
:
57
QgsElevationProfileCanvas
*mElevationCanvas =
nullptr
;
58
};
59
60
#endif
// QGSPLOTTOOLXAXISZOOM_H
QgsElevationProfileCanvas
A canvas for elevation profiles.
Definition
qgselevationprofilecanvas.h:49
QgsPlotRectangularRubberBand
A rectangular rubber band for use within QgsPlotCanvas widgets.
Definition
qgsplotrubberband.h:124
QgsPlotToolXAxisZoom::QgsPlotToolXAxisZoom
QgsPlotToolXAxisZoom(QgsElevationProfileCanvas *canvas)
Constructor for QgsPlotToolXAxisZoom, with the associated canvas.
Definition
qgsplottoolxaxiszoom.cpp:27
QgsPlotToolXAxisZoom::~QgsPlotToolXAxisZoom
~QgsPlotToolXAxisZoom() override
QgsPlotToolZoom::constrainBounds
virtual QRectF constrainBounds(const QRectF &sceneBounds) const
Applies constraints to the overall bounds of the rubber band.
Definition
qgsplottoolzoom.cpp:139
QgsPlotToolZoom::constrainStartPoint
virtual QPointF constrainStartPoint(QPointF scenePoint) const
Applies constraints to the start point of the zoom rubber band.
Definition
qgsplottoolzoom.cpp:129
QgsPlotToolZoom::zoomInClickOn
virtual void zoomInClickOn(QPointF scenePoint)
Handles a zoom out click on the given point.
Definition
qgsplottoolzoom.cpp:151
QgsPlotToolZoom::constrainMovePoint
virtual QPointF constrainMovePoint(QPointF scenePoint) const
Applies constraints to a move point of the zoom rubber band.
Definition
qgsplottoolzoom.cpp:134
QgsPlotToolZoom::zoomOutClickOn
virtual void zoomOutClickOn(QPointF scenePoint)
Handles a zoom out click on the given point.
Definition
qgsplottoolzoom.cpp:144
QgsPlotToolZoom::QgsPlotToolZoom
QgsPlotToolZoom(QgsPlotCanvas *canvas)
Constructor for QgsPlotToolZoom, with the associated canvas.
Definition
qgsplottoolzoom.cpp:29
QgsPlotTool::canvas
QgsPlotCanvas * canvas() const
Returns the tool's plot canvas.
Definition
qgsplottool.cpp:149
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:53
qgsplottoolzoom.h
Generated on
for QGIS API Documentation by
1.15.0