X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_StudyAPI.cxx;h=42e2724d937d2d3b41cb927201cb1a150f50d5b6;hp=ff871b1c5aa8fe55d0cfd6b09f92a84657e75034;hb=253bd8edea0f44d01e65f1fb085d04428544bd14;hpb=3973ceea250d2a077cdb5a798eb7c6151fa9c568 diff --git a/src/SMESHGUI/SMESHGUI_StudyAPI.cxx b/src/SMESHGUI/SMESHGUI_StudyAPI.cxx index ff871b1c5..42e2724d9 100644 --- a/src/SMESHGUI/SMESHGUI_StudyAPI.cxx +++ b/src/SMESHGUI/SMESHGUI_StudyAPI.cxx @@ -1,18 +1,39 @@ -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 @@ -68,10 +89,10 @@ SMESHGUI_StudyAPI::SMESHGUI_StudyAPI ( SALOMEDS::Study_ptr aStudy, // 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; } @@ -84,14 +105,15 @@ SMESHGUI_StudyAPI::SMESHGUI_StudyAPI ( SALOMEDS::Study_ptr aStudy, 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 ); }