]> SALOME platform Git repositories - modules/hydro.git/blob - src/HYDROData/HYDROData_Digue.cxx
Salome HOME
Coloring of objects (Bug #219).
[modules/hydro.git] / src / HYDROData / HYDROData_Digue.cxx
1
2 #include "HYDROData_Digue.h"
3
4 #include "HYDROData_Document.h"
5
6 #include <TopoDS_Shape.hxx>
7
8 #include <QColor>
9 #include <QStringList>
10
11 #define PYTHON_DIGUE_ID "KIND_DIGUE"
12
13 IMPLEMENT_STANDARD_HANDLE(HYDROData_Digue,HYDROData_Channel)
14 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Digue,HYDROData_Channel)
15
16
17 HYDROData_Digue::HYDROData_Digue()
18 : HYDROData_Channel()
19 {
20 }
21
22 HYDROData_Digue::~HYDROData_Digue()
23 {
24 }
25
26 QStringList HYDROData_Digue::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
27 {
28   QStringList aResList;
29
30   Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
31   if ( aDocument.IsNull() )
32     return aResList;
33
34   QString aDocName = aDocument->GetDocPyName();
35   QString aDigueName = GetName();
36
37   aResList << QString( "%1 = %2.CreateObject( %3 );" )
38               .arg( aDigueName ).arg( aDocName ).arg( PYTHON_DIGUE_ID );
39   aResList << QString( "%1.SetName( \"%2\" );" )
40               .arg( aDigueName ).arg( aDigueName );
41   aResList << QString( "" );
42
43   // TODO
44
45   return aResList;
46 }
47
48 QColor HYDROData_Digue::DefaultFillingColor()
49 {
50   return QColor( Qt::red );
51 }
52
53 QColor HYDROData_Digue::DefaultBorderColor()
54 {
55   return QColor( Qt::transparent );
56 }
57
58 QColor HYDROData_Digue::getDefaultFillingColor() const
59 {
60   return DefaultFillingColor();
61 }
62
63 QColor HYDROData_Digue::getDefaultBorderColor() const
64 {
65   return DefaultBorderColor();
66 }
67