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 );
232 mySMESHGUI = SMESHGUI::GetSMESHGUI() ;
233 mySMESHGUI->SetActiveDialogBox( (QDialog*)this ) ;
235 myMeshOrSubMeshFilter = new SMESH_TypeFilter( MESHorSUBMESH );
237 /* signals and slots connections */
238 connect( buttonOk, SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
239 connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) );
240 connect( buttonApply, SIGNAL( clicked() ), this, SLOT(ClickOnApply() ) );
242 connect( SelectMeshButton, SIGNAL (clicked() ), this, SLOT( SetEditCurrentArgument() ) );
243 connect( DetectButton, SIGNAL ( clicked() ), this, SLOT( onDetect() ) );
244 connect( ListCoincident, SIGNAL ( selectionChanged() ), this, SLOT( onSelectNodesGroup() ) );
245 connect( ListCoincident, SIGNAL ( pressed( QListViewItem* ) ), this, SLOT( updateControls() ) );
246 connect( ListCoincident, SIGNAL ( currentChanged( QListViewItem* ) ), this, SLOT( updateControls() ) );
247 connect( SelectAllCB, SIGNAL( toggled(bool) ), this, SLOT(onSelectAll(bool) ) );
248 connect( ListEdit, SIGNAL ( selectionChanged() ), this, SLOT( onSelectNodesFromGroup() ) );
249 connect( AddButton, SIGNAL ( clicked() ), this, SLOT( onAdd() ) );
250 connect( RemoveButton, SIGNAL ( clicked() ), this, SLOT( onRemove() ) );
252 connect( mySMESHGUI, SIGNAL ( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
253 connect( mySelection, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
254 /* to close dialog if study change */
255 connect( mySMESHGUI, SIGNAL ( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
257 /* Move widget on the botton right corner of main widget */
259 mySMESHGUI->DefineDlgPosition( this, x, y ) ;
261 this->show() ; /* displays Dialog */
264 buttonOk->setEnabled(false);
265 buttonApply->setEnabled(false);
268 //=================================================================================
269 // function : ~SMESHGUI_MergeNodesDlg()
270 // purpose : Destroys the object and frees any allocated resources
271 //=================================================================================
272 SMESHGUI_MergeNodesDlg::~SMESHGUI_MergeNodesDlg()
274 // no need to delete child widgets, Qt does it all for us
278 //=================================================================================
279 // function : ClickOnApply()
281 //=================================================================================
282 bool SMESHGUI_MergeNodesDlg::ClickOnApply()
284 if (mySMESHGUI->ActiveStudyLocked() || myMesh->_is_nil())
289 SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
291 QApplication::setOverrideCursor(Qt::waitCursor);
292 SMESH::array_of_long_array_var aGroupsOfNodes = new SMESH::array_of_long_array;
293 aGroupsOfNodes->length(ListCoincident->childCount());
294 QListViewItem* item = ListCoincident->firstChild();
299 QStringList aListIds = QStringList("");
300 if (((QCheckListItem*) item)->isOn())
301 aListIds = QStringList::split( " ", item->text(0), false);
303 SMESH::long_array_var anIds = new SMESH::long_array;
304 anIds->length(aListIds.count());
306 for ( int i = 0; i < aListIds.count(); i++ )
307 anIds[i] = aListIds[i].toInt();
309 aGroupsOfNodes[anArrayNum++] = anIds.inout();
311 item = item->itemBelow();
314 aMeshEditor->MergeNodes (aGroupsOfNodes.inout());
315 QApplication::restoreOverrideCursor();
321 mySelection->ClearIObjects();
328 //=================================================================================
329 // function : ClickOnOk()
331 //=================================================================================
332 void SMESHGUI_MergeNodesDlg::ClickOnOk()
339 //=================================================================================
340 // function : ClickOnCancel()
342 //=================================================================================
343 void SMESHGUI_MergeNodesDlg::ClickOnCancel()
345 mySelection->ClearFilters();
346 mySelection->ClearIObjects();
347 SMESH::SetPointRepresentation(false);
348 QAD_Application::getDesktop()->SetSelectionMode( ActorSelection );
349 disconnect( mySelection, 0, this, 0 );
350 mySMESHGUI->ResetState() ;
355 //=================================================================================
356 // function : onEditNodesGroup()
358 //=================================================================================
359 void SMESHGUI_MergeNodesDlg::onEditNodesGroup()
361 if ( ListCoincident->childCount() < 1 )
364 QString aNewIds = "";
366 QListBoxItem* anItem;
367 for (anItem = ListEdit->firstItem(); anItem != 0; anItem = anItem->next())
368 aNewIds+=QString(" %1").arg(anItem->text());
370 ListCoincident->currentItem()->setText(0, aNewIds);
374 //=================================================================================
375 // function : updateControls()
377 //=================================================================================
378 void SMESHGUI_MergeNodesDlg::updateControls()
380 if ( ListCoincident->childCount() < 1 )
382 SMESH::SetPointRepresentation(false);
383 QAD_Application::getDesktop()->SetSelectionMode( ActorSelection );
387 bool hasChecked = false, hasUnchecked = false;
389 QListViewItem* item = ListCoincident->firstChild();
391 while (item && (!hasChecked || !hasUnchecked))
393 if (((QCheckListItem*) item)->isOn())
398 item = item->itemBelow();
402 SelectAllCB->setChecked(false);
404 bool enable = !(myMesh->_is_nil()) && hasChecked;
406 buttonOk->setEnabled(enable);
407 buttonApply->setEnabled(enable);
411 //=================================================================================
412 // function : onDetect()
414 //=================================================================================
415 void SMESHGUI_MergeNodesDlg::onDetect()
417 if(myMesh->_is_nil())
422 SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
424 QApplication::setOverrideCursor(Qt::waitCursor);
425 ListCoincident->clear();
428 SMESH::array_of_long_array_var aNodeGroups;
429 aMeshEditor->FindCoincidentNodes(SpinBoxTolerance->GetValue(), aNodeGroups);
431 for ( int i = 0; i < aNodeGroups->length(); i++ )
433 SMESH::long_array& aGroup = aNodeGroups[i];
436 for ( int j = 0; j < aGroup.length(); j++ )
437 aNodeIds+=QString(" %1").arg(aGroup[j]);
439 new QCheckListItem ( ListCoincident, aNodeIds, QCheckListItem::CheckBox );
441 QApplication::restoreOverrideCursor();
451 //=================================================================================
452 // function : onSelectNodesGroup()
454 //=================================================================================
455 void SMESHGUI_MergeNodesDlg::onSelectNodesGroup()
460 myEditCurrentArgument = (QWidget*)ListCoincident;
462 QListViewItem* aSelectedItem = ListCoincident->selectedItem();
466 QStringList aListId = QStringList::split( " ", aSelectedItem->text(0), false);
469 ListEdit->insertStringList(aListId);
471 mySelection->ClearIObjects();
472 mySelection->AddIObject( myActor->getIO() );
474 SMESH::SetPointRepresentation(true);
475 QAD_Application::getDesktop()->SetSelectionMode( NodeSelection, true );
477 ListEdit->selectAll(true);
481 //=================================================================================
482 // function : onSelectAll()
484 //=================================================================================
485 void SMESHGUI_MergeNodesDlg::onSelectAll(bool isToggled)
490 QListViewItem* item = ListCoincident->firstChild();
494 if (!((QCheckListItem*) item)->isOn())
495 ((QCheckListItem*) item)->setOn(true);
496 item = item->itemBelow();
501 buttonOk->setEnabled(true);
502 buttonApply->setEnabled(true);
508 //=================================================================================
509 // function : onSelectNodesFromGroup()
511 //=================================================================================
512 void SMESHGUI_MergeNodesDlg::onSelectNodesFromGroup()
517 mySelection->ClearIObjects();
519 TColStd_MapOfInteger aIndexes;
520 QListBoxItem* anItem;
521 for (anItem = ListEdit->firstItem(); anItem != 0; anItem = anItem->next()) {
522 if (anItem->isSelected()) {
523 int anId = anItem->text().toInt();
527 mySelection->AddOrRemoveIndex(myActor->getIO(), aIndexes, false, false);
528 mySelection->AddIObject(myActor->getIO());
532 //=================================================================================
533 // function : onAdd()
535 //=================================================================================
536 void SMESHGUI_MergeNodesDlg::onAdd()
541 QString aListStr = "";
544 aNbNnodes = SMESH::GetNameOfSelectedNodes(mySelection, myActor->getIO(), aListStr);
548 QStringList aNodes = QStringList::split(" ", aListStr);
549 QListBoxItem* anItem = 0;
551 for (QStringList::iterator it = aNodes.begin(); it != aNodes.end(); ++it) {
552 anItem = ListEdit->findItem(*it, Qt::ExactMatch);
554 anItem = new QListBoxText(*it);
555 ListEdit->insertItem(anItem);
557 ListEdit->setSelected(anItem, true);
564 //=================================================================================
565 // function : onRemove()
567 //=================================================================================
568 void SMESHGUI_MergeNodesDlg::onRemove()
570 if (myEditCurrentArgument != (QWidget*)ListCoincident)
573 for (int i = ListEdit->count(); i > 0; i--)
575 if (ListEdit->isSelected(i-1))
576 ListEdit->removeItem(i-1);
582 //=================================================================================
583 // function : SetEditCurrentArgument()
585 //=================================================================================
586 void SMESHGUI_MergeNodesDlg::SetEditCurrentArgument()
588 QPushButton* send = (QPushButton*)sender();
590 disconnect( mySelection, 0, this, 0 );
591 mySelection->ClearIObjects();
592 mySelection->ClearFilters();
594 if(send == SelectMeshButton)
596 myEditCurrentArgument = (QWidget*)LineEditMesh;
597 SMESH::SetPointRepresentation(false);
598 QAD_Application::getDesktop()->SetSelectionMode( ActorSelection );
599 mySelection->AddFilter(myMeshOrSubMeshFilter) ;
602 myEditCurrentArgument->setFocus();
603 connect( mySelection, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
604 SelectionIntoArgument() ;
608 //=================================================================================
609 // function : SelectionIntoArgument()
610 // purpose : Called when selection as changed or other case
611 //=================================================================================
612 void SMESHGUI_MergeNodesDlg::SelectionIntoArgument()
614 if (myEditCurrentArgument == (QWidget*)LineEditMesh)
616 QString aString = "";
617 LineEditMesh->setText( aString );
619 ListCoincident->clear();
622 int nbSel = SMESH::GetNameOfSelectedIObjects(mySelection, aString);
626 Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject();
627 myMesh = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(IO) ;
628 myActor = SMESH::FindActorByEntry( mySelection->firstIObject()->getEntry() );
629 if(myMesh->_is_nil() || !myActor)
632 LineEditMesh->setText( aString );
637 //=================================================================================
638 // function : DeactivateActiveDialog()
640 //=================================================================================
641 void SMESHGUI_MergeNodesDlg::DeactivateActiveDialog()
643 if ( GroupConstructors->isEnabled() ) {
644 GroupConstructors->setEnabled(false) ;
645 GroupMesh->setEnabled(false);
646 GroupCoincident->setEnabled(false);
647 GroupEdit->setEnabled(false);
648 GroupButtons->setEnabled(false) ;
649 mySMESHGUI->ResetState() ;
650 mySMESHGUI->SetActiveDialogBox(0) ;
655 //=================================================================================
656 // function : ActivateThisDialog()
658 //=================================================================================
659 void SMESHGUI_MergeNodesDlg::ActivateThisDialog()
661 /* Emit a signal to deactivate the active dialog */
662 mySMESHGUI->EmitSignalDeactivateDialog() ;
663 GroupConstructors->setEnabled(true) ;
664 GroupMesh->setEnabled(true);
665 GroupCoincident->setEnabled(true);
666 GroupEdit->setEnabled(true);
667 GroupButtons->setEnabled(true) ;
669 mySMESHGUI->SetActiveDialogBox( (QDialog*)this ) ;
671 SelectionIntoArgument();
675 //=================================================================================
676 // function : enterEvent()
678 //=================================================================================
679 void SMESHGUI_MergeNodesDlg::enterEvent(QEvent* e)
681 if ( GroupConstructors->isEnabled() )
683 ActivateThisDialog() ;
687 //=================================================================================
688 // function : closeEvent()
690 //=================================================================================
691 void SMESHGUI_MergeNodesDlg::closeEvent( QCloseEvent* e )
693 /* same than click on cancel button */
698 //=======================================================================
699 //function : hideEvent
700 //purpose : caused by ESC key
701 //=======================================================================
703 void SMESHGUI_MergeNodesDlg::hideEvent ( QHideEvent * e )
705 if ( !isMinimized() )