1 // Copyright (C) 2007-2015 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, or (at your option) any later version.
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
23 // GEOM GEOMGUI : GUI for Geometry component
24 // File : RepairGUI_ShapeProcessDlg.h
25 // Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
27 #ifndef REPAIRGUI_SHAPEPROCESSDLG_H
28 #define REPAIRGUI_SHAPEPROCESSDLG_H
30 #include <GEOMBase_Skeleton.h>
35 class SalomeApp_IntSpinBox;
36 class SalomeApp_DoubleSpinBox;
40 class QListWidgetItem;
43 //=================================================================================
44 // class : RepairGUI_ShapeProcessDlg
46 //=================================================================================
47 class RepairGUI_ShapeProcessDlg : public GEOMBase_Skeleton
52 RepairGUI_ShapeProcessDlg( GeometryGUI*, QWidget* = 0, bool = false );
53 ~RepairGUI_ShapeProcessDlg();
56 // redefined from GEOMBase_Helper
57 virtual GEOM::GEOM_IOperations_ptr createOperation();
58 virtual bool isValid( QString& );
59 virtual bool execute( ObjectList& );
64 void loadDefaults(); // initialize all controls with default values (from resource file)
66 GEOM::string_array* getActiveOperators();
67 GEOM::string_array* getParameters( const GEOM::string_array& );
68 GEOM::string_array* getValues( const GEOM::string_array& );
70 QStringList getTexts( const GEOM::string_array& );
72 void enterEvent( QEvent* );
74 QWidget* getControl( const QString& );
75 void setValue( QWidget*, const QString& ); // initialize the given control in the proper way
76 // (analize its class and convert the value string)
77 QString getValue( QWidget* ) const; // retrieve value of the control in the proper way
78 QString getText( QWidget* ) const; // retrieve text of the control (for spin-boxes only)
80 //QDict<QString,QWidget*> myCtrlMap; // map of controls (values) of parameters
81 void initParamsValues(); // initialize the data structures
83 void updateSelectAll();
86 QStringList myOpLst; // list of available Shape Healing Operators
87 QMap<QString,QStringList> myValMap; // map of parameters of operators
89 GEOM::ListOfGO_var myObjects; // selected objects
91 DlgRef_1Sel* mySelectWdgt;
92 QCheckBox* mySelectAll;
93 QListWidget* myOpList;
94 QStackedLayout* myStack;
96 SalomeApp_DoubleSpinBox* myFixShapeTol3D;
97 SalomeApp_DoubleSpinBox* myFixShapeMaxTol3D;
99 SalomeApp_DoubleSpinBox* myFixFaceSizeTol;
101 SalomeApp_DoubleSpinBox* myDropSmallEdgesTol3D;
103 SalomeApp_DoubleSpinBox* mySplitAngleAngle;
104 SalomeApp_DoubleSpinBox* mySplitAngleMaxTol;
106 SalomeApp_IntSpinBox* mySplitClosedFacesNum;
108 SalomeApp_DoubleSpinBox* mySplitContTol3D;
109 QComboBox* mySplitContSurfCont;
110 QComboBox* mySplitContCurvCont;
112 QCheckBox* myBSplineSurfModeChk;
113 QCheckBox* myBSpline3DCurveChk;
114 QCheckBox* myBSpline2DCurveChk;
115 SalomeApp_DoubleSpinBox* myBSplineTol3D;
116 SalomeApp_DoubleSpinBox* myBSplineTol2D;
117 SalomeApp_IntSpinBox* myBSplineDegree;
118 SalomeApp_IntSpinBox* myBSplineSegments;
119 QComboBox* myBSpline2DCont;
120 QComboBox* myBSpline3DCont;
122 QCheckBox* myToBezierSurfModeChk;
123 QCheckBox* myToBezier3DCurveChk;
124 QCheckBox* myToBezier2DCurveChk;
125 SalomeApp_DoubleSpinBox* myToBezierMaxTol;
127 SalomeApp_DoubleSpinBox* mySameParameterTol3D;
129 QCheckBox* myDropSmallSolidsWidChk;
130 QCheckBox* myDropSmallSolidsVolChk;
131 SalomeApp_DoubleSpinBox* myDropSmallSolidsWidTol;
132 SalomeApp_DoubleSpinBox* myDropSmallSolidsVolTol;
133 QCheckBox* myDropSmallSolidsMergeChk;
141 void lineEditReturnPressed();
142 void selectionChanged();
143 void selectClicked();
144 void advOptionToggled( bool );
145 void operatorChecked( QListWidgetItem * item );
146 void onSelectAll( int );
149 #endif // REPAIRGUI_SHAPEPROCESSDLG_H