]> SALOME platform Git repositories - modules/geom.git/blob - src/RepairGUI/RepairGUI_GlueDlg.h
Salome HOME
Additional change to fix the preview problem
[modules/geom.git] / src / RepairGUI / RepairGUI_GlueDlg.h
1 //  Copyright (C) 2007-2010  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.
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_GlueDlg.h
25 // Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
26 //
27 #ifndef REPAIRGUI_GLUEDLG_H
28 #define REPAIRGUI_GLUEDLG_H
29
30 #include <GEOMBase_Skeleton.h>
31
32 #include <QList>
33
34 class DlgRef_1SelExt;
35 class SalomeApp_DoubleSpinBox;
36 class QPushButton;
37 class QCheckBox;
38
39 //=================================================================================
40 // class    : RepairGUI_GlueDlg
41 // purpose  :
42 //=================================================================================
43 class RepairGUI_GlueDlg : public GEOMBase_Skeleton
44 {
45   Q_OBJECT
46
47 public:
48   RepairGUI_GlueDlg( GeometryGUI*, QWidget* = 0, bool = false );
49   ~RepairGUI_GlueDlg();
50
51 protected:
52   // redefined from GEOMBase_Helper
53   virtual GEOM::GEOM_IOperations_ptr createOperation();
54   virtual bool                       isValid( QString& );
55   virtual bool                       execute( ObjectList& );
56   virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
57
58 private:
59   void                               Init();
60   void                               enterEvent( QEvent* );
61   void                               initSelection();
62   
63   void                               clearTemporary();
64   
65   bool                               onAcceptLocal();
66   void                               clearShapeBufferLocal( GEOM::GEOM_Object_ptr );
67   // Reimplementation of onAccept for local case of this class.
68   
69   void                               activateSelection();
70   void                               updateButtonState();
71   void                               selectTmpInViewer();
72     
73 private:    
74   GEOM::GEOM_Object_var              myObject;
75   QList<GEOM::GeomObjPtr>            myTmpObjs;
76     
77   DlgRef_1SelExt*                    GroupPoints;
78   DlgRef_1SelExt*                    GroupPoints2;
79   SalomeApp_DoubleSpinBox*           myTolEdt;
80   SalomeApp_DoubleSpinBox*           myTolEdt2;
81   QPushButton*                       myDetectBtn;
82   QCheckBox*                         mySubShapesChk;
83   
84   int                                myCurrConstrId;
85     
86 protected slots:
87   virtual void                       ClickOnCancel();
88     
89 private slots:
90   void                               ClickOnOk();
91   bool                               ClickOnApply();
92
93   void                               ActivateThisDialog();
94
95   void                               LineEditReturnPressed();
96   void                               SelectionIntoArgument();
97   void                               SetEditCurrentArgument();
98
99   void                               ConstructorsClicked( int );
100   //void                               ValueChangedInSpinBox();
101   
102   void                               onDetect();
103   void                               onTolerChanged( double );
104   void                               onSubShapesChk();
105 };
106
107 #endif // REPAIRGUI_GLUEDLG_H