16#ifndef QGSRASTERATTRIBUTETABLE_H
17#define QGSRASTERATTRIBUTETABLE_H
27#include <QLinearGradient>
28#include <QCoreApplication>
66 bool required =
false;
75 bool supported =
false;
78 bool maybeClass =
false;
102 bool isColor( )
const;
107 bool isRamp( )
const;
142 bool hasColor()
const;
153 bool setColor(
const int row,
const QColor &color );
162 bool hasRamp()
const;
172 bool setRamp(
const int row,
const QColor &colorMin,
const QColor &colorMax );
177 QList<Qgis::RasterAttributeTableFieldUsage> usages( ) const
SIP_SKIP;
184 QList<
int> intUsages( ) const
SIP_PYNAME( usages );
196 QColor color(
int row ) const;
228 bool isDirty() const;
233 void setDirty(
bool isDirty );
238 bool isValid( QString *errorMessage
SIP_OUT =
nullptr ) const;
249 bool insertField(
int position, const QString &name, const
Qgis::RasterAttributeTableFieldUsage usage, const QVariant::Type type, QString *errorMessage
SIP_OUT =
nullptr );
254 bool insertColor(
int position, QString *errorMessage
SIP_OUT =
nullptr );
260 bool setFieldUsage(
int fieldIndex, const
Qgis::RasterAttributeTableFieldUsage usage );
265 bool insertRamp(
int position, QString *errorMessage
SIP_OUT =
nullptr );
270 bool appendField( const QString &name, const
Qgis::RasterAttributeTableFieldUsage usage, const QVariant::Type type, QString *errorMessage
SIP_OUT =
nullptr );
280 bool removeField( const QString &name, QString *errorMessage
SIP_OUT =
nullptr );
286 bool insertRow(
int position, const QVariantList &rowData, QString *errorMessage
SIP_OUT =
nullptr );
292 bool removeRow(
int position = 0, QString *errorMessage
SIP_OUT =
nullptr );
297 bool appendRow( const QVariantList &data, QString *errorMessage
SIP_OUT =
nullptr );
303 bool writeToFile( const QString &path, QString *errorMessage
SIP_OUT =
nullptr );
308 bool readFromFile( const QString &path, QString *errorMessage
SIP_OUT =
nullptr );
313 const QList<QList<QVariant>> data() const;
332 bool setValue( const
int row, const
int column, const QVariant &value );
337 QVariant value( const
int row, const
int column ) const;
342 double minimumValue( ) const;
347 double maximumValue( ) const;
353 QVariantList row( const
double matchValue ) const;
387 QList<QList<QVariant>> orderedRows( ) const;
392 static
Qgis::RasterAttributeTableFieldUsage guessFieldUsage( const QString &name, const QVariant::Type type );
400 QString filePath() const;
406 static QString usageName( const
Qgis::RasterAttributeTableFieldUsage fieldusage );
411 static QList<
Qgis::RasterAttributeTableFieldUsage> valueAndColorFieldUsages();
441 Qgis::RasterAttributeTableType mType =
Qgis::RasterAttributeTableType::Thematic;
442 QList<
Field> mFields;
443 QList<QVariantList> mData;
The Qgis class provides global constants for use throughout the application.
RasterAttributeTableType
The RasterAttributeTableType enum represents the type of RAT.
RasterAttributeTableFieldUsage
Flags which control behavior of raster renderers.
Container of fields for a vector layer.
Gradient color ramp, which smoothly interpolates between two colors and also supports optional extra ...
The Field class represents a Raster Attribute Table field, including its name, usage and type.
Field(const QString &name, const Qgis::RasterAttributeTableFieldUsage &usage, const QVariant::Type type)
Creates a new Field with name, type and usage.
Qgis::RasterAttributeTableFieldUsage usage
The Field class represents a Raster Attribute Table classification entry for a thematic Raster Attrib...
QVector< double > minMaxValues
List of values for the class.
The QgsRasterAttributeTable class represents a Raster Attribute Table (RAT).
Base class for raster data providers.
Represents a raster layer.
Raster renderer pipe that applies colors to a raster.
QList< QgsFeature > QgsFeatureList