本文整理汇总了C++中KAction::setSeparator方法的典型用法代码示例。如果您正苦于以下问题:C++ KAction::setSeparator方法的具体用法?C++ KAction::setSeparator怎么用?C++ KAction::setSeparator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KAction
的用法示例。
在下文中一共展示了KAction::setSeparator方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: KexiView
KexiReportDesignView::KexiReportDesignView(QWidget *parent, ReportEntitySelector* r)
: KexiView(parent)
{
scr = new QScrollArea(this);
layout()->addWidget(scr);
res = r;
_rd = 0;
editCutAction = new KAction(KIcon("edit-cut"), i18n("Cut"), this);
editCutAction->setObjectName("editcut");
editCopyAction = new KAction(KIcon("edit-copy"), i18n("Copy"), this);
editCopyAction->setObjectName("editcopy");
editPasteAction = new KAction(KIcon("edit-paste"), i18n("Paste"), this);
editPasteAction->setObjectName("editpaste");
editDeleteAction = new KAction(KIcon("edit-delete"), i18n("Delete"), this);
editDeleteAction->setObjectName("editdelete");
sectionEdit = new KAction(i18n("Section Editor"), this);
sectionEdit->setObjectName("sectionedit");
itemRaiseAction = new KAction(KIcon("arrow-up"), i18n("Raise"), this);
itemRaiseAction->setObjectName("itemraise");
itemLowerAction = new KAction(KIcon("arrow-down"), i18n("Lower"), this);
itemLowerAction->setObjectName("itemlower");
//parameterEdit = new KAction ( i18n ( "Parameter Editor" ), this );
//parameterEdit->setObjectName("parameteredit");
QList<QAction*> al;
KAction *sep = new KAction("", this);
sep->setSeparator(true);
al << editCutAction << editCopyAction << editPasteAction << editDeleteAction << sep << sectionEdit << sep << itemLowerAction << itemRaiseAction;
setViewActions(al);
}
示例2: KAction
PopupMenuGUIClient::PopupMenuGUIClient( const KService::List &embeddingServices,
KParts::BrowserExtension::ActionGroupMap& actionGroups,
QAction* showMenuBar, QAction* stopFullScreen )
: m_actionCollection(this),
m_embeddingServices(embeddingServices)
{
QList<QAction *> topActions;
if (showMenuBar) {
topActions.append(showMenuBar);
KAction* separator = new KAction(&m_actionCollection);
separator->setSeparator(true);
topActions.append(separator);
}
if (stopFullScreen) {
topActions.append(stopFullScreen);
KAction* separator = new KAction(&m_actionCollection);
separator->setSeparator(true);
topActions.append(separator);
}
if (!embeddingServices.isEmpty()) {
QList<QAction *> previewActions;
if (embeddingServices.count() == 1) {
KService::Ptr service = embeddingServices.first();
QAction* act = addEmbeddingService( 0, i18n( "Preview &in %1", service->name() ), service );
previewActions.append(act);
} else if (embeddingServices.count() > 1) {
KService::List::ConstIterator it = embeddingServices.begin();
const KService::List::ConstIterator end = embeddingServices.end();
int idx = 0;
for (; it != end; ++it, ++idx ) {
QAction* act = addEmbeddingService( idx, (*it)->name(), *it );
previewActions.append(act);
}
}
actionGroups.insert("preview", previewActions);
}
actionGroups.insert("topactions", topActions);
}
示例3: QDockWidget
MessageDock::MessageDock( const QString& title, QWidget* parent, Qt::WindowFlags flags )
: QDockWidget( title, parent, flags ),
d( new MessageDockPrivate )
{
setObjectName( "MessageDock" );
d->view = new QListWidget( this );
d->view->addItem( new QListWidgetItem( i18n( "Welcome to Gluon Creator %1", GluonCore::Global::versionString() ), d->view ) );
d->view->setSelectionMode( QAbstractItemView::ExtendedSelection );
connect( GluonEngine::Game::instance(), SIGNAL( showDebug( const QString& ) ), SLOT( showDebug( const QString& ) ) );
QWidget* widget = new QWidget( this );
QVBoxLayout* layout = new QVBoxLayout();
layout->setContentsMargins( 0, 0, 0, 0 );
layout->setSpacing( 0 );
widget->setLayout( layout );
KToolBar* toolBar = new KToolBar( this );
toolBar->setIconDimensions( 16 );
QAction* selectAll = toolBar->addAction( KIcon( "edit-select-all" ), i18n( "Select All" ), this, SLOT( selectAll() ) );
d->view->addAction( selectAll );
QAction* copy = toolBar->addAction( KIcon( "edit-copy" ), i18n( "Copy" ), this, SLOT( copy() ) );
d->view->addAction( copy );
KAction* separator = new KAction( d->view );
separator->setSeparator( true );
d->view->addAction( separator );
QAction* clearSelection = toolBar->addAction( KIcon( "edit-clear-list" ), i18n( "Clear Selection" ), this, SLOT( clearSelection() ) );
d->view->addAction( clearSelection );
QAction* clearAll = toolBar->addAction( KIcon( "edit-clear" ), i18n( "Clear All" ), d->view, SLOT( clear() ) );
d->view->addAction( clearAll );
layout->addWidget( toolBar );
layout->addWidget( d->view );
setWidget( widget );
}
示例4: 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 KAction(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 KAction(i18n("Edit Sections"), this);
m_sectionEdit->setObjectName("sectionedit");
m_itemRaiseAction = new KAction(koIcon("arrow-up"), i18n("Raise"), this);
m_itemRaiseAction->setObjectName("itemraise");
m_itemLowerAction = new KAction(koIcon("arrow-down"), i18n("Lower"), this);
m_itemLowerAction->setObjectName("itemlower");
QList<QAction*> al;
KAction *sep = new KAction(QString(), this);
sep->setSeparator(true);
al << m_editCutAction << m_editCopyAction << m_editPasteAction << m_editDeleteAction << sep << m_sectionEdit << sep << m_itemLowerAction << m_itemRaiseAction;
setViewActions(al);
}