本文整理汇总了C++中CGUIImage::SetInvalid方法的典型用法代码示例。如果您正苦于以下问题:C++ CGUIImage::SetInvalid方法的具体用法?C++ CGUIImage::SetInvalid怎么用?C++ CGUIImage::SetInvalid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGUIImage
的用法示例。
在下文中一共展示了CGUIImage::SetInvalid方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnSettingChanged
void CGUIDialogProfileSettings::OnSettingChanged(SettingInfo &setting)
{
// check and update anything that needs it
if (setting.id == 1)
{
if (CGUIKeyboardFactory::ShowAndGetInput(m_strName,g_localizeStrings.Get(20093),false))
{
m_bNeedSave = true;
SET_CONTROL_LABEL(1000,m_strName);
}
}
if (setting.id == 2)
{
CStdString strThumb;
VECSOURCES shares;
g_mediaManager.GetLocalDrives(shares);
CFileItemList items;
if (!m_strThumb.IsEmpty())
{
CFileItemPtr item(new CFileItem("thumb://Current", false));
item->SetArt("thumb", m_strThumb);
item->SetLabel(g_localizeStrings.Get(20016));
items.Add(item);
}
CFileItemPtr item(new CFileItem("thumb://None", false));
item->SetArt("thumb", m_strDefaultImage);
item->SetLabel(g_localizeStrings.Get(20018));
items.Add(item);
if (CGUIDialogFileBrowser::ShowAndGetImage(items,shares,g_localizeStrings.Get(1030),strThumb) &&
!strThumb.Equals("thumb://Current"))
{
m_bNeedSave = true;
m_strThumb = strThumb.Equals("thumb://None") ? "" : strThumb;
CGUIImage *pImage = (CGUIImage*)GetControl(2);
if (pImage)
{
pImage->SetFileName("");
pImage->SetInvalid();
pImage->SetFileName(!m_strThumb.IsEmpty() ? m_strThumb : m_strDefaultImage);
}
}
}
if (setting.id == 3)
{
if (OnProfilePath(m_strDirectory, m_bIsDefault))
{
m_bNeedSave = true;
SET_CONTROL_LABEL(1001,m_strDirectory);
}
}
if (setting.id == 4)
{
if (m_bShowDetails)
{
if (CProfilesManager::Get().GetMasterProfile().getLockMode() == LOCK_MODE_EVERYONE && !m_bIsDefault)
{
if (CGUIDialogYesNo::ShowAndGetInput(20066,20118,20119,20022))
g_passwordManager.SetMasterLockMode(false);
if (CProfilesManager::Get().GetMasterProfile().getLockMode() == LOCK_MODE_EVERYONE)
return;
}
if (CGUIDialogLockSettings::ShowAndGetLock(m_locks, m_bIsDefault ? 12360 : 20068, CProfilesManager::Get().GetMasterProfile().getLockMode() == LOCK_MODE_EVERYONE || m_bIsDefault))
m_bNeedSave = true;
}
else
{
if (CGUIDialogLockSettings::ShowAndGetLock(m_locks, m_bIsDefault ? 12360 : 20068, false, false))
m_bNeedSave = true;
}
}
if (setting.id > 4)
m_bNeedSave = true;
}