|
| 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