-using namespace std;
+// Copyright (C) 2011-2022 CEA/DEN, EDF R&D
+//
+// 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, or (at your option) any later version.
+//
+// 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
#include "MonEditBoundaryDi.h"
#include "MonEditListGroup.h"
#include "HomardQtCommun.h"
#include <utilities.h>
+using namespace std;
// -------------------------------------------------------------------------------------------------------------------------------------
MonEditBoundaryDi::MonEditBoundaryDi( MonCreateCase* parent, bool modal,
HOMARD::HOMARD_Gen_var myHomardGen,
- QString caseName, QString BoundaryName):
+ QString caseName, QString Name):
// -------------------------------------------------------------------------------------------------------------------------------------
/* Constructs a MonEditBoundaryDi
herite de MonCreateBoundaryDi
*/
- MonCreateBoundaryDi(parent, modal, myHomardGen, caseName, BoundaryName)
+ MonCreateBoundaryDi(parent, modal, myHomardGen, caseName, Name)
{
- MESSAGE("Debut de Boundary pour " << BoundaryName.toStdString().c_str());
- setWindowTitle("Edit BoundaryDi");
+ MESSAGE("Debut de Boundary pour " << Name.toStdString().c_str());
+ setWindowTitle(QObject::tr("HOM_BOUN_D_EDIT_WINDOW_TITLE"));
try
{
- _aBoundary=_myHomardGen->GetBoundary(CORBA::string_dup(_aBoundaryName.toStdString().c_str()));
- if (caseName==QString("")) { _aCaseName=_aBoundary->GetCaseCreation();}
+ aBoundary=myHomardGen->GetBoundary(CORBA::string_dup(_aName.toStdString().c_str()));
+ if (caseName==QString("")) { _aCaseName=aBoundary->GetCaseCreation();}
InitValEdit();
}
catch( SALOME::SALOME_Exception& S_ex )
{
- QMessageBox::information( 0, "Error",
- QString(CORBA::string_dup(S_ex.details.text)),
- QMessageBox::Ok + QMessageBox::Default );
- return;
+ QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+ QObject::tr(CORBA::string_dup(S_ex.details.text)) );
+ return;
}
- HOMARD::ListGroupType_var maListe = _aBoundary->GetGroups();
+ HOMARD::ListGroupType_var maListe = aBoundary->GetGroups();
for ( int i = 0; i < maListe->length(); i++ )
_listeGroupesBoundary << QString(maListe[i]);
// ------------------------------
{
}
-
// ------------------------------
void MonEditBoundaryDi::InitValEdit()
// ------------------------------
{
- LEBoundaryName->setText(_aBoundaryName);
- LEBoundaryName->setReadOnly(true);
+ LEName->setText(_aName);
+ LEName->setReadOnly(true);
- QString aMeshFile = _aBoundary->GetMeshFile();
- LEFileName->setText(aMeshFile);
+ QString aDataFile = aBoundary->GetDataFile();
+ LEFileName->setText(aDataFile);
LEFileName->setReadOnly(1);
PushFichier->setVisible(0);
+//
adjustSize();
}
// ------------------------------
void MonEditBoundaryDi::SetFiltrage()
// // ------------------------------------------------------------------------
{
- if (!CBGroupe->isChecked()) return;
- if (_aCaseName.toStdString().c_str() == QString())
- {
- QMessageBox::information( 0, "Error",
- "Case MeshFile unknowned.",
- QMessageBox::Ok + QMessageBox::Default );
- return;
- }
- HOMARD::HOMARD_Cas_var monCas= _myHomardGen->GetCas(_aCaseName.toStdString().c_str());
- HOMARD::ListGroupType_var _listeGroupesCas = monCas->GetGroups();
+ if (!CBGroupe->isChecked()) return;
+ if (_aCaseName.toStdString().c_str() == QString())
+ {
+ QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+ QObject::tr("HOM_BOUN_CASE") );
+ return;
+ }
+ HOMARD::HOMARD_Cas_var monCas= myHomardGen->GetCase(_aCaseName.toStdString().c_str());
+ HOMARD::ListGroupType_var _listeGroupesCas = monCas->GetGroups();
- MonEditListGroup *aDlg = new MonEditListGroup(NULL,this, TRUE, HOMARD::HOMARD_Gen::_duplicate(_myHomardGen),
- _aCaseName, _listeGroupesBoundary) ;
- aDlg->show();
+ MonEditListGroup *aDlg = new MonEditListGroup(NULL, this, true, HOMARD::HOMARD_Gen::_duplicate(myHomardGen),
+ _aCaseName, _listeGroupesBoundary) ;
+ aDlg->show();
}