mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-26 00:02:43 -04:00
Contains static helper methods for working with vector layers. Initially only contains a method to test whether a value exists within a layer's attributes.
23 lines
747 B
Plaintext
23 lines
747 B
Plaintext
|
|
/** \ingroup core
|
|
* \class QgsVectorLayerUtils
|
|
* \brief Contains utility methods for working with QgsVectorLayers.
|
|
*
|
|
* \note Added in version 3.0
|
|
*/
|
|
class QgsVectorLayerUtils
|
|
{
|
|
%TypeHeaderCode
|
|
#include <qgsvectorlayerutils.h>
|
|
%End
|
|
public:
|
|
|
|
/**
|
|
* Returns true if the specified value already exists within a field. This method can be used to test for uniqueness
|
|
* of values inside a layer's attributes. An optional list of ignored feature IDs can be provided, if so, any features
|
|
* with IDs within this list are ignored when testing for existance of the value.
|
|
*/
|
|
static bool valueExists( const QgsVectorLayer* layer, int fieldIndex, const QVariant& value, const QgsFeatureIds& ignoreIds = QgsFeatureIds() );
|
|
|
|
};
|