#include "HYDROGUI_DataObject.h"
#include "HYDROGUI_Module.h"
#include "HYDROGUI_Tool.h"
+#include "HYDROGUI_Zone.h"
+#include "HYDROGUI_Region.h"
#include <HYDROData_Bathymetry.h>
#include <HYDROData_CalculationCase.h>
const QString& theParentEntry,
const bool theIsBuildTree )
{
- HYDROGUI_DataObject* aResObj =
- new HYDROGUI_DataObject( theParent, theModelObject, theParentEntry );
+ HYDROGUI_DataObject* aResObj = new HYDROGUI_DataObject( theParent, theModelObject, theParentEntry );
if ( theIsBuildTree )
{
return aResObj;
}
+LightApp_DataObject* HYDROGUI_DataModel::buildObject( SUIT_DataObject* theParent,
+ HYDROGUI_DataObject* theObject,
+ const QString& theParentEntry,
+ const bool theIsBuildTree )
+{
+ if ( theIsBuildTree )
+ {
+ buildObjectTree( theParent, theObject, theParentEntry );
+ }
+ return theObject;
+}
+
+LightApp_DataObject* HYDROGUI_DataModel::createZone( SUIT_DataObject* theParent,
+ Handle(HYDROData_Zone) theModelObject,
+ const QString& theParentEntry,
+ const bool theIsBuildTree )
+{
+ return buildObject( theParent, new HYDROGUI_Zone( theParent, theModelObject, theParentEntry ), theParentEntry, theIsBuildTree );
+}
+
+LightApp_DataObject* HYDROGUI_DataModel::createRegion( SUIT_DataObject* theParent,
+ Handle(HYDROData_Region) theModelObject,
+ const QString& theParentEntry,
+ const bool theIsBuildTree )
+{
+ return buildObject( theParent, new HYDROGUI_Region( theParent, theModelObject, theParentEntry ), theParentEntry, theIsBuildTree );
+}
+
LightApp_DataObject* HYDROGUI_DataModel::createObject( SUIT_DataObject* theParent,
const QString& theName,
const QString& theParentEntry )
Handle(HYDROData_Region) aCaseRegion =
Handle(HYDROData_Region)::DownCast( anIter.Value() );
if( !aCaseRegion.IsNull() && !aCaseRegion->IsRemoved() )
- createObject( aCaseRegionsSect, aCaseRegion, "", true );
+ createRegion( aCaseRegionsSect, aCaseRegion, "", true );
}
}
else if ( anObjectKind == KIND_REGION )
Handle(HYDROData_Zone) aRegionZone =
Handle(HYDROData_Zone)::DownCast( anIter.Value() );
if( !aRegionZone.IsNull() && !aRegionZone->IsRemoved() )
- createObject( aGuiObj, aRegionZone, "", true );
+ createZone( aGuiObj, aRegionZone, "", true );
}
}
}