// encoding instead of default 'System'
#define USE_LATIN1_ENCODING
+// #define DEB_GROUPS 1
+
QString HYDROGUI_Tool::ToQString( const TCollection_AsciiString& src )
{
#ifdef USE_LATIN1_ENCODING
anObjectKind == KIND_STREAM ||
anObjectKind == KIND_CHANNEL ||
anObjectKind == KIND_DIGUE ||
- anObjectKind == KIND_DUMMY_3D )
+ anObjectKind == KIND_DUMMY_3D
+#ifdef DEB_GROUPS
+ || anObjectKind == KIND_SHAPES_GROUP ||
+ anObjectKind == KIND_SPLITTED_GROUP
+#endif
+ )
{
return true;
}
const QString& theName,
const ObjectKind theObjectKind )
{
+ Handle(HYDROData_Entity) aResObj;
+
Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( theModule->getStudyId() );
- return HYDROData_Tool::FindObjectByName( aDocument, theName, theObjectKind );
+ if ( !aDocument.IsNull() )
+ aResObj = aDocument->FindObjectByName( theName, theObjectKind );
+
+ return aResObj;
}
HYDROData_SequenceOfObjects HYDROGUI_Tool::FindObjectsByNames( HYDROGUI_Module* theModule,
const QStringList& theNames,
const ObjectKind theObjectKind )
{
+ HYDROData_SequenceOfObjects aResSeq;
+
Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( theModule->getStudyId() );
- return HYDROData_Tool::FindObjectsByNames( aDocument, theNames, theObjectKind );
+ if ( !aDocument.IsNull() )
+ aResSeq = aDocument->FindObjectsByNames( theNames, theObjectKind );
+
+ return aResSeq;
}
QString HYDROGUI_Tool::GenerateObjectName( HYDROGUI_Module* theModule,
{
const QString& aZoneName = aZoneNameIter.next();
Handle(HYDROData_ImmersibleZone) aRefZone =
- Handle(HYDROData_ImmersibleZone)::DownCast(
- HYDROData_Tool::FindObjectByName( theDoc, aZoneName, KIND_IMMERSIBLE_ZONE ) );
+ Handle(HYDROData_ImmersibleZone)::DownCast( theDoc->FindObjectByName( aZoneName, KIND_IMMERSIBLE_ZONE ) );
if( !aRefZone.IsNull() )
{
QColor aRefColor = aRefZone->GetFillingColor();