当前位置: 首页>>代码示例>>C++>>正文


C++ KGuiItem::icon方法代码示例

本文整理汇总了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 );
}
开发者ID:ssj-gz,项目名称:emscripten-kdelibs,代码行数:25,代码来源:k3wizard.cpp

示例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);
}
开发者ID:crayonink,项目名称:calligra-2,代码行数:7,代码来源:kguiitem.cpp

示例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);

}
开发者ID:crayonink,项目名称:calligra-2,代码行数:39,代码来源:kexireportdesignview.cpp

示例4: QPushButton

KexiLinkButton::KexiLinkButton(const KGuiItem &item, QWidget *parent)
 : QPushButton(item.icon(), item.text(), parent), d(new Private)
{
    init();
}
开发者ID:TheTypoMaster,项目名称:calligra,代码行数:5,代码来源:KexiLinkButton.cpp


注:本文中的KGuiItem::icon方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。