Skip to content

Commit

Permalink
raster provider: reenable Q_OBJECT and fix comments
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@15808 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Apr 22, 2011
1 parent 3aac686 commit d5070a1
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 53 deletions.
8 changes: 3 additions & 5 deletions src/providers/gdal/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

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

INCLUDE_DIRECTORIES (
../../core
Expand All @@ -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
Expand Down
32 changes: 10 additions & 22 deletions src/providers/gdal/qgsgdalprovider.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
/**
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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(); }
Expand Down Expand Up @@ -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;

Expand Down
7 changes: 4 additions & 3 deletions src/providers/grass/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})

Expand All @@ -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)\"" )
Expand All @@ -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)\"" )
Expand Down
36 changes: 13 additions & 23 deletions src/providers/grass/qgsgrassrasterprovider.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
{
Expand All @@ -36,6 +36,9 @@ extern "C"
#include <QDomElement>
#include <QMap>
#include <QVector>
#include <QTemporaryFile>
#include <QProcess>
#include <QHash>

class QgsCoordinateTransform;

Expand Down Expand Up @@ -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
Expand All @@ -72,7 +75,7 @@ class QgsGrassRasterValue
*/
class QgsGrassRasterProvider : public QgsRasterDataProvider
{
//Q_OBJECT
Q_OBJECT

public:
/**
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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(); }
Expand All @@ -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;

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

#endif

0 comments on commit d5070a1

Please sign in to comment.