1 // Copyright (C) 2014-2015 EDF-R&D
2 // This library is free software; you can redistribute it and/or
3 // modify it under the terms of the GNU Lesser General Public
4 // License as published by the Free Software Foundation; either
5 // version 2.1 of the License, or (at your option) any later version.
7 // This library is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 // Lesser General Public License for more details.
12 // You should have received a copy of the GNU Lesser General Public
13 // License along with this library; if not, write to the Free Software
14 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #include "HYDROData_DummyObject3D.h"
21 #include "HYDROData_Object.h"
23 #include <TopoDS_Shape.hxx>
28 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_DummyObject3D,HYDROData_Entity)
30 HYDROData_DummyObject3D::HYDROData_DummyObject3D()
31 : HYDROData_Entity( Geom_3d )
35 HYDROData_DummyObject3D::~HYDROData_DummyObject3D()
39 QString HYDROData_DummyObject3D::GetName() const
43 Handle(HYDROData_Object) aFatherObj = GetObject();
44 if ( !aFatherObj.IsNull() )
45 aName = aFatherObj->GetName();
52 bool HYDROData_DummyObject3D::CanBeUpdated() const
57 bool HYDROData_DummyObject3D::CanRemove()
62 Handle(HYDROData_Object) HYDROData_DummyObject3D::GetObject() const
64 return Handle(HYDROData_Object)::DownCast( GetFatherObject() );
67 TopoDS_Shape HYDROData_DummyObject3D::GetShape() const
69 TopoDS_Shape aResShape;
71 Handle(HYDROData_Object) aFatherObj = GetObject();
72 if ( !aFatherObj.IsNull() )
73 aResShape = aFatherObj->GetShape3D();
78 QColor HYDROData_DummyObject3D::GetFillingColor() const
80 QColor aResColor( Qt::yellow );
82 Handle(HYDROData_Object) aFatherObj = GetObject();
83 if ( !aFatherObj.IsNull() )
84 aResColor = aFatherObj->GetFillingColor();
89 QColor HYDROData_DummyObject3D::GetBorderColor() const
91 QColor aResColor( Qt::transparent );
93 Handle(HYDROData_Object) aFatherObj = GetObject();
94 if ( !aFatherObj.IsNull() )
95 aResColor = aFatherObj->GetBorderColor();