QString pixmapName = QObject::tr( aPixAttr->GetPixMap().c_str() );
SalomeApp_RootObject* aRoot = dynamic_cast<SalomeApp_RootObject*>( root() );
if ( aRoot && aRoot->study() ) {
- QPixmap pixmap = aRoot->study()->application()->resourceMgr()->loadPixmap( componentDataType(), pixmapName );
+ QPixmap pixmap = aRoot->study()->application()->resourceMgr()->loadPixmap( componentDataType(), pixmapName, false );
return pixmap;
}
}
return QPixmap();
}
-QColor SalomeApp_DataObject::color() const
-{
- _PTR(GenericAttribute) anAttr;
- if ( myObject && myObject->FindAttribute( anAttr, "AttributeTextColor" ) )
- {
- _PTR(AttributeTextColor) aColAttr( anAttr );
- QColor color( (int)aColAttr->TextColor().R, (int)aColAttr->TextColor().G, (int)aColAttr->TextColor().B );
- return color;
- }
- return QColor();
-}
-
QString SalomeApp_DataObject::text( const int id ) const
{
QString txt;
QColor clr;
switch ( cr )
{
- case Foreground:
- if ( myObject )
+ case Text:
+ if ( isReference() )
+ clr = QColor( 255, 0, 0 );
+ else if ( myObject )
{
_PTR(GenericAttribute) anAttr;
if ( myObject->FindAttribute( anAttr, "AttributeTextColor" ) )