本文整理汇总了C++中MythUIButtonListItem::setChecked方法的典型用法代码示例。如果您正苦于以下问题:C++ MythUIButtonListItem::setChecked方法的具体用法?C++ MythUIButtonListItem::setChecked怎么用?C++ MythUIButtonListItem::setChecked使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MythUIButtonListItem
的用法示例。
在下文中一共展示了MythUIButtonListItem::setChecked方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadDirectory
void IconView::LoadDirectory(const QString &dir)
{
if (m_thumbGen && m_thumbGen->isRunning())
m_thumbGen->cancel();
if (m_childCountThread && m_childCountThread->isRunning())
m_childCountThread->cancel();
QDir d(dir);
if (!d.exists())
{
LOG(VB_GENERAL, LOG_ERR, LOC + "LoadDirectory called with " +
QString("non-existant directory: '%1'").arg(dir));
return;
}
m_showDevices = false;
m_currDir = d.absolutePath();
while (!m_itemList.isEmpty())
delete m_itemList.takeFirst();
m_itemHash.clear();
m_imageList->Reset();
m_isGallery = GalleryUtil::LoadDirectory(m_itemList, dir, *m_galleryFilter,
false, &m_itemHash, m_thumbGen);
if (m_thumbGen && !m_thumbGen->isRunning())
m_thumbGen->start();
ThumbItem *thumbitem;
for (int x = 0; x < m_itemList.size(); x++)
{
thumbitem = m_itemList.at(x);
thumbitem->InitCaption(m_showcaption);
MythUIButtonListItem* item =
new MythUIButtonListItem(m_imageList, thumbitem->GetCaption(), 0,
true, MythUIButtonListItem::NotChecked);
item->SetData(qVariantFromValue(thumbitem));
if (thumbitem->IsDir())
{
item->DisplayState("subfolder", "nodetype");
m_childCountThread->addFile(thumbitem->GetPath());
}
LoadThumbnail(thumbitem);
if (QFile(thumbitem->GetImageFilename()).exists())
item->SetImage(thumbitem->GetImageFilename());
if (m_itemMarked.contains(thumbitem->GetPath()))
item->setChecked(MythUIButtonListItem::FullChecked);
}
if (m_childCountThread && !m_childCountThread->isRunning())
m_childCountThread->start();
if (m_noImagesText)
m_noImagesText->SetVisible(m_itemList.isEmpty());
if (!m_itemList.isEmpty())
{
UpdateText(m_imageList->GetItemCurrent());
UpdateImage(m_imageList->GetItemCurrent());
}
}