Back to index

salome-smesh  6.5.0
SMESHGUI_BuildCompoundDlg.cxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 //  File   : SMESHGUI_BuildCompoundDlg.cxx
00023 //  Author : Alexander KOVALEV, Open CASCADE S.A.S.
00024 //  SMESH includes
00025 
00026 #include "SMESHGUI_BuildCompoundDlg.h"
00027 
00028 #include "SMESHGUI.h"
00029 #include "SMESHGUI_Utils.h"
00030 #include "SMESHGUI_SpinBox.h"
00031 #include "SMESHGUI_VTKUtils.h"
00032 
00033 #include <SMESH_TypeFilter.hxx>
00034 
00035 // SALOME GUI includes
00036 #include <SUIT_Desktop.h>
00037 #include <SUIT_Session.h>
00038 #include <SUIT_MessageBox.h>
00039 #include <SUIT_ResourceMgr.h>
00040 #include <SalomeApp_Study.h>
00041 #include <SUIT_OverrideCursor.h>
00042 
00043 #include <LightApp_Application.h>
00044 #include <LightApp_SelectionMgr.h>
00045 #include <SALOME_ListIO.hxx>
00046 
00047 // Qt includes
00048 #include <QApplication>
00049 #include <QGroupBox>
00050 #include <QLabel>
00051 #include <QLineEdit>
00052 #include <QPushButton>
00053 #include <QRadioButton>
00054 #include <QHBoxLayout>
00055 #include <QVBoxLayout>
00056 #include <QGridLayout>
00057 #include <QCheckBox>
00058 #include <QComboBox>
00059 #include <QKeyEvent>
00060 #include <QButtonGroup>
00061 
00062 // STL includes
00063 #include <set>
00064 
00065 #define SPACING 6
00066 #define MARGIN  11
00067 
00068 //To disable automatic genericobj management, the following line should be commented.
00069 //Otherwise, it should be uncommented. Refer to KERNEL_SRC/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx
00070 #define WITHGENERICOBJ
00071 
00072 //=================================================================================
00073 // name    : SMESHGUI_BuildCompoundDlg
00074 // Purpose :
00075 //=================================================================================
00076 SMESHGUI_BuildCompoundDlg::SMESHGUI_BuildCompoundDlg( SMESHGUI* theModule )
00077   : QDialog(SMESH::GetDesktop(theModule)),
00078     mySMESHGUI(theModule),
00079     mySelectionMgr(SMESH::GetSelectionMgr(theModule)),
00080     myIsApplyAndClose( false )
00081 {
00082   setModal(false);
00083   setAttribute(Qt::WA_DeleteOnClose, true);
00084   setWindowTitle(tr("SMESH_BUILD_COMPOUND_TITLE"));
00085 
00086   SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
00087   QPixmap image0 (aResMgr->loadPixmap("SMESH", tr("ICON_DLG_BUILD_COMPOUND_MESH")));
00088   QPixmap image1 (aResMgr->loadPixmap("SMESH", tr("ICON_SELECT")));
00089 
00090   setSizeGripEnabled(true);
00091 
00092   QVBoxLayout* aTopLayout = new QVBoxLayout(this);
00093   aTopLayout->setSpacing(SPACING);
00094   aTopLayout->setMargin(MARGIN);
00095 
00096   /***************************************************************/
00097   GroupConstructors = new QGroupBox(tr("COMPOUND"), this);
00098   QButtonGroup* ButtonGroup = new QButtonGroup(this);
00099   QHBoxLayout* GroupConstructorsLayout = new QHBoxLayout(GroupConstructors);
00100   GroupConstructorsLayout->setSpacing(SPACING);
00101   GroupConstructorsLayout->setMargin(MARGIN);
00102 
00103   Constructor1 = new QRadioButton(GroupConstructors);
00104   Constructor1->setIcon(image0);
00105   Constructor1->setChecked(true);
00106   GroupConstructorsLayout->addWidget(Constructor1);
00107   ButtonGroup->addButton(Constructor1, 0);
00108 
00109   /***************************************************************/
00110   GroupName = new QGroupBox(tr("RESULT_NAME"), this);
00111   QHBoxLayout* GroupNameLayout = new QHBoxLayout(GroupName);
00112   GroupNameLayout->setSpacing(SPACING);
00113   GroupNameLayout->setMargin(MARGIN);
00114 
00115   TextLabelName = new QLabel(tr("SMESH_NAME"), GroupName);
00116   LineEditName = new QLineEdit(GroupName);
00117 
00118   GroupNameLayout->addWidget(TextLabelName);
00119   GroupNameLayout->addWidget(LineEditName);
00120 
00121   /***************************************************************/
00122   GroupArgs = new QGroupBox(tr("SMESH_ARGUMENTS"), this);
00123   QGridLayout* GroupArgsLayout = new QGridLayout(GroupArgs);
00124   GroupArgsLayout->setSpacing(SPACING);
00125   GroupArgsLayout->setMargin(MARGIN);
00126 
00127   TextLabelMeshes = new QLabel(tr("MESHES"), GroupArgs);
00128   SelectButton = new QPushButton(GroupArgs);
00129   SelectButton->setIcon(image1);
00130   SelectButton->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
00131   LineEditMeshes = new QLineEdit(GroupArgs);
00132   LineEditMeshes->setReadOnly(true);
00133 
00134   TextLabelUnion = new QLabel(tr("PROCESSING_IDENTICAL_GROUPS"), GroupArgs);
00135   ComboBoxUnion = new QComboBox(GroupArgs);
00136 
00137   CheckBoxCommon = new QCheckBox(tr("CREATE_COMMON_GROUPS"), GroupArgs);
00138 
00139   CheckBoxMerge = new QCheckBox(tr("MERGE_NODES_AND_ELEMENTS"), GroupArgs);
00140 
00141   TextLabelTol = new QLabel(tr("SMESH_TOLERANCE"), GroupArgs);
00142   TextLabelTol->setAlignment(Qt::AlignCenter);
00143   SpinBoxTol = new SMESHGUI_SpinBox(GroupArgs);
00144   SpinBoxTol->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, "len_tol_precision" );
00145 
00146   GroupArgsLayout->addWidget(TextLabelMeshes, 0, 0);
00147   GroupArgsLayout->addWidget(SelectButton,    0, 1);
00148   GroupArgsLayout->addWidget(LineEditMeshes,  0, 2, 1, 2);
00149   GroupArgsLayout->addWidget(TextLabelUnion,  1, 0, 1, 3);
00150   GroupArgsLayout->addWidget(ComboBoxUnion,   1, 3);
00151   GroupArgsLayout->addWidget(CheckBoxCommon,  2, 0, 1, 4);
00152   GroupArgsLayout->addWidget(CheckBoxMerge,   3, 0, 1, 4);
00153   GroupArgsLayout->addWidget(TextLabelTol,    4, 0, 1, 2);
00154   GroupArgsLayout->addWidget(SpinBoxTol,      4, 2, 1, 2);
00155 
00156   /***************************************************************/
00157   GroupButtons = new QGroupBox(this);
00158   QHBoxLayout* GroupButtonsLayout = new QHBoxLayout(GroupButtons);
00159   GroupButtonsLayout->setSpacing(SPACING);
00160   GroupButtonsLayout->setMargin(MARGIN);
00161 
00162   buttonOk = new QPushButton(tr("SMESH_BUT_APPLY_AND_CLOSE"), GroupButtons);
00163   buttonOk->setAutoDefault(true);
00164   buttonOk->setDefault(true);
00165   buttonApply = new QPushButton(tr("SMESH_BUT_APPLY"), GroupButtons);
00166   buttonApply->setAutoDefault(true);
00167   buttonCancel = new QPushButton(tr("SMESH_BUT_CLOSE"), GroupButtons);
00168   buttonCancel->setAutoDefault(true);
00169   buttonHelp = new QPushButton(tr("SMESH_BUT_HELP"), GroupButtons);
00170   buttonHelp->setAutoDefault(true);
00171 
00172   GroupButtonsLayout->addWidget(buttonOk);
00173   GroupButtonsLayout->addSpacing(10);
00174   GroupButtonsLayout->addWidget(buttonApply);
00175   GroupButtonsLayout->addSpacing(10);
00176   GroupButtonsLayout->addStretch();
00177   GroupButtonsLayout->addWidget(buttonCancel);
00178   GroupButtonsLayout->addWidget(buttonHelp);
00179 
00180   /***************************************************************/
00181   aTopLayout->addWidget(GroupConstructors);
00182   aTopLayout->addWidget(GroupName);
00183   aTopLayout->addWidget(GroupArgs);
00184   aTopLayout->addWidget(GroupButtons);
00185 
00186   myHelpFileName = "building_compounds_page.html";
00187 
00188   Init(); // Initialisations
00189 }
00190 
00191 //=================================================================================
00192 // function : ~SMESHGUI_BuildCompoundDlg()
00193 // purpose  : Destroys the object and frees any allocated resources
00194 //=================================================================================
00195 SMESHGUI_BuildCompoundDlg::~SMESHGUI_BuildCompoundDlg()
00196 {
00197 }
00198 
00199 //=================================================================================
00200 // function : Init()
00201 // purpose  :
00202 //=================================================================================
00203 void SMESHGUI_BuildCompoundDlg::Init()
00204 {
00205   mySMESHGUI->SetActiveDialogBox((QDialog*)this);
00206 
00207   myMesh = SMESH::SMESH_Mesh::_nil();
00208 
00209   myMeshFilter = new SMESH_TypeFilter (MESH);
00210 
00211   myMeshArray = new SMESH::mesh_array();
00212 
00213   // signals and slots connections
00214   connect(buttonOk,     SIGNAL(clicked()), this, SLOT(ClickOnOk()));
00215   connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
00216   connect(buttonApply,  SIGNAL(clicked()), this, SLOT(ClickOnApply()));
00217   connect(buttonHelp,   SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
00218 
00219   connect(SelectButton, SIGNAL(clicked()), this, SLOT(SelectionIntoArgument()));
00220 
00221   connect(CheckBoxMerge, SIGNAL(toggled(bool)), this, SLOT(onSelectMerge(bool)));
00222 
00223   connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
00224 
00225   connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
00226   connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()),        this, SLOT(ClickOnCancel()));
00227 
00228   LineEditName->setText(GetDefaultName(tr("COMPOUND_MESH")));
00229   LineEditMeshes->setFocus();
00230 
00231   ComboBoxUnion->addItem(tr("UNITE"));
00232   ComboBoxUnion->addItem(tr("RENAME"));
00233   ComboBoxUnion->setCurrentIndex(0);
00234 
00235   CheckBoxMerge->setChecked(false);
00236 
00237   TextLabelTol->setEnabled(CheckBoxMerge->isChecked());
00238   SpinBoxTol->SetValue(1e-05);
00239 
00240   SpinBoxTol->setEnabled(CheckBoxMerge->isChecked());
00241 
00242   mySelectionMgr->clearFilters();
00243   mySelectionMgr->installFilter(myMeshFilter);
00244 
00245   SelectionIntoArgument();
00246 }
00247 
00248 //=================================================================================
00249 // function : GetDefaultName()
00250 // purpose  :
00251 //=================================================================================
00252 QString SMESHGUI_BuildCompoundDlg::GetDefaultName(const QString& theOperation)
00253 {
00254   QString aName = "";
00255 
00256   // collect all object names of SMESH component
00257   SalomeApp_Study* appStudy =
00258     dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
00259   if ( !appStudy ) return aName;
00260   _PTR(Study) aStudy = appStudy->studyDS();
00261 
00262   std::set<std::string> aSet;
00263   _PTR(SComponent) aMeshCompo (aStudy->FindComponent("SMESH"));
00264   if (aMeshCompo) {
00265     _PTR(ChildIterator) it (aStudy->NewChildIterator(aMeshCompo));
00266     _PTR(SObject) obj;
00267     for (it->InitEx(true); it->More(); it->Next()) {
00268       obj = it->Value();
00269       aSet.insert(obj->GetName());
00270     }
00271   }
00272 
00273   // build a unique name
00274   int aNumber = 0;
00275   bool isUnique = false;
00276   while (!isUnique) {
00277     aName = theOperation + "_" + QString::number(++aNumber);
00278     isUnique = (aSet.count(aName.toLatin1().data()) == 0);
00279   }
00280 
00281   return aName;
00282 }
00283 
00284 //=================================================================================
00285 // function : ClickOnApply()
00286 // purpose  :
00287 //=================================================================================
00288 bool SMESHGUI_BuildCompoundDlg::ClickOnApply()
00289 {
00290   if (mySMESHGUI->isActiveStudyLocked())
00291     return false;
00292 
00293   if (!isValid())
00294     return false;
00295 
00296   SMESH::SMESH_Mesh_var aCompoundMesh;
00297 
00298   if (!myMesh->_is_nil())
00299   {
00300     QStringList aParameters;
00301     aParameters << (CheckBoxMerge->isChecked() ? SpinBoxTol->text() : QString(" "));
00302 
00303     QStringList anEntryList;
00304     try {
00305       SUIT_OverrideCursor aWaitCursor;
00306 
00307       myMeshArray[0]->SetParameters( aParameters.join(":").toLatin1().constData() );
00308 
00309       SMESH::SMESH_Gen_var aSMESHGen = SMESHGUI::GetSMESHGen();
00310       // concatenate meshes
00311       if(CheckBoxCommon->isChecked())
00312         aCompoundMesh = aSMESHGen->ConcatenateWithGroups(myMeshArray,
00313                                                          !(ComboBoxUnion->currentIndex()),
00314                                                          CheckBoxMerge->isChecked(),
00315                                                          SpinBoxTol->GetValue());
00316       else
00317         aCompoundMesh = aSMESHGen->Concatenate(myMeshArray,
00318                                                !(ComboBoxUnion->currentIndex()),
00319                                                CheckBoxMerge->isChecked(),
00320                                                SpinBoxTol->GetValue());
00321 
00322       _PTR(SObject) aSO = SMESH::FindSObject( aCompoundMesh );
00323       if( aSO ) {
00324         SMESH::SetName( aSO, LineEditName->text() );
00325         anEntryList.append( aSO->GetID().c_str() );
00326       }
00327       mySMESHGUI->updateObjBrowser();
00328     } catch(...) {
00329       return false;
00330     }
00331 
00332     LineEditName->setText(GetDefaultName(tr("COMPOUND_MESH")));
00333 
00334     // IPAL21468 Compound is hidden after creation.
00335     if ( SMESHGUI::automaticUpdate() ) {
00336       mySelectionMgr->clearSelected();
00337       SMESH::UpdateView();
00338 
00339       _PTR(SObject) aSO = SMESH::FindSObject(aCompoundMesh.in());
00340       if ( SMESH_Actor* anActor = SMESH::CreateActor(aSO->GetStudy(), aSO->GetID().c_str()) )
00341         SMESH::DisplayActor(SMESH::GetActiveWindow(), anActor);
00342     }// end IPAL21468
00343 
00344     if( LightApp_Application* anApp =
00345         dynamic_cast<LightApp_Application*>( SUIT_Session::session()->activeApplication() ) )
00346       anApp->browseObjects( anEntryList, isApplyAndClose() );
00347 
00348     SMESHGUI::Modified();
00349 
00350 #ifdef WITHGENERICOBJ
00351     // obj has been published in study. Its refcount has been incremented.
00352     // It is safe to decrement its refcount
00353     // so that it will be destroyed when the entry in study will be removed
00354     if (!CORBA::is_nil(aCompoundMesh))
00355       aCompoundMesh->UnRegister();
00356 #endif
00357 
00358     return true;
00359   }
00360   return false;
00361 }
00362 
00363 //=================================================================================
00364 // function : ClickOnOk()
00365 // purpose  :
00366 //=================================================================================
00367 void SMESHGUI_BuildCompoundDlg::ClickOnOk()
00368 {
00369   setIsApplyAndClose( true );
00370   if (ClickOnApply())
00371     ClickOnCancel();
00372 }
00373 
00374 //=================================================================================
00375 // function : ClickOnCancel()
00376 // purpose  :
00377 //=================================================================================
00378 void SMESHGUI_BuildCompoundDlg::ClickOnCancel()
00379 {
00380   //mySelectionMgr->clearSelected();
00381   mySelectionMgr->clearFilters();
00382   disconnect(mySelectionMgr, 0, this, 0);
00383   mySMESHGUI->ResetState();
00384   reject();
00385 }
00386 
00387 //=================================================================================
00388 // function : ClickOnHelp()
00389 // purpose  :
00390 //=================================================================================
00391 void SMESHGUI_BuildCompoundDlg::ClickOnHelp()
00392 {
00393   LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
00394   if (app)
00395     app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
00396   else {
00397     SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
00398                              tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
00399                              arg(app->resourceMgr()->stringValue("ExternalBrowser",
00400                                                                  "application")).
00401                              arg(myHelpFileName));
00402   }
00403 }
00404 
00405 //=================================================================================
00406 // function : SelectionIntoArgument()
00407 // purpose  : Called when selection as changed or other case
00408 //=================================================================================
00409 void SMESHGUI_BuildCompoundDlg::SelectionIntoArgument()
00410 {
00411   if (!GroupButtons->isEnabled()) // inactive
00412     return;
00413 
00414   QString aString = "";
00415 
00416   SALOME_ListIO aList;
00417   mySelectionMgr->selectedObjects(aList);
00418   int nbSel = SMESH::GetNameOfSelectedIObjects(mySelectionMgr, aString);
00419 
00420   if (nbSel != 0) {
00421     myMeshArray->length(nbSel);
00422     for (int i = 0; nbSel != 0; i++, nbSel--) {
00423       Handle(SALOME_InteractiveObject) IO = aList.First();
00424       aList.RemoveFirst();
00425       myMesh = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(IO);
00426       myMeshArray[i] = myMesh;
00427     }
00428   }
00429   else {
00430     myMesh = SMESH::SMESH_Mesh::_nil();
00431     aString = "";
00432   }
00433 
00434   LineEditMeshes->setText(aString);
00435 
00436   bool isEnabled = (!myMesh->_is_nil());
00437   buttonOk->setEnabled(isEnabled);
00438   buttonApply->setEnabled(isEnabled);
00439 }
00440 
00441 //=================================================================================
00442 // function : DeactivateActiveDialog()
00443 // purpose  :
00444 //=================================================================================
00445 void SMESHGUI_BuildCompoundDlg::DeactivateActiveDialog()
00446 {
00447   if (GroupConstructors->isEnabled()) {
00448     GroupConstructors->setEnabled(false);
00449     GroupName->setEnabled(false);
00450     GroupArgs->setEnabled(false);
00451     GroupButtons->setEnabled(false);
00452     mySMESHGUI->ResetState();
00453     mySMESHGUI->SetActiveDialogBox(0);
00454   }
00455 }
00456 
00457 //=================================================================================
00458 // function : ActivateThisDialog()
00459 // purpose  :
00460 //=================================================================================
00461 void SMESHGUI_BuildCompoundDlg::ActivateThisDialog()
00462 {
00463   /* Emit a signal to deactivate the active dialog */
00464   mySMESHGUI->EmitSignalDeactivateDialog();
00465   GroupConstructors->setEnabled(true);
00466   GroupName->setEnabled(true);
00467   GroupArgs->setEnabled(true);
00468   GroupButtons->setEnabled(true);
00469 
00470   mySMESHGUI->SetActiveDialogBox((QDialog*)this);
00471   SelectionIntoArgument();
00472 }
00473 
00474 //=================================================================================
00475 // function : enterEvent()
00476 // purpose  :
00477 //=================================================================================
00478 void SMESHGUI_BuildCompoundDlg::enterEvent( QEvent* )
00479 {
00480   if (GroupConstructors->isEnabled())
00481     return;
00482   ActivateThisDialog();
00483 }
00484 
00485 //=================================================================================
00486 // function : closeEvent()
00487 // purpose  :
00488 //=================================================================================
00489 void SMESHGUI_BuildCompoundDlg::closeEvent( QCloseEvent* )
00490 {
00491   /* same than click on cancel button */
00492   ClickOnCancel();
00493 }
00494 
00495 //=======================================================================
00496 //function : hideEvent
00497 //purpose  : caused by ESC key
00498 //=======================================================================
00499 void SMESHGUI_BuildCompoundDlg::hideEvent( QHideEvent* )
00500 {
00501   if (!isMinimized())
00502     ClickOnCancel();
00503 }
00504 
00505 
00506 //=================================================================================
00507 // function : keyPressEvent()
00508 // purpose  :
00509 //=================================================================================
00510 void SMESHGUI_BuildCompoundDlg::keyPressEvent( QKeyEvent* e )
00511 {
00512   QDialog::keyPressEvent( e );
00513   if ( e->isAccepted() )
00514     return;
00515 
00516   if ( e->key() == Qt::Key_F1 ) {
00517     e->accept();
00518     ClickOnHelp();
00519   }
00520 }
00521 
00522 
00523 //=================================================================================
00524 // function : onSelectMerge()
00525 // purpose  :
00526 //=================================================================================
00527 void SMESHGUI_BuildCompoundDlg::onSelectMerge(bool toMerge)
00528 {
00529   TextLabelTol->setEnabled(toMerge);
00530   SpinBoxTol->setEnabled(toMerge);
00531   if(!toMerge)
00532     SpinBoxTol->SetValue(1e-05);
00533 }
00534 
00535 //=================================================================================
00536 // function : isValid
00537 // purpose  :
00538 //=================================================================================
00539 bool SMESHGUI_BuildCompoundDlg::isValid()
00540 {
00541   QString msg;
00542   bool ok=true;
00543   if(CheckBoxMerge->isChecked())
00544     ok = SpinBoxTol->isValid( msg, true );
00545 
00546   if( !ok ) {
00547     QString str( tr( "SMESH_INCORRECT_INPUT" ) );
00548     if ( !msg.isEmpty() )
00549       str += "\n" + msg;
00550     SUIT_MessageBox::critical( this, tr( "SMESH_ERROR" ), str );
00551     return false;
00552   }
00553   return true;
00554 }
00555 
00556 //================================================================
00557 // function : setIsApplyAndClose
00558 // Purpose  : Set value of the flag indicating that the dialog is
00559 //            accepted by Apply & Close button
00560 //================================================================
00561 void SMESHGUI_BuildCompoundDlg::setIsApplyAndClose( const bool theFlag )
00562 {
00563   myIsApplyAndClose = theFlag;
00564 }
00565 
00566 //================================================================
00567 // function : isApplyAndClose
00568 // Purpose  : Get value of the flag indicating that the dialog is
00569 //            accepted by Apply & Close button
00570 //================================================================
00571 bool SMESHGUI_BuildCompoundDlg::isApplyAndClose() const
00572 {
00573   return myIsApplyAndClose;
00574 }