本文整理汇总了C++中KGuiItem::iconSet方法的典型用法代码示例。如果您正苦于以下问题:C++ KGuiItem::iconSet方法的具体用法?C++ KGuiItem::iconSet怎么用?C++ KGuiItem::iconSet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KGuiItem
的用法示例。
在下文中一共展示了KGuiItem::iconSet方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QWizard
KWizard::KWizard( QWidget *parent, const char *name, bool modal, WFlags f )
: QWizard( parent, name, modal, f )
{
bool useIcons = KGlobalSettings::showIconsOnPushButtons();
if ( useIcons )
{
KGuiItem back = KStdGuiItem::back( KStdGuiItem::UseRTL );
KGuiItem forward = KStdGuiItem::forward( KStdGuiItem::UseRTL );
backButton()->setIconSet( back.iconSet() );
nextButton()->setIconSet( forward.iconSet() );
finishButton()->setIconSet( SmallIconSet( "apply" ) );
cancelButton()->setIconSet( SmallIconSet( "button_cancel" ) );
helpButton()->setIconSet( SmallIconSet( "help" ) );
backButton()->setText( i18n( "&Back" ) );
nextButton()->setText( i18n( "Opposite to Back","&Next" ) );
}
QFont font = titleFont();
font.setBold( true );
setTitleFont( font );
}
示例2:
void
KexiDSWelcome::setUseWizard(bool use)
{
#if !defined(Q_WS_WIN)
bool useIcons = KGlobalSettings::showIconsOnPushButtons();
#endif
if (use) {
KGuiItem forward = KStandardGuiItem::forward(KStandardGuiItem::UseRTL);
if (useIcons)
m_wiz->nextButton()->setIconSet(forward.iconSet());
m_wiz->nextButton()->setText(i18n("&Next"));
} else {
if (useIcons)
m_wiz->nextButton()->setIconSet(KIcon("dialog-ok"));
m_wiz->nextButton()->setText(i18n("&Finish"));
}
m_wiz->finishNext(!use);
}