Salome HOME
Preparing migration to 4.3
[modules/paravis.git] / src / PVGUI / PVGUI_Module.h
index 62d584277535d6916421594d9158680524c4c007..7fc18892bfdc30b5f88f1f3776fb335d97d6b189 100644 (file)
@@ -1,6 +1,6 @@
 // PARAVIS : ParaView wrapper SALOME module
 //
-// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+// Copyright (C) 2010-2015  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
 #define PVGUI_Module_H
 
 #include <SalomeApp_Module.h>
-#include "SALOMEconfig.h"
-#include CORBA_SERVER_HEADER(SALOMEDS)
-#ifndef PARAVIS_WITH_FULL_CORBA
-#    include CORBA_SERVER_HEADER(PARAVIS_Gen)
-#endif
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(PVSERVER_Gen)
 
 #include <ostream>
 #include <vtkType.h>
@@ -45,13 +42,14 @@ class QToolBar;
 class vtkPVMain;
 class pqOptions;
 class pqServer;
-class pqTabbedMultiViewWidget;
 class pqMainWindowCore;
 class vtkEventQtSlotConnect;
 class pqPythonScriptEditor;
 class pqPVApplicationCore;
 class pqDataRepresentation;
 class pqRepresentation;
+class PVViewer_GUIElements;
+class PVViewer_EngineWrapper;
 
 class PVGUI_Module : public SalomeApp_Module
 {
@@ -144,14 +142,10 @@ public:
   PVGUI_Module();
   ~PVGUI_Module();
 
-  static PARAVIS_ORB::PARAVIS_Gen_var GetEngine();
-
   virtual void           initialize( CAM_Application* );
   virtual void           windows( QMap<int, int>& ) const;
 
-  pqTabbedMultiViewWidget*         getMultiViewManager() const;
-
-  virtual QString engineIOR() const;
+  virtual QString engineIOR() const;  // to be removed when becoming Light
 
   void openFile(const char* theName);
   void executeScript(const char *script);
@@ -170,14 +164,18 @@ public:
 
   virtual void contextMenuPopup(const QString& theClient, QMenu* theMenu, QString& theTitle);
 
+  inline static PVViewer_EngineWrapper * GetEngine();
+  inline static PVSERVER_ORB::PVSERVER_Gen_var GetCPPEngine();  // to be removed once light!
+  inline static pqPVApplicationCore * GetPVApplication();
+
+  virtual CAM_DataModel* createDataModel();
+  void  fixAnimationScene();
+
 public slots:
   //void onImportFromVisu(QString theEntry);
 
 private:
   void deleteTemporaryFiles();
-
-  //! Initialize ParaView if not yet done (once per session)
-  static bool            pvInit();  
  
   //! Create actions for ParaView GUI operations
   void                   pvCreateActions();
@@ -227,10 +225,6 @@ private:
   //! restore visibility of the common dockable windows (OB, PyConsole, ... etc.)
   void restoreCommonWindowsState();
 
-  //! Connect to the external PVServer, using the PARAVIS engine to launch it if it is not
-  //! already up.
-  bool connectToExternalPVServer();
-
 private slots:
 
   void showHelpForProxy( const QString&, const QString& );
@@ -244,18 +238,14 @@ private slots:
   //void showParaViewHelp();
   //void showHelp(const QString& url);
 
-  void onFinishedAddingServer(pqServer*);
-  void onDataRepresentationCreated(pqDataRepresentation*);
   void onDataRepresentationUpdated();
-  void onVariableChanged(pqVariableType, const QString);
-  void onRepresentationChanged(pqRepresentation*);
 
   void onStartProgress();
   void onEndProgress();
   void onShowTrace();
   void onRestartTrace();
 
-  void onNewParaViewWindow();
+//  void onNewParaViewWindow();
 
   void onSaveMultiState();
   void onAddState();
@@ -298,10 +288,6 @@ private:
 
   vtkEventQtSlotConnect *VTKConnect;
 
-  static pqPVApplicationCore* MyCoreApp;
-  static PARAVIS_ORB::PARAVIS_Gen_var myEngine;
-
-
   pqPythonScriptEditor* myTraceWindow;
 
   int myStateCounter;
@@ -311,6 +297,11 @@ private:
 
   //! Timer used to regularly push the Python trace to the engine.
   QTimer             * myPushTraceTimer;
+
+  PVViewer_GUIElements * myGuiElements;
+
+  static PVSERVER_ORB::PVSERVER_Gen_var MyEngine;
+
 };
 
 #endif // PVGUI_Module_H