Skip to content

Commit 44da573

Browse files
committed
replace class by namespace
1 parent a868f0b commit 44da573

File tree

2 files changed

+43
-47
lines changed

2 files changed

+43
-47
lines changed

python/server/qgsserverprojectutils.sip

+11-14
Original file line numberDiff line numberDiff line change
@@ -15,47 +15,44 @@
1515
* *
1616
***************************************************************************/
1717

18+
%ModuleHeaderCode
19+
#include "qgsserverprojectutils.h"
20+
%End
1821

1922
/** \ingroup server
20-
* The QgsServerProjectUtils class provides a way to retrieve specific entries
21-
* from a QgsProject.
23+
* The QgsServerProjectUtils namespace provides a way to retrieve specific
24+
* entries from a QgsProject.
2225
* @note added in QGIS 3.0
2326
*/
24-
class QgsServerProjectUtils
27+
namespace QgsServerProjectUtils
2528
{
26-
%TypeHeaderCode
27-
#include "qgsserverprojectutils.h"
28-
%End
29-
30-
public:
31-
3229
/** Returns the maximum width for WMS images defined in a QGIS project.
3330
* @param project the QGIS project
3431
* @return width if defined in project, -1 otherwise.
3532
*/
36-
static int wmsMaxWidth( const QgsProject& project );
33+
int wmsMaxWidth( const QgsProject& project );
3734

3835
/** Returns the maximum height for WMS images defined in a QGIS project.
3936
* @param project the QGIS project
4037
* @return height if defined in project, -1 otherwise.
4138
*/
42-
static int wmsMaxHeight( const QgsProject& project );
39+
int wmsMaxHeight( const QgsProject& project );
4340

4441
/** Returns the WMS service url defined in a QGIS project.
4542
* @param project the QGIS project
4643
* @return url if defined in project, an empty string otherwise.
4744
*/
48-
static QString wmsServiceUrl( const QgsProject& project );
45+
QString wmsServiceUrl( const QgsProject& project );
4946

5047
/** Returns the WFS service url defined in a QGIS project.
5148
* @param project the QGIS project
5249
* @return url if defined in project, an empty string otherwise.
5350
*/
54-
static QString wfsServiceUrl( const QgsProject& project );
51+
QString wfsServiceUrl( const QgsProject& project );
5552

5653
/** Returns the WCS service url defined in a QGIS project.
5754
* @param project the QGIS project
5855
* @return url if defined in project, an empty string otherwise.
5956
*/
60-
static QString wcsServiceUrl( const QgsProject& project );
57+
QString wcsServiceUrl( const QgsProject& project );
6158
};

src/server/qgsserverprojectutils.h

+32-33
Original file line numberDiff line numberDiff line change
@@ -22,43 +22,42 @@
2222
#include "qgsproject.h"
2323

2424
/** \ingroup server
25-
* The QgsServerProjectUtils class provides a way to retrieve specific entries
26-
* from a QgsProject.
25+
* The QgsServerProjectUtils namespace provides a way to retrieve specific
26+
* entries from a QgsProject.
2727
* @note added in QGIS 3.0
2828
*/
29-
class SERVER_EXPORT QgsServerProjectUtils
29+
namespace SERVER_EXPORT QgsServerProjectUtils
3030
{
31-
public:
3231

33-
/** Returns the maximum width for WMS images defined in a QGIS project.
34-
* @param project the QGIS project
35-
* @return width if defined in project, -1 otherwise.
36-
*/
37-
static int wmsMaxWidth( const QgsProject& project );
38-
39-
/** Returns the maximum height for WMS images defined in a QGIS project.
40-
* @param project the QGIS project
41-
* @return height if defined in project, -1 otherwise.
42-
*/
43-
static int wmsMaxHeight( const QgsProject& project );
44-
45-
/** Returns the WMS service url defined in a QGIS project.
46-
* @param project the QGIS project
47-
* @return url if defined in project, an empty string otherwise.
48-
*/
49-
static QString wmsServiceUrl( const QgsProject& project );
50-
51-
/** Returns the WFS service url defined in a QGIS project.
52-
* @param project the QGIS project
53-
* @return url if defined in project, an empty string otherwise.
54-
*/
55-
static QString wfsServiceUrl( const QgsProject& project );
56-
57-
/** Returns the WCS service url defined in a QGIS project.
58-
* @param project the QGIS project
59-
* @return url if defined in project, an empty string otherwise.
60-
*/
61-
static QString wcsServiceUrl( const QgsProject& project );
32+
/** Returns the maximum width for WMS images defined in a QGIS project.
33+
* @param project the QGIS project
34+
* @return width if defined in project, -1 otherwise.
35+
*/
36+
int wmsMaxWidth( const QgsProject& project );
37+
38+
/** Returns the maximum height for WMS images defined in a QGIS project.
39+
* @param project the QGIS project
40+
* @return height if defined in project, -1 otherwise.
41+
*/
42+
int wmsMaxHeight( const QgsProject& project );
43+
44+
/** Returns the WMS service url defined in a QGIS project.
45+
* @param project the QGIS project
46+
* @return url if defined in project, an empty string otherwise.
47+
*/
48+
QString wmsServiceUrl( const QgsProject& project );
49+
50+
/** Returns the WFS service url defined in a QGIS project.
51+
* @param project the QGIS project
52+
* @return url if defined in project, an empty string otherwise.
53+
*/
54+
QString wfsServiceUrl( const QgsProject& project );
55+
56+
/** Returns the WCS service url defined in a QGIS project.
57+
* @param project the QGIS project
58+
* @return url if defined in project, an empty string otherwise.
59+
*/
60+
QString wcsServiceUrl( const QgsProject& project );
6261
};
6362

6463
#endif

0 commit comments

Comments
 (0)