-using namespace std;
-// File : SMESHGUI_StudyAPI.cxx
-// Created : Fri May 17 15:23:35 CEST 2002
-// Author : Yves FRICAUD
-// Project : SALOME
-// Module : SMESH
-// Copyright : Open CASCADE
+// SMESH SMESHGUI : GUI for SMESH component
+//
+// Copyright (C) 2003 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 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+// File : SMESHGUI_StudyAPI.cxx
+// Author : Yves FRICAUD
+// Module : SMESH
// $Header:
+using namespace std;
#include "SMESHGUI_StudyAPI.h"
#include "utilities.h"
#include "Utils_ORB_INIT.hxx"
#include "Utils_SINGLETON.hxx"
#include "QAD_MessageBox.h"
+#include "QAD_Desktop.h"
#include "QAD_Application.h"
// QT Includes
// NRI : Temporary added
if ( myStudy->GetProperties()->IsLocked() ) {
- QAD_MessageBox::warn1 ( (QWidget*)QAD_Application::getDesktop(),
- QObject::tr("WARNING"),
- QObject::tr("WRN_STUDY_LOCKED"),
- QObject::tr("BUT_OK") );
+// QAD_MessageBox::warn1 ( (QWidget*)QAD_Application::getDesktop(),
+// QObject::tr("WARNING"),
+// QObject::tr("WRN_STUDY_LOCKED"),
+// QObject::tr("BUT_OK") );
return;
}
// NRI
SALOMEDS::SComponent_var father = aStudy->FindComponent("MESH");
- SALOMEDS::GenericAttribute_var anAttr;
+ /*SALOMEDS::GenericAttribute_var anAttr;
SALOMEDS::AttributeName_var aName;
SALOMEDS::AttributePixMap_var aPixmap;
if (father->_is_nil()) {
father = myStudyBuilder->NewComponent("MESH");
- anAttr = myStudyBuilder->FindOrCreateAttribute(father, "AttributeName");
- aName = SALOMEDS::AttributeName::_narrow(anAttr);
- //NRI aName->SetValue(QObject::tr("SMESH_MEN_COMPONENT"));
- aName->SetValue( QAD_Application::getDesktop()->getComponentUserName( "SMESH" ) );
- anAttr = myStudyBuilder->FindOrCreateAttribute(father, "AttributePixMap");
- aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
- aPixmap->SetPixMap( "ICON_OBJBROWSER_SMESH" );
}
+ anAttr = myStudyBuilder->FindOrCreateAttribute(father, "AttributeName");
+ aName = SALOMEDS::AttributeName::_narrow(anAttr);
+ //NRI aName->SetValue(QObject::tr("SMESH_MEN_COMPONENT"));
+ aName->SetValue( QAD_Application::getDesktop()->getComponentUserName( "SMESH" ) );
+ anAttr = myStudyBuilder->FindOrCreateAttribute(father, "AttributePixMap");
+ aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
+ aPixmap->SetPixMap( "ICON_OBJBROWSER_SMESH" );
+
myStudyBuilder->DefineComponentInstance(father, CompMesh );
- mySComponentMesh = SALOMEDS::SComponent::_narrow( father );
+ mySComponentMesh = SALOMEDS::SComponent::_narrow( father );*/
}
//=======================================================================