2 #ifndef DIALOGBOX_CLIPPING_H
3 #define DIALOGBOX_CLIPPING_H
5 #include "SALOME_InteractiveObject.hxx"
7 #include "QtxDblSpinBox.h"
14 #include <vtkSmartPointer.h>
31 class SalomeApp_SelectionMgr;
40 typedef vtkSmartPointer<OrientedPlane> TVTKPlane;
41 typedef std::vector<TVTKPlane> TPlanes;
42 enum Orientation {XY, YZ, ZX};
46 //=================================================================================
47 // class : VisuGUI_ClippingDlg
49 //=================================================================================
50 class VisuGUI_ClippingDlg : public QDialog
55 VisuGUI_ClippingDlg( VisuGUI* theModule,
60 float getDistance() { return (float)SpinBoxDistance->value(); }
61 void setDistance(const float theDistance) { SpinBoxDistance->setValue(theDistance); }
62 double getRotation1() { return SpinBoxRot1->value(); }
63 double getRotation2() { return SpinBoxRot2->value(); }
64 void setRotation(const double theRot1, const double theRot2);
67 ~VisuGUI_ClippingDlg();
71 SalomeApp_SelectionMgr* mySelectionMgr;
72 Handle(SALOME_InteractiveObject) myIO;
75 VISU::Prs3d_i * myPrs3d;
76 VISU::TPlanes myPlanes;
78 QComboBox* ComboBoxPlanes;
79 QPushButton* buttonNew;
80 QPushButton* buttonDelete;
82 QLabel* TextLabelOrientation;
83 QLabel* TextLabelDistance;
84 QLabel* TextLabelRot1;
85 QLabel* TextLabelRot2;
89 QComboBox* ComboBoxOrientation;
90 QtxDblSpinBox* SpinBoxDistance;
91 QtxDblSpinBox* SpinBoxRot1;
92 QtxDblSpinBox* SpinBoxRot2;
94 QWidget* WidgetIJKTab;
95 QHButtonGroup* ButtonGroupIJKAxis;
96 QLabel* TextLabelIJKIndex;
97 QSpinBox* SpinBoxIJKIndex;
98 QCheckBox* CheckBoxIJKPlaneReverse;
100 QCheckBox* PreviewCheckBox;
101 QCheckBox* AutoApplyCheckBox;
103 QPushButton* buttonOk;
104 QPushButton* buttonCancel;
105 QPushButton* buttonApply;
107 bool myIsSelectPlane;
110 QWidget* createParamsTab();
111 QWidget* createIJKParamsTab();
112 void setIJKByNonStructured();
113 bool isStructured() const;
117 void onSelectPlane(int theIndex);
119 void ClickOnDelete();
120 void onSelectOrientation(int theItem);
121 void SetCurrentPlaneParam();
122 void SetCurrentPlaneIJKParam();
123 void onIJKAxisChanged(int axis);
124 void onTabChanged(QWidget* newTab);
125 void onSelectionChanged();
126 void OnPreviewToggle(bool theIsToggled);
128 void ClickOnCancel();
132 #endif // DIALOGBOX_TRANSPARENCYDLG_H