QGIS API Documentation 4.3.0-Master (16eddb2670e)
Loading...
Searching...
No Matches
QgsRasterAttributeTable::Field Class Reference

The Field class represents a Raster Attribute Table field, including its name, usage and type. More...

#include <qgsrasterattributetable.h>

Public Member Functions

 Field (const QString &name, const Qgis::RasterAttributeTableFieldUsage &usage, const QMetaType::Type type)
 Creates a new Field with name, type and usage.
Q_DECL_DEPRECATED Field (const QString &name, const Qgis::RasterAttributeTableFieldUsage &usage, const QVariant::Type type)
 Creates a new Field with name, type and usage.
bool isColor () const
 Returns true if the field carries a color component (Red, Green, Blue and optionally Alpha) information.
bool isRamp () const
 Returns true if the field carries a color ramp component information (RedMin/RedMax, GreenMin/GreenMax, BlueMin/BlueMax and optionally AlphaMin/AlphaMax) information.
bool operator== (const Field &other) const
 Comparison operator for Field objects.

Public Attributes

QString name
QMetaType::Type type
Qgis::RasterAttributeTableFieldUsage usage

Detailed Description

The Field class represents a Raster Attribute Table field, including its name, usage and type.

Since
QGIS 3.30

Definition at line 86 of file qgsrasterattributetable.h.

Constructor & Destructor Documentation

◆ Field() [1/2]

QgsRasterAttributeTable::Field::Field ( const QString & name,
const Qgis::RasterAttributeTableFieldUsage & usage,
const QMetaType::Type type )
inline

Creates a new Field with name, type and usage.

Definition at line 92 of file qgsrasterattributetable.h.

◆ Field() [2/2]

Q_DECL_DEPRECATED QgsRasterAttributeTable::Field::Field ( const QString & name,
const Qgis::RasterAttributeTableFieldUsage & usage,
const QVariant::Type type )
inline

Creates a new Field with name, type and usage.

Deprecated
QGIS 3.38. Use the method with a QMetaType::Type argument instead.

Definition at line 102 of file qgsrasterattributetable.h.

Member Function Documentation

◆ isColor()

bool QgsRasterAttributeTable::Field::isColor ( ) const

Returns true if the field carries a color component (Red, Green, Blue and optionally Alpha) information.

Definition at line 1675 of file qgsrasterattributetable.cpp.

◆ isRamp()

bool QgsRasterAttributeTable::Field::isRamp ( ) const

Returns true if the field carries a color ramp component information (RedMin/RedMax, GreenMin/GreenMax, BlueMin/BlueMax and optionally AlphaMin/AlphaMax) information.

Definition at line 1683 of file qgsrasterattributetable.cpp.

◆ operator==()

bool QgsRasterAttributeTable::Field::operator== ( const Field & other) const
inline

Comparison operator for Field objects.

Two fields are considered equal if they have the same name, usage and type.

Since
QGIS 4.4

Definition at line 120 of file qgsrasterattributetable.h.

Member Data Documentation

◆ name

QString QgsRasterAttributeTable::Field::name

Definition at line 122 of file qgsrasterattributetable.h.

◆ type

QMetaType::Type QgsRasterAttributeTable::Field::type

Definition at line 124 of file qgsrasterattributetable.h.

◆ usage

Qgis::RasterAttributeTableFieldUsage QgsRasterAttributeTable::Field::usage

Definition at line 123 of file qgsrasterattributetable.h.


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