Salome HOME
Updated copyright comment
[modules/med.git] / src / MEDCalc / gui / DatasourceController.hxx
index 0ec0a180669c4ee54be8c18e0d843f29fc27934c..ec318fdf0e9836f07c495ab1240582b72a27d871 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2024  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 #include "MEDEventListener_i.hxx"
 #include <SALOMEconfig.h>
 #include CORBA_CLIENT_HEADER(MEDDataManager)
-#include <StandardApp_Module.hxx>
+
+#include <SalomeApp_Module.h>
 #include <SALOME_AppStudyEditor.hxx>
 #include <MEDPresentation.hxx>
 
-#include <map>
-
 #include "XmedDataModel.hxx"
-#include "DlgChangeUnderlyingMesh.hxx"
-#include "DlgInterpolateField.hxx"
 #include "MEDCALCGUI.hxx"
 //
 // The DatasourceController defines data structures and classes to
@@ -55,17 +52,25 @@ typedef struct {
     EVENT_IMPORT_OBJECT, // Simply import the object in the workspace
     EVENT_USE_OBJECT,    // Import in the workspace AND define a proxy
                          // variable in the tui console to use it
+    // presentations
+    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,
     // these ones forward actions to workspace (and then to python console)
     EVENT_ADD_DATASOURCE,
     EVENT_ADD_IMAGE_AS_DATASOURCE,
     EVENT_ADD_PRESENTATION
   };
   int eventtype;
-  XmedDataObject * objectdata;
+  XmedDataObject* objectdata;
   QString objectalias;
 } DatasourceEvent;
 
+class MEDModule;
+
 //
 // ==============================================================
 // Datasource controller
@@ -75,43 +80,30 @@ class MEDCALCGUI_EXPORT DatasourceController: public QObject {
   Q_OBJECT
 
 public:
-  DatasourceController(StandardApp_Module * salomeModule);
+  DatasourceController(MEDModule* salomeModule);
   ~DatasourceController();
 
   void createActions();
 
 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 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:
-  StandardApp_Module * _salomeModule;
-  SALOME_AppStudyEditor * _studyEditor;
-  std::map<long, std::string> _fieldSeriesEntries;
-
-  DlgChangeUnderlyingMesh * _dlgChangeUnderlyingMesh;
-  DlgInterpolateField * _dlgInterpolateField;
-
+  MEDModule* _salomeModule;
+  SALOME_AppStudyEditor* _studyEditor; // borrowed to MEDModule
 };
 
 #endif