if ( anIsToSetObject )
{
+ QString anObjName = GetObjPyName();
theScript << QString( "%1.%2( %3 );" )
- .arg( GetObjPyName() ).arg( theMethod ).arg( aRefObjName );
+ .arg( anObjName ).arg( theMethod ).arg( aRefObjName );
}
}
+void HYDROData_Entity::setPythonObjectColor( QStringList& theScript,
+ const QColor& theColor,
+ const QColor& theDefaultColor,
+ const QString& theMethod ) const
+{
+ if ( theColor == theDefaultColor )
+ return; //Do not set the color for object if it like default
+
+ QString anObjName = GetObjPyName();
+ theScript << QString( "%1.%2( QColor( %3, %4, %5, %6 ) );" )
+ .arg( anObjName ).arg( theMethod )
+ .arg( theColor.red() ).arg( theColor.green() )
+ .arg( theColor.blue() ).arg( theColor.alpha() );
+}
+