]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Fix for the feature #6: Update of objects (T 1.2): For objects which need updating...
authorrkv <rkv@opencascade.com>
Wed, 4 Dec 2013 07:02:35 +0000 (07:02 +0000)
committerrkv <rkv@opencascade.com>
Wed, 4 Dec 2013 07:02:35 +0000 (07:02 +0000)
15 files changed:
src/HYDROGUI/HYDROGUI_DataObject.cxx
src/HYDROGUI/resources/HYDROGUI_images.ts
src/HYDROGUI/resources/icon_martobj.png [new file with mode: 0644]
src/HYDROGUI/resources/icon_mbathymetry.png [new file with mode: 0644]
src/HYDROGUI/resources/icon_mcalculation.png [new file with mode: 0644]
src/HYDROGUI/resources/icon_mhydro_obj.png [new file with mode: 0644]
src/HYDROGUI/resources/icon_mimage.png [new file with mode: 0644]
src/HYDROGUI/resources/icon_mobstacle.png [new file with mode: 0644]
src/HYDROGUI/resources/icon_mpartition.png [new file with mode: 0644]
src/HYDROGUI/resources/icon_mpolyline.png [new file with mode: 0644]
src/HYDROGUI/resources/icon_mpolyline_xy.png [new file with mode: 0644]
src/HYDROGUI/resources/icon_mprofile.png [new file with mode: 0644]
src/HYDROGUI/resources/icon_mriver.png [new file with mode: 0644]
src/HYDROGUI/resources/icon_mstream.png [new file with mode: 0644]
src/HYDROGUI/resources/icon_mvis_state.png [new file with mode: 0644]

index 64f579ff688fb4f9aae0c57976a2ef08af460133..a201b3e6320de970b369cc2cc1e73644199a524c 100644 (file)
@@ -68,7 +68,10 @@ QFont HYDROGUI_DataObject::font( const int theId ) const
   {
     Handle(HYDROData_Entity) aDataObject = modelObject();
     if( !aDataObject.IsNull() && aDataObject->IsMustBeUpdated() )
+    {
       aFont.setItalic( true );
+      aFont.setBold( true );
+    }
   }
   return aFont;
 }
@@ -83,11 +86,11 @@ QColor HYDROGUI_DataObject::color( const ColorRole theRole, const int theId ) co
       case Text:
       case Foreground:
       case Highlight:
-        aColor = QColor( 255, 0, 0 ); // red
+        aColor = Qt::red; // red
       break;
       case HighlightedText:
         // text color for the highlighted item
-        aColor = QColor( 255, 255, 255 );   // white
+        aColor = Qt::white;   // white
       break;
 
       default:
@@ -95,6 +98,29 @@ QColor HYDROGUI_DataObject::color( const ColorRole theRole, const int theId ) co
     }
   }
 
+  if ( !aColor.isValid() )
+  {
+    Handle(HYDROData_Entity) aDataObject = modelObject();
+    if( !aDataObject.IsNull() && aDataObject->IsMustBeUpdated() )
+    {
+      switch ( theRole )
+      {
+        case Text:
+        case Foreground:
+        case Highlight:
+          aColor = Qt::blue;    // color for objects which need updating
+        break;
+        case HighlightedText:
+          // text color for the highlighted item
+          aColor = Qt::white;   // white
+        break;
+
+        default:
+          break;
+      }
+    }
+  }
+
   if ( !aColor.isValid() ) {
     aColor = LightApp_DataObject::color( theRole, theId );
   }
@@ -115,7 +141,12 @@ QPixmap HYDROGUI_DataObject::icon( const int theId ) const
     }
     else
     {
-      anIcon = QObject::tr( QString("HYDRO_TYPE%1_ICO").arg( (int)aDataObject->GetKind() ).toAscii() );
+      QString aNeedUpdate = "";
+      if ( aDataObject->IsMustBeUpdated() )
+      {
+        aNeedUpdate = "M_";
+      }
+      anIcon = QObject::tr( QString("HYDRO_%1TYPE%2_ICO").arg( aNeedUpdate ).arg( (int)aDataObject->GetKind() ).toAscii() );
     }
 
     return aResMgr->loadPixmap( "HYDRO", anIcon );
index c2b9f7a8abee25f366da5214636b6b5dcedb3f27..95830219bf73195ffe5be621b87ee3884f2d2026 100644 (file)
       <source>HYDRO_TYPE20_ICO</source>
       <translation>icon_hydro_obj.png</translation>
     </message>
+
+    <message>
+      <source>PARTITION_M_ICO</source>
+      <translation>icon_mpartition.png</translation>
+    </message>
+    <message>
+      <source>HYDRO_M_TYPE0_ICO</source>
+      <translation>icon_mhydro_obj.png</translation>
+    </message>
+    <message>
+      <source>HYDRO_M_TYPE1_ICO</source>
+      <translation>icon_mimage.png</translation>
+    </message>
+    <message>
+      <source>HYDRO_M_TYPE2_ICO</source>
+      <translation>icon_mpolyline.png</translation>
+    </message>
+    <message>
+      <source>HYDRO_M_TYPE3_ICO</source>
+      <translation>icon_mbathymetry.png</translation>
+    </message>
+    <message>
+      <source>HYDRO_M_TYPE4_ICO</source>
+      <translation>icon_mhydro_obj.png</translation>
+    </message>
+    <message>
+      <source>HYDRO_M_TYPE5_ICO</source>
+      <translation>icon_mhydro_obj.png</translation>
+    </message>
+    <message>
+      <source>HYDRO_M_TYPE6_ICO</source>
+      <translation>icon_mriver.png</translation>
+    </message>
+    <message>
+      <source>HYDRO_M_TYPE7_ICO</source>
+      <translation>icon_mstream.png</translation>
+    </message>
+    <message>
+      <source>HYDRO_M_TYPE8_ICO</source>
+      <translation>icon_mhydro_obj.png</translation>
+    </message>
+    <message>
+      <source>HYDRO_M_TYPE9_ICO</source>
+      <translation>icon_mhydro_obj.png</translation>
+    </message>
+    <message>
+      <source>HYDRO_M_TYPE10_ICO</source>
+      <translation>icon_mobstacle.png</translation>
+    </message>
+    <message>
+      <source>HYDRO_M_TYPE11_ICO</source>
+      <translation>icon_mhydro_obj.png</translation>
+    </message>
+    <message>
+      <source>HYDRO_M_TYPE12_ICO</source>
+      <translation>icon_mprofile.png</translation>
+    </message>
+    <message>
+      <source>HYDRO_M_TYPE13_ICO</source>
+      <translation>icon_mhydro_obj.png</translation>
+    </message>
+    <message>
+      <source>HYDRO_M_TYPE14_ICO</source>
+      <translation>icon_mpolyline_xy.png</translation>
+    </message>
+    <message>
+      <source>HYDRO_M_TYPE15_ICO</source>
+      <translation>icon_mcalculation.png</translation>
+    </message>
+    <message>
+      <source>HYDRO_M_TYPE16_ICO</source>
+      <translation>icon_mhydro_obj.png</translation>
+    </message>
+    <message>
+      <source>HYDRO_M_TYPE17_ICO</source>
+      <translation>icon_mhydro_obj.png</translation>
+    </message>
+    <message>
+      <source>HYDRO_M_TYPE18_ICO</source>
+      <translation>icon_mvis_state.png</translation>
+    </message>
+    <message>
+      <source>HYDRO_M_TYPE19_ICO</source>
+      <translation>icon_martobj.png</translation>
+    </message>
+    <message>
+      <source>HYDRO_M_TYPE20_ICO</source>
+      <translation>icon_mhydro_obj.png</translation>
+    </message>
+
   </context>
 </TS>
diff --git a/src/HYDROGUI/resources/icon_martobj.png b/src/HYDROGUI/resources/icon_martobj.png
new file mode 100644 (file)
index 0000000..270282e
Binary files /dev/null and b/src/HYDROGUI/resources/icon_martobj.png differ
diff --git a/src/HYDROGUI/resources/icon_mbathymetry.png b/src/HYDROGUI/resources/icon_mbathymetry.png
new file mode 100644 (file)
index 0000000..37df5fa
Binary files /dev/null and b/src/HYDROGUI/resources/icon_mbathymetry.png differ
diff --git a/src/HYDROGUI/resources/icon_mcalculation.png b/src/HYDROGUI/resources/icon_mcalculation.png
new file mode 100644 (file)
index 0000000..bdda4dc
Binary files /dev/null and b/src/HYDROGUI/resources/icon_mcalculation.png differ
diff --git a/src/HYDROGUI/resources/icon_mhydro_obj.png b/src/HYDROGUI/resources/icon_mhydro_obj.png
new file mode 100644 (file)
index 0000000..1d95b59
Binary files /dev/null and b/src/HYDROGUI/resources/icon_mhydro_obj.png differ
diff --git a/src/HYDROGUI/resources/icon_mimage.png b/src/HYDROGUI/resources/icon_mimage.png
new file mode 100644 (file)
index 0000000..e27c6bc
Binary files /dev/null and b/src/HYDROGUI/resources/icon_mimage.png differ
diff --git a/src/HYDROGUI/resources/icon_mobstacle.png b/src/HYDROGUI/resources/icon_mobstacle.png
new file mode 100644 (file)
index 0000000..397fb29
Binary files /dev/null and b/src/HYDROGUI/resources/icon_mobstacle.png differ
diff --git a/src/HYDROGUI/resources/icon_mpartition.png b/src/HYDROGUI/resources/icon_mpartition.png
new file mode 100644 (file)
index 0000000..4c24942
Binary files /dev/null and b/src/HYDROGUI/resources/icon_mpartition.png differ
diff --git a/src/HYDROGUI/resources/icon_mpolyline.png b/src/HYDROGUI/resources/icon_mpolyline.png
new file mode 100644 (file)
index 0000000..72cd0f6
Binary files /dev/null and b/src/HYDROGUI/resources/icon_mpolyline.png differ
diff --git a/src/HYDROGUI/resources/icon_mpolyline_xy.png b/src/HYDROGUI/resources/icon_mpolyline_xy.png
new file mode 100644 (file)
index 0000000..8c69bfd
Binary files /dev/null and b/src/HYDROGUI/resources/icon_mpolyline_xy.png differ
diff --git a/src/HYDROGUI/resources/icon_mprofile.png b/src/HYDROGUI/resources/icon_mprofile.png
new file mode 100644 (file)
index 0000000..5f3d54a
Binary files /dev/null and b/src/HYDROGUI/resources/icon_mprofile.png differ
diff --git a/src/HYDROGUI/resources/icon_mriver.png b/src/HYDROGUI/resources/icon_mriver.png
new file mode 100644 (file)
index 0000000..5cc452c
Binary files /dev/null and b/src/HYDROGUI/resources/icon_mriver.png differ
diff --git a/src/HYDROGUI/resources/icon_mstream.png b/src/HYDROGUI/resources/icon_mstream.png
new file mode 100644 (file)
index 0000000..684a2b1
Binary files /dev/null and b/src/HYDROGUI/resources/icon_mstream.png differ
diff --git a/src/HYDROGUI/resources/icon_mvis_state.png b/src/HYDROGUI/resources/icon_mvis_state.png
new file mode 100644 (file)
index 0000000..c2d95eb
Binary files /dev/null and b/src/HYDROGUI/resources/icon_mvis_state.png differ