QGIS API Documentation
2.4.0-Chugiak
|
#include <qgsnetworkaccessmanager.h>
Signals | |
void | requestAboutToBeCreated (QNetworkAccessManager::Operation, const QNetworkRequest &, QIODevice *) |
void | requestCreated (QNetworkReply *) |
void | requestTimedOut (QNetworkReply *) |
Public Member Functions | |
QgsNetworkAccessManager (QObject *parent=0) | |
~QgsNetworkAccessManager () | |
destructor More... | |
void | insertProxyFactory (QNetworkProxyFactory *factory) |
insert a factory into the proxy factories list More... | |
void | removeProxyFactory (QNetworkProxyFactory *factory) |
remove a factory from the proxy factories list More... | |
const QList < QNetworkProxyFactory * > | proxyFactories () const |
retrieve proxy factory list More... | |
const QNetworkProxy & | fallbackProxy () const |
retrieve fall back proxy (for urls that no factory returned proxies for) More... | |
const QStringList & | excludeList () const |
retrieve exclude list (urls shouldn't use the fallback proxy) More... | |
void | setFallbackProxyAndExcludes (const QNetworkProxy &proxy, const QStringList &excludes) |
set fallback proxy and URL that shouldn't use it. More... | |
void | setupDefaultProxyAndCache () |
Setup the NAM according to the user's settings. More... | |
bool | useSystemProxy () |
Static Public Member Functions | |
static QgsNetworkAccessManager * | instance () |
returns a pointer to the single instance More... | |
static QString | cacheLoadControlName (QNetworkRequest::CacheLoadControl theControl) |
Get name for QNetworkRequest::CacheLoadControl. More... | |
static QNetworkRequest::CacheLoadControl | cacheLoadControlFromName (const QString &theName) |
Get QNetworkRequest::CacheLoadControl from name. More... | |
Protected Member Functions | |
virtual QNetworkReply * | createRequest (QNetworkAccessManager::Operation op, const QNetworkRequest &req, QIODevice *outgoingData=0) |
Private Slots | |
void | abortRequest () |
Private Attributes | |
QList< QNetworkProxyFactory * > | mProxyFactories |
QNetworkProxy | mFallbackProxy |
QStringList | mExcludedURLs |
bool | mUseSystemProxy |
Definition at line 44 of file qgsnetworkaccessmanager.h.
QgsNetworkAccessManager::QgsNetworkAccessManager | ( | QObject * | parent = 0 | ) |
Definition at line 95 of file qgsnetworkaccessmanager.cpp.
QgsNetworkAccessManager::~QgsNetworkAccessManager | ( | ) |
destructor
Definition at line 102 of file qgsnetworkaccessmanager.cpp.
|
privateslot |
Definition at line 179 of file qgsnetworkaccessmanager.cpp.
References QgsMessageLog::logMessage(), requestTimedOut(), and tr.
Referenced by createRequest().
|
static |
Get QNetworkRequest::CacheLoadControl from name.
Definition at line 217 of file qgsnetworkaccessmanager.cpp.
|
static |
Get name for QNetworkRequest::CacheLoadControl.
Definition at line 195 of file qgsnetworkaccessmanager.cpp.
|
protectedvirtual |
Definition at line 150 of file qgsnetworkaccessmanager.cpp.
References abortRequest(), QGis::QGIS_VERSION, requestAboutToBeCreated(), and requestCreated().
const QStringList & QgsNetworkAccessManager::excludeList | ( | ) | const |
retrieve exclude list (urls shouldn't use the fallback proxy)
Definition at line 121 of file qgsnetworkaccessmanager.cpp.
References mExcludedURLs.
Referenced by QgsNetworkProxyFactory::queryProxy().
const QNetworkProxy & QgsNetworkAccessManager::fallbackProxy | ( | ) | const |
retrieve fall back proxy (for urls that no factory returned proxies for)
Definition at line 126 of file qgsnetworkaccessmanager.cpp.
References mFallbackProxy.
Referenced by QgsNetworkProxyFactory::queryProxy().
void QgsNetworkAccessManager::insertProxyFactory | ( | QNetworkProxyFactory * | factory | ) |
insert a factory into the proxy factories list
Definition at line 106 of file qgsnetworkaccessmanager.cpp.
References mProxyFactories.
|
static |
returns a pointer to the single instance
Definition at line 89 of file qgsnetworkaccessmanager.cpp.
Referenced by QgsGml::getFeatures(), QgsSvgCache::getImageData(), QgsOWSSourceSelect::on_mSearchButton_clicked(), QgsComposerLabel::paint(), QgsComposerHtml::QgsComposerHtml(), QgsHtmlAnnotationItem::QgsHtmlAnnotationItem(), QgsNetworkProxyFactory::queryProxy(), and setupDefaultProxyAndCache().
const QList< QNetworkProxyFactory * > QgsNetworkAccessManager::proxyFactories | ( | ) | const |
retrieve proxy factory list
Definition at line 116 of file qgsnetworkaccessmanager.cpp.
References mProxyFactories.
Referenced by QgsNetworkProxyFactory::queryProxy().
void QgsNetworkAccessManager::removeProxyFactory | ( | QNetworkProxyFactory * | factory | ) |
remove a factory from the proxy factories list
Definition at line 111 of file qgsnetworkaccessmanager.cpp.
References mProxyFactories.
|
signal |
Referenced by createRequest().
|
signal |
Referenced by createRequest().
|
signal |
Referenced by abortRequest(), and setupDefaultProxyAndCache().
void QgsNetworkAccessManager::setFallbackProxyAndExcludes | ( | const QNetworkProxy & | proxy, |
const QStringList & | excludes | ||
) |
set fallback proxy and URL that shouldn't use it.
Definition at line 131 of file qgsnetworkaccessmanager.cpp.
References mExcludedURLs, mFallbackProxy, and QgsDebugMsg.
Referenced by setupDefaultProxyAndCache().
void QgsNetworkAccessManager::setupDefaultProxyAndCache | ( | ) |
Setup the NAM according to the user's settings.
Definition at line 238 of file qgsnetworkaccessmanager.cpp.
References instance(), mUseSystemProxy, QgsApplication::qgisSettingsDirPath(), QgsDebugMsg, requestTimedOut(), and setFallbackProxyAndExcludes().
|
inline |
Definition at line 85 of file qgsnetworkaccessmanager.h.
Referenced by QgsNetworkProxyFactory::queryProxy().
|
private |
Definition at line 101 of file qgsnetworkaccessmanager.h.
Referenced by excludeList(), and setFallbackProxyAndExcludes().
|
private |
Definition at line 100 of file qgsnetworkaccessmanager.h.
Referenced by fallbackProxy(), and setFallbackProxyAndExcludes().
|
private |
Definition at line 99 of file qgsnetworkaccessmanager.h.
Referenced by insertProxyFactory(), proxyFactories(), and removeProxyFactory().
|
private |
Definition at line 102 of file qgsnetworkaccessmanager.h.
Referenced by setupDefaultProxyAndCache().