Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/homard.git] / src / HOMARDGUI / MonEditBoundaryDi.cxx
index cae08250d351d9d5530b5e3a4ce703e22b88c404..66b453e9273b86b01aa84bb9b027b96df5cfbca3 100644 (file)
@@ -1,3 +1,22 @@
+// Copyright (C) 2011-2012  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.
+//
+// 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
+//
+
 using namespace std;
 
 #include "MonEditBoundaryDi.h"
@@ -22,7 +41,7 @@ MonEditBoundaryDi::MonEditBoundaryDi( MonCreateCase* parent, bool modal,
     MonCreateBoundaryDi(parent, modal, myHomardGen, caseName, BoundaryName)
 {
     MESSAGE("Debut de Boundary pour " << BoundaryName.toStdString().c_str());
-    setWindowTitle("Edit BoundaryDi");
+    setWindowTitle(QObject::tr("HOM_BOUN_D_EDIT_WINDOW_TITLE"));
     try
     {
      _aBoundary=_myHomardGen->GetBoundary(CORBA::string_dup(_aBoundaryName.toStdString().c_str()));
@@ -31,10 +50,9 @@ MonEditBoundaryDi::MonEditBoundaryDi( MonCreateCase* parent, bool modal,
     }
     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"),
+                                QString(CORBA::string_dup(S_ex.details.text)) );
+      return;
     }
 
     HOMARD::ListGroupType_var maListe = _aBoundary->GetGroups();
@@ -71,19 +89,18 @@ bool MonEditBoundaryDi::PushOnApply()
 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->GetCas(_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();
 }