QGIS API Documentation  2.8.2-Wien
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Signals | Public Member Functions | List of all members
QgsNetworkContentFetcher Class Reference

HTTP network content fetcher. More...

#include <qgsnetworkcontentfetcher.h>

Signals

void finished ()
 Emitted when content has loaded.

Public Member Functions

 QgsNetworkContentFetcher ()
virtual ~QgsNetworkContentFetcher ()
QString contentAsString () const
 Returns the fetched content as a string.
void fetchContent (const QUrl url)
 Fetches content from a remote URL and handles redirects.
QNetworkReply * reply ()
 Returns a reference to the network reply.

Detailed Description

HTTP network content fetcher.

A simple method for fetching remote HTTP content and converting the content to standard formats. Url redirects are automatically handled.

Since
2.5

Definition at line 35 of file qgsnetworkcontentfetcher.h.

Constructor & Destructor Documentation

QgsNetworkContentFetcher::QgsNetworkContentFetcher ( )

Definition at line 26 of file qgsnetworkcontentfetcher.cpp.

QgsNetworkContentFetcher::~QgsNetworkContentFetcher ( )
virtual

Definition at line 33 of file qgsnetworkcontentfetcher.cpp.

Member Function Documentation

QString QgsNetworkContentFetcher::contentAsString ( ) const

Returns the fetched content as a string.

Returns
string containing network content

Definition at line 76 of file qgsnetworkcontentfetcher.cpp.

void QgsNetworkContentFetcher::fetchContent ( const QUrl  url)

Fetches content from a remote URL and handles redirects.

The finished() signal will be emitted when content has been fetched.

Parameters
urlURL to fetch

Definition at line 46 of file qgsnetworkcontentfetcher.cpp.

void QgsNetworkContentFetcher::finished ( )
signal

Emitted when content has loaded.

QNetworkReply * QgsNetworkContentFetcher::reply ( )

Returns a reference to the network reply.

Returns
QNetworkReply for fetched URL content

Definition at line 66 of file qgsnetworkcontentfetcher.cpp.


The documentation for this class was generated from the following files: