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 *
************************************************************************/
|