QGIS API Documentation  3.24.2-Tisler (13c1a02865)
Static Public Member Functions | List of all members
QgsRasterRendererUtils Class Reference

Utility functions for raster renderers. More...

#include <qgsrasterrendererutils.h>

Static Public Member Functions

static bool parseColorMapFile (const QString &path, QList< QgsColorRampShader::ColorRampItem > &items, QgsColorRampShader::Type &type, QStringList &errors)
 Parses an exported color map file at the specified path and extracts the stored color ramp items and ramp shader type. More...
 
static bool saveColorMapFile (const QString &path, const QList< QgsColorRampShader::ColorRampItem > &items, QgsColorRampShader::Type type)
 Exports a list of color ramp items and ramp shader type to a color map file at the specified path. More...
 

Detailed Description

Utility functions for raster renderers.

Since
QGIS 3.16

Definition at line 29 of file qgsrasterrendererutils.h.

Member Function Documentation

◆ parseColorMapFile()

bool QgsRasterRendererUtils::parseColorMapFile ( const QString &  path,
QList< QgsColorRampShader::ColorRampItem > &  items,
QgsColorRampShader::Type type,
QStringList &  errors 
)
static

Parses an exported color map file at the specified path and extracts the stored color ramp items and ramp shader type.

Returns true if the parsing was successful. If not, a list of errors will be generated.

See also
saveColorMapFile()

Definition at line 24 of file qgsrasterrendererutils.cpp.

◆ saveColorMapFile()

bool QgsRasterRendererUtils::saveColorMapFile ( const QString &  path,
const QList< QgsColorRampShader::ColorRampItem > &  items,
QgsColorRampShader::Type  type 
)
static

Exports a list of color ramp items and ramp shader type to a color map file at the specified path.

Returns true if the save was successful.

See also
parseColorMapFile()

Definition at line 96 of file qgsrasterrendererutils.cpp.


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