QGIS/python/core/geocms/geonode/qgsgeonoderequest.sip

257 lines
7.4 KiB
Plaintext
Raw Normal View History

2017-09-06 19:23:47 +10:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/geocms/geonode/qgsgeonoderequest.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
struct QgsGeoNodeStyle
{
%TypeHeaderCode
#include <qgsgeonoderequest.h>
%End
2017-09-06 19:23:47 +10:00
QString id;
%Docstring
Unique style ID
%End
2017-09-06 19:23:47 +10:00
QString name;
%Docstring
Style name
%End
2017-09-06 19:23:47 +10:00
QString title;
%Docstring
Style title
%End
2017-09-06 19:23:47 +10:00
QDomDocument body;
%Docstring
DOM documenting containing style
%End
2017-09-06 19:23:47 +10:00
QString styleUrl;
%Docstring
Associated URL
%End
2017-09-06 19:23:47 +10:00
};
class QgsGeoNodeRequest : QObject
{
%Docstring
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.
.. versionadded:: 3.0
%End
2017-09-06 19:23:47 +10:00
%TypeHeaderCode
#include "qgsgeonoderequest.h"
%End
public:
2017-09-08 10:14:16 +10:00
struct ServiceLayerDetail
{
QUuid uuid;
%Docstring
Unique identifier (generate on the client side, not at the GeoNode server)
%End
2017-09-08 10:14:16 +10:00
QString name;
%Docstring
Layer name
%End
2017-09-08 10:14:16 +10:00
QString typeName;
%Docstring
Layer type name
%End
2017-09-08 10:14:16 +10:00
QString title;
%Docstring
Layer title
%End
2017-09-08 10:14:16 +10:00
QString wmsURL;
%Docstring
WMS URL for layer
%End
2017-09-08 10:14:16 +10:00
QString wfsURL;
%Docstring
WFS URL for layer
%End
2017-09-08 10:14:16 +10:00
QString xyzURL;
%Docstring
XYZ tileserver URL for layer
%End
2017-09-08 10:14:16 +10:00
};
QgsGeoNodeRequest( const QString &baseUrl, bool forceRefresh, QObject *parent = 0 );
2017-09-06 19:23:47 +10:00
%Docstring
Constructor for QgsGeoNodeRequest.
If ``forceRefresh`` is false, then cached copies of the request may be reused.
%End
2017-09-06 19:23:47 +10:00
virtual ~QgsGeoNodeRequest();
void request( const QString &endPoint );
%Docstring
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.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`requestBlocking()`
%End
bool requestBlocking( const QString &endPoint );
2017-09-06 19:23:47 +10:00
%Docstring
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.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`request()`
2017-09-06 19:23:47 +10:00
:rtype: bool
%End
void fetchLayers();
2017-09-06 19:23:47 +10:00
%Docstring
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.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`layersFetched()`
.. seealso:: :py:func:`fetchLayersBlocking()`
%End
QList<QgsGeoNodeRequest::ServiceLayerDetail> fetchLayersBlocking();
%Docstring
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.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`fetchLayers()`
2017-09-08 10:14:16 +10:00
:rtype: list of QgsGeoNodeRequest.ServiceLayerDetail
2017-09-06 19:23:47 +10:00
%End
QList<QgsGeoNodeStyle> fetchStylesBlocking( const QString &layerName );
2017-09-06 19:23:47 +10:00
%Docstring
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.
2017-09-06 19:23:47 +10:00
:rtype: list of QgsGeoNodeStyle
%End
QgsGeoNodeStyle fetchDefaultStyleBlocking( const QString &layerName );
2017-09-06 19:23:47 +10:00
%Docstring
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.
2017-09-06 19:23:47 +10:00
:rtype: QgsGeoNodeStyle
%End
QgsGeoNodeStyle fetchStyleBlocking( const QString &styleId );
2017-09-06 19:23:47 +10:00
%Docstring
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.
2017-09-06 19:23:47 +10:00
:rtype: QgsGeoNodeStyle
%End
QStringList fetchServiceUrlsBlocking( const QString &serviceType );
2017-09-06 19:23:47 +10:00
%Docstring
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.
2017-09-06 19:23:47 +10:00
:rtype: list of str
%End
QgsStringMap fetchServiceUrlDataBlocking( const QString &serviceType );
2017-09-06 19:23:47 +10:00
%Docstring
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.
2017-09-06 19:23:47 +10:00
:rtype: QgsStringMap
%End
QString lastError() const;
%Docstring
Returns the most recent error string for any encountered errors, or an empty string if
no errors have been encountered.
2017-09-06 19:23:47 +10:00
:rtype: str
%End
QByteArray lastResponse() const;
2017-09-06 19:23:47 +10:00
%Docstring
Returns the most recent response obtained from the server.
2017-09-06 19:23:47 +10:00
:rtype: QByteArray
%End
QString protocol() const;
2017-09-06 19:23:47 +10:00
%Docstring
Returns the network protocol (e.g. 'http') used for connecting with the server.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setProtocol()`
:rtype: str
2017-09-06 19:23:47 +10:00
%End
void setProtocol( const QString &protocol );
2017-09-06 19:23:47 +10:00
%Docstring
Sets the network ``protocol`` (e.g. 'http') used for connecting with the server.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`protocol()`
2017-09-06 19:23:47 +10:00
%End
public slots:
void abort();
2017-09-06 19:23:47 +10:00
%Docstring
Aborts any active network request immediately.
2017-09-06 19:23:47 +10:00
%End
signals:
2017-09-06 19:23:47 +10:00
void statusChanged( const QString &statusQString );
%Docstring
Emitted when the status of an ongoing request is changed.
2017-09-06 19:23:47 +10:00
%End
void requestFinished();
%Docstring
Emitted when the existing request has been completed.
2017-09-06 19:23:47 +10:00
%End
void layersFetched( const QList<QgsGeoNodeRequest::ServiceLayerDetail> &layers );
%Docstring
Emitted when the result of a fetchLayers call has been received and processed.
%End
2017-09-06 19:23:47 +10:00
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/geocms/geonode/qgsgeonoderequest.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/