Changed: #1193 Updated menu stuff.
This commit is contained in:
parent
b3002e552d
commit
4b4c3b9a56
3 changed files with 3 additions and 17 deletions
|
@ -328,7 +328,7 @@ void MainWindow::createActions()
|
||||||
m_fullscreenAction = new QAction(tr("Fullscreen"), this);
|
m_fullscreenAction = new QAction(tr("Fullscreen"), this);
|
||||||
m_fullscreenAction->setCheckable(true);
|
m_fullscreenAction->setCheckable(true);
|
||||||
m_fullscreenAction->setShortcut(QKeySequence(tr("Ctrl+Shift+F11")));
|
m_fullscreenAction->setShortcut(QKeySequence(tr("Ctrl+Shift+F11")));
|
||||||
menuManager()->registerAction(m_fullscreenAction, Constants::SETTINGS);
|
menuManager()->registerAction(m_fullscreenAction, Constants::TOGGLE_FULLSCREEN);
|
||||||
connect(m_fullscreenAction, SIGNAL(triggered(bool)), this, SLOT(setFullScreen(bool)));
|
connect(m_fullscreenAction, SIGNAL(triggered(bool)), this, SLOT(setFullScreen(bool)));
|
||||||
|
|
||||||
m_settingsAction = new QAction(tr("&Settings"), this);
|
m_settingsAction = new QAction(tr("&Settings"), this);
|
||||||
|
|
|
@ -90,7 +90,6 @@ QStringList MyPlugin::dependencies() const
|
||||||
{
|
{
|
||||||
QStringList list;
|
QStringList list;
|
||||||
list.append(Core::Constants::OVQT_CORE_PLUGIN);
|
list.append(Core::Constants::OVQT_CORE_PLUGIN);
|
||||||
list.append("ObjectViewer");
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -239,12 +239,6 @@ void CMainWindow::updateStatusBar()
|
||||||
|
|
||||||
void CMainWindow::createActions()
|
void CMainWindow::createActions()
|
||||||
{
|
{
|
||||||
_openAction = new QAction(tr("&Open..."), this);
|
|
||||||
_openAction->setIcon(QIcon(Core::Constants::ICON_OPEN));
|
|
||||||
_openAction->setShortcut(QKeySequence::Open);
|
|
||||||
_openAction->setStatusTip(tr("Open an existing file"));
|
|
||||||
connect(_openAction, SIGNAL(triggered()), this, SLOT(open()));
|
|
||||||
|
|
||||||
_setBackColorAction = _GraphicsViewport->createSetBackgroundColor(this);
|
_setBackColorAction = _GraphicsViewport->createSetBackgroundColor(this);
|
||||||
_setBackColorAction->setText(tr("Set &background color"));
|
_setBackColorAction->setText(tr("Set &background color"));
|
||||||
_setBackColorAction->setIcon(QIcon(Constants::ICON_BGCOLOR));
|
_setBackColorAction->setIcon(QIcon(Constants::ICON_BGCOLOR));
|
||||||
|
@ -259,7 +253,7 @@ void CMainWindow::createActions()
|
||||||
connect(_reloadTexturesAction, SIGNAL(triggered()), this, SLOT(reloadTextures()));
|
connect(_reloadTexturesAction, SIGNAL(triggered()), this, SLOT(reloadTextures()));
|
||||||
|
|
||||||
_saveScreenshotAction = _GraphicsViewport->createSaveScreenshotAction(this);
|
_saveScreenshotAction = _GraphicsViewport->createSaveScreenshotAction(this);
|
||||||
_saveScreenshotAction->setText(tr("Save &Screenshot"));
|
_saveScreenshotAction->setText(tr("Save Screenshot"));
|
||||||
_saveScreenshotAction->setStatusTip(tr("Make a screenshot of the current viewport and save"));
|
_saveScreenshotAction->setStatusTip(tr("Make a screenshot of the current viewport and save"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,14 +261,7 @@ void CMainWindow::createMenus()
|
||||||
{
|
{
|
||||||
Core::IMenuManager *menuManager = Core::ICore::instance()->menuManager();
|
Core::IMenuManager *menuManager = Core::ICore::instance()->menuManager();
|
||||||
|
|
||||||
// register actions for file menu
|
_openAction = menuManager->action(Core::Constants::OPEN);
|
||||||
menuManager->registerAction(_openAction, "ObjectViewer.File.Open");
|
|
||||||
|
|
||||||
// add actions in file menu
|
|
||||||
QMenu *fileMenu = menuManager->menu(Core::Constants::M_FILE);
|
|
||||||
QAction *exitAction = menuManager->action(Core::Constants::EXIT);
|
|
||||||
//fileMenu->insertAction(exitAction, _openAction);
|
|
||||||
//fileMenu->insertSeparator(exitAction);
|
|
||||||
|
|
||||||
// register actions for view menu
|
// register actions for view menu
|
||||||
menuManager->registerAction(_setBackColorAction, "ObjectViewer.View.SetBackgroundColor");
|
menuManager->registerAction(_setBackColorAction, "ObjectViewer.View.SetBackgroundColor");
|
||||||
|
|
Loading…
Reference in a new issue