QString HYDROData_Entity::GetObjPyName() const
{
- return GetName().replace(" ", "_");
+ QString aName = GetName();
+ aName.replace(QRegExp("[\\W]"), "_");
+
+ return aName;
}
void HYDROData_Entity::SetName(const QString& theName)
SetToUpdate( false );
}
+void HYDROData_Entity::UpdateLocalCS( double theDx, double theDy )
+{
+ //On the base level no actions are necessary
+}
+
bool HYDROData_Entity::IsHas2dPrs() const
{
return false;
.arg( theColor.blue() ).arg( theColor.alpha() );
}
-
+void HYDROData_Entity::findPythonReferenceObject( MapOfTreatedObjects& theTreatedObjects,
+ QStringList& theScript ) const
+{
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ if ( aDocument.IsNull() )
+ return;
+
+ theScript << QString( "%1 = %2.FindObjectByName( \"%3\" );" ).arg( GetObjPyName() )
+ .arg( aDocument->GetDocPyName() )
+ .arg( GetName() );
+}