本文整理汇总了C++中Metadata::LogoUrl方法的典型用法代码示例。如果您正苦于以下问题:C++ Metadata::LogoUrl方法的具体用法?C++ Metadata::LogoUrl怎么用?C++ Metadata::LogoUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Metadata
的用法示例。
在下文中一共展示了Metadata::LogoUrl方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: streamItemVisible
void StreamView::streamItemVisible(MythUIButtonListItem *item)
{
if (!item)
return;
if (!item->GetText("imageloaded").isEmpty())
return;
Metadata *mdata = qVariantValue<Metadata*> (item->GetData());
if (mdata)
{
if (!mdata->LogoUrl().isEmpty())
{
QString artFile = findIcon("stream", QString("%1").arg(mdata->ID()));
if (artFile.isEmpty())
{
// download image and cache it for later
QUrl url(mdata->LogoUrl());
QFileInfo fi(url.path());
QString saveFilename = GetConfDir() + QString("/MythMusic/Icons/%1/%2.%3")
.arg("stream").arg(mdata->ID()).arg(fi.suffix());
GetMythDownloadManager()->queueDownload(mdata->LogoUrl(), saveFilename, this);
}
else
{
item->SetImage(artFile);
}
}
else
item->SetImage("");
}
item->SetText(" ", "imageloaded");
}
示例2: streamVisible
void SearchStream::streamVisible(MythUIButtonListItem *item)
{
if (!item)
return;
Metadata *mdata = qVariantValue<Metadata*> (item->GetData());
if (mdata)
{
if (item->GetText("dummy") == " ")
{
item->SetImage(mdata->LogoUrl());
item->SetText("", "dummy");
}
}
}
示例3: customEvent
//.........这里部分代码省略.........
else if (event->type() == OutputEvent::Buffering)
{
}
else if (event->type() == MythEvent::MythEventMessage)
{
MythEvent *me = (MythEvent *)event;
QStringList tokens = me->Message().split(" ", QString::SkipEmptyParts);
if (tokens.isEmpty())
return;
if (tokens[0] == "DOWNLOAD_FILE")
{
QStringList args = me->ExtraDataList();
if (tokens[1] == "UPDATE")
{
}
else if (tokens[1] == "FINISHED")
{
QString url = args[0];
int fileSize = args[2].toInt();
int errorCode = args[4].toInt();
QString filename = args[1];
if ((errorCode != 0) || (fileSize == 0))
LOG(VB_GENERAL, LOG_ERR, QString("StreamView: failed to download radio icon from '%1'").arg(url));
else
{
for (int x = 0; x < m_streamList->GetCount(); x++)
{
MythUIButtonListItem *item = m_streamList->GetItemAt(x);
Metadata *mdata = qVariantValue<Metadata*> (item->GetData());
if (mdata && mdata->LogoUrl() == url)
item->SetImage(filename);
}
}
}
}
}
else if (event->type() == DecoderHandlerEvent::OperationStart)
{
DecoderHandlerEvent *dhe = dynamic_cast<DecoderHandlerEvent*>(event);
if (!dhe)
return;
if (dhe->getMessage() && m_bufferStatus)
{
m_bufferStatus->SetText(*dhe->getMessage());
}
}
else if (event->type() == DecoderHandlerEvent::BufferStatus)
{
DecoderHandlerEvent *dhe = dynamic_cast<DecoderHandlerEvent*>(event);
if (!dhe)
return;
int available, maxSize;
dhe->getBufferStatus(&available, &maxSize);
if (m_bufferStatus)
{
QString status = QString("%1%").arg((int)(100.0 / ((double)maxSize / (double)available)));
m_bufferStatus->SetText(status);
}
if (m_bufferProgress)