本文整理汇总了C++中core::ActionContainer::addSeparator方法的典型用法代码示例。如果您正苦于以下问题:C++ ActionContainer::addSeparator方法的具体用法?C++ ActionContainer::addSeparator怎么用?C++ ActionContainer::addSeparator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core::ActionContainer
的用法示例。
在下文中一共展示了ActionContainer::addSeparator方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setupMenu
void FindPlugin::setupMenu()
{
Core::ActionContainer *medit = Core::ActionManager::actionContainer(Core::Constants::M_EDIT);
Core::ActionContainer *mfind = Core::ActionManager::createMenu(Constants::M_FIND);
medit->addMenu(mfind, Core::Constants::G_EDIT_FIND);
mfind->menu()->setTitle(tr("&Find/Replace"));
mfind->appendGroup(Constants::G_FIND_CURRENTDOCUMENT);
mfind->appendGroup(Constants::G_FIND_FILTERS);
mfind->appendGroup(Constants::G_FIND_FLAGS);
mfind->appendGroup(Constants::G_FIND_ACTIONS);
Core::Context globalcontext(Core::Constants::C_GLOBAL);
Core::Command *cmd;
mfind->addSeparator(globalcontext, Constants::G_FIND_FLAGS);
mfind->addSeparator(globalcontext, Constants::G_FIND_ACTIONS);
Core::ActionContainer *mfindadvanced = Core::ActionManager::createMenu(Constants::M_FIND_ADVANCED);
mfindadvanced->menu()->setTitle(tr("Advanced Find"));
mfind->addMenu(mfindadvanced, Constants::G_FIND_FILTERS);
d->m_openFindDialog = new QAction(tr("Open Advanced Find..."), this);
d->m_openFindDialog->setIconText(tr("Advanced..."));
cmd = Core::ActionManager::registerAction(d->m_openFindDialog, Constants::ADVANCED_FIND, globalcontext);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+F")));
mfindadvanced->addAction(cmd);
connect(d->m_openFindDialog, SIGNAL(triggered()), this, SLOT(openFindFilter()));
}