Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
28a3138
commit 5ba7cfb
Showing
6 changed files
with
145 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/*************************************************************************** | ||
qgswmsrequest.cpp | ||
Define request class for getting request contents for WMS service | ||
------------------- | ||
begin : 2021-02-10 | ||
copyright : (C) 2021 by Paul Blottiere | ||
email : blottiere.paul@gmail.com | ||
***************************************************************************/ | ||
|
||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#include "qgswmsrequest.h" | ||
|
||
namespace QgsWms | ||
{ | ||
QgsWmsRequest::QgsWmsRequest( const QgsServerRequest &other ) | ||
: QgsServerRequest( other ) | ||
{ | ||
init(); | ||
} | ||
|
||
const QgsWmsParameters &QgsWmsRequest::wmsParameters() const | ||
{ | ||
return mWmsParams; | ||
} | ||
|
||
void QgsWmsRequest::setParameter( const QString &key, const QString &value ) | ||
{ | ||
QgsServerRequest::setParameter( key, value ); | ||
init(); | ||
} | ||
|
||
void QgsWmsRequest::removeParameter( const QString &key ) | ||
{ | ||
QgsServerRequest::removeParameter( key ); | ||
init(); | ||
} | ||
|
||
void QgsWmsRequest::setUrl( const QUrl &url ) | ||
{ | ||
QgsServerRequest::setUrl( url ); | ||
init(); | ||
} | ||
|
||
void QgsWmsRequest::init() | ||
{ | ||
mWmsParams = QgsWmsParameters( QUrlQuery( url() ) ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/*************************************************************************** | ||
qgswmsrequest.h | ||
Define request class for getting request contents for WMS service | ||
------------------- | ||
begin : 2021-02-10 | ||
copyright : (C) 2021 by Paul Blottiere | ||
email : blottiere.paul@gmail.com | ||
***************************************************************************/ | ||
|
||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
#ifndef QGSWMSREQUEST_H | ||
#define QGSWMSREQUEST_H | ||
|
||
#include "qgsserverrequest.h" | ||
#include "qgswmsparameters.h" | ||
|
||
namespace QgsWms | ||
{ | ||
|
||
/** | ||
* \ingroup server | ||
* QgsWmsServerRequest | ||
* Class defining request interface passed to WMS service | ||
* QgsService::executeRequest() method. | ||
* | ||
* \since QGIS 3.20 | ||
*/ | ||
|
||
class QgsWmsRequest : public QgsServerRequest | ||
{ | ||
Q_GADGET | ||
|
||
public: | ||
|
||
/** | ||
* Copy onstructor | ||
*/ | ||
QgsWmsRequest( const QgsServerRequest &other ); | ||
|
||
/** | ||
* Destructor. | ||
*/ | ||
~QgsWmsRequest() override = default; | ||
|
||
const QgsWmsParameters &wmsParameters() const; | ||
|
||
void setParameter( const QString &key, const QString &value ) override; | ||
|
||
void removeParameter( const QString &key ) override; | ||
|
||
void setUrl( const QUrl &url ) override; | ||
|
||
private: | ||
void init(); | ||
|
||
QgsWmsParameters mWmsParams; | ||
}; | ||
} | ||
|
||
#endif |