]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
[MEDCalc] add icons and menu for presentations
authorCédric Aguerre <cedric.aguerre@edf.fr>
Fri, 29 Jan 2016 08:41:33 +0000 (09:41 +0100)
committerCédric Aguerre <cedric.aguerre@edf.fr>
Fri, 29 Jan 2016 12:40:39 +0000 (13:40 +0100)
25 files changed:
src/MEDCalc/gui/DatasourceController.cxx
src/MEDCalc/gui/DatasourceController.hxx
src/MEDCalc/gui/MEDModule.cxx
src/MEDCalc/gui/MEDModule.hxx
src/MEDCalc/gui/MED_images.ts
src/MEDCalc/gui/MED_msg_en.ts
src/MEDCalc/gui/MED_msg_fr.ts
src/MEDCalc/gui/PresentationController.cxx
src/MEDCalc/gui/PresentationController.hxx
src/MEDCalc/gui/WorkspaceController.cxx
src/MEDCalc/gui/WorkspaceController.hxx
src/MEDCalc/res/CMakeLists.txt
src/MEDCalc/res/presentations/CMakeLists.txt [new file with mode: 0644]
src/MEDCalc/res/presentations/pqGlyph16.png [new file with mode: 0644]
src/MEDCalc/res/presentations/pqGlyph24.png [new file with mode: 0644]
src/MEDCalc/res/presentations/pqIsosurface16.png [new file with mode: 0644]
src/MEDCalc/res/presentations/pqIsosurface24.png [new file with mode: 0644]
src/MEDCalc/res/presentations/pqNodeMapData16.png [new file with mode: 0644]
src/MEDCalc/res/presentations/pqNodeMapData24.png [new file with mode: 0644]
src/MEDCalc/res/presentations/pqSlice16.png [new file with mode: 0644]
src/MEDCalc/res/presentations/pqSlice24.png [new file with mode: 0644]
src/MEDCalc/res/presentations/pqWarp16.png [new file with mode: 0644]
src/MEDCalc/res/presentations/pqWarp24.png [new file with mode: 0644]
src/MEDCalc/res/presentations/scalarmap16.png [new file with mode: 0644]
src/MEDCalc/res/presentations/scalarmap24.png [new file with mode: 0644]

index 636c4d95b036282d71a57d3ec52f52632b662d33..f7a96890bc8eca6c8b804a516451c028bf24c36c 100644 (file)
 // Datasource controller
 // ==============================================================
 //
-//DatasourceController::DatasourceController(StandardApp_Module * salomeModule)
-DatasourceController::DatasourceController(MEDModule * salomeModule)
+//DatasourceController::DatasourceController(StandardApp_Module* salomeModule)
+DatasourceController::DatasourceController(MEDModule* salomeModule)
 {
   STDLOG("Creating a DatasourceController");
   _salomeModule = salomeModule;
-  _studyEditor = new SALOME_AppStudyEditor(_salomeModule->getApp());
+  _studyEditor = _salomeModule->getStudyEditor();
 
   _dlgChangeUnderlyingMesh = new DlgChangeUnderlyingMesh(_studyEditor);
   connect(_dlgChangeUnderlyingMesh,SIGNAL(inputValidated()),
@@ -72,7 +72,6 @@ DatasourceController::DatasourceController(MEDModule * salomeModule)
 
 DatasourceController::~DatasourceController() {
   STDLOG("Deleting the DatasourceController");
-  delete _studyEditor;
 }
 
 void DatasourceController::createActions() {
@@ -103,6 +102,8 @@ void DatasourceController::createActions() {
   actionId = _salomeModule->createStandardAction(label,this, SLOT(OnAddImagesource()),icon,tooltip);
   // _salomeModule->addActionInToolbar(actionId);
   _salomeModule->createTool(actionId, toolbarId);
+  _salomeModule->action(actionId)->setIconVisibleInMenu(true);
+  _salomeModule->createMenu(actionId, menuId, 20);
 
   //
   // Actions for popup menu only
@@ -113,37 +114,6 @@ void DatasourceController::createActions() {
   actionId = _salomeModule->createStandardAction(label,this,SLOT(OnExpandField()),icon);
   _salomeModule->addActionInPopupMenu(actionId);
 
-  // Create a view submenu with usual visualization functions
-  label = tr("LAB_VISUALIZE_SCALARMAP");
-  icon  = tr("ICO_DATASOURCE_VIEW");
-  actionId = _salomeModule->createStandardAction(label,this,SLOT(OnVisualizeScalarMap()),icon);
-  _salomeModule->addActionInPopupMenu(actionId, tr("LAB_VISUALIZE"));
-
-  label = tr("LAB_VISUALIZE_CONTOUR");
-  icon  = tr("ICO_DATASOURCE_VIEW");
-  actionId = _salomeModule->createStandardAction(label,this,SLOT(OnVisualizeContour()),icon);
-  _salomeModule->addActionInPopupMenu(actionId, tr("LAB_VISUALIZE"));
-
-  label = tr("LAB_VISUALIZE_VECTORFIELD");
-  icon  = tr("ICO_DATASOURCE_VIEW");
-  actionId = _salomeModule->createStandardAction(label,this,SLOT(OnVisualizeVectorField()),icon);
-  _salomeModule->addActionInPopupMenu(actionId, tr("LAB_VISUALIZE"));
-
-  label = tr("LAB_VISUALIZE_SLICES");
-  icon  = tr("ICO_DATASOURCE_VIEW");
-  actionId = _salomeModule->createStandardAction(label,this,SLOT(OnVisualizeSlices()),icon);
-  _salomeModule->addActionInPopupMenu(actionId, tr("LAB_VISUALIZE"));
-
-  label = tr("LAB_VISUALIZE_DEFLECTIONSHAPE");
-  icon  = tr("ICO_DATASOURCE_VIEW");
-  actionId = _salomeModule->createStandardAction(label,this,SLOT(OnVisualizeDeflectionShape()),icon);
-  _salomeModule->addActionInPopupMenu(actionId, tr("LAB_VISUALIZE"));
-
-  label = tr("LAB_VISUALIZE_POINTSPRITE");
-  icon  = tr("ICO_DATASOURCE_VIEW");
-  actionId = _salomeModule->createStandardAction(label,this,SLOT(OnVisualizePointSprite()),icon);
-  _salomeModule->addActionInPopupMenu(actionId, tr("LAB_VISUALIZE"));
-
   // Use in workspace
   label = tr("LAB_USE_IN_WORKSPACE");
   icon  = tr("ICO_DATASOURCE_USE");
@@ -197,27 +167,6 @@ DatasourceController::updateTreeViewWithNewDatasource(const MEDCALC::DatasourceH
   _salomeModule->getApp()->updateObjectBrowser(true);
 }
 
-void
-DatasourceController::updateTreeViewWithNewPresentation(long fieldId, long presentationId)
-{
-  if (presentationId < 0) {
-    std::cerr << "Unknown presentation\n";
-    return;
-  }
-
-  std::string name = MEDFactoryClient::getPresentationManager()->getPresentationProperty(presentationId, "name");
-  name = tr(name.c_str()).toStdString();
-  std::string label = tr("ICO_MED_PRESENTATION").toStdString();
-
-  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>(_salomeModule->application()->activeStudy());
-  _PTR(Study) studyDS = study->studyDS();
-
-  _salomeModule->engine()->registerPresentation(_CAST(Study, studyDS)->GetStudy(), fieldId, name.c_str(), label.c_str());
-
-  // update Object browser
-  _salomeModule->getApp()->updateObjectBrowser(true);
-}
-
 void DatasourceController::OnAddDatasource()
 {
   // Dialog to get the filename where the input data are read from
@@ -291,7 +240,7 @@ void DatasourceController::OnExpandField()
   _studyEditor->updateActiveStudy();
 
   // Get the selected objects in the study (SObject)
-  SALOME_StudyEditor::SObjectList * listOfSObject = _studyEditor->getSelectedObjects();
+  SALOME_StudyEditor::SObjectList* listOfSObject = _studyEditor->getSelectedObjects();
   for (int i=0; i<listOfSObject->size(); i++) {
     SALOMEDS::SObject_var soFieldseries = listOfSObject->at(i);
 
@@ -308,7 +257,7 @@ void DatasourceController::OnExpandField()
     // contextual menu if the selected object is not conform
 
     // Then retrieve the list of fields in this timeseries
-    MEDCALC::FieldHandlerList * fieldHandlerList =
+    MEDCALC::FieldHandlerList* fieldHandlerList =
       MEDFactoryClient::getDataManager()->getFieldListInFieldseries(fieldseriesId);
 
     // Finally, create an entry for each of the field
@@ -324,71 +273,12 @@ void DatasourceController::OnExpandField()
   _salomeModule->updateObjBrowser(true);
 }
 
-void DatasourceController::visualize(DatasourceEvent::EventType eventType) {
-  // We need a _studyEditor updated on the active study
-  _studyEditor->updateActiveStudy();
-
-  // Get the selected objects in the study (SObject)
-  SALOME_StudyEditor::SObjectList * listOfSObject = _studyEditor->getSelectedObjects();
-
-  // For each object, emit a signal to the workspace to request a
-  // visualisation using the tui command (so that the user can see how
-  // to make a view of an object from the tui console).
-  for (int i=0; i<listOfSObject->size(); i++) {
-    SALOMEDS::SObject_var soField = listOfSObject->at(i);
-    int fieldId = _studyEditor->getParameterInt(soField,OBJECT_ID);
-    // If fieldId equals -1, then it means that it is not a field
-    // managed by the MED module, and we stop this function process.
-    if ( fieldId < 0 )
-      continue;
-
-    MEDCALC::FieldHandler * fieldHandler = MEDFactoryClient::getDataManager()->getFieldHandler(fieldId);
-    if (! fieldHandler) {
-      QMessageBox::warning(_salomeModule->getApp()->desktop(),
-         tr("Operation not allowed"),
-         tr("No field is defined"));
-      return;
-    }
-
-    DatasourceEvent * event = new DatasourceEvent();
-    event->eventtype = eventType;
-    XmedDataObject * dataObject = new XmedDataObject();
-    dataObject->setFieldHandler(*fieldHandler);
-    event->objectdata  = dataObject;
-    emit datasourceSignal(event);
-  }
-}
-
-void DatasourceController::OnVisualizeScalarMap() {
-  this->visualize(DatasourceEvent::EVENT_VIEW_OBJECT_SCALAR_MAP);
-}
-
-void DatasourceController::OnVisualizeContour() {
-  this->visualize(DatasourceEvent::EVENT_VIEW_OBJECT_CONTOUR);
-}
-
-void DatasourceController::OnVisualizeVectorField() {
-  this->visualize(DatasourceEvent::EVENT_VIEW_OBJECT_VECTOR_FIELD);
-}
-
-void DatasourceController::OnVisualizeSlices() {
-  this->visualize(DatasourceEvent::EVENT_VIEW_OBJECT_SLICES);
-}
-
-void DatasourceController::OnVisualizeDeflectionShape() {
-  this->visualize(DatasourceEvent::EVENT_VIEW_OBJECT_DEFLECTION_SHAPE);
-}
-
-void DatasourceController::OnVisualizePointSprite() {
-  this->visualize(DatasourceEvent::EVENT_VIEW_OBJECT_POINT_SPRITE);
-}
-
 void DatasourceController::OnUseInWorkspace() {
   // We need a studyEditor updated on the active study
   _studyEditor->updateActiveStudy();
 
   // Get the selected objects in the study (SObject)
-  SALOME_StudyEditor::SObjectList * listOfSObject = _studyEditor->getSelectedObjects();
+  SALOME_StudyEditor::SObjectList* listOfSObject = _studyEditor->getSelectedObjects();
   if ( listOfSObject->size() == 1 ) {
     // In this case we ask the name of the variable for the python
     // console
@@ -421,7 +311,7 @@ void DatasourceController::OnUseInWorkspace() {
       return;
     }
 
-    MEDCALC::FieldHandler * fieldHandler =
+    MEDCALC::FieldHandler* fieldHandler =
       MEDFactoryClient::getDataManager()->getFieldHandler(fieldId);
 
     if (! fieldHandler) {
@@ -441,9 +331,9 @@ void DatasourceController::OnUseInWorkspace() {
     }
     alias = dialog.getAlias();
 
-    DatasourceEvent * event = new DatasourceEvent();
+    DatasourceEvent* event = new DatasourceEvent();
     event->eventtype = DatasourceEvent::EVENT_USE_OBJECT;
-    XmedDataObject * dataObject = new XmedDataObject();
+    XmedDataObject* dataObject = new XmedDataObject();
     dataObject->setFieldHandler(*fieldHandler);
     event->objectdata  = dataObject;
     event->objectalias = alias;
@@ -464,11 +354,11 @@ void DatasourceController::OnUseInWorkspace() {
       bool isInWorkspace = _studyEditor->getParameterBool(soField,OBJECT_IS_IN_WORKSPACE);
       if ( !isInWorkspace ) {
         int fieldId = _studyEditor->getParameterInt(soField,OBJECT_ID);
-        MEDCALC::FieldHandler * fieldHandler =
+        MEDCALC::FieldHandler* fieldHandler =
           MEDFactoryClient::getDataManager()->getFieldHandler(fieldId);
-        DatasourceEvent * event = new DatasourceEvent();
+        DatasourceEvent* event = new DatasourceEvent();
         event->eventtype = DatasourceEvent::EVENT_IMPORT_OBJECT;
-        XmedDataObject * dataObject = new XmedDataObject();
+        XmedDataObject* dataObject = new XmedDataObject();
         dataObject->setFieldHandler(*fieldHandler);
         event->objectdata  = dataObject;
         emit datasourceSignal(event);
@@ -496,7 +386,7 @@ void DatasourceController::OnChangeUnderlyingMesh() {
   // Get the selected objects in the study (SObject). In cas of a
   // multiple selection, we consider only the first item. At least one
   // item must be selected.
-  SALOME_StudyEditor::SObjectList * listOfSObject = _studyEditor->getSelectedObjects();
+  SALOME_StudyEditor::SObjectList* listOfSObject = _studyEditor->getSelectedObjects();
   if ( listOfSObject->size() > 0 ) {
     SALOMEDS::SObject_var soField = listOfSObject->at(0);
     int fieldId = _studyEditor->getParameterInt(soField,OBJECT_ID);
@@ -514,11 +404,11 @@ void DatasourceController::OnChangeUnderlyingMeshInputValidated() {
   int meshId = _dlgChangeUnderlyingMesh->getMeshId();
   STDLOG("meshId = " << ToString(meshId));
   int fieldId = _dlgChangeUnderlyingMesh->getFieldId();
-  MEDCALC::FieldHandler * fieldHandler =
+  MEDCALC::FieldHandler* fieldHandler =
     MEDFactoryClient::getDataManager()->getFieldHandler(fieldId);
 
   // We don't modify the original field but create first a duplicate
-  MEDCALC::FieldHandler * duplicate = MEDFactoryClient::getCalculator()->dup(*fieldHandler);
+  MEDCALC::FieldHandler* duplicate = MEDFactoryClient::getCalculator()->dup(*fieldHandler);
   MEDFactoryClient::getDataManager()->changeUnderlyingMesh(duplicate->id, meshId);
 
   // Request once more the duplicate to update the meta-data on this
@@ -528,9 +418,9 @@ void DatasourceController::OnChangeUnderlyingMeshInputValidated() {
   // >>>
   // WARN: the following is a temporary code for test purpose
   // Automatically add in ws
-  DatasourceEvent * event = new DatasourceEvent();
+  DatasourceEvent* event = new DatasourceEvent();
   event->eventtype = DatasourceEvent::EVENT_IMPORT_OBJECT;
-  XmedDataObject * dataObject = new XmedDataObject();
+  XmedDataObject* dataObject = new XmedDataObject();
   dataObject->setFieldHandler(*duplicate);
   event->objectdata = dataObject;
   emit datasourceSignal(event);
@@ -547,7 +437,7 @@ void DatasourceController::OnInterpolateField() {
   // Get the selected objects in the study (SObject). In case of a
   // multiple selection, we consider only the first item. At least one
   // item must be selected.
-  SALOME_StudyEditor::SObjectList * listOfSObject = _studyEditor->getSelectedObjects();
+  SALOME_StudyEditor::SObjectList* listOfSObject = _studyEditor->getSelectedObjects();
   if ( listOfSObject->size() > 0 ) {
     SALOMEDS::SObject_var soField = listOfSObject->at(0);
     int fieldId = _studyEditor->getParameterInt(soField,OBJECT_ID);
@@ -603,9 +493,9 @@ void DatasourceController::OnInterpolateFieldInputValidated() {
   // >>>
   // WARN: the following is a temporary code for test purpose
   // Automatically add in ws
-  DatasourceEvent * event = new DatasourceEvent();
+  DatasourceEvent* event = new DatasourceEvent();
   event->eventtype = DatasourceEvent::EVENT_IMPORT_OBJECT;
-  XmedDataObject * dataObject = new XmedDataObject();
+  XmedDataObject* dataObject = new XmedDataObject();
   dataObject->setFieldHandler(*result);
   event->objectdata = dataObject;
   emit datasourceSignal(event);
@@ -622,7 +512,4 @@ DatasourceController::processWorkspaceEvent(const MEDCALC::MedEvent* event)
     MEDCALC::DatasourceHandler* datasourceHandler = MEDFactoryClient::getDataManager()->getDatasourceHandler(event->filename);
     this->updateTreeViewWithNewDatasource(datasourceHandler);
   }
-  else if ( event->type == MEDCALC::EVENT_ADD_PRESENTATION ) {
-    this->updateTreeViewWithNewPresentation(event->dataId, event->presentationId);
-  }
 }
index 69b9f8cb639f158fceb4cab92e853f310c037293..b2097e38c1f135be45a87504b733f198a1f7d054 100644 (file)
@@ -67,7 +67,7 @@ typedef struct {
     EVENT_ADD_PRESENTATION
   };
   int eventtype;
-  XmedDataObject * objectdata;
+  XmedDataObject* objectdata;
   QString objectalias;
 } DatasourceEvent;
 
@@ -82,7 +82,7 @@ class MEDCALCGUI_EXPORT DatasourceController: public QObject {
   Q_OBJECT
 
 public:
-  DatasourceController(MEDModule * salomeModule);
+  DatasourceController(MEDModule* salomeModule);
   ~DatasourceController();
 
   void createActions();
@@ -91,37 +91,29 @@ public slots:
   // Callback connected to dialog box validation signals
   void OnChangeUnderlyingMeshInputValidated();
   void OnInterpolateFieldInputValidated();
-  void processWorkspaceEvent(const MEDCALC::MedEvent * event);
+  void processWorkspaceEvent(const MEDCALC::MedEvent* event);
 
 signals:
-  void datasourceSignal(const DatasourceEvent * event);
+  void datasourceSignal(const DatasourceEvent* event);
 
 protected slots:
   void OnAddDatasource();
   void OnAddImagesource();
   void OnExpandField();
-  void OnVisualizeScalarMap();
-  void OnVisualizeContour();
-  void OnVisualizeVectorField();
-  void OnVisualizeSlices();
-  void OnVisualizeDeflectionShape();
-  void OnVisualizePointSprite();
   void OnUseInWorkspace();
   void OnChangeUnderlyingMesh();
   void OnInterpolateField();
 
 private:
-  void visualize(DatasourceEvent::EventType);
   void addDatasource(const char* filename);
   void updateTreeViewWithNewDatasource(const MEDCALC::DatasourceHandler*);
-  void updateTreeViewWithNewPresentation(long fieldId, long presentationId);
 
 private:
   MEDModule* _salomeModule;
-  SALOME_AppStudyEditor * _studyEditor;
+  SALOME_AppStudyEditor* _studyEditor; // borrowed to MEDModule
 
-  DlgChangeUnderlyingMesh * _dlgChangeUnderlyingMesh;
-  DlgInterpolateField * _dlgInterpolateField;
+  DlgChangeUnderlyingMesh* _dlgChangeUnderlyingMesh;
+  DlgInterpolateField* _dlgInterpolateField;
 
 };
 
index 50c7a4203ee0d80de81f03607fd597b8ab398184..7b9fccbb34815558a3f2d9e279462369cbe4028c 100644 (file)
@@ -38,7 +38,7 @@
 MED_ORB::MED_Gen_var MEDModule::myEngine;
 
 MEDModule::MEDModule() :
-  SalomeApp_Module("MED")
+  SalomeApp_Module("MED"), _studyEditor(0), _datasourceController(0), _workspaceController(0), _presentationController(0)
 {
   // Note also that we can't use the getApp() function here because
   // the initialize(...) function has not been called yet.
@@ -48,7 +48,14 @@ MEDModule::MEDModule() :
 
 MEDModule::~MEDModule()
 {
-  // nothing to do
+  if (_studyEditor)
+    delete _studyEditor;
+  if (_datasourceController)
+    delete _datasourceController;
+  //if (_workspaceController)
+  //  delete _workspaceController;
+  if (_presentationController)
+    delete _presentationController;
 }
 
 MED_ORB::MED_Gen_var
@@ -169,17 +176,24 @@ MEDModule::deactivateModule( SUIT_Study* theStudy )
  */
 void
 MEDModule::createModuleWidgets() {
+  _studyEditor = new SALOME_AppStudyEditor(getApp());
   _datasourceController = new DatasourceController(this);
   _workspaceController = new WorkspaceController(this);
   _xmedDataModel  = new XmedDataModel();
   _workspaceController->setDataModel(_xmedDataModel);
   _presentationController = new PresentationController(this);
 
-  connect(_datasourceController, SIGNAL(datasourceSignal(const DatasourceEvent *)),
-    _workspaceController, SLOT(processDatasourceEvent(const DatasourceEvent *)));
+  connect(_datasourceController, SIGNAL(datasourceSignal(const DatasourceEvent*)),
+    _workspaceController, SLOT(processDatasourceEvent(const DatasourceEvent*)));
 
-  connect(_workspaceController, SIGNAL(workspaceSignal(const MEDCALC::MedEvent *)),
-    _datasourceController, SLOT(processWorkspaceEvent(const MEDCALC::MedEvent *)));
+  connect(_presentationController, SIGNAL(presentationSignal(const PresentationEvent*)),
+    _workspaceController, SLOT(processPresentationEvent(const PresentationEvent*)));
+
+  connect(_workspaceController, SIGNAL(workspaceSignal(const MEDCALC::MedEvent*)),
+    _datasourceController, SLOT(processWorkspaceEvent(const MEDCALC::MedEvent*)));
+
+  connect(_workspaceController, SIGNAL(workspaceSignal(const MEDCALC::MedEvent*)),
+    _presentationController, SLOT(processWorkspaceEvent(const MEDCALC::MedEvent*)));
 }
 
 void
@@ -191,7 +205,7 @@ MEDModule::createModuleActions() {
 
 int
 MEDModule::createStandardAction(const QString& label,
-                                QObject * slotobject,
+                                QObject* slotobject,
                                 const char* slotmember,
                                 const QString& iconName,
                                 const QString& tooltip)
index 8f39391ca3dec9c988265fc1f48b1f9768729607..508253dcde064dfa6b2b84a76b3937b0afe90b4e 100644 (file)
@@ -25,6 +25,7 @@
 #include "MEDCALCGUI.hxx"
 
 #include <SalomeApp_Module.h>
+#include <SALOME_AppStudyEditor.hxx>
 
 #include "WorkspaceController.hxx"
 #include "XmedDataModel.hxx"
@@ -54,26 +55,30 @@ public:
 
   static MED_ORB::MED_Gen_var engine();
 
-  virtual void                    initialize( CAM_Application* app );
-  virtual QString                 engineIOR() const;
+  virtual void initialize(CAM_Application* app);
+  virtual QString engineIOR() const;
 
-  virtual QString                 iconName() const;
+  virtual QString iconName() const;
 
-  virtual void                    windows( QMap<int, int>& theMap ) const;
-  virtual void                    viewManagers( QStringList& theList ) const;
+  virtual void windows(QMap<int, int>& theMap) const;
+  virtual void viewManagers(QStringList& theList) const;
 
   int createStandardAction(const QString& label,
-                           QObject * slotobject,
+                           QObject* slotobject,
                            const char* slotmember,
                            const QString& iconName,
                            const QString& tooltip=QString());
-  void addActionInPopupMenu(int actionId,const QString& menus="",const QString& rule="client='ObjectBrowser'");
+  void addActionInPopupMenu(int actionId,
+                            const QString& menus="",
+                            const QString& rule="client='ObjectBrowser'");
 
   MEDCALC::MEDPresentationViewMode getSelectedViewMode();
 
+  inline SALOME_AppStudyEditor* getStudyEditor() { return _studyEditor; }
+
 public slots:
-  virtual bool                    activateModule( SUIT_Study* theStudy );
-  virtual bool                    deactivateModule( SUIT_Study* theStudy );
+  virtual bool activateModule(SUIT_Study* theStudy);
+  virtual bool deactivateModule(SUIT_Study* theStudy);
 
 private:
   void createModuleWidgets();
@@ -81,10 +86,11 @@ private:
   static void init();
 
 private:
-  DatasourceController * _datasourceController;
-  WorkspaceController *  _workspaceController;
-  XmedDataModel *        _xmedDataModel;
-  PresentationController *  _presentationController;
+  SALOME_AppStudyEditor* _studyEditor;
+  DatasourceController* _datasourceController;
+  WorkspaceController* _workspaceController;
+  XmedDataModel* _xmedDataModel;
+  PresentationController* _presentationController;
   static MED_ORB::MED_Gen_var myEngine;
 };
 
index 86476bca17d3632b6d012cf7d81bf66060d4c100..3f7fcf1e0ea8390e038bea692741d199a72776ac 100644 (file)
@@ -3,10 +3,6 @@
 <TS version="2.0" language="en_US">
   <context>
     <name>@default</name>
-    <message>
-      <source>ICO_MED_PRESENTATION</source>
-      <translation>pqAppIcon16.png</translation>
-    </message>
     <message>
       <source>ICO_IMPORT_MED</source>
       <translation>datasource_add.png</translation>
       <source>ICO_DATASOURCE_USE</source>
       <translation>datasource_use.png</translation>
     </message>
-    <message>
-      <source>ICO_DATASOURCE_VIEW</source>
-      <translation>datasource_view.png</translation>
-    </message>
     <message>
       <source>ICO_FOLDER</source>
       <translation>folder.png</translation>
       <source>ICO_WORKSPACE_SAVE</source>
       <translation>workspace_save.png</translation>
     </message>
+    <message>
+      <source>ICO_PRESENTATION_SCALAR_MAP</source>
+      <translation>scalarmap24.png</translation>
+    </message>
+    <message>
+      <source>ICO_PRESENTATION_CONTOUR</source>
+      <translation>pqIsosurface24.png</translation>
+    </message>
+    <message>
+      <source>ICO_PRESENTATION_VECTOR_FIELD</source>
+      <translation>pqGlyph24.png</translation>
+    </message>
+    <message>
+      <source>ICO_PRESENTATION_SLICES</source>
+      <translation>pqSlice24.png</translation>
+    </message>
+    <message>
+      <source>ICO_PRESENTATION_DEFLECTION_SHAPE</source>
+      <translation>pqWarp24.png</translation>
+    </message>
+    <message>
+      <source>ICO_PRESENTATION_POINT_SPRITE</source>
+      <translation>pqNodeMapData24.png</translation>
+    </message>
+    <message>
+      <source>ICO_MEDPresentationScalarMap</source>
+      <translation>scalarmap16.png</translation>
+    </message>
+    <message>
+      <source>ICO_MEDPresentationContour</source>
+      <translation>pqIsosurface16.png</translation>
+    </message>
+    <message>
+      <source>ICO_MEDPresentationVectorField</source>
+      <translation>pqGlyph16.png</translation>
+    </message>
+    <message>
+      <source>ICO_MEDPresentationSlices</source>
+      <translation>pqSlice16.png</translation>
+    </message>
+    <message>
+      <source>ICO_MEDPresentationDeflectionShape</source>
+      <translation>pqWarp16.png</translation>
+    </message>
+    <message>
+      <source>ICO_MEDPresentationPointSprite</source>
+      <translation>pqNodeMapData16.png</translation>
+    </message>
   </context>
 </TS>
index a1c303a63fcc2f30b93074e54e7e9d3664729fcd..8a6d8934ed9cb6c4d67d60bcb1d9c7e23dc28d42 100644 (file)
       <source>TIP_VIEW_MODE_SPLIT_VIEW</source>
       <translation>Split</translation>
     </message>
-  </context>
-  <context>
-    <name>DatasourceController</name>
     <message>
-      <location filename="MEDCALC/gui/DatasourceController.cxx" line="45"/>
-      <source>LAB_ADD_DATA_SOURCE</source>
-      <translation>Add Data Source</translation>
+      <source>LAB_PRESENTATION_SCALAR_MAP</source>
+      <translation>Scalar map</translation>
     </message>
     <message>
-      <location filename="MEDCALC/gui/DatasourceController.cxx" line="46"/>
-      <source>TIP_ADD_DATA_SOURCE</source>
-      <translation>Add a file data source (file providing med data)</translation>
+      <source>TIP_PRESENTATION_SCALAR_MAP</source>
+      <translation>Scalar map</translation>
     </message>
     <message>
-      <location filename="MEDCALC/gui/DatasourceController.cxx" line="52"/>
-      <source>LAB_ADD_IMAGE_SOURCE</source>
-      <translation>Add Image Source</translation>
+      <source>LAB_PRESENTATION_CONTOUR</source>
+      <translation>Contour</translation>
     </message>
     <message>
-      <location filename="MEDCALC/gui/DatasourceController.cxx" line="53"/>
-      <source>TIP_ADD_IMAGE_SOURCE</source>
-      <translation>Create a Data Source from an image file</translation>
+      <source>TIP_PRESENTATION_CONTOUR</source>
+      <translation>Contour</translation>
     </message>
     <message>
-      <location filename="MEDCALC/gui/DatasourceController.cxx" line="62"/>
-      <source>LAB_EXPAND_FIELD</source>
-      <translation>Expand field timeseries</translation>
+      <source>LAB_PRESENTATION_VECTOR_FIELD</source>
+      <translation>Vector field</translation>
+    </message>
+    <message>
+      <source>TIP_PRESENTATION_VECTOR_FIELD</source>
+      <translation>Vector field</translation>
+    </message>
+    <message>
+      <source>LAB_PRESENTATION_SLICES</source>
+      <translation>Slices</translation>
+    </message>
+    <message>
+      <source>TIP_PRESENTATION_SLICES</source>
+      <translation>Slices</translation>
+    </message>
+    <message>
+      <source>LAB_PRESENTATION_DEFLECTION_SHAPE</source>
+      <translation>Deflection shape</translation>
+    </message>
+    <message>
+      <source>TIP_PRESENTATION_DEFLECTION_SHAPE</source>
+      <translation>Deflection shape</translation>
+    </message>
+    <message>
+      <source>LAB_PRESENTATION_POINT_SPRITE</source>
+      <translation>Point sprite</translation>
+    </message>
+    <message>
+      <source>TIP_PRESENTATION_POINT_SPRITE</source>
+      <translation>Point sprite</translation>
+    </message>
+    <message>
+      <source>MENU_PRESENTATIONS</source>
+      <translation>Presentations</translation>
     </message>
     <message>
-      <source>LAB_VISUALIZE_SCALARMAP</source>
+      <source>MEDPresentationScalarMap</source>
       <translation>Scalar map</translation>
     </message>
     <message>
-      <source>LAB_VISUALIZE_CONTOUR</source>
+      <source>MEDPresentationContour</source>
       <translation>Contour</translation>
     </message>
     <message>
-      <source>LAB_VISUALIZE_VECTORFIELD</source>
+      <source>MEDPresentationVectorField</source>
       <translation>Vector field</translation>
     </message>
     <message>
-      <source>LAB_VISUALIZE_SLICES</source>
+      <source>MEDPresentationSlices</source>
       <translation>Slices</translation>
     </message>
     <message>
-      <source>LAB_VISUALIZE_DEFLECTIONSHAPE</source>
+      <source>MEDPresentationDeflectionShape</source>
       <translation>Deflection shape</translation>
     </message>
     <message>
-      <source>LAB_VISUALIZE_POINTSPRITE</source>
+      <source>MEDPresentationPointSprite</source>
       <translation>Point sprite</translation>
     </message>
+  </context>
+  <context>
+    <name>DatasourceController</name>
+    <message>
+      <location filename="MEDCALC/gui/DatasourceController.cxx" line="45"/>
+      <source>LAB_ADD_DATA_SOURCE</source>
+      <translation>Add Data Source</translation>
+    </message>
     <message>
-      <location filename="MEDCALC/gui/DatasourceController.cxx" line="69"/>
-      <source>LAB_VISUALIZE</source>
-      <translation>Visualize</translation>
+      <location filename="MEDCALC/gui/DatasourceController.cxx" line="46"/>
+      <source>TIP_ADD_DATA_SOURCE</source>
+      <translation>Add a file data source (file providing med data)</translation>
+    </message>
+    <message>
+      <location filename="MEDCALC/gui/DatasourceController.cxx" line="52"/>
+      <source>LAB_ADD_IMAGE_SOURCE</source>
+      <translation>Add Image Source</translation>
+    </message>
+    <message>
+      <location filename="MEDCALC/gui/DatasourceController.cxx" line="53"/>
+      <source>TIP_ADD_IMAGE_SOURCE</source>
+      <translation>Create a Data Source from an image file</translation>
+    </message>
+    <message>
+      <location filename="MEDCALC/gui/DatasourceController.cxx" line="62"/>
+      <source>LAB_EXPAND_FIELD</source>
+      <translation>Expand field timeseries</translation>
     </message>
     <message>
       <location filename="MEDCALC/gui/DatasourceController.cxx" line="75"/>
index 812cfaeb25bf33c54ba94dde491381cf4e1b389d..290fe00fb294b30afb2cfd5593f1f19177408a03 100644 (file)
       <source>TIP_VIEW_MODE_SPLIT_VIEW</source>
       <translation>Scinder</translation>
     </message>
-  </context>
-  <context>
-    <name>DatasourceController</name>
     <message>
-      <source>MEDPresentationScalarMap</source>
+      <source>LAB_PRESENTATION_SCALAR_MAP</source>
       <translation>Carte scalaire</translation>
     </message>
     <message>
-      <location filename="MEDCALC/gui/DatasourceController.cxx" line="45"/>
-      <source>LAB_ADD_DATA_SOURCE</source>
-      <translation>Importer des données MED</translation>
+      <source>TIP_PRESENTATION_SCALAR_MAP</source>
+      <translation>Carte scalaire</translation>
     </message>
     <message>
-      <location filename="MEDCALC/gui/DatasourceController.cxx" line="46"/>
-      <source>TIP_ADD_DATA_SOURCE</source>
-      <translation>Ajouter des données par import de fichiers MED</translation>
+      <source>LAB_PRESENTATION_CONTOUR</source>
+      <translation>Contour</translation>
     </message>
     <message>
-      <location filename="MEDCALC/gui/DatasourceController.cxx" line="52"/>
-      <source>LAB_ADD_IMAGE_SOURCE</source>
-      <translation>Ajouter une image</translation>
+      <source>TIP_PRESENTATION_CONTOUR</source>
+      <translation>Contour</translation>
     </message>
     <message>
-      <location filename="MEDCALC/gui/DatasourceController.cxx" line="53"/>
-      <source>TIP_ADD_IMAGE_SOURCE</source>
-      <translation>Ajouter des données par import d'un fichier image</translation>
+      <source>LAB_PRESENTATION_VECTOR_FIELD</source>
+      <translation>Champ de vecteurs</translation>
     </message>
     <message>
-      <location filename="MEDCALC/gui/DatasourceController.cxx" line="62"/>
-      <source>LAB_EXPAND_FIELD</source>
-      <translation>Étendre les series temporelles du champ</translation>
+      <source>TIP_PRESENTATION_VECTOR_FIELD</source>
+      <translation>Champ de vecteurs</translation>
     </message>
     <message>
-      <source>LAB_VISUALIZE_SCALARMAP</source>
+      <source>LAB_PRESENTATION_SLICES</source>
+      <translation>Coupes</translation>
+    </message>
+    <message>
+      <source>TIP_PRESENTATION_SLICES</source>
+      <translation>Coupes</translation>
+    </message>
+    <message>
+      <source>LAB_PRESENTATION_DEFLECTION_SHAPE</source>
+      <translation>Déformée</translation>
+    </message>
+    <message>
+      <source>TIP_PRESENTATION_DEFLECTION_SHAPE</source>
+      <translation>Déformée</translation>
+    </message>
+    <message>
+      <source>LAB_PRESENTATION_POINT_SPRITE</source>
+      <translation>Point sprite</translation>
+    </message>
+    <message>
+      <source>TIP_PRESENTATION_POINT_SPRITE</source>
+      <translation>Point sprite</translation>
+    </message>
+    <message>
+      <source>MENU_PRESENTATIONS</source>
+      <translation>Présentations</translation>
+    </message>
+    <message>
+      <source>MEDPresentationScalarMap</source>
       <translation>Carte scalaire</translation>
     </message>
     <message>
-      <source>LAB_VISUALIZE_CONTOUR</source>
+      <source>MEDPresentationContour</source>
       <translation>Contour</translation>
     </message>
     <message>
-      <source>LAB_VISUALIZE_VECTORFIELD</source>
+      <source>MEDPresentationVectorField</source>
       <translation>Champ de vecteurs</translation>
     </message>
     <message>
-      <source>LAB_VISUALIZE_SLICES</source>
+      <source>MEDPresentationSlices</source>
       <translation>Coupes</translation>
     </message>
     <message>
-      <source>LAB_VISUALIZE_DEFLECTIONSHAPE</source>
+      <source>MEDPresentationDeflectionShape</source>
       <translation>Déformée</translation>
     </message>
     <message>
-      <source>LAB_VISUALIZE_POINTSPRITE</source>
+      <source>MEDPresentationPointSprite</source>
       <translation>Point sprite</translation>
     </message>
+  </context>
+  <context>
+    <name>DatasourceController</name>
+    <message>
+      <source>MEDPresentationScalarMap</source>
+      <translation>Carte scalaire</translation>
+    </message>
+    <message>
+      <location filename="MEDCALC/gui/DatasourceController.cxx" line="45"/>
+      <source>LAB_ADD_DATA_SOURCE</source>
+      <translation>Importer des données MED</translation>
+    </message>
     <message>
-      <location filename="MEDCALC/gui/DatasourceController.cxx" line="69"/>
-      <source>LAB_VISUALIZE</source>
-      <translation>Visualiser</translation>
+      <location filename="MEDCALC/gui/DatasourceController.cxx" line="46"/>
+      <source>TIP_ADD_DATA_SOURCE</source>
+      <translation>Ajouter des données par import de fichiers MED</translation>
+    </message>
+    <message>
+      <location filename="MEDCALC/gui/DatasourceController.cxx" line="52"/>
+      <source>LAB_ADD_IMAGE_SOURCE</source>
+      <translation>Ajouter une image</translation>
+    </message>
+    <message>
+      <location filename="MEDCALC/gui/DatasourceController.cxx" line="53"/>
+      <source>TIP_ADD_IMAGE_SOURCE</source>
+      <translation>Ajouter des données par import d'un fichier image</translation>
+    </message>
+    <message>
+      <location filename="MEDCALC/gui/DatasourceController.cxx" line="62"/>
+      <source>LAB_EXPAND_FIELD</source>
+      <translation>Étendre les series temporelles du champ</translation>
     </message>
     <message>
       <location filename="MEDCALC/gui/DatasourceController.cxx" line="75"/>
index 0e0bf8441706b1e4565699e21fc3bfb328515e4a..ea2aa57521de4aa9050cbecae37f1b45c3a813d1 100644 (file)
 //
 
 #include "PresentationController.hxx"
+#include "DatasourceConstants.hxx"
 #include "MEDModule.hxx"
 #include "Basics_Utils.hxx"
 #include "QtxActionGroup.h"
+#include "MEDFactoryClient.hxx"
+
+#include <SalomeApp_Application.h>
+#include <SalomeApp_Study.h>
+#include <SalomeApp_DataObject.h>
+
+#include <SALOMEDS_SObject.hxx>
+#include <SALOMEDS_Study.hxx>
+
+#include <SUIT_Desktop.h>
+#include <QMessageBox>
 
 static const int OPTIONS_VIEW_MODE_ID = 943;
 static const int OPTIONS_VIEW_MODE_REPLACE_ID = 944;
@@ -32,6 +44,7 @@ PresentationController::PresentationController(MEDModule* salomeModule)
 {
   STDLOG("Creating a PresentationController");
   _salomeModule = salomeModule;
+  _studyEditor = _salomeModule->getStudyEditor();
 }
 
 PresentationController::~PresentationController()
@@ -45,6 +58,9 @@ PresentationController::createActions()
   STDLOG("Creating PresentationController actions");
   int toolbarId = _salomeModule->createTool("View Mode", "PresentationToolbar");
 
+  int presentationMenuId = _salomeModule->createMenu(tr("MENU_PRESENTATIONS"), -1, 1);
+
+  // View Mode
   QtxActionGroup* ag = _salomeModule->createActionGroup(OPTIONS_VIEW_MODE_ID, true);
   ag->setText("View mode");
   ag->setUsesDropDown(true);
@@ -76,7 +92,55 @@ PresentationController::createActions()
 
   _salomeModule->createTool(OPTIONS_VIEW_MODE_ID, toolbarId);
 
+  // Presentations
+  label   = tr("LAB_PRESENTATION_SCALAR_MAP");
+  tooltip = tr("TIP_PRESENTATION_SCALAR_MAP");
+  QString icon = tr("ICO_PRESENTATION_SCALAR_MAP");
+  int actionId;
+  actionId = _salomeModule->createStandardAction(label,this, SLOT(OnVisualizeScalarMap()),icon,tooltip);
+  _salomeModule->createTool(actionId, toolbarId);
+  _salomeModule->action(actionId)->setIconVisibleInMenu(true);
+  _salomeModule->createMenu(actionId, presentationMenuId);
+
+  label   = tr("LAB_PRESENTATION_CONTOUR");
+  tooltip = tr("TIP_PRESENTATION_CONTOUR");
+  icon    = tr("ICO_PRESENTATION_CONTOUR");
+  actionId = _salomeModule->createStandardAction(label,this, SLOT(OnVisualizeContour()),icon,tooltip);
+  _salomeModule->createTool(actionId, toolbarId);
+  _salomeModule->action(actionId)->setIconVisibleInMenu(true);
+  _salomeModule->createMenu(actionId, presentationMenuId);
+
+  label   = tr("LAB_PRESENTATION_VECTOR_FIELD");
+  tooltip = tr("TIP_PRESENTATION_VECTOR_FIELD");
+  icon    = tr("ICO_PRESENTATION_VECTOR_FIELD");
+  actionId = _salomeModule->createStandardAction(label,this, SLOT(OnVisualizeVectorField()),icon,tooltip);
+  _salomeModule->createTool(actionId, toolbarId);
+  _salomeModule->action(actionId)->setIconVisibleInMenu(true);
+  _salomeModule->createMenu(actionId, presentationMenuId);
+
+  label   = tr("LAB_PRESENTATION_SLICES");
+  tooltip = tr("TIP_PRESENTATION_SLICES");
+  icon    = tr("ICO_PRESENTATION_SLICES");
+  actionId = _salomeModule->createStandardAction(label,this, SLOT(OnVisualizeSlices()),icon,tooltip);
+  _salomeModule->createTool(actionId, toolbarId);
+  _salomeModule->action(actionId)->setIconVisibleInMenu(true);
+  _salomeModule->createMenu(actionId, presentationMenuId);
 
+  label   = tr("LAB_PRESENTATION_DEFLECTION_SHAPE");
+  tooltip = tr("TIP_PRESENTATION_DEFLECTION_SHAPE");
+  icon    = tr("ICO_PRESENTATION_DEFLECTION_SHAPE");
+  actionId = _salomeModule->createStandardAction(label,this, SLOT(OnVisualizeDeflectionShape()),icon,tooltip);
+  _salomeModule->createTool(actionId, toolbarId);
+  _salomeModule->action(actionId)->setIconVisibleInMenu(true);
+  _salomeModule->createMenu(actionId, presentationMenuId);
+
+  label   = tr("LAB_PRESENTATION_POINT_SPRITE");
+  tooltip = tr("TIP_PRESENTATION_POINT_SPRITE");
+  icon    = tr("ICO_PRESENTATION_POINT_SPRITE");
+  actionId = _salomeModule->createStandardAction(label,this, SLOT(OnVisualizePointSprite()),icon,tooltip);
+  _salomeModule->createTool(actionId, toolbarId);
+  _salomeModule->action(actionId)->setIconVisibleInMenu(true);
+  _salomeModule->createMenu(actionId, presentationMenuId);
 }
 
 MEDCALC::MEDPresentationViewMode
@@ -95,3 +159,106 @@ PresentationController::getSelectedViewMode()
     return MEDCALC::VIEW_MODE_SPLIT_VIEW;
   }
 }
+
+void
+PresentationController::visualize(PresentationEvent::EventType eventType)
+{
+  // We need a _studyEditor updated on the active study
+  _studyEditor->updateActiveStudy();
+
+  // Get the selected objects in the study (SObject)
+  SALOME_StudyEditor::SObjectList* listOfSObject = _studyEditor->getSelectedObjects();
+
+  // For each object, emit a signal to the workspace to request a
+  // visualisation using the tui command (so that the user can see how
+  // to make a view of an object from the tui console).
+  for (int i=0; i<listOfSObject->size(); i++) {
+    SALOMEDS::SObject_var soField = listOfSObject->at(i);
+    int fieldId = _studyEditor->getParameterInt(soField,OBJECT_ID);
+    // If fieldId equals -1, then it means that it is not a field
+    // managed by the MED module, and we stop this function process.
+    if ( fieldId < 0 )
+      continue;
+
+    MEDCALC::FieldHandler* fieldHandler = MEDFactoryClient::getDataManager()->getFieldHandler(fieldId);
+    if (! fieldHandler) {
+      QMessageBox::warning(_salomeModule->getApp()->desktop(),
+         tr("Operation not allowed"),
+         tr("No field is defined"));
+      return;
+    }
+
+    PresentationEvent* event = new PresentationEvent();
+    event->eventtype = eventType;
+    XmedDataObject* dataObject = new XmedDataObject();
+    dataObject->setFieldHandler(*fieldHandler);
+    event->objectdata = dataObject;
+    emit presentationSignal(event);
+  }
+}
+
+void
+PresentationController::OnVisualizeScalarMap()
+{
+  this->visualize(PresentationEvent::EVENT_VIEW_OBJECT_SCALAR_MAP);
+}
+
+void
+PresentationController::OnVisualizeContour()
+{
+  this->visualize(PresentationEvent::EVENT_VIEW_OBJECT_CONTOUR);
+}
+
+void
+PresentationController::OnVisualizeVectorField()
+{
+  this->visualize(PresentationEvent::EVENT_VIEW_OBJECT_VECTOR_FIELD);
+}
+
+void
+PresentationController::OnVisualizeSlices()
+{
+  this->visualize(PresentationEvent::EVENT_VIEW_OBJECT_SLICES);
+}
+
+void
+PresentationController::OnVisualizeDeflectionShape()
+{
+  this->visualize(PresentationEvent::EVENT_VIEW_OBJECT_DEFLECTION_SHAPE);
+}
+
+void
+PresentationController::OnVisualizePointSprite()
+{
+  this->visualize(PresentationEvent::EVENT_VIEW_OBJECT_POINT_SPRITE);
+}
+
+void
+PresentationController::updateTreeViewWithNewPresentation(long fieldId, long presentationId)
+{
+  if (presentationId < 0) {
+    std::cerr << "Unknown presentation\n";
+    return;
+  }
+
+  std::string name = MEDFactoryClient::getPresentationManager()->getPresentationProperty(presentationId, "name");
+  std::string icon = std::string("ICO_") + name;
+  name = tr(name.c_str()).toStdString();
+  std::string label = tr(icon.c_str()).toStdString();
+
+  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>(_salomeModule->application()->activeStudy());
+  _PTR(Study) studyDS = study->studyDS();
+
+  _salomeModule->engine()->registerPresentation(_CAST(Study, studyDS)->GetStudy(), fieldId, name.c_str(), label.c_str());
+
+  // update Object browser
+  _salomeModule->getApp()->updateObjectBrowser(true);
+}
+
+void
+PresentationController::processWorkspaceEvent(const MEDCALC::MedEvent* event)
+{
+  if ( event->type == MEDCALC::EVENT_ADD_PRESENTATION ) {
+    this->updateTreeViewWithNewPresentation(event->dataId, event->presentationId);
+  }
+}
index fbd90737fb41f54ad8d15fde89d907d684c7877a..f48f8e77b5d5cda0d96a3ee4e5a1aa4082ad89e2 100644 (file)
 #include <QtGui>
 #include "MEDCALCGUI.hxx"
 
+#include "MEDEventListener_i.hxx"
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(MEDPresentationManager)
+#include CORBA_CLIENT_HEADER(MEDDataManager)
+
+#include "XmedDataModel.hxx"
+#include <SALOME_AppStudyEditor.hxx>
+
+typedef struct {
+  enum EventType {
+    EVENT_VIEW_OBJECT_CONTOUR,
+    EVENT_VIEW_OBJECT_DEFLECTION_SHAPE,
+    EVENT_VIEW_OBJECT_POINT_SPRITE,
+    EVENT_VIEW_OBJECT_SCALAR_MAP,
+    EVENT_VIEW_OBJECT_SLICES,
+    EVENT_VIEW_OBJECT_VECTOR_FIELD
+  };
+  int eventtype;
+  XmedDataObject* objectdata;
+  QString objectalias;
+} PresentationEvent;
 
 class MEDModule;
 
@@ -39,8 +58,25 @@ public:
 
   MEDCALC::MEDPresentationViewMode getSelectedViewMode();
 
+signals:
+  void presentationSignal(const PresentationEvent* event);
+
+protected slots:
+  void OnVisualizeScalarMap();
+  void OnVisualizeContour();
+  void OnVisualizeVectorField();
+  void OnVisualizeSlices();
+  void OnVisualizeDeflectionShape();
+  void OnVisualizePointSprite();
+  void processWorkspaceEvent(const MEDCALC::MedEvent* event);
+
+private:
+  void visualize(PresentationEvent::EventType);
+  void updateTreeViewWithNewPresentation(long fieldId, long presentationId);
+
 private:
   MEDModule* _salomeModule;
+  SALOME_AppStudyEditor* _studyEditor; // borrowed to MEDModule
 
 };
 
index 0fc4f443fa95faaa55c3fa4979c15066eee4f763..3137c82d2a84ecfd3a11c2e6f3dec1da05c07868 100644 (file)
@@ -40,8 +40,8 @@
  * and containing a tree view for rendering a hierarchical data
  * model. This datamodel contains the objects used in the workspace.
  */
-//WorkspaceController::WorkspaceController(StandardApp_Module * salomeModule)
-WorkspaceController::WorkspaceController(MEDModule * salomeModule)
+//WorkspaceController::WorkspaceController(StandardApp_Module* salomeModule)
+WorkspaceController::WorkspaceController(MEDModule* salomeModule)
   : TreeGuiManager(salomeModule->getApp(), "Workspace")
 {
   _salomeModule = salomeModule;
@@ -67,8 +67,8 @@ WorkspaceController::WorkspaceController(MEDModule * salomeModule)
   // with other parts of the application, in particular the python
   // console that could retrieve this IOR using the
   // getEventListenerIOR() function of the MEDDataManager.
-  SalomeApp_Application * salomeApp = salomeModule->getApp();
-  const char * medEventListenerIOR =
+  SalomeApp_Application* salomeApp = salomeModule->getApp();
+  const char* medEventListenerIOR =
     salomeApp->orb()->object_to_string(medEventListenerServant);
   MEDFactoryClient::getDataManager()->setEventListenerIOR(medEventListenerIOR);
 
@@ -178,7 +178,7 @@ void WorkspaceController::_importItemList(QStringList itemNameIdList) {
  * console (see _importItemList).
  */
 void WorkspaceController::_importItem(QString itemNameId) {
-  XmedDataModel * dataModel = (XmedDataModel *)this->getDataModel();
+  XmedDataModel* dataModel = (XmedDataModel*)this->getDataModel();
   if ( dataModel == NULL ) {
     LOG("No data model associated to this tree view");
     return;
@@ -186,8 +186,8 @@ void WorkspaceController::_importItem(QString itemNameId) {
 
   // We can request the dataModel to obtain the dataObject associated
   // to this item (iteNameId is a TreeView id, Qt stuff only).
-  XmedDataObject * dataObject =
-    (XmedDataObject *)dataModel->getDataObject(QS2S(itemNameId));
+  XmedDataObject* dataObject =
+    (XmedDataObject*)dataModel->getDataObject(QS2S(itemNameId));
 
   if ( dataObject == NULL ) {
     LOG("WorkspaceController: WARN! No data object associated to the item "<<itemNameId);
@@ -196,7 +196,7 @@ void WorkspaceController::_importItem(QString itemNameId) {
 
   // Then, we can request this data object to obtain the associated
   // FieldHandler.
-  MEDCALC::FieldHandler * fieldHandler = dataObject->getFieldHandler();
+  MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();
   STDLOG("Field: mesh="<<fieldHandler->meshname<<" name="<<fieldHandler->fieldname);
 
   // Finally, we can import the field
@@ -211,14 +211,14 @@ void WorkspaceController::_importItem(QString itemNameId) {
  * options or simply specify the alias (i.e. the name of the python
  * variable).
  */
-void WorkspaceController::_importFieldIntoConsole(MEDCALC::FieldHandler * fieldHandler,
+void WorkspaceController::_importFieldIntoConsole(MEDCALC::FieldHandler* fieldHandler,
               bool askForOptions,
-              const char * alias)
+              const char* alias)
 {
   STDLOG("alias="<<alias);
 
   // By default, the alias is the name of the field
-  QString *effectiveAlias;
+  QString*effectiveAlias;
   if ( alias == NULL ) {
     effectiveAlias = new QString(fieldHandler->fieldname);
   }
@@ -260,11 +260,11 @@ void WorkspaceController::_importFieldIntoConsole(MEDCALC::FieldHandler * fieldH
  * emitted from the MEDEventListener. It processes events coming from
  * the python console.
  */
-void WorkspaceController::processMedEvent(const MEDCALC::MedEvent * event) {
+void WorkspaceController::processMedEvent(const MEDCALC::MedEvent* event) {
   STDLOG("WorkspaceController::processMedEvent");
   STDLOG("dataId  :"<<event->dataId);
 
-  XmedDataModel * dataModel = (XmedDataModel *)this->getDataModel();
+  XmedDataModel* dataModel = (XmedDataModel*)this->getDataModel();
   if ( dataModel == NULL ) {
     STDLOG("No data model associated to this tree view");
     return;
@@ -275,16 +275,16 @@ void WorkspaceController::processMedEvent(const MEDCALC::MedEvent * event) {
   }
   else if ( event->type == MEDCALC::EVENT_PUT_IN_WORKSPACE ) {
     STDLOG("add new field");
-    MEDCALC::FieldHandler * fieldHandler =
+    MEDCALC::FieldHandler* fieldHandler =
       MEDFactoryClient::getDataManager()->getFieldHandler(event->dataId);
 
-    XmedDataObject * dataObject = (XmedDataObject *)dataModel->newDataObject();
+    XmedDataObject* dataObject = (XmedDataObject*)dataModel->newDataObject();
     dataObject->setFieldHandler(*fieldHandler);
     this->getDataTreeModel()->addData(dataObject);
   }
   else if ( event->type == MEDCALC::EVENT_REMOVE_FROM_WORKSPACE ) {
     STDLOG("remove field");
-    std::map<string, DataObject *>::iterator itr = dataModel->begin();
+    std::map<string, DataObject*>::iterator itr = dataModel->begin();
     for ( ; itr != dataModel->end(); ++itr) {
       XmedDataObject* obj = dynamic_cast<XmedDataObject*>(itr->second);
       if (obj->getFieldHandler()->id == event->dataId) {
@@ -297,7 +297,7 @@ void WorkspaceController::processMedEvent(const MEDCALC::MedEvent * event) {
   }
   else if ( event->type == MEDCALC::EVENT_CLEAN_WORKSPACE ) {
     STDLOG("clean workspace");
-    std::map<string, DataObject *>::iterator itr = dataModel->begin();
+    std::map<string, DataObject*>::iterator itr = dataModel->begin();
     for ( ; itr != dataModel->end(); ++itr) {
       XmedDataObject* obj = dynamic_cast<XmedDataObject*>(itr->second);
       std::string itemNameId = obj->getNameId();
@@ -319,7 +319,7 @@ void WorkspaceController::processMedEvent(const MEDCALC::MedEvent * event) {
  * name is requested to the user using a file chooser dialog box
  */
 void WorkspaceController::_saveItemList(QStringList itemNameIdList) {
-  XmedDataProcessor * dataProcessor = new XmedDataProcessor(this->getDataModel());
+  XmedDataProcessor* dataProcessor = new XmedDataProcessor(this->getDataModel());
   dataProcessor->process(itemNameIdList);
   MEDCALC::FieldIdList_var fieldIdList = dataProcessor->getResultingFieldIdList();
   delete dataProcessor;
@@ -341,7 +341,7 @@ void WorkspaceController::_saveItemList(QStringList itemNameIdList) {
  * This function remove the selected item from workspace.
  */
 void WorkspaceController::_removeItemList(QStringList itemNameIdList) {
-  XmedDataModel * dataModel = (XmedDataModel *)this->getDataModel();
+  XmedDataModel* dataModel = (XmedDataModel*)this->getDataModel();
   if ( dataModel == NULL ) {
     LOG("No data model associated to this tree view");
     return;
@@ -352,8 +352,8 @@ void WorkspaceController::_removeItemList(QStringList itemNameIdList) {
 
   // We can request the dataModel to obtain the dataObject associated
   // to this item (iteNameId is a TreeView id, Qt stuff only).
-  XmedDataObject * dataObject =
-    (XmedDataObject *)dataModel->getDataObject(QS2S(itemNameId));
+  XmedDataObject* dataObject =
+    (XmedDataObject*)dataModel->getDataObject(QS2S(itemNameId));
 
   if ( dataObject == NULL ) {
     LOG("WorkspaceController: WARN! No data object associated to the item "<<itemNameId);
@@ -362,7 +362,7 @@ void WorkspaceController::_removeItemList(QStringList itemNameIdList) {
 
   // Then, we can request this data object to obtain the associated
   // FieldHandler.
-  MEDCALC::FieldHandler * fieldHandler = dataObject->getFieldHandler();
+  MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();
   STDLOG("Field: mesh="<<fieldHandler->meshname<<" name="<<fieldHandler->fieldname);
 
   // Remove the field variable from console
@@ -382,7 +382,7 @@ void WorkspaceController::_removeItemList(QStringList itemNameIdList) {
  * scalar map of the first item to start the job.
  */
 void WorkspaceController::_exportItemList(QStringList itemNameIdList) {
-  XmedDataProcessor * dataProcessor = new XmedDataProcessor(this->getDataModel());
+  XmedDataProcessor* dataProcessor = new XmedDataProcessor(this->getDataModel());
   dataProcessor->process(itemNameIdList);
   MEDCALC::FieldIdList_var fieldIdList = dataProcessor->getResultingFieldIdList();
   delete dataProcessor;
@@ -390,24 +390,24 @@ void WorkspaceController::_exportItemList(QStringList itemNameIdList) {
   // _GBO_ We use a temporary file to proceed with this export to
   // paravis. I'm sure it could be better in a futur version or when I
   // will get a better understanding of paravis API.
-  const char * tmpfilename = "/tmp/medcalc_export2paravis.med";
+  const char* tmpfilename = "/tmp/medcalc_export2paravis.med";
   MEDFactoryClient::getDataManager()->saveFields(tmpfilename, fieldIdList);
 
   // We import the whole file but create a scalar map for the first
   // selected field only (it's just an export to continue the job in
   // paravis)
-  XmedDataModel * dataModel = (XmedDataModel *)this->getDataModel();
+  XmedDataModel* dataModel = (XmedDataModel*)this->getDataModel();
   if ( dataModel == NULL ) {
     STDLOG("No data model associated to this tree view");
     return;
   }
   QString itemNameId = itemNameIdList[0];
-  XmedDataObject * dataObject = (XmedDataObject *)dataModel->getDataObject(QS2S(itemNameId));
+  XmedDataObject* dataObject = (XmedDataObject*)dataModel->getDataObject(QS2S(itemNameId));
   if ( dataObject == NULL ) {
     LOG("WorkspaceController: WARN! No data object associated to the item "<<itemNameId);
     return;
   }
-  MEDCALC::FieldHandler * fieldHandler = dataObject->getFieldHandler();
+  MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();
   QStringList commands;
   /*
   commands+=QString("from xmed.driver_pvis import pvis_scalarmap");
@@ -434,7 +434,7 @@ void WorkspaceController::_viewItemList(QStringList itemNameIdList) {
   // __GBO__: In this version, we consider only the first field in the selection
   QString itemNameId = itemNameIdList[0];
 
-  XmedDataModel * dataModel = (XmedDataModel *)this->getDataModel();
+  XmedDataModel* dataModel = (XmedDataModel*)this->getDataModel();
   if ( dataModel == NULL ) {
     LOG("No data model associated to this tree view");
     return;
@@ -442,8 +442,8 @@ void WorkspaceController::_viewItemList(QStringList itemNameIdList) {
 
   // We can request the dataModel to obtain the dataObject associated
   // to this item (iteNameId is a TreeView id, Qt stuff only).
-  XmedDataObject * dataObject =
-    (XmedDataObject *)dataModel->getDataObject(QS2S(itemNameId));
+  XmedDataObject* dataObject =
+    (XmedDataObject*)dataModel->getDataObject(QS2S(itemNameId));
   if ( dataObject == NULL ) {
     LOG("WorkspaceController: WARN! No data object associated to the item "<<itemNameId);
     return;
@@ -451,7 +451,7 @@ void WorkspaceController::_viewItemList(QStringList itemNameIdList) {
 
   // Then, we can request this data object to obtain the associated
   // FieldHandler.
-  MEDCALC::FieldHandler * fieldHandler = dataObject->getFieldHandler();
+  MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();
 
   // And finally, we can create the set of medcalc instructions to
   // generate the scalar map on this field.
@@ -477,8 +477,8 @@ WorkspaceController::_getViewMode() {
  * DatasourceController. The connection between the datasource signal
  * and this slot is realized by the main class MEDModule.
  */
-void WorkspaceController::processDatasourceEvent(const DatasourceEvent * event) {
-  XmedDataModel * dataModel = (XmedDataModel *)this->getDataModel();
+void WorkspaceController::processDatasourceEvent(const DatasourceEvent* event) {
+  XmedDataModel* dataModel = (XmedDataModel*)this->getDataModel();
   if ( dataModel == NULL ) {
     STDLOG("No data model associated to this tree view");
     return;
@@ -491,7 +491,7 @@ void WorkspaceController::processDatasourceEvent(const DatasourceEvent * event)
   // options such that "change the underlying mesh".
   // <<<
 
-  XmedDataObject * dataObject = event->objectdata;
+  XmedDataObject* dataObject = event->objectdata;
 
   if ( event->eventtype == DatasourceEvent::EVENT_IMPORT_OBJECT ) {
     std::cout << "IMPORT object in workspace: " << dataObject->toString() << std::endl;
@@ -516,62 +516,86 @@ void WorkspaceController::processDatasourceEvent(const DatasourceEvent * event)
           askForOptions,
           QCHARSTAR(event->objectalias));
   }
-  else if ( event->eventtype == DatasourceEvent::EVENT_VIEW_OBJECT_SCALAR_MAP ) {
+  else if ( event->eventtype == DatasourceEvent::EVENT_ADD_DATASOURCE ) {
+    QStringList commands;
+    commands += QString("medcalc.LoadDataSource('%1')").arg(event->objectalias);
+    _consoleDriver->exec(commands);
+  }
+  else if ( event->eventtype == DatasourceEvent::EVENT_ADD_IMAGE_AS_DATASOURCE ) {
+    QStringList commands;
+    commands += QString("medcalc.LoadImageAsDataSource('%1')").arg(event->objectalias);
+    _consoleDriver->exec(commands);
+  }
+  else {
+    STDLOG("The event "<<event->eventtype<<" is not implemented yet");
+  }
+}
+/**
+ * This slot can process the event coming from the
+ * DatasourceController. The connection between the datasource signal
+ * and this slot is realized by the main class MEDModule.
+ */
+void WorkspaceController::processPresentationEvent(const PresentationEvent* event) {
+  XmedDataModel* dataModel = (XmedDataModel*)this->getDataModel();
+  if ( dataModel == NULL ) {
+    STDLOG("No data model associated to this tree view");
+    return;
+  }
+
+  // >>>
+  // __GBO__ To know what to do we should test the type, because the
+  // object could be a mesh, a timeseries or a single field. We test
+  // here the case of a single field. Moreover, there could have
+  // options such that "change the underlying mesh".
+  // <<<
+
+  XmedDataObject* dataObject = event->objectdata;
+
+  if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_SCALAR_MAP ) {
     QString viewMode = _getViewMode();
     MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();
     QStringList commands;
     commands += QString("medcalc.MakeScalarMap(accessField(%1), %2)").arg(fieldHandler->id).arg(viewMode);
     _consoleDriver->exec(commands);
   }
-  else if ( event->eventtype == DatasourceEvent::EVENT_VIEW_OBJECT_CONTOUR ) {
+  else if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_CONTOUR ) {
     QString viewMode = _getViewMode();
     MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();
     QStringList commands;
     commands += QString("medcalc.MakeContour(accessField(%1), %2)").arg(fieldHandler->id).arg(viewMode);
     _consoleDriver->exec(commands);
   }
-  else if ( event->eventtype == DatasourceEvent::EVENT_VIEW_OBJECT_VECTOR_FIELD ) {
+  else if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_VECTOR_FIELD ) {
     QString viewMode = _getViewMode();
     MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();
     QStringList commands;
     commands += QString("medcalc.MakeVectorField(accessField(%1), %2)").arg(fieldHandler->id).arg(viewMode);
     _consoleDriver->exec(commands);
   }
-  else if ( event->eventtype == DatasourceEvent::EVENT_VIEW_OBJECT_SLICES ) {
+  else if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_SLICES ) {
     QString viewMode = _getViewMode();
     MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();
     QStringList commands;
     commands += QString("medcalc.MakeSlices(accessField(%1), %2)").arg(fieldHandler->id).arg(viewMode);
     _consoleDriver->exec(commands);
   }
-  else if ( event->eventtype == DatasourceEvent::EVENT_VIEW_OBJECT_DEFLECTION_SHAPE ) {
+  else if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_DEFLECTION_SHAPE ) {
     QString viewMode = _getViewMode();
     MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();
     QStringList commands;
     commands += QString("medcalc.MakeDeflectionShape(accessField(%1), %2)").arg(fieldHandler->id).arg(viewMode);
     _consoleDriver->exec(commands);
   }
-  else if ( event->eventtype == DatasourceEvent::EVENT_VIEW_OBJECT_POINT_SPRITE ) {
+  else if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_POINT_SPRITE ) {
     QString viewMode = _getViewMode();
     MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();
     QStringList commands;
     commands += QString("medcalc.MakePointSprite(accessField(%1), %2)").arg(fieldHandler->id).arg(viewMode);
     _consoleDriver->exec(commands);
   }
-  else if ( event->eventtype == DatasourceEvent::EVENT_ADD_DATASOURCE ) {
-    QStringList commands;
-    commands += QString("medcalc.LoadDataSource('%1')").arg(event->objectalias);
-    _consoleDriver->exec(commands);
-  }
-  else if ( event->eventtype == DatasourceEvent::EVENT_ADD_IMAGE_AS_DATASOURCE ) {
-    QStringList commands;
-    commands += QString("medcalc.LoadImageAsDataSource('%1')").arg(event->objectalias);
-    _consoleDriver->exec(commands);
-  }
   else {
     STDLOG("The event "<<event->eventtype<<" is not implemented yet");
   }
-
 }
 
 void WorkspaceController::OnSaveWorkspace() {
index 969fab86a63015a1fe5101b341973d9ad8d1079c..876ae6eab53876cff520e48e0e447b76452bf54c 100644 (file)
@@ -26,6 +26,7 @@
 #include "MEDEventListener_i.hxx"
 #include "XmedConsoleDriver.hxx"
 #include "DatasourceController.hxx"
+#include "PresentationController.hxx"
 #include "MEDCALCGUI.hxx"
 
 #include <SALOMEconfig.h>
@@ -46,7 +47,7 @@ class MEDCALCGUI_EXPORT WorkspaceController: public TreeGuiManager {
   Q_OBJECT
 
 public:
-  WorkspaceController(MEDModule * salomeModule);
+  WorkspaceController(MEDModule* salomeModule);
   ~WorkspaceController();
 
   void createActions();
@@ -56,20 +57,21 @@ public slots:
   void processItemList(QStringList itemNameIdList, int actionId);
 
   // Internal slots
-  void processMedEvent(const MEDCALC::MedEvent * event);
-  void processDatasourceEvent(const DatasourceEvent * event);
+  void processMedEvent(const MEDCALC::MedEvent* event);
+  void processDatasourceEvent(const DatasourceEvent* event);
+  void processPresentationEvent(const PresentationEvent* event);
   void OnSaveWorkspace();
   void OnCleanWorkspace();
 
 signals:
-  void workspaceSignal(const MEDCALC::MedEvent * event);
+  void workspaceSignal(const MEDCALC::MedEvent* event);
 
 private:
   void _importItem(QString itemNameId);
   void _importItemList(QStringList itemNameIdList);
-  void _importFieldIntoConsole(MEDCALC::FieldHandler * fieldHandler,
+  void _importFieldIntoConsole(MEDCALC::FieldHandler* fieldHandler,
                                bool askForOptions,
-                               const char * alias=NULL);
+                               const char* alias=NULL);
 
   void _exportItemList(QStringList itemNameIdList);
   void _saveItemList(QStringList itemNameIdList);
@@ -78,9 +80,9 @@ private:
   QString _getViewMode();
 
 private:
-  XmedConsoleDriver * _consoleDriver;
-  MEDModule * _salomeModule;
-  MEDEventListener_i * _medEventListener;
+  XmedConsoleDriver* _consoleDriver;
+  MEDModule* _salomeModule;
+  MEDEventListener_i* _medEventListener;
 
   // This structure is intended to memorized in a bundle the whole set
   // of integers identifying the actions of the popup menu associated
index fb78aa13cafb0a5bd6e0851e4c5d1872098b70e4..c46ae2bbbbaa1281f9a22b873b301e35ea7b2018 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2015  CEA/DEN, EDF R&D
+# Copyright (C) 2007-2016  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -18,6 +18,7 @@
 #
 
 ADD_SUBDIRECTORY(testfiles)
+ADD_SUBDIRECTORY(presentations)
 
 SET(MED_RESOURCES_FILES
   datasource_add.png
diff --git a/src/MEDCalc/res/presentations/CMakeLists.txt b/src/MEDCalc/res/presentations/CMakeLists.txt
new file mode 100644 (file)
index 0000000..b5ca408
--- /dev/null
@@ -0,0 +1,34 @@
+# Copyright (C) 2016  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+SET(MED_RESOURCES_FILES
+  pqGlyph16.png
+  pqGlyph24.png
+  pqIsosurface16.png
+  pqIsosurface24.png
+  pqNodeMapData16.png
+  pqNodeMapData24.png
+  pqSlice16.png
+  pqSlice24.png
+  pqWarp16.png
+  pqWarp24.png
+  scalarmap16.png
+  scalarmap24.png
+  )
+INSTALL(FILES ${MED_RESOURCES_FILES} DESTINATION ${SALOME_MED_INSTALL_RES_DATA})
diff --git a/src/MEDCalc/res/presentations/pqGlyph16.png b/src/MEDCalc/res/presentations/pqGlyph16.png
new file mode 100644 (file)
index 0000000..ff441b0
Binary files /dev/null and b/src/MEDCalc/res/presentations/pqGlyph16.png differ
diff --git a/src/MEDCalc/res/presentations/pqGlyph24.png b/src/MEDCalc/res/presentations/pqGlyph24.png
new file mode 100644 (file)
index 0000000..68e6766
Binary files /dev/null and b/src/MEDCalc/res/presentations/pqGlyph24.png differ
diff --git a/src/MEDCalc/res/presentations/pqIsosurface16.png b/src/MEDCalc/res/presentations/pqIsosurface16.png
new file mode 100644 (file)
index 0000000..40b7908
Binary files /dev/null and b/src/MEDCalc/res/presentations/pqIsosurface16.png differ
diff --git a/src/MEDCalc/res/presentations/pqIsosurface24.png b/src/MEDCalc/res/presentations/pqIsosurface24.png
new file mode 100644 (file)
index 0000000..825222c
Binary files /dev/null and b/src/MEDCalc/res/presentations/pqIsosurface24.png differ
diff --git a/src/MEDCalc/res/presentations/pqNodeMapData16.png b/src/MEDCalc/res/presentations/pqNodeMapData16.png
new file mode 100644 (file)
index 0000000..4cb32e4
Binary files /dev/null and b/src/MEDCalc/res/presentations/pqNodeMapData16.png differ
diff --git a/src/MEDCalc/res/presentations/pqNodeMapData24.png b/src/MEDCalc/res/presentations/pqNodeMapData24.png
new file mode 100644 (file)
index 0000000..3b79783
Binary files /dev/null and b/src/MEDCalc/res/presentations/pqNodeMapData24.png differ
diff --git a/src/MEDCalc/res/presentations/pqSlice16.png b/src/MEDCalc/res/presentations/pqSlice16.png
new file mode 100644 (file)
index 0000000..5b1f1cc
Binary files /dev/null and b/src/MEDCalc/res/presentations/pqSlice16.png differ
diff --git a/src/MEDCalc/res/presentations/pqSlice24.png b/src/MEDCalc/res/presentations/pqSlice24.png
new file mode 100644 (file)
index 0000000..070ce3b
Binary files /dev/null and b/src/MEDCalc/res/presentations/pqSlice24.png differ
diff --git a/src/MEDCalc/res/presentations/pqWarp16.png b/src/MEDCalc/res/presentations/pqWarp16.png
new file mode 100644 (file)
index 0000000..b27599a
Binary files /dev/null and b/src/MEDCalc/res/presentations/pqWarp16.png differ
diff --git a/src/MEDCalc/res/presentations/pqWarp24.png b/src/MEDCalc/res/presentations/pqWarp24.png
new file mode 100644 (file)
index 0000000..b7227d4
Binary files /dev/null and b/src/MEDCalc/res/presentations/pqWarp24.png differ
diff --git a/src/MEDCalc/res/presentations/scalarmap16.png b/src/MEDCalc/res/presentations/scalarmap16.png
new file mode 100644 (file)
index 0000000..aa7d554
Binary files /dev/null and b/src/MEDCalc/res/presentations/scalarmap16.png differ
diff --git a/src/MEDCalc/res/presentations/scalarmap24.png b/src/MEDCalc/res/presentations/scalarmap24.png
new file mode 100644 (file)
index 0000000..7132ece
Binary files /dev/null and b/src/MEDCalc/res/presentations/scalarmap24.png differ