2017-05-14 09:48:41 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsnetworkcontentfetcher.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-29 07:40:04 +10:00
|
|
|
|
|
|
|
class QgsNetworkContentFetcher : QObject
|
|
|
|
{
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
HTTP network content fetcher. A simple method for fetching remote HTTP content
|
|
|
|
and converting the content to standard formats. Url redirects are automatically
|
|
|
|
handled.
|
|
|
|
.. versionadded:: 2.5
|
2014-07-29 07:40:04 +10:00
|
|
|
%End
|
|
|
|
|
2017-05-14 09:48:41 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsnetworkcontentfetcher.h"
|
|
|
|
%End
|
2014-07-29 07:40:04 +10:00
|
|
|
public:
|
2017-09-28 08:17:06 +10:00
|
|
|
|
2014-07-29 07:40:04 +10:00
|
|
|
QgsNetworkContentFetcher();
|
2017-09-28 08:17:06 +10:00
|
|
|
%Docstring
|
|
|
|
Constructor for QgsNetworkContentFetcher.
|
|
|
|
%End
|
2014-07-29 07:40:04 +10:00
|
|
|
|
|
|
|
virtual ~QgsNetworkContentFetcher();
|
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void fetchContent( const QUrl &url );
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Fetches content from a remote URL and handles redirects. The finished()
|
|
|
|
signal will be emitted when content has been fetched.
|
|
|
|
\param url URL to fetch
|
|
|
|
%End
|
2014-08-20 09:56:48 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
QNetworkReply *reply();
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Returns a reference to the network reply
|
|
|
|
:return: QNetworkReply for fetched URL content
|
|
|
|
:rtype: QNetworkReply
|
|
|
|
%End
|
2014-08-20 09:56:48 +02:00
|
|
|
|
2014-07-29 07:40:04 +10:00
|
|
|
QString contentAsString() const;
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the fetched content as a string
|
|
|
|
:return: string containing network content
|
|
|
|
:rtype: str
|
|
|
|
%End
|
2014-08-20 09:56:48 +02:00
|
|
|
|
2014-07-29 07:40:04 +10:00
|
|
|
signals:
|
|
|
|
|
|
|
|
void finished();
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Emitted when content has loaded
|
|
|
|
%End
|
2014-07-29 07:40:04 +10:00
|
|
|
|
|
|
|
};
|
2017-05-14 09:48:41 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsnetworkcontentfetcher.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|