Moved plugin menu items to their own sub-menu into the menubar.

This commit is contained in:
dfighter1985 2014-05-23 02:26:31 +02:00
parent 52666ced93
commit e56af869ab
4 changed files with 32 additions and 34 deletions

View file

@ -438,9 +438,6 @@ void MainWindow::createMenus()
m_toolsMenu = m_menuBar->addMenu(tr("&Tools"));
menuManager()->registerMenu(m_toolsMenu, Constants::M_TOOLS);
m_sheetMenu = m_toolsMenu->addMenu(tr("&Sheet"));
menuManager()->registerMenu(m_sheetMenu, Constants::M_SHEET);
// m_toolsMenu->addSeparator();
m_toolsMenu->addAction(m_settingsAction);
@ -452,6 +449,9 @@ void MainWindow::createMenus()
m_helpMenu->addAction(m_aboutAction);
m_helpMenu->addAction(m_aboutQtAction);
m_helpMenu->addAction(m_pluginViewAction);
m_sheetMenu = m_menuBar->addMenu(tr("&Sheet"));
menuManager()->registerMenu(m_sheetMenu, Constants::M_SHEET);
}
void MainWindow::createStatusBar()

View file

@ -360,11 +360,9 @@ namespace GUIEditor
connect( delAction, SIGNAL( triggered( bool ) ), messageProcessor, SLOT( onDelete() ) );
}
QMenu *menu = mm->menu( Core::Constants::M_TOOLS );
if( menu != NULL )
QMenu *m = mm->menuBar()->addMenu( "GUI Editor" );
if( m != NULL )
{
QMenu *m = menu->addMenu( "GUI Editor" );
QAction *a = new QAction( "Widget Properties", this );
connect( a, SIGNAL( triggered( bool ) ), widgetProps, SLOT( show() ) );
m->addAction( a );

View file

@ -270,55 +270,51 @@ void CMainWindow::createMenus()
menuManager->registerAction(_reloadTexturesAction, "ObjectViewer.View.ReloadTextures");
menuManager->registerAction(_saveScreenshotAction, "ObjectViewer.View.SaveScreenshot");
// add actions in view menu
QMenu *viewMenu = menuManager->menu(Core::Constants::M_VIEW);
viewMenu->addAction(_setBackColorAction);
viewMenu->addAction(_SetupFog->toggleViewAction());
viewMenu->addAction(_resetSceneAction);
viewMenu->addAction(_reloadTexturesAction);
viewMenu->addAction(_saveScreenshotAction);
// add actions in tools menu
QMenu *toolsMenu = menuManager->menu(Core::Constants::M_TOOLS);
QAction *settingsAction = menuManager->action(Core::Constants::SETTINGS);
QMenu *ovMenu = new QMenu("Object Viewer", this);
QMenu *ovMenu = menuManager->menuBar()->addMenu( "Object Viewer" );
menuManager->registerMenu(ovMenu, "ObjectViewerQt.ObjectViewer");
toolsMenu->insertMenu(settingsAction, ovMenu);
ovMenu->insertAction(settingsAction ,_AnimationDialog->toggleViewAction());
ovMenu->addAction(_setBackColorAction);
ovMenu->addAction(_SetupFog->toggleViewAction());
ovMenu->addAction(_resetSceneAction);
ovMenu->addAction(_reloadTexturesAction);
ovMenu->addAction(_saveScreenshotAction);
ovMenu->addSeparator();
ovMenu->addAction(_AnimationDialog->toggleViewAction() );
_AnimationDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_ANIM));
ovMenu->insertAction(settingsAction ,_AnimationSetDialog->toggleViewAction());
ovMenu->addAction(_AnimationSetDialog->toggleViewAction());
_AnimationSetDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_ANIMSET));
ovMenu->insertAction(settingsAction ,_SlotManagerDialog->toggleViewAction());
ovMenu->addAction(_SlotManagerDialog->toggleViewAction());
_SlotManagerDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_MIXER));
ovMenu->insertAction(settingsAction ,_ParticleControlDialog->toggleViewAction());
ovMenu->addAction(_ParticleControlDialog->toggleViewAction());
_ParticleControlDialog->toggleViewAction()->setIcon(QIcon(":/images/pqrticles.png"));
ovMenu->insertAction(settingsAction ,_DayNightDialog->toggleViewAction());
ovMenu->addAction(_DayNightDialog->toggleViewAction());
_DayNightDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_DAYNIGHT));
ovMenu->insertAction(settingsAction ,_WaterPoolDialog->toggleViewAction());
ovMenu->addAction(_WaterPoolDialog->toggleViewAction());
_WaterPoolDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_WATER));
_WaterPoolDialog->toggleViewAction()->setEnabled(false);
ovMenu->insertAction(settingsAction ,_VegetableDialog->toggleViewAction());
ovMenu->addAction(_VegetableDialog->toggleViewAction());
_VegetableDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_VEGET));
ovMenu->insertAction(settingsAction ,_GlobalWindDialog->toggleViewAction());
ovMenu->addAction(_GlobalWindDialog->toggleViewAction());
_GlobalWindDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_WIND));
ovMenu->insertAction(settingsAction ,_SkeletonScaleDialog->toggleViewAction());
ovMenu->addAction(_SkeletonScaleDialog->toggleViewAction());
_SkeletonScaleDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_SKELSCALE));
ovMenu->insertAction(settingsAction ,_TuneTimerDialog->toggleViewAction());
ovMenu->addAction(_TuneTimerDialog->toggleViewAction());
_TuneTimerDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_FRAMEDELAY));
ovMenu->insertAction(settingsAction ,_SunColorDialog->toggleViewAction());
ovMenu->addAction(_SunColorDialog->toggleViewAction());
ovMenu->insertAction(settingsAction ,_TuneMRMDialog->toggleViewAction());
ovMenu->addAction(_TuneMRMDialog->toggleViewAction());
_TuneMRMDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_MRM_MESH));
connect(_ParticleControlDialog->toggleViewAction(), SIGNAL(triggered(bool)),
@ -327,7 +323,6 @@ void CMainWindow::createMenus()
connect(_ParticleControlDialog->toggleViewAction(), SIGNAL(triggered(bool)),
_ParticleWorkspaceDialog->_PropertyDialog, SLOT(setVisible(bool)));
toolsMenu->insertSeparator(settingsAction);
}
void CMainWindow::createToolBars()

View file

@ -129,7 +129,12 @@ void CMainWindow::createToolbar()
// Windows menu
Core::ICore *core = Core::ICore::instance();
Core::MenuManager *menuManager = core->menuManager();
windowMenu = menuManager->menuBar()->addMenu("Window");
QMenu *m = menuManager->menuBar()->addMenu( "Translation Manager" );
if( m != NULL )
{
windowMenu = m->addMenu("Window");
}
updateWindowsList();
connect(windowMenu, SIGNAL(aboutToShow()), this, SLOT(updateWindowsList()));