- QStringList aResList;
-
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( this );
- if ( aDocument.IsNull() )
- return aResList;
-
- QString aDocName = aDocument->GetDocPyName();
- QString aZoneName = GetName();
-
- aResList << QString( "%1 = %2.CreateObject( %3 );" )
- .arg( aZoneName ).arg( aDocName ).arg( PYTHON_ZONE_ID );
- aResList << QString( "%1.SetName( \"%2\" );" )
- .arg( aZoneName ).arg( aZoneName );
- aResList << QString( "" );
-
- QColor aFillingColor = GetFillingColor();
- aResList << QString( "filling_color = QColor( %1, %2, %3, %4 );" )
- .arg( aFillingColor.red() ).arg( aFillingColor.green() )
- .arg( aFillingColor.blue() ).arg( aFillingColor.alpha() );
- aResList << QString( "%1.SetFillingColor( filling_color );" ).arg( aZoneName );
- aResList << QString( "" );
-
- QColor aBorderColor = GetBorderColor();
- aResList << QString( "border_color = QColor( %1, %2, %3, %4 );" )
- .arg( aBorderColor.red() ).arg( aBorderColor.green() )
- .arg( aBorderColor.blue() ).arg( aBorderColor.alpha() );
- aResList << QString( "%1.SetBorderColor( border_color );" ).arg( aZoneName );
- aResList << QString( "" );
-
- Handle(HYDROData_Polyline) aRefPolyline = GetPolyline();
- setPythonReferenceObject( theTreatedObjects, aResList, aRefPolyline, "SetPolyline" );
- aResList << QString( "" );
-
- HYDROData_SequenceOfObjects aZoneBaths = GetBathymetries();
- HYDROData_SequenceOfObjects::Iterator aBathsIter( aZoneBaths );
- for ( ; aBathsIter.More(); aBathsIter.Next() )
- {
- Handle(HYDROData_Bathymetry) aRefBath =
- Handle(HYDROData_Bathymetry)::DownCast( aBathsIter.Value() );
- if ( !aRefBath.IsNull() )
- setPythonReferenceObject( theTreatedObjects, aResList, aRefBath, "AddBathymetry" );
- }
-
- return aResList;