Skip to content
Permalink
Browse files

replace class by namespace

  • Loading branch information
pblottiere committed Jan 30, 2017
1 parent a868f0b commit 44da5730028c80b55960b999630943d960fc372c
Showing with 43 additions and 47 deletions.
  1. +11 −14 python/server/qgsserverprojectutils.sip
  2. +32 −33 src/server/qgsserverprojectutils.h
@@ -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 );
};
@@ -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.
You can’t perform that action at this time.