1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/
21 #ifndef DIALOGBOX_CLIPPING_H
22 #define DIALOGBOX_CLIPPING_H
24 #include "SALOME_InteractiveObject.hxx"
26 #include "QtxDblSpinBox.h"
33 #include <vtkSmartPointer.h>
50 class LightApp_SelectionMgr;
59 typedef vtkSmartPointer<OrientedPlane> TVTKPlane;
60 typedef std::vector<TVTKPlane> TPlanes;
61 enum Orientation {XY, YZ, ZX};
65 //=================================================================================
66 // class : VisuGUI_ClippingDlg
68 //=================================================================================
69 class VisuGUI_ClippingDlg : public QDialog
74 VisuGUI_ClippingDlg( VisuGUI* theModule,
79 float getDistance() { return (float)SpinBoxDistance->value(); }
80 void setDistance(const float theDistance) { SpinBoxDistance->setValue(theDistance); }
81 double getRotation1() { return SpinBoxRot1->value(); }
82 double getRotation2() { return SpinBoxRot2->value(); }
83 void setRotation(const double theRot1, const double theRot2);
86 ~VisuGUI_ClippingDlg();
90 LightApp_SelectionMgr* mySelectionMgr;
91 Handle(SALOME_InteractiveObject) myIO;
94 VISU::Prs3d_i * myPrs3d;
95 VISU::TPlanes myPlanes;
97 QComboBox* ComboBoxPlanes;
98 QPushButton* buttonNew;
99 QPushButton* buttonDelete;
101 QLabel* TextLabelOrientation;
102 QLabel* TextLabelDistance;
103 QLabel* TextLabelRot1;
104 QLabel* TextLabelRot2;
108 QComboBox* ComboBoxOrientation;
109 QtxDblSpinBox* SpinBoxDistance;
110 QtxDblSpinBox* SpinBoxRot1;
111 QtxDblSpinBox* SpinBoxRot2;
113 QWidget* WidgetIJKTab;
114 QHButtonGroup* ButtonGroupIJKAxis;
115 QLabel* TextLabelIJKIndex;
116 QSpinBox* SpinBoxIJKIndex;
117 QCheckBox* CheckBoxIJKPlaneReverse;
119 QCheckBox* PreviewCheckBox;
120 QCheckBox* AutoApplyCheckBox;
122 QPushButton* buttonOk;
123 QPushButton* buttonCancel;
124 QPushButton* buttonApply;
126 bool myIsSelectPlane;
129 QWidget* createParamsTab();
130 QWidget* createIJKParamsTab();
131 void setIJKByNonStructured();
132 bool isStructured() const;
136 void onSelectPlane(int theIndex);
138 void ClickOnDelete();
139 void onSelectOrientation(int theItem);
140 void SetCurrentPlaneParam();
141 void SetCurrentPlaneIJKParam();
142 void onIJKAxisChanged(int axis);
143 void onTabChanged(QWidget* newTab);
144 void onSelectionChanged();
145 void OnPreviewToggle(bool theIsToggled);
147 void ClickOnCancel();
151 #endif // DIALOGBOX_TRANSPARENCYDLG_H