1 // GEOM GEOMGUI : GUI for Geometry component
3 // Copyright (C) 2003 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.
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
22 // File : RepairGUI_GlueDlg.cxx
23 // Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
26 #include "RepairGUI_GlueDlg.h"
29 #include <GeometryGUI.h>
32 #include <SalomeApp_Application.h>
33 #include <LightApp_SelectionMgr.h>
34 #include <SalomeApp_Study.h>
35 #include <SalomeApp_Tools.h>
36 #include <SUIT_Session.h>
37 #include <SUIT_Desktop.h>
38 #include <SUIT_MessageBox.h>
39 #include <SUIT_OverrideCursor.h>
40 #include <SUIT_ResourceMgr.h>
41 #include <SUIT_ViewWindow.h>
42 #include <SUIT_ViewManager.h>
43 #include <OCCViewer_ViewModel.h>
44 #include <SALOME_ListIteratorOfListIO.hxx>
46 #include <GEOMImpl_Types.hxx>
48 #include <TCollection_AsciiString.hxx>
50 #define DEFAULT_TOLERANCE_VALUE 1e-07
52 //=================================================================================
53 // class : RepairGUI_GlueDlg()
54 // purpose : Constructs a RepairGUI_GlueDlg which is a child of 'parent', with the
55 // name 'name' and widget flags set to 'f'.
56 // The dialog will by default be modeless, unless you set 'modal' to
57 // TRUE to construct a modal dialog.
58 //=================================================================================
59 RepairGUI_GlueDlg::RepairGUI_GlueDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
61 : GEOMBase_Skeleton( theGeometryGUI, parent, modal ),
64 QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_GLUE_FACES" ) ) );
65 QPixmap image2( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_GLUE_FACES2" ) ));
66 QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
68 setWindowTitle( tr( "GEOM_GLUE_TITLE" ) );
70 /***************************************************************/
71 mainFrame()->GroupConstructors->setTitle( tr( "GEOM_GLUE_TITLE" ) );
72 mainFrame()->RadioButton1->setIcon( image0 );
73 mainFrame()->RadioButton2->setIcon( image2 );
74 mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
75 mainFrame()->RadioButton3->close();
77 GroupPoints = new DlgRef_1SelExt( centralWidget() );
78 GroupPoints->GroupBox1->setTitle( tr( "GEOM_GLUE" ) );
79 GroupPoints->TextLabel1->setText( tr( "GEOM_SELECTED_SHAPE" ) );
80 GroupPoints->PushButton1->setIcon( image1 );
81 GroupPoints->LineEdit1->setReadOnly( true );
83 QLabel* aTolLab = new QLabel( tr( "GEOM_TOLERANCE" ), GroupPoints->Box );
84 myTolEdt = new QDoubleSpinBox( GroupPoints->Box );
85 initSpinBox( myTolEdt, 0, 100, 1e-7, 10 );
86 myTolEdt->setValue( DEFAULT_TOLERANCE_VALUE );
88 QGridLayout* boxLayout = new QGridLayout( GroupPoints->Box );
89 boxLayout->setMargin( 0 ); boxLayout->setSpacing( 6 );
90 boxLayout->addWidget( aTolLab, 0, 0 );
91 boxLayout->addWidget( myTolEdt, 0, 2 );
92 /***************************************************************/
94 GroupPoints2 = new DlgRef_1SelExt( centralWidget() );
95 GroupPoints2->GroupBox1->setTitle( tr( "GEOM_GLUE" ) );
96 GroupPoints2->TextLabel1->setText( tr( "GEOM_SELECTED_SHAPE" ) );
97 GroupPoints2->PushButton1->setIcon( image1 );
98 GroupPoints2->LineEdit1->setReadOnly( true );
100 QLabel* aTolLab2 = new QLabel( tr( "GEOM_TOLERANCE" ), GroupPoints2->Box );
101 myTolEdt2 = new QDoubleSpinBox( GroupPoints2->Box );
102 initSpinBox( myTolEdt2, 0, 100, 1e-7, 10 );
103 myTolEdt2->setValue( DEFAULT_TOLERANCE_VALUE );
105 myDetectBtn = new QPushButton( tr( "GEOM_DETECT" ) + QString( " [%1]" ).arg( tr( "GLUE_FACES" ) ),
107 mySubShapesChk = new QCheckBox( tr( "SELECT_FACES" ), GroupPoints2->Box );
109 boxLayout = new QGridLayout( GroupPoints2->Box );
110 boxLayout->setMargin( 0 ); boxLayout->setSpacing( 6 );
111 boxLayout->addWidget( aTolLab2, 0, 0 );
112 boxLayout->addWidget( myTolEdt2, 0, 2 );
113 boxLayout->addWidget( myDetectBtn, 1, 0, 1, 3 );
114 boxLayout->addWidget( mySubShapesChk, 2, 0, 1, 3 );
116 QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
117 layout->setMargin( 0 ); layout->setSpacing( 6 );
118 layout->addWidget( GroupPoints );
119 layout->addWidget( GroupPoints2 );
121 /***************************************************************/
123 setHelpFileName( "glue_faces_operation_page.html" );
125 // Disable second way of gluing if OCC viewer is not active one
126 if ( SUIT_Session::session()->activeApplication()->desktop()->activeWindow()->getViewManager()->getType()
127 != OCCViewer_Viewer::Type() )
128 mainFrame()->RadioButton2->setEnabled( false );
134 //=================================================================================
135 // function : ~RepairGUI_GlueDlg()
136 // purpose : Destroys the object and frees any allocated resources
137 //=================================================================================
138 RepairGUI_GlueDlg::~RepairGUI_GlueDlg()
143 //=================================================================================
146 //=================================================================================
147 void RepairGUI_GlueDlg::Init()
150 myEditCurrentArgument = GroupPoints->LineEdit1;
152 myObject = GEOM::GEOM_Object::_nil();
154 //myGeomGUI->SetState( 0 );
155 //globalSelection( GEOM_COMPOUND );
157 /* signals and slots connections */
158 connect( buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
159 connect( buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
161 connect( this, SIGNAL( constructorsClicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) );
163 connect( GroupPoints->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
164 connect( GroupPoints->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
166 connect( GroupPoints2->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
167 connect( GroupPoints2->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
168 connect( myTolEdt2, SIGNAL( valueChanged( double ) ), this, SLOT( onTolerChanged( double ) ) );
169 connect( mySubShapesChk, SIGNAL( stateChanged( int ) ), this, SLOT( onSubShapesChk() ) );
171 connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
172 SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
174 connect( myDetectBtn, SIGNAL( clicked() ), this, SLOT( onDetect() ) );
176 initName( tr( "GLUE_NEW_OBJ_NAME" ) );
178 ConstructorsClicked( 0 );
185 //=================================================================================
186 // function : ConstructorsClicked()
187 // purpose : Radio button management
188 //=================================================================================
189 void RepairGUI_GlueDlg::ConstructorsClicked( int constructorId )
191 if ( myCurrConstrId == constructorId )
194 disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), 0, this, 0 );
196 switch ( constructorId ) {
198 GroupPoints2->hide();
200 GroupPoints->LineEdit1->setText( "" );
201 myEditCurrentArgument = GroupPoints->LineEdit1;
203 if ( myCurrConstrId >= 0 ) {
204 // i.e. it is not initialisation
205 // copy tolerance from previous tolerance field
206 myTolEdt->setValue( myTolEdt2->value() );
211 GroupPoints2->show();
212 GroupPoints->LineEdit1->setText( "" );
213 myEditCurrentArgument = GroupPoints2->LineEdit1;
215 if ( myCurrConstrId >= 0 ) {
216 // i.e. it is not initialisation
217 // copy tolerance from previous tolerance field
218 myTolEdt2->setValue( myTolEdt->value() );
219 mySubShapesChk->setChecked( false );
225 myCurrConstrId = constructorId;
227 myEditCurrentArgument->setFocus();
229 connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
230 SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
232 qApp->processEvents();
234 resize( minimumSize() );
239 SelectionIntoArgument();
243 //=================================================================================
244 // function : ClickOnOk()
245 // purpose : Same than click on apply but close this dialog.
246 //=================================================================================
247 void RepairGUI_GlueDlg::ClickOnOk()
249 if ( ClickOnApply() )
254 //=================================================================================
255 // function : ClickOnApply()
257 //=================================================================================
258 bool RepairGUI_GlueDlg::ClickOnApply()
260 if ( !onAcceptLocal() )
265 //GroupPoints->LineEdit1->setText("");
266 //myObject = GEOM::GEOM_Object::_nil();
268 //globalSelection( GEOM_COMPOUND );
270 ConstructorsClicked( getConstructorId() );
276 //=================================================================================
277 // function : SelectionIntoArgument()
278 // purpose : Called when selection
279 //=================================================================================
280 void RepairGUI_GlueDlg::SelectionIntoArgument()
282 if ( mySubShapesChk->isChecked() && getConstructorId() == 1 ) {
288 myEditCurrentArgument->setText( "" );
289 myObject = GEOM::GEOM_Object::_nil();
291 if ( IObjectCount() == 1 ) {
292 Handle(SALOME_InteractiveObject) anIO = firstIObject();
293 Standard_Boolean aRes;
294 myObject = GEOMBase::ConvertIOinGEOMObject( anIO, aRes );
296 myEditCurrentArgument->setText( GEOMBase::GetName( myObject ) );
301 //=================================================================================
302 // function : SetEditCurrentArgument()
304 //=================================================================================
305 void RepairGUI_GlueDlg::SetEditCurrentArgument()
307 const QObject* send = sender();
308 if ( send == GroupPoints->PushButton1 || send == GroupPoints2->PushButton1 ) {
309 myEditCurrentArgument->setFocus();
310 SelectionIntoArgument();
315 //=================================================================================
316 // function : LineEditReturnPressed()
318 //=================================================================================
319 void RepairGUI_GlueDlg::LineEditReturnPressed()
321 const QObject* send = sender();
322 if ( send == GroupPoints->LineEdit1 ) {
323 myEditCurrentArgument = GroupPoints->LineEdit1;
324 GEOMBase_Skeleton::LineEditReturnPressed();
326 else if ( send == GroupPoints2->LineEdit1 ) {
327 myEditCurrentArgument = GroupPoints2->LineEdit1;
328 GEOMBase_Skeleton::LineEditReturnPressed();
333 //=================================================================================
334 // function : ActivateThisDialog()
336 //=================================================================================
337 void RepairGUI_GlueDlg::ActivateThisDialog()
339 GEOMBase_Skeleton::ActivateThisDialog();
340 connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
341 SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
343 //GroupPoints->LineEdit1->setText("");
344 //GroupPoints2->LineEdit1->setText("");
345 //myObject = GEOM::GEOM_Object::_nil();
347 //myGeomGUI->SetState( 0 );
348 //globalSelection( GEOM_COMPOUND );
353 //=================================================================================
354 // function : enterEvent()
355 // purpose : Mouse enter onto the dialog to activate it
356 //=================================================================================
357 void RepairGUI_GlueDlg::enterEvent( QEvent* )
359 if ( !mainFrame()->GroupConstructors->isEnabled() )
360 ActivateThisDialog();
364 //=================================================================================
365 // function : createOperation
367 //=================================================================================
368 GEOM::GEOM_IOperations_ptr RepairGUI_GlueDlg::createOperation()
370 return getGeomEngine()->GetIShapesOperations( getStudyId() );
373 //=================================================================================
374 // function : isValid
376 //=================================================================================
377 bool RepairGUI_GlueDlg::isValid( QString& )
379 return !myObject->_is_nil() && ( IsPreview() || myTolEdt->value() > 0. );
382 //=================================================================================
383 // function : execute
385 //=================================================================================
386 bool RepairGUI_GlueDlg::execute( ObjectList& objects )
388 bool aResult = false;
391 switch ( getConstructorId() ) {
394 GEOM::GEOM_Object_var anObj = GEOM::GEOM_IShapesOperations::_narrow
395 ( getOperation() )->MakeGlueFaces( myObject, myTolEdt2->value(), true );
396 aResult = !anObj->_is_nil();
398 objects.push_back( anObj._retn() );
404 // if this method is used for displaying preview then we must detect glue faces only
405 ObjectList::iterator anIter;
406 for ( anIter = myTmpObjs.begin(); anIter != myTmpObjs.end(); ++anIter )
407 objects.push_back( GEOM::GEOM_Object::_duplicate( *anIter ) );
408 return myTmpObjs.size() ? true : false;
411 // Make glue face by list.
412 // Iterate through myTmpObjs and verifies where each object is currently selected or not.
413 QMap<QString, char> selected;
415 // Get names of selected objects
416 SALOME_ListIteratorOfListIO it ( selectedIO() );
417 for ( ; it.More(); it.Next() )
418 selected.insert( it.Value()->getName(), 0 );
420 // Iterate through result and select objects with names from selection
421 // ObjectList toRemoveFromEnggine;
423 ObjectList::iterator anIter;
424 for ( anIter = myTmpObjs.begin(); anIter != myTmpObjs.end(); ++anIter ) {
425 if ( selected.contains( myGeomGUI->getApp()->orb()->object_to_string(*anIter) ) )
426 toGlue.push_back( *anIter );
430 GEOM::ListOfGO_var aListForGlue = new GEOM::ListOfGO();
431 aListForGlue->length( toGlue.size() );
432 ObjectList::iterator anIter3 = toGlue.begin();
433 for ( int i = 0; anIter3 != toGlue.end(); ++anIter3, ++i )
434 aListForGlue[ i ] = *anIter3;
435 GEOM::GEOM_Object_var anObj = GEOM::GEOM_IShapesOperations::_narrow
436 ( getOperation() )->MakeGlueFacesByList( myObject, myTolEdt2->value(), aListForGlue, true );
438 aResult = !anObj->_is_nil();
441 objects.push_back( anObj._retn() );
443 // Remove from engine useless objects
456 //================================================================
457 // Function : clearShapeBufferLocal
459 //================================================================
460 void RepairGUI_GlueDlg::clearShapeBufferLocal( GEOM::GEOM_Object_ptr theObj )
462 if ( CORBA::is_nil( theObj ) )
465 CORBA::String_var IOR = myGeomGUI->getApp()->orb()->object_to_string( theObj );
466 TCollection_AsciiString asciiIOR( (char *)( IOR.in() ) );
467 myGeomGUI->GetShapeReader().RemoveShapeFromBuffer( asciiIOR );
469 if ( !getStudy() || !( getStudy()->studyDS() ) )
472 _PTR(Study) aStudy = getStudy()->studyDS();
473 _PTR(SObject) aSObj ( aStudy->FindObjectIOR( std::string( IOR.in() ) ) );
477 _PTR(ChildIterator) anIt ( aStudy->NewChildIterator( aSObj ) );
478 for ( anIt->InitEx( true ); anIt->More(); anIt->Next() ) {
479 _PTR(GenericAttribute) anAttr;
480 if ( anIt->Value()->FindAttribute(anAttr, "AttributeIOR") ) {
481 _PTR(AttributeIOR) anIOR ( anAttr );
482 TCollection_AsciiString asciiIOR( (char*)anIOR->Value().c_str() );
483 myGeomGUI->GetShapeReader().RemoveShapeFromBuffer( asciiIOR );
488 //================================================================
489 // Function : onAccept
490 // Purpose : This method should be called from dialog's slots onOk() and onApply()
491 // It perfroms user input validation, then it
492 // performs a proper operation and manages transactions, etc.
493 //================================================================
494 bool RepairGUI_GlueDlg::onAcceptLocal()
496 if ( !getStudy() || !( getStudy()->studyDS() ) )
499 _PTR(Study) aStudy = getStudy()->studyDS();
501 bool aLocked = aStudy->GetProperties()->IsLocked();
503 MESSAGE("GEOMBase_Helper::onAccept - ActiveStudy is locked");
504 SUIT_MessageBox::warning( this, tr( "WRN_WARNING" ), tr( "WRN_STUDY_LOCKED" ), tr( "BUT_OK" ) );
509 if ( !isValid( msg ) ) {
514 erasePreview( false );
517 if ( openCommand() ) {
518 SUIT_OverrideCursor wc;
520 SUIT_Session::session()->activeApplication()->putInfo( "" );
523 if ( !execute( objects ) ) {
529 const int nbObjs = objects.size();
530 bool withChildren = false;
531 for ( ObjectList::iterator it = objects.begin(); it != objects.end(); ++it ) {
534 aName = strlen( getNewObjectName() ) ? GEOMBase::GetDefaultName( getNewObjectName() ) : GEOMBase::GetDefaultName( getPrefix( *it ) );
537 aName = getNewObjectName();
538 // PAL6521: use a prefix, if some dialog box doesn't reimplement getNewObjectName()
539 if ( aName.isEmpty() )
540 aName = GEOMBase::GetDefaultName( getPrefix( *it ) );
542 addInStudy( *it, aName.toLatin1().data() );
543 withChildren = false;
544 display( *it, false );
550 SUIT_Session::session()->activeApplication()->putInfo( tr( "GEOM_PRP_DONE" ) );
556 // JFA 28.12.2004 BEGIN // To enable warnings
557 if ( !getOperation()->_is_nil() ) {
558 if ( !getOperation()->IsDone() ) {
560 QString msgw = QObject::tr( getOperation()->GetErrorCode() );
561 SUIT_MessageBox::warning( this, tr( "WRN_WARNING" ), msgw, tr( "BUT_OK" ) );
564 // JFA 28.12.2004 END
568 catch( const SALOME::SALOME_Exception& e ) {
569 SalomeApp_Tools::QtCatchCorbaException( e );
581 //=================================================================================
582 // function : onDetect
584 //=================================================================================
585 void RepairGUI_GlueDlg::onDetect()
589 if ( !isValid( msg ) ) {
594 GEOM::ListOfGO_var aList = GEOM::GEOM_IShapesOperations::_narrow
595 ( getOperation() )->GetGlueFaces( myObject, myTolEdt2->value() );
597 for ( int i = 0, n = aList->length(); i < n; i++ )
598 myTmpObjs.push_back(GEOM::GEOM_Object::_duplicate(aList[i]));
600 if ( myTmpObjs.size() > 0 ) {
601 msg = tr( "FACES_FOR_GLUING_ARE_DETECTED" ).arg( myTmpObjs.size() );
602 mySubShapesChk->setChecked( true );
605 msg = tr( "THERE_ARE_NO_FACES_FOR_GLUING" );
608 connect( ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
609 SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()) ) ;
610 SUIT_MessageBox::information( this, tr( "GEOM_FREE_BOUNDS_TLT" ), msg, tr( "Close" ) );
615 //=================================================================================
616 // function : activateSelection
617 // purpose : Redisplay preview and Activate selection
618 //=================================================================================
619 void RepairGUI_GlueDlg::activateSelection()
621 erasePreview( false );
623 int anId = getConstructorId();
625 // Case of whole gluing
626 disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
627 SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
629 globalSelection( GEOM_ALLSHAPES );
630 if ( myObject->_is_nil())
631 SelectionIntoArgument();
633 connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
634 SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
637 // Second case of gluing
638 if ( !mySubShapesChk->isChecked() )
639 globalSelection( GEOM_ALLSHAPES );
641 displayPreview( true, false, false, 2/*line width*/, 1/*display mode*/, Quantity_NOC_RED );
642 disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
643 SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ) ;
644 globalSelection( GEOM_PREVIEW );
645 connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
646 SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ) ;
652 //=================================================================================
653 // function : updateButtonState
654 // purpose : Update button state
655 //=================================================================================
656 void RepairGUI_GlueDlg::updateButtonState()
658 int anId = getConstructorId();
659 bool hasMainObj = !myObject->_is_nil();
661 buttonOk()->setEnabled( hasMainObj );
662 buttonApply()->setEnabled( hasMainObj );
666 bool wasSelected = false;
667 SALOME_ListIteratorOfListIO it ( selectedIO() );
670 bool wasDetected = myTmpObjs.size() ? true : false;
671 buttonOk()->setEnabled( hasMainObj && wasDetected && wasSelected );
672 buttonApply()->setEnabled( hasMainObj && wasDetected && wasSelected );
673 mySubShapesChk->setEnabled( hasMainObj && wasDetected );
674 myDetectBtn->setEnabled( hasMainObj );
675 if ( !hasMainObj || !wasDetected )
676 mySubShapesChk->setChecked( false );
680 //=================================================================================
681 // function : clearTemporary
682 // purpose : Remove temporary objects from engine
683 //=================================================================================
684 void RepairGUI_GlueDlg::clearTemporary()
686 ObjectList::iterator anIter;
687 for ( anIter = myTmpObjs.begin(); anIter != myTmpObjs.end(); ++anIter )
688 getGeomEngine()->RemoveObject(*anIter);
693 //=================================================================================
694 // function : onTolerChanged
695 // purpose : Remove temporary objects from engine
696 //=================================================================================
697 void RepairGUI_GlueDlg::onTolerChanged( double /*theVal*/ )
704 //=================================================================================
705 // function : onSubShapesChk
706 // purpose : Update selection mode
707 //=================================================================================
708 void RepairGUI_GlueDlg::onSubShapesChk()
710 if ( !mySubShapesChk->isChecked() )
716 //=================================================================================
717 // function : ClickOnCancel
718 // purpose : Remove temporary objects from engine and call method of base class
719 //=================================================================================
720 void RepairGUI_GlueDlg::ClickOnCancel()
723 GEOMBase_Skeleton::ClickOnCancel();
726 //================================================================
727 // Function : getEntry
729 //================================================================
730 static std::string getEntry( GEOM::GEOM_Object_ptr object )
732 SUIT_Session* session = SUIT_Session::session();
733 SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( session->activeApplication() );
735 std::string IOR = app->orb()->object_to_string( object );
737 SalomeApp_Study* study = ( SalomeApp_Study* )app->activeStudy();
738 _PTR(SObject) SO ( study->studyDS()->FindObjectIOR( IOR ) );