Salome HOME
This commit was generated by cvs2git to track changes on a CVS vendor
[modules/med.git] / src / MEDGUI / MedGUI.cxx
index 052687a3e6cc7c410bc998223f2364884d83e9bf..f3e2a855e062ddd1cab5324088416f1f62b0bcb4 100644 (file)
@@ -1,3 +1,4 @@
+using namespace std;
 //=============================================================================
 // File      : MedGUI.cxx
 // Project   : SALOME
@@ -19,6 +20,8 @@
 #include "QAD_Tools.h"
 #include "QAD_FileDlg.h"
 
+//#include "SMESH_TypeFilter.hxx"
+
 // QT Includes
 #include <qinputdialog.h>
 
@@ -182,7 +185,8 @@ bool MedGUI::OnGUIEvent (int theCommandID, QAD_Desktop* parent)
            SCRUTE(file);
            try
              {
-               medgen->readStructFile(file.latin1(),myStudyName);
+//             medgen->readStructFile(file.latin1(),myStudyName);
+               medgen->readStructFileWithFieldType(file.latin1(),myStudyName);
                if (myActiveStudy->getStudyDocument()->GetProperties()->IsLocked()) {
                  QAD_MessageBox::warn1 ((QWidget*)QAD_Application::getDesktop(),
                                         QObject::tr("WRN_WARNING"), 
@@ -224,17 +228,17 @@ bool MedGUI::OnGUIEvent (int theCommandID, QAD_Desktop* parent)
                        aMesh = SALOME_MED::MESH::_narrow( _orb->string_to_object(anIOR->Value()) );
                        if ( aMesh->_is_nil() )
                          {
-                           //                      aM = SMESH::SMESH_Mesh::_narrow(_orb->string_to_object(anIOR->Value()));
-                           //                      if ( aM->_is_nil() )
-                           //                        {
-                           //                          QAD_MessageBox::warn1
-                           //                            ( QAD_Application::getDesktop(),
-                           //                              tr ("MED_WRN_WARNING"),
-                           //                              tr ("MED_INF_NOTIMPL"),
-                           //                              tr ("MED_BUT_OK") );
-                           //                          break;
-                           //                        }
-                           //                      aMesh = aM->GetMEDMesh();
+                           //                              aM = SMESH::SMESH_Mesh::_narrow(_orb->string_to_object(anIOR->Value()));
+                           //                              if ( aM->_is_nil() )
+                           //                                {
+                           //                                  QAD_MessageBox::warn1
+                           //                                    ( QAD_Application::getDesktop(),
+                           //                                      tr ("MED_WRN_WARNING"),
+                           //                                      tr ("MED_INF_NOTIMPL"),
+                           //                                      tr ("MED_BUT_OK") );
+                           //                                  break;
+                           //                                }
+                           //                              aMesh = aM->GetMEDMesh();
                            if ( aMesh->_is_nil() )
                              {
                                QAD_MessageBox::warn1
@@ -244,8 +248,8 @@ bool MedGUI::OnGUIEvent (int theCommandID, QAD_Desktop* parent)
                                    tr ("MED_BUT_OK") );
                                break;
                              }
-                         }
-                       DumpMesh( aMesh );
+                         }
+                       DumpMesh( aMesh );
                        //Sel->ClearFilters() ;
                      }
                    else
@@ -286,25 +290,25 @@ bool MedGUI::OnGUIEvent (int theCommandID, QAD_Desktop* parent)
                      {
                        anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
                        //                      aSubM = SMESH::SMESH_subMesh::_narrow( _orb->string_to_object(anIOR->Value()) );
-                       //                      if ( aSubM->_is_nil() )
-                       //                        {
-                       //                          aFam=SALOME_MED::FAMILY::_narrow( _orb->string_to_object(anIOR->Value()));
-                       //                          if ( aFam->_is_nil() )
-                       //                            {
-                       //                              QAD_MessageBox::warn1
-                       //                                ( QAD_Application::getDesktop(),
-                       //                                  tr ("MED_WRN_WARNING"),
-                       //                                  tr ("MED_INF_NOTIMPL"),
-                       //                                  tr ("MED_BUT_OK") );
-                       //                              break;
-                       //                            }
-                       //                          DumpSubMesh( aFam );
-                       //                        }
-                       //                      else
-                         //                      {
-                           //                      DumpSubMesh( aSubM );
-                           //Sel->ClearFilters() ;
-                           //                    }
+                       //                      if ( aSubM->_is_nil() )
+                       //                        {
+                       //                          aFam=SALOME_MED::FAMILY::_narrow( _orb->string_to_object(anIOR->Value()));
+                       //                          if ( aFam->_is_nil() )
+                       //                            {
+                       //                              QAD_MessageBox::warn1
+                       //                                ( QAD_Application::getDesktop(),
+                       //                                  tr ("MED_WRN_WARNING"),
+                       //                                  tr ("MED_INF_NOTIMPL"),
+                       //                                  tr ("MED_BUT_OK") );
+                       //                              break;
+                       //                            }
+                       //                          DumpSubMesh( aFam );
+                       //    }
+                       //                      else
+                       //                        {
+                       //                          DumpSubMesh( aSubM );
+                       //Sel->ClearFilters() ;
+                       //       }
                      }
                    else
                      {
@@ -487,21 +491,21 @@ bool MedGUI::DumpMesh( SALOME_MED::MESH_var MEDMesh)
  *
  */
 //=============================================================================
-//bool MedGUI::DumpSubMesh( SMESH::SMESH_subMesh_ptr aSubMesh )
-//{
-//  if ( aSubMesh->_is_nil() )
-//    return false;
-//
-//  SALOME_MED::FAMILY_var Fam = aSubMesh->GetFamily();
-//  if ( Fam->_is_nil() )
-//    return false;
-//
-//  Engines::long_array_var tabnoeuds=Fam->getNumber(SALOME_MED::MED_NONE);
-//  for (int l=0;l<tabnoeuds->length();l++)
-//    SCRUTE(tabnoeuds[l]); 
-//
-//  return true;
-//}
+//  bool MedGUI::DumpSubMesh( SMESH::SMESH_subMesh_ptr aSubMesh )
+//  {
+//    if ( aSubMesh->_is_nil() )
+//      return false;
+
+//    SALOME_MED::FAMILY_var Fam = aSubMesh->GetFamily();
+//    if ( Fam->_is_nil() )
+//      return false;
+
+//    Engines::long_array_var tabnoeuds=Fam->getNumber(SALOME_MED::MED_NONE);
+//    for (int l=0;l<tabnoeuds->length();l++)
+//      SCRUTE(tabnoeuds[l]); 
+
+//    return true;
+//  }
 //=============================================================================
 /*!
  *
@@ -528,7 +532,7 @@ bool MedGUI::DumpSubMesh( SALOME_MED::FAMILY_var Fam )
 Engines::Med_Gen_ptr MedGUI::InitMedGen(QAD_Desktop* parent)
 {
   Engines::Component_var comp = 
-    parent->getEngine("FactoryServer", "Med");
+    parent->getEngine("FactoryServer", "MED");
   MESSAGE("_________________________________________");
   Engines::Med_Gen_var clr = Engines::Med_Gen::_narrow(comp);
   ASSERT(!CORBA::is_nil(clr));