Salome HOME
DCQ : Merge with Ecole Ete a6.
[modules/visu.git] / src / VISU_I / VISU_ViewManager_i.hh
index 9463e7542aded12f9c97d891445886c4821a6696..b399434dcf78c01cae1bebf3dccc79441c0a8ef0 100644 (file)
@@ -51,12 +51,11 @@ namespace VISU{
     virtual ~ViewManager_i() {};
     virtual VISU::VISUType GetType() { return VISU::TVIEWMANAGER;};
 
-    virtual View3D_ptr Create3DView();
-    virtual View_ptr   GetCurrentView();
+    virtual View3D_ptr    Create3DView();
+    virtual View_ptr      GetCurrentView();
     virtual TableView_ptr CreateTableView(VISU::Table_ptr theTable);
-    virtual XYPlot_ptr CreateXYPlot();
-    virtual void Destroy(View_ptr theView);
-    virtual void ProcessEvents();
+    virtual XYPlot_ptr    CreateXYPlot();
+    virtual void          Destroy(View_ptr theView);
 
   protected:
     SALOMEDS::Study_var myStudyDocument;
@@ -68,7 +67,6 @@ namespace VISU{
   {
   protected:
     QAD_Study* myStudy;
-    string myName;
   public:
     View_i(SALOMEDS::Study_ptr theStudy);
     virtual ~View_i();
@@ -90,7 +88,7 @@ namespace VISU{
     virtual void ToStream(std::ostringstream& theStr);
     virtual const char* GetComment() const;
   public:
-    virtual const char* View_i::GetEntry();
+    virtual std::string View_i::GetEntry();
   };
 
   //===========================================================================
@@ -98,6 +96,7 @@ namespace VISU{
                    public virtual View_i
   {
   public:
+    typedef VISU::XYPlot TInterface;
     XYPlot_i(SALOMEDS::Study_ptr theStudy);
     virtual ~XYPlot_i();
     virtual VISU::VISUType GetType() { return VISU::TXYPLOT;};
@@ -160,6 +159,7 @@ namespace VISU{
                       public virtual View_i
   {
   public:
+    typedef VISU::TableView TInterface;
     TableView_i(SALOMEDS::Study_ptr theStudy);
     virtual ~TableView_i();
     virtual VISU::VISUType GetType() { return VISU::TTABLEVIEW;};
@@ -171,7 +171,7 @@ namespace VISU{
   protected:
     SALOMEGUI_TableDlg* myView;
   public:
-    virtual Storable* Create(VISU::Table_var theTable);
+    virtual Storable* Create(VISU::Table_ptr theTable);
   };
 
   //===========================================================================
@@ -179,6 +179,7 @@ namespace VISU{
                    public virtual View_i
   {
   public:
+    typedef VISU::View3D TInterface;
     View3D_i(SALOMEDS::Study_ptr theStudy);
     virtual ~View3D_i();
     virtual VISU::VISUType GetType() { return VISU::TVIEW3D;};
@@ -237,29 +238,29 @@ namespace VISU{
     virtual void ScaleView(VISU::View3D::Axis theAxis, CORBA::Double theParam);
     virtual void RemoveScale();
 
-    virtual QString GenerateViewParamsName();
+    static std::string ToString(QAD_StudyFrame* theStudyFrame);
+    static void ToStream(QAD_StudyFrame* theStudyFrame, std::ostringstream& theStr);
+    static bool SaveViewParams(QAD_StudyFrame* theStudyFrame, const char* theName);
     virtual CORBA::Boolean SaveViewParams(const char* theName);
+    static QString GenerateViewParamsName();
+
+    static void Restore(QAD_StudyFrame* theStudyFrame, const Storable::TRestoringMap& theMap);
+    static bool RestoreViewParams(QAD_StudyFrame* theStudyFrame, const char* theName);
     virtual CORBA::Boolean RestoreViewParams(const char* theName);
 
     virtual void Close();
+
   protected:
     QAD_StudyFrame* myStudyFrame;
-    //SALOMEDS::Color myColor;
-    //CORBA::Double myPosition[3], myFocalPnt[3], myViewUp[3], myParallelScale, myScaleFactor[3];
-
-    //Storable* Build(int theRestoring);
     static int myNbViewParams;
 
   public:
     virtual Storable* Create(int theNew);
-    virtual Storable* Restore(const Storable::TRestoringMap& theMap) throw(std::logic_error&);
     virtual void ToStream(std::ostringstream& theStr);
     virtual const char* GetComment() const;
     static const string myComment;
     QAD_StudyFrame* GetStudyFrame() const { return myStudyFrame;}
   };
-  //Storable* View3DRestore(SALOMEDS::SComponent_var& theSComponent, SALOMEDS::Study_var& theStudy,
-  //                     const char* thePrefix, const Storable::TRestoringMap& theMap);
 
   VTKViewer_ViewFrame* GetViewFrame(QAD_StudyFrame* theStudyFrame);
   vtkRenderer* GetRenderer(QAD_StudyFrame* theStudyFrame);