mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-05 23:09:04 +00:00
Moved plugin menu items to their own sub-menu into the menubar.
This commit is contained in:
parent
52666ced93
commit
e56af869ab
4 changed files with 32 additions and 34 deletions
|
@ -438,9 +438,6 @@ void MainWindow::createMenus()
|
||||||
m_toolsMenu = m_menuBar->addMenu(tr("&Tools"));
|
m_toolsMenu = m_menuBar->addMenu(tr("&Tools"));
|
||||||
menuManager()->registerMenu(m_toolsMenu, Constants::M_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->addSeparator();
|
||||||
|
|
||||||
m_toolsMenu->addAction(m_settingsAction);
|
m_toolsMenu->addAction(m_settingsAction);
|
||||||
|
@ -452,6 +449,9 @@ void MainWindow::createMenus()
|
||||||
m_helpMenu->addAction(m_aboutAction);
|
m_helpMenu->addAction(m_aboutAction);
|
||||||
m_helpMenu->addAction(m_aboutQtAction);
|
m_helpMenu->addAction(m_aboutQtAction);
|
||||||
m_helpMenu->addAction(m_pluginViewAction);
|
m_helpMenu->addAction(m_pluginViewAction);
|
||||||
|
|
||||||
|
m_sheetMenu = m_menuBar->addMenu(tr("&Sheet"));
|
||||||
|
menuManager()->registerMenu(m_sheetMenu, Constants::M_SHEET);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::createStatusBar()
|
void MainWindow::createStatusBar()
|
||||||
|
|
|
@ -360,11 +360,9 @@ namespace GUIEditor
|
||||||
connect( delAction, SIGNAL( triggered( bool ) ), messageProcessor, SLOT( onDelete() ) );
|
connect( delAction, SIGNAL( triggered( bool ) ), messageProcessor, SLOT( onDelete() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
QMenu *menu = mm->menu( Core::Constants::M_TOOLS );
|
QMenu *m = mm->menuBar()->addMenu( "GUI Editor" );
|
||||||
if( menu != NULL )
|
if( m != NULL )
|
||||||
{
|
{
|
||||||
QMenu *m = menu->addMenu( "GUI Editor" );
|
|
||||||
|
|
||||||
QAction *a = new QAction( "Widget Properties", this );
|
QAction *a = new QAction( "Widget Properties", this );
|
||||||
connect( a, SIGNAL( triggered( bool ) ), widgetProps, SLOT( show() ) );
|
connect( a, SIGNAL( triggered( bool ) ), widgetProps, SLOT( show() ) );
|
||||||
m->addAction( a );
|
m->addAction( a );
|
||||||
|
|
|
@ -270,55 +270,51 @@ void CMainWindow::createMenus()
|
||||||
menuManager->registerAction(_reloadTexturesAction, "ObjectViewer.View.ReloadTextures");
|
menuManager->registerAction(_reloadTexturesAction, "ObjectViewer.View.ReloadTextures");
|
||||||
menuManager->registerAction(_saveScreenshotAction, "ObjectViewer.View.SaveScreenshot");
|
menuManager->registerAction(_saveScreenshotAction, "ObjectViewer.View.SaveScreenshot");
|
||||||
|
|
||||||
// add actions in view menu
|
QMenu *ovMenu = menuManager->menuBar()->addMenu( "Object Viewer" );
|
||||||
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);
|
|
||||||
menuManager->registerMenu(ovMenu, "ObjectViewerQt.ObjectViewer");
|
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));
|
_AnimationDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_ANIM));
|
||||||
|
|
||||||
ovMenu->insertAction(settingsAction ,_AnimationSetDialog->toggleViewAction());
|
ovMenu->addAction(_AnimationSetDialog->toggleViewAction());
|
||||||
_AnimationSetDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_ANIMSET));
|
_AnimationSetDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_ANIMSET));
|
||||||
|
|
||||||
ovMenu->insertAction(settingsAction ,_SlotManagerDialog->toggleViewAction());
|
ovMenu->addAction(_SlotManagerDialog->toggleViewAction());
|
||||||
_SlotManagerDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_MIXER));
|
_SlotManagerDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_MIXER));
|
||||||
|
|
||||||
ovMenu->insertAction(settingsAction ,_ParticleControlDialog->toggleViewAction());
|
ovMenu->addAction(_ParticleControlDialog->toggleViewAction());
|
||||||
_ParticleControlDialog->toggleViewAction()->setIcon(QIcon(":/images/pqrticles.png"));
|
_ParticleControlDialog->toggleViewAction()->setIcon(QIcon(":/images/pqrticles.png"));
|
||||||
|
|
||||||
ovMenu->insertAction(settingsAction ,_DayNightDialog->toggleViewAction());
|
ovMenu->addAction(_DayNightDialog->toggleViewAction());
|
||||||
_DayNightDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_DAYNIGHT));
|
_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()->setIcon(QIcon(Constants::ICON_WATER));
|
||||||
_WaterPoolDialog->toggleViewAction()->setEnabled(false);
|
_WaterPoolDialog->toggleViewAction()->setEnabled(false);
|
||||||
|
|
||||||
ovMenu->insertAction(settingsAction ,_VegetableDialog->toggleViewAction());
|
ovMenu->addAction(_VegetableDialog->toggleViewAction());
|
||||||
_VegetableDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_VEGET));
|
_VegetableDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_VEGET));
|
||||||
|
|
||||||
ovMenu->insertAction(settingsAction ,_GlobalWindDialog->toggleViewAction());
|
ovMenu->addAction(_GlobalWindDialog->toggleViewAction());
|
||||||
_GlobalWindDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_WIND));
|
_GlobalWindDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_WIND));
|
||||||
|
|
||||||
ovMenu->insertAction(settingsAction ,_SkeletonScaleDialog->toggleViewAction());
|
ovMenu->addAction(_SkeletonScaleDialog->toggleViewAction());
|
||||||
_SkeletonScaleDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_SKELSCALE));
|
_SkeletonScaleDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_SKELSCALE));
|
||||||
|
|
||||||
ovMenu->insertAction(settingsAction ,_TuneTimerDialog->toggleViewAction());
|
ovMenu->addAction(_TuneTimerDialog->toggleViewAction());
|
||||||
_TuneTimerDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_FRAMEDELAY));
|
_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));
|
_TuneMRMDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_MRM_MESH));
|
||||||
|
|
||||||
connect(_ParticleControlDialog->toggleViewAction(), SIGNAL(triggered(bool)),
|
connect(_ParticleControlDialog->toggleViewAction(), SIGNAL(triggered(bool)),
|
||||||
|
@ -327,7 +323,6 @@ void CMainWindow::createMenus()
|
||||||
connect(_ParticleControlDialog->toggleViewAction(), SIGNAL(triggered(bool)),
|
connect(_ParticleControlDialog->toggleViewAction(), SIGNAL(triggered(bool)),
|
||||||
_ParticleWorkspaceDialog->_PropertyDialog, SLOT(setVisible(bool)));
|
_ParticleWorkspaceDialog->_PropertyDialog, SLOT(setVisible(bool)));
|
||||||
|
|
||||||
toolsMenu->insertSeparator(settingsAction);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMainWindow::createToolBars()
|
void CMainWindow::createToolBars()
|
||||||
|
|
|
@ -129,7 +129,12 @@ void CMainWindow::createToolbar()
|
||||||
// Windows menu
|
// Windows menu
|
||||||
Core::ICore *core = Core::ICore::instance();
|
Core::ICore *core = Core::ICore::instance();
|
||||||
Core::MenuManager *menuManager = core->menuManager();
|
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();
|
updateWindowsList();
|
||||||
connect(windowMenu, SIGNAL(aboutToShow()), this, SLOT(updateWindowsList()));
|
connect(windowMenu, SIGNAL(aboutToShow()), this, SLOT(updateWindowsList()));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue