QGIS API Documentation
2.2.0-Valmiera
|
Registry for raster renderers. More...
#include <qgsrasterrendererregistry.h>
Public Member Functions | |
~QgsRasterRendererRegistry () | |
void | insert (QgsRasterRendererRegistryEntry entry) |
void | insertWidgetFunction (const QString &rendererName, QgsRasterRendererWidgetCreateFunc func) |
bool | rendererData (const QString &rendererName, QgsRasterRendererRegistryEntry &data) const |
QStringList | renderersList () const |
QList < QgsRasterRendererRegistryEntry > | entries () const |
QgsRasterRenderer * | defaultRendererForDrawingStyle (const QgsRaster::DrawingStyle &theDrawingStyle, QgsRasterDataProvider *provider) const |
Creates a default renderer for a raster drawing style (considering user options such as default contrast enhancement). |
Static Public Member Functions | |
static QgsRasterRendererRegistry * | instance () |
Protected Member Functions | |
QgsRasterRendererRegistry () |
Private Member Functions | |
bool | minMaxValuesForBand (int band, QgsRasterDataProvider *provider, double &minValue, double &maxValue) const |
Private Attributes | |
QHash< QString, QgsRasterRendererRegistryEntry > | mEntries |
QStringList | mSortedEntries |
Static Private Attributes | |
static QgsRasterRendererRegistry * | mInstance |
Registry for raster renderers.
Definition at line 51 of file qgsrasterrendererregistry.h.
QgsRasterRendererRegistry::~QgsRasterRendererRegistry | ( | ) |
Definition at line 58 of file qgsrasterrendererregistry.cpp.
|
protected |
Definition at line 44 of file qgsrasterrendererregistry.cpp.
References QgsSingleBandColorDataRenderer::create(), QgsSingleBandPseudoColorRenderer::create(), QgsMultiBandColorRenderer::create(), QgsPalettedRasterRenderer::create(), QgsSingleBandGrayRenderer::create(), insert(), and tr.
QgsRasterRenderer * QgsRasterRendererRegistry::defaultRendererForDrawingStyle | ( | const QgsRaster::DrawingStyle & | theDrawingStyle, |
QgsRasterDataProvider * | provider | ||
) | const |
Creates a default renderer for a raster drawing style (considering user options such as default contrast enhancement).
Caller takes ownership
Definition at line 105 of file qgsrasterrendererregistry.cpp.
References QgsRasterInterface::bandCount(), QgsRasterDataProvider::colorTable(), QgsRasterDataProvider::dataType(), minMaxValuesForBand(), QgsRaster::MultiBandColor, QgsRaster::MultiBandSingleBandGray, QgsRaster::PalettedColor, QgsRasterRenderer::setRasterTransparency(), QgsRasterTransparency::setTransparentSingleValuePixelList(), QgsRasterTransparency::setTransparentThreeValuePixelList(), QgsRaster::SingleBandColorDataStyle, QgsRaster::SingleBandGray, QgsRaster::SingleBandPseudoColor, tr, and QgsRasterRenderer::usesBands().
QList< QgsRasterRendererRegistryEntry > QgsRasterRendererRegistry::entries | ( | ) | const |
Definition at line 93 of file qgsrasterrendererregistry.cpp.
References mEntries.
void QgsRasterRendererRegistry::insert | ( | QgsRasterRendererRegistryEntry | entry | ) |
Definition at line 62 of file qgsrasterrendererregistry.cpp.
References mEntries, mSortedEntries, and QgsRasterRendererRegistryEntry::name.
Referenced by QgsRasterRendererRegistry().
void QgsRasterRendererRegistry::insertWidgetFunction | ( | const QString & | rendererName, |
QgsRasterRendererWidgetCreateFunc | func | ||
) |
Definition at line 68 of file qgsrasterrendererregistry.cpp.
References mEntries.
|
static |
Definition at line 38 of file qgsrasterrendererregistry.cpp.
References mInstance.
Referenced by QgsRasterLayer::readSymbology(), and QgsRasterLayer::setRendererForDrawingStyle().
|
private |
Definition at line 226 of file qgsrasterrendererregistry.cpp.
References QgsRasterInterface::bandStatistics(), QgsRasterBandStats::Max, QgsRasterBandStats::maximumValue, QgsRasterBandStats::Mean, QgsRasterBandStats::mean, QgsRasterBandStats::Min, QgsRasterBandStats::minimumValue, QgsRasterBandStats::StdDev, and QgsRasterBandStats::stdDev.
Referenced by defaultRendererForDrawingStyle().
bool QgsRasterRendererRegistry::rendererData | ( | const QString & | rendererName, |
QgsRasterRendererRegistryEntry & | data | ||
) | const |
Definition at line 77 of file qgsrasterrendererregistry.cpp.
References mEntries.
QStringList QgsRasterRendererRegistry::renderersList | ( | ) | const |
Definition at line 88 of file qgsrasterrendererregistry.cpp.
References mSortedEntries.
|
private |
Definition at line 72 of file qgsrasterrendererregistry.h.
Referenced by entries(), insert(), insertWidgetFunction(), and rendererData().
|
staticprivate |
Definition at line 71 of file qgsrasterrendererregistry.h.
Referenced by instance().
|
private |
Definition at line 73 of file qgsrasterrendererregistry.h.
Referenced by insert(), and renderersList().