]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Fix for the bug #318: Different styles in folders' design in Object browser.
authorrkv <rkv@opencascade.com>
Thu, 9 Jan 2014 13:05:57 +0000 (13:05 +0000)
committerrkv <rkv@opencascade.com>
Thu, 9 Jan 2014 13:05:57 +0000 (13:05 +0000)
src/HYDROGUI/HYDROGUI_DataObject.cxx
src/HYDROGUI/HYDROGUI_DataObject.h

index cc62a54a38a1aa759bca0bbc2c597613f23e6ebf..a259a866e83a88b6078527673b852c0e1d089a07 100644 (file)
@@ -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<CAM_ModuleObject*>( parent() ) )
+    {
+      aFont.setBold( true );
+    }
+  }
+  return aFont;
+}
+
 HYDROGUI_DropTargetObject::HYDROGUI_DropTargetObject( SUIT_DataObject* theParent,
                                             const QString&   theName,
                                             const QString&   theParentEntry,
index 8f1582885d4b8e4cc4d5610582ae755369a834f2..6ffeaa1eed17ecf1a0e33710bbba4258d8174289 100644 (file)
@@ -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.
    */