QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
Public Member Functions | List of all members
QgsCodedValue Class Reference

Associates a code and a value. More...

#include <qgsfielddomain.h>

Public Member Functions

 QgsCodedValue (const QVariant &code, const QString &value)
 Constructor for QgsCodedValue, with the associated code and value. More...
 
QVariant code () const
 Returns the associated code, which is the underlying value stored in fields. More...
 
bool operator!= (const QgsCodedValue &other) const
 
bool operator== (const QgsCodedValue &other) const
 
QString value () const
 Returns the associated value, which is the user-friendly string representation. More...
 

Detailed Description

Associates a code and a value.

Since
QGIS 3.26

Definition at line 170 of file qgsfielddomain.h.

Constructor & Destructor Documentation

◆ QgsCodedValue()

QgsCodedValue::QgsCodedValue ( const QVariant &  code,
const QString &  value 
)
inline

Constructor for QgsCodedValue, with the associated code and value.

The code is the underlying value stored in feature attributes, while the value is the user-facing string representation.

Definition at line 180 of file qgsfielddomain.h.

Member Function Documentation

◆ code()

QVariant QgsCodedValue::code ( ) const
inline

Returns the associated code, which is the underlying value stored in fields.

Definition at line 189 of file qgsfielddomain.h.

◆ operator!=()

bool QgsCodedValue::operator!= ( const QgsCodedValue other) const

Definition at line 41 of file qgsfielddomain.cpp.

◆ operator==()

bool QgsCodedValue::operator== ( const QgsCodedValue other) const

Definition at line 36 of file qgsfielddomain.cpp.

◆ value()

QString QgsCodedValue::value ( ) const
inline

Returns the associated value, which is the user-friendly string representation.

Definition at line 195 of file qgsfielddomain.h.


The documentation for this class was generated from the following files: