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
qgsfocuskeeper.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
qgsfocuskeeper.cpp
3
-----------------
4
Date : May 2020
5
Copyright : (C) 2020 Even Rouault
6
Email : even dot rouault at spatialys 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
#include "
qgsfocuskeeper.h
"
17
#include "moc_qgsfocuskeeper.cpp"
18
19
#include <QApplication>
20
#include <QEvent>
21
#include <QWidget>
22
23
QgsFocusKeeper::QgsFocusKeeper
()
24
: mWidgetToKeepFocused( QApplication::focusWidget() )
25
{
26
if
( mWidgetToKeepFocused )
27
mWidgetToKeepFocused->installEventFilter(
this
);
28
}
23
QgsFocusKeeper::QgsFocusKeeper
() {
…
}
29
30
QgsFocusKeeper::~QgsFocusKeeper
()
31
{
32
if
( mWidgetToKeepFocused )
33
mWidgetToKeepFocused->removeEventFilter(
this
);
34
}
30
QgsFocusKeeper::~QgsFocusKeeper
() {
…
}
35
36
bool
QgsFocusKeeper::eventFilter
( QObject *obj, QEvent *event )
37
{
38
if
( obj == mWidgetToKeepFocused && event && ( event->type() == QEvent::FocusOut || event->type() == QEvent::FocusAboutToChange ) )
39
{
40
return
true
;
41
}
42
return
QObject::eventFilter( obj, event );
43
}
36
bool
QgsFocusKeeper::eventFilter
( QObject *obj, QEvent *event ) {
…
}
QgsFocusKeeper::~QgsFocusKeeper
~QgsFocusKeeper() override
Definition
qgsfocuskeeper.cpp:30
QgsFocusKeeper::eventFilter
bool eventFilter(QObject *obj, QEvent *event) override
Definition
qgsfocuskeeper.cpp:36
QgsFocusKeeper::QgsFocusKeeper
QgsFocusKeeper()
Definition
qgsfocuskeeper.cpp:23
qgsfocuskeeper.h
Generated on Mon Mar 24 2025 21:55:38 for QGIS API Documentation by
1.9.8