QGIS API Documentation
3.36.0-Maidenhead (09951dc0acf)
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
core
vector
qgsvectorlayerfeaturecounter.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsvectorlayerfeaturecounter.h
3
---------------------
4
begin : May 2017
5
copyright : (C) 2017 by Matthias Kuhn
6
email : matthias at opengis dot ch
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 QGSVECTORLAYERFEATURECOUNTER_H
16
#define QGSVECTORLAYERFEATURECOUNTER_H
17
18
#include "
qgsvectorlayerfeatureiterator.h
"
19
#include "
qgsrenderer.h
"
20
#include "
qgstaskmanager.h
"
21
#include "
qgsfeatureid.h
"
22
32
class
CORE_EXPORT
QgsVectorLayerFeatureCounter
:
public
QgsTask
33
{
34
Q_OBJECT
35
36
public
:
37
44
QgsVectorLayerFeatureCounter
(
QgsVectorLayer
*layer,
const
QgsExpressionContext
&context =
QgsExpressionContext
(),
bool
storeSymbolFids =
false
);
45
~QgsVectorLayerFeatureCounter
()
override
;
46
50
bool
run
()
override
;
51
52
void
cancel
()
override
;
53
60
QHash<QString, long long> symbolFeatureCountMap() const
SIP_SKIP
;
61
66
long
long
featureCount( const QString &legendKey ) const;
67
76
QHash<QString,
QgsFeatureIds
> symbolFeatureIdMap() const
SIP_SKIP
;
77
84
QgsFeatureIds
featureIds( const QString &symbolkey ) const;
85
86
signals:
87
91
void
symbolsCounted();
92
93
private:
94
std::unique_ptr<
QgsVectorLayerFeatureSource
> mSource;
95
std::unique_ptr<
QgsFeatureRenderer
> mRenderer;
96
QgsExpressionContext
mExpressionContext;
97
QHash<QString,
long
long
> mSymbolFeatureCountMap;
98
QHash<QString,
QgsFeatureIds
> mSymbolFeatureIdMap;
99
std::unique_ptr<
QgsFeedback
> mFeedback;
100
bool
mWithFids = false;
101
long
mFeatureCount = 0;
102
103
};
32
class
CORE_EXPORT
QgsVectorLayerFeatureCounter
:
public
QgsTask
{
…
};
104
105
#endif
// QGSVECTORLAYERFEATURECOUNTER_H
QgsExpressionContext
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Definition
qgsexpressioncontext.h:471
QgsFeatureRenderer
Definition
qgsrenderer.h:102
QgsFeedback
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition
qgsfeedback.h:44
QgsTask
Abstract base class for long running background tasks.
Definition
qgstaskmanager.h:54
QgsTask::run
virtual bool run()=0
Performs the task's operation.
QgsTask::cancel
virtual void cancel()
Notifies the task that it should terminate.
Definition
qgstaskmanager.cpp:91
QgsVectorLayerFeatureCounter
Counts the features in a QgsVectorLayer in task.
Definition
qgsvectorlayerfeaturecounter.h:33
QgsVectorLayerFeatureCounter::~QgsVectorLayerFeatureCounter
~QgsVectorLayerFeatureCounter() override
QgsVectorLayerFeatureSource
Partial snapshot of vector layer's state (only the members necessary for access to features)
Definition
qgsvectorlayerfeatureiterator.h:53
QgsVectorLayer
Represents a vector layer which manages a vector based data sets.
Definition
qgsvectorlayer.h:400
SIP_SKIP
#define SIP_SKIP
Definition
qgis_sip.h:126
qgsfeatureid.h
QgsFeatureIds
QSet< QgsFeatureId > QgsFeatureIds
Definition
qgsfeatureid.h:37
qgsrenderer.h
qgstaskmanager.h
qgsvectorlayerfeatureiterator.h
Generated on Mon Feb 26 2024 10:02:44 for QGIS API Documentation by
1.9.8