Salome HOME
Fix for Bug IPAL8945
[modules/visu.git] / src / VISUGUI / VisuGUI_CutPlanesDlg.h
index 0651f73872fc2dd189f578a227153dc1275d013d..e5ccea9ff9236f6552a37ce07eb502ec0b976382 100644 (file)
@@ -1,39 +1,37 @@
 //  VISU VISUGUI : GUI of VISU component
 //
 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-// 
-//  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. 
-// 
-//  This library is distributed in the hope that it will be useful, 
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-//  Lesser General Public License for more details. 
-// 
-//  You should have received a copy of the GNU Lesser General Public 
-//  License along with this library; if not, write to the Free Software 
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-// 
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  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.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
 //
 //
 //
 //  File   : VisuGUI_CutPlanesDlg.h
-//  Author : Laurent CORNABE & Hubert ROLLAND 
+//  Author : Laurent CORNABE & Hubert ROLLAND
 //  Module : VISU
 //  $Header$
 
 #ifndef VISUGUI_CUTPLANESDLG_H
 #define VISUGUI_CUTPLANESDLG_H
 
-#include "QAD_SpinBoxDbl.h"
-#include "QAD_StudyFrame.h"
-
 #include "VisuGUI_ScalarBarDlg.h"
 #include "VISU_CutPlanes_i.hh"
+
 #include <SALOME_Actor.h>
 
 #include <qradiobutton.h>
 #include "SALOMEconfig.h"
 #include CORBA_CLIENT_HEADER(VISU_Gen)
 
+class QtxDblSpinBox;
+class SUIT_ViewWindow;
+class SUIT_ViewManager;
+class SalomeApp_Module;
+
 
 class VisuGUI_CutPlanesPane : public QFrame
 {
     Q_OBJECT
 
 public:
-    VisuGUI_CutPlanesPane(QWidget* theParent, QAD_Study * theStudy);
+    VisuGUI_CutPlanesPane (QWidget* parent);
     ~VisuGUI_CutPlanesPane();
 
     void   setNbPlanes( const int nbp ) {nbPlan->setValue( nbp );}
@@ -70,22 +73,20 @@ private:
     QLabel* LabelRot1;
     QLabel* LabelRot2;
     QSpinBox* nbPlan;
-    QAD_SpinBoxDbl* Rot1;
-    QAD_SpinBoxDbl* Rot2;
+    QtxDblSpinBox* Rot1;
+    QtxDblSpinBox* Rot2;
     QRadioButton* RBzx;
     QRadioButton* RByz;
     QRadioButton* RBxy;
-    QAD_SpinBoxDbl* myPosSpn;
+    QtxDblSpinBox* myPosSpn;
     QTable* myPosTable;
-    VISU::CutPlanes_i* myCutPlanes;  
+    VISU::CutPlanes_i* myCutPlanes;
     QCheckBox* myPreviewCheck;
     double          X1, X2;
     double          Y1, Y2;
     double          Z1, Z2;
     bool hasInit;
-    QAD_Study* myStudy;
 
-    //vector<SALOME_Actor*> myPreviewActors;
     SALOME_Actor* myPreviewActor;
 
 private slots:
@@ -99,42 +100,31 @@ private slots:
 };
 
 
-
 class VisuGUI_CutPlanesDlg : public QDialog
-{ 
+{
     Q_OBJECT
 
 public:
-    VisuGUI_CutPlanesDlg(bool theIsCreation, bool theIsModal);
-    ~VisuGUI_CutPlanesDlg();
+    VisuGUI_CutPlanesDlg (SalomeApp_Module* theModule);
+    ~VisuGUI_CutPlanesDlg() {};
 
-    void initFromPrsObject(VISU::CutPlanes_i* thePrs)
-      {myPrs=thePrs; myScalarPane->initFromPrsObject(thePrs); myCutPane->initFromPrsObject(thePrs);}
+    void initFromPrsObject (VISU::CutPlanes_i* thePrs);
+    int  storeToPrsObject  (VISU::CutPlanes_i* thePrs);
 
-    int storeToPrsObject(VISU::CutPlanes_i* thePrs)
-      {return myScalarPane->storeToPrsObject(thePrs) && myCutPane->storeToPrsObject(thePrs);}
-   
 protected slots:
-  void accept();
-  void reject();
-  void onFrameActivated( QAD_StudyFrame* theFrame);
+    void accept();
+    void reject();
+    void onWindowActivated (SUIT_ViewWindow*);
 
 private:
     VisuGUI_CutPlanesPane* myCutPane;
     VisuGUI_ScalarBarPane* myScalarPane;
-    VISU::CutPlanes_i* myPrs;
-    
-    bool myIsCreation;
-
-    QAD_Study  *myStudy;
-    QAD_StudyFrame *myStudyFrame;
+    VISU::CutPlanes_i*     myPrs;
 };
 
 
 class VisuGUI_NumEditItem: public QTableItem
 {
-  //    Q_OBJECT
-
 public:
     VisuGUI_NumEditItem(QTable* table, EditType et, const QString& text ):
       QTableItem(table, et, text) {};
@@ -143,5 +133,4 @@ public:
     QWidget* createEditor() const;
 };
 
-
 #endif // VISUGUI_CUTPLANESDLG_H