QGIS API Documentation  2.6.0-Brighton
 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 ()
void fetchContent (const QUrl url)
 Fetches content from a remote URL and handles redirects.
QNetworkReply * reply ()
 Returns a reference to the network reply.
QString contentAsString () const
 Returns the fetched content as a string.

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

Constructor & Destructor Documentation

QgsNetworkContentFetcher::QgsNetworkContentFetcher ( )
QgsNetworkContentFetcher::~QgsNetworkContentFetcher ( )
virtual

Member Function Documentation

QString QgsNetworkContentFetcher::contentAsString ( ) const

Returns the fetched content as a string.

Returns
string containing network content
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
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

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