From: vsr Date: Wed, 18 Nov 2020 12:50:18 +0000 (+0300) Subject: InfoPanel introduction v2. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dc2f5068a318823e7e02beda9733eaac6a38238b;p=modules%2Fgui.git InfoPanel introduction v2. --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 6a62b70e4..67b111213 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -527,6 +527,9 @@ bool LightApp_Application::activateModule( const QString& modName ) saveDockWindowsState(); + if ( infoPanel() ) + infoPanel()->clear(); + bool status = CAM_Application::activateModule( modName ); updateModuleActions(); @@ -1370,9 +1373,17 @@ void LightApp_Application::insertDockWindow( const int id, QWidget* wid ) myWin.insert( id, wid ); QtxDockWidget* dock = new QtxDockWidget( true, desktop() ); + if ( id == WT_InfoPanel ) { + // Info panel's position is strongly limited to the right area; + // It is not movable and not floatable. + dock->setAllowedAreas( Qt::RightDockWidgetArea ); + dock->setFeatures( QDockWidget::DockWidgetClosable ); + } + else { + dock->setFeatures( QDockWidget::AllDockWidgetFeatures ); + } connect( dock, SIGNAL( destroyed( QObject* ) ), this, SLOT( onWCDestroyed( QObject* ) ) ); - dock->setFeatures( QDockWidget::AllDockWidgetFeatures ); dock->setObjectName( wid->objectName().isEmpty() ? QString( "window_%1" ).arg( id ) : QString( "%1Dock" ).arg( wid->objectName() ) ); dock->setWidget( wid ); @@ -2181,6 +2192,7 @@ void LightApp_Application::defaultWindows( QMap& aMap ) const #endif if ( activeStudy() ) { aMap.insert( WT_ObjectBrowser, Qt::LeftDockWidgetArea ); + aMap.insert( WT_InfoPanel, Qt::RightDockWidgetArea ); // aMap.insert( WT_LogWindow, Qt::DockBottom ); } } @@ -4141,6 +4153,11 @@ void LightApp_Application::updateWindows() } loadDockWindowsState(); + + if (!activeModule() && infoPanel() ) { + infoPanel()->clear(); + infoPanel()->addAction( action(ModulesListId) ); + } } /*! diff --git a/src/LightApp/resources/LightApp_msg_en.ts b/src/LightApp/resources/LightApp_msg_en.ts index 55249ed3f..c19044846 100644 --- a/src/LightApp/resources/LightApp_msg_en.ts +++ b/src/LightApp/resources/LightApp_msg_en.ts @@ -168,6 +168,10 @@ The changes will be applied on the next application session. OBJECT_BROWSER Object Browser + + INFO_PANEL + Help panel + PRP_DESK_PREFERENCES Allow to change the preferences diff --git a/src/LightApp/resources/LightApp_msg_fr.ts b/src/LightApp/resources/LightApp_msg_fr.ts index 3667f6b0d..9bc156218 100644 --- a/src/LightApp/resources/LightApp_msg_fr.ts +++ b/src/LightApp/resources/LightApp_msg_fr.ts @@ -168,6 +168,10 @@ Les modifications seront appliquées à la prochaine session. OBJECT_BROWSER Arbre d'étude + + INFO_PANEL + Help panel + PRP_DESK_PREFERENCES Permettre de changer les préférences diff --git a/src/LightApp/resources/LightApp_msg_ja.ts b/src/LightApp/resources/LightApp_msg_ja.ts index 0d83e623c..fc99440c0 100644 --- a/src/LightApp/resources/LightApp_msg_ja.ts +++ b/src/LightApp/resources/LightApp_msg_ja.ts @@ -167,6 +167,10 @@ Pythonファイルは、文字、数字、アンダースコアが含まれて OBJECT_BROWSER オブジェクトブラウザー + + INFO_PANEL + Help panel + PRP_DESK_PREFERENCES 設定を変更することができます。