Salome HOME
Re-wrote PARAVIS CORBA engine
[modules/paravis.git] / src / PVGUI / PVGUI_Module.h
index b56fc1188c0953871605fc3287da2dd8f743accc..650872b90252f66bd206a0dd60d877f1593e0b74 100644 (file)
@@ -1,11 +1,11 @@
 // PARAVIS : ParaView wrapper SALOME module
 //
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2010-2014  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.
+// 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
 #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 <ostream>
 #include <vtkType.h>
+#include <QTimer>
 
 #include <pqVariableType.h>
 
@@ -140,6 +146,8 @@ public:
   PVGUI_Module();
   ~PVGUI_Module();
 
+  static PARAVIS_ORB::PARAVIS_Gen_var GetEngine();
+
   virtual void           initialize( CAM_Application* );
   virtual void           windows( QMap<int, int>& ) const;
 
@@ -163,7 +171,7 @@ public:
   virtual void contextMenuPopup(const QString& theClient, QMenu* theMenu, QString& theTitle);
 
 public slots:
-  void onImportFromVisu(QString theEntry);
+  //void onImportFromVisu(QString theEntry);
 
 private:
   //! Initialize ParaView if not yet done (once per session)
@@ -209,6 +217,9 @@ private:
   //! Load selected state
   void loadSelectedState(bool toClear);
 
+  //! Get list of embedded macros files
+  QStringList getEmbeddedMacrosList();
+
   //! update macros state
   void updateMacros();
 
@@ -221,6 +232,10 @@ private:
   //! run Python command (either in SALOME's Python interpreter, or in ParaView's Python's interpreter)
   void execPythonCommand(const QString& cmd, bool inSalomeConsole=false);
 
+  //! 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& );
@@ -262,6 +277,7 @@ public slots:
 
 protected slots:
   virtual void           onModelOpened();
+  virtual void           onPushTraceTimer();
 
 protected:
   void timerEvent(QTimerEvent *event);
@@ -297,6 +313,10 @@ private:
   int myStateCounter;
 
   static pqPVApplicationCore* MyCoreApp;
+
+  static PARAVIS_ORB::PARAVIS_Gen_var myEngine;
+
+  QTimer             * myPushTraceTimer;
 };
 
 #endif // PVGUI_Module_H