Back to index

salome-geom  6.5.0
RepairGUI_GlueDlg.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 //  GEOM GEOMGUI : GUI for Geometry component
00024 //  File   : RepairGUI_GlueDlg.h
00025 //  Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
00026 
00027 #ifndef REPAIRGUI_GLUEDLG_H
00028 #define REPAIRGUI_GLUEDLG_H
00029 
00030 #include <GEOMBase_Skeleton.h>
00031 
00032 #include <TopAbs.hxx>
00033 
00034 #include <QList>
00035 
00036 class DlgRef_1SelExt;
00037 class SalomeApp_DoubleSpinBox;
00038 class QPushButton;
00039 class QCheckBox;
00040 
00041 //=================================================================================
00042 // class    : RepairGUI_GlueDlg
00043 // purpose  :
00044 //=================================================================================
00045 class RepairGUI_GlueDlg : public GEOMBase_Skeleton
00046 {
00047   Q_OBJECT
00048 
00049 public:
00050   RepairGUI_GlueDlg (GeometryGUI*, QWidget* = 0, bool = false, TopAbs_ShapeEnum theGlueMode = TopAbs_FACE);
00051   ~RepairGUI_GlueDlg();
00052 
00053 protected:
00054   // redefined from GEOMBase_Helper
00055   virtual GEOM::GEOM_IOperations_ptr createOperation();
00056   virtual bool                       isValid (QString&);
00057   virtual bool                       execute (ObjectList&);
00058   virtual void                       restoreSubShapes (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
00059 
00060 private:
00061   void                               Init();
00062   void                               enterEvent (QEvent*);
00063   void                               initSelection();
00064 
00065   void                               clearTemporary();
00066 
00067   // Reimplementation of onAccept for local case of this class.
00068   bool                               onAcceptLocal();
00069   void                               clearShapeBufferLocal (GEOM::GEOM_Object_ptr);
00070 
00071   void                               activateSelection();
00072   void                               updateButtonState();
00073   void                               selectTmpInViewer();
00074 
00075 private:
00076   GEOM::GEOM_Object_var              myObject;
00077   QList<GEOM::GeomObjPtr>            myTmpObjs;
00078 
00079   DlgRef_1SelExt*                    GroupPoints;
00080   DlgRef_1SelExt*                    GroupPoints2;
00081   SalomeApp_DoubleSpinBox*           myTolEdt;
00082   SalomeApp_DoubleSpinBox*           myTolEdt2;
00083   QPushButton*                       myDetectBtn;
00084   QCheckBox*                         mySubShapesChk;
00085   QCheckBox*                         myGlueAllEdgesChk;
00086 
00087   int                                myCurrConstrId;
00088 
00089   TopAbs_ShapeEnum                   myGlueMode;
00090 
00091 protected slots:
00092   virtual void                       ClickOnCancel();
00093 
00094 private slots:
00095   void                               ClickOnOk();
00096   bool                               ClickOnApply();
00097 
00098   void                               ActivateThisDialog();
00099 
00100   void                               LineEditReturnPressed();
00101   void                               SelectionIntoArgument();
00102   void                               SetEditCurrentArgument();
00103 
00104   void                               ConstructorsClicked (int);
00105 
00106   void                               onDetect();
00107   void                               onTolerChanged (double);
00108   void                               onSubShapesChk();
00109 };
00110 
00111 #endif // REPAIRGUI_GLUEDLG_H