本文整理汇总了C++中CGUIDialogBusy类的典型用法代码示例。如果您正苦于以下问题:C++ CGUIDialogBusy类的具体用法?C++ CGUIDialogBusy怎么用?C++ CGUIDialogBusy使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CGUIDialogBusy类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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();
}
示例2: 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();
}
示例3: OnWake
void CPowerManager::OnWake()
{
CLog::Log(LOGNOTICE, "%s: Running resume jobs", __FUNCTION__);
// reset out timers
g_application.ResetShutdownTimers();
CGUIDialogBusy* dialog = (CGUIDialogBusy*)g_windowManager.GetWindow(WINDOW_DIALOG_BUSY);
if (dialog)
dialog->Close();
#if defined(HAS_SDL) || defined(TARGET_WINDOWS)
if (g_Windowing.IsFullScreen())
{
#if defined(TARGET_WINDOWS)
ShowWindow(g_hWnd,SW_RESTORE);
SetForegroundWindow(g_hWnd);
#endif
}
g_application.ResetScreenSaver();
#endif
// restart lirc
#if defined(HAS_LIRC) || defined(HAS_IRSERVERSUITE)
CLog::Log(LOGNOTICE, "%s: Restarting lirc", __FUNCTION__);
CBuiltins::Execute("LIRC.Start");
#endif
CAEFactory::Resume();
g_application.UpdateLibraries();
g_weatherManager.Refresh();
CAnnouncementManager::Get().Announce(System, "xbmc", "OnWake");
}
示例4: OnWake
void CPowerManager::OnWake()
{
CLog::Log(LOGNOTICE, "%s: Running resume jobs", __FUNCTION__);
CServiceBroker::GetNetwork().WaitForNet();
// reset out timers
g_application.ResetShutdownTimers();
CGUIDialogBusy* dialog = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIDialogBusy>(WINDOW_DIALOG_BUSY);
if (dialog)
dialog->Close(true); // force close. no closing animation, sound etc at this early stage
#if defined(HAS_SDL) || defined(TARGET_WINDOWS)
if (CServiceBroker::GetWinSystem()->IsFullScreen())
{
#if defined(TARGET_WINDOWS_DESKTOP)
ShowWindow(g_hWnd, SW_RESTORE);
SetForegroundWindow(g_hWnd);
#endif
}
g_application.ResetScreenSaver();
#endif
CServiceBroker::GetActiveAE()->Resume();
g_application.UpdateLibraries();
CServiceBroker::GetWeatherManager().Refresh();
CServiceBroker::GetPVRManager().OnWake();
RestorePlayerState();
CAnnouncementManager::GetInstance().Announce(System, "xbmc", "OnWake");
}
示例5: 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;
}
示例6: 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;
}
示例7: Hibernate
bool CPowerManager::Hibernate()
{
if (CanHibernate() && m_instance->Hibernate())
{
CGUIDialogBusy* dialog = (CGUIDialogBusy*)g_windowManager.GetWindow(WINDOW_DIALOG_BUSY);
if (dialog)
dialog->Show();
return true;
}
return false;
}
示例8: 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;
}
示例9: Powerdown
bool CPowerManager::Powerdown()
{
if (CanPowerdown() && m_instance->Powerdown())
{
CGUIDialogBusy* dialog = g_windowManager.GetWindow<CGUIDialogBusy>();
if (dialog)
dialog->Open();
return true;
}
return false;
}
示例10: CanReboot
bool CPowerManager::Reboot()
{
bool success = CanReboot() ? m_instance->Reboot() : false;
if (success)
{
CAnnouncementManager::Get().Announce(System, "xbmc", "OnRestart");
CGUIDialogBusy* dialog = (CGUIDialogBusy*)g_windowManager.GetWindow(WINDOW_DIALOG_BUSY);
if (dialog)
dialog->Show();
}
return success;
}
示例11: CanReboot
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;
}
示例12: CanReboot
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;
}
示例13: 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();
}
示例14: 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();
}
示例15: OpenFile
bool CUPnPPlayer::OpenFile(const CFileItem& file, const CPlayerOptions& options)
{
CGUIDialogBusy* dialog = NULL;
XbmcThreads::EndTime timeout(10000);
/* if no path we want to attach to a already playing player */
if(file.GetPath() == "")
{
NPT_CHECK_LABEL_SEVERE(m_control->GetTransportInfo(m_delegate->m_device
, m_delegate->m_instance
, m_delegate), failed);
NPT_CHECK_LABEL_SEVERE(WaitOnEvent(m_delegate->m_traevnt, timeout, dialog), failed);
/* make sure the attached player is actually playing */
{ CSingleLock lock(m_delegate->m_section);
if(m_delegate->m_trainfo.cur_transport_state != "PLAYING"
&& m_delegate->m_trainfo.cur_transport_state != "PAUSED_PLAYBACK")
goto failed;
}
}
else
NPT_CHECK_LABEL_SEVERE(PlayFile(file, options, dialog, timeout), failed);
m_stopremote = true;
m_started = true;
m_callback.OnPlayBackStarted();
NPT_CHECK_LABEL_SEVERE(m_control->GetPositionInfo(m_delegate->m_device
, m_delegate->m_instance
, m_delegate), failed);
NPT_CHECK_LABEL_SEVERE(m_control->GetMediaInfo(m_delegate->m_device
, m_delegate->m_instance
, m_delegate), failed);
if(dialog)
dialog->Close();
return true;
failed:
CLog::Log(LOGERROR, "UPNP: CUPnPPlayer::OpenFile - unable to open file %s", file.GetPath().c_str());
if(dialog)
dialog->Close();
return false;
}