Skip to content

Commit

Permalink
replace class by namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Jan 30, 2017
1 parent a868f0b commit 44da573
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 47 deletions.
25 changes: 11 additions & 14 deletions python/server/qgsserverprojectutils.sip
Expand Up @@ -15,47 +15,44 @@
* *
***************************************************************************/

%ModuleHeaderCode
#include "qgsserverprojectutils.h"
%End

/** \ingroup server
* The QgsServerProjectUtils class provides a way to retrieve specific entries
* from a QgsProject.
* The QgsServerProjectUtils namespace provides a way to retrieve specific
* entries from a QgsProject.
* @note added in QGIS 3.0
*/
class QgsServerProjectUtils
namespace QgsServerProjectUtils
{
%TypeHeaderCode
#include "qgsserverprojectutils.h"
%End

public:

/** Returns the maximum width for WMS images defined in a QGIS project.
* @param project the QGIS project
* @return width if defined in project, -1 otherwise.
*/
static int wmsMaxWidth( const QgsProject& project );
int wmsMaxWidth( const QgsProject& project );

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

/** Returns the WMS service url defined in a QGIS project.
* @param project the QGIS project
* @return url if defined in project, an empty string otherwise.
*/
static QString wmsServiceUrl( const QgsProject& project );
QString wmsServiceUrl( const QgsProject& project );

/** Returns the WFS service url defined in a QGIS project.
* @param project the QGIS project
* @return url if defined in project, an empty string otherwise.
*/
static QString wfsServiceUrl( const QgsProject& project );
QString wfsServiceUrl( const QgsProject& project );

/** Returns the WCS service url defined in a QGIS project.
* @param project the QGIS project
* @return url if defined in project, an empty string otherwise.
*/
static QString wcsServiceUrl( const QgsProject& project );
QString wcsServiceUrl( const QgsProject& project );
};
65 changes: 32 additions & 33 deletions src/server/qgsserverprojectutils.h
Expand Up @@ -22,43 +22,42 @@
#include "qgsproject.h"

/** \ingroup server
* The QgsServerProjectUtils class provides a way to retrieve specific entries
* from a QgsProject.
* The QgsServerProjectUtils namespace provides a way to retrieve specific
* entries from a QgsProject.
* @note added in QGIS 3.0
*/
class SERVER_EXPORT QgsServerProjectUtils
namespace SERVER_EXPORT QgsServerProjectUtils
{
public:

/** Returns the maximum width for WMS images defined in a QGIS project.
* @param project the QGIS project
* @return width if defined in project, -1 otherwise.
*/
static int wmsMaxWidth( const QgsProject& project );

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

/** Returns the WMS service url defined in a QGIS project.
* @param project the QGIS project
* @return url if defined in project, an empty string otherwise.
*/
static QString wmsServiceUrl( const QgsProject& project );

/** Returns the WFS service url defined in a QGIS project.
* @param project the QGIS project
* @return url if defined in project, an empty string otherwise.
*/
static QString wfsServiceUrl( const QgsProject& project );

/** Returns the WCS service url defined in a QGIS project.
* @param project the QGIS project
* @return url if defined in project, an empty string otherwise.
*/
static QString wcsServiceUrl( const QgsProject& project );
/** Returns the maximum width for WMS images defined in a QGIS project.
* @param project the QGIS project
* @return width if defined in project, -1 otherwise.
*/
int wmsMaxWidth( const QgsProject& project );

/** Returns the maximum height for WMS images defined in a QGIS project.
* @param project the QGIS project
* @return height if defined in project, -1 otherwise.
*/
int wmsMaxHeight( const QgsProject& project );

/** Returns the WMS service url defined in a QGIS project.
* @param project the QGIS project
* @return url if defined in project, an empty string otherwise.
*/
QString wmsServiceUrl( const QgsProject& project );

/** Returns the WFS service url defined in a QGIS project.
* @param project the QGIS project
* @return url if defined in project, an empty string otherwise.
*/
QString wfsServiceUrl( const QgsProject& project );

/** Returns the WCS service url defined in a QGIS project.
* @param project the QGIS project
* @return url if defined in project, an empty string otherwise.
*/
QString wcsServiceUrl( const QgsProject& project );
};

#endif

0 comments on commit 44da573

Please sign in to comment.