本文整理汇总了C++中KActionCollection::addActions方法的典型用法代码示例。如果您正苦于以下问题:C++ KActionCollection::addActions方法的具体用法?C++ KActionCollection::addActions怎么用?C++ KActionCollection::addActions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KActionCollection
的用法示例。
在下文中一共展示了KActionCollection::addActions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initDescription
void ConfigTaskPanelImpl::initDescription()
{
toolbar->setToolButtonStyle( Qt::ToolButtonIconOnly );
KActionCollection *collection = new KActionCollection( this ); //krazy:exclude=tipsandthis
kcfg_Description->setRichTextSupport( KRichTextWidget::SupportBold |
KRichTextWidget::SupportItalic |
KRichTextWidget::SupportUnderline |
KRichTextWidget::SupportStrikeOut |
KRichTextWidget::SupportChangeListStyle |
KRichTextWidget::SupportAlignment |
KRichTextWidget::SupportFormatPainting );
collection->addActions(kcfg_Description->createActions());
toolbar->addAction( collection->action( "format_text_bold" ) );
toolbar->addAction( collection->action( "format_text_italic" ) );
toolbar->addAction( collection->action( "format_text_underline" ) );
toolbar->addAction( collection->action( "format_text_strikeout" ) );
toolbar->addSeparator();
toolbar->addAction( collection->action( "format_list_style" ) );
toolbar->addSeparator();
toolbar->addAction( collection->action( "format_align_left" ) );
toolbar->addAction( collection->action( "format_align_center" ) );
toolbar->addAction( collection->action( "format_align_right" ) );
toolbar->addAction( collection->action( "format_align_justify" ) );
toolbar->addSeparator();
// toolbar->addAction( collection->action( "format_painter" ) );
// kcfg_Description->append( "" );
kcfg_Description->setReadOnly( false );
kcfg_Description->setOverwriteMode( false );
kcfg_Description->setLineWrapMode( KTextEdit::WidgetWidth );
kcfg_Description->setTabChangesFocus( true );
}