Skip to content

Commit 5c8360d

Browse files
committedJan 30, 2017
[server] WIP clean project parsing by using QgsProject
1 parent 8ba609e commit 5c8360d

File tree

72 files changed

+7613
-387
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+7613
-387
lines changed
 

‎python/server/qgsserverprojectparser.sip

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,6 @@ class QgsServerProjectParser
8686
@return name or a null string in case of error*/
8787
QString layerName( const QDomElement& layerElem ) const;
8888

89-
QString serviceUrl() const;
90-
QString wfsServiceUrl() const;
91-
QString wcsServiceUrl() const;
92-
9389
QStringList wfsLayers() const;
9490
QStringList wcsLayers() const;
9591

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/***************************************************************************
2+
qgsserverprojectutils.sip
3+
-------------------------
4+
begin : December 19, 2016
5+
copyright : (C) 2016 by Paul Blottiere
6+
email : paul dot blottiere at oslandia dot com
7+
***************************************************************************/
8+
9+
/***************************************************************************
10+
* *
11+
* This program is free software; you can redistribute it and/or modify *
12+
* it under the terms of the GNU General Public License as published by *
13+
* the Free Software Foundation; either version 2 of the License, or *
14+
* (at your option) any later version. *
15+
* *
16+
***************************************************************************/
17+
18+
19+
/** \ingroup server
20+
* The QgsServerProjectUtils class provides a way to retrieve specific entries
21+
* a QgsProject.
22+
* @note added in QGIS 3.0
23+
*/
24+
class QgsServerProjectUtils
25+
{
26+
%TypeHeaderCode
27+
#include "qgsserverprojectutils.h"
28+
%End
29+
30+
public:
31+
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+
static 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+
static 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+
static 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+
static 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+
static QString wcsServiceUrl( const QgsProject& project );
61+
};

0 commit comments

Comments
 (0)