]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
Porting to PV4.1
authorAdrien Bruneton <adrien.bruneton@cea.fr>
Thu, 13 Feb 2014 10:49:21 +0000 (11:49 +0100)
committerAdrien Bruneton <adrien.bruneton@cea.fr>
Thu, 13 Feb 2014 10:50:46 +0000 (11:50 +0100)
+ disabling MatplotlibMathTextUtilities is now made in the ParaView patch
+ reviewed trace start/stop mechanism to be compatible with SALOME Python interpreter
+ added new panel from PV4.1 (color map editor, etc ...)

src/PVGUI/CMakeLists.txt
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
src/PVGUI/resources/PARAVIS_msg_fr.ts
src/PVGUI/resources/PARAVIS_msg_ja.ts

index 5f95142beb90e748f68297624e13d1ec2c6da074..60ac2364e957b43346f4db80dee95db5e1cad5e9 100644 (file)
@@ -71,7 +71,7 @@ SET(_moc_HEADERS
 SET(_other_HEADERS
   PVGUI_OutputWindowAdapter.h
   PVGUI_Tools.h
-  PVGUI_MatplotlibMathTextUtilities.h
+  #PVGUI_MatplotlibMathTextUtilities.h
   PV_I.h
   PARAVIS_Gen_i.hh
   PV_Events.h
@@ -137,7 +137,7 @@ SET(_other_SOURCES
   PVGUI_OutputWindowAdapter.cxx
   PVGUI_Tools.cxx
   PVGUI_ParaViewSettingsPane.cxx
-  PVGUI_MatplotlibMathTextUtilities.cxx
+  #PVGUI_MatplotlibMathTextUtilities.cxx
   PARAVIS_Gen_i.cc
   PV_Tools.cxx
   )
index 884032f7f49f8d8d1a67084fefee69e154ede3b5..aca93f415606a0d63cebb2e8a99cef0e692de722 100644 (file)
@@ -65,6 +65,7 @@
 #include <SalomeApp_Study.h>
 #include <SALOME_ListIO.hxx>
 #include <SALOMEDS_Tool.hxx>
+#include <PyInterp_Interp.h>
 #include <PyInterp_Dispatcher.h>
 #include <PyConsole_Console.h>
 
 #include <pqHelpReaction.h>
 #include <vtkOutputWindow.h>
 #include <pqPluginManager.h>
-//#include <vtkPVPluginInformation.h>
 #include "pqInterfaceTracker.h"
 #include <pqSettings.h>
 #include <pqPythonDialog.h>
 #include <pqPythonManager.h>
 #include <pqPythonShell.h>
-//#include <pqBrandPluginsLoader.h>
 #include <pqLoadDataReaction.h>
 #include <vtkEventQtSlotConnect.h>
 #include <pqPythonScriptEditor.h>
-#include <pqStandardSummaryPanelImplementation.h>
 #include <pqCollaborationBehavior.h>
 #include <pqDataRepresentation.h>
 #include <pqPipelineRepresentation.h>
 #include <pqColorToolbar.h>
 #include <pqScalarBarVisibilityReaction.h>
 #include <pqStandardPropertyWidgetInterface.h>
-#include <pqMultiServerBehavior.h>
 #include <pqViewStreamingBehavior.h>
 
 #include <PARAVIS_version.h>
 
 #include <vtkPVConfig.h>
 
-#include <PVGUI_MatplotlibMathTextUtilities.h>
 
 #include CORBA_SERVER_HEADER(SALOME_ModuleCatalog)
 
-/*
- * Make sure all the kits register their classes with vtkInstantiator.
- * Since ParaView uses Tcl wrapping, all of VTK is already compiled in
- * anyway.  The instantiators will add no more code for the linker to
- * collect.
- */
-
-//#include <vtkCommonInstantiator.h>
-//#include <vtkFilteringInstantiator.h>
-//#include <vtkGenericFilteringInstantiator.h>
-//#include <vtkIOInstantiator.h>
-//#include <vtkImagingInstantiator.h>
-//#include <vtkInfovisInstantiator.h>
-//#include <vtkGraphicsInstantiator.h>
-
-//#include <vtkRenderingInstantiator.h>
-//#include <vtkVolumeRenderingInstantiator.h>
-//#include <vtkHybridInstantiator.h>
-//#include <vtkParallelInstantiator.h>
-
 #include <pqAlwaysConnectedBehavior.h>
 #include <pqApplicationCore.h>
 #include <pqAutoLoadPluginXMLBehavior.h>
@@ -370,16 +346,14 @@ PVGUI_Module::~PVGUI_Module()
 {
 }
 
-
-
 /*!
   \brief Initialize module. Creates menus, prepares context menu, etc.
   \param app SALOME GUI application instance
 */
 void PVGUI_Module::initialize( CAM_Application* app )
 {
-  //VTN: Disable conflict with python initialization for MatPlot.
-  PVGUI_MatplotlibMathTextUtilities::Disable();
+  // [ABN]: patched in ParaView's sources.
+  // PVGUI_MatplotlibMathTextUtilities::Disable();
 
   SalomeApp_Module::initialize( app );
 
@@ -431,7 +405,7 @@ void PVGUI_Module::initialize( CAM_Application* app )
 
     // * adds support for standard paraview views.
     pgm->addInterface(new pqStandardViewModules(pgm));
-    pgm->addInterface(new pqStandardSummaryPanelImplementation(pgm));
+    //pgm->addInterface(new pqStandardSummaryPanelImplementation(pgm));
     pgm->addInterface(new pqStandardPropertyWidgetInterface(pgm));
 
     // Load plugins distributed with application.
@@ -443,6 +417,7 @@ void PVGUI_Module::initialize( CAM_Application* app )
     new pqViewFrameActionsBehavior(this);
     new pqSpreadSheetVisibilityBehavior(this);
     new pqPipelineContextMenuBehavior(this);
+    new pqObjectPickingBehavior(this); // NEW in 4.1
     new pqDefaultViewBehavior(this);
     new pqAlwaysConnectedBehavior(this);
     new pqPVNewSourceBehavior(this);
@@ -458,7 +433,7 @@ void PVGUI_Module::initialize( CAM_Application* app )
     new pqPersistentMainWindowStateBehavior(aDesktop);
     new pqObjectPickingBehavior(aDesktop);
     new pqCollaborationBehavior(this);
-    new pqMultiServerBehavior(this);
+    //new pqMultiServerBehavior(this);
     new pqViewStreamingBehavior(this);
 
     // Setup quick-launch shortcuts.
@@ -471,8 +446,8 @@ void PVGUI_Module::initialize( CAM_Application* app )
     QList<QDockWidget*>::iterator i;
     for (i = currentDocks.begin(); i != currentDocks.end(); ++i) {
       if(!activeDocks.contains(*i)) {
-       myDockWidgets[*i] = false; // hidden by default
-       (*i)->hide();
+        myDockWidgets[*i] = false; // hidden by default
+        (*i)->hide();
       }
     }
 
@@ -481,7 +456,7 @@ void PVGUI_Module::initialize( CAM_Application* app )
     QList<QMenu*>::iterator im;
     for (im = currentMenus.begin(); im != currentMenus.end(); ++im) {
       if(!activeMenus.contains(*im)) {
-       myMenus.append(*im);
+          myMenus.append(*im);
       }
     }
 
@@ -516,7 +491,7 @@ void PVGUI_Module::initialize( CAM_Application* app )
  
   // we need to start trace after connection is done
   connect(pqApplicationCore::instance()->getObjectBuilder(), SIGNAL(finishedAddingServer(pqServer*)), 
-         this, SLOT(onFinishedAddingServer(pqServer*)));
+          this, SLOT(onFinishedAddingServer(pqServer*)));
 
   connect(pqApplicationCore::instance()->getObjectBuilder(), SIGNAL(dataRepresentationCreated(pqDataRepresentation*)), 
           this, SLOT(onDataRepresentationCreated(pqDataRepresentation*)));
@@ -524,9 +499,9 @@ void PVGUI_Module::initialize( CAM_Application* app )
 
   SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
   bool isStop = aResourceMgr->booleanValue( "PARAVIS", "stop_trace", false );
-  // start timer to activate trace in a proper moment
-  if(!isStop) 
-    startTimer( 1000 );
+  // start a timer to schedule the trace start asap:
+  if(!isStop)
+    startTimer( 0 );
 
   this->VTKConnect = vtkEventQtSlotConnect::New();
   
@@ -536,17 +511,17 @@ void PVGUI_Module::initialize( CAM_Application* app )
     if(pvs) {
       vtkPVProgressHandler* ph = pvs->GetProgressHandler();
       if(ph) {
-       this->VTKConnect->Connect(ph, vtkCommand::StartEvent,
-                                 this, SLOT(onStartProgress()));
-       this->VTKConnect->Connect(ph, vtkCommand::EndEvent,
-                                 this, SLOT(onEndProgress()));
+          this->VTKConnect->Connect(ph, vtkCommand::StartEvent,
+                                    this, SLOT(onStartProgress()));
+          this->VTKConnect->Connect(ph, vtkCommand::EndEvent,
+                                    this, SLOT(onEndProgress()));
       }
     }
   }
   
   connect(&pqActiveObjects::instance(),
-         SIGNAL(representationChanged(pqRepresentation*)),
-         this, SLOT(onRepresentationChanged(pqRepresentation*)));
+          SIGNAL(representationChanged(pqRepresentation*)),
+          this, SLOT(onRepresentationChanged(pqRepresentation*)));
 }
 
 void PVGUI_Module::onStartProgress()
@@ -638,27 +613,30 @@ void PVGUI_Module::onVariableChanged(pqVariableType t, const QString) {
 
 void PVGUI_Module::execPythonCommand(const QString& cmd, bool inSalomeConsole)
 {
-  if ( PyInterp_Dispatcher::Get()->IsBusy() ) return;
   if ( inSalomeConsole ) {
+    if ( PyInterp_Dispatcher::Get()->IsBusy() ) return;
     SalomeApp_Application* app =
       dynamic_cast< SalomeApp_Application* >(SUIT_Session::session()->activeApplication());
     PyConsole_Console* pyConsole = app->pythonConsole();
     if (pyConsole)
       pyConsole->exec(cmd);
   }
-  else {
-    pqPythonManager* manager = qobject_cast<pqPythonManager*>
+  else
+    {
+      pqPythonManager* manager = qobject_cast<pqPythonManager*>
       ( pqApplicationCore::instance()->manager( "PYTHON_MANAGER" ) );
-    if ( manager )  {
-      pqPythonDialog* pyDiag = manager->pythonShellDialog();
-      if ( pyDiag ) {
-       pqPythonShell* shell = pyDiag->shell();
-       if ( shell ) {
-         shell->executeScript(cmd);
-       }
-      }
+      if ( manager )
+        {
+          pqPythonDialog* pyDiag = manager->pythonShellDialog();
+          if ( pyDiag )
+            {
+              pqPythonShell* shell = pyDiag->shell();
+              if ( shell ) {
+                  shell->executeScript(cmd);
+              }
+            }
+        }
     }
-  }
 }
 
 /*!
@@ -667,7 +645,18 @@ void PVGUI_Module::execPythonCommand(const QString& cmd, bool inSalomeConsole)
 void PVGUI_Module::timerEvent(QTimerEvent* te )
 {
 #ifndef WNT
-  execPythonCommand("from paraview import smtrace\nsmtrace.start_trace()\n", false);
+  if ( PyInterp_Dispatcher::Get()->IsBusy() )
+    {
+      // Reschedule for later
+      MESSAGE("interpreter busy -> rescheduling trace start.");
+      startTimer(500);
+    }
+  else
+    {
+      MESSAGE("about to start trace....");
+      execPythonCommand("from paraview import smtrace;smtrace.start_trace()", false);
+      MESSAGE("trace STARTED....");
+    }
   killTimer( te->timerId() );
 #endif
 }
@@ -893,7 +882,7 @@ bool PVGUI_Module::activateModule( SUIT_Study* study )
     for (int i = 0; i < anActns.size(); ++i) {
       QAction* a = anActns.at(i);
       if(a)
-       a->setVisible(true);
+        a->setVisible(true);
     }
   }
 
@@ -926,7 +915,7 @@ bool PVGUI_Module::deactivateModule( SUIT_Study* study )
     for (int i = 0; i < anActns.size(); ++i) {
       QAction* a = anActns.at(i);
       if(a)
-       a->setVisible(false);
+        a->setVisible(false);
     }
   }
 
@@ -1068,6 +1057,29 @@ void PVGUI_Module::executeScript(const char *script)
 #endif
 }
 
+///**
+// *  Debug function printing out the given interpreter's execution context
+// */
+//void printInterpContext(PyInterp_Interp * interp )
+//{
+//  // Extract __smtraceString from interpreter's context
+//  const PyObject* ctxt = interp->getExecutionContext();
+//
+//  PyObject* lst = PyDict_Keys((PyObject *)ctxt);
+//  Py_ssize_t siz = PyList_GET_SIZE(lst);
+//  for (Py_ssize_t i = 0; i < siz; i++)
+//    {
+//      PyObject * elem = PyList_GetItem(lst, i);
+//      if (PyString_Check(elem))
+//        {
+//          std::cout << "At pos:" << i << ", " << PyString_AsString(elem) << std::endl;
+//        }
+//      else
+//        std::cout << "At pos:" << i << ", not a string!" << std::endl;
+//    }
+//  Py_XDECREF(lst);
+//}
+
 /*!
   \brief Returns trace string
 */
@@ -1077,24 +1089,22 @@ QString PVGUI_Module::getTraceString()
 {
   QString traceString;
 #ifndef WNT
-  pqPythonManager* manager = qobject_cast<pqPythonManager*>(
-                             pqApplicationCore::instance()->manager("PYTHON_MANAGER"));
-  if (manager)  {
-    pqPythonDialog* pyDiag = manager->pythonShellDialog();
-    if (pyDiag) {
-      pyDiag->runString("from paraview import smtrace\n"
-                        "__smtraceString = smtrace.get_trace_string()\n");
-      pyDiag->shell()->makeCurrent();
-      PyObject* main_module = PyImport_AddModule((char*)"__main__");
-      PyObject* global_dict = PyModule_GetDict(main_module);
-      PyObject* string_object = PyDict_GetItemString(global_dict, "__smtraceString");
-      char* string_ptr = string_object ? PyString_AsString(string_object) : 0;
-      if (string_ptr)  {
+  {
+    PyLockWrapper lck; // Acquire GIL
+
+    const char * code = "from paraview import smtrace;"
+                        "__smtraceString = smtrace.get_trace_string()";
+    PyRun_SimpleString(code);
+    // Now get the value of __smtraceString
+    PyObject* main_module = PyImport_AddModule((char*)"__main__");
+    PyObject* global_dict = PyModule_GetDict(main_module);
+    PyObject* string_object = PyDict_GetItemString(global_dict, "__smtraceString");
+    char* string_ptr = string_object ? PyString_AsString(string_object) : 0;
+    if (string_ptr)  {
         traceString = string_ptr;
-      }
-      pyDiag->shell()->releaseControl();
     }
-  }
+  } // release GIL
+
   if ((!traceString.isNull()) && traceString.length() != 0) {
     int aPos = traceString.indexOf(MYReplaceStr);
     while (aPos != -1) {
@@ -1264,7 +1274,7 @@ void PVGUI_Module::createPreferences()
 
   //rnv: imp 21712: [CEA 581] Preference to display legend by default 
   int aDispColoreLegend = addPreference( tr( "PREF_SHOW_COLOR_LEGEND" ), aParaVisSettingsTab,
-                                        LightApp_Preferences::Bool, "PARAVIS", "show_color_legend");
+                                        LightApp_Preferences::Bool, "PARAVIS", "show_color_legend");
 }
 
 /*!
@@ -1311,27 +1321,27 @@ void PVGUI_Module::contextMenuPopup(const QString& theClient, QMenu* theMenu, QS
     else {
       // Try to get state object
       _PTR(SObject) stateSObj = 
-       studyDS->FindObjectID(entry.toLatin1().constData());
+          studyDS->FindObjectID(entry.toLatin1().constData());
       if (!stateSObj) {
-       return;
+          return;
       }
       
       // Check local id
       _PTR(GenericAttribute) anAttr;
       if (!stateSObj->FindAttribute(anAttr, "AttributeLocalID")) {
-       return;
+          return;
       }
 
       _PTR(AttributeLocalID) anID(anAttr);
       
       if (anID->Value() == PVSTATEID) {
-       // Paraview state object
-       theMenu->addSeparator();
-       theMenu->addAction(action(AddStatePopupId));
-       theMenu->addAction(action(CleanAndAddStatePopupId));
-       theMenu->addSeparator();
-       theMenu->addAction(action(ParaVisRenameId));
-       theMenu->addAction(action(ParaVisDeleteId));
+        // Paraview state object
+        theMenu->addSeparator();
+        theMenu->addAction(action(AddStatePopupId));
+        theMenu->addAction(action(CleanAndAddStatePopupId));
+        theMenu->addSeparator();
+        theMenu->addAction(action(ParaVisRenameId));
+        theMenu->addAction(action(ParaVisDeleteId));
       }
     }
   }
@@ -1620,8 +1630,8 @@ void PVGUI_Module::loadSelectedState(bool toClear)
   } 
   else {
     SUIT_MessageBox::critical(getApp()->desktop(),
-                             tr("ERR_ERROR"),
-                             tr("ERR_STATE_CANNOT_BE_RESTORED"));
+                              tr("ERR_ERROR"),
+                              tr("ERR_STATE_CANNOT_BE_RESTORED"));
   }
 }
 
@@ -1637,7 +1647,7 @@ void PVGUI_Module::onRepresentationChanged(pqRepresentation*) {
   for (int i = 0; i < aWidget.size() ; i++ ) {
     if( aWidget[i] ) {
       connect( aWidget[i], SIGNAL ( variableChanged ( pqVariableType, const QString ) ), 
-              this, SLOT(onVariableChanged( pqVariableType, const QString) ), Qt::UniqueConnection );
+              this, SLOT(onVariableChanged( pqVariableType, const QString) ), Qt::UniqueConnection );
     }    
   }
 }
@@ -1669,5 +1679,4 @@ extern "C" {
   PVGUI_EXPORT char* getModuleVersion() {
     return (char*)PARAVIS_VERSION_STR;
   }
-         
 }
index cf760389b9a19a71246f7817d7f34918f12b4551..b56fc1188c0953871605fc3287da2dd8f743accc 100644 (file)
@@ -47,6 +47,7 @@ class pqPVApplicationCore;
 class pqDataRepresentation;
 class pqRepresentation;
 
+class PyConsole_Interp;
 
 class PVGUI_Module : public SalomeApp_Module
 {
@@ -54,85 +55,85 @@ class PVGUI_Module : public SalomeApp_Module
    
   //! Menu actions
   enum { // Menu "File"
-         OpenFileId,
-
-        LoadStateId,
-        SaveStateId,
-
-        SaveDataId,
-        SaveScreenshotId,
-        ExportId,
-
-        SaveAnimationId,
-        SaveGeometryId,
-
-        ConnectId,
-        DisconnectId,
-
-        // Menu "Edit"
-        UndoId,
-        RedoId,
-
-        CameraUndoId,
-        CameraRedoId,
-
-   FindDataId,   
-        ChangeInputId,
-   IgnoreTimeId, 
-        DeleteId,
-        DeleteAllId,
-
-        SettingsId,
-        ViewSettingsId,
-
-        // Menu "View"
-   FullScreenId, 
-
-        // Menu "Animation"
-        FirstFrameId,
-        PreviousFrameId,
-        PlayId,
-        NextFrameId,
-        LastFrameId,
-        LoopId,
-
-        // Menu "Tools" 
-        CreateCustomFilterId,
-        ManageCustomFiltersId,
-        CreateLookmarkId,
-        ManageLinksId,
-        AddCameraLinkId,
-        ManagePluginsExtensionsId,
-        DumpWidgetNamesId,
-        RecordTestId,
-        RecordTestScreenshotId,
-        PlayTestId,
-        MaxWindowSizeId,
-        CustomWindowSizeId,
-        TimerLogId,
-        OutputWindowId,
-        PythonShellId,
-        ShowTraceId,
-        RestartTraceId,
-
-        // Menu "Help" 
-        AboutParaViewId,
-        ParaViewHelpId,
-        EnableTooltipsId,
-
-        // Menu "Window" - "New Window"
-        ParaViewNewWindowId,
-
-        // "Save state" ParaVis module root object popup
-        SaveStatePopupId,
-
-        // "Add state" and "Reload state" popups
-        AddStatePopupId,
-        CleanAndAddStatePopupId,
-
-        // "Rename" and "Delete" popups (Object Browser)
-        ParaVisRenameId,
-        ParaVisDeleteId
+     OpenFileId,
+
+     LoadStateId,
+     SaveStateId,
+
+     SaveDataId,
+     SaveScreenshotId,
+     ExportId,
+
+     SaveAnimationId,
+     SaveGeometryId,
+
+     ConnectId,
+     DisconnectId,
+
+     // Menu "Edit"
+     UndoId,
+     RedoId,
+
+     CameraUndoId,
+     CameraRedoId,
+
+     FindDataId,
+     ChangeInputId,
+     IgnoreTimeId,
+     DeleteId,
+     DeleteAllId,
+
+     SettingsId,
+     ViewSettingsId,
+
+     // Menu "View"
+     FullScreenId,
+
+     // Menu "Animation"
+     FirstFrameId,
+     PreviousFrameId,
+     PlayId,
+     NextFrameId,
+     LastFrameId,
+     LoopId,
+
+     // Menu "Tools"
+     CreateCustomFilterId,
+     ManageCustomFiltersId,
+     CreateLookmarkId,
+     ManageLinksId,
+     AddCameraLinkId,
+     ManagePluginsExtensionsId,
+     DumpWidgetNamesId,
+     RecordTestId,
+     RecordTestScreenshotId,
+     PlayTestId,
+     MaxWindowSizeId,
+     CustomWindowSizeId,
+     TimerLogId,
+     OutputWindowId,
+     PythonShellId,
+     ShowTraceId,
+     RestartTraceId,
+
+     // Menu "Help"
+     AboutParaViewId,
+     ParaViewHelpId,
+     EnableTooltipsId,
+
+     // Menu "Window" - "New Window"
+     ParaViewNewWindowId,
+
+     // "Save state" ParaVis module root object popup
+     SaveStatePopupId,
+
+     // "Add state" and "Reload state" popups
+     AddStatePopupId,
+     CleanAndAddStatePopupId,
+
+     // "Rename" and "Delete" popups (Object Browser)
+     ParaVisRenameId,
+     ParaVisDeleteId
   };
 
 public:
@@ -217,8 +218,8 @@ private:
   //! restore visibility of the common dockable windows (OB, PyConsole, ... etc.)
   void restoreCommonWindowsState();
 
-  //! run Python command
-  void execPythonCommand(const QString& cmd, bool inSalomeConsole = false);
+  //! run Python command (either in SALOME's Python interpreter, or in ParaView's Python's interpreter)
+  void execPythonCommand(const QString& cmd, bool inSalomeConsole=false);
 
 private slots:
 
index ff751c69aec2d09dd4a2aedec5a31ac548b80236..beee3a52b6fa571018eb8763c66e736db8a137d0 100644 (file)
@@ -39,7 +39,7 @@
 #include <QFile>
 
 #include <pqApplicationCore.h>
-#include <pqColorScaleToolbar.h>
+// #include <pqColorScaleToolbar.h>
 #include <pqProgressManager.h>
 #include <pqRubberBandHelper.h>
 #include <pqScalarBarVisibilityAdaptor.h>
index b15c923cf336e51a77d67f9701239ec8c428bbec..617680f41d466b59e7c75066ecdda1e8778b02d5 100644 (file)
 #include <pqApplicationCore.h>
 #include <pqComparativeVisPanel.h>
 #include <pqPipelineBrowserWidget.h>
-//#include <pqProxyTabWidget.h>
 #include <pqProxyInformationWidget.h>
 #include <pqSettings.h>
 #include <pqDataInformationWidget.h>
 #include <pqPVAnimationWidget.h>
-#include <pqSelectionInspectorWidget.h>
+#include <pqFindDataSelectionDisplayFrame.h>
+#include <pqMultiBlockInspectorPanel.h>
 #include <pqProgressWidget.h>
 #include <pqProgressManager.h>
 #include <pqObjectInspectorWidget.h>
@@ -77,6 +77,7 @@
 #include <pqParaViewMenuBuilders.h>
 #include <pqCollaborationPanel.h>
 #include <pqMemoryInspectorPanel.h>
+#include <pqColorMapEditor.h>
 
 class ResizeHelper : public pqPVAnimationWidget
 {
@@ -211,14 +212,22 @@ void PVGUI_Module::setupDockWidgets()
 
   desk->tabifyDockWidget(animationViewDock,  statisticsViewDock);
 
-  // Selection view
-  QDockWidget* selectionInspectorDock = new QDockWidget( tr( "TTL_SELECTION_INSPECTOR" ), desk );
-  selectionInspectorDock->setObjectName("selectionInspectorDock");
-  selectionInspectorDock->setAllowedAreas( Qt::AllDockWidgetAreas );
-  desk->addDockWidget( Qt::LeftDockWidgetArea, selectionInspectorDock );
-  pqSelectionInspectorPanel* aSelInspector = new pqSelectionInspectorWidget(selectionInspectorDock);
-  selectionInspectorDock->setWidget(aSelInspector);
-  myDockWidgets[selectionInspectorDock] = false; // hidden by default
+  // Selection inspector
+  QDockWidget* selectionDisplayDock = new QDockWidget( tr( "TTL_SELECTION_INSPECTOR" ), desk );
+  selectionDisplayDock->setObjectName("selectionInspectorDock");
+  selectionDisplayDock->setAllowedAreas( Qt::AllDockWidgetAreas );
+  desk->addDockWidget( Qt::LeftDockWidgetArea, selectionDisplayDock );
+  pqFindDataSelectionDisplayFrame* aSelInspector = new pqFindDataSelectionDisplayFrame(selectionDisplayDock);
+  selectionDisplayDock->setWidget(aSelInspector);
+  myDockWidgets[selectionDisplayDock] = false; // hidden by default
+
+  // Multi-block inspector
+  QDockWidget* multiBlockInspectorPanelDock  = new QDockWidget( tr( "TTL_MUTLI_BLOCK_INSPECTOR" ), desk );
+  multiBlockInspectorPanelDock->setObjectName("multiBlockInspectorPanelDock");
+  desk->addDockWidget( Qt::LeftDockWidgetArea, multiBlockInspectorPanelDock );
+  pqMultiBlockInspectorPanel* mbi_panel = new pqMultiBlockInspectorPanel( multiBlockInspectorPanelDock );
+  multiBlockInspectorPanelDock->setWidget(mbi_panel);
+  myDockWidgets[multiBlockInspectorPanelDock] = false; // hidden by default
 
   // Comparative View
   QDockWidget* comparativePanelDock  = new QDockWidget( tr( "TTL_COMPARATIVE_VIEW_INSPECTOR" ), desk );
@@ -236,6 +245,15 @@ void PVGUI_Module::setupDockWidgets()
   collaborationPanelDock->setWidget(collaborationPanel);
   desk->addDockWidget(Qt::RightDockWidgetArea, collaborationPanelDock);
   myDockWidgets[collaborationPanelDock] = false; // hidden by default
+
+  // Color map editor
+  QDockWidget* colorMapEditorDock  = new QDockWidget( tr( "TTL_COLOR_MAP_EDITOR" ), desk );
+  colorMapEditorDock->setObjectName("colorMapEditorDock");
+  desk->addDockWidget( Qt::LeftDockWidgetArea, colorMapEditorDock );
+  pqColorMapEditor* cmed_panel = new pqColorMapEditor( colorMapEditorDock );
+  colorMapEditorDock->setWidget(cmed_panel);
+  myDockWidgets[colorMapEditorDock] = false; // hidden by default
+
   
   // Memory inspector dock
   QDockWidget* memoryInspectorDock = new QDockWidget(tr( "TTL_MEMORY_INSPECTOR" ), desk);
@@ -280,9 +298,11 @@ void PVGUI_Module::setupDockWidgets()
   statisticsViewDock->hide();
   comparativePanelDock->hide();
   animationViewDock->hide();
-  selectionInspectorDock->hide();
+  multiBlockInspectorPanelDock->hide();
+  selectionDisplayDock->hide();
   collaborationPanelDock->hide();
   memoryInspectorDock->hide();
+  colorMapEditorDock->hide();
 }
 
 /*!
index 83fe4e6119e538cff3feff860ea0f0d1dfaf6b41..086956c6b5d47b78146f97591712c6aad49fa008 100644 (file)
         <source>TTL_OBJECT_INSPECTOR</source>
         <translation>Properties</translation>
     </message>
+    <message>
+        <source>TTL_MUTLI_BLOCK_INSPECTOR</source>
+        <translation>Multi-block Inspector</translation>
+    </message>
+    <message>
+        <source>TTL_COLOR_MAP_EDITOR</source>
+        <translation>Color Map Editor</translation>
+    </message>           
     <message>
         <source>TTL_DISPLAY</source>
         <translation>Display</translation>
     </message>
     <message>
         <source>TTL_STATISTICS_VIEW</source>
-        <translation>Statistics View</translation>
+        <translation>Statistics Inspector</translation>
     </message>
     <message>
         <source>TTL_ANIMATION_INSPECTOR</source>
     </message>
     <message>
         <source>TTL_SELECTION_INSPECTOR</source>
-        <translation>Selection Inspector</translation>
+        <translation>Selection Display Inspector</translation>
     </message>
-     <message>
+    <message>
         <source>TTL_COLLABORATIVE_DOCK</source>
         <translation>Collaboration Panel</translation>
     </message>
-     <message>
+    <message>
         <source>TTL_MEMORY_INSPECTOR</source>
         <translation>Memory Inspector</translation>
     </message>
-   <message>
+    <message>
         <source>TOP_OPEN_FILE</source>
         <translation>Open Paraview File</translation>
     </message>
index 93d657b57f5d75f304af56a13d3a52ae1028f891..6ade59b1cd67dcad652e782159832f6266ff0957 100644 (file)
     <name>PVGUI_Module</name>
     <message>
         <source>PREF_SHOW_COLOR_LEGEND</source>
-        <translation type="unfinished">Show Color Legend</translation>
+        <translation>Afficher la légende couleur</translation>
     </message>
     <message>
         <source>TTL_PIPELINE_BROWSER</source>
-        <translation>Navigateur des conduites</translation>
+        <translation>Navigateur du pipeline</translation>
     </message>
     <message>
         <source>TTL_OBJECT_INSPECTOR</source>
         <translation>Inspecteur d&apos;objets</translation>
     </message>
+    <message>
+        <source>TTL_MUTLI_BLOCK_INSPECTOR</source>
+        <translation>Navigateur multi-blocs</translation>
+    </message>
+    <message>
+        <source>TTL_COLOR_MAP_EDITOR</source>
+        <translation>Editeur de carte de couleurs</translation>
+    </message>             
     <message>
         <source>TTL_DISPLAY</source>
         <translation>Affichage</translation>
     </message>
     <message>
         <source>TTL_STATISTICS_VIEW</source>
-        <translation>Vue Statistique</translation>
+        <translation>Navigateur de statistiques</translation>
     </message>
     <message>
         <source>TTL_ANIMATION_INSPECTOR</source>
index 0474842cc3d938d7914fb6be13bfe2d17331119e..fcf678c7af3dd63f72ebae0e67cc92d1b85293a7 100644 (file)
       <source>TTL_OBJECT_INSPECTOR</source>
       <translation>オブジェクト インスペクター</translation>
     </message>
+    <message>
+        <source>TTL_MUTLI_BLOCK_INSPECTOR</source>
+        <translation>Multi-block inspector</translation>
+    </message> 
+    <message>
+        <source>TTL_COLOR_MAP_EDITOR</source>
+        <translation>Color Map Editor</translation>
+    </message>      
     <message>
       <source>TTL_DISPLAY</source>
       <translation>表示</translation>