]> SALOME platform Git repositories - modules/geom.git/blob - src/RepairGUI/RepairGUI_ShapeProcessDlg.h
Salome HOME
*** empty log message ***
[modules/geom.git] / src / RepairGUI / RepairGUI_ShapeProcessDlg.h
1 // GEOM GEOMGUI : GUI for Geometry component
2 //
3 // Copyright (C) 2003  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. 
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 // File   : RepairGUI_ShapeProcessDlg.h
23 // Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
24 //
25
26 #ifndef REPAIRGUI_SHAPEPROCESSDLG_H
27 #define REPAIRGUI_SHAPEPROCESSDLG_H
28
29 #include <GEOMBase_Skeleton.h>
30
31 #include <QMap>
32
33 class DlgRef_1Sel;
34 class QSpinBox;
35 class QDoubleSpinBox;
36 class QComboBox;
37 class QCheckBox;
38 class QListWidget;
39
40 //=================================================================================
41 // class    : RepairGUI_ShapeProcessDlg
42 // purpose  :
43 //=================================================================================
44 class RepairGUI_ShapeProcessDlg : public GEOMBase_Skeleton
45
46   Q_OBJECT
47
48 public:
49   RepairGUI_ShapeProcessDlg( GeometryGUI*, QWidget* = 0, bool = false );
50   ~RepairGUI_ShapeProcessDlg();
51   
52 protected:
53   // redefined from GEOMBase_Helper
54   virtual GEOM::GEOM_IOperations_ptr createOperation();
55   virtual bool                       isValid( QString& );
56   virtual bool                       execute( ObjectList&  );
57   
58   virtual void                       closeEvent( QCloseEvent* );        
59
60 private:
61   void                               init();
62   void                               reset();
63   void                               loadDefaults(); // initialize all controls with default values (from resource file)
64     
65   GEOM::string_array*                getActiveOperators();
66   GEOM::string_array*                getParameters( const GEOM::string_array& );
67   GEOM::string_array*                getValues( const GEOM::string_array& );
68
69   void                               enterEvent( QEvent* );
70
71   QWidget*                           getControl( const QString&  );
72   void                               setValue( QWidget*, const QString& ); // initialize the given control in the proper way
73   // (analize its class and convert the value string)
74   QString                            getValue( QWidget* ) const; // retrieve value of the control in the proper way
75
76   //QDict<QString,QWidget*>            myCtrlMap;  // map of controls (values) of parameters
77   void                               initParamsValues(); // initialize the data structures
78   void                               initSelection();
79
80 private:
81   QStringList                        myOpLst; // list of available Shape Healing Operators
82   QMap<QString,QStringList>          myValMap; // map of parameters of operators
83
84   GEOM::ListOfGO_var                 myObjects;  // selected objects
85   
86   DlgRef_1Sel*                       mySelectWdgt;
87   QListWidget*                       myOpList;
88   
89   QDoubleSpinBox*                    myFixShapeTol3D;
90   QDoubleSpinBox*                    myFixShapeMaxTol3D;
91
92   QDoubleSpinBox*                    myFixFaceSizeTol;
93   
94   QDoubleSpinBox*                    myDropSmallEdgesTol3D;
95
96   QDoubleSpinBox*                    mySplitAngleAngle;
97   QDoubleSpinBox*                    mySplitAngleMaxTol;
98   
99   QSpinBox*                          mySplitClosedFacesNum;
100   
101   QDoubleSpinBox*                    mySplitContTol3D;
102   QComboBox*                         mySplitContSurfCont;
103   QComboBox*                         mySplitContCurvCont;
104   
105   QCheckBox*                         myBSplineSurfModeChk;
106   QCheckBox*                         myBSpline3DCurveChk;
107   QCheckBox*                         myBSpline2DCurveChk;
108   QDoubleSpinBox*                    myBSplineTol3D;
109   QDoubleSpinBox*                    myBSplineTol2D;
110   QSpinBox*                          myBSplineDegree;
111   QSpinBox*                          myBSplineSegments;
112   QComboBox*                         myBSpline2DCont;
113   QComboBox*                         myBSpline3DCont;
114   
115   QCheckBox*                         myToBezierSurfModeChk;
116   QCheckBox*                         myToBezier3DCurveChk;
117   QCheckBox*                         myToBezier2DCurveChk;
118   QDoubleSpinBox*                    myToBezierMaxTol;
119   
120   QDoubleSpinBox*                    mySameParameterTol3D;
121   
122 private slots:
123   void                               onOk();
124   bool                               onApply();
125
126   void                               activate();
127   
128   void                               lineEditReturnPressed();
129   void                               selectionChanged();
130   void                               selectClicked();
131   void                               advOptionToggled( bool );
132 };             
133
134 #endif // REPAIRGUI_SHAPEPROCESSDLG_H