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