QGIS API Documentation
3.43.0-Master (2a27c31701b)
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
qgslegendfilterbutton.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgslegendfilterbutton.h - QToolButton for legend filter by map content
3
--------------------------------------
4
Date : June 2015
5
Copyright : (C) 2015 by Hugo Mercier at Oslandia
6
Email : hugo dot mercier at oslandia 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
#ifndef QGS_LEGEND_FILTER_BUTTON_H
16
#define QGS_LEGEND_FILTER_BUTTON_H
17
18
#include <QToolButton>
19
#include "qgis_gui.h"
20
#include "
qgsexpressioncontext.h
"
21
22
class
QgsVectorLayer
;
23
class
QgsExpressionContextGenerator
;
24
32
class
GUI_EXPORT
QgsLegendFilterButton
:
public
QToolButton
33
{
34
Q_OBJECT
35
36
public
:
42
QgsLegendFilterButton
( QWidget *parent =
nullptr
);
43
47
QString expressionText()
const
;
48
53
void
setExpressionText(
const
QString &expression );
54
60
void
registerExpressionContextGenerator(
QgsExpressionContextGenerator
*generator );
61
66
QgsVectorLayer
*vectorLayer()
const
;
67
72
void
setVectorLayer(
QgsVectorLayer
*layer );
73
74
signals:
75
79
void
expressionTextChanged
();
80
81
private
:
82
QMenu *mMenu =
nullptr
;
83
QAction *mSetExpressionAction =
nullptr
;
84
QAction *mClearExpressionAction =
nullptr
;
85
QString mExpression;
86
QgsExpressionContextGenerator
*mExpressionContextGenerator =
nullptr
;
87
88
void
updateMenu();
89
90
QgsVectorLayer
*mLayer =
nullptr
;
91
private
slots:
92
void
onSetLegendFilterExpression();
93
void
onClearFilterExpression();
94
void
onToggle(
bool
);
95
};
32
class
GUI_EXPORT
QgsLegendFilterButton
:
public
QToolButton {
…
};
96
97
#endif
// QGS_FILTER_LEGEND_BUTTON_H
QgsExpressionContextGenerator
Abstract interface for generating an expression context.
Definition
qgsexpressioncontextgenerator.h:36
QgsLegendFilterButton
A tool button that allows enabling or disabling legend filter by contents of the map.
Definition
qgslegendfilterbutton.h:33
QgsLegendFilterButton::expressionTextChanged
void expressionTextChanged()
Emitted when the expression text changes.
QgsVectorLayer
Represents a vector layer which manages a vector based data sets.
Definition
qgsvectorlayer.h:401
qgsexpressioncontext.h
Generated on Tue Mar 18 2025 12:31:40 for QGIS API Documentation by
1.9.8