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 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SMESH_MERGE_NODES")));
87 QPixmap image1 (SMESHGUI::resourceMgr()->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 = SMESHGUI::GetSMESHGUI();
251 mySMESHGUI->SetActiveDialogBox((QDialog*)this);
253 myMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
255 /* signals and slots connections */
256 connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
257 connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
258 connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
260 connect(SelectMeshButton, SIGNAL (clicked()), this, SLOT(SetEditCurrentArgument()));
261 connect(DetectButton, SIGNAL (clicked()), this, SLOT(onDetect()));
262 connect(ListCoincident, SIGNAL (selectionChanged()), this, SLOT(onSelectNodesGroup()));
263 connect(ListCoincident, SIGNAL (pressed(QListViewItem*)), this, SLOT(updateControls()));
264 connect(ListCoincident, SIGNAL (currentChanged(QListViewItem*)), this, SLOT(updateControls()));
265 connect(SelectAllCB, SIGNAL(toggled(bool)), this, SLOT(onSelectAll(bool)));
266 connect(ListEdit, SIGNAL (selectionChanged()), this, SLOT(onSelectNodesFromGroup()));
267 connect(AddButton, SIGNAL (clicked()), this, SLOT(onAdd()));
268 connect(RemoveButton, SIGNAL (clicked()), this, SLOT(onRemove()));
270 connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
271 connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
272 /* to close dialog if study change */
273 connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
275 /* Move widget on the botton right corner of main widget */
277 mySMESHGUI->DefineDlgPosition(this, x, y);
279 this->show(); /* displays Dialog */
282 buttonOk->setEnabled(false);
283 buttonApply->setEnabled(false);
286 //=================================================================================
287 // function : ~SMESHGUI_MergeNodesDlg()
288 // purpose : Destroys the object and frees any allocated resources
289 //=================================================================================
290 SMESHGUI_MergeNodesDlg::~SMESHGUI_MergeNodesDlg()
292 // no need to delete child widgets, Qt does it all for us
295 //=================================================================================
296 // function : ClickOnApply()
298 //=================================================================================
299 bool SMESHGUI_MergeNodesDlg::ClickOnApply()
301 if (mySMESHGUI->isActiveStudyLocked() || myMesh->_is_nil())
305 SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
307 QApplication::setOverrideCursor(Qt::waitCursor);
308 SMESH::array_of_long_array_var aGroupsOfNodes = new SMESH::array_of_long_array;
309 aGroupsOfNodes->length(ListCoincident->childCount());
310 QListViewItem* item = ListCoincident->firstChild();
314 QStringList aListIds = QStringList("");
315 if (((QCheckListItem*) item)->isOn())
316 aListIds = QStringList::split(" ", item->text(0), false);
318 SMESH::long_array_var anIds = new SMESH::long_array;
319 anIds->length(aListIds.count());
321 for (int i = 0; i < aListIds.count(); i++)
322 anIds[i] = aListIds[i].toInt();
324 aGroupsOfNodes[anArrayNum++] = anIds.inout();
326 item = item->itemBelow();
329 aMeshEditor->MergeNodes (aGroupsOfNodes.inout());
330 QApplication::restoreOverrideCursor();
334 mySelectionMgr->clearSelected();
341 //=================================================================================
342 // function : ClickOnOk()
344 //=================================================================================
345 void SMESHGUI_MergeNodesDlg::ClickOnOk()
351 //=================================================================================
352 // function : ClickOnCancel()
354 //=================================================================================
355 void SMESHGUI_MergeNodesDlg::ClickOnCancel()
357 mySelectionMgr->clearFilters();
358 mySelectionMgr->clearSelected();
359 SMESH::SetPointRepresentation(false);
360 myViewWindow->SetSelectionMode(ActorSelection);
361 disconnect(mySelectionMgr, 0, this, 0);
362 mySMESHGUI->ResetState();
366 //=================================================================================
367 // function : onEditNodesGroup()
369 //=================================================================================
370 void SMESHGUI_MergeNodesDlg::onEditNodesGroup()
372 if (ListCoincident->childCount() < 1)
375 QString aNewIds = "";
377 QListBoxItem* anItem;
378 for (anItem = ListEdit->firstItem(); anItem != 0; anItem = anItem->next())
379 aNewIds+=QString(" %1").arg(anItem->text());
381 ListCoincident->currentItem()->setText(0, aNewIds);
384 //=================================================================================
385 // function : updateControls()
387 //=================================================================================
388 void SMESHGUI_MergeNodesDlg::updateControls()
390 if (ListCoincident->childCount() < 1) {
391 SMESH::SetPointRepresentation(false);
392 myViewWindow->SetSelectionMode(ActorSelection);
396 bool hasChecked = false, hasUnchecked = false;
398 QListViewItem* item = ListCoincident->firstChild();
400 while (item && (!hasChecked || !hasUnchecked)) {
401 if (((QCheckListItem*) item)->isOn())
406 item = item->itemBelow();
410 SelectAllCB->setChecked(false);
412 bool enable = !(myMesh->_is_nil()) && hasChecked;
414 buttonOk->setEnabled(enable);
415 buttonApply->setEnabled(enable);
418 //=================================================================================
419 // function : onDetect()
421 //=================================================================================
422 void SMESHGUI_MergeNodesDlg::onDetect()
424 if (myMesh->_is_nil())
428 SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
430 QApplication::setOverrideCursor(Qt::waitCursor);
431 ListCoincident->clear();
434 SMESH::array_of_long_array_var aNodeGroups;
435 aMeshEditor->FindCoincidentNodes(SpinBoxTolerance->GetValue(), aNodeGroups);
437 for (int i = 0; i < aNodeGroups->length(); i++) {
438 SMESH::long_array& aGroup = aNodeGroups[i];
441 for (int j = 0; j < aGroup.length(); j++)
442 aNodeIds+=QString(" %1").arg(aGroup[j]);
444 new QCheckListItem (ListCoincident, aNodeIds, QCheckListItem::CheckBox);
446 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 //mySelectionMgr->clearSelected();
474 //mySelectionMgr->AddIObject(myActor->getIO());
476 aList.Append(myActor->getIO());
477 mySelectionMgr->setSelectedObjects(aList, false);
479 SMESH::SetPointRepresentation(true);
480 myViewWindow->SetSelectionMode(NodeSelection);
482 ListEdit->selectAll(true);
485 //=================================================================================
486 // function : onSelectAll()
488 //=================================================================================
489 void SMESHGUI_MergeNodesDlg::onSelectAll (bool isToggled)
493 QListViewItem* item = ListCoincident->firstChild();
496 if (!((QCheckListItem*) item)->isOn())
497 ((QCheckListItem*) item)->setOn(true);
498 item = item->itemBelow();
502 buttonOk->setEnabled(true);
503 buttonApply->setEnabled(true);
508 //=================================================================================
509 // function : onSelectNodesFromGroup()
511 //=================================================================================
512 void SMESHGUI_MergeNodesDlg::onSelectNodesFromGroup()
517 TColStd_MapOfInteger aIndexes;
518 QListBoxItem* anItem;
519 for (anItem = ListEdit->firstItem(); anItem != 0; anItem = anItem->next()) {
520 if (anItem->isSelected()) {
521 int anId = anItem->text().toInt();
526 mySelector->AddOrRemoveIndex(myActor->getIO(), aIndexes, false);
528 aList.Append(myActor->getIO());
529 mySelectionMgr->setSelectedObjects(aList);
532 //=================================================================================
533 // function : onAdd()
535 //=================================================================================
536 void SMESHGUI_MergeNodesDlg::onAdd()
541 QString aListStr = "";
544 aNbNnodes = SMESH::GetNameOfSelectedNodes(mySelector, 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);
563 //=================================================================================
564 // function : onRemove()
566 //=================================================================================
567 void SMESHGUI_MergeNodesDlg::onRemove()
569 if (myEditCurrentArgument != (QWidget*)ListCoincident)
572 for (int i = ListEdit->count(); i > 0; i--) {
573 if (ListEdit->isSelected(i-1))
574 ListEdit->removeItem(i-1);
579 //=================================================================================
580 // function : SetEditCurrentArgument()
582 //=================================================================================
583 void SMESHGUI_MergeNodesDlg::SetEditCurrentArgument()
585 QPushButton* send = (QPushButton*)sender();
587 disconnect(mySelectionMgr, 0, this, 0);
588 mySelectionMgr->clearSelected();
589 mySelectionMgr->clearFilters();
591 if (send == SelectMeshButton) {
592 myEditCurrentArgument = (QWidget*)LineEditMesh;
593 SMESH::SetPointRepresentation(false);
594 myViewWindow->SetSelectionMode(ActorSelection);
595 mySelectionMgr->installFilter(myMeshOrSubMeshFilter);
598 myEditCurrentArgument->setFocus();
599 connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
600 SelectionIntoArgument();
603 //=================================================================================
604 // function : SelectionIntoArgument()
605 // purpose : Called when selection as changed or other case
606 //=================================================================================
607 void SMESHGUI_MergeNodesDlg::SelectionIntoArgument()
609 if (myEditCurrentArgument == (QWidget*)LineEditMesh) {
610 QString aString = "";
611 LineEditMesh->setText(aString);
613 ListCoincident->clear();
616 int nbSel = SMESH::GetNameOfSelectedIObjects(mySelectionMgr, aString);
621 mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type());
623 Handle(SALOME_InteractiveObject) IO = aList.First();
624 myMesh = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(IO);
625 myActor = SMESH::FindActorByEntry(aList.First()->getEntry());
626 if (myMesh->_is_nil() || !myActor)
629 LineEditMesh->setText(aString);
633 //=================================================================================
634 // function : DeactivateActiveDialog()
636 //=================================================================================
637 void SMESHGUI_MergeNodesDlg::DeactivateActiveDialog()
639 if (GroupConstructors->isEnabled()) {
640 GroupConstructors->setEnabled(false);
641 GroupMesh->setEnabled(false);
642 GroupCoincident->setEnabled(false);
643 GroupEdit->setEnabled(false);
644 GroupButtons->setEnabled(false);
645 mySMESHGUI->ResetState();
646 mySMESHGUI->SetActiveDialogBox(0);
650 //=================================================================================
651 // function : ActivateThisDialog()
653 //=================================================================================
654 void SMESHGUI_MergeNodesDlg::ActivateThisDialog()
656 /* Emit a signal to deactivate the active dialog */
657 mySMESHGUI->EmitSignalDeactivateDialog();
658 GroupConstructors->setEnabled(true);
659 GroupMesh->setEnabled(true);
660 GroupCoincident->setEnabled(true);
661 GroupEdit->setEnabled(true);
662 GroupButtons->setEnabled(true);
664 mySMESHGUI->SetActiveDialogBox((QDialog*)this);
666 SelectionIntoArgument();
669 //=================================================================================
670 // function : enterEvent()
672 //=================================================================================
673 void SMESHGUI_MergeNodesDlg::enterEvent (QEvent*)
675 if (!GroupConstructors->isEnabled())
676 ActivateThisDialog();
679 //=================================================================================
680 // function : closeEvent()
682 //=================================================================================
683 void SMESHGUI_MergeNodesDlg::closeEvent (QCloseEvent*)
685 /* same than click on cancel button */
689 //=======================================================================
690 //function : hideEvent()
691 //purpose : caused by ESC key
692 //=======================================================================
693 void SMESHGUI_MergeNodesDlg::hideEvent (QHideEvent*)