Skip to content
Permalink
Browse files
raster provider: reenable Q_OBJECT and fix comments
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15808 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Apr 22, 2011
1 parent 5cb4f6e commit 04360f505725570f1acdc496c48bc253798dbaa3
Showing with 30 additions and 53 deletions.
  1. +3 −5 src/providers/gdal/CMakeLists.txt
  2. +10 −22 src/providers/gdal/qgsgdalprovider.h
  3. +4 −3 src/providers/grass/CMakeLists.txt
  4. +13 −23 src/providers/grass/qgsgrassrasterprovider.h
@@ -1,6 +1,5 @@

SET(GDAL_SRCS qgsgdalprovider.cpp)
SET (GDAL_MOC_HDRS qgsgdalprovider.h)
SET(GDAL_MOC_HDRS qgsgdalprovider.h)

INCLUDE_DIRECTORIES (
../../core
@@ -10,9 +9,8 @@ INCLUDE_DIRECTORIES (
# ${GEOS_INCLUDE_DIR}
)

#QT4_WRAP_CPP(GDAL_MOC_SRCS ${GDAL_MOC_HDRS})
#ADD_LIBRARY (gdalprovider MODULE ${GDAL_SRCS} ${GDAL_MOC_SRCS})
ADD_LIBRARY (gdalprovider MODULE ${GDAL_SRCS} )
QT4_WRAP_CPP(GDAL_MOC_SRCS ${GDAL_MOC_HDRS})
ADD_LIBRARY (gdalprovider MODULE ${GDAL_SRCS} ${GDAL_MOC_SRCS})

TARGET_LINK_LIBRARIES (gdalprovider
qgis_core
@@ -50,16 +50,15 @@ class QgsCoordinateTransform;

/**
\brief Data provider for OGC WMS layers.
\brief Data provider for GDAL layers.
This provider implements the
interface defined in the QgsDataProvider class to provide access to spatial
data residing in a OGC Web Map Service.
This provider implements the interface defined in the QgsDataProvider class
to provide access to spatial data residing in a GDAL layers.
*/
class QgsGdalProvider : public QgsRasterDataProvider
{
//Q_OBJECT
Q_OBJECT

public:
/**
@@ -127,32 +126,21 @@ class QgsGdalProvider : public QgsRasterDataProvider
bool identify( const QgsPoint & point, QMap<QString, QString>& results );

/**
* \brief Identify details from a WMS Server from the last screen update
* \brief Identify details from a GDAL layer from the last screen update
*
* \param point[in] The pixel coordinate (as it was displayed locally on screen)
*
* \return A text document containing the return from the WMS server
* \return A text document containing the return from the GDAL layer
*
* \note WMS Servers prefer to receive coordinates in image space, therefore
* this function expects coordinates in that format.
*
* \note The arbitraryness of the returned document is enforced by WMS standards
* up to at least v1.3.0
*/
QString identifyAsText( const QgsPoint& point );

/**
* \brief Identify details from a WMS Server from the last screen update
* \brief Identify details from a GDAL layer from the last screen update
*
* \param point[in] The pixel coordinate (as it was displayed locally on screen)
*
* \return 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.
*
* \note The arbitraryness of the returned document is enforced by WMS standards
* up to at least v1.3.0
* \return A text document containing the return from the GDAL layer
*
* \note added in 1.5
*/
@@ -219,7 +207,7 @@ class QgsGdalProvider : public QgsRasterDataProvider
*/
QString metadata();

// Following methods specific for WMS are not used at all in this provider and should be removed IMO from qgsdataprovider.h
// Following methods specific for WMS are not used at all in this provider and should be removed IMO from qgsdataprovider.h
void addLayers( QStringList const & layers, QStringList const & styles = QStringList() ) {}
QStringList supportedImageEncodings() { return QStringList();}
QString imageEncoding() const { return QString(); }
@@ -255,7 +243,7 @@ class QgsGdalProvider : public QgsRasterDataProvider
bool crsFromWkt( const char *wkt );

/**
* Flag indicating if the layer data source is a valid WMS layer
* Flag indicating if the layer data source is a valid layer
*/
bool mValid;

@@ -26,7 +26,7 @@ INCLUDE_DIRECTORIES (
)

QT4_WRAP_CPP(GRASS_MOC_SRCS qgsgrassprovider.h)
ADD_LIBRARY (qgisgrass SHARED ${GRASS_LIB_SRCS} ${GRASS_MOC_SRCS})
ADD_LIBRARY (qgisgrass SHARED ${GRASS_LIB_SRCS})

SET_TARGET_PROPERTIES(qgisgrass PROPERTIES VERSION ${COMPLETE_VERSION} SOVERSION ${COMPLETE_VERSION})

@@ -49,7 +49,7 @@ IF (APPLE)
SET_TARGET_PROPERTIES(qgisgrass PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE )
ENDIF (APPLE)

ADD_LIBRARY (grassprovider MODULE ${GRASS_PROVIDER_SRCS})
ADD_LIBRARY (grassprovider MODULE ${GRASS_PROVIDER_SRCS} ${GRASS_MOC_SRCS})

IF (WIN32)
SET_TARGET_PROPERTIES(grassprovider PROPERTIES COMPILE_FLAGS "\"-DGRASS_EXPORT=__declspec(dllimport)\"" )
@@ -61,7 +61,8 @@ TARGET_LINK_LIBRARIES (grassprovider
qgisgrass
)

ADD_LIBRARY (grassrasterprovider MODULE ${GRASS_RASTER_PROVIDER_SRCS})
QT4_WRAP_CPP(GRASS_MOC_RASTERSRCS qgsgrassrasterprovider.h)
ADD_LIBRARY (grassrasterprovider MODULE ${GRASS_RASTER_PROVIDER_SRCS} ${GRASS_MOC_RASTERSRCS})

IF (WIN32)
SET_TARGET_PROPERTIES(grassrasterprovider PROPERTIES COMPILE_FLAGS "\"-DGRASS_EXPORT=__declspec(dllimport)\"" )
@@ -18,8 +18,8 @@

/* $Id: qgsgrassrasterprovider.h 12528 2009-12-20 12:29:07Z jef $ */

#ifndef QGSWMSPROVIDER_H
#define QGSWMSPROVIDER_H
#ifndef QGSGRASSRASTERPROVIDER_H
#define QGSGRASSRASTERPROVIDER_H

extern "C"
{
@@ -36,6 +36,9 @@ extern "C"
#include <QDomElement>
#include <QMap>
#include <QVector>
#include <QTemporaryFile>
#include <QProcess>
#include <QHash>

class QgsCoordinateTransform;

@@ -63,7 +66,7 @@ class QgsGrassRasterValue
};
/**
\brief Data provider for OGC WMS layers.
\brief Data provider for GRASS raster layers.
This provider implements the
interface defined in the QgsDataProvider class to provide access to spatial
@@ -72,7 +75,7 @@ class QgsGrassRasterValue
*/
class QgsGrassRasterProvider : public QgsRasterDataProvider
{
//Q_OBJECT
Q_OBJECT

public:
/**
@@ -140,32 +143,20 @@ class QgsGrassRasterProvider : public QgsRasterDataProvider
bool identify( const QgsPoint & point, QMap<QString, QString>& results );

/**
* \brief Identify details from a WMS Server from the last screen update
* \brief Identify details from a GRASS layer from the last screen update
*
* \param point[in] The pixel coordinate (as it was displayed locally on screen)
*
* \return 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.
*
* \note The arbitraryness of the returned document is enforced by WMS standards
* up to at least v1.3.0
* \return A text document containing the return from the GRASS layer
*/
QString identifyAsText( const QgsPoint& point );

/**
* \brief Identify details from a WMS Server from the last screen update
* \brief Identify details from a GRASS layer from the last screen update
*
* \param point[in] The pixel coordinate (as it was displayed locally on screen)
*
* \return 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.
*
* \note The arbitraryness of the returned document is enforced by WMS standards
* up to at least v1.3.0
* \return A text document containing the return from the GRASS layer
*
* \note added in 1.5
*/
@@ -230,7 +221,7 @@ class QgsGrassRasterProvider : public QgsRasterDataProvider
*/
QString metadata();

// Following methods specific for WMS are not used at all in this provider and should be removed IMO from qgsdataprovider.h
// Following methods specific for are not used at all in this provider and should be removed IMO from qgsdataprovider.h
void addLayers( QStringList const & layers, QStringList const & styles = QStringList() ) {}
QStringList supportedImageEncodings() { return QStringList();}
QString imageEncoding() const { return QString(); }
@@ -248,7 +239,7 @@ class QgsGrassRasterProvider : public QgsRasterDataProvider
private:

/**
* Flag indicating if the layer data source is a valid WMS layer
* Flag indicating if the layer data source is a valid layer
*/
bool mValid;

@@ -271,4 +262,3 @@ class QgsGrassRasterProvider : public QgsRasterDataProvider
};

#endif

0 comments on commit 04360f5

Please sign in to comment.