本文整理汇总了C++中CFileItemList::GetFolderCount方法的典型用法代码示例。如果您正苦于以下问题:C++ CFileItemList::GetFolderCount方法的具体用法?C++ CFileItemList::GetFolderCount怎么用?C++ CFileItemList::GetFolderCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFileItemList
的用法示例。
在下文中一共展示了CFileItemList::GetFolderCount方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ByFiles
/// \brief Auto Switch method based on the current directory \e not containing ALL files and \e atleast one non-default thumb
/// \param bHideParentDirItems - are we not counting the ".." item?
/// \param vecItems Vector of FileItems
bool CAutoSwitch::ByFiles(bool bHideParentDirItems, const CFileItemList& vecItems)
{
bool bThumbs = false;
int iCompare = 0;
// parent directorys are visible, incrememt
if (!bHideParentDirItems)
{
iCompare = 1;
}
// confirm the list is not just files and folderback
if (vecItems.GetFolderCount() > iCompare)
{
// test for thumbs
for (int i = 0; i < vecItems.Size(); i++)
{
const CFileItemPtr pItem = vecItems[i];
if (pItem->HasArt("thumb"))
{
bThumbs = true;
break;
}
}
}
return bThumbs;
}
示例2: OnPrepareFileItems
void CGUIWindowPictures::OnPrepareFileItems(CFileItemList& items)
{
CGUIMediaWindow::OnPrepareFileItems(items);
for (int i=0;i<items.Size();++i )
if (items[i]->GetLabel().Equals("folder.jpg"))
items.Remove(i);
if (items.GetFolderCount()==items.Size() || !CSettings::Get().GetBool("pictures.usetags"))
return;
// Start the music info loader thread
CPictureInfoLoader loader;
loader.SetProgressCallback(m_dlgProgress);
loader.Load(items);
bool bShowProgress=!g_windowManager.HasModalDialog();
bool bProgressVisible=false;
unsigned int tick=XbmcThreads::SystemClockMillis();
while (loader.IsLoading() && m_dlgProgress && !m_dlgProgress->IsCanceled())
{
if (bShowProgress)
{ // Do we have to init a progress dialog?
unsigned int elapsed=XbmcThreads::SystemClockMillis()-tick;
if (!bProgressVisible && elapsed>1500 && m_dlgProgress)
{ // tag loading takes more then 1.5 secs, show a progress dialog
CURL url(items.GetPath());
m_dlgProgress->SetHeading(189);
m_dlgProgress->SetLine(0, 505);
m_dlgProgress->SetLine(1, "");
m_dlgProgress->SetLine(2, url.GetWithoutUserDetails());
m_dlgProgress->StartModal();
m_dlgProgress->ShowProgressBar(true);
bProgressVisible = true;
}
if (bProgressVisible && m_dlgProgress)
{ // keep GUI alive
m_dlgProgress->Progress();
}
} // if (bShowProgress)
Sleep(1);
} // while (loader.IsLoading())
if (bProgressVisible && m_dlgProgress)
m_dlgProgress->Close();
}
示例3: OnPrepareFileItems
void CGUIWindowPictures::OnPrepareFileItems(CFileItemList& items)
{
CGUIMediaWindow::OnPrepareFileItems(items);
for (int i=0;i<items.Size();++i )
if (StringUtils::EqualsNoCase(items[i]->GetLabel(), "folder.jpg"))
items.Remove(i);
if (items.GetFolderCount() == items.Size() || !CServiceBroker::GetSettings().GetBool(CSettings::SETTING_PICTURES_USETAGS))
return;
// Start the music info loader thread
CPictureInfoLoader loader;
loader.SetProgressCallback(m_dlgProgress);
loader.Load(items);
bool bShowProgress = !CServiceBroker::GetGUI()->GetWindowManager().HasModalDialog(true);
bool bProgressVisible = false;
unsigned int tick=XbmcThreads::SystemClockMillis();
while (loader.IsLoading() && m_dlgProgress && !m_dlgProgress->IsCanceled())
{
if (bShowProgress)
{ // Do we have to init a progress dialog?
unsigned int elapsed=XbmcThreads::SystemClockMillis()-tick;
if (!bProgressVisible && elapsed>1500 && m_dlgProgress)
{ // tag loading takes more then 1.5 secs, show a progress dialog
CURL url(items.GetPath());
m_dlgProgress->SetHeading(CVariant{189});
m_dlgProgress->SetLine(0, CVariant{505});
m_dlgProgress->SetLine(1, CVariant{""});
m_dlgProgress->SetLine(2, CVariant{url.GetWithoutUserDetails()});
m_dlgProgress->Open();
m_dlgProgress->ShowProgressBar(true);
bProgressVisible = true;
}
if (bProgressVisible && m_dlgProgress)
{ // keep GUI alive
m_dlgProgress->Progress();
}
} // if (bShowProgress)
Sleep(1);
} // while (loader.IsLoading())
if (bProgressVisible && m_dlgProgress)
m_dlgProgress->Close();
}
示例4: OnRetrieveMusicInfo
void CGUIWindowMusicBase::OnRetrieveMusicInfo(CFileItemList& items)
{
if (items.GetFolderCount()==items.Size() || items.IsMusicDb() ||
(!g_guiSettings.GetBool("musicfiles.usetags") && !items.IsCDDA()))
{
return;
}
// Start the music info loader thread
m_musicInfoLoader.SetProgressCallback(m_dlgProgress);
m_musicInfoLoader.Load(items);
bool bShowProgress=!m_gWindowManager.HasModalDialog();
bool bProgressVisible=false;
DWORD dwTick=timeGetTime();
while (m_musicInfoLoader.IsLoading())
{
if (bShowProgress)
{ // Do we have to init a progress dialog?
DWORD dwElapsed=timeGetTime()-dwTick;
if (!bProgressVisible && dwElapsed>1500 && m_dlgProgress)
{ // tag loading takes more then 1.5 secs, show a progress dialog
CURL url(items.m_strPath);
CStdString strStrippedPath;
url.GetURLWithoutUserDetails(strStrippedPath);
m_dlgProgress->SetHeading(189);
m_dlgProgress->SetLine(0, 505);
m_dlgProgress->SetLine(1, "");
m_dlgProgress->SetLine(2, strStrippedPath );
m_dlgProgress->StartModal();
m_dlgProgress->ShowProgressBar(true);
bProgressVisible = true;
}
if (bProgressVisible && m_dlgProgress && !m_dlgProgress->IsCanceled())
{ // keep GUI alive
m_dlgProgress->Progress();
}
} // if (bShowProgress)
Sleep(1);
} // while (m_musicInfoLoader.IsLoading())
if (bProgressVisible && m_dlgProgress)
m_dlgProgress->Close();
}
示例5: OnRetrieveMusicInfo
void CGUIWindowMusicBase::OnRetrieveMusicInfo(CFileItemList& items)
{
if (items.GetFolderCount()==items.Size() || items.IsMusicDb() ||
(!CSettings::Get().GetBool("musicfiles.usetags") && !items.IsCDDA()))
{
return;
}
// Start the music info loader thread
m_musicInfoLoader.SetProgressCallback(m_dlgProgress);
m_musicInfoLoader.Load(items);
bool bShowProgress=!g_windowManager.HasModalDialog();
bool bProgressVisible=false;
unsigned int tick=XbmcThreads::SystemClockMillis();
while (m_musicInfoLoader.IsLoading())
{
if (bShowProgress)
{ // Do we have to init a progress dialog?
unsigned int elapsed=XbmcThreads::SystemClockMillis()-tick;
if (!bProgressVisible && elapsed>1500 && m_dlgProgress)
{ // tag loading takes more then 1.5 secs, show a progress dialog
CURL url(items.GetPath());
std::string strStrippedPath = url.GetWithoutUserDetails();
m_dlgProgress->SetHeading(189);
m_dlgProgress->SetLine(0, 505);
m_dlgProgress->SetLine(1, "");
m_dlgProgress->SetLine(2, strStrippedPath );
m_dlgProgress->StartModal();
m_dlgProgress->ShowProgressBar(true);
bProgressVisible = true;
}
if (bProgressVisible && m_dlgProgress && !m_dlgProgress->IsCanceled())
{ // keep GUI alive
m_dlgProgress->Progress();
}
} // if (bShowProgress)
Sleep(1);
} // while (m_musicInfoLoader.IsLoading())
if (bProgressVisible && m_dlgProgress)
m_dlgProgress->Close();
}
示例6: OnRetrieveMusicInfo
void CGUIWindowMusicBase::OnRetrieveMusicInfo(CFileItemList& items)
{
if (items.GetFolderCount()==items.Size() || items.IsMusicDb() ||
(!CServiceBroker::GetSettings().GetBool(CSettings::SETTING_MUSICFILES_USETAGS) && !items.IsCDDA()))
{
return;
}
// Start the music info loader thread
m_musicInfoLoader.SetProgressCallback(m_dlgProgress);
m_musicInfoLoader.Load(items);
bool bShowProgress=!g_windowManager.HasModalDialog();
bool bProgressVisible=false;
unsigned int tick=XbmcThreads::SystemClockMillis();
while (m_musicInfoLoader.IsLoading())
{
if (bShowProgress)
{ // Do we have to init a progress dialog?
unsigned int elapsed=XbmcThreads::SystemClockMillis()-tick;
if (!bProgressVisible && elapsed>1500 && m_dlgProgress)
{ // tag loading takes more then 1.5 secs, show a progress dialog
CURL url(items.GetPath());
m_dlgProgress->SetHeading(CVariant{189});
m_dlgProgress->SetLine(0, CVariant{505});
m_dlgProgress->SetLine(1, CVariant{""});
m_dlgProgress->SetLine(2, CVariant{url.GetWithoutUserDetails()});
m_dlgProgress->Open();
m_dlgProgress->ShowProgressBar(true);
bProgressVisible = true;
}
if (bProgressVisible && m_dlgProgress && !m_dlgProgress->IsCanceled())
{ // keep GUI alive
m_dlgProgress->Progress();
}
} // if (bShowProgress)
Sleep(1);
} // while (m_musicInfoLoader.IsLoading())
if (bProgressVisible && m_dlgProgress)
m_dlgProgress->Close();
}
示例7: ByFolders
/// \brief Auto Switch method based on the current directory \e containing ALL folders and \e atleast one non-default thumb
/// \param vecItems Vector of FileItems
bool CAutoSwitch::ByFolders(const CFileItemList& vecItems)
{
bool bThumbs = false;
// is the list all folders?
if (vecItems.GetFolderCount() == vecItems.Size())
{
// test for thumbs
for (int i = 0; i < vecItems.Size(); i++)
{
const CFileItemPtr pItem = vecItems[i];
if (pItem->HasArt("thumb"))
{
bThumbs = true;
break;
}
}
}
return bThumbs;
}