Skip to content

Commit d5070a1

Browse files
author
jef
committedApr 22, 2011
raster provider: reenable Q_OBJECT and fix comments
git-svn-id: http://svn.osgeo.org/qgis/trunk@15808 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 3aac686 commit d5070a1

File tree

4 files changed

+30
-53
lines changed

4 files changed

+30
-53
lines changed
 

‎src/providers/gdal/CMakeLists.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
21
SET(GDAL_SRCS qgsgdalprovider.cpp)
3-
SET (GDAL_MOC_HDRS qgsgdalprovider.h)
2+
SET(GDAL_MOC_HDRS qgsgdalprovider.h)
43

54
INCLUDE_DIRECTORIES (
65
../../core
@@ -10,9 +9,8 @@ INCLUDE_DIRECTORIES (
109
# ${GEOS_INCLUDE_DIR}
1110
)
1211

13-
#QT4_WRAP_CPP(GDAL_MOC_SRCS ${GDAL_MOC_HDRS})
14-
#ADD_LIBRARY (gdalprovider MODULE ${GDAL_SRCS} ${GDAL_MOC_SRCS})
15-
ADD_LIBRARY (gdalprovider MODULE ${GDAL_SRCS} )
12+
QT4_WRAP_CPP(GDAL_MOC_SRCS ${GDAL_MOC_HDRS})
13+
ADD_LIBRARY (gdalprovider MODULE ${GDAL_SRCS} ${GDAL_MOC_SRCS})
1614

1715
TARGET_LINK_LIBRARIES (gdalprovider
1816
qgis_core

‎src/providers/gdal/qgsgdalprovider.h

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,15 @@ class QgsCoordinateTransform;
5050

5151
/**
5252
53-
\brief Data provider for OGC WMS layers.
53+
\brief Data provider for GDAL layers.
5454
55-
This provider implements the
56-
interface defined in the QgsDataProvider class to provide access to spatial
57-
data residing in a OGC Web Map Service.
55+
This provider implements the interface defined in the QgsDataProvider class
56+
to provide access to spatial data residing in a GDAL layers.
5857
5958
*/
6059
class QgsGdalProvider : public QgsRasterDataProvider
6160
{
62-
//Q_OBJECT
61+
Q_OBJECT
6362

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

129128
/**
130-
* \brief Identify details from a WMS Server from the last screen update
129+
* \brief Identify details from a GDAL layer from the last screen update
131130
*
132131
* \param point[in] The pixel coordinate (as it was displayed locally on screen)
133132
*
134-
* \return A text document containing the return from the WMS server
133+
* \return A text document containing the return from the GDAL layer
135134
*
136-
* \note WMS Servers prefer to receive coordinates in image space, therefore
137-
* this function expects coordinates in that format.
138-
*
139-
* \note The arbitraryness of the returned document is enforced by WMS standards
140-
* up to at least v1.3.0
141135
*/
142136
QString identifyAsText( const QgsPoint& point );
143137

144138
/**
145-
* \brief Identify details from a WMS Server from the last screen update
139+
* \brief Identify details from a GDAL layer from the last screen update
146140
*
147141
* \param point[in] The pixel coordinate (as it was displayed locally on screen)
148142
*
149-
* \return A text document containing the return from the WMS server
150-
*
151-
* \note WMS Servers prefer to receive coordinates in image space, therefore
152-
* this function expects coordinates in that format.
153-
*
154-
* \note The arbitraryness of the returned document is enforced by WMS standards
155-
* up to at least v1.3.0
143+
* \return A text document containing the return from the GDAL layer
156144
*
157145
* \note added in 1.5
158146
*/
@@ -219,7 +207,7 @@ class QgsGdalProvider : public QgsRasterDataProvider
219207
*/
220208
QString metadata();
221209

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

257245
/**
258-
* Flag indicating if the layer data source is a valid WMS layer
246+
* Flag indicating if the layer data source is a valid layer
259247
*/
260248
bool mValid;
261249

‎src/providers/grass/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ INCLUDE_DIRECTORIES (
2626
)
2727

2828
QT4_WRAP_CPP(GRASS_MOC_SRCS qgsgrassprovider.h)
29-
ADD_LIBRARY (qgisgrass SHARED ${GRASS_LIB_SRCS} ${GRASS_MOC_SRCS})
29+
ADD_LIBRARY (qgisgrass SHARED ${GRASS_LIB_SRCS})
3030

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

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

52-
ADD_LIBRARY (grassprovider MODULE ${GRASS_PROVIDER_SRCS})
52+
ADD_LIBRARY (grassprovider MODULE ${GRASS_PROVIDER_SRCS} ${GRASS_MOC_SRCS})
5353

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

64-
ADD_LIBRARY (grassrasterprovider MODULE ${GRASS_RASTER_PROVIDER_SRCS})
64+
QT4_WRAP_CPP(GRASS_MOC_RASTERSRCS qgsgrassrasterprovider.h)
65+
ADD_LIBRARY (grassrasterprovider MODULE ${GRASS_RASTER_PROVIDER_SRCS} ${GRASS_MOC_RASTERSRCS})
6566

6667
IF (WIN32)
6768
SET_TARGET_PROPERTIES(grassrasterprovider PROPERTIES COMPILE_FLAGS "\"-DGRASS_EXPORT=__declspec(dllimport)\"" )

‎src/providers/grass/qgsgrassrasterprovider.h

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

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

21-
#ifndef QGSWMSPROVIDER_H
22-
#define QGSWMSPROVIDER_H
21+
#ifndef QGSGRASSRASTERPROVIDER_H
22+
#define QGSGRASSRASTERPROVIDER_H
2323

2424
extern "C"
2525
{
@@ -36,6 +36,9 @@ extern "C"
3636
#include <QDomElement>
3737
#include <QMap>
3838
#include <QVector>
39+
#include <QTemporaryFile>
40+
#include <QProcess>
41+
#include <QHash>
3942

4043
class QgsCoordinateTransform;
4144

@@ -63,7 +66,7 @@ class QgsGrassRasterValue
6366
};
6467
/**
6568
66-
\brief Data provider for OGC WMS layers.
69+
\brief Data provider for GRASS raster layers.
6770
6871
This provider implements the
6972
interface defined in the QgsDataProvider class to provide access to spatial
@@ -72,7 +75,7 @@ class QgsGrassRasterValue
7275
*/
7376
class QgsGrassRasterProvider : public QgsRasterDataProvider
7477
{
75-
//Q_OBJECT
78+
Q_OBJECT
7679

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

142145
/**
143-
* \brief Identify details from a WMS Server from the last screen update
146+
* \brief Identify details from a GRASS layer from the last screen update
144147
*
145148
* \param point[in] The pixel coordinate (as it was displayed locally on screen)
146149
*
147-
* \return A text document containing the return from the WMS server
148-
*
149-
* \note WMS Servers prefer to receive coordinates in image space, therefore
150-
* this function expects coordinates in that format.
151-
*
152-
* \note The arbitraryness of the returned document is enforced by WMS standards
153-
* up to at least v1.3.0
150+
* \return A text document containing the return from the GRASS layer
154151
*/
155152
QString identifyAsText( const QgsPoint& point );
156153

157154
/**
158-
* \brief Identify details from a WMS Server from the last screen update
155+
* \brief Identify details from a GRASS layer from the last screen update
159156
*
160157
* \param point[in] The pixel coordinate (as it was displayed locally on screen)
161158
*
162-
* \return A text document containing the return from the WMS server
163-
*
164-
* \note WMS Servers prefer to receive coordinates in image space, therefore
165-
* this function expects coordinates in that format.
166-
*
167-
* \note The arbitraryness of the returned document is enforced by WMS standards
168-
* up to at least v1.3.0
159+
* \return A text document containing the return from the GRASS layer
169160
*
170161
* \note added in 1.5
171162
*/
@@ -230,7 +221,7 @@ class QgsGrassRasterProvider : public QgsRasterDataProvider
230221
*/
231222
QString metadata();
232223

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

250241
/**
251-
* Flag indicating if the layer data source is a valid WMS layer
242+
* Flag indicating if the layer data source is a valid layer
252243
*/
253244
bool mValid;
254245

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

273264
#endif
274-

0 commit comments

Comments
 (0)
Please sign in to comment.