QgsRasterDataProvider Class Reference
[Core]

#include <qgsrasterdataprovider.h>

Inheritance diagram for QgsRasterDataProvider:

Inheritance graph
[legend]
Collaboration diagram for QgsRasterDataProvider:

Collaboration graph
[legend]
List of all members.

Detailed Description

Base class for raster data providers.

Note:
This class has been copied and pasted from QgsVectorDataProvider, and does not yet make sense for Raster layers.

Definition at line 38 of file 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 QString identifyAsText (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.


Member Enumeration Documentation

enum QgsRasterDataProvider::Capability

If you add to this, please also add to capabilitiesString().

Enumerator:
NoCapabilities 
Identify 

Definition at line 46 of file qgsrasterdataprovider.h.


Constructor & Destructor Documentation

QgsRasterDataProvider::QgsRasterDataProvider (  ) 

Definition at line 22 of file qgsrasterdataprovider.cpp.

QgsRasterDataProvider::QgsRasterDataProvider ( QString const &  uri  ) 

Definition at line 27 of file qgsrasterdataprovider.cpp.

virtual QgsRasterDataProvider::~QgsRasterDataProvider (  )  [inline, virtual]

Definition at line 58 of file qgsrasterdataprovider.h.


Member Function Documentation

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.

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

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

virtual QImage* QgsRasterDataProvider::draw ( QgsRectangle const &  viewExtent,
int  pixelWidth,
int  pixelHeight 
) [pure virtual]

Renders the layer as an image.

Referenced by QgsRasterLayer::draw().

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 33 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().

virtual QString QgsRasterDataProvider::identifyAsText ( const QgsPoint point  )  [pure virtual]

Identify details from a server (e.g.

WMS) from the last screen update

Parameters:
point[in] The pixel coordinate (as it was displayed locally on screen)
Returns:
A text document containing the return from the WMS server
Note:
WMS Servers prefer to receive coordinates in image space, therefore this function expects coordinates in that format.

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::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().


The documentation for this class was generated from the following files:
Generated on Wed Jan 7 01:51:27 2009 for Quantum GIS API Documentation by  doxygen 1.5.1