2017-05-09 23:54:59 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsvectorlayerfeaturecounter.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
class QgsVectorLayerFeatureCounter : QgsTask
|
|
|
|
{
|
|
|
|
%Docstring
|
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
Counts the features in a QgsVectorLayer in task.
|
|
|
|
You should most likely not use this directly and instead call
|
|
|
|
QgsVectorLayer.countSymbolFeatures() and connect to the signal
|
2017-12-19 11:43:52 -04:00
|
|
|
:py:func:`QgsVectorLayer.symbolFeatureCountMapChanged()`
|
2017-05-09 23:54:59 +02:00
|
|
|
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsvectorlayerfeaturecounter.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
2017-05-11 08:56:35 +02:00
|
|
|
QgsVectorLayerFeatureCounter( QgsVectorLayer *layer, const QgsExpressionContext &context = QgsExpressionContext() );
|
2017-05-09 23:54:59 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Create a new feature counter for ``layer``.
|
2017-05-09 23:54:59 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
virtual bool run();
|
|
|
|
|
2017-05-10 00:33:13 +02:00
|
|
|
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2017-05-10 14:05:55 +02:00
|
|
|
long featureCount( const QString &legendKey ) const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Get the feature count for a particular ``legendKey``.
|
|
|
|
If the key has not been found, -1 will be returned.
|
2017-05-10 14:05:55 +02:00
|
|
|
%End
|
|
|
|
|
2017-05-09 23:54:59 +02:00
|
|
|
signals:
|
2017-05-10 00:33:13 +02:00
|
|
|
|
|
|
|
void symbolsCounted();
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Emitted when the symbols have been counted.
|
2017-05-10 00:33:13 +02:00
|
|
|
%End
|
2017-05-09 23:54:59 +02:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsvectorlayerfeaturecounter.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|