本文整理汇总了C++中CGUIDialogProgressBarHandle::SetTitle方法的典型用法代码示例。如果您正苦于以下问题:C++ CGUIDialogProgressBarHandle::SetTitle方法的具体用法?C++ CGUIDialogProgressBarHandle::SetTitle怎么用?C++ CGUIDialogProgressBarHandle::SetTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGUIDialogProgressBarHandle
的用法示例。
在下文中一共展示了CGUIDialogProgressBarHandle::SetTitle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: update
void DialogProgressBG::update(int percent, const String& heading, const String& message)
{
DelayedCallGuard dcguard(languageHook);
CGUIDialogProgressBarHandle* pHandle = handle;
if (pHandle == NULL)
throw WindowException("Dialog not created.");
if (percent >= 0 && percent <= 100)
pHandle->SetPercentage((float)percent);
if (!heading.empty())
pHandle->SetTitle(heading);
if (!message.empty())
pHandle->SetText(message);
}
示例2: Process
void CEdenVideoArtUpdater::Process()
{
// grab all movies...
CVideoDatabase db;
if (!db.Open())
return;
CFileItemList items;
CGUIDialogExtendedProgressBar* dialog =
(CGUIDialogExtendedProgressBar*)g_windowManager.GetWindow(WINDOW_DIALOG_EXT_PROGRESS);
CGUIDialogProgressBarHandle *handle = dialog->GetHandle(g_localizeStrings.Get(314));
handle->SetTitle(g_localizeStrings.Get(12349));
// movies
db.GetMoviesByWhere("videodb://movies/titles/", CDatabase::Filter(), items);
for (int i = 0; i < items.Size(); i++)
{
CFileItemPtr item = items[i];
handle->SetProgress(i, items.Size());
handle->SetText(StringUtils::Format(g_localizeStrings.Get(12350).c_str(), item->GetLabel().c_str()));
string cachedThumb = GetCachedVideoThumb(*item);
string cachedFanart = GetCachedFanart(*item);
item->SetPath(item->GetVideoInfoTag()->m_strFileNameAndPath);
item->GetVideoInfoTag()->m_fanart.Unpack();
item->GetVideoInfoTag()->m_strPictureURL.Parse();
map<string, string> artwork;
if (!db.GetArtForItem(item->GetVideoInfoTag()->m_iDbId, item->GetVideoInfoTag()->m_type, artwork)
|| (artwork.size() == 1 && artwork.find("thumb") != artwork.end()))
{
CStdString art = CVideoInfoScanner::GetImage(item.get(), true, item->GetVideoInfoTag()->m_basePath != item->GetPath(), "thumb");
std::string type;
if (CacheTexture(art, cachedThumb, item->GetLabel(), type))
artwork.insert(make_pair(type, art));
art = CVideoInfoScanner::GetFanart(item.get(), true);
if (CacheTexture(art, cachedFanart, item->GetLabel()))
artwork.insert(make_pair("fanart", art));
if (artwork.empty())
artwork.insert(make_pair("thumb", ""));
db.SetArtForItem(item->GetVideoInfoTag()->m_iDbId, item->GetVideoInfoTag()->m_type, artwork);
}
}
items.Clear();
// music videos
db.GetMusicVideosNav("videodb://musicvideos/titles/", items, false);
for (int i = 0; i < items.Size(); i++)
{
CFileItemPtr item = items[i];
handle->SetProgress(i, items.Size());
handle->SetText(StringUtils::Format(g_localizeStrings.Get(12350).c_str(), item->GetLabel().c_str()));
string cachedThumb = GetCachedVideoThumb(*item);
string cachedFanart = GetCachedFanart(*item);
item->SetPath(item->GetVideoInfoTag()->m_strFileNameAndPath);
item->GetVideoInfoTag()->m_fanart.Unpack();
item->GetVideoInfoTag()->m_strPictureURL.Parse();
map<string, string> artwork;
if (!db.GetArtForItem(item->GetVideoInfoTag()->m_iDbId, item->GetVideoInfoTag()->m_type, artwork)
|| (artwork.size() == 1 && artwork.find("thumb") != artwork.end()))
{
CStdString art = CVideoInfoScanner::GetImage(item.get(), true, item->GetVideoInfoTag()->m_basePath != item->GetPath(), "thumb");
std::string type;
if (CacheTexture(art, cachedThumb, item->GetLabel(), type))
artwork.insert(make_pair(type, art));
art = CVideoInfoScanner::GetFanart(item.get(), true);
if (CacheTexture(art, cachedFanart, item->GetLabel()))
artwork.insert(make_pair("fanart", art));
if (artwork.empty())
artwork.insert(make_pair("thumb", ""));
db.SetArtForItem(item->GetVideoInfoTag()->m_iDbId, item->GetVideoInfoTag()->m_type, artwork);
}
}
items.Clear();
// tvshows
// count the number of episodes
db.GetTvShowsNav("videodb://tvshows/titles/", items);
for (int i = 0; i < items.Size(); i++)
{
CFileItemPtr item = items[i];
handle->SetText(StringUtils::Format(g_localizeStrings.Get(12350).c_str(), item->GetLabel().c_str()));
string cachedThumb = GetCachedVideoThumb(*item);
string cachedFanart = GetCachedFanart(*item);
item->SetPath(item->GetVideoInfoTag()->m_strPath);
item->GetVideoInfoTag()->m_fanart.Unpack();
item->GetVideoInfoTag()->m_strPictureURL.Parse();
map<string, string> artwork;
if (!db.GetArtForItem(item->GetVideoInfoTag()->m_iDbId, item->GetVideoInfoTag()->m_type, artwork)
|| (artwork.size() == 1 && artwork.find("thumb") != artwork.end()))
//.........这里部分代码省略.........