Commit 551fd54b authored by Isaak Lim's avatar Isaak Lim

instead of a post processor menu only show the post processor manager

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@17240 383ad7c9-94d9-4d36-a494-682f7c89f535
parent fb06c79d
......@@ -270,57 +270,6 @@ void CoreWidget::updatePopupMenuCoordsysNode(QMenu* _menu , const int /*_part*/
}
//============================================================================================================
// Post processor Menu
//============================================================================================================
if ( postProcessorManager().available() > 1 ) {
QMenu* postProcessorMenu = new QMenu(tr("Post processors"),_menu);
postProcessorMenu->setIcon(QIcon(iconPath+"postprocessors.png"));
_menu->addMenu(postProcessorMenu);
// Recreate actionGroup
QActionGroup* groupPostProcessor = new QActionGroup( this );
groupPostProcessor->setExclusive( true );
// Get the options action for the currently active postprocessor
if( postProcessorManager()[ postProcessorManager().activeId(PluginFunctions::activeExaminer() )]->optionsAction != 0 ) {
postProcessorMenu->addAction(postProcessorManager()[ postProcessorManager().activeId(PluginFunctions::activeExaminer() ) ]->optionsAction );
}
QAction* showPostProcessorDialog = new QAction(tr("Show post processor manager"),this);
connect(showPostProcessorDialog,SIGNAL(triggered()),this,SLOT(slotShowPostProcessorManager()));
postProcessorMenu->addAction(showPostProcessorDialog);
postProcessorMenu->addSeparator();
// Now add the processor chooser
for ( unsigned int i = 0 ; i < postProcessorManager().available() ; ++i) {
// Add a new Action with the postprocessors name
QAction * action = new QAction( postProcessorManager()[i]->name, groupPostProcessor );
action->setCheckable( true );
// Check if this processor is currently active
if ( postProcessorManager().activeId(PluginFunctions::activeExaminer() ) == i )
action->setChecked(true);
// Remember the id for the processor
action->setData(QVariant(i));
}
// Add all new actions from the group to the menu
postProcessorMenu->addActions( groupPostProcessor->actions() );
// Connect signal of group to our managing slot
connect( groupPostProcessor , SIGNAL( triggered( QAction * ) ),
this , SLOT( slotPostProcessorMenu( QAction * ) ) );
}
//============================================================================================================
// Viewing Direction Menu
//============================================================================================================
......@@ -414,6 +363,19 @@ void CoreWidget::updatePopupMenuCoordsysNode(QMenu* _menu , const int /*_part*/
//====================================================================================================
//============================================================================================================
// Post processor Manager
//============================================================================================================
QAction* showPostProcessorDialog = new QAction(tr("Show post processor manager"),this);
showPostProcessorDialog->setIcon(QIcon(iconPath+"postprocessors.png"));
connect(showPostProcessorDialog,SIGNAL(triggered()),this,SLOT(slotShowPostProcessorManager()));
_menu->addAction(showPostProcessorDialog);
_menu->addSeparator();
//====================================================================================================
QAction* homeAction = new QAction(tr("Restore home view"),_menu);
homeAction->setIcon( QIcon(iconPath+"go-home.png") );
homeAction->setCheckable( false );
......
......@@ -335,17 +335,26 @@ void CoreWidget::setupMenuBar()
slotUpdateRendererMenu();
//============================================================================================================
// Global post processor menu
// Other toplevel actions
//============================================================================================================
slotUpdatePostProcessorMenu();
viewMenu_->addSeparator();
//============================================================================================================
// Other toplevel actions
// Post processor Manager
//============================================================================================================
QString iconPath = OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator();
QAction* showPostProcessorDialog = new QAction(tr("Show post processor manager"),this);
showPostProcessorDialog->setIcon(QIcon(iconPath+"postprocessors.png"));
connect(showPostProcessorDialog,SIGNAL(triggered()),this,SLOT(slotShowPostProcessorManager()));
viewMenu_->addAction(showPostProcessorDialog);
viewMenu_->addSeparator();
//====================================================================================================
QAction* navigationSwitchAction = new QAction( tr("First-person Navigation"), viewMenu_ );
navigationSwitchAction->setCheckable( true );
navigationSwitchAction->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"core_firstPersonMode.png") );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment