]> SALOME platform Git repositories - modules/hydro.git/blob - src/HYDROData/HYDROData_DummyObject3D.cxx
Salome HOME
Access methods for object groups added.
[modules/hydro.git] / src / HYDROData / HYDROData_DummyObject3D.cxx
1
2 #include "HYDROData_DummyObject3D.h"
3
4 #include "HYDROData_Object.h"
5
6 #include <TopoDS_Shape.hxx>
7
8 #include <QString>
9 #include <QColor>
10
11 IMPLEMENT_STANDARD_HANDLE(HYDROData_DummyObject3D,HYDROData_Entity)
12 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_DummyObject3D,HYDROData_Entity)
13
14 HYDROData_DummyObject3D::HYDROData_DummyObject3D()
15 : HYDROData_Entity()
16 {
17 }
18
19 HYDROData_DummyObject3D::~HYDROData_DummyObject3D()
20 {
21 }
22
23 QString HYDROData_DummyObject3D::GetName() const
24 {
25   QString aName;
26
27   Handle(HYDROData_Object) aFatherObj = GetObject();
28   if ( !aFatherObj.IsNull() )
29     aName = aFatherObj->GetName();
30
31   aName += "_3D";
32
33   return aName;
34 }
35
36 bool HYDROData_DummyObject3D::CanBeUpdated() const
37 {
38   return false;
39 }
40
41 bool HYDROData_DummyObject3D::CanRemove()
42 {
43   return false;
44 }
45
46 Handle(HYDROData_Object) HYDROData_DummyObject3D::GetObject() const
47 {
48   return Handle(HYDROData_Object)::DownCast( GetFatherObject() );
49 }
50
51 TopoDS_Shape HYDROData_DummyObject3D::GetShape() const
52 {
53   TopoDS_Shape aResShape;
54
55   Handle(HYDROData_Object) aFatherObj = GetObject();
56   if ( !aFatherObj.IsNull() )
57     aResShape = aFatherObj->GetShape3D();
58
59   return aResShape;
60 }
61
62 QColor HYDROData_DummyObject3D::GetFillingColor() const
63 {
64   QColor aResColor( Qt::yellow );
65
66   Handle(HYDROData_Object) aFatherObj = GetObject();
67   if ( !aFatherObj.IsNull() )
68     aResColor = aFatherObj->GetFillingColor();
69
70   return aResColor;
71 }
72
73 QColor HYDROData_DummyObject3D::GetBorderColor() const
74 {
75   QColor aResColor( Qt::transparent );
76
77   Handle(HYDROData_Object) aFatherObj = GetObject();
78   if ( !aFatherObj.IsNull() )
79     aResColor = aFatherObj->GetBorderColor();
80
81   return aResColor;
82 }
83
84