File: qgsvectorlayerfeaturecounter.sip.in

package info (click to toggle)
qgis 3.40.15%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,185,444 kB
  • sloc: cpp: 1,616,454; python: 372,967; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,829; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 155
file content (78 lines) | stat: -rw-r--r-- 2,722 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/vector/qgsvectorlayerfeaturecounter.h                       *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/


class QgsVectorLayerFeatureCounter : QgsTask
{
%Docstring(signature="appended")
Counts the features in a :py:class:`QgsVectorLayer` in task.

You should most likely not use this directly and instead call
:py:func:`QgsVectorLayer.countSymbolFeatures()` and connect to the
signal :py:func:`QgsVectorLayer.symbolFeatureCountMapChanged()`.
%End

%TypeHeaderCode
#include "qgsvectorlayerfeaturecounter.h"
%End
  public:

    QgsVectorLayerFeatureCounter( QgsVectorLayer *layer, const QgsExpressionContext &context = QgsExpressionContext(), bool storeSymbolFids = false );
%Docstring
Create a new feature counter for ``layer``.

:param layer: Target :py:class:`QgsVectorLayer` to perform counting on.
:param context: Specific :py:class:`QgsExpressionContext` to use during
                the rendering step.
:param storeSymbolFids: If ``True`` will store the feature ids (fids),
                        otherwise will only count the number of features
                        per symbol. Default ``False``.
%End
    ~QgsVectorLayerFeatureCounter();

    virtual bool run();

%Docstring
Calculates the feature count and Ids per symbol
%End

    virtual void cancel();



    long long featureCount( const QString &legendKey ) const;
%Docstring
Returns the feature count for a particular ``legendKey``. If the key has
not been found, -1 will be returned.
%End


    QgsFeatureIds featureIds( const QString &symbolkey ) const;
%Docstring
Returns the feature Ids for a particular ``legendKey``. If the key has
not been found an empty QSet will be returned.

.. versionadded:: 3.10
%End

  signals:

    void symbolsCounted();
%Docstring
Emitted when the symbols have been counted.
%End

};

/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/vector/qgsvectorlayerfeaturecounter.h                       *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/