From: rkv Date: Thu, 9 Jan 2014 13:05:57 +0000 (+0000) Subject: Fix for the bug #318: Different styles in folders' design in Object browser. X-Git-Tag: BR_hydro_v_0_8~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=72e9b65bc069b9ce16343325bb2844106d0a2f89;p=modules%2Fhydro.git Fix for the bug #318: Different styles in folders' design in Object browser. --- diff --git a/src/HYDROGUI/HYDROGUI_DataObject.cxx b/src/HYDROGUI/HYDROGUI_DataObject.cxx index cc62a54a..a259a866 100644 --- a/src/HYDROGUI/HYDROGUI_DataObject.cxx +++ b/src/HYDROGUI/HYDROGUI_DataObject.cxx @@ -244,7 +244,7 @@ QString HYDROGUI_NamedObject::entry() const QString HYDROGUI_NamedObject::name() const { - return myName; + return myName.toUpper(); } QPixmap HYDROGUI_NamedObject::icon( const int theId ) const @@ -257,6 +257,19 @@ QPixmap HYDROGUI_NamedObject::icon( const int theId ) const return LightApp_DataObject::icon( theId ); } +QFont HYDROGUI_NamedObject::font( const int theId ) const +{ + QFont aFont = LightApp_DataObject::font( theId ); + if( theId == NameId ) + { + if ( dynamic_cast( parent() ) ) + { + aFont.setBold( true ); + } + } + return aFont; +} + HYDROGUI_DropTargetObject::HYDROGUI_DropTargetObject( SUIT_DataObject* theParent, const QString& theName, const QString& theParentEntry, diff --git a/src/HYDROGUI/HYDROGUI_DataObject.h b/src/HYDROGUI/HYDROGUI_DataObject.h index 8f158288..6ffeaa1e 100644 --- a/src/HYDROGUI/HYDROGUI_DataObject.h +++ b/src/HYDROGUI/HYDROGUI_DataObject.h @@ -182,6 +182,11 @@ public: */ virtual QString name() const; + /** + * Returns the font of displayed object name. + */ + virtual QFont font( const int = SUIT_DataObject::NameId ) const; + /** * Returns the object icon. */