Salome HOME
SALOME::GenericObj : Destroy() -> UnRegister()
[modules/visu.git] / src / VISUGUI / VisuGUI_ClippingDlg.h
index 1be49179890c001de011d5358552d6b87a8b74f7..a40cd1c02dfd382171649781203e695d87f2fd28 100644 (file)
@@ -1,21 +1,23 @@
-// Copyright (C) 2005  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.
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-// 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
+//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-// See http://www.salome-platform.org/
+//  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.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 #ifndef DIALOGBOX_CLIPPING_H
 
 #include "SALOME_InteractiveObject.hxx"
 
-#include "QtxDblSpinBox.h"
+#include "SalomeApp_DoubleSpinBox.h"
 
 // QT Includes
-#include <qdialog.h>
-#include <qtable.h>
+#include <QDialog>
+#include <QPointer>
 
 // VTK Includes
 #include <vtkSmartPointer.h>
 
 class QLabel;
 class QPushButton;
-class QTable;
 class QCheckBox;
+class QGroupBox;
 class QComboBox;
-class QHButtonGroup;
-class QSpinBox;
+class QButtonGroup;
 class QTabWidget;
+class QListWidget;
 
 class SALOME_Actor;
 
-class QtxDblSpinBox;
-
 class SVTK_ViewWindow;
 
 class LightApp_SelectionMgr;
 
-class VisuGUI;
+class SalomeApp_IntSpinBox;
 
+class VisuGUI;
 class vtkPlaneSource;
 class vtkDataSetMapper;
-
 class OrientedPlane;
+class VISU_Actor;
+class PreviewPlane;
 
 namespace VISU {
   class Prs3d_i;
@@ -74,7 +76,7 @@ namespace VISU {
 //=================================================================================
 class OrientedPlane: public vtkPlane
 {
-  SVTK_ViewWindow* myViewWindow;
+  QPointer<SVTK_ViewWindow> myViewWindow;
   vtkDataSetMapper* myMapper;
 
 public:
@@ -120,9 +122,7 @@ class VisuGUI_ClippingDlg : public QDialog
 
 public:
     VisuGUI_ClippingDlg( VisuGUI* theModule,
-                        const char* name = 0,
-                        bool modal = false,
-                        WFlags fl = 0 );
+                         bool modal = false );
 
     float  getDistance()  { return (float)SpinBoxDistance->value(); }
     void   setDistance(const float theDistance) { SpinBoxDistance->setValue(theDistance); }
@@ -133,6 +133,17 @@ public:
 
     ~VisuGUI_ClippingDlg();
 
+private:
+    void keyPressEvent( QKeyEvent* e );
+  
+    void SetPrs3d(VISU::Prs3d_i* thePrs);
+  
+    VISU_Actor* getSelectedActor();
+
+    void applyLocalPlanes();
+
+    void removeAllClippingPlanes(VISU::Prs3d_i* thePrs);
+
 private:
 
     LightApp_SelectionMgr* mySelectionMgr;
@@ -154,14 +165,15 @@ private:
     QTabWidget*       TabPane;
 
     QComboBox*        ComboBoxOrientation;
-    QtxDblSpinBox*    SpinBoxDistance;
-    QtxDblSpinBox*    SpinBoxRot1;
-    QtxDblSpinBox*    SpinBoxRot2;
+    SalomeApp_DoubleSpinBox*  SpinBoxDistance;
+    SalomeApp_DoubleSpinBox*  SpinBoxRot1;
+    SalomeApp_DoubleSpinBox*  SpinBoxRot2;
 
     QWidget*          WidgetIJKTab;
-    QHButtonGroup*    ButtonGroupIJKAxis;
+    QButtonGroup*     ButtonGroupIJKAxis;
+    QGroupBox*        GroupBoxIJKAxis;
     QLabel*           TextLabelIJKIndex;
-    QSpinBox*         SpinBoxIJKIndex;
+    SalomeApp_IntSpinBox* SpinBoxIJKIndex;
     QCheckBox*        CheckBoxIJKPlaneReverse;
 
     QCheckBox*        PreviewCheckBox;
@@ -174,6 +186,9 @@ private:
 
     bool myIsSelectPlane;
 
+    VISU_Actor* myDSActor;
+    QList<PreviewPlane*> myPreviewList;
+
 protected:
     QWidget* createParamsTab();
     QWidget* createIJKParamsTab();
@@ -199,3 +214,5 @@ public slots:
 };
 
 #endif // DIALOGBOX_TRANSPARENCYDLG_H
+
+