QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
|
A vector of attributes. More...
#include <qgsattributes.h>
Public Member Functions | |
QgsAttributes ()=default | |
Constructor for QgsAttributes. More... | |
QgsAttributes (const QVector< QVariant > &v) | |
Copies another vector of attributes. More... | |
QgsAttributes (int size) | |
Create a new vector of attributes with the given size. More... | |
QgsAttributes (int size, const QVariant &v) | |
Constructs a vector with an initial size of size elements. More... | |
bool | isUnsetValue (int index) const |
Returns true if the attribute at the specified index is an unset value. More... | |
bool | operator!= (const QgsAttributes &v) const |
bool | operator== (const QgsAttributes &v) const |
Compares two vectors of attributes. More... | |
CORE_EXPORT QgsAttributeMap | toMap () const |
Returns a QgsAttributeMap of the attribute values. More... | |
A vector of attributes.
Mostly equal to QVector<QVariant>.
Definition at line 58 of file qgsattributes.h.
|
default |
Constructor for QgsAttributes.
|
inline |
Create a new vector of attributes with the given size.
size | Number of attributes |
Definition at line 70 of file qgsattributes.h.
|
inline |
Constructs a vector with an initial size of size elements.
Each element is initialized with value.
size | Number of elements |
v | Initial value |
Definition at line 79 of file qgsattributes.h.
|
inline |
Copies another vector of attributes.
v | Attributes to copy |
Definition at line 87 of file qgsattributes.h.
|
inline |
Returns true
if the attribute at the specified index is an unset value.
Definition at line 130 of file qgsattributes.h.
|
inline |
Definition at line 138 of file qgsattributes.h.
|
inline |
Compares two vectors of attributes.
They are considered equal if all their members contain the same value and NULL flag. This was introduced because the default Qt implementation of QVariant comparison does not handle NULL values for certain types (like int).
v | The attributes to compare |
true
if v is equal Definition at line 100 of file qgsattributes.h.
QgsAttributeMap QgsAttributes::toMap | ( | ) | const |
Returns a QgsAttributeMap of the attribute values.
Null values are excluded from the map.
Definition at line 21 of file qgsattributes.cpp.