本文整理汇总了C++中CGUIDialogBusy::Open方法的典型用法代码示例。如果您正苦于以下问题:C++ CGUIDialogBusy::Open方法的具体用法?C++ CGUIDialogBusy::Open怎么用?C++ CGUIDialogBusy::Open使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGUIDialogBusy
的用法示例。
在下文中一共展示了CGUIDialogBusy::Open方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WaitOnEvent
bool CGUIDialogBusy::WaitOnEvent(CEvent &event, unsigned int displaytime /* = 100 */, bool allowCancel /* = true */)
{
bool cancelled = false;
if (!event.WaitMSec(displaytime))
{
// throw up the progress
CGUIDialogBusy* dialog = g_windowManager.GetWindow<CGUIDialogBusy>(WINDOW_DIALOG_BUSY);
if (dialog)
{
dialog->Open();
while(!event.WaitMSec(1))
{
dialog->ProcessRenderLoop(false);
if (allowCancel && dialog->IsCanceled())
{
cancelled = true;
break;
}
}
dialog->Close();
}
}
return !cancelled;
}
示例2: OnSleep
void CPowerManager::OnSleep()
{
CAnnouncementManager::GetInstance().Announce(System, "xbmc", "OnSleep");
CGUIDialogBusy* dialog = g_windowManager.GetWindow<CGUIDialogBusy>(WINDOW_DIALOG_BUSY);
if (dialog)
dialog->Open();
CLog::Log(LOGNOTICE, "%s: Running sleep jobs", __FUNCTION__);
// stop lirc
if (CBuiltins::GetInstance().HasCommand("LIRC.Stop"))
{
CLog::Log(LOGNOTICE, "%s: Stopping lirc", __FUNCTION__);
CBuiltins::GetInstance().Execute("LIRC.Stop");
}
CServiceBroker::GetPVRManager().OnSleep();
StorePlayerState();
g_application.StopPlaying();
g_application.StopShutdownTimer();
g_application.StopScreenSaverTimer();
g_application.CloseNetworkShares();
CServiceBroker::GetActiveAE().Suspend();
}
示例3: OnSleep
void CPowerManager::OnSleep()
{
CAnnouncementManager::GetInstance().Announce(System, "xbmc", "OnSleep");
CGUIDialogBusy* dialog = (CGUIDialogBusy*)g_windowManager.GetWindow(WINDOW_DIALOG_BUSY);
if (dialog)
dialog->Open();
CLog::Log(LOGNOTICE, "%s: Running sleep jobs", __FUNCTION__);
// stop lirc
#if defined(HAS_LIRC) || defined(HAS_IRSERVERSUITE)
CLog::Log(LOGNOTICE, "%s: Stopping lirc", __FUNCTION__);
CBuiltins::GetInstance().Execute("LIRC.Stop");
#endif
PVR::CPVRManager::GetInstance().SetWakeupCommand();
PVR::CPVRManager::GetInstance().OnSleep();
g_application.SaveFileState(true);
g_application.StopPlaying();
g_application.StopShutdownTimer();
g_application.StopScreenSaverTimer();
g_application.CloseNetworkShares();
CAEFactory::Suspend();
}
示例4: Powerdown
bool CPowerManager::Powerdown()
{
if (CanPowerdown() && m_instance->Powerdown())
{
CGUIDialogBusy* dialog = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIDialogBusy>(WINDOW_DIALOG_BUSY);
if (dialog)
dialog->Open();
return true;
}
return false;
}
示例5: Powerdown
bool CPowerManager::Powerdown()
{
if (CanPowerdown() && m_instance->Powerdown())
{
CGUIDialogBusy* dialog = (CGUIDialogBusy*)g_windowManager.GetWindow(WINDOW_DIALOG_BUSY);
if (dialog)
dialog->Open();
return true;
}
return false;
}
示例6: Powerdown
bool CPowerManager::Powerdown()
{
if (CanPowerdown() && m_instance->Powerdown())
{
CGUIDialogBusy* dialog = g_windowManager.GetWindow<CGUIDialogBusy>();
if (dialog)
dialog->Open();
return true;
}
return false;
}
示例7: Reboot
bool CPowerManager::Reboot()
{
bool success = CanReboot() ? m_instance->Reboot() : false;
if (success)
{
CAnnouncementManager::GetInstance().Announce(System, "xbmc", "OnRestart");
CGUIDialogBusy* dialog = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIDialogBusy>(WINDOW_DIALOG_BUSY);
if (dialog)
dialog->Open();
}
return success;
}
示例8: Reboot
bool CPowerManager::Reboot()
{
bool success = CanReboot() ? m_instance->Reboot() : false;
if (success)
{
CAnnouncementManager::GetInstance().Announce(System, "xbmc", "OnRestart");
CGUIDialogBusy* dialog = g_windowManager.GetWindow<CGUIDialogBusy>();
if (dialog)
dialog->Open();
}
return success;
}
示例9: SaveList
void CGUIDialogAudioDSPManager::SaveList(void)
{
if (!m_bContainsChanges)
return;
/* display the progress dialog */
CGUIDialogBusy* pDlgBusy = g_windowManager.GetWindow<CGUIDialogBusy>(WINDOW_DIALOG_BUSY);
if (!pDlgBusy)
{
helper_LogError(__FUNCTION__);
return;
}
pDlgBusy->Open();
pDlgBusy->Close();
}
示例10: OnSleep
void CPowerManager::OnSleep()
{
CAnnouncementManager::GetInstance().Announce(System, "xbmc", "OnSleep");
CGUIDialogBusy* dialog = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIDialogBusy>(WINDOW_DIALOG_BUSY);
if (dialog)
dialog->Open();
CLog::Log(LOGNOTICE, "%s: Running sleep jobs", __FUNCTION__);
CServiceBroker::GetPVRManager().OnSleep();
StorePlayerState();
g_application.StopPlaying();
g_application.StopShutdownTimer();
g_application.StopScreenSaverTimer();
g_application.CloseNetworkShares();
CServiceBroker::GetActiveAE()->Suspend();
}
示例11: GetDirectory
bool CDirectory::GetDirectory(const CURL& url, CFileItemList &items, const CHints &hints, bool allowThreads)
{
try
{
CURL realURL = URIUtils::SubstitutePath(url);
std::shared_ptr<IDirectory> pDirectory(CDirectoryFactory::Create(realURL));
if (!pDirectory.get())
return false;
// check our cache for this path
if (g_directoryCache.GetDirectory(realURL.Get(), items, (hints.flags & DIR_FLAG_READ_CACHE) == DIR_FLAG_READ_CACHE))
items.SetURL(url);
else
{
// need to clear the cache (in case the directory fetch fails)
// and (re)fetch the folder
if (!(hints.flags & DIR_FLAG_BYPASS_CACHE))
g_directoryCache.ClearDirectory(realURL.Get());
pDirectory->SetFlags(hints.flags);
bool result = false, cancel = false;
while (!result && !cancel)
{
const std::string pathToUrl(url.Get());
if (g_application.IsCurrentThread() && allowThreads && !URIUtils::IsSpecial(pathToUrl))
{
CSingleExit ex(g_graphicsContext);
CGetDirectory get(pDirectory, realURL, url);
if(!get.Wait(TIME_TO_BUSY_DIALOG))
{
CGUIDialogBusy* dialog = (CGUIDialogBusy*)g_windowManager.GetWindow(WINDOW_DIALOG_BUSY);
if (dialog)
{
dialog->Open();
while(!get.Wait(10))
{
CSingleLock lock(g_graphicsContext);
// update progress
float progress = pDirectory->GetProgress();
if (progress > 0)
dialog->SetProgress(progress);
if (dialog->IsCanceled())
{
cancel = true;
pDirectory->CancelDirectory();
break;
}
lock.Leave(); // prevent an occasional deadlock on exit
g_windowManager.ProcessRenderLoop(false);
}
dialog->Close();
}
}
result = get.GetDirectory(items);
}
else
{
items.SetURL(url);
result = pDirectory->GetDirectory(realURL, items);
}
if (!result)
{
if (!cancel && g_application.IsCurrentThread() && pDirectory->ProcessRequirements())
continue;
CLog::Log(LOGERROR, "%s - Error getting %s", __FUNCTION__, url.GetRedacted().c_str());
return false;
}
}
// cache the directory, if necessary
if (!(hints.flags & DIR_FLAG_BYPASS_CACHE))
g_directoryCache.SetDirectory(realURL.Get(), items, pDirectory->GetCacheType(url));
}
// now filter for allowed files
if (!pDirectory->AllowAll())
{
pDirectory->SetMask(hints.mask);
for (int i = 0; i < items.Size(); ++i)
{
CFileItemPtr item = items[i];
if (!item->m_bIsFolder && !pDirectory->IsAllowed(item->GetURL()))
{
items.Remove(i);
i--; // don't confuse loop
}
}
}
// filter hidden files
// TODO: we shouldn't be checking the gui setting here, callers should use getHidden instead
if (!CSettings::Get().GetBool("filelists.showhidden") && !(hints.flags & DIR_FLAG_GET_HIDDEN))
{
//.........这里部分代码省略.........
示例12: Update
void CGUIDialogAudioDSPManager::Update()
{
CGUIDialogBusy* pDlgBusy = (CGUIDialogBusy*)g_windowManager.GetWindow(WINDOW_DIALOG_BUSY);
if (!pDlgBusy)
{
helper_LogError(__FUNCTION__);
return;
}
pDlgBusy->Open();
Clear();
AE_DSP_MODELIST modes;
CActiveAEDSPDatabase db;
if (!db.Open())
{
pDlgBusy->Close();
CLog::Log(LOGERROR, "DSP Manager - %s - Could not open DSP database for update!", __FUNCTION__);
return;
}
for (int iModeType = 0; iModeType < AE_DSP_MODE_TYPE_MAX; iModeType++)
{
modes.clear();
db.GetModes(modes, iModeType);
// No modes available, nothing to do.
if (!modes.empty())
{
AE_DSP_MENUHOOK_CAT menuHook = helper_GetMenuHookCategory(iModeType);
int continuesNo = 1;
for (unsigned int iModePtr = 0; iModePtr < modes.size(); iModePtr++)
{
CFileItem *listItem = helper_CreateModeListItem(modes[iModePtr].first, menuHook, &continuesNo);
if (listItem)
{
CFileItemPtr pItem(listItem);
if (pItem->GetProperty("ActiveMode").asBoolean())
{
m_activeItems[iModeType]->Add(pItem);
}
else
{
m_availableItems[iModeType]->Add(pItem);
}
}
g_windowManager.ProcessRenderLoop(false);
}
m_availableItems[iModeType]->Sort(SortByLabel, SortOrderAscending);
if (iModeType == AE_DSP_MODE_TYPE_MASTER_PROCESS)
{
m_activeItems[iModeType]->Sort(SortByLabel, SortOrderAscending);
}
}
}
db.Close();
pDlgBusy->Close();
}