本文整理汇总了C++中ToolManager::addSeparator方法的典型用法代码示例。如果您正苦于以下问题:C++ ToolManager::addSeparator方法的具体用法?C++ ToolManager::addSeparator怎么用?C++ ToolManager::addSeparator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ToolManager
的用法示例。
在下文中一共展示了ToolManager::addSeparator方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: redoIcon
//.........这里部分代码省略.........
mUi->actionClose->setShortcuts(QKeySequence::Close);
mUi->actionQuit->setShortcuts(QKeySequence::Quit);
mUi->actionCut->setShortcuts(QKeySequence::Cut);
mUi->actionCopy->setShortcuts(QKeySequence::Copy);
mUi->actionPaste->setShortcuts(QKeySequence::Paste);
mUi->actionDelete->setShortcuts(QKeySequence::Delete);
undoAction->setShortcuts(QKeySequence::Undo);
redoAction->setShortcuts(QKeySequence::Redo);
mUi->actionShowGrid->setChecked(preferences->showGrid());
mUi->actionSnapToGrid->setChecked(preferences->snapToGrid());
mUi->actionHighlightCurrentLayer->setChecked(preferences->highlightCurrentLayer());
// Make sure Ctrl+= also works for zooming in
QList<QKeySequence> keys = QKeySequence::keyBindings(QKeySequence::ZoomIn);
keys += QKeySequence(tr("Ctrl+="));
keys += QKeySequence(tr("+"));
mUi->actionZoomIn->setShortcuts(keys);
keys = QKeySequence::keyBindings(QKeySequence::ZoomOut);
keys += QKeySequence(tr("-"));
mUi->actionZoomOut->setShortcuts(keys);
mUi->menuEdit->insertAction(mUi->actionCut, undoAction);
mUi->menuEdit->insertAction(mUi->actionCut, redoAction);
mUi->menuEdit->insertSeparator(mUi->actionCut);
mUi->menuEdit->insertAction(mUi->actionPreferences,
mActionHandler->actionSelectAll());
mUi->menuEdit->insertAction(mUi->actionPreferences,
mActionHandler->actionSelectNone());
mUi->menuEdit->insertSeparator(mUi->actionPreferences);
mUi->mainToolBar->addAction(undoAction);
mUi->mainToolBar->addAction(redoAction);
mUi->mainToolBar->addSeparator();
mCommandButton = new CommandButton(this);
mUi->mainToolBar->addWidget(mCommandButton);
mUi->menuMap->insertAction(mUi->actionOffsetMap,
mActionHandler->actionCropToSelection());
mRandomButton = new QToolButton(this);
mRandomButton->setToolTip(tr("Random Mode"));
mRandomButton->setIcon(QIcon(QLatin1String(":images/24x24/dice.png")));
mRandomButton->setCheckable(true);
mUi->mainToolBar->addWidget(mRandomButton);
mLayerMenu = new QMenu(tr("&Layer"), this);
mLayerMenu->addAction(mActionHandler->actionAddTileLayer());
mLayerMenu->addAction(mActionHandler->actionAddObjectGroup());
mLayerMenu->addAction(mActionHandler->actionDuplicateLayer());
mLayerMenu->addAction(mActionHandler->actionMergeLayerDown());
mLayerMenu->addAction(mActionHandler->actionRemoveLayer());
mLayerMenu->addAction(mActionHandler->actionRenameLayer());
mLayerMenu->addSeparator();
mLayerMenu->addAction(mActionHandler->actionSelectPreviousLayer());
mLayerMenu->addAction(mActionHandler->actionSelectNextLayer());
mLayerMenu->addAction(mActionHandler->actionMoveLayerUp());
mLayerMenu->addAction(mActionHandler->actionMoveLayerDown());
mLayerMenu->addSeparator();
mLayerMenu->addAction(mActionHandler->actionToggleOtherLayers());
mLayerMenu->addSeparator();
mLayerMenu->addAction(mActionHandler->actionLayerProperties());
menuBar()->insertMenu(mUi->menuHelp->menuAction(), mLayerMenu);