QGIS API Documentation
3.34.0-Prizren (ffbdd678812)
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
c
e
f
g
h
i
k
l
m
o
p
r
s
t
u
v
w
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
x
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
c
l
s
t
Macros
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
w
x
y
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
src
gui
layout
qgslayoutviewmouseevent.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgslayoutviewmouseevent.h
3
-------------------------
4
Date : July 2017
5
Copyright : (C) 2017 Nyall Dawson
6
Email : nyall dot dawson at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSLAYOUTVIEWMOUSEEVENT_H
17
#define QGSLAYOUTVIEWMOUSEEVENT_H
18
19
#include <QMouseEvent>
20
21
#include "qgis_gui.h"
22
23
class
QgsLayoutView
;
24
class
QGraphicsLineItem;
25
class
QgsLayoutItem
;
26
35
class
GUI_EXPORT
QgsLayoutViewMouseEvent
:
public
QMouseEvent
36
{
37
38
#ifdef SIP_RUN
39
SIP_CONVERT_TO_SUBCLASS_CODE
40
if
(
dynamic_cast<
QgsLayoutViewMouseEvent
*
>
( sipCpp ) )
41
sipType = sipType_QgsLayoutViewMouseEvent;
42
else
43
sipType = 0;
44
SIP_END
45
#endif
46
47
public
:
48
55
QgsLayoutViewMouseEvent
(
QgsLayoutView
*view, QMouseEvent *event,
bool
snap =
false
);
56
65
void
snapPoint( QGraphicsLineItem *horizontalSnapLine =
nullptr
, QGraphicsLineItem *verticalSnapLine =
nullptr
,
66
const
QList<QgsLayoutItem *> &ignoreItems = QList< QgsLayoutItem * >() );
67
71
QPointF layoutPoint()
const
;
72
78
QPointF
snappedPoint
()
const
{
return
mSnappedPoint; }
79
84
bool
isSnapped
()
const
{
return
mSnapped; }
85
86
private
:
87
89
QgsLayoutView
*mView =
nullptr
;
90
91
bool
mSnapped =
false
;
92
QPointF mLayoutPoint;
93
QPointF mSnappedPoint;
94
95
};
35
class
GUI_EXPORT
QgsLayoutViewMouseEvent
:
public
QMouseEvent {
…
};
96
97
#endif
// QGSLAYOUTVIEWMOUSEEVENT_H
QgsLayoutItem
Base class for graphical items within a QgsLayout.
Definition
qgslayoutitem.h:112
QgsLayoutViewMouseEvent
A QgsLayoutViewMouseEvent is the result of a user interaction with the mouse on a QgsLayoutView.
Definition
qgslayoutviewmouseevent.h:36
QgsLayoutViewMouseEvent::isSnapped
bool isSnapped() const
Returns true if point was snapped, e.g.
Definition
qgslayoutviewmouseevent.h:84
QgsLayoutViewMouseEvent::snappedPoint
QPointF snappedPoint() const
Returns the snapped event point location in layout coordinates.
Definition
qgslayoutviewmouseevent.h:78
QgsLayoutView
A graphical widget to display and interact with QgsLayouts.
Definition
qgslayoutview.h:51
SIP_CONVERT_TO_SUBCLASS_CODE
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition
qgis_sip.h:186
SIP_END
#define SIP_END
Definition
qgis_sip.h:203
Generated on Mon Oct 30 2023 18:42:25 for QGIS API Documentation by
1.9.8