本文整理汇总了C++中QNetworkAccessManager::setProperty方法的典型用法代码示例。如果您正苦于以下问题:C++ QNetworkAccessManager::setProperty方法的具体用法?C++ QNetworkAccessManager::setProperty怎么用?C++ QNetworkAccessManager::setProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QNetworkAccessManager
的用法示例。
在下文中一共展示了QNetworkAccessManager::setProperty方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getWeatherPage
void PluginWeather::getWeatherPage(Bunny * b, QString ville)
{
Q_UNUSED(b);
QUrl url("http://www.google.com/ig/api");
url.addEncodedQueryItem("hl", b->GetPluginSetting(GetName(), "Lang","fr").toByteArray());
url.addEncodedQueryItem("weather", QUrl::toPercentEncoding(ville));
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
manager->setProperty("BunnyID", b->GetID());
connect(manager, SIGNAL(finished(QNetworkReply*)),this, SLOT(analyseXml(QNetworkReply*)));
manager->get(QNetworkRequest(url));
}
示例2: streamFlux
bool PluginWizzflux::streamFlux(Bunny * b, QString const flux)
{
QUrl url("http://nabz.wizz.cc/_plugz/");
url.addEncodedQueryItem("p", flux.toAscii());
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
manager->setProperty("BunnyID", b->GetID());
connect(manager, SIGNAL(finished(QNetworkReply*)),this, SLOT(analyse(QNetworkReply*)));
manager->get(QNetworkRequest(url));
//QByteArray message = "ST "+url.toAscii()+"\nPL "+QString::number(qrand() % 8).toAscii()+"\nMW\n";
return true;
}
示例3: getPageHoraire
void PluginRatp::getPageHoraire(Bunny * b,QString reseau, QString ligne, QString arret, QString direction)
{
Q_UNUSED(b);
QString sb = QString("http://wap.ratp.fr/siv/schedule?service=next&reseau=%1&lineid=%2&directionsens=%3&stationid=%4").arg(reseau,ligne,direction,arret);
QUrl url(sb);
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
manager->setProperty("BunnyID", b->GetID());
connect(manager, SIGNAL(finished(QNetworkReply*)),this, SLOT(analyseXml(QNetworkReply*)));
manager->get(QNetworkRequest(url));
}