Commit 92a134fd authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum

[CHANGE] - hideMenuBar preference now allows to trigger visibility of menu bar

parent bfca3f49
......@@ -43,6 +43,11 @@ compatiblesToolBarPos = 0 # position of the compatibles toolbar (overrides toolB
# combineTreeAndRoiAndTextureSorter = yes # should the module tree, ROI tree and the Texture Sorter be combined in ONE Tab widget?
####################################################################
# Other GUI settings
# hideMenuBar = yes # hide the menu bar
[ge] ## Settings for the graphics engine
# bgColor.r = .9 # background color (red part)
# bgColor.g = .9 # background color (green part)
......
......@@ -49,6 +49,11 @@ compatiblesToolBarPos = 0 # position of the compatibles toolbar (overrides toolB
# combineTreeAndRoiAndTextureSorter = yes # should the module tree, ROI tree and the Texture Sorter be combined in ONE Tab widget?
####################################################################
# Other GUI settings
# hideMenuBar = yes # hide the menu bar
[ge] ## Settings for the graphics engine
# bgColor.r = .9 # background color (red part)
# bgColor.g = .9 # background color (green part)
......
......@@ -105,7 +105,14 @@ void WMainWindow::setupGUI()
// most users is the Copy shortcut.
m_menuBar = new QMenuBar( this );
// hide menu?
bool hideMenu = false;
WPreferences::getPreference( "qt4gui.hideMenuBar", &hideMenu );
m_menuBar->setVisible( !hideMenu );
QMenu* fileMenu = m_menuBar->addMenu( "File" );
fileMenu->addAction( m_iconManager.getIcon( "load" ), "Load Dataset", this, SLOT( openLoadDialog() ), QKeySequence( QKeySequence::Open ) );
fileMenu->addSeparator();
fileMenu->addAction( "Load Project", this, SLOT( projectLoad() ) );
......@@ -131,6 +138,7 @@ void WMainWindow::setupGUI()
dsbTrigger->setShortcuts( dsbShortcut );
viewMenu->addAction( dsbTrigger );
viewMenu->addSeparator();
this->addAction( dsbTrigger ); // this enables the action even if the menu bar is invisible
// NOTE: the shortcuts for these view presets should be chosen carefully. Most keysequences have another meaning in the most applications
// so the user may get confused. It is also not a good idea to take letters as they might be used by OpenSceneGraph widget ( like "S" for
......
......@@ -277,6 +277,7 @@ void WQtConfigWidget::registerComponents()
tbpos->setMax( 3 );
ctbpos->setMin( 0 );
ctbpos->setMax( 3 );
m_defaultProperties->addProperty( "qt4gui.hideMenuBar", "Hide the menu bar.", false, m_propCondition );
WPropGroup moduleWhiteList = m_defaultProperties->addPropertyGroup( "modules.whiteListGroup", "moduleWhiteList" );
m_skipPropertyWrite.push_back( "modules.whiteListGroup" );
......
......@@ -95,7 +95,6 @@ public slots:
* called whenever the user modifies the checkbox
*/
void checkboxChanged();
};
#endif // WPROPERTYBOOLWIDGET_H
......
......@@ -92,7 +92,6 @@ public slots:
* called whenever the user modifies the action
*/
void changed();
};
#endif // WQTPROPERTYBOOLACTION_H
......
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