+// Copyright (C) 2014-2015 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 "HYDROData_Object.h"
#include <TNaming_NamedShape.hxx>
#include <TopoDS_Shape.hxx>
+#include <TDataStd_Integer.hxx>
#include <QColor>
return QColor( Qt::transparent );
}
+QStringList HYDROData_Object::dumpObjectCreation( MapOfTreatedObjects& theTreatedObjects ) const
+{
+ QStringList aResList = HYDROData_Entity::dumpObjectCreation( theTreatedObjects );
+ if ( aResList.isEmpty() )
+ return aResList; //Object was not created
+
+ QStringList aColorsDef;
+
+ QColor aFillingColor = GetFillingColor();
+ setPythonObjectColor( aColorsDef, aFillingColor, getDefaultFillingColor(), "SetFillingColor" );
+
+ QColor aBorderColor = GetBorderColor();
+ setPythonObjectColor( aColorsDef, aBorderColor, getDefaultBorderColor(), "SetBorderColor" );
+
+ if ( !aColorsDef.isEmpty() )
+ {
+ aResList << aColorsDef;
+ aResList << QString( "" );
+ }
+
+ return aResList;
+}
+
ObjectKind HYDROData_Object::getAltitudeObjectType() const
{
return KIND_UNKNOWN;
aLabel.ForgetAllAttributes();
}
+bool HYDROData_Object::IsSubmersible() const
+{
+ Handle(TDataStd_Integer) aSubMersibleAttr;
+
+ bool isSubmersible = true; //default
+ if( myLab.FindAttribute(TDataStd_Integer::GetID(), aSubMersibleAttr ) )
+ {
+ int aValue = aSubMersibleAttr->Get();
+ isSubmersible = ( aValue != 0 );
+ }
+ return isSubmersible;
+}
+
+void HYDROData_Object::SetIsSubmersible( bool isSubmersible ) const
+{
+ TDataStd_Integer::Set( myLab, isSubmersible ? 1 : 0 );
+}