1 // GEOM GEOMGUI : GUI for Geometry 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : RepairGUI_ShapeProcessDlg.h
25 // Author : Lucien PIGNOLONI
29 #ifndef DIALOGBOX_ShapeProcess_H
30 #define DIALOGBOX_ShapeProcess_H
32 #include "GEOMBase_Skeleton.h"
33 #include "DlgRef_1Sel_QTD.h"
34 #include "RepairGUI.h"
35 #include "QAD_SpinBoxDbl.h"
38 #include <qcombobox.h>
39 #include <qcheckbox.h>
40 #include <qlistview.h>
41 #include <qwidgetstack.h>
42 #include <qvaluelist.h>
46 //=================================================================================
47 // class : RepairGUI_ShapeProcessDlg
49 //=================================================================================
50 class RepairGUI_ShapeProcessDlg : public GEOMBase_Skeleton
55 RepairGUI_ShapeProcessDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
56 ~RepairGUI_ShapeProcessDlg();
59 // redefined from GEOMBase_Helper
60 virtual GEOM::GEOM_IOperations_ptr createOperation();
61 virtual bool isValid( QString& );
62 virtual bool execute( ObjectList& objects );
64 virtual void closeEvent( QCloseEvent* e );
69 void loadDefaults(); // initialize all controls with default values (from resource file)
70 GEOM::string_array* getActiveOperators();
71 GEOM::string_array* getParameters( const GEOM::string_array& theOperators );
72 GEOM::string_array* getValues( const GEOM::string_array& theParameters );
74 void enterEvent(QEvent* e);
76 QWidget* getControl( const char* );
77 void setValue( QWidget*, const char* ); // initialize the given control in the proper way
78 // (analize its class and convert the value string)
79 const char* getValue( QWidget* theControl ) const; // retrieve value of the control in the proper way
81 QStringList myOpLst; // list of available Shape Healing Operators
82 QMap<QString,QStringList> myValMap; // map of parameters of operators
83 //QDict<QString,QWidget*> myCtrlMap; // map of controls (values) of parameters
84 void initParamsValues(); // initialize the data structures
87 GEOM::ListOfGO_var myObjects; // selected objects
89 DlgRef_1Sel_QTD* mySelectWdgt;
91 QWidgetStack* myStack;
93 QAD_SpinBoxDbl* myFixShapeTol3D;
94 QAD_SpinBoxDbl* myFixShapeMaxTol3D;
96 QAD_SpinBoxDbl* myFixFaceSizeTol;
98 QAD_SpinBoxDbl* myDropSmallEdgesTol3D;
100 QAD_SpinBoxDbl* mySplitAngleAngle;
101 QAD_SpinBoxDbl* mySplitAngleMaxTol;
103 QSpinBox* mySplitClosedFacesNum;
105 QAD_SpinBoxDbl* mySplitContTol3D;
106 QComboBox* mySplitContSurfCont;
107 QComboBox* mySplitContCurvCont;
109 QCheckBox* myBSplineSurfModeChk;
110 QCheckBox* myBSpline3DCurveChk;
111 QCheckBox* myBSpline2DCurveChk;
112 QAD_SpinBoxDbl* myBSplineTol3D;
113 QAD_SpinBoxDbl* myBSplineTol2D;
114 QSpinBox* myBSplineDegree;
115 QSpinBox* myBSplineSegments;
116 QComboBox* myBSpline2DCont;
117 QComboBox* myBSpline3DCont;
119 QCheckBox* myToBezierSurfModeChk;
120 QCheckBox* myToBezier3DCurveChk;
121 QCheckBox* myToBezier2DCurveChk;
122 QAD_SpinBoxDbl* myToBezierMaxTol;
124 QAD_SpinBoxDbl* mySameParameterTol3D;
134 void lineEditReturnPressed();
135 void selectionChanged();
136 void selectClicked();
137 void activateSelection();
138 void operationChanged();
141 #endif // DIALOGBOX_ShapeProcess_H