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 "SMESH_TypeFilter.hxx"
39 #include "SMDS_Mesh.hxx"
43 #include "SUIT_ResourceMgr.h"
45 #include "SVTK_ViewModel.h"
46 #include "SVTK_ViewWindow.h"
47 #include "SVTK_Selector.h"
48 #include "SVTK_Selection.h"
49 #include "SALOME_ListIO.hxx"
51 #include "utilities.h"
54 #include <TColStd_MapOfInteger.hxx>
57 #include <qapplication.h>
58 #include <qbuttongroup.h>
59 #include <qgroupbox.h>
61 #include <qlineedit.h>
63 #include <qlistview.h>
64 #include <qpushbutton.h>
65 #include <qradiobutton.h>
66 #include <qcheckbox.h>
73 //=================================================================================
74 // class : SMESHGUI_MergeNodesDlg()
76 //=================================================================================
77 SMESHGUI_MergeNodesDlg::SMESHGUI_MergeNodesDlg( SMESHGUI* theModule, const char* name,
78 bool modal, WFlags fl)
79 : QDialog( SMESH::GetDesktop( theModule ), name, modal, WStyle_Customize | WStyle_NormalBorder |
80 WStyle_Title | WStyle_SysMenu | Qt::WDestructiveClose),
81 mySMESHGUI( theModule ),
82 mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
83 myViewWindow( SMESH::GetViewWindow( theModule ) ),
84 mySelector( myViewWindow->GetSelector() )
86 QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SMESH_MERGE_NODES")));
87 QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
90 setName("SMESHGUI_MergeNodesDlg");
92 setCaption(tr("SMESH_MERGE_NODES"));
93 setSizeGripEnabled(TRUE);
94 SMESHGUI_MergeNodesDlgLayout = new QGridLayout(this);
95 SMESHGUI_MergeNodesDlgLayout->setSpacing(6);
96 SMESHGUI_MergeNodesDlgLayout->setMargin(11);
98 /***************************************************************/
99 GroupConstructors = new QButtonGroup(this, "GroupConstructors");
100 GroupConstructors->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)5,
101 (QSizePolicy::SizeType)0, 0, 0,
102 GroupConstructors->sizePolicy().hasHeightForWidth()));
103 GroupConstructors->setTitle(tr("SMESH_MERGE_NODES" ));
104 GroupConstructors->setExclusive(TRUE);
105 GroupConstructors->setColumnLayout(0, Qt::Vertical);
106 GroupConstructors->layout()->setSpacing(0);
107 GroupConstructors->layout()->setMargin(0);
108 GroupConstructorsLayout = new QGridLayout(GroupConstructors->layout());
109 GroupConstructorsLayout->setAlignment(Qt::AlignTop);
110 GroupConstructorsLayout->setSpacing(6);
111 GroupConstructorsLayout->setMargin(11);
112 QHBoxLayout* RBLayout = new QHBoxLayout(0, 0, 6, "Layout2");
113 RadioButton1= new QRadioButton(GroupConstructors, "RadioButton1");
114 RadioButton1->setText(tr("" ));
115 RadioButton1->setPixmap(image0);
116 RBLayout->addWidget(RadioButton1);
117 GroupConstructorsLayout->addLayout(RBLayout, 0, 0);
118 SMESHGUI_MergeNodesDlgLayout->addWidget(GroupConstructors, 0, 0);
120 /***************************************************************/
121 GroupButtons = new QGroupBox(this, "GroupButtons");
122 GroupButtons->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)7,
123 (QSizePolicy::SizeType)0, 0, 0,
124 GroupButtons->sizePolicy().hasHeightForWidth()));
125 GroupButtons->setGeometry(QRect(10, 10, 281, 48));
126 GroupButtons->setTitle(tr("" ));
127 GroupButtons->setColumnLayout(0, Qt::Vertical);
128 GroupButtons->layout()->setSpacing(0);
129 GroupButtons->layout()->setMargin(0);
130 GroupButtonsLayout = new QGridLayout(GroupButtons->layout());
131 GroupButtonsLayout->setAlignment(Qt::AlignTop);
132 GroupButtonsLayout->setSpacing(6);
133 GroupButtonsLayout->setMargin(11);
134 buttonCancel = new QPushButton(GroupButtons, "buttonCancel");
135 buttonCancel->setText(tr("SMESH_BUT_CLOSE" ));
136 buttonCancel->setAutoDefault(TRUE);
137 GroupButtonsLayout->addWidget(buttonCancel, 0, 3);
138 buttonApply = new QPushButton(GroupButtons, "buttonApply");
139 buttonApply->setText(tr("SMESH_BUT_APPLY" ));
140 buttonApply->setAutoDefault(TRUE);
141 GroupButtonsLayout->addWidget(buttonApply, 0, 1);
142 QSpacerItem* spacer_9 = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
143 GroupButtonsLayout->addItem(spacer_9, 0, 2);
144 buttonOk = new QPushButton(GroupButtons, "buttonOk");
145 buttonOk->setText(tr("SMESH_BUT_OK" ));
146 buttonOk->setAutoDefault(TRUE);
147 buttonOk->setDefault(TRUE);
148 GroupButtonsLayout->addWidget(buttonOk, 0, 0);
149 SMESHGUI_MergeNodesDlgLayout->addWidget(GroupButtons, 4, 0);
151 /***************************************************************/
153 // Controls for mesh defining
154 GroupMesh = new QGroupBox(this, "GroupMesh");
155 GroupMesh->setTitle(tr("SMESH_MESH"));
156 GroupMesh->setColumnLayout(0, Qt::Vertical);
157 GroupMesh->layout()->setSpacing(0);
158 GroupMesh->layout()->setMargin(0);
159 GroupMeshLayout = new QGridLayout(GroupMesh->layout());
160 GroupMeshLayout->setAlignment(Qt::AlignTop);
161 GroupMeshLayout->setSpacing(6);
162 GroupMeshLayout->setMargin(11);
164 TextLabelName = new QLabel(GroupMesh, "TextLabelName");
165 TextLabelName->setText(tr("SMESH_NAME"));
166 GroupMeshLayout->addWidget(TextLabelName, 0, 0);
168 SelectMeshButton = new QPushButton(GroupMesh, "SelectMeshButton");
169 SelectMeshButton->setPixmap(image1);
170 GroupMeshLayout->addWidget(SelectMeshButton, 0, 1);
172 LineEditMesh = new QLineEdit(GroupMesh, "LineEditMesh");
173 LineEditMesh->setReadOnly(true);
174 GroupMeshLayout->addWidget(LineEditMesh, 0, 2);
176 SMESHGUI_MergeNodesDlgLayout->addWidget(GroupMesh, 1, 0);
178 // Controls for coincident nodes detecting
179 GroupCoincident = new QGroupBox(this, "GroupCoincident");
180 GroupCoincident->setTitle(tr("COINCIDENT_NODES"));
181 GroupCoincident->setColumnLayout(0, Qt::Vertical);
182 GroupCoincident->layout()->setSpacing(0);
183 GroupCoincident->layout()->setMargin(0);
184 QGridLayout* GroupCoincidentLayout = new QGridLayout(GroupCoincident->layout());
185 GroupCoincidentLayout->setAlignment(Qt::AlignTop);
186 GroupCoincidentLayout->setSpacing(6);
187 GroupCoincidentLayout->setMargin(11);
189 TextLabelTolerance = new QLabel(GroupCoincident, "TextLabelTolerance");
190 TextLabelTolerance->setText(tr("SMESH_TOLERANCE"));
191 GroupCoincidentLayout->addWidget(TextLabelTolerance, 0, 0);
193 SpinBoxTolerance = new SMESHGUI_SpinBox(GroupCoincident, "SpinBoxTolerance");
194 GroupCoincidentLayout->addWidget(SpinBoxTolerance, 0, 1);
196 QPushButton* DetectButton = new QPushButton(GroupCoincident, "DetectButton");
197 DetectButton->setText(tr("DETECT"));
198 GroupCoincidentLayout->addWidget(DetectButton, 0, 2);
200 ListCoincident = new QListView(GroupCoincident);
201 ListCoincident->setSorting(-1);
202 ListCoincident->addColumn("Nodes");
203 ListCoincident->header()->hide();
205 GroupCoincidentLayout->addMultiCellWidget(ListCoincident, 1, 1, 0, 1);
207 SelectAllCB = new QCheckBox(GroupCoincident, "SelectAllCB");
208 SelectAllCB->setText(tr("SELECT_ALL"));
209 GroupCoincidentLayout->addWidget(SelectAllCB, 2, 0);
211 SMESHGUI_MergeNodesDlgLayout->addWidget(GroupCoincident, 2, 0);
213 // Controls for editing group of nodes
214 GroupEdit = new QGroupBox(this, "GroupEdit");
215 GroupEdit->setTitle(tr("EDIT_GROUP_OF_NODES"));
216 GroupEdit->setColumnLayout(0, Qt::Vertical);
217 GroupEdit->layout()->setSpacing(0);
218 GroupEdit->layout()->setMargin(0);
219 QGridLayout* GroupEditLayout = new QGridLayout(GroupEdit->layout());
220 GroupEditLayout->setAlignment(Qt::AlignTop);
221 GroupEditLayout->setSpacing(6);
222 GroupEditLayout->setMargin(11);
224 ListEdit = new QListBox(GroupEdit, "ListEdit");
225 ListEdit->setColumnMode(QListBox::FitToHeight);
226 ListEdit->setSelectionMode(QListBox::Extended);
227 GroupEditLayout->addMultiCellWidget(ListEdit, 0, 2, 0, 0);
229 QPushButton* AddButton = new QPushButton(GroupEdit, "AddButton");
230 AddButton->setText(tr("SMESH_BUT_ADD"));
231 GroupEditLayout->addWidget(AddButton, 0, 1);
233 QPushButton* RemoveButton = new QPushButton(GroupEdit, "RemoveButton");
234 RemoveButton->setText(tr("SMESH_BUT_REMOVE"));
235 GroupEditLayout->addWidget(RemoveButton, 1, 1);
237 QSpacerItem* spacer = new QSpacerItem(20, 200, QSizePolicy::Minimum, QSizePolicy::Expanding);
238 GroupEditLayout->addItem(spacer, 2, 1);
240 SMESHGUI_MergeNodesDlgLayout->addWidget(GroupEdit, 3, 0);
242 /* Initialisations */
243 SpinBoxTolerance->RangeStepAndValidator(0.0, 999999.999, 0.1, 3);
244 SpinBoxTolerance->SetValue(1e-05);
246 RadioButton1->setChecked(TRUE);
250 mySMESHGUI->SetActiveDialogBox((QDialog*)this);
252 myMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
254 /* signals and slots connections */
255 connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
256 connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
257 connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
259 connect(SelectMeshButton, SIGNAL (clicked()), this, SLOT(SetEditCurrentArgument()));
260 connect(DetectButton, SIGNAL (clicked()), this, SLOT(onDetect()));
261 connect(ListCoincident, SIGNAL (selectionChanged()), this, SLOT(onSelectNodesGroup()));
262 connect(ListCoincident, SIGNAL (pressed(QListViewItem*)), this, SLOT(updateControls()));
263 connect(ListCoincident, SIGNAL (currentChanged(QListViewItem*)), this, SLOT(updateControls()));
264 connect(SelectAllCB, SIGNAL(toggled(bool)), this, SLOT(onSelectAll(bool)));
265 connect(ListEdit, SIGNAL (selectionChanged()), this, SLOT(onSelectNodesFromGroup()));
266 connect(AddButton, SIGNAL (clicked()), this, SLOT(onAdd()));
267 connect(RemoveButton, SIGNAL (clicked()), this, SLOT(onRemove()));
269 connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
270 connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
271 /* to close dialog if study change */
272 connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
274 /* Move widget on the botton right corner of main widget */
276 mySMESHGUI->DefineDlgPosition(this, x, y);
278 this->show(); /* displays Dialog */
281 buttonOk->setEnabled(false);
282 buttonApply->setEnabled(false);
285 //=================================================================================
286 // function : ~SMESHGUI_MergeNodesDlg()
287 // purpose : Destroys the object and frees any allocated resources
288 //=================================================================================
289 SMESHGUI_MergeNodesDlg::~SMESHGUI_MergeNodesDlg()
291 // no need to delete child widgets, Qt does it all for us
294 //=================================================================================
295 // function : ClickOnApply()
297 //=================================================================================
298 bool SMESHGUI_MergeNodesDlg::ClickOnApply()
300 if (mySMESHGUI->isActiveStudyLocked() || myMesh->_is_nil())
304 SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
306 QApplication::setOverrideCursor(Qt::waitCursor);
307 SMESH::array_of_long_array_var aGroupsOfNodes = new SMESH::array_of_long_array;
308 aGroupsOfNodes->length(ListCoincident->childCount());
309 QListViewItem* item = ListCoincident->firstChild();
313 QStringList aListIds = QStringList("");
314 if (((QCheckListItem*) item)->isOn())
315 aListIds = QStringList::split(" ", item->text(0), false);
317 SMESH::long_array_var anIds = new SMESH::long_array;
318 anIds->length(aListIds.count());
320 for (int i = 0; i < aListIds.count(); i++)
321 anIds[i] = aListIds[i].toInt();
323 aGroupsOfNodes[anArrayNum++] = anIds.inout();
325 item = item->itemBelow();
328 aMeshEditor->MergeNodes (aGroupsOfNodes.inout());
329 QApplication::restoreOverrideCursor();
333 mySelectionMgr->clearSelected();
340 //=================================================================================
341 // function : ClickOnOk()
343 //=================================================================================
344 void SMESHGUI_MergeNodesDlg::ClickOnOk()
350 //=================================================================================
351 // function : ClickOnCancel()
353 //=================================================================================
354 void SMESHGUI_MergeNodesDlg::ClickOnCancel()
356 mySelectionMgr->clearFilters();
357 mySelectionMgr->clearSelected();
358 SMESH::SetPointRepresentation(false);
359 myViewWindow->SetSelectionMode(ActorSelection);
360 disconnect(mySelectionMgr, 0, this, 0);
361 mySMESHGUI->ResetState();
365 //=================================================================================
366 // function : onEditNodesGroup()
368 //=================================================================================
369 void SMESHGUI_MergeNodesDlg::onEditNodesGroup()
371 if (ListCoincident->childCount() < 1)
374 QString aNewIds = "";
376 QListBoxItem* anItem;
377 for (anItem = ListEdit->firstItem(); anItem != 0; anItem = anItem->next())
378 aNewIds+=QString(" %1").arg(anItem->text());
380 ListCoincident->currentItem()->setText(0, aNewIds);
383 //=================================================================================
384 // function : updateControls()
386 //=================================================================================
387 void SMESHGUI_MergeNodesDlg::updateControls()
389 if (ListCoincident->childCount() < 1) {
390 SMESH::SetPointRepresentation(false);
391 myViewWindow->SetSelectionMode(ActorSelection);
395 bool hasChecked = false, hasUnchecked = false;
397 QListViewItem* item = ListCoincident->firstChild();
399 while (item && (!hasChecked || !hasUnchecked)) {
400 if (((QCheckListItem*) item)->isOn())
405 item = item->itemBelow();
409 SelectAllCB->setChecked(false);
411 bool enable = !(myMesh->_is_nil()) && hasChecked;
413 buttonOk->setEnabled(enable);
414 buttonApply->setEnabled(enable);
417 //=================================================================================
418 // function : onDetect()
420 //=================================================================================
421 void SMESHGUI_MergeNodesDlg::onDetect()
423 if (myMesh->_is_nil())
427 SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
429 QApplication::setOverrideCursor(Qt::waitCursor);
430 ListCoincident->clear();
433 SMESH::array_of_long_array_var aNodeGroups;
434 aMeshEditor->FindCoincidentNodes(SpinBoxTolerance->GetValue(), aNodeGroups);
436 for (int i = 0; i < aNodeGroups->length(); i++) {
437 SMESH::long_array& aGroup = aNodeGroups[i];
440 for (int j = 0; j < aGroup.length(); j++)
441 aNodeIds+=QString(" %1").arg(aGroup[j]);
443 new QCheckListItem (ListCoincident, aNodeIds, QCheckListItem::CheckBox);
445 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 //mySelectionMgr->clearSelected();
473 //mySelectionMgr->AddIObject(myActor->getIO());
475 aList.Append(myActor->getIO());
476 mySelectionMgr->setSelectedObjects(aList, false);
478 SMESH::SetPointRepresentation(true);
479 myViewWindow->SetSelectionMode(NodeSelection);
481 ListEdit->selectAll(true);
484 //=================================================================================
485 // function : onSelectAll()
487 //=================================================================================
488 void SMESHGUI_MergeNodesDlg::onSelectAll (bool isToggled)
492 QListViewItem* item = ListCoincident->firstChild();
495 if (!((QCheckListItem*) item)->isOn())
496 ((QCheckListItem*) item)->setOn(true);
497 item = item->itemBelow();
501 buttonOk->setEnabled(true);
502 buttonApply->setEnabled(true);
507 //=================================================================================
508 // function : onSelectNodesFromGroup()
510 //=================================================================================
511 void SMESHGUI_MergeNodesDlg::onSelectNodesFromGroup()
516 TColStd_MapOfInteger aIndexes;
517 QListBoxItem* anItem;
518 for (anItem = ListEdit->firstItem(); anItem != 0; anItem = anItem->next()) {
519 if (anItem->isSelected()) {
520 int anId = anItem->text().toInt();
525 mySelector->AddOrRemoveIndex(myActor->getIO(), aIndexes, false);
527 aList.Append(myActor->getIO());
528 mySelectionMgr->setSelectedObjects(aList);
531 //=================================================================================
532 // function : onAdd()
534 //=================================================================================
535 void SMESHGUI_MergeNodesDlg::onAdd()
540 QString aListStr = "";
543 aNbNnodes = SMESH::GetNameOfSelectedNodes(mySelector, myActor->getIO(), aListStr);
547 QStringList aNodes = QStringList::split(" ", aListStr);
548 QListBoxItem* anItem = 0;
550 for (QStringList::iterator it = aNodes.begin(); it != aNodes.end(); ++it) {
551 anItem = ListEdit->findItem(*it, Qt::ExactMatch);
553 anItem = new QListBoxText(*it);
554 ListEdit->insertItem(anItem);
556 ListEdit->setSelected(anItem, true);
562 //=================================================================================
563 // function : onRemove()
565 //=================================================================================
566 void SMESHGUI_MergeNodesDlg::onRemove()
568 if (myEditCurrentArgument != (QWidget*)ListCoincident)
571 for (int i = ListEdit->count(); i > 0; i--) {
572 if (ListEdit->isSelected(i-1))
573 ListEdit->removeItem(i-1);
578 //=================================================================================
579 // function : SetEditCurrentArgument()
581 //=================================================================================
582 void SMESHGUI_MergeNodesDlg::SetEditCurrentArgument()
584 QPushButton* send = (QPushButton*)sender();
586 disconnect(mySelectionMgr, 0, this, 0);
587 mySelectionMgr->clearSelected();
588 mySelectionMgr->clearFilters();
590 if (send == SelectMeshButton) {
591 myEditCurrentArgument = (QWidget*)LineEditMesh;
592 SMESH::SetPointRepresentation(false);
593 myViewWindow->SetSelectionMode(ActorSelection);
594 mySelectionMgr->installFilter(myMeshOrSubMeshFilter);
597 myEditCurrentArgument->setFocus();
598 connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
599 SelectionIntoArgument();
602 //=================================================================================
603 // function : SelectionIntoArgument()
604 // purpose : Called when selection as changed or other case
605 //=================================================================================
606 void SMESHGUI_MergeNodesDlg::SelectionIntoArgument()
608 if (myEditCurrentArgument == (QWidget*)LineEditMesh) {
609 QString aString = "";
610 LineEditMesh->setText(aString);
612 ListCoincident->clear();
615 int nbSel = SMESH::GetNameOfSelectedIObjects(mySelectionMgr, aString);
620 mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type());
622 Handle(SALOME_InteractiveObject) IO = aList.First();
623 myMesh = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(IO);
624 myActor = SMESH::FindActorByEntry(aList.First()->getEntry());
625 if (myMesh->_is_nil() || !myActor)
628 LineEditMesh->setText(aString);
632 //=================================================================================
633 // function : DeactivateActiveDialog()
635 //=================================================================================
636 void SMESHGUI_MergeNodesDlg::DeactivateActiveDialog()
638 if (GroupConstructors->isEnabled()) {
639 GroupConstructors->setEnabled(false);
640 GroupMesh->setEnabled(false);
641 GroupCoincident->setEnabled(false);
642 GroupEdit->setEnabled(false);
643 GroupButtons->setEnabled(false);
644 mySMESHGUI->ResetState();
645 mySMESHGUI->SetActiveDialogBox(0);
649 //=================================================================================
650 // function : ActivateThisDialog()
652 //=================================================================================
653 void SMESHGUI_MergeNodesDlg::ActivateThisDialog()
655 /* Emit a signal to deactivate the active dialog */
656 mySMESHGUI->EmitSignalDeactivateDialog();
657 GroupConstructors->setEnabled(true);
658 GroupMesh->setEnabled(true);
659 GroupCoincident->setEnabled(true);
660 GroupEdit->setEnabled(true);
661 GroupButtons->setEnabled(true);
663 mySMESHGUI->SetActiveDialogBox((QDialog*)this);
665 SelectionIntoArgument();
668 //=================================================================================
669 // function : enterEvent()
671 //=================================================================================
672 void SMESHGUI_MergeNodesDlg::enterEvent (QEvent*)
674 if (!GroupConstructors->isEnabled())
675 ActivateThisDialog();
678 //=================================================================================
679 // function : closeEvent()
681 //=================================================================================
682 void SMESHGUI_MergeNodesDlg::closeEvent (QCloseEvent*)
684 /* same than click on cancel button */
688 //=======================================================================
689 //function : hideEvent()
690 //purpose : caused by ESC key
691 //=======================================================================
692 void SMESHGUI_MergeNodesDlg::hideEvent (QHideEvent*)