#include <qgsrasterdataprovider.h>
Public Types | |
enum | Capability { NoCapabilities = 0, Identify = 1 } |
If you add to this, please also add to capabilitiesString(). More... | |
Public Member Functions | |
QgsRasterDataProvider () | |
QgsRasterDataProvider (QString const &uri) | |
virtual | ~QgsRasterDataProvider () |
virtual void | addLayers (QStringList const &layers, QStringList const &styles=QStringList())=0 |
Add the list of WMS layer names to be rendered by this server. | |
virtual QStringList | supportedImageEncodings ()=0 |
get raster image encodings supported by (e.g.) the WMS Server, expressed as MIME types | |
virtual QString | imageEncoding () const =0 |
Get the image encoding (as a MIME type) used in the transfer from (e.g. | |
virtual void | setImageEncoding (QString const &mimeType)=0 |
Set the image encoding (as a MIME type) used in the transfer from (e.g. | |
virtual void | setImageCrs (QString const &crs)=0 |
Set the image projection (in WMS CRS format) used in the transfer from (e.g. | |
virtual QImage * | draw (QgsRectangle const &viewExtent, int pixelWidth, int pixelHeight)=0 |
Renders the layer as an image. | |
virtual int | capabilities () const |
Returns a bitmask containing the supported capabilities Note, some capabilities may change depending on whether a spatial filter is active on this provider, so it may be prudent to check this value per intended operation. | |
QString | capabilitiesString () const |
Returns the above in friendly format. | |
virtual QString | metadata ()=0 |
Get metadata in a format suitable for feeding directly into a subset of the GUI raster properties "Metadata" tab. | |
virtual bool | identify (const QgsPoint &point, QMap< QString, QString > &results) |
Identify raster value(s) found on the point position. | |
virtual QString | identifyAsText (const QgsPoint &point)=0 |
Identify details from a server (e.g. | |
virtual QString | identifyAsHtml (const QgsPoint &point)=0 |
Identify details from a server (e.g. | |
virtual QString | lastErrorTitle ()=0 |
Returns the caption error text for the last error in this provider. | |
virtual QString | lastError ()=0 |
Returns the verbose error text for the last error in this provider. | |
virtual QString | lastErrorFormat () |
Returns the format of the error text for the last error in this provider. | |
int | dpi () const |
Returns the dpi of the output device. | |
void | setDpi (int dpi) |
Sets the output device resolution. | |
Protected Attributes | |
int | mDpi |
Dots per intch. |
Definition at line 38 of file qgsrasterdataprovider.h.
If you add to this, please also add to capabilitiesString().
Definition at line 46 of file qgsrasterdataprovider.h.
QgsRasterDataProvider::QgsRasterDataProvider | ( | ) |
Definition at line 24 of file qgsrasterdataprovider.cpp.
QgsRasterDataProvider::QgsRasterDataProvider | ( | QString const & | uri | ) |
Definition at line 28 of file qgsrasterdataprovider.cpp.
virtual QgsRasterDataProvider::~QgsRasterDataProvider | ( | ) | [inline, virtual] |
Definition at line 58 of file qgsrasterdataprovider.h.
virtual void QgsRasterDataProvider::addLayers | ( | QStringList const & | layers, | |
QStringList const & | styles = QStringList() | |||
) | [pure virtual] |
Add the list of WMS layer names to be rendered by this server.
Referenced by QgsRasterLayer::setDataProvider().
virtual QStringList QgsRasterDataProvider::supportedImageEncodings | ( | ) | [pure virtual] |
get raster image encodings supported by (e.g.) the WMS Server, expressed as MIME types
virtual QString QgsRasterDataProvider::imageEncoding | ( | ) | const [pure virtual] |
Get the image encoding (as a MIME type) used in the transfer from (e.g.
) the WMS server
Referenced by QgsRasterLayer::writeSymbology().
virtual void QgsRasterDataProvider::setImageEncoding | ( | QString const & | mimeType | ) | [pure virtual] |
Set the image encoding (as a MIME type) used in the transfer from (e.g.
) the WMS server
Referenced by QgsRasterLayer::setDataProvider().
virtual void QgsRasterDataProvider::setImageCrs | ( | QString const & | crs | ) | [pure virtual] |
Set the image projection (in WMS CRS format) used in the transfer from (e.g.
) the WMS server
Referenced by QgsRasterLayer::setDataProvider().
virtual QImage* QgsRasterDataProvider::draw | ( | QgsRectangle const & | viewExtent, | |
int | pixelWidth, | |||
int | pixelHeight | |||
) | [pure virtual] |
virtual int QgsRasterDataProvider::capabilities | ( | ) | const [inline, virtual] |
Returns a bitmask containing the supported capabilities Note, some capabilities may change depending on whether a spatial filter is active on this provider, so it may be prudent to check this value per intended operation.
Definition at line 96 of file qgsrasterdataprovider.h.
References NoCapabilities.
Referenced by capabilitiesString().
QString QgsRasterDataProvider::capabilitiesString | ( | ) | const |
Returns the above in friendly format.
Definition at line 34 of file qgsrasterdataprovider.cpp.
References capabilities(), Identify, and QgsDebugMsg.
virtual QString QgsRasterDataProvider::metadata | ( | ) | [pure virtual] |
Get metadata in a format suitable for feeding directly into a subset of the GUI raster properties "Metadata" tab.
Referenced by QgsRasterLayer::metadata().
bool QgsRasterDataProvider::identify | ( | const QgsPoint & | point, | |
QMap< QString, QString > & | results | |||
) | [virtual] |
Identify raster value(s) found on the point position.
Definition at line 49 of file qgsrasterdataprovider.cpp.
Referenced by QgsRasterLayer::identify().
virtual QString QgsRasterDataProvider::identifyAsText | ( | const QgsPoint & | point | ) | [pure virtual] |
Identify details from a server (e.g.
WMS) from the last screen update
[in] | point | The pixel coordinate (as it was displayed locally on screen) |
The arbitraryness of the returned document is enforced by WMS standards up to at least v1.3.0
Referenced by QgsRasterLayer::identifyAsText().
virtual QString QgsRasterDataProvider::identifyAsHtml | ( | const QgsPoint & | point | ) | [pure virtual] |
Identify details from a server (e.g.
WMS) from the last screen update
[in] | point | The pixel coordinate (as it was displayed locally on screen) |
The arbitraryness of the returned document is enforced by WMS standards up to at least v1.3.0
added in 1.5
Referenced by QgsRasterLayer::identifyAsHtml().
virtual QString QgsRasterDataProvider::lastErrorTitle | ( | ) | [pure virtual] |
Returns the caption error text for the last error in this provider.
If an operation returns 0 (e.g. draw()), this function returns the text of the error associated with the failure. Interactive users of this provider can then, for example, call a QMessageBox to display the contents.
Referenced by QgsRasterLayer::draw().
virtual QString QgsRasterDataProvider::lastError | ( | ) | [pure virtual] |
Returns the verbose error text for the last error in this provider.
If an operation returns 0 (e.g. draw()), this function returns the text of the error associated with the failure. Interactive users of this provider can then, for example, call a QMessageBox to display the contents.
Referenced by QgsRasterLayer::draw().
QString QgsRasterDataProvider::lastErrorFormat | ( | ) | [virtual] |
Returns the format of the error text for the last error in this provider.
Definition at line 55 of file qgsrasterdataprovider.cpp.
int QgsRasterDataProvider::dpi | ( | ) | const [inline] |
Returns the dpi of the output device.
Definition at line 185 of file qgsrasterdataprovider.h.
void QgsRasterDataProvider::setDpi | ( | int | dpi | ) | [inline] |
Sets the output device resolution.
Definition at line 189 of file qgsrasterdataprovider.h.
Referenced by QgsRasterLayer::draw().
int QgsRasterDataProvider::mDpi [protected] |
Dots per intch.
Extended WMS (e.g. QGIS mapserver) support DPI dependent output and therefore are suited for printing. A value of -1 means it has not been set
Definition at line 196 of file qgsrasterdataprovider.h.