]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
Show/hide ParaViS menus, toolbars and dockable widgets on activate/deactivate ParaViS... PARAVIS_TEST
authormkr <mkr@opencascade.com>
Fri, 5 Dec 2008 13:20:21 +0000 (13:20 +0000)
committermkr <mkr@opencascade.com>
Fri, 5 Dec 2008 13:20:21 +0000 (13:20 +0000)
resources/SalomeApp.xml
src/PVGUI/PVGUI_Module.cxx
src/PVGUI/PVGUI_Module.h
src/PVGUI/PVGUI_Module_actions.cxx
src/PVGUI/PVGUI_Module_widgets.cxx
src/PVGUI/resources/PARAVIS_msg_en.ts

index db2b2768b1df57b8f6e6168f45878962cdb0494a..6dee7c9f9c2dc3152af2d9756fbbb9bd722fd11b 100644 (file)
@@ -7,5 +7,7 @@
   <section name="resources">
     <!-- Module resources -->
     <parameter name="PARAVIS" value="${PARAVIS_ROOT_DIR}/share/salome/resources/paravis"/>
+     <!-- ParaView pixmaps -->
+    <parameter name="ParaView" value="${PVHOME}/src/Qt/Components/Resources/Icons"/>
   </section>
 </document>
index 15aee11a84e51ece1618acd7d9279df9e1f1898e..c06baf2ac2d566d99f4e9cede4e1b16b7a4d11dd 100644 (file)
@@ -36,6 +36,7 @@
 #include <SUIT_Session.h>
 #include <LightApp_Application.h>
 #include <LightApp_SelectionMgr.h>
+#include <QtxActionMenuMgr.h>
 #include <QtxActionToolMgr.h>
 
 #include <QAction>
@@ -150,7 +151,10 @@ PVGUI_ProcessModuleHelper* PVGUI_Module::pqImplementation::myPVHelper = 0;
 */
 PVGUI_Module::PVGUI_Module()
   : LightApp_Module( "PARAVIS" ),
-    Implementation( 0 )
+    Implementation( 0 ),
+    mySelectionControlsTb( -1 ),
+    mySourcesMenuId( -1 ),
+    myFiltersMenuId( -1 )
 {
 }
 
@@ -300,6 +304,8 @@ void PVGUI_Module::showView( bool toShow )
     // Now that we're ready, initialize everything ...
     Implementation->Core.initializeStates();
   }
+  else 
+    restoreDockWidgetsState();
 }
 
 /*!
@@ -308,9 +314,9 @@ void PVGUI_Module::showView( bool toShow )
 void PVGUI_Module::onUndoLabel( const QString& label )
 {
   action(UndoId)->setText(
-    label.isEmpty() ? tr("Can't Undo") : QString(tr("&Undo %1")).arg(label));
+    label.isEmpty() ? tr("MEN_CANTUNDO") : QString(tr("MEN_UNDO_ACTION")).arg(label));
   action(UndoId)->setStatusTip(
-    label.isEmpty() ? tr("Can't Undo") : QString(tr("Undo %1")).arg(label));
+    label.isEmpty() ? tr("MEN_CANTUNDO") : QString(tr("MEN_UNDO_ACTION_TIP")).arg(label));
 }
 
 /*!
@@ -319,9 +325,9 @@ void PVGUI_Module::onUndoLabel( const QString& label )
 void PVGUI_Module::onRedoLabel( const QString& label )
 {
   action(RedoId)->setText(
-    label.isEmpty() ? tr("Can't Redo") : QString(tr("&Redo %1")).arg(label));
+    label.isEmpty() ? tr("MEN_CANTREDO") : QString(tr("MEN_REDO_ACTION")).arg(label));
   action(RedoId)->setStatusTip(
-    label.isEmpty() ? tr("Can't Redo") : QString(tr("Redo %1")).arg(label));
+    label.isEmpty() ? tr("MEN_CANTREDO") : QString(tr("MEN_REDO_ACTION_TIP")).arg(label));
 }
 
 /*!
@@ -330,9 +336,9 @@ void PVGUI_Module::onRedoLabel( const QString& label )
 void PVGUI_Module::onCameraUndoLabel( const QString& label )
 {
   action(CameraUndoId)->setText(
-    label.isEmpty() ? tr("Can't Undo Camera") : QString(tr("U&ndo %1")).arg(label));
+    label.isEmpty() ? tr("MEN_CANT_CAMERA_UNDO") : QString(tr("MEN_CAMERA_UNDO_ACTION")).arg(label));
   action(CameraUndoId)->setStatusTip(
-    label.isEmpty() ? tr("Can't Undo Camera") : QString(tr("Undo %1")).arg(label));
+    label.isEmpty() ? tr("MEN_CANT_CAMERA_UNDO") : QString(tr("MEN_CAMERA_UNDO_ACTION_TIP")).arg(label));
 }
 
 /*!
@@ -341,9 +347,9 @@ void PVGUI_Module::onCameraUndoLabel( const QString& label )
 void PVGUI_Module::onCameraRedoLabel( const QString& label )
 {
   action(CameraRedoId)->setText(
-    label.isEmpty() ? tr("Can't Redo Camera") : QString(tr("R&edo %1")).arg(label));
+    label.isEmpty() ? tr("MEN_CANT_CAMERA_REDO") : QString(tr("MEN_CAMERA_REDO_ACTION")).arg(label));
   action(CameraRedoId)->setStatusTip(
-    label.isEmpty() ? tr("Can't Redo Camera") : QString(tr("Redo %1")).arg(label));
+    label.isEmpty() ? tr("MEN_CANT_CAMERA_REDO") : QString(tr("MEN_CAMERA_REDO_ACTION_TIP")).arg(label));
 }
 
 /*!
@@ -585,7 +591,7 @@ void PVGUI_Module::assistantError( const QString& error )
 */
 void PVGUI_Module::onPreAccept()
 {
-  getApp()->desktop()->statusBar()->showMessage(tr("Updating..."));
+  getApp()->desktop()->statusBar()->showMessage(tr("STB_PREACCEPT"));
   QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
 }
 
@@ -594,7 +600,7 @@ void PVGUI_Module::onPreAccept()
 */
 void PVGUI_Module::onPostAccept()
 {
-  getApp()->desktop()->statusBar()->showMessage(tr("Ready"), 2000);
+  getApp()->desktop()->statusBar()->showMessage(tr("STB_POSTACCEPT"), 2000);
   QTimer::singleShot(0, this, SLOT(endWaitCursor()));
 }
 
@@ -617,6 +623,45 @@ pqViewManager* PVGUI_Module::getMultiViewManager() const
   return aMVM;
 }
 
+/*!
+  \brief Processes QEvent::ActionAdded and QEvent::ActionRemoved from Lookmarks toolbar
+  in order to register/unregister this action in/from QtxActionToolMgr.
+*/
+bool PVGUI_Module::eventFilter( QObject* theObject, QEvent* theEvent )
+{
+  QToolBar* aTB = toolMgr()->toolBar(tr("TOOL_LOOKMARKS"));
+  if ( theObject == aTB ) {
+    
+    if ( theEvent->type() == QEvent::ActionAdded ) {
+      QList<QAction*> anActns = aTB->actions();
+      for (int i = 0; i < anActns.size(); ++i)
+       if ( toolMgr()->actionId(anActns.at(i)) == -1 ) {
+         toolMgr()->setUpdatesEnabled(false);
+         createTool( anActns.at(i), tr("TOOL_LOOKMARKS") );
+         toolMgr()->setUpdatesEnabled(true);
+       }
+    }
+
+    if ( theEvent->type() == QEvent::ActionRemoved ) {
+      QList<QAction*> anActns = aTB->actions();
+      QIntList aIDL = toolMgr()->idList();
+      for (int i = 0; i < aIDL.size(); ++i) {
+       if ( toolMgr()->action(aIDL.at(i))->parent() == aTB
+            &&
+            !anActns.contains( toolMgr()->action(aIDL.at(i)) ) ) {
+         toolMgr()->setUpdatesEnabled(false);
+         toolMgr()->unRegisterAction( aIDL.at(i) );
+         toolMgr()->remove( aIDL.at(i), tr("TOOL_LOOKMARKS") );
+         toolMgr()->setUpdatesEnabled(true);
+       }
+      }
+    }
+    
+  }
+
+  return QObject::eventFilter( theObject, theEvent );
+}
+
 /*!
   \brief Activate module.
   \param study current study
@@ -628,10 +673,15 @@ bool PVGUI_Module::activateModule( SUIT_Study* study )
   bool isDone = LightApp_Module::activateModule( study );
   if ( !isDone ) return false;
 
+  if ( mySourcesMenuId != -1 ) menuMgr()->show(mySourcesMenuId);
+  if ( myFiltersMenuId != -1 ) menuMgr()->show(myFiltersMenuId);
   setMenuShown( true );
+  setToolShown( true );
 
   showView( true );
 
+  toolMgr()->toolBar(tr("TOOL_LOOKMARKS"))->installEventFilter(this);
+
   // Make default server connection
   if ( Implementation )
     Implementation->Core.makeDefaultConnectionIfNoneExists();
@@ -648,8 +698,15 @@ bool PVGUI_Module::activateModule( SUIT_Study* study )
 */
 bool PVGUI_Module::deactivateModule( SUIT_Study* study )
 {
+  toolMgr()->toolBar(tr("TOOL_LOOKMARKS"))->removeEventFilter(this);
+
   // hide menus
+  menuMgr()->hide(mySourcesMenuId);
+  menuMgr()->hide(myFiltersMenuId);
   setMenuShown( false );
+  setToolShown( false );
+
+  saveDockWidgetsState();
 
   return LightApp_Module::deactivateModule( study );
 }
index 56efb877f24cf28845ae7eb38c0201bcdaab4e91..210b89e1f109c5c4c1879bdc0b478855adb3ba96 100644 (file)
@@ -29,6 +29,7 @@
 #include <LightApp_Module.h>
 
 class QMenu;
+class QDockWidget;
 class LightApp_Selection;
 class LightApp_SelectionMgr;
 class PVGUI_ProcessModuleHelper;
@@ -164,6 +165,8 @@ public:
 
   pqViewManager*         getMultiViewManager() const;
 
+  virtual bool           eventFilter( QObject*, QEvent* );
+
 protected:
   //virtual CAM_DataModel* createDataModel();
 
@@ -191,6 +194,12 @@ private:
   //! Create dock widgets context menus
   void                   setupDockWidgetsContextMenu();
 
+  //! Save states of dockable ParaView widgets
+  void                   saveDockWidgetsState();
+
+  //! Restore states of dockable ParaView widgets
+  void                   restoreDockWidgetsState();
+
   //! Shows or hides ParaView view window
   void                   showView( bool );    
 
@@ -235,6 +244,10 @@ private:
   pqImplementation*      Implementation;
 
   int                    mySelectionControlsTb;
+  int                    mySourcesMenuId;
+  int                    myFiltersMenuId;
+
+  QList<QDockWidget*>    myDockWidgets;
 };
 
 #endif // PVGUI_Module_H
index 4b5ff1c279012645ecf04e4891959f2bf3a0bcc7..c2469df2a8084af780c402d8598771111d68c002 100644 (file)
@@ -553,11 +553,15 @@ void PVGUI_Module::pvCreateMenus()
   createMenu( OpenFileId, aPVMnu, 5 );
 
   // Recent Files
-  Implementation->RecentFilesMenu =
-    new pqRecentFilesMenu( *menuMgr()->findMenu( createMenu( tr( "MEN_RECENT_FILES" ), aPVMnu, -1, 5 ) ),
-                          getApp()->desktop() );
+  int aMenuId = createMenu( tr( "MEN_RECENT_FILES" ), aPVMnu, -1, 5 );
+  QMenu* aMenu = menuMgr()->findMenu( aMenuId );
+  Implementation->RecentFilesMenu = new pqRecentFilesMenu( *aMenu, getApp()->desktop() );
   connect( Implementation->RecentFilesMenu, SIGNAL( serverConnectFailed() ),
           &Implementation->Core,           SLOT( makeDefaultConnectionIfNoneExists() ) );
+  QList<QAction*> anActns = aMenu->actions();
+  for (int i = 0; i < anActns.size(); ++i)
+    createMenu( anActns.at(i), aMenuId );
+
 
   createMenu( separator(), aPVMnu, -1, 5 );
 
@@ -629,8 +633,8 @@ void PVGUI_Module::pvCreateMenus()
 
   // Install ParaView managers for "Sources" menu
   QMenu* aRes = 0;
-  aPVMnu = createMenu( tr( "MEN_DESK_SOURCES" ), -1, -1, 60 );
-  if ( (aRes = getMenu( aPVMnu )) ) {
+  mySourcesMenuId = createMenu( tr( "MEN_DESK_SOURCES" ), -1, -1, 60 );
+  if ( (aRes = getMenu( mySourcesMenuId )) ) {
     Implementation->Core.setSourceMenu( aRes );
     connect( &Implementation->Core, SIGNAL( enableSourceCreate(bool) ),
             aRes,                  SLOT( setEnabled(bool) ) );
@@ -639,8 +643,8 @@ void PVGUI_Module::pvCreateMenus()
   // --- Menu "Filters"
 
   // Install ParaView managers for "Filters" menu
-  aPVMnu = createMenu( tr( "MEN_DESK_FILTERS" ), -1, -1, 70 );
-  if ( (aRes = getMenu( aPVMnu )) ) {
+  myFiltersMenuId = createMenu( tr( "MEN_DESK_FILTERS" ), -1, -1, 70 );
+  if ( (aRes = getMenu( myFiltersMenuId )) ) {
     Implementation->Core.setFilterMenu( aRes );
     connect( &Implementation->Core, SIGNAL( enableFilterCreate(bool) ),
             aRes,                  SLOT( setEnabled(bool) ) );
@@ -793,12 +797,16 @@ void PVGUI_Module::pvCreateToolBars()
   
   // --- Toolbar "Representation"
 
-  aTB = toolMgr()->toolBar( createTool( tr("TOOL_REPRESENTATION") ) );
+  aToolId = createTool( tr("TOOL_REPRESENTATION") );
+  aTB = toolMgr()->toolBar( aToolId );
+
   Implementation->Core.setupRepresentationToolbar(aTB);
   anActns = aTB->actions();
-  for (int i = 0; i < anActns.size(); ++i)
+  for (int i = 0; i < anActns.size(); ++i) {
+    createTool( anActns.at(i), aToolId );
     connect( &Implementation->Core, SIGNAL( enableVariableToolbar(bool) ),
             anActns.at(i),         SLOT( setEnabled(bool) ) );
+  }
 
   // --- Toolbar "Camera Controls"
 
@@ -822,17 +830,23 @@ void PVGUI_Module::pvCreateToolBars()
 
   // --- Toolbar "Common Filters"
 
-  aTB = toolMgr()->toolBar( createTool( tr("TOOL_COMMON_FILTERS") ) );
+  aToolId = createTool( tr("TOOL_COMMON_FILTERS") );
+  aTB = toolMgr()->toolBar( aToolId );
+
   Implementation->Core.setupCommonFiltersToolbar(aTB);
-  //QList<QAction*> anActns = aTB->actions();
-  //for (int i = 0; i < anActns.size(); ++i)
-  //  createTool(anActns.at(i),aToolId); /// !!!
+  anActns = aTB->actions();
+  for (int i = 0; i < anActns.size(); ++i)
+    createTool( anActns.at(i), aToolId );
  
   // --- Toolbar "Lookmarks"
 
-  aTB = toolMgr()->toolBar(createTool( tr("TOOL_LOOKMARKS") ));
+  aToolId = createTool( tr("TOOL_LOOKMARKS") );
+  aTB = toolMgr()->toolBar(aToolId);
+
   aTB->setContextMenuPolicy(Qt::CustomContextMenu);
   aTB->setOrientation(Qt::Vertical);
+  aTB->setAllowedAreas(Qt::RightToolBarArea);
+  toolMgr()->mainWindow()->addToolBar(Qt::RightToolBarArea,aTB);
   Implementation->Core.setupLookmarkToolbar(aTB);
 }
 
index fe50e027bf8471fc57603fb4109f80c4662e378a..28f122ca7ccac9813fc9e66dc67e5ae55b954d32 100644 (file)
 
 #include <QAction>
 #include <QDockWidget>
+#include <QToolBar>
 
 #include <pqAnimationPanel.h>
+#include <pqApplicationCore.h>
 #include <pqComparativeVisPanel.h>
 #include <pqMainWindowCore.h>
 #include <pqObjectInspectorWidget.h>
@@ -40,6 +42,7 @@
 #include <pqPipelineBrowserContextMenu.h>
 #include <pqPipelineMenu.h>
 #include <pqProxyTabWidget.h>
+#include <pqSettings.h>
 
 /*!
   \brief Create dock widgets for ParaView widgets such as object inspector, pipeline browser, etc.
@@ -50,15 +53,16 @@ void PVGUI_Module::setupDockWidgets()
   SUIT_Desktop* desk = application()->desktop();
 
   // See ParaView src/Applications/Client/MainWindow.cxx
-  QDockWidget* pipelineBrowserDock = new QDockWidget( tr( "Pipeline Browser" ), desk );
+  QDockWidget* pipelineBrowserDock = new QDockWidget( tr( "TTL_PIPELINE_BROWSER" ), desk );
   pipelineBrowserDock->setObjectName("pipelineBrowserDock");
   pipelineBrowserDock->setAllowedAreas( Qt::LeftDockWidgetArea|Qt::NoDockWidgetArea|Qt::RightDockWidgetArea );
   desk->addDockWidget( Qt::LeftDockWidgetArea, pipelineBrowserDock );
   Implementation->Core.setupPipelineBrowser( pipelineBrowserDock );
   pqPipelineBrowser *browser = Implementation->Core.pipelineBrowser();
   Implementation->Core.pipelineMenu().setModels(browser->getModel(), browser->getSelectionModel());
+  myDockWidgets.append(pipelineBrowserDock);
 
-  QDockWidget* objectInspectorDock = new QDockWidget( tr( "Object Inspector" ), desk );
+  QDockWidget* objectInspectorDock = new QDockWidget( tr( "TTL_OBJECT_INSPECTOR" ), desk );
   objectInspectorDock->setObjectName("objectInspectorDock");
   objectInspectorDock->setAllowedAreas( Qt::LeftDockWidgetArea|Qt::NoDockWidgetArea|Qt::RightDockWidgetArea );
   desk->addDockWidget( Qt::LeftDockWidgetArea, objectInspectorDock );
@@ -69,20 +73,30 @@ void PVGUI_Module::setupDockWidgets()
           this,                           SLOT( onPreAccept() ) );
   connect( proxyTab->getObjectInspector(), SIGNAL( postaccept() ),
           this,                           SLOT( onPostAccept() ) );
+  myDockWidgets.append(objectInspectorDock);
   
-  QDockWidget* statisticsViewDock  = new QDockWidget( tr( "Statistics View" ), desk );
+  QDockWidget* statisticsViewDock  = new QDockWidget( tr( "TTL_STATISTICS_VIEW" ), desk );
   statisticsViewDock->setObjectName("statisticsViewDock");
   statisticsViewDock->setAllowedAreas( Qt::BottomDockWidgetArea|Qt::LeftDockWidgetArea|Qt::NoDockWidgetArea|Qt::RightDockWidgetArea );
   desk->addDockWidget( Qt::BottomDockWidgetArea, statisticsViewDock );
   Implementation->Core.setupStatisticsView( statisticsViewDock );
+  myDockWidgets.append(statisticsViewDock);
 
-  QDockWidget* animationPanelDock  = new QDockWidget( tr( "Animation Inspector" ), desk );
+  QDockWidget* animationPanelDock  = new QDockWidget( tr( "TTL_ANIMATION_INSPECTOR" ), desk );
   animationPanelDock->setObjectName("animationPanelDock");
   desk->addDockWidget( Qt::LeftDockWidgetArea, animationPanelDock );
   pqAnimationPanel* animation_panel = Implementation->Core.setupAnimationPanel( animationPanelDock );
-  animation_panel->setCurrentTimeToolbar(toolMgr()->toolBar(createTool( tr("TOOL_CURRENT_TIME_CONTROLS") )));
+  
+  int aToolId = createTool( tr("TOOL_CURRENT_TIME_CONTROLS") );
+  QToolBar* aTB = toolMgr()->toolBar( aToolId );
+  animation_panel->setCurrentTimeToolbar( aTB );
+  QList<QAction*> anActns = aTB->actions();
+  for (int i = 0; i < anActns.size(); ++i)
+    createTool( anActns.at(i), aToolId );
+
+  myDockWidgets.append(animationPanelDock);
 
-  QDockWidget* lookmarkBrowserDock = new QDockWidget( tr( "Lookmark Browser" ), desk );
+  QDockWidget* lookmarkBrowserDock = new QDockWidget( tr( "TTL_LOOKMARK_BROWSER" ), desk );
   lookmarkBrowserDock->setObjectName("lookmarkBrowserDock");
   QSizePolicy sp( QSizePolicy::Preferred, QSizePolicy::Preferred );
   sp.setHorizontalStretch( 0 );
@@ -91,29 +105,34 @@ void PVGUI_Module::setupDockWidgets()
   lookmarkBrowserDock->setFloating( false );
   desk->addDockWidget( Qt::RightDockWidgetArea, lookmarkBrowserDock );
   Implementation->Core.setupLookmarkBrowser( lookmarkBrowserDock );
+  myDockWidgets.append(lookmarkBrowserDock);
 
-  QDockWidget* lookmarkInspectorDock = new QDockWidget( tr( "Lookmark Inspector" ), desk );
+  QDockWidget* lookmarkInspectorDock = new QDockWidget( tr( "TTL_LOOKMARK_INSPECTOR" ), desk );
   lookmarkInspectorDock->setObjectName("lookmarkInspectorDock");
   lookmarkInspectorDock->setAllowedAreas( Qt::RightDockWidgetArea );
   desk->addDockWidget( Qt::RightDockWidgetArea, lookmarkInspectorDock );
   Implementation->Core.setupLookmarkInspector( lookmarkInspectorDock );
+  myDockWidgets.append(lookmarkInspectorDock);
 
-  QDockWidget* comparativePanelDock  = new QDockWidget( tr( "Comparative View Inspector" ), desk );
+  QDockWidget* comparativePanelDock  = new QDockWidget( tr( "TTL_COMPARATIVE_VIEW_INSPECTOR" ), desk );
   comparativePanelDock->setObjectName("comparativePanelDock");
   desk->addDockWidget( Qt::LeftDockWidgetArea, comparativePanelDock );
   pqComparativeVisPanel* cv_panel    = new pqComparativeVisPanel( comparativePanelDock );
   comparativePanelDock->setWidget(cv_panel);
+  myDockWidgets.append(comparativePanelDock);
 
-  QDockWidget* animationViewDock     = new QDockWidget( tr( "Animation View" ), desk );
+  QDockWidget* animationViewDock     = new QDockWidget( tr( "TTL_ANIMATION_VIEW" ), desk );
   animationViewDock->setObjectName("animationViewDock");
   desk->addDockWidget( Qt::BottomDockWidgetArea, animationViewDock );
   Implementation->Core.setupAnimationView( animationViewDock );
+  myDockWidgets.append(animationViewDock);
 
-  QDockWidget* selectionInspectorDock = new QDockWidget( tr( "Selection Inspector" ), desk );
+  QDockWidget* selectionInspectorDock = new QDockWidget( tr( "TTL_SELECTION_INSPECTOR" ), desk );
   selectionInspectorDock->setObjectName("selectionInspectorDock");
   selectionInspectorDock->setAllowedAreas( Qt::AllDockWidgetAreas );
   desk->addDockWidget( Qt::LeftDockWidgetArea, selectionInspectorDock );
   Implementation->Core.setupSelectionInspector( selectionInspectorDock );
+  myDockWidgets.append(selectionInspectorDock);
 
   // Setup the statusbar ...
   Implementation->Core.setupProgressBar( desk->statusBar() );
@@ -155,3 +174,31 @@ void PVGUI_Module::setupDockWidgetsContextMenu()
   browserMenu->setMenuAction(action(DeleteId));
   browserMenu->setMenuAction(action(CreateCustomFilterId));
 }
+
+/*!
+  \brief Save states of dockable ParaView widgets.
+*/
+void PVGUI_Module::saveDockWidgetsState()
+{
+  SUIT_Desktop* desk = application()->desktop();
+
+  // Save the state of the window ...
+  pqApplicationCore::instance()->settings()->saveState(*desk, "MainWindow");
+
+  for (int i = 0; i < myDockWidgets.size(); ++i)
+    myDockWidgets.at(i)->setParent(0);
+}
+
+/*!
+  \brief Restore states of dockable ParaView widgets.
+*/
+void PVGUI_Module::restoreDockWidgetsState()
+{
+  SUIT_Desktop* desk = application()->desktop();
+
+  for (int i = 0; i < myDockWidgets.size(); ++i)
+    myDockWidgets.at(i)->setParent(desk);
+
+  // Restore the state of the window ...
+  pqApplicationCore::instance()->settings()->restoreState("MainWindow", *desk);
+}
index 0f585a350259779217bc89acfd32ddcd0c964d2f..530fa16c123ba08098a26aeeb810e51e29bde679 100644 (file)
 </context>
 <context>
     <name>PVGUI_Module</name>
+    <message>
+        <source>TTL_PIPELINE_BROWSER</source>
+        <translation>Pipeline Browser</translation>
+    </message>
+    <message>
+        <source>TTL_OBJECT_INSPECTOR</source>
+        <translation>Object Inspector</translation>
+    </message>
+    <message>
+        <source>TTL_STATISTICS_VIEW</source>
+        <translation>Statistics View</translation>
+    </message>
+    <message>
+        <source>TTL_ANIMATION_INSPECTOR</source>
+        <translation>Animation Inspector</translation>
+    </message>
+    <message>
+        <source>TTL_LOOKMARK_BROWSER</source>
+        <translation>Lookmark Browser</translation>
+    </message>
+    <message>
+        <source>TTL_LOOKMARK_INSPECTOR</source>
+        <translation>Lookmark Inspector</translation>
+    </message>
+    <message>
+        <source>TTL_COMPARATIVE_VIEW_INSPECTOR</source>
+        <translation>Comparative View Inspector</translation>
+    </message>
+    <message>
+        <source>TTL_ANIMATION_VIEW</source>
+        <translation>Animation View</translation>
+    </message>
+    <message>
+        <source>TTL_SELECTION_INSPECTOR</source>
+        <translation>Selection Inspector</translation>
+    </message>
     <message>
         <source>TOP_OPEN_FILE</source>
         <translation>Open File</translation>
     </message>
     <message>
         <source>MEN_OPEN_FILE</source>
-        <translation>&amp;Open File...</translation>
+        <translation>&amp;Open ParaView File...</translation>
     </message>
     <message>
         <source>STB_OPEN_FILE</source>
     </message>
     <message>
         <source>MEN_RECENT_FILES</source>
-        <translation>Recent Files</translation>
+        <translation>Recent ParaView Files</translation>
     </message>
     <message>
         <source>TOP_LOAD_STATE</source>
         <source>MEN_UNDO</source>
         <translation>&amp;Undo</translation>
     </message>
+    <message>
+        <source>MEN_CANTUNDO</source>
+        <translation>Can't Undo</translation>
+    </message>
+    <message>
+        <source>MEN_UNDO_ACTION</source>
+        <translation>&amp;Undo %1</translation>
+    </message>
+    <message>
+        <source>MEN_UNDO_ACTION_TIP</source>
+        <translation>Undo %1</translation>
+    </message>
     <message>
         <source>STB_UNDO</source>
         <translation>Undoes the last operation</translation>
         <source>MEN_REDO</source>
         <translation>&amp;Redo</translation>
     </message>
+    <message>
+        <source>MEN_CANTREDO</source>
+        <translation>Can't Redo</translation>
+    </message>
+    <message>
+        <source>MEN_REDO_ACTION</source>
+        <translation>&amp;Redo %1</translation>
+    </message>
+    <message>
+        <source>MEN_REDO_ACTION_TIP</source>
+        <translation>Redo %1</translation>
+    </message>
     <message>
         <source>STB_REDO</source>
         <translation>Redoes the last operation</translation>
         <source>MEN_CAMERA_UNDO</source>
         <translation>Camera Undo</translation>
     </message>
+    <message>
+        <source>MEN_CANT_CAMERA_UNDO</source>
+        <translation>Can't Undo Camera</translation>
+    </message>
+    <message>
+        <source>MEN_CAMERA_UNDO_ACTION</source>
+        <translation>U&amp;ndo %1</translation>
+    </message>
+    <message>
+        <source>MEN_CAMERA_UNDO_ACTION_TIP</source>
+        <translation>Undo %1</translation>
+    </message>
     <message>
         <source>STB_CAMERA_UNDO</source>
         <translation>Undoes the last camera operation</translation>
         <source>MEN_CAMERA_REDO</source>
         <translation>Camera Redo</translation>
     </message>
+    <message>
+        <source>MEN_CANT_CAMERA_REDO</source>
+        <translation>Can't Redo Camera</translation>
+    </message>
+    <message>
+        <source>MEN_CAMERA_REDO_ACTION</source>
+        <translation>R&amp;edo %1</translation>
+    </message>
+    <message>
+        <source>MEN_CAMERA_REDO_ACTION_TIP</source>
+        <translation>Redo %1</translation>
+    </message>
     <message>
         <source>STB_CAMERA_REDO</source>
         <translation>Redoes the last camera operation</translation>
         <source>STB_ENABLE_TOOLTIPS</source>
         <translation>Enable Tooltips</translation>
     </message>
+    <message>
+        <source>STB_PREACCEPT</source>
+        <translation>Updating...</translation>
+    </message>
+    <message>
+        <source>STB_POSTACCEPT</source>
+        <translation>Ready</translation>
+    </message>
     <message>
         <source>TOOL_ACTIVE_VARIABLE_CONTROLS</source>
         <translation>Active Variable Controls</translation>