2 #include "HYDROData_Zone.h"
4 #include "HYDROData_Bathymetry.h"
5 #include "HYDROData_Document.h"
6 #include "HYDROData_Polyline.h"
7 #include "HYDROData_Iterator.h"
9 #include <TDataStd_IntegerArray.hxx>
12 #include <QStringList>
14 #define PYTHON_ZONE_ID "KIND_ZONE"
16 IMPLEMENT_STANDARD_HANDLE(HYDROData_Zone, HYDROData_Domain)
17 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Zone, HYDROData_Domain)
19 HYDROData_Zone::HYDROData_Zone()
23 HYDROData_Zone::~HYDROData_Zone()
27 QStringList HYDROData_Zone::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
29 QStringList aResList = HYDROData_Domain::DumpToPython( theTreatedObjects );
30 if ( aResList.isEmpty() )
33 aResList << QString( "" );
35 Handle(HYDROData_Polyline) aRefPolyline = GetPolyline();
36 setPythonReferenceObject( theTreatedObjects, aResList, aRefPolyline, "SetPolyline" );
41 void HYDROData_Zone::SetPolyline( const Handle(HYDROData_Polyline)& thePolyline )
43 SetReferenceObject( thePolyline, DataTag_Polyline );
46 Handle(HYDROData_Polyline) HYDROData_Zone::GetPolyline() const
48 return Handle(HYDROData_Polyline)::DownCast(
49 GetReferenceObject( DataTag_Polyline ) );
52 void HYDROData_Zone::RemovePolyline()
54 ClearReferenceObjects( DataTag_Polyline );
57 QPainterPath HYDROData_Zone::GetPainterPath() const
61 Handle(HYDROData_Polyline) aPolyline = GetPolyline();
62 if ( !aPolyline.IsNull() )
64 aPath = aPolyline->painterPath();
70 QString HYDROData_Zone::getPythonKindId() const
72 return QString( PYTHON_ZONE_ID );