Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
RepairGUI_ShapeProcessDlg.h
Go to the documentation of this file.
1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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.
10 //
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.
15 //
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
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 
23 // GEOM GEOMGUI : GUI for Geometry component
24 // File : RepairGUI_ShapeProcessDlg.h
25 // Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
26 //
27 #ifndef REPAIRGUI_SHAPEPROCESSDLG_H
28 #define REPAIRGUI_SHAPEPROCESSDLG_H
29 
30 #include <GEOMBase_Skeleton.h>
31 
32 #include <QMap>
33 
34 class DlgRef_1Sel;
35 class SalomeApp_IntSpinBox;
36 class SalomeApp_DoubleSpinBox;
37 class QCheckBox;
38 class QComboBox;
39 class QListWidget;
40 class QListWidgetItem;
41 class QStackedLayout;
42 
43 //=================================================================================
44 // class : RepairGUI_ShapeProcessDlg
45 // purpose :
46 //=================================================================================
48 {
49  Q_OBJECT
50 
51 public:
52  RepairGUI_ShapeProcessDlg( GeometryGUI*, QWidget* = 0, bool = false );
54 
55 protected:
56  // redefined from GEOMBase_Helper
57  virtual GEOM::GEOM_IOperations_ptr createOperation();
58  virtual bool isValid( QString& );
59  virtual bool execute( ObjectList& );
60  virtual QList<GEOM::GeomObjPtr> getSourceObjects();
61 
62 private:
63  void init();
64  void reset();
65  void loadDefaults(); // initialize all controls with default values (from resource file)
66 
70 
71  QStringList getTexts( const GEOM::string_array& );
72 
73  void enterEvent( QEvent* );
74 
75  QWidget* getControl( const QString& );
76  void setValue( QWidget*, const QString& ); // initialize the given control in the proper way
77  // (analize its class and convert the value string)
78  QString getValue( QWidget* ) const; // retrieve value of the control in the proper way
79  QString getText( QWidget* ) const; // retrieve text of the control (for spin-boxes only)
80 
81  //QDict<QString,QWidget*> myCtrlMap; // map of controls (values) of parameters
82  void initParamsValues(); // initialize the data structures
83  void initSelection();
84  void updateSelectAll();
85 
86 private:
87  QStringList myOpLst; // list of available Shape Healing Operators
88  QMap<QString,QStringList> myValMap; // map of parameters of operators
89 
90  GEOM::ListOfGO_var myObjects; // selected objects
91 
93  QCheckBox* mySelectAll;
95  QStackedLayout* myStack;
96 
97  SalomeApp_DoubleSpinBox* myFixShapeTol3D;
98  SalomeApp_DoubleSpinBox* myFixShapeMaxTol3D;
99 
100  SalomeApp_DoubleSpinBox* myFixFaceSizeTol;
101 
102  SalomeApp_DoubleSpinBox* myDropSmallEdgesTol3D;
103 
104  SalomeApp_DoubleSpinBox* mySplitAngleAngle;
105  SalomeApp_DoubleSpinBox* mySplitAngleMaxTol;
106 
107  SalomeApp_IntSpinBox* mySplitClosedFacesNum;
108 
109  SalomeApp_DoubleSpinBox* mySplitContTol3D;
112 
116  SalomeApp_DoubleSpinBox* myBSplineTol3D;
117  SalomeApp_DoubleSpinBox* myBSplineTol2D;
118  SalomeApp_IntSpinBox* myBSplineDegree;
119  SalomeApp_IntSpinBox* myBSplineSegments;
120  QComboBox* myBSpline2DCont;
121  QComboBox* myBSpline3DCont;
122 
126  SalomeApp_DoubleSpinBox* myToBezierMaxTol;
127 
128  SalomeApp_DoubleSpinBox* mySameParameterTol3D;
129 
132  SalomeApp_DoubleSpinBox* myDropSmallSolidsWidTol;
133  SalomeApp_DoubleSpinBox* myDropSmallSolidsVolTol;
135 
136 private slots:
137  void onOk();
138  bool onApply();
139 
140  void activate();
141 
142  void lineEditReturnPressed();
143  void selectionChanged();
144  void selectClicked();
145  void advOptionToggled( bool );
146  void operatorChecked( QListWidgetItem * item );
147  void onSelectAll( int );
148 };
149 
150 #endif // REPAIRGUI_SHAPEPROCESSDLG_H