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"
37 #include "SMESH_Actor.h"
38 #include "SMDS_Mesh.hxx"
42 #include "QAD_Application.h"
43 #include "QAD_Desktop.h"
44 #include "QAD_MessageBox.h"
45 #include "utilities.h"
48 #include <qapplication.h>
49 #include <qbuttongroup.h>
50 #include <qgroupbox.h>
52 #include <qlineedit.h>
54 #include <qlistview.h>
55 #include <qpushbutton.h>
56 #include <qradiobutton.h>
57 #include <qcheckbox.h>
64 //=================================================================================
65 // class : SMESHGUI_MergeNodesDlg()
67 //=================================================================================
68 SMESHGUI_MergeNodesDlg::SMESHGUI_MergeNodesDlg( QWidget* parent, const char* name, SALOME_Selection* Sel,
69 bool modal, WFlags fl )
70 : QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu |
71 Qt::WDestructiveClose)
73 QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap( "SMESH",tr("ICON_SMESH_MERGE_NODES")));
74 QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap( "SMESH",tr("ICON_SELECT")));
77 setName( "SMESHGUI_MergeNodesDlg" );
79 setCaption( tr( "SMESH_MERGE_NODES" ) );
80 setSizeGripEnabled( TRUE );
81 SMESHGUI_MergeNodesDlgLayout = new QGridLayout( this );
82 SMESHGUI_MergeNodesDlgLayout->setSpacing( 6 );
83 SMESHGUI_MergeNodesDlgLayout->setMargin( 11 );
85 /***************************************************************/
86 GroupConstructors = new QButtonGroup( this, "GroupConstructors" );
87 GroupConstructors->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, GroupConstructors->sizePolicy().hasHeightForWidth() ) );
88 GroupConstructors->setTitle( tr( "SMESH_MERGE_NODES" ) );
89 GroupConstructors->setExclusive( TRUE );
90 GroupConstructors->setColumnLayout(0, Qt::Vertical );
91 GroupConstructors->layout()->setSpacing( 0 );
92 GroupConstructors->layout()->setMargin( 0 );
93 GroupConstructorsLayout = new QGridLayout( GroupConstructors->layout() );
94 GroupConstructorsLayout->setAlignment( Qt::AlignTop );
95 GroupConstructorsLayout->setSpacing( 6 );
96 GroupConstructorsLayout->setMargin( 11 );
97 QHBoxLayout* RBLayout = new QHBoxLayout( 0, 0, 6, "Layout2");
98 RadioButton1= new QRadioButton( GroupConstructors, "RadioButton1" );
99 RadioButton1->setText( tr( "" ) );
100 RadioButton1->setPixmap( image0 );
101 RBLayout->addWidget( RadioButton1);
102 GroupConstructorsLayout->addLayout( RBLayout, 0, 0 );
103 SMESHGUI_MergeNodesDlgLayout->addWidget( GroupConstructors, 0, 0 );
105 /***************************************************************/
106 GroupButtons = new QGroupBox( this, "GroupButtons" );
107 GroupButtons->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, GroupButtons->sizePolicy().hasHeightForWidth() ) );
108 GroupButtons->setGeometry( QRect( 10, 10, 281, 48 ) );
109 GroupButtons->setTitle( tr( "" ) );
110 GroupButtons->setColumnLayout(0, Qt::Vertical );
111 GroupButtons->layout()->setSpacing( 0 );
112 GroupButtons->layout()->setMargin( 0 );
113 GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
114 GroupButtonsLayout->setAlignment( Qt::AlignTop );
115 GroupButtonsLayout->setSpacing( 6 );
116 GroupButtonsLayout->setMargin( 11 );
117 buttonCancel = new QPushButton( GroupButtons, "buttonCancel" );
118 buttonCancel->setText( tr( "SMESH_BUT_CLOSE" ) );
119 buttonCancel->setAutoDefault( TRUE );
120 GroupButtonsLayout->addWidget( buttonCancel, 0, 3 );
121 buttonApply = new QPushButton( GroupButtons, "buttonApply" );
122 buttonApply->setText( tr( "SMESH_BUT_APPLY" ) );
123 buttonApply->setAutoDefault( TRUE );
124 GroupButtonsLayout->addWidget( buttonApply, 0, 1 );
125 QSpacerItem* spacer_9 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
126 GroupButtonsLayout->addItem( spacer_9, 0, 2 );
127 buttonOk = new QPushButton( GroupButtons, "buttonOk" );
128 buttonOk->setText( tr( "SMESH_BUT_OK" ) );
129 buttonOk->setAutoDefault( TRUE );
130 buttonOk->setDefault( TRUE );
131 GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
132 SMESHGUI_MergeNodesDlgLayout->addWidget( GroupButtons, 4, 0 );
134 /***************************************************************/
136 // Controls for mesh defining
137 GroupMesh = new QGroupBox( this, "GroupMesh" );
138 GroupMesh->setTitle( tr( "SMESH_MESH" ) );
139 GroupMesh->setColumnLayout(0, Qt::Vertical );
140 GroupMesh->layout()->setSpacing( 0 );
141 GroupMesh->layout()->setMargin( 0 );
142 GroupMeshLayout = new QGridLayout( GroupMesh->layout() );
143 GroupMeshLayout->setAlignment( Qt::AlignTop );
144 GroupMeshLayout->setSpacing( 6 );
145 GroupMeshLayout->setMargin( 11 );
147 TextLabelName = new QLabel( GroupMesh, "TextLabelName" );
148 TextLabelName->setText( tr( "SMESH_NAME" ) );
149 GroupMeshLayout->addWidget( TextLabelName, 0, 0 );
151 SelectMeshButton = new QPushButton( GroupMesh, "SelectMeshButton" );
152 SelectMeshButton->setPixmap( image1 );
153 GroupMeshLayout->addWidget( SelectMeshButton, 0, 1 );
155 LineEditMesh = new QLineEdit(GroupMesh, "LineEditMesh");
156 LineEditMesh->setReadOnly(true);
157 GroupMeshLayout->addWidget( LineEditMesh, 0, 2 );
159 SMESHGUI_MergeNodesDlgLayout->addWidget( GroupMesh, 1, 0 );
161 // Controls for coincident nodes detecting
162 GroupCoincident = new QGroupBox( this, "GroupCoincident" );
163 GroupCoincident->setTitle( tr( "COINCIDENT_NODES" ) );
164 GroupCoincident->setColumnLayout(0, Qt::Vertical );
165 GroupCoincident->layout()->setSpacing( 0 );
166 GroupCoincident->layout()->setMargin( 0 );
167 QGridLayout* GroupCoincidentLayout = new QGridLayout( GroupCoincident->layout() );
168 GroupCoincidentLayout->setAlignment( Qt::AlignTop );
169 GroupCoincidentLayout->setSpacing( 6 );
170 GroupCoincidentLayout->setMargin( 11 );
172 TextLabelTolerance = new QLabel( GroupCoincident, "TextLabelTolerance" );
173 TextLabelTolerance->setText( tr( "SMESH_TOLERANCE" ) );
174 GroupCoincidentLayout->addWidget( TextLabelTolerance, 0, 0 );
176 SpinBoxTolerance = new SMESHGUI_SpinBox( GroupCoincident, "SpinBoxTolerance" );
177 GroupCoincidentLayout->addWidget( SpinBoxTolerance, 0, 1 );
179 QPushButton* DetectButton = new QPushButton( GroupCoincident, "DetectButton" );
180 DetectButton->setText( tr("DETECT") );
181 GroupCoincidentLayout->addWidget( DetectButton, 0, 2 );
183 ListCoincident = new QListView( GroupCoincident );
184 ListCoincident->setSorting( -1 );
185 ListCoincident->addColumn( "Nodes" );
186 ListCoincident->header()->hide();
188 GroupCoincidentLayout->addMultiCellWidget( ListCoincident, 1, 1, 0, 1 );
190 SelectAllCB = new QCheckBox(GroupCoincident, "SelectAllCB");
191 SelectAllCB->setText(tr("SELECT_ALL"));
192 GroupCoincidentLayout->addWidget( SelectAllCB, 2, 0 );
194 SMESHGUI_MergeNodesDlgLayout->addWidget( GroupCoincident, 2, 0 );
196 // Controls for editing group of nodes
197 GroupEdit = new QGroupBox( this, "GroupEdit" );
198 GroupEdit->setTitle( tr( "EDIT_GROUP_OF_NODES" ) );
199 GroupEdit->setColumnLayout(0, Qt::Vertical );
200 GroupEdit->layout()->setSpacing( 0 );
201 GroupEdit->layout()->setMargin( 0 );
202 QGridLayout* GroupEditLayout = new QGridLayout( GroupEdit->layout() );
203 GroupEditLayout->setAlignment( Qt::AlignTop );
204 GroupEditLayout->setSpacing( 6 );
205 GroupEditLayout->setMargin( 11 );
207 ListEdit = new QListBox( GroupEdit, "ListEdit" );
208 ListEdit->setColumnMode(QListBox::FitToHeight);
209 ListEdit->setSelectionMode( QListBox::Extended );
210 GroupEditLayout->addMultiCellWidget( ListEdit, 0, 2, 0, 0 );
212 QPushButton* AddButton = new QPushButton( GroupEdit, "AddButton" );
213 AddButton->setText( tr("SMESH_BUT_ADD") );
214 GroupEditLayout->addWidget( AddButton, 0, 1 );
216 QPushButton* RemoveButton = new QPushButton( GroupEdit, "RemoveButton" );
217 RemoveButton->setText( tr("SMESH_BUT_REMOVE") );
218 GroupEditLayout->addWidget( RemoveButton, 1, 1 );
220 QSpacerItem* spacer = new QSpacerItem( 20, 200, QSizePolicy::Minimum, QSizePolicy::Expanding );
221 GroupEditLayout->addItem( spacer, 2, 1 );
223 SMESHGUI_MergeNodesDlgLayout->addWidget( GroupEdit, 3, 0 );
225 /* Initialisations */
226 SpinBoxTolerance->RangeStepAndValidator( 0.0, COORD_MAX, 0.1, 3 );
227 SpinBoxTolerance->SetValue(1e-05);
229 RadioButton1->setChecked( TRUE );
233 mySMESHGUI = SMESHGUI::GetSMESHGUI() ;
234 mySMESHGUI->SetActiveDialogBox( (QDialog*)this ) ;
236 myMeshOrSubMeshFilter = new SMESH_TypeFilter( MESHorSUBMESH );
238 /* signals and slots connections */
239 connect( buttonOk, SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
240 connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) );
241 connect( buttonApply, SIGNAL( clicked() ), this, SLOT(ClickOnApply() ) );
243 connect( SelectMeshButton, SIGNAL (clicked() ), this, SLOT( SetEditCurrentArgument() ) );
244 connect( DetectButton, SIGNAL ( clicked() ), this, SLOT( onDetect() ) );
245 connect( ListCoincident, SIGNAL ( selectionChanged() ), this, SLOT( onSelectNodesGroup() ) );
246 connect( ListCoincident, SIGNAL ( pressed( QListViewItem* ) ), this, SLOT( updateControls() ) );
247 connect( ListCoincident, SIGNAL ( currentChanged( QListViewItem* ) ), this, SLOT( updateControls() ) );
248 connect( SelectAllCB, SIGNAL( toggled(bool) ), this, SLOT(onSelectAll(bool) ) );
249 connect( ListEdit, SIGNAL ( selectionChanged() ), this, SLOT( onSelectNodesFromGroup() ) );
250 connect( AddButton, SIGNAL ( clicked() ), this, SLOT( onAdd() ) );
251 connect( RemoveButton, SIGNAL ( clicked() ), this, SLOT( onRemove() ) );
253 connect( mySMESHGUI, SIGNAL ( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
254 connect( mySelection, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
255 /* to close dialog if study change */
256 connect( mySMESHGUI, SIGNAL ( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
258 /* Move widget on the botton right corner of main widget */
260 mySMESHGUI->DefineDlgPosition( this, x, y ) ;
262 this->show() ; /* displays Dialog */
265 buttonOk->setEnabled(false);
266 buttonApply->setEnabled(false);
269 //=================================================================================
270 // function : ~SMESHGUI_MergeNodesDlg()
271 // purpose : Destroys the object and frees any allocated resources
272 //=================================================================================
273 SMESHGUI_MergeNodesDlg::~SMESHGUI_MergeNodesDlg()
275 // no need to delete child widgets, Qt does it all for us
279 //=================================================================================
280 // function : ClickOnApply()
282 //=================================================================================
283 bool SMESHGUI_MergeNodesDlg::ClickOnApply()
285 if (mySMESHGUI->ActiveStudyLocked() || myMesh->_is_nil())
290 SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
292 QApplication::setOverrideCursor(Qt::waitCursor);
293 SMESH::array_of_long_array_var aGroupsOfNodes = new SMESH::array_of_long_array;
294 aGroupsOfNodes->length(ListCoincident->childCount());
295 QListViewItem* item = ListCoincident->firstChild();
300 QStringList aListIds = QStringList("");
301 if (((QCheckListItem*) item)->isOn())
302 aListIds = QStringList::split( " ", item->text(0), false);
304 SMESH::long_array_var anIds = new SMESH::long_array;
305 anIds->length(aListIds.count());
307 for ( int i = 0; i < aListIds.count(); i++ )
308 anIds[i] = aListIds[i].toInt();
310 aGroupsOfNodes[anArrayNum++] = anIds.inout();
312 item = item->itemBelow();
315 aMeshEditor->MergeNodes (aGroupsOfNodes.inout());
316 QApplication::restoreOverrideCursor();
322 mySelection->ClearIObjects();
329 //=================================================================================
330 // function : ClickOnOk()
332 //=================================================================================
333 void SMESHGUI_MergeNodesDlg::ClickOnOk()
340 //=================================================================================
341 // function : ClickOnCancel()
343 //=================================================================================
344 void SMESHGUI_MergeNodesDlg::ClickOnCancel()
346 mySelection->ClearFilters();
347 mySelection->ClearIObjects();
348 SMESH::SetPointRepresentation(false);
349 QAD_Application::getDesktop()->SetSelectionMode( ActorSelection );
350 disconnect( mySelection, 0, this, 0 );
351 mySMESHGUI->ResetState() ;
356 //=================================================================================
357 // function : onEditNodesGroup()
359 //=================================================================================
360 void SMESHGUI_MergeNodesDlg::onEditNodesGroup()
362 if ( ListCoincident->childCount() < 1 )
365 QString aNewIds = "";
367 QListBoxItem* anItem;
368 for (anItem = ListEdit->firstItem(); anItem != 0; anItem = anItem->next())
369 aNewIds+=QString(" %1").arg(anItem->text());
371 ListCoincident->currentItem()->setText(0, aNewIds);
375 //=================================================================================
376 // function : updateControls()
378 //=================================================================================
379 void SMESHGUI_MergeNodesDlg::updateControls()
381 if ( ListCoincident->childCount() < 1 )
383 SMESH::SetPointRepresentation(false);
384 QAD_Application::getDesktop()->SetSelectionMode( ActorSelection );
388 bool hasChecked = false, hasUnchecked = false;
390 QListViewItem* item = ListCoincident->firstChild();
392 while (item && (!hasChecked || !hasUnchecked))
394 if (((QCheckListItem*) item)->isOn())
399 item = item->itemBelow();
403 SelectAllCB->setChecked(false);
405 bool enable = !(myMesh->_is_nil()) && hasChecked;
407 buttonOk->setEnabled(enable);
408 buttonApply->setEnabled(enable);
412 //=================================================================================
413 // function : onDetect()
415 //=================================================================================
416 void SMESHGUI_MergeNodesDlg::onDetect()
418 if(myMesh->_is_nil())
423 SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
425 QApplication::setOverrideCursor(Qt::waitCursor);
426 ListCoincident->clear();
429 SMESH::array_of_long_array_var aNodeGroups;
430 aMeshEditor->FindCoincidentNodes(SpinBoxTolerance->GetValue(), aNodeGroups);
432 for ( int i = 0; i < aNodeGroups->length(); i++ )
434 SMESH::long_array& aGroup = aNodeGroups[i];
437 for ( int j = 0; j < aGroup.length(); j++ )
438 aNodeIds+=QString(" %1").arg(aGroup[j]);
440 new QCheckListItem ( ListCoincident, aNodeIds, QCheckListItem::CheckBox );
442 QApplication::restoreOverrideCursor();
452 //=================================================================================
453 // function : onSelectNodesGroup()
455 //=================================================================================
456 void SMESHGUI_MergeNodesDlg::onSelectNodesGroup()
461 myEditCurrentArgument = (QWidget*)ListCoincident;
463 QListViewItem* aSelectedItem = ListCoincident->selectedItem();
467 QStringList aListId = QStringList::split( " ", aSelectedItem->text(0), false);
470 ListEdit->insertStringList(aListId);
472 mySelection->ClearIObjects();
473 mySelection->AddIObject( myActor->getIO() );
475 SMESH::SetPointRepresentation(true);
476 QAD_Application::getDesktop()->SetSelectionMode( NodeSelection, true );
478 ListEdit->selectAll(true);
482 //=================================================================================
483 // function : onSelectAll()
485 //=================================================================================
486 void SMESHGUI_MergeNodesDlg::onSelectAll(bool isToggled)
491 QListViewItem* item = ListCoincident->firstChild();
495 if (!((QCheckListItem*) item)->isOn())
496 ((QCheckListItem*) item)->setOn(true);
497 item = item->itemBelow();
502 buttonOk->setEnabled(true);
503 buttonApply->setEnabled(true);
509 //=================================================================================
510 // function : onSelectNodesFromGroup()
512 //=================================================================================
513 void SMESHGUI_MergeNodesDlg::onSelectNodesFromGroup()
518 mySelection->ClearIObjects();
520 TColStd_MapOfInteger aIndexes;
521 QListBoxItem* anItem;
522 for (anItem = ListEdit->firstItem(); anItem != 0; anItem = anItem->next()) {
523 if (anItem->isSelected()) {
524 int anId = anItem->text().toInt();
528 mySelection->AddOrRemoveIndex(myActor->getIO(), aIndexes, false, false);
529 mySelection->AddIObject(myActor->getIO());
533 //=================================================================================
534 // function : onAdd()
536 //=================================================================================
537 void SMESHGUI_MergeNodesDlg::onAdd()
542 QString aListStr = "";
545 aNbNnodes = SMESH::GetNameOfSelectedNodes(mySelection, myActor->getIO(), aListStr);
549 QStringList aNodes = QStringList::split(" ", aListStr);
550 QListBoxItem* anItem = 0;
552 for (QStringList::iterator it = aNodes.begin(); it != aNodes.end(); ++it) {
553 anItem = ListEdit->findItem(*it, Qt::ExactMatch);
555 anItem = new QListBoxText(*it);
556 ListEdit->insertItem(anItem);
558 ListEdit->setSelected(anItem, true);
565 //=================================================================================
566 // function : onRemove()
568 //=================================================================================
569 void SMESHGUI_MergeNodesDlg::onRemove()
571 if (myEditCurrentArgument != (QWidget*)ListCoincident)
574 for (int i = ListEdit->count(); i > 0; i--)
576 if (ListEdit->isSelected(i-1))
577 ListEdit->removeItem(i-1);
583 //=================================================================================
584 // function : SetEditCurrentArgument()
586 //=================================================================================
587 void SMESHGUI_MergeNodesDlg::SetEditCurrentArgument()
589 QPushButton* send = (QPushButton*)sender();
591 disconnect( mySelection, 0, this, 0 );
592 mySelection->ClearIObjects();
593 mySelection->ClearFilters();
595 if(send == SelectMeshButton)
597 myEditCurrentArgument = (QWidget*)LineEditMesh;
598 SMESH::SetPointRepresentation(false);
599 QAD_Application::getDesktop()->SetSelectionMode( ActorSelection );
600 mySelection->AddFilter(myMeshOrSubMeshFilter) ;
603 myEditCurrentArgument->setFocus();
604 connect( mySelection, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
605 SelectionIntoArgument() ;
609 //=================================================================================
610 // function : SelectionIntoArgument()
611 // purpose : Called when selection as changed or other case
612 //=================================================================================
613 void SMESHGUI_MergeNodesDlg::SelectionIntoArgument()
615 if (myEditCurrentArgument == (QWidget*)LineEditMesh)
617 QString aString = "";
618 LineEditMesh->setText( aString );
620 ListCoincident->clear();
623 int nbSel = SMESH::GetNameOfSelectedIObjects(mySelection, aString);
627 Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject();
628 myMesh = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(IO) ;
629 myActor = SMESH::FindActorByEntry( mySelection->firstIObject()->getEntry() );
630 if(myMesh->_is_nil() || !myActor)
633 LineEditMesh->setText( aString );
638 //=================================================================================
639 // function : DeactivateActiveDialog()
641 //=================================================================================
642 void SMESHGUI_MergeNodesDlg::DeactivateActiveDialog()
644 if ( GroupConstructors->isEnabled() ) {
645 GroupConstructors->setEnabled(false) ;
646 GroupMesh->setEnabled(false);
647 GroupCoincident->setEnabled(false);
648 GroupEdit->setEnabled(false);
649 GroupButtons->setEnabled(false) ;
650 mySMESHGUI->ResetState() ;
651 mySMESHGUI->SetActiveDialogBox(0) ;
656 //=================================================================================
657 // function : ActivateThisDialog()
659 //=================================================================================
660 void SMESHGUI_MergeNodesDlg::ActivateThisDialog()
662 /* Emit a signal to deactivate the active dialog */
663 mySMESHGUI->EmitSignalDeactivateDialog() ;
664 GroupConstructors->setEnabled(true) ;
665 GroupMesh->setEnabled(true);
666 GroupCoincident->setEnabled(true);
667 GroupEdit->setEnabled(true);
668 GroupButtons->setEnabled(true) ;
670 mySMESHGUI->SetActiveDialogBox( (QDialog*)this ) ;
672 SelectionIntoArgument();
676 //=================================================================================
677 // function : enterEvent()
679 //=================================================================================
680 void SMESHGUI_MergeNodesDlg::enterEvent(QEvent* e)
682 if ( GroupConstructors->isEnabled() )
684 ActivateThisDialog() ;
688 //=================================================================================
689 // function : closeEvent()
691 //=================================================================================
692 void SMESHGUI_MergeNodesDlg::closeEvent( QCloseEvent* e )
694 /* same than click on cancel button */
699 //=======================================================================
700 //function : hideEvent
701 //purpose : caused by ESC key
702 //=======================================================================
704 void SMESHGUI_MergeNodesDlg::hideEvent ( QHideEvent * e )
706 if ( !isMinimized() )