本文整理汇总了C++中KviThemeInfo::isBuiltin方法的典型用法代码示例。如果您正苦于以下问题:C++ KviThemeInfo::isBuiltin方法的具体用法?C++ KviThemeInfo::isBuiltin怎么用?C++ KviThemeInfo::isBuiltin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KviThemeInfo
的用法示例。
在下文中一共展示了KviThemeInfo::isBuiltin方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: deleteTheme
void ThemeManagementDialog::deleteTheme()
{
QList<QListWidgetItem *> itemsSelected = m_pListWidget->selectedItems();
for(int i=0; i < itemsSelected.count(); i++)
{
ThemeListWidgetItem * pItem = dynamic_cast<ThemeListWidgetItem *>(itemsSelected.at(i));
if(!pItem)
return;
KviThemeInfo * pInfo = pItem->themeInfo();
if(pInfo->isBuiltin())
continue;
if(!KviMessageBox::yesNo(
__tr2qs_ctx("Delete Theme - KVIrc","theme"),
__tr2qs_ctx("Do you really wish to delete theme \"%Q\" (version %Q)?","theme"),
&(pInfo->name()), &(pInfo->version()))
)
goto jump_out;
QString szThemePath = ((ThemeListWidgetItem *)itemsSelected.at(i))->themeInfo()->directory();
KviFileUtils::deleteDir(szThemePath);
}
jump_out:
fillThemeBox();
}
示例2: contextMenuRequested
void ThemeManagementDialog::contextMenuRequested(const QPoint & pos)
{
ThemeListWidgetItem * pItem = dynamic_cast<ThemeListWidgetItem *>(m_pListWidget->itemAt(pos));
if(pItem != 0)
{
m_pListWidget->setCurrentItem(pItem);
m_pContextPopup->clear();
KviThemeInfo * pInfo = pItem->themeInfo();
if(!pInfo)
return;
if(!pInfo->isBuiltin())
m_pContextPopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::Minus)),__tr2qs_ctx("&Remove Theme","theme"),this,SLOT(deleteTheme()));
m_pContextPopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::Accept)),__tr2qs_ctx("&Apply Theme","theme"),this,SLOT(applyCurrentTheme()));
m_pContextPopup->popup(m_pListWidget->viewport()->mapToGlobal(pos));
}
}
示例3: enableDisableButtons
void ThemeManagementDialog::enableDisableButtons()
{
QList<QListWidgetItem *> itemsSelected = m_pListWidget->selectedItems();
int iCount = itemsSelected.count();
bool bHasItems = iCount ? true : false;
m_pPackThemeButton->setEnabled(bHasItems);
unsigned int u = 0;
for(int i = 0; i < iCount; i++)
{
ThemeListWidgetItem * pItem = dynamic_cast<ThemeListWidgetItem *>(itemsSelected.at(i));
if(!pItem)
return;
KviThemeInfo * pInfo = pItem->themeInfo();
if(!pInfo->isBuiltin())
u++;
}
m_pDeleteThemeButton->setEnabled(u >= 1);
}