本文整理汇总了C++中ImageLoader::loadImage方法的典型用法代码示例。如果您正苦于以下问题:C++ ImageLoader::loadImage方法的具体用法?C++ ImageLoader::loadImage怎么用?C++ ImageLoader::loadImage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ImageLoader
的用法示例。
在下文中一共展示了ImageLoader::loadImage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateItem
void WeatherItemFactory::updateItem(ListView* list, bb::cascades::VisualNode *listItem,
const QString &type, const QVariantList &indexPath, const QVariant &data)
{
Q_UNUSED(list);
Q_UNUSED(indexPath);
Q_UNUSED(type);
// Update the control with the correct data.
QVariantMap map = data.value<QVariantMap>();
WeatherItem *weatherItem = static_cast<WeatherItem *>(listItem);
ImageLoader *imloader = new ImageLoader();
imloader->loadImage(map["weatherIconUrl"].toString(), weatherItem->getConditionsImage(), "/wsymbols01_png_64/", ".png");
//set labels
weatherItem->setTime(map["time"].toString());
weatherItem->setWindSpeed(map["windspeedKmph"].toString());
weatherItem->setTemperature(map["tempC"]);
weatherItem->setCloudCover(map["cloudcover"].toString());
weatherItem->setPressure(map["pressure"].toString());
weatherItem->setHumidity(map["humidity"].toString());
weatherItem->setSwellHeight(map["swellHeight_m"].toString());
//rotate arrows
weatherItem->setWindDirection(180 + map["winddirDegree"].toFloat());
weatherItem->setSwellDirection(180 + map["swellDir"].toFloat());
}
示例2: updateItem
void ShopItemFactory::updateItem(ListView* list, bb::cascades::VisualNode *listItem,
const QString &type, const QVariantList &indexPath, const QVariant &data)
{
Q_UNUSED(list);
Q_UNUSED(indexPath);
Q_UNUSED(type);
// Update the control with the correct data.
QVariantMap map = data.value<QVariantMap>();
ShopItem *recipeItem = static_cast<ShopItem *>(listItem);
//recipeItem->updateItem(map["fruit"].toString());
ImageLoader *imloader = new ImageLoader();
imloader->loadImage(map["productthumb"].toString(), recipeItem->itemImage(),"/products/",".png");
//set labels
recipeItem->setTitle(map["productname"].toString());
recipeItem->setDescription("Credits: " + map["productprice"].toString() + "\nCards: "+map["productnumcards"].toString());
}