本文整理汇总了C++中CGUIWindowSlideShow::GetCurrentSlide方法的典型用法代码示例。如果您正苦于以下问题:C++ CGUIWindowSlideShow::GetCurrentSlide方法的具体用法?C++ CGUIWindowSlideShow::GetCurrentSlide怎么用?C++ CGUIWindowSlideShow::GetCurrentSlide使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGUIWindowSlideShow
的用法示例。
在下文中一共展示了CGUIWindowSlideShow::GetCurrentSlide方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetBool
bool CPicturesGUIInfo::GetBool(bool& value, const CGUIListItem *gitem, int contextWindow, const CGUIInfo &info) const
{
switch (info.m_info)
{
///////////////////////////////////////////////////////////////////////////////////////////////
// SLIDESHOW_*
///////////////////////////////////////////////////////////////////////////////////////////////
case SLIDESHOW_ISPAUSED:
{
CGUIWindowSlideShow *slideShow = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIWindowSlideShow>(WINDOW_SLIDESHOW);
value = (slideShow && slideShow->IsPaused());
return true;
}
case SLIDESHOW_ISRANDOM:
{
CGUIWindowSlideShow *slideShow = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIWindowSlideShow>(WINDOW_SLIDESHOW);
value = (slideShow && slideShow->IsShuffled());
return true;
}
case SLIDESHOW_ISACTIVE:
{
CGUIWindowSlideShow *slideShow = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIWindowSlideShow>(WINDOW_SLIDESHOW);
value = (slideShow && slideShow->InSlideShow());
return true;
}
case SLIDESHOW_ISVIDEO:
{
CGUIWindowSlideShow *slideShow = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIWindowSlideShow>(WINDOW_SLIDESHOW);
value = (slideShow && slideShow->GetCurrentSlide() && slideShow->GetCurrentSlide()->IsVideo());
return true;
}
}
return false;
}
示例2: OnInitWindow
void CGUIWindowPictures::OnInitWindow()
{
CGUIMediaWindow::OnInitWindow();
if (m_slideShowStarted)
{
CGUIWindowSlideShow* wndw = (CGUIWindowSlideShow*)g_windowManager.GetWindow(WINDOW_SLIDESHOW);
CStdString path;
if (wndw && wndw->GetCurrentSlide())
path = URIUtils::GetDirectory(wndw->GetCurrentSlide()->GetPath());
if (path.Equals(m_vecItems->GetPath()))
{
if (wndw && wndw->GetCurrentSlide())
m_viewControl.SetSelectedItem(wndw->GetCurrentSlide()->GetPath());
m_iSelectedItem = m_viewControl.GetSelectedItem();
}
m_slideShowStarted = false;
}
}
示例3: OnInitWindow
void CGUIWindowPictures::OnInitWindow()
{
CGUIMediaWindow::OnInitWindow();
if (m_slideShowStarted)
{
CGUIWindowSlideShow* wndw = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIWindowSlideShow>(WINDOW_SLIDESHOW);
std::string path;
if (wndw && wndw->GetCurrentSlide())
path = URIUtils::GetDirectory(wndw->GetCurrentSlide()->GetPath());
if (m_vecItems->IsPath(path))
{
if (wndw && wndw->GetCurrentSlide())
m_viewControl.SetSelectedItem(wndw->GetCurrentSlide()->GetPath());
SaveSelectedItemInHistory();
}
m_slideShowStarted = false;
}
}
示例4: ShowPicture
bool CGUIWindowPictures::ShowPicture(int iItem, bool startSlideShow)
{
if ( iItem < 0 || iItem >= (int)m_vecItems->Size() ) return false;
CFileItemPtr pItem = m_vecItems->Get(iItem);
CStdString strPicture = pItem->GetPath();
#ifdef HAS_DVD_DRIVE
if (pItem->IsDVD())
return MEDIA_DETECT::CAutorun::PlayDiscAskResume(m_vecItems->Get(iItem)->GetPath());
#endif
if (pItem->m_bIsShareOrDrive)
return false;
CGUIWindowSlideShow *pSlideShow = (CGUIWindowSlideShow *)g_windowManager.GetWindow(WINDOW_SLIDESHOW);
if (!pSlideShow)
return false;
if (g_application.m_pPlayer->IsPlayingVideo())
g_application.StopPlaying();
pSlideShow->Reset();
for (int i = 0; i < (int)m_vecItems->Size();++i)
{
CFileItemPtr pItem = m_vecItems->Get(i);
if (!pItem->m_bIsFolder && !(URIUtils::IsRAR(pItem->GetPath()) ||
URIUtils::IsZIP(pItem->GetPath())) && (pItem->IsPicture() || (
CSettings::Get().GetBool("pictures.showvideos") &&
pItem->IsVideo())))
{
pSlideShow->Add(pItem.get());
}
}
if (pSlideShow->NumSlides() == 0)
return false;
pSlideShow->Select(strPicture);
if (startSlideShow)
pSlideShow->StartSlideShow();
else
{
CVariant param;
param["player"]["speed"] = 1;
param["player"]["playerid"] = PLAYLIST_PICTURE;
ANNOUNCEMENT::CAnnouncementManager::Get().Announce(ANNOUNCEMENT::Player, "xbmc", "OnPlay", pSlideShow->GetCurrentSlide(), param);
}
m_slideShowStarted = true;
g_windowManager.ActivateWindow(WINDOW_SLIDESHOW);
return true;
}