本文整理汇总了C++中KGuiItem::icon方法的典型用法代码示例。如果您正苦于以下问题:C++ KGuiItem::icon方法的具体用法?C++ KGuiItem::icon怎么用?C++ KGuiItem::icon使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KGuiItem
的用法示例。
在下文中一共展示了KGuiItem::icon方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: backButton
K3Wizard::K3Wizard( QWidget *parent, const char *name, bool modal, Qt::WFlags f )
: Q3Wizard( parent, name, modal, f )
{
bool useIcons = KGlobalSettings::showIconsOnPushButtons();
if ( useIcons )
{
KGuiItem back = KStandardGuiItem::back( KStandardGuiItem::UseRTL );
KGuiItem forward = KStandardGuiItem::forward( KStandardGuiItem::UseRTL );
backButton()->setIcon( back.icon() );
nextButton()->setIcon( forward.icon() );
finishButton()->setIcon( KIcon( "dialog-ok-apply" ) );
cancelButton()->setIcon( KIcon( "dialog-cancel" ) );
helpButton()->setIcon( KIcon( "help-contents" ) );
backButton()->setText( i18n( "&Back" ) );
nextButton()->setText( i18nc( "Opposite to Back","&Next" ) );
}
QFont font = titleFont();
font.setBold( true );
setTitleFont( font );
}
示例2: assign
void KGuiItem::assign(QPushButton *button, const KGuiItem &item)
{
button->setText(item.d->m_text);
button->setIcon(item.icon());
button->setToolTip(item.d->m_toolTip);
button->setWhatsThis(item.d->m_whatsThis);
}
示例3: KexiView
KexiReportDesignView::KexiReportDesignView(QWidget *parent, KexiSourceSelector *s)
: KexiView(parent)
{
m_scrollArea = new QScrollArea(this);
layout()->addWidget(m_scrollArea);
m_sourceSelector = s;
m_reportDesigner = 0;
m_editCutAction = KStandardAction::cut(this);
m_editCutAction->setProperty("iconOnly", true);
m_editCopyAction = KStandardAction::copy(this);
m_editCopyAction->setProperty("iconOnly", true);
m_editPasteAction = KStandardAction::paste(this);
m_editPasteAction->setProperty("iconOnly", true);
const KGuiItem del = KStandardGuiItem::del();
m_editDeleteAction = new QAction(del.icon(), del.text(), this);
m_editDeleteAction->setObjectName("editdelete");
m_editDeleteAction->setToolTip(del.toolTip());
m_editDeleteAction->setWhatsThis(del.whatsThis());
m_editDeleteAction->setProperty("iconOnly", true);
m_sectionEdit = new QAction(i18n("Edit Sections"), this);
m_sectionEdit->setObjectName("sectionedit");
m_itemRaiseAction = new QAction(koIcon("arrow-up"), i18n("Raise"), this);
m_itemRaiseAction->setObjectName("itemraise");
m_itemLowerAction = new QAction(koIcon("arrow-down"), i18n("Lower"), this);
m_itemLowerAction->setObjectName("itemlower");
//parameterEdit = new QAction ( i18n ( "Parameter Editor" ), this );
//parameterEdit->setObjectName("parameteredit");
QList<QAction*> al;
QAction *sep = new QAction(QString(), this);
sep->setSeparator(true);
al << m_editCutAction << m_editCopyAction << m_editPasteAction << m_editDeleteAction << sep << m_sectionEdit << sep << m_itemLowerAction << m_itemRaiseAction;
setViewActions(al);
}
示例4: QPushButton
KexiLinkButton::KexiLinkButton(const KGuiItem &item, QWidget *parent)
: QPushButton(item.icon(), item.text(), parent), d(new Private)
{
init();
}