QGIS API Documentation
3.43.0-Master (3ee7834ace6)
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
w
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
z
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
v
w
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Related Symbols
3
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
Files
File List
File Members
All
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
a
b
c
d
e
f
g
h
i
l
n
o
p
q
r
s
t
u
w
Typedefs
3
a
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
Enumerator
Macros
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
w
y
Loading...
Searching...
No Matches
src
gui
plot
qgsplotmouseevent.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsplotmouseevent.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
#ifndef QGSPLOTMOUSEEVENT_H
18
#define QGSPLOTMOUSEEVENT_H
19
20
#include <QMouseEvent>
21
22
#include "
qgspointxy.h
"
23
#include "
qgspointlocator.h
"
24
#include "qgis_gui.h"
25
26
class
QgsPlotCanvas
;
27
39
class
GUI_EXPORT
QgsPlotMouseEvent
:
public
QMouseEvent
40
{
41
#ifdef SIP_RUN
42
SIP_CONVERT_TO_SUBCLASS_CODE
43
if
(
dynamic_cast<
QgsPlotMouseEvent
*
>
( sipCpp ) )
44
sipType = sipType_QgsPlotMouseEvent;
45
else
46
sipType = 0;
47
SIP_END
48
#endif
49
50
public
:
57
QgsPlotMouseEvent
(
QgsPlotCanvas
*canvas, QMouseEvent *event );
58
69
QgsPlotMouseEvent
(
QgsPlotCanvas
*canvas, QEvent::Type type, QPoint pos, Qt::MouseButton button = Qt::NoButton, Qt::MouseButtons buttons = Qt::NoButton, Qt::KeyboardModifiers modifiers = Qt::NoModifier );
70
76
QgsPoint
mapPoint()
const
;
77
83
QgsPointXY
snappedPoint();
84
88
bool
isSnapped();
89
90
private
:
92
QgsPlotCanvas
*mCanvas =
nullptr
;
93
95
QgsPoint
mMapPoint;
96
97
bool
mHasCachedSnapResult =
false
;
98
QgsPointXY
mSnappedPoint;
99
bool
mIsSnapped =
false
;
100
101
void
snapPoint();
102
};
39
class
GUI_EXPORT
QgsPlotMouseEvent
:
public
QMouseEvent {
…
};
103
104
#endif
// QGSPLOTMOUSEEVENT_H
QgsPlotCanvas
Plot canvas is a class for displaying interactive 2d charts and plots.
Definition
qgsplotcanvas.h:54
QgsPlotMouseEvent
A QgsPlotMouseEvent is the result of a user interaction with the mouse on a QgsPlotCanvas.
Definition
qgsplotmouseevent.h:40
QgsPointXY
A class to represent a 2D point.
Definition
qgspointxy.h:60
QgsPoint
Point geometry type, with support for z-dimension and m-values.
Definition
qgspoint.h:49
SIP_CONVERT_TO_SUBCLASS_CODE
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition
qgis_sip.h:191
SIP_END
#define SIP_END
Definition
qgis_sip.h:208
qgspointlocator.h
qgspointxy.h
Generated on Mon Mar 24 2025 21:55:38 for QGIS API Documentation by
1.9.8