QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgswmsutils.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgswms.h
3 
4  Define WMS service utility functions
5  ------------------------------------
6  begin : December 20 , 2016
7  copyright : (C) 2007 by Marco Hugentobler ( parts from qgswmshandler)
8  (C) 2014 by Alessandro Pasotti ( parts from qgswmshandler)
9  (C) 2016 by David Marteau
10  email : marco dot hugentobler at karto dot baug dot ethz dot ch
11  a dot pasotti at itopen dot it
12  david dot marteau at 3liz dot com
13  ***************************************************************************/
14 
15 /***************************************************************************
16  * *
17  * This program is free software; you can redistribute it and/or modify *
18  * it under the terms of the GNU General Public License as published by *
19  * the Free Software Foundation; either version 2 of the License, or *
20  * (at your option) any later version. *
21  * *
22  ***************************************************************************/
23 #ifndef QGSWMSUTILS_H
24 #define QGSWMSUTILS_H
25 
26 #include "qgsmodule.h"
27 #include "qgsserversettings.h"
28 
29 class QgsRectangle;
30 
36 namespace QgsWms
38 {
41  {
43  PNG,
49  };
50 
55  QString implementationVersion();
56 
60  QUrl serviceUrl( const QgsServerRequest &request, const QgsProject *project, const QgsServerSettings &settings );
61 
66  ImageOutputFormat parseImageFormat( const QString &format );
67 
71  void writeImage( QgsServerResponse &response, QImage &img, const QString &formatStr,
72  int imageQuality = -1 );
73 } // namespace QgsWms
74 
75 #endif
QgsWms::parseImageFormat
ImageOutputFormat parseImageFormat(const QString &format)
Parse image format parameter.
Definition: qgswmsutils.cpp:91
qgsserversettings.h
QgsWms::UNKN
@ UNKN
Definition: qgswmsutils.h:42
QgsWms::WEBP
@ WEBP
Definition: qgswmsutils.h:48
QgsWms::writeImage
void writeImage(QgsServerResponse &response, QImage &img, const QString &formatStr, int imageQuality)
Write image response.
Definition: qgswmsutils.cpp:128
QgsServerRequest
QgsServerRequest Class defining request interface passed to services QgsService::executeRequest() met...
Definition: qgsserverrequest.h:38
QgsRectangle
A rectangle specified with double values.
Definition: qgsrectangle.h:41
QgsWms::JPEG
@ JPEG
Definition: qgswmsutils.h:47
QgsWms::serviceUrl
QUrl serviceUrl(const QgsServerRequest &request, const QgsProject *project, const QgsServerSettings &settings)
Returns WMS service URL.
Definition: qgswmsutils.cpp:55
QgsProject
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition: qgsproject.h:103
QgsServerSettings
Provides a way to retrieve settings by prioritizing according to environment variables,...
Definition: qgsserversettings.h:92
QgsWms::PNG8
@ PNG8
Definition: qgswmsutils.h:44
QgsWms::implementationVersion
QString implementationVersion()
Returns the highest version supported by this implementation.
Definition: qgswmsutils.cpp:50
QgsWms::PNG16
@ PNG16
Definition: qgswmsutils.h:45
QgsWms::PNG
@ PNG
Definition: qgswmsutils.h:43
QgsWms
Median cut implementation.
Definition: qgsdxfwriter.cpp:22
QgsWms::PNG1
@ PNG1
Definition: qgswmsutils.h:46
qgsmodule.h
QgsServerResponse
QgsServerResponse Class defining response interface passed to services QgsService::executeRequest() m...
Definition: qgsserverresponse.h:43
QgsWms::ImageOutputFormat
ImageOutputFormat
Supported image output format.
Definition: qgswmsutils.h:40