1 // SMESH SMESHGUI : GUI for SMESH 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SMESHGUI_MergeNodesDlg.cxx
25 // Author : Michael ZORIN
29 #include "SMESHGUI_MergeNodesDlg.h"
32 #include "SMESHGUI_Utils.h"
33 #include "SMESHGUI_VTKUtils.h"
34 #include "SMESHGUI_IdValidator.h"
35 #include "SMESHGUI_SpinBox.h"
36 #include "SMESH_Actor.h"
37 #include "SMDS_Mesh.hxx"
41 #include "QAD_Application.h"
42 #include "QAD_Desktop.h"
43 #include "QAD_MessageBox.h"
44 #include "utilities.h"
47 #include <qapplication.h>
48 #include <qbuttongroup.h>
49 #include <qgroupbox.h>
51 #include <qlineedit.h>
53 #include <qlistview.h>
54 #include <qpushbutton.h>
55 #include <qradiobutton.h>
56 #include <qcheckbox.h>
63 //=================================================================================
64 // class : SMESHGUI_MergeNodesDlg()
66 //=================================================================================
67 SMESHGUI_MergeNodesDlg::SMESHGUI_MergeNodesDlg( QWidget* parent, const char* name, SALOME_Selection* Sel,
68 bool modal, WFlags fl )
69 : QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu |
70 Qt::WDestructiveClose)
72 QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap( "SMESH",tr("ICON_SMESH_MERGE_NODES")));
73 QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap( "SMESH",tr("ICON_SELECT")));
76 setName( "SMESHGUI_MergeNodesDlg" );
78 setCaption( tr( "SMESH_MERGE_NODES" ) );
79 setSizeGripEnabled( TRUE );
80 SMESHGUI_MergeNodesDlgLayout = new QGridLayout( this );
81 SMESHGUI_MergeNodesDlgLayout->setSpacing( 6 );
82 SMESHGUI_MergeNodesDlgLayout->setMargin( 11 );
84 /***************************************************************/
85 GroupConstructors = new QButtonGroup( this, "GroupConstructors" );
86 GroupConstructors->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, GroupConstructors->sizePolicy().hasHeightForWidth() ) );
87 GroupConstructors->setTitle( tr( "SMESH_MERGE_NODES" ) );
88 GroupConstructors->setExclusive( TRUE );
89 GroupConstructors->setColumnLayout(0, Qt::Vertical );
90 GroupConstructors->layout()->setSpacing( 0 );
91 GroupConstructors->layout()->setMargin( 0 );
92 GroupConstructorsLayout = new QGridLayout( GroupConstructors->layout() );
93 GroupConstructorsLayout->setAlignment( Qt::AlignTop );
94 GroupConstructorsLayout->setSpacing( 6 );
95 GroupConstructorsLayout->setMargin( 11 );
96 QHBoxLayout* RBLayout = new QHBoxLayout( 0, 0, 6, "Layout2");
97 RadioButton1= new QRadioButton( GroupConstructors, "RadioButton1" );
98 RadioButton1->setText( tr( "" ) );
99 RadioButton1->setPixmap( image0 );
100 RBLayout->addWidget( RadioButton1);
101 GroupConstructorsLayout->addLayout( RBLayout, 0, 0 );
102 SMESHGUI_MergeNodesDlgLayout->addWidget( GroupConstructors, 0, 0 );
104 /***************************************************************/
105 GroupButtons = new QGroupBox( this, "GroupButtons" );
106 GroupButtons->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, GroupButtons->sizePolicy().hasHeightForWidth() ) );
107 GroupButtons->setGeometry( QRect( 10, 10, 281, 48 ) );
108 GroupButtons->setTitle( tr( "" ) );
109 GroupButtons->setColumnLayout(0, Qt::Vertical );
110 GroupButtons->layout()->setSpacing( 0 );
111 GroupButtons->layout()->setMargin( 0 );
112 GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
113 GroupButtonsLayout->setAlignment( Qt::AlignTop );
114 GroupButtonsLayout->setSpacing( 6 );
115 GroupButtonsLayout->setMargin( 11 );
116 buttonCancel = new QPushButton( GroupButtons, "buttonCancel" );
117 buttonCancel->setText( tr( "SMESH_BUT_CLOSE" ) );
118 buttonCancel->setAutoDefault( TRUE );
119 GroupButtonsLayout->addWidget( buttonCancel, 0, 3 );
120 buttonApply = new QPushButton( GroupButtons, "buttonApply" );
121 buttonApply->setText( tr( "SMESH_BUT_APPLY" ) );
122 buttonApply->setAutoDefault( TRUE );
123 GroupButtonsLayout->addWidget( buttonApply, 0, 1 );
124 QSpacerItem* spacer_9 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
125 GroupButtonsLayout->addItem( spacer_9, 0, 2 );
126 buttonOk = new QPushButton( GroupButtons, "buttonOk" );
127 buttonOk->setText( tr( "SMESH_BUT_OK" ) );
128 buttonOk->setAutoDefault( TRUE );
129 buttonOk->setDefault( TRUE );
130 GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
131 SMESHGUI_MergeNodesDlgLayout->addWidget( GroupButtons, 4, 0 );
133 /***************************************************************/
135 // Controls for mesh defining
136 GroupMesh = new QGroupBox( this, "GroupMesh" );
137 GroupMesh->setTitle( tr( "SMESH_MESH" ) );
138 GroupMesh->setColumnLayout(0, Qt::Vertical );
139 GroupMesh->layout()->setSpacing( 0 );
140 GroupMesh->layout()->setMargin( 0 );
141 GroupMeshLayout = new QGridLayout( GroupMesh->layout() );
142 GroupMeshLayout->setAlignment( Qt::AlignTop );
143 GroupMeshLayout->setSpacing( 6 );
144 GroupMeshLayout->setMargin( 11 );
146 TextLabelName = new QLabel( GroupMesh, "TextLabelName" );
147 TextLabelName->setText( tr( "SMESH_NAME" ) );
148 GroupMeshLayout->addWidget( TextLabelName, 0, 0 );
150 SelectMeshButton = new QPushButton( GroupMesh, "SelectMeshButton" );
151 SelectMeshButton->setPixmap( image1 );
152 GroupMeshLayout->addWidget( SelectMeshButton, 0, 1 );
154 LineEditMesh = new QLineEdit(GroupMesh, "LineEditMesh");
155 LineEditMesh->setReadOnly(true);
156 GroupMeshLayout->addWidget( LineEditMesh, 0, 2 );
158 SMESHGUI_MergeNodesDlgLayout->addWidget( GroupMesh, 1, 0 );
160 // Controls for coincident nodes detecting
161 GroupCoincident = new QGroupBox( this, "GroupCoincident" );
162 GroupCoincident->setTitle( tr( "COINCIDENT_NODES" ) );
163 GroupCoincident->setColumnLayout(0, Qt::Vertical );
164 GroupCoincident->layout()->setSpacing( 0 );
165 GroupCoincident->layout()->setMargin( 0 );
166 QGridLayout* GroupCoincidentLayout = new QGridLayout( GroupCoincident->layout() );
167 GroupCoincidentLayout->setAlignment( Qt::AlignTop );
168 GroupCoincidentLayout->setSpacing( 6 );
169 GroupCoincidentLayout->setMargin( 11 );
171 TextLabelTolerance = new QLabel( GroupCoincident, "TextLabelTolerance" );
172 TextLabelTolerance->setText( tr( "SMESH_TOLERANCE" ) );
173 GroupCoincidentLayout->addWidget( TextLabelTolerance, 0, 0 );
175 SpinBoxTolerance = new SMESHGUI_SpinBox( GroupCoincident, "SpinBoxTolerance" );
176 GroupCoincidentLayout->addWidget( SpinBoxTolerance, 0, 1 );
178 QPushButton* DetectButton = new QPushButton( GroupCoincident, "DetectButton" );
179 DetectButton->setText( tr("DETECT") );
180 GroupCoincidentLayout->addWidget( DetectButton, 0, 2 );
182 ListCoincident = new QListView( GroupCoincident );
183 ListCoincident->setSorting( -1 );
184 ListCoincident->addColumn( "Nodes" );
185 ListCoincident->header()->hide();
187 GroupCoincidentLayout->addMultiCellWidget( ListCoincident, 1, 1, 0, 1 );
189 SelectAllCB = new QCheckBox(GroupCoincident, "SelectAllCB");
190 SelectAllCB->setText(tr("SELECT_ALL"));
191 GroupCoincidentLayout->addWidget( SelectAllCB, 2, 0 );
193 SMESHGUI_MergeNodesDlgLayout->addWidget( GroupCoincident, 2, 0 );
195 // Controls for editing group of nodes
196 GroupEdit = new QGroupBox( this, "GroupEdit" );
197 GroupEdit->setTitle( tr( "EDIT_GROUP_OF_NODES" ) );
198 GroupEdit->setColumnLayout(0, Qt::Vertical );
199 GroupEdit->layout()->setSpacing( 0 );
200 GroupEdit->layout()->setMargin( 0 );
201 QGridLayout* GroupEditLayout = new QGridLayout( GroupEdit->layout() );
202 GroupEditLayout->setAlignment( Qt::AlignTop );
203 GroupEditLayout->setSpacing( 6 );
204 GroupEditLayout->setMargin( 11 );
206 ListEdit = new QListBox( GroupEdit, "ListEdit" );
207 ListEdit->setColumnMode(QListBox::FitToHeight);
208 ListEdit->setSelectionMode( QListBox::Extended );
209 GroupEditLayout->addMultiCellWidget( ListEdit, 0, 2, 0, 0 );
211 QPushButton* AddButton = new QPushButton( GroupEdit, "AddButton" );
212 AddButton->setText( tr("SMESH_BUT_ADD") );
213 GroupEditLayout->addWidget( AddButton, 0, 1 );
215 QPushButton* RemoveButton = new QPushButton( GroupEdit, "RemoveButton" );
216 RemoveButton->setText( tr("SMESH_BUT_REMOVE") );
217 GroupEditLayout->addWidget( RemoveButton, 1, 1 );
219 QSpacerItem* spacer = new QSpacerItem( 20, 200, QSizePolicy::Minimum, QSizePolicy::Expanding );
220 GroupEditLayout->addItem( spacer, 2, 1 );
222 SMESHGUI_MergeNodesDlgLayout->addWidget( GroupEdit, 3, 0 );
224 /* Initialisations */
225 SpinBoxTolerance->RangeStepAndValidator( 0.0, 999999.999, 0.1, 3 );
226 SpinBoxTolerance->SetValue(1e-05);
228 RadioButton1->setChecked( TRUE );
234 mySMESHGUI = SMESHGUI::GetSMESHGUI() ;
235 mySMESHGUI->SetActiveDialogBox( (QDialog*)this ) ;
237 myMeshOrSubMeshFilter = new SMESH_TypeFilter( MESHorSUBMESH );
239 /* signals and slots connections */
240 connect( buttonOk, SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
241 connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) );
242 connect( buttonApply, SIGNAL( clicked() ), this, SLOT(ClickOnApply() ) );
244 connect( SelectMeshButton, SIGNAL (clicked() ), this, SLOT( SetEditCurrentArgument() ) );
245 connect( DetectButton, SIGNAL ( clicked() ), this, SLOT( onDetect() ) );
246 connect( ListCoincident, SIGNAL ( selectionChanged() ), this, SLOT( onSelectNodesGroup() ) );
247 connect( ListCoincident, SIGNAL ( pressed( QListViewItem* ) ), this, SLOT( updateControls() ) );
248 connect( ListCoincident, SIGNAL ( currentChanged( QListViewItem* ) ), this, SLOT( updateControls() ) );
249 connect( SelectAllCB, SIGNAL( toggled(bool) ), this, SLOT(onSelectAll(bool) ) );
250 connect( ListEdit, SIGNAL ( selectionChanged() ), this, SLOT( onSelectNodesFromGroup() ) );
251 connect( AddButton, SIGNAL ( clicked() ), this, SLOT( onAdd() ) );
252 connect( RemoveButton, SIGNAL ( clicked() ), this, SLOT( onRemove() ) );
254 connect( mySMESHGUI, SIGNAL ( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
255 connect( mySelection, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
256 /* to close dialog if study change */
257 connect( mySMESHGUI, SIGNAL ( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
259 /* Move widget on the botton right corner of main widget */
261 mySMESHGUI->DefineDlgPosition( this, x, y ) ;
263 this->show() ; /* displays Dialog */
266 buttonOk->setEnabled(false);
267 buttonApply->setEnabled(false);
270 //=================================================================================
271 // function : ~SMESHGUI_MergeNodesDlg()
272 // purpose : Destroys the object and frees any allocated resources
273 //=================================================================================
274 SMESHGUI_MergeNodesDlg::~SMESHGUI_MergeNodesDlg()
276 // no need to delete child widgets, Qt does it all for us
280 //=================================================================================
281 // function : ClickOnApply()
283 //=================================================================================
284 bool SMESHGUI_MergeNodesDlg::ClickOnApply()
286 if (mySMESHGUI->ActiveStudyLocked() || myMesh->_is_nil())
291 SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
293 QApplication::setOverrideCursor(Qt::waitCursor);
294 SMESH::array_of_long_array_var aGroupsOfNodes = new SMESH::array_of_long_array;
295 aGroupsOfNodes->length(ListCoincident->childCount());
296 QListViewItem* item = ListCoincident->firstChild();
301 QStringList aListIds = QStringList("");
302 if (((QCheckListItem*) item)->isOn())
303 aListIds = QStringList::split( " ", item->text(0), false);
305 SMESH::long_array_var anIds = new SMESH::long_array;
306 anIds->length(aListIds.count());
308 for ( int i = 0; i < aListIds.count(); i++ )
309 anIds[i] = aListIds[i].toInt();
311 aGroupsOfNodes[anArrayNum++] = anIds.inout();
313 item = item->itemBelow();
316 aMeshEditor->MergeNodes (aGroupsOfNodes.inout());
317 QApplication::restoreOverrideCursor();
323 mySelection->ClearIObjects();
330 //=================================================================================
331 // function : ClickOnOk()
333 //=================================================================================
334 void SMESHGUI_MergeNodesDlg::ClickOnOk()
341 //=================================================================================
342 // function : ClickOnCancel()
344 //=================================================================================
345 void SMESHGUI_MergeNodesDlg::ClickOnCancel()
347 mySelection->ClearFilters();
348 mySelection->ClearIObjects();
349 SMESH::SetPointRepresentation(false);
350 QAD_Application::getDesktop()->SetSelectionMode( ActorSelection );
351 disconnect( mySelection, 0, this, 0 );
352 mySMESHGUI->ResetState() ;
357 //=================================================================================
358 // function : onEditNodesGroup()
360 //=================================================================================
361 void SMESHGUI_MergeNodesDlg::onEditNodesGroup()
363 if ( ListCoincident->childCount() < 1 )
366 QString aNewIds = "";
368 QListBoxItem* anItem;
369 for (anItem = ListEdit->firstItem(); anItem != 0; anItem = anItem->next())
370 aNewIds+=QString(" %1").arg(anItem->text());
372 ListCoincident->currentItem()->setText(0, aNewIds);
376 //=================================================================================
377 // function : updateControls()
379 //=================================================================================
380 void SMESHGUI_MergeNodesDlg::updateControls()
382 if ( ListCoincident->childCount() < 1 )
384 SMESH::SetPointRepresentation(false);
385 QAD_Application::getDesktop()->SetSelectionMode( ActorSelection );
389 bool hasChecked = false, hasUnchecked = false;
391 QListViewItem* item = ListCoincident->firstChild();
393 while (item && (!hasChecked || !hasUnchecked))
395 if (((QCheckListItem*) item)->isOn())
400 item = item->itemBelow();
404 SelectAllCB->setChecked(false);
406 bool enable = !(myMesh->_is_nil()) && hasChecked;
408 buttonOk->setEnabled(enable);
409 buttonApply->setEnabled(enable);
413 //=================================================================================
414 // function : onDetect()
416 //=================================================================================
417 void SMESHGUI_MergeNodesDlg::onDetect()
419 if(myMesh->_is_nil())
424 SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
426 QApplication::setOverrideCursor(Qt::waitCursor);
427 ListCoincident->clear();
430 SMESH::array_of_long_array_var aNodeGroups;
431 aMeshEditor->FindCoincidentNodes(SpinBoxTolerance->GetValue(), aNodeGroups);
433 for ( int i = 0; i < aNodeGroups->length(); i++ )
435 SMESH::long_array& aGroup = aNodeGroups[i];
438 for ( int j = 0; j < aGroup.length(); j++ )
439 aNodeIds+=QString(" %1").arg(aGroup[j]);
441 new QCheckListItem ( ListCoincident, aNodeIds, QCheckListItem::CheckBox );
443 QApplication::restoreOverrideCursor();
453 //=================================================================================
454 // function : onSelectNodesGroup()
456 //=================================================================================
457 void SMESHGUI_MergeNodesDlg::onSelectNodesGroup()
462 myEditCurrentArgument = (QWidget*)ListCoincident;
464 QListViewItem* aSelectedItem = ListCoincident->selectedItem();
468 QStringList aListId = QStringList::split( " ", aSelectedItem->text(0), false);
471 ListEdit->insertStringList(aListId);
473 mySelection->ClearIObjects();
474 mySelection->AddIObject( myActor->getIO() );
476 SMESH::SetPointRepresentation(true);
477 QAD_Application::getDesktop()->SetSelectionMode( NodeSelection, true );
479 ListEdit->selectAll(true);
483 //=================================================================================
484 // function : onSelectAll()
486 //=================================================================================
487 void SMESHGUI_MergeNodesDlg::onSelectAll(bool isToggled)
492 QListViewItem* item = ListCoincident->firstChild();
496 if (!((QCheckListItem*) item)->isOn())
497 ((QCheckListItem*) item)->setOn(true);
498 item = item->itemBelow();
503 buttonOk->setEnabled(true);
504 buttonApply->setEnabled(true);
510 //=================================================================================
511 // function : onSelectNodesFromGroup()
513 //=================================================================================
514 void SMESHGUI_MergeNodesDlg::onSelectNodesFromGroup()
519 mySelection->ClearIObjects();
521 TColStd_MapOfInteger aIndexes;
522 QListBoxItem* anItem;
523 for (anItem = ListEdit->firstItem(); anItem != 0; anItem = anItem->next()) {
524 if (anItem->isSelected()) {
525 int anId = anItem->text().toInt();
529 mySelection->AddOrRemoveIndex(myActor->getIO(), aIndexes, false, false);
530 mySelection->AddIObject(myActor->getIO());
534 //=================================================================================
535 // function : onAdd()
537 //=================================================================================
538 void SMESHGUI_MergeNodesDlg::onAdd()
543 QString aListStr = "";
546 aNbNnodes = SMESH::GetNameOfSelectedNodes(mySelection, myActor->getIO(), aListStr);
550 QStringList aNodes = QStringList::split(" ", aListStr);
551 QListBoxItem* anItem = 0;
553 for (QStringList::iterator it = aNodes.begin(); it != aNodes.end(); ++it) {
554 anItem = ListEdit->findItem(*it, Qt::ExactMatch);
556 anItem = new QListBoxText(*it);
557 ListEdit->insertItem(anItem);
559 ListEdit->setSelected(anItem, true);
566 //=================================================================================
567 // function : onRemove()
569 //=================================================================================
570 void SMESHGUI_MergeNodesDlg::onRemove()
572 if (myEditCurrentArgument != (QWidget*)ListCoincident)
575 for (int i = ListEdit->count(); i > 0; i--)
577 if (ListEdit->isSelected(i-1))
578 ListEdit->removeItem(i-1);
584 //=================================================================================
585 // function : SetEditCurrentArgument()
587 //=================================================================================
588 void SMESHGUI_MergeNodesDlg::SetEditCurrentArgument()
590 QPushButton* send = (QPushButton*)sender();
592 disconnect( mySelection, 0, this, 0 );
593 mySelection->ClearIObjects();
594 mySelection->ClearFilters();
596 if(send == SelectMeshButton)
598 myEditCurrentArgument = (QWidget*)LineEditMesh;
599 SMESH::SetPointRepresentation(false);
600 QAD_Application::getDesktop()->SetSelectionMode( ActorSelection );
601 mySelection->AddFilter(myMeshOrSubMeshFilter) ;
604 myEditCurrentArgument->setFocus();
605 connect( mySelection, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
606 SelectionIntoArgument() ;
610 //=================================================================================
611 // function : SelectionIntoArgument()
612 // purpose : Called when selection as changed or other case
613 //=================================================================================
614 void SMESHGUI_MergeNodesDlg::SelectionIntoArgument()
616 if (myEditCurrentArgument == (QWidget*)LineEditMesh)
618 QString aString = "";
619 LineEditMesh->setText( aString );
621 ListCoincident->clear();
624 int nbSel = SMESH::GetNameOfSelectedIObjects(mySelection, aString);
628 Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject();
629 myMesh = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(IO) ;
630 myActor = SMESH::FindActorByEntry( mySelection->firstIObject()->getEntry() );
631 if(myMesh->_is_nil() || !myActor)
634 LineEditMesh->setText( aString );
639 //=================================================================================
640 // function : DeactivateActiveDialog()
642 //=================================================================================
643 void SMESHGUI_MergeNodesDlg::DeactivateActiveDialog()
645 if ( GroupConstructors->isEnabled() ) {
646 GroupConstructors->setEnabled(false) ;
647 GroupMesh->setEnabled(false);
648 GroupCoincident->setEnabled(false);
649 GroupEdit->setEnabled(false);
650 GroupButtons->setEnabled(false) ;
651 mySMESHGUI->ResetState() ;
652 mySMESHGUI->SetActiveDialogBox(0) ;
657 //=================================================================================
658 // function : ActivateThisDialog()
660 //=================================================================================
661 void SMESHGUI_MergeNodesDlg::ActivateThisDialog()
663 /* Emit a signal to deactivate the active dialog */
664 mySMESHGUI->EmitSignalDeactivateDialog() ;
665 GroupConstructors->setEnabled(true) ;
666 GroupMesh->setEnabled(true);
667 GroupCoincident->setEnabled(true);
668 GroupEdit->setEnabled(true);
669 GroupButtons->setEnabled(true) ;
671 mySMESHGUI->SetActiveDialogBox( (QDialog*)this ) ;
673 SelectionIntoArgument();
677 //=================================================================================
678 // function : enterEvent()
680 //=================================================================================
681 void SMESHGUI_MergeNodesDlg::enterEvent(QEvent* e)
683 if ( GroupConstructors->isEnabled() )
685 ActivateThisDialog() ;
689 //=================================================================================
690 // function : closeEvent()
692 //=================================================================================
693 void SMESHGUI_MergeNodesDlg::closeEvent( QCloseEvent* e )
695 /* same than click on cancel button */
700 //=======================================================================
701 //function : hideEvent
702 //purpose : caused by ESC key
703 //=======================================================================
705 void SMESHGUI_MergeNodesDlg::hideEvent ( QHideEvent * e )
707 if ( !isMinimized() )