1 // SMESH SMESHGUI : GUI for SMESH component
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : SMESHGUI_ClippingDlg.h
23 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
26 #ifndef SMESHGUI_CLIPPINGDLG_H
27 #define SMESHGUI_CLIPPINGDLG_H
30 #include "SMESH_SMESHGUI.hxx"
36 #include <vtkSmartPointer.h>
45 class LightApp_SelectionMgr;
50 class SMESHGUI_SpinBox;
54 typedef vtkSmartPointer<OrientedPlane> TVTKPlane;
55 typedef std::vector<TVTKPlane> TPlanes;
56 enum Orientation { XY, YZ, ZX };
60 //=================================================================================
61 // class : SMESHGUI_ClippingDlg
63 //=================================================================================
64 class SMESHGUI_EXPORT SMESHGUI_ClippingDlg : public QDialog
69 SMESHGUI_ClippingDlg( SMESHGUI* );
70 ~SMESHGUI_ClippingDlg();
72 double getDistance() const;
73 void setDistance( const double );
74 double getRotation1() const;
75 double getRotation2() const;
76 void setRotation( const double, const double );
80 void keyPressEvent( QKeyEvent* );
83 LightApp_SelectionMgr* mySelectionMgr;
84 SVTK_Selector* mySelector;
87 SMESH::TPlanes myPlanes;
89 QComboBox* ComboBoxPlanes;
90 QPushButton* buttonNew;
91 QPushButton* buttonDelete;
92 QLabel* TextLabelOrientation;
93 QComboBox* ComboBoxOrientation;
94 QLabel* TextLabelDistance;
95 SMESHGUI_SpinBox* SpinBoxDistance;
96 QLabel* TextLabelRot1;
97 SMESHGUI_SpinBox* SpinBoxRot1;
98 QLabel* TextLabelRot2;
99 SMESHGUI_SpinBox* SpinBoxRot2;
100 QCheckBox* PreviewCheckBox;
101 QCheckBox* AutoApplyCheckBox;
102 QPushButton* buttonOk;
103 QPushButton* buttonCancel;
104 QPushButton* buttonApply;
105 QPushButton* buttonHelp;
107 bool myIsSelectPlane;
108 QString myHelpFileName;
111 void onSelectPlane( int );
113 void ClickOnDelete();
114 void onSelectOrientation( int );
115 void SetCurrentPlaneParam();
116 void onSelectionChanged();
117 void OnPreviewToggle( bool );
119 void ClickOnCancel();
124 #endif // SMESHGUI_CLIPPINGDLG_H