QGIS API Documentation
2.0.1-Dufour
|
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 = 0 |
Registry for raster renderers.
Definition at line 51 of file qgsrasterrendererregistry.h.
QgsRasterRendererRegistry::~QgsRasterRendererRegistry | ( | ) |
Definition at line 63 of file qgsrasterrendererregistry.cpp.
|
protected |
Definition at line 49 of file qgsrasterrendererregistry.cpp.
References QgsSingleBandColorDataRenderer::create(), QgsSingleBandPseudoColorRenderer::create(), QgsPalettedRasterRenderer::create(), QgsMultiBandColorRenderer::create(), QgsSingleBandGrayRenderer::create(), insert(), and tr.
Referenced by instance().
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 110 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 98 of file qgsrasterrendererregistry.cpp.
References mEntries.
void QgsRasterRendererRegistry::insert | ( | QgsRasterRendererRegistryEntry | entry | ) |
Definition at line 67 of file qgsrasterrendererregistry.cpp.
References mEntries, mSortedEntries, and QgsRasterRendererRegistryEntry::name.
Referenced by QgsRasterRendererRegistry().
void QgsRasterRendererRegistry::insertWidgetFunction | ( | const QString & | rendererName, |
QgsRasterRendererWidgetCreateFunc | func | ||
) |
Definition at line 73 of file qgsrasterrendererregistry.cpp.
References mEntries.
|
static |
Definition at line 40 of file qgsrasterrendererregistry.cpp.
References mInstance, and QgsRasterRendererRegistry().
Referenced by QgsRasterLayer::readSymbology(), and QgsRasterLayer::setRendererForDrawingStyle().
|
private |
Definition at line 223 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 82 of file qgsrasterrendererregistry.cpp.
References mEntries.
QStringList QgsRasterRendererRegistry::renderersList | ( | ) | const |
Definition at line 93 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().