[QGIS Commit] r15808 - in trunk/qgis/src/providers: gdal grass

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Apr 22 10:00:10 EDT 2011


Author: jef
Date: 2011-04-22 07:00:10 -0700 (Fri, 22 Apr 2011)
New Revision: 15808

Modified:
   trunk/qgis/src/providers/gdal/CMakeLists.txt
   trunk/qgis/src/providers/gdal/qgsgdalprovider.h
   trunk/qgis/src/providers/grass/CMakeLists.txt
   trunk/qgis/src/providers/grass/qgsgrassrasterprovider.h
Log:
raster provider: reenable Q_OBJECT and fix comments

Modified: trunk/qgis/src/providers/gdal/CMakeLists.txt
===================================================================
--- trunk/qgis/src/providers/gdal/CMakeLists.txt	2011-04-22 12:41:53 UTC (rev 15807)
+++ trunk/qgis/src/providers/gdal/CMakeLists.txt	2011-04-22 14:00:10 UTC (rev 15808)
@@ -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 @@
 #  ${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

Modified: trunk/qgis/src/providers/gdal/qgsgdalprovider.h
===================================================================
--- trunk/qgis/src/providers/gdal/qgsgdalprovider.h	2011-04-22 12:41:53 UTC (rev 15807)
+++ trunk/qgis/src/providers/gdal/qgsgdalprovider.h	2011-04-22 14:00:10 UTC (rev 15808)
@@ -50,16 +50,15 @@
 
 /**
 
-  \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,33 +126,22 @@
     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
+     * \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
-     *
      * \note  added in 1.5
      */
     QString identifyAsHtml( const QgsPoint& point );
@@ -219,7 +207,7 @@
      */
     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 @@
     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;
 

Modified: trunk/qgis/src/providers/grass/CMakeLists.txt
===================================================================
--- trunk/qgis/src/providers/grass/CMakeLists.txt	2011-04-22 12:41:53 UTC (rev 15807)
+++ trunk/qgis/src/providers/grass/CMakeLists.txt	2011-04-22 14:00:10 UTC (rev 15808)
@@ -26,7 +26,7 @@
 )
 
 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 @@
   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 @@
   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)\"" )

Modified: trunk/qgis/src/providers/grass/qgsgrassrasterprovider.h
===================================================================
--- trunk/qgis/src/providers/grass/qgsgrassrasterprovider.h	2011-04-22 12:41:53 UTC (rev 15807)
+++ trunk/qgis/src/providers/grass/qgsgrassrasterprovider.h	2011-04-22 14:00:10 UTC (rev 15808)
@@ -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 @@
 #include <QDomElement>
 #include <QMap>
 #include <QVector>
+#include <QTemporaryFile>
+#include <QProcess>
+#include <QHash>
 
 class QgsCoordinateTransform;
 
@@ -63,7 +66,7 @@
 };
 /**
 
-  \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 QgsGrassRasterProvider : public QgsRasterDataProvider
 {
-    //Q_OBJECT
+    Q_OBJECT
 
   public:
     /**
@@ -140,33 +143,21 @@
     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
+     * \return  A text document containing the return from the GRASS 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
-     *
      * \note  added in 1.5
      */
     QString identifyAsHtml( const QgsPoint& point );
@@ -230,7 +221,7 @@
      */
     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 @@
   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 @@
 };
 
 #endif
-



More information about the QGIS-commit mailing list