1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 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 // SMESH SMESHGUI : GUI for SMESH component
23 // File : SMESHGUI_TransparencyDlg.h
24 // Author : Nicolas REJNERI
28 #ifndef DIALOGBOX_CLIPPING_H
29 #define DIALOGBOX_CLIPPING_H
31 #include "SMESH_SMESHGUI.hxx"
33 #include <SMESHGUI_SpinBox.h>
35 #include <vtkSmartPointer.h>
50 class LightApp_SelectionMgr;
61 typedef vtkSmartPointer<OrientedPlane> TVTKPlane;
62 typedef std::vector<TVTKPlane> TPlanes;
63 enum Orientation {XY, YZ, ZX};
68 //=================================================================================
69 // class : SMESHGUI_ClippingDlg
71 //=================================================================================
72 class SMESHGUI_EXPORT SMESHGUI_ClippingDlg : public QDialog
77 SMESHGUI_ClippingDlg (SMESHGUI* theModule,
82 float getDistance() { return (float)SpinBoxDistance->GetValue(); }
83 void setDistance (const float theDistance) { SpinBoxDistance->SetValue(theDistance); }
84 double getRotation1() { return SpinBoxRot1->GetValue(); }
85 double getRotation2() { return SpinBoxRot2->GetValue(); }
86 void setRotation (const double theRot1, const double theRot2);
89 void keyPressEvent(QKeyEvent*);
91 ~SMESHGUI_ClippingDlg();
95 LightApp_SelectionMgr* mySelectionMgr;
96 SVTK_Selector* mySelector;
99 SMESH::TPlanes myPlanes;
101 QComboBox* ComboBoxPlanes;
102 QPushButton* buttonNew;
103 QPushButton* buttonDelete;
104 QLabel* TextLabelOrientation;
105 QComboBox* ComboBoxOrientation;
106 QLabel* TextLabelDistance;
107 SMESHGUI_SpinBox* SpinBoxDistance;
108 QLabel* TextLabelRot1;
109 SMESHGUI_SpinBox* SpinBoxRot1;
110 QLabel* TextLabelRot2;
111 SMESHGUI_SpinBox* SpinBoxRot2;
112 QCheckBox* PreviewCheckBox;
113 QCheckBox* AutoApplyCheckBox;
114 QPushButton* buttonOk;
115 QPushButton* buttonCancel;
116 QPushButton* buttonApply;
117 QPushButton* buttonHelp;
119 bool myIsSelectPlane;
120 QString myHelpFileName;
124 void onSelectPlane (int theIndex);
126 void ClickOnDelete();
127 void onSelectOrientation (int theItem);
128 void SetCurrentPlaneParam();
129 void onSelectionChanged();
130 void OnPreviewToggle (bool theIsToggled);
132 void ClickOnCancel();
137 #endif // DIALOGBOX_TRANSPARENCYDLG_H