Add a menu to show/hide toolbars and docks

This commit is contained in:
jfmcarreira committed 2014-03-28 01:13:37 +00:00
1 parent 8007e8ff68
commit c5e855c54a
2 files changed
+16 -2

No files matched your search

+14 -2
View File
@@ -56,9 +56,9 @@ plaYUVerApp::plaYUVerApp()
m_pcModulesHandle = new ModulesHandle( this );
createActions();
createMenus();
createToolBars();
createDockWidgets();
createMenus();
createStatusBar();
updateMenus();
@@ -96,6 +96,7 @@ Void plaYUVerApp::closeEvent( QCloseEvent *event )
{
case QMessageBox::Yes:
closeAll();
QCoreApplication::sendPostedEvents();
if( mdiArea->subWindowList().isEmpty() )
{
writeSettings();
@@ -654,6 +655,17 @@ Void plaYUVerApp::createMenus()
m_arrayMenu[VIEW_MENU]->addAction( actionNormalSize );
m_arrayMenu[VIEW_MENU]->addAction( actionZoomToFit );
m_arrayMenu[VIEW_MENU]->addSeparator();
// createPopupMenu() Returns a popup menu containing checkable entries for
// the toolbars and dock widgets present in the main window.
QMenu *viewsSub = createPopupMenu();
if ( viewsSub )
{
actionPopupMenu = m_arrayMenu[VIEW_MENU]->addMenu( viewsSub );
actionPopupMenu->setText( tr("&Toolbars/Docks") );
}
m_arrayMenu[VIDEO_MENU] = menuBar()->addMenu( tr( "Video" ) );
m_arrayMenu[VIDEO_MENU]->addAction( actionVideoPlay );
m_arrayMenu[VIDEO_MENU]->addAction( actionVideoPause );
@@ -711,7 +723,7 @@ Void plaYUVerApp::createDockWidgets()
m_pcPropertiesSidebar = new PropertiesSidebar( this );
m_pcDockPropertiesSidebar = new QDockWidget( tr( "Image Properties" ), this );
m_pcDockPropertiesSidebar = new QDockWidget( tr( "Steam Information" ), this );
m_pcDockPropertiesSidebar->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
m_pcDockPropertiesSidebar->setWidget( m_pcPropertiesSidebar );
addDockWidget( Qt::RightDockWidgetArea, m_pcDockPropertiesSidebar );