本文整理汇总了C++中ToolBar::addSeparator方法的典型用法代码示例。如果您正苦于以下问题:C++ ToolBar::addSeparator方法的具体用法?C++ ToolBar::addSeparator怎么用?C++ ToolBar::addSeparator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ToolBar
的用法示例。
在下文中一共展示了ToolBar::addSeparator方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: execute
bool SpectralLibraryManager::execute(PlugInArgList* pInArgList, PlugInArgList* pOutArgList)
{
mpProgress = Service<PlugInManagerServices>()->getProgress(this);
if (mpProgress != NULL)
{
Service<DesktopServices>()->createProgressDialog(getName(), mpProgress);
}
// Create edit library action
if (isBatch() == false)
{
QPixmap pixEditLib(EditSpectralLibraryIcon);
mpEditSpectralLibraryAction = new QAction(QIcon(pixEditLib),
"&Edit Spectral Library", this);
mpEditSpectralLibraryAction->setAutoRepeat(false);
mpEditSpectralLibraryAction->setStatusTip("Display the editor for adding and removing "
"signatures used by the Spectral Library Match algorithm plug-ins.");
VERIFYNR(connect(mpEditSpectralLibraryAction, SIGNAL(triggered()), this, SLOT(editSpectralLibrary())));
ToolBar* pToolBar = static_cast<ToolBar*>(Service<DesktopServices>()->getWindow("Spectral", TOOLBAR));
if (pToolBar != NULL)
{
pToolBar->addSeparator();
pToolBar->addButton(mpEditSpectralLibraryAction);
}
}
return true;
}
示例2: createAction
QAction* SpectralLibraryMatchResults::createAction()
{
// Add toolbar button and menu item to invoke the window
QAction* pShowAction(NULL);
ToolBar* pToolBar = static_cast<ToolBar*>(Service<DesktopServices>()->getWindow("Spectral", TOOLBAR));
if (pToolBar != NULL)
{
MenuBar* pMenuBar = pToolBar->getMenuBar();
if (pMenuBar != NULL)
{
QAction* pMenuAction = pMenuBar->getMenuItem("/Spectral/Support Tools");
if (pMenuAction != NULL)
{
QMenu* pMenu = pMenuBar->getMenu(pMenuAction);
if (pMenu != NULL)
{
pShowAction = pMenu->addAction("Spectral Library Match Results Window");
if (pShowAction != NULL)
{
QPixmap pixShowResults(ShowResultsIcon);
pShowAction->setIcon(QIcon(pixShowResults));
pShowAction->setCheckable(true);
pShowAction->setAutoRepeat(false);
pShowAction->setStatusTip("Toggles the display of the Spectral Library Match Results Window");
pToolBar->addSeparator();
pToolBar->addButton(pShowAction);
}
}
}
}
}
return pShowAction;
}