Request handler for GeoNode servers.
More...
#include <qgsgeonoderequest.h>
|
void | abort () |
| Aborts any active network request immediately. More...
|
|
Request handler for GeoNode servers.
QgsGeoNodeRequest handles requesting and parsing service details from a GeoNode server instance, for instance requesting all available layers or layer styles.
- Since
- QGIS 3.0
Definition at line 65 of file qgsgeonoderequest.h.
◆ BackendServer
GeoNode backend server type.
Enumerator |
---|
Unknown | Unknown backend.
|
QgisServer | QGIS server used as backend.
|
Geoserver | Geoserver used as backend.
|
Definition at line 73 of file qgsgeonoderequest.h.
◆ QgsGeoNodeRequest()
QgsGeoNodeRequest::QgsGeoNodeRequest |
( |
const QString & |
baseUrl, |
|
|
bool |
forceRefresh, |
|
|
QObject * |
parent = nullptr |
|
) |
| |
◆ ~QgsGeoNodeRequest()
QgsGeoNodeRequest::~QgsGeoNodeRequest |
( |
| ) |
|
|
override |
◆ abort
void QgsGeoNodeRequest::abort |
( |
| ) |
|
|
slot |
◆ fetchDefaultStyleBlocking()
QgsGeoNodeStyle QgsGeoNodeRequest::fetchDefaultStyleBlocking |
( |
const QString & |
layerName | ) |
|
Requests the default style for the layer with matching layerName from the server.
This method is blocking and will wait for results from the server before returning. Accordingly it should not be used from any code which potentially blocks operation in the main GUI thread.
Definition at line 94 of file qgsgeonoderequest.cpp.
◆ fetchLayers()
void QgsGeoNodeRequest::fetchLayers |
( |
| ) |
|
Triggers a new request to fetch the list of available layers from the server.
When complete, the layersFetched() signal will be emitted with the result.
This method is non-blocking and returns immediately.
- Warning
- When using the non-blocking methods in this class, sending overlapping requests results in undefined behavior. Use separate instances of QgsGeoNodeRequest instead to avoid this.
- See also
- layersFetched()
-
fetchLayersBlocking()
Definition at line 55 of file qgsgeonoderequest.cpp.
◆ fetchLayersBlocking()
Requests the list of available layers from the server.
This method is blocking and will wait for results from the server before returning. Accordingly it should not be used from any code which potentially blocks operation in the main GUI thread.
- See also
- fetchLayers()
Definition at line 77 of file qgsgeonoderequest.cpp.
◆ fetchServiceUrlDataBlocking()
QgsStringMap QgsGeoNodeRequest::fetchServiceUrlDataBlocking |
( |
const QString & |
serviceType | ) |
|
Obtains a map of layer name to URL for available services with matching serviceType from the server.
This method is blocking and will wait for results from the server before returning. Accordingly it should not be used from any code which potentially blocks operation in the main GUI thread.
Definition at line 485 of file qgsgeonoderequest.cpp.
◆ fetchServiceUrlsBlocking()
QStringList QgsGeoNodeRequest::fetchServiceUrlsBlocking |
( |
const QString & |
serviceType | ) |
|
Requests the list of unique URLs for available services with matching serviceType from the server.
This method is blocking and will wait for results from the server before returning. Accordingly it should not be used from any code which potentially blocks operation in the main GUI thread.
Definition at line 438 of file qgsgeonoderequest.cpp.
◆ fetchStyleBlocking()
QgsGeoNodeStyle QgsGeoNodeRequest::fetchStyleBlocking |
( |
const QString & |
styleId | ) |
|
Requests the details for the style with matching styleId from the server.
This method is blocking and will wait for results from the server before returning. Accordingly it should not be used from any code which potentially blocks operation in the main GUI thread.
Definition at line 146 of file qgsgeonoderequest.cpp.
◆ fetchStylesBlocking()
QList< QgsGeoNodeStyle > QgsGeoNodeRequest::fetchStylesBlocking |
( |
const QString & |
layerName | ) |
|
Requests the list of available styles for the layer with matching layerName from the server.
This method is blocking and will wait for results from the server before returning. Accordingly it should not be used from any code which potentially blocks operation in the main GUI thread.
Definition at line 118 of file qgsgeonoderequest.cpp.
◆ lastError()
QString QgsGeoNodeRequest::lastError |
( |
| ) |
const |
|
inline |
Returns the most recent error string for any encountered errors, or an empty string if no errors have been encountered.
Definition at line 213 of file qgsgeonoderequest.h.
◆ lastResponse()
QByteArray QgsGeoNodeRequest::lastResponse |
( |
| ) |
const |
|
inline |
Returns the most recent response obtained from the server.
Definition at line 218 of file qgsgeonoderequest.h.
◆ layersFetched
Emitted when the result of a fetchLayers call has been received and processed.
◆ parseOwsUrl()
◆ protocol()
QString QgsGeoNodeRequest::protocol |
( |
| ) |
const |
◆ request()
void QgsGeoNodeRequest::request |
( |
const QString & |
endPoint | ) |
|
Triggers a new request to the GeoNode server, with the requested endPoint.
Any existing request will be aborted.
Calling this method does not block while waiting for a result.
- Warning
- When using the non-blocking methods in this class, sending overlapping requests results in undefined behavior. Use separate instances of QgsGeoNodeRequest instead to avoid this.
- See also
- requestBlocking()
Definition at line 534 of file qgsgeonoderequest.cpp.
◆ requestBlocking()
bool QgsGeoNodeRequest::requestBlocking |
( |
const QString & |
endPoint | ) |
|
Triggers a new request to the GeoNode server, with the requested endPoint.
Any existing request will be aborted.
Calling this method will block while waiting for a result. It should not be used from any code which potentially blocks operation in the main GUI thread.
- See also
- request()
Definition at line 552 of file qgsgeonoderequest.cpp.
◆ requestFinished
void QgsGeoNodeRequest::requestFinished |
( |
| ) |
|
|
signal |
Emitted when the existing request has been completed.
◆ setProtocol()
void QgsGeoNodeRequest::setProtocol |
( |
const QString & |
protocol | ) |
|
◆ statusChanged
void QgsGeoNodeRequest::statusChanged |
( |
const QString & |
statusQString | ) |
|
|
signal |
Emitted when the status of an ongoing request is changed.
The documentation for this class was generated from the following files: