QGIS API Documentation 3.38.0-Grenoble (exported)
Loading...
Searching...
No Matches
qgsplottransienttools.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsplottransienttools.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 QGSPLOTTRANSIENTTOOLS_H
19#define QGSPLOTTRANSIENTTOOLS_H
20
21#include "qgsplottool.h"
22#include "qgis_gui.h"
23#include "qgis_sip.h"
24#include "qgsplottoolzoom.h"
25
32class GUI_EXPORT QgsPlotToolTemporaryKeyPan : public QgsPlotTool
33{
34
35 Q_OBJECT
36
37 public:
38
43
44 void plotMoveEvent( QgsPlotMouseEvent *event ) override;
45 void keyReleaseEvent( QKeyEvent *event ) override;
46 void activate() override;
47
48 private:
49
50 QPoint mLastMousePos;
51 QPointer< QgsPlotTool > mPreviousTool;
52
53};
54
61{
62
63 Q_OBJECT
64
65 public:
66
71
72 void plotMoveEvent( QgsPlotMouseEvent *event ) override;
73 void plotReleaseEvent( QgsPlotMouseEvent *event ) override;
74 void activate() override;
75
76 private:
77
78 QPoint mLastMousePos;
79 QPointer< QgsPlotTool > mPreviousTool;
80
81};
82
89{
90
91 Q_OBJECT
92
93 public:
94
99
100 void plotReleaseEvent( QgsPlotMouseEvent *event ) override;
101 void keyPressEvent( QKeyEvent *event ) override;
102 void keyReleaseEvent( QKeyEvent *event ) override;
103 void activate() override;
104
105 private:
106
107 QPointer< QgsPlotTool > mPreviousViewTool;
108
109 bool mDeactivateOnMouseRelease = false;
110
111 void updateCursor( Qt::KeyboardModifiers modifiers );
112};
113
114#endif // QGSPLOTTRANSIENTTOOLS_H
Plot canvas is a class for displaying interactive 2d charts and plots.
A QgsPlotMouseEvent is the result of a user interaction with the mouse on a QgsPlotCanvas.
Plot tool for temporarily panning a plot while a key is depressed.
Plot tool for temporarily zooming a plot while a key is depressed.
Plot tool for temporarily panning a plot while a mouse button is depressed.
Plot tool for zooming into and out of the plot.
Abstract base class for all interactive plot tools.
Definition qgsplottool.h:58
virtual void plotMoveEvent(QgsPlotMouseEvent *event)
Mouse move event for overriding.
virtual void activate()
Called when the tool is set as the currently active plot tool.
virtual void keyReleaseEvent(QKeyEvent *event)
Key release event for overriding.
virtual void keyPressEvent(QKeyEvent *event)
Key press event for overriding.
virtual void plotReleaseEvent(QgsPlotMouseEvent *event)
Mouse release event for overriding.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53