return "Land_cover_map";
case KIND_DTM:
return "DTM";
+ case KIND_LISM:
+ return "LISM";
case KIND_BC_POLYGON:
- return "Boundary Polygon";
+ return "Boundary_Polygon";
}
return "";
}
if ( !IsHas2dPrs() )
return;
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( aDocument.IsNull() )
return;
void HYDROData_Entity::Changed( Geometry theChangedGeometry )
{
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if( aDocument.IsNull() )
return;
void HYDROData_Entity::CopyTo( const Handle(HYDROData_Entity)& theDestination,
bool isGenerateNewName ) const
{
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( aDocument.IsNull() ) {
return;
}
return aResColor;
}
+bool HYDROData_Entity::GetColor( QColor& theOutColor,
+ const int theTag ) const
+{
+ TDF_Label aLabel = theTag == 0 ? myLab : myLab.FindChild( theTag );
+
+ Handle(TDataStd_IntegerArray) aColorArray;
+ if ( aLabel.FindAttribute( TDataStd_IntegerArray::GetID(), aColorArray ) )
+ {
+ theOutColor.setRed( aColorArray->Value( 1 ) );
+ theOutColor.setGreen( aColorArray->Value( 2 ) );
+ theOutColor.setBlue( aColorArray->Value( 3 ) );
+ theOutColor.setAlpha( aColorArray->Value( 4 ) );
+ return true;
+ }
+
+ return false;
+}
+
+
QStringList HYDROData_Entity::dumpObjectCreation( MapOfTreatedObjects& theTreatedObjects ) const
{
QStringList aResList;
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( aDocument.IsNull() )
return aResList;
void HYDROData_Entity::findPythonReferenceObject( QStringList& theScript,
QString defName) const
{
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( aDocument.IsNull() )
return;
void HYDROData_Entity::SetNameInDumpPython(QStringList& theScript,
QString theName) const
{
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( aDocument.IsNull() )
return;
Handle(TDataStd_Integer) anAttr;
TDF_Label aLabel = myLab.FindChild( theTag );
if( !aLabel.FindAttribute( TDataStd_Integer::GetID(), anAttr ) )
- return 0;
+ return theDefValue;
return anAttr->Get();
}