QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgswmsrequest.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgswmsrequest.cpp
3 
4  Define request class for getting request contents for WMS service
5  -------------------
6  begin : 2021-02-10
7  copyright : (C) 2021 by Paul Blottiere
8  email : [email protected]
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  ***************************************************************************/
19 
20 #include "qgswmsrequest.h"
21 
22 namespace QgsWms
23 {
25  : QgsServerRequest( other )
26  {
27  init();
28  }
29 
30  const QgsWmsParameters &QgsWmsRequest::wmsParameters() const
31  {
32  return mWmsParams;
33  }
34 
35  void QgsWmsRequest::setParameter( const QString &key, const QString &value )
36  {
37  QgsServerRequest::setParameter( key, value );
38  init();
39  }
40 
41  void QgsWmsRequest::removeParameter( const QString &key )
42  {
44  init();
45  }
46 
47  void QgsWmsRequest::setUrl( const QUrl &url )
48  {
50  init();
51  }
52 
53  void QgsWmsRequest::init()
54  {
55  mWmsParams = QgsWmsParameters( serverParameters() );
56  }
57 }
QgsWms::QgsWmsParameters
Provides an interface to retrieve and manipulate WMS parameters received from the client.
Definition: qgswmsparameters.h:346
QgsServerRequest
QgsServerRequest Class defining request interface passed to services QgsService::executeRequest() met...
Definition: qgsserverrequest.h:38
QgsServerRequest::removeParameter
virtual void removeParameter(const QString &key)
Remove a parameter.
Definition: qgsserverrequest.cpp:147
QgsServerRequest::serverParameters
QgsServerParameters serverParameters() const
Returns parameters.
Definition: qgsserverrequest.cpp:121
QgsServerRequest::setParameter
virtual void setParameter(const QString &key, const QString &value)
Set a parameter.
Definition: qgsserverrequest.cpp:131
QgsWms::QgsWmsRequest::setUrl
void setUrl(const QUrl &url) override
Set the request url.
Definition: qgswmsrequest.cpp:62
QgsWms
Median cut implementation.
Definition: qgsdxfwriter.cpp:22
QgsServerRequest::url
QUrl url() const
Definition: qgsserverrequest.cpp:86
QgsWms::QgsWmsRequest::wmsParameters
const QgsWmsParameters & wmsParameters() const
Returns the parameters interpreted for the WMS service.
Definition: qgswmsrequest.cpp:45
QgsWms::QgsWmsRequest::QgsWmsRequest
QgsWmsRequest(const QgsServerRequest &other)
Copy constructor.
Definition: qgswmsrequest.cpp:39
QgsWms::QgsWmsRequest::removeParameter
void removeParameter(const QString &key) override
Remove a parameter.
Definition: qgswmsrequest.cpp:56
QgsWms::QgsWmsRequest::setParameter
void setParameter(const QString &key, const QString &value) override
Set a parameter.
Definition: qgswmsrequest.cpp:50
QgsServerRequest::setUrl
virtual void setUrl(const QUrl &url)
Set the request url.
Definition: qgsserverrequest.cpp:153
qgswmsrequest.h