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


C++ KActionMenu::addSeparator方法代码示例

本文整理汇总了C++中KActionMenu::addSeparator方法的典型用法代码示例。如果您正苦于以下问题:C++ KActionMenu::addSeparator方法的具体用法?C++ KActionMenu::addSeparator怎么用?C++ KActionMenu::addSeparator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在KActionMenu的用法示例。


在下文中一共展示了KActionMenu::addSeparator方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: setupToolbar

void FileBrowserWidget::setupToolbar()
{
	KActionCollection *coll = m_dirOperator->actionCollection();
	m_toolbar->addAction(coll->action("back"));
	m_toolbar->addAction(coll->action("forward"));

	KAction *action = new KAction(this);
	action->setIcon(SmallIcon("document-open"));
	action->setText(i18n("Open selected"));
	connect(action, SIGNAL(triggered()), this, SLOT(emitFileSelectedSignal()));
	m_toolbar->addAction(action);


	// section for settings menu
	KActionMenu *optionsMenu = new KActionMenu(KIcon("configure"), i18n("Options"), this);
	optionsMenu->setDelayed(false);
	optionsMenu->addAction(m_dirOperator->actionCollection()->action("short view"));
	optionsMenu->addAction(m_dirOperator->actionCollection()->action("detailed view"));
	optionsMenu->addAction(m_dirOperator->actionCollection()->action("tree view"));
	optionsMenu->addAction(m_dirOperator->actionCollection()->action("detailed tree view"));
	optionsMenu->addSeparator();
	optionsMenu->addAction(m_dirOperator->actionCollection()->action("show hidden"));

	m_toolbar->addSeparator();
	m_toolbar->addAction(optionsMenu);
}
开发者ID:fagu,项目名称:kileip,代码行数:26,代码来源:filebrowserwidget.cpp

示例2: setupToolbar

void FileBrowserWidget::setupToolbar()
{
	KActionCollection *coll = m_dirOperator->actionCollection();
	m_toolbar->addAction(coll->action("back"));
	m_toolbar->addAction(coll->action("forward"));

	QAction *action = new QAction(this);
	action->setIcon(QIcon::fromTheme("document-open"));
	action->setText(i18n("Open selected"));
	connect(action, SIGNAL(triggered()), this, SLOT(emitFileSelectedSignal()));
	m_toolbar->addAction(action);

	QAction *showOnlyLaTexFilesAction = new QAction(this);
	showOnlyLaTexFilesAction->setText(i18n("Show LaTeX Files Only"));
	showOnlyLaTexFilesAction->setCheckable(true);
	showOnlyLaTexFilesAction->setChecked(KileConfig::showLaTeXFilesOnly());
	connect(showOnlyLaTexFilesAction, SIGNAL(triggered(bool)), this, SLOT(toggleShowLaTeXFilesOnly(bool)));

	// section for settings menu
	KActionMenu *optionsMenu = new KActionMenu(QIcon::fromTheme("configure"), i18n("Options"), this);
	optionsMenu->setDelayed(false);
	optionsMenu->addAction(m_dirOperator->actionCollection()->action("short view"));
	optionsMenu->addAction(m_dirOperator->actionCollection()->action("detailed view"));
	optionsMenu->addAction(m_dirOperator->actionCollection()->action("tree view"));
	optionsMenu->addAction(m_dirOperator->actionCollection()->action("detailed tree view"));
	optionsMenu->addSeparator();
	optionsMenu->addAction(showOnlyLaTexFilesAction);
	optionsMenu->addAction(m_dirOperator->actionCollection()->action("show hidden"));

	m_toolbar->addSeparator();
	m_toolbar->addAction(optionsMenu);
}
开发者ID:KDE,项目名称:kile,代码行数:32,代码来源:filebrowserwidget.cpp


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