X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_BuildCompoundDlg.cxx;h=0e1b3f250518aef07a804254c1495f712841a424;hb=62c4337c5becb0add8bff676b465f70cc5f4e513;hp=54171c5a0589d7f1d26334bf6327a837d78af11b;hpb=cb9918baacd5569e2fea9a63d804906656fc785d;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx b/src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx index 54171c5a0..0e1b3f250 100644 --- a/src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx @@ -1,29 +1,29 @@ -// SMESH SMESHGUI : GUI for SMESH component +// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. // -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// SMESH SMESHGUI : GUI for SMESH component // File : SMESHGUI_BuildCompoundDlg.cxx // Author : Alexander KOVALEV, Open CASCADE S.A.S. -// - // SMESH includes +// #include "SMESHGUI_BuildCompoundDlg.h" #include "SMESHGUI.h" @@ -39,6 +39,8 @@ #include #include #include +#include + #include #include #include @@ -121,12 +123,15 @@ SMESHGUI_BuildCompoundDlg::SMESHGUI_BuildCompoundDlg( SMESHGUI* theModule ) TextLabelMeshes = new QLabel(tr("MESHES"), GroupArgs); SelectButton = new QPushButton(GroupArgs); SelectButton->setIcon(image1); + SelectButton->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); LineEditMeshes = new QLineEdit(GroupArgs); LineEditMeshes->setReadOnly(true); TextLabelUnion = new QLabel(tr("PROCESSING_IDENTICAL_GROUPS"), GroupArgs); ComboBoxUnion = new QComboBox(GroupArgs); + CheckBoxCommon = new QCheckBox(tr("CREATE_COMMON_GROUPS"), GroupArgs); + CheckBoxMerge = new QCheckBox(tr("MERGE_NODES_AND_ELEMENTS"), GroupArgs); TextLabelTol = new QLabel(tr("SMESH_TOLERANCE"), GroupArgs); @@ -139,9 +144,10 @@ SMESHGUI_BuildCompoundDlg::SMESHGUI_BuildCompoundDlg( SMESHGUI* theModule ) GroupArgsLayout->addWidget(LineEditMeshes, 0, 2, 1, 2); GroupArgsLayout->addWidget(TextLabelUnion, 1, 0, 1, 3); GroupArgsLayout->addWidget(ComboBoxUnion, 1, 3); - GroupArgsLayout->addWidget(CheckBoxMerge, 2, 0, 1, 4); - GroupArgsLayout->addWidget(TextLabelTol, 3, 0, 1, 2); - GroupArgsLayout->addWidget(SpinBoxTol, 3, 2, 1, 2); + GroupArgsLayout->addWidget(CheckBoxCommon, 2, 0, 1, 4); + GroupArgsLayout->addWidget(CheckBoxMerge, 3, 0, 1, 4); + GroupArgsLayout->addWidget(TextLabelTol, 4, 0, 1, 2); + GroupArgsLayout->addWidget(SpinBoxTol, 4, 2, 1, 2); /***************************************************************/ GroupButtons = new QGroupBox(this); @@ -149,7 +155,7 @@ SMESHGUI_BuildCompoundDlg::SMESHGUI_BuildCompoundDlg( SMESHGUI* theModule ) GroupButtonsLayout->setSpacing(SPACING); GroupButtonsLayout->setMargin(MARGIN); - buttonOk = new QPushButton(tr("SMESH_BUT_OK"), GroupButtons); + buttonOk = new QPushButton(tr("SMESH_BUT_APPLY_AND_CLOSE"), GroupButtons); buttonOk->setAutoDefault(true); buttonOk->setDefault(true); buttonApply = new QPushButton(tr("SMESH_BUT_APPLY"), GroupButtons); @@ -281,18 +287,23 @@ bool SMESHGUI_BuildCompoundDlg::ClickOnApply() return false; if (!myMesh->_is_nil()) { try { - QApplication::setOverrideCursor(Qt::WaitCursor); - + SUIT_OverrideCursor aWaitCursor; + SMESH::SMESH_Gen_var aSMESHGen = SMESHGUI::GetSMESHGen(); // concatenate meshes - SMESH::SMESH_Mesh_var aCompoundMesh = - aSMESHGen->Concatenate(myMeshArray, - !(ComboBoxUnion->currentIndex()), - CheckBoxMerge->isChecked(), - SpinBoxTol->GetValue()); - + SMESH::SMESH_Mesh_var aCompoundMesh; + if(CheckBoxCommon->isChecked()) + aCompoundMesh = aSMESHGen->ConcatenateWithGroups(myMeshArray, + !(ComboBoxUnion->currentIndex()), + CheckBoxMerge->isChecked(), + SpinBoxTol->GetValue()); + else + aCompoundMesh = aSMESHGen->Concatenate(myMeshArray, + !(ComboBoxUnion->currentIndex()), + CheckBoxMerge->isChecked(), + SpinBoxTol->GetValue()); + SMESH::SetName( SMESH::FindSObject( aCompoundMesh ), LineEditName->text() ); - QApplication::restoreOverrideCursor(); mySMESHGUI->updateObjBrowser(); } catch(...) { return false;