Salome HOME
[MEDCalc] Support for ELNO field + minor GUI bug fix.
[modules/med.git] / src / MEDCalc / gui / MEDModule.hxx
index cec0dbf4afe131518b94192a04aa2e18f0799ffa..c53e6458a93e641367a016acdb9986db4143e8aa 100644 (file)
 #include "DatasourceController.hxx"
 #include "PresentationController.hxx"
 #include "ProcessingController.hxx"
+#include "TestController.hxx"
 
 #include <SALOMEconfig.h>
 #include CORBA_CLIENT_HEADER(MED_Gen)
 #include CORBA_SERVER_HEADER(MEDPresentationManager)
 
+#include <QModelIndex>
+
 class SalomeApp_Application;
+class PVViewer_GUIElements;
+class MEDPresentationManager_i;
 
 /*!
  * This class defines the gui of the MED module.
@@ -75,18 +80,30 @@ public:
                             const QString& menus="",
                             const QString& rule="client='ObjectBrowser'");
 
-  MEDCALC::MEDPresentationViewMode getSelectedViewMode();
-  MEDCALC::MEDPresentationColorMap getSelectedColorMap();
+//  MEDCALC::ViewModeType getSelectedViewMode() const;
+//  MEDCALC::ColorMapType getSelectedColorMap() const;
+//  MEDCALC::ScalarBarRangeType getSelectedScalarBarRange() const;
 
   inline SALOME_AppStudyEditor* getStudyEditor() { return _studyEditor; }
+  void requestSALOMETermination() const;
+
+signals:
+  void presentationSelected(int presId, const QString& presType, const QString& presName);
 
 public slots:
   virtual bool activateModule(SUIT_Study* theStudy);
   virtual bool deactivateModule(SUIT_Study* theStudy);
+  virtual void onDblClick(const QModelIndex& index);
+  virtual void onClick(const QModelIndex& index);
 
 private:
   void createModuleWidgets();
   void createModuleActions();
+  void initToolbars();
+
+  bool itemClickGeneric(const QModelIndex & index, std::string & name,
+                        std::string & type, int & fieldId, int & presId) const;
+
   static void init();
 
 private:
@@ -96,7 +113,17 @@ private:
   XmedDataModel* _xmedDataModel;
   PresentationController* _presentationController;
   ProcessingController* _processingController;
-  static MED_ORB::MED_Gen_var myEngine;
+
+  PVViewer_GUIElements*   _pvGuiElements;
+
+  static MED_ORB::MED_Gen_var _MED_engine;
+
+  // GUI needs to talk directly to the pres manager to activate a view, get some params, etc ...:
+  static MEDCALC::MEDPresentationManager_ptr _presManager;
+
+#ifdef MED_HAS_QTTESTING
+  TestController * _testController;
+#endif
 };
 
 #endif