Salome HOME
Fix for the IPAL22822: Changes of plots in hexa8
[modules/visu.git] / src / VISUGUI / VisuGUI_ClippingPlaneDlg.h
1 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef DIALOGBOX_CLIPPINGPLANEDLG_H
21 #define DIALOGBOX_CLIPPINGPLANEDLG_H
22
23 class VisuGUI;
24 class QLineEdit;
25 class QCheckBox;
26
27 class SalomeApp_DoubleSpinBox;
28 class vtkImplicitPlaneWidget;
29 class vtkCallbackCommand;
30 class vtkObject;
31 class SVTK_ViewWindow;
32
33 #include <QDialog>
34 #include <vtkSmartPointer.h>
35 #include "VisuGUI_ClippingPanel.h"
36 #include <SALOMEDSClient_SObject.hxx>
37
38
39 class VisuGUI_ClippingPlaneDlg: public QDialog
40 {
41   Q_OBJECT
42 public:
43   VisuGUI_ClippingPlaneDlg(VisuGUI* theModule);
44   ~VisuGUI_ClippingPlaneDlg();
45
46   void setOrigin(double theVal[3]);
47   void setDirection(double theVal[3]);
48
49   void setPlaneId(int theId);
50   int planeId() const { return myPlaneId; }
51   //void setPlaneObj(_PTR(SObject) thePlaneObj);
52   //_PTR(SObject) getPlaneObj() const { return myPlaneObj; }
53
54 protected slots:
55   virtual void accept();
56
57 private slots:
58   void onHelp();
59   void onValueChanged();
60
61  private:
62   //void setEmptyPlane(PlaneDef& thePlane) const;
63   vtkImplicitPlaneWidget* createPreviewWidget();
64
65
66   static void ProcessEvents(vtkObject* theObject, unsigned long theEvent,
67                             void* theClientData, void* theCallData);
68
69   VisuGUI*   myModule;
70   SVTK_ViewWindow* myViewWindow;
71
72   QLineEdit* myNameEdt;
73
74   SalomeApp_DoubleSpinBox* myXOrigin;
75   SalomeApp_DoubleSpinBox* myYOrigin;
76   SalomeApp_DoubleSpinBox* myZOrigin;
77  
78   SalomeApp_DoubleSpinBox* myXDir;
79   SalomeApp_DoubleSpinBox* myYDir;
80   SalomeApp_DoubleSpinBox* myZDir;
81
82   QCheckBox* myAutoApply;
83
84   vtkImplicitPlaneWidget* myPreviewWidget;
85   vtkSmartPointer<vtkCallbackCommand> myCallback;
86
87   double myBounds[6];
88   //_PTR(SObject) myPlaneObj;
89   int myPlaneId;
90 };
91
92 #endif