]> SALOME platform Git repositories - modules/superv.git/commitdiff
Salome HOME
reversed to previous revision, some bug fixes by MKR were left there, so this revisio...
authorasv <asv@opencascade.com>
Tue, 10 Jan 2006 12:54:19 +0000 (12:54 +0000)
committerasv <asv@opencascade.com>
Tue, 10 Jan 2006 12:54:19 +0000 (12:54 +0000)
src/SUPERVGUI/SUPERVGUI_ArrayView.cxx
src/SUPERVGUI/SUPERVGUI_Canvas.cxx
src/SUPERVGUI/SUPERVGUI_CanvasArray.cxx
src/SUPERVGUI/SUPERVGUI_CanvasCellNodePrs.cxx
src/SUPERVGUI/SUPERVGUI_CanvasNodePrs.cxx
src/SUPERVGUI/SUPERVGUI_CanvasView.cxx

index b8c2be47d487280da4787b8b39afc49f371c4ff5..08477e5477f5cf04eed7ef11b2bf72a2c168c4d1 100644 (file)
@@ -8,6 +8,7 @@
 
 
 using namespace std;
+#include "SUPERVGUI.h"
 #include "SUPERVGUI_ArrayView.h"
 #include "SUPERVGUI_Main.h"
 #include "SUPERVGUI_CanvasCellNodePrs.h"
@@ -107,6 +108,15 @@ void SUPERVGUI_ArrayView::changeBackground()
     // change background color for canvas view
     getMain()->getCanvasView()->canvas()->setBackgroundColor(aColor);
     getMain()->getCanvasView()->setPaletteBackgroundColor(aColor.light(120));
+
+    // mkr : IPAL10825 -->
+    SUPERVGUI* aSupMod = SUPERVGUI::Supervision();
+    if ( !aSupMod ) {
+      MESSAGE("NULL Supervision module!");
+      return;
+    }
+    aSupMod->setIVFBackgroundColor(aColor);
+    // <--
   }
 }
 
index a299cdd2649542a0ea1014d654763499be43c0bd..776849d0db5c10190448fa418f7d3d5c371554e1 100644 (file)
@@ -7,6 +7,7 @@
 //  Module : SUPERV
 
 using namespace std;
+#include "SUPERVGUI.h"
 #include "SUPERVGUI_Def.h"
 #include "SUPERVGUI_Main.h"
 #include "SUPERVGUI_CanvasNode.h"
@@ -89,7 +90,17 @@ SUPERVGUI_Canvas::SUPERVGUI_Canvas( SUPERVGUI_Main* m, SUIT_ResourceMgr* mgr ):
   resize(1050, 750);
   setDoubleBuffering(true);
 
-  QColor aColor = mgr->colorValue( "SUPERVGraph", "Background", DEF_MAIN_COLOR );
+  // mkr : IPAL10825 -->
+  SUPERVGUI* aSupMod = SUPERVGUI::Supervision();
+  if ( !aSupMod ) {
+    MESSAGE("NULL Supervision module!");
+    return;
+  }
+  QColor aColor =  aSupMod->getIVFBackgroundColor();
+  if ( !aColor.isValid() )
+    aColor = mgr->colorValue( "SUPERVGraph", "Background", DEF_MAIN_COLOR );
+  // <--
+     
   //aColor = QColor(SUIT_Session::session()->resourceMgr()->integerValue( "SUPERVGraph", "BackgroundColorRed" ), 
   //             SUIT_Session::session()->resourceMgr()->integerValue( "SUPERVGraph", "BackgroundColorGreen" ), 
   //             SUIT_Session::session()->resourceMgr()->integerValue( "SUPERVGraph", "BackgroundColorBlue" ) );
index bd3d1219f669464415f3b260989c0534b9c9c6d0..19d07d227521aa716a8a2df355a4b9ed07116bfe 100644 (file)
@@ -7,6 +7,7 @@
 //  Module : SUPERV
 
 using namespace std;
+#include "SUPERVGUI.h"
 #include "SUPERVGUI_CanvasArray.h"
 #include "SUPERVGUI_Main.h"
 #include "SUPERVGUI_BrowseNodeDlg.h"
@@ -86,7 +87,17 @@ SUPERVGUI_CanvasArray::SUPERVGUI_CanvasArray(SUPERVGUI_Main* m, SUIT_ResourceMgr
   resize(1000, 725);
   setDoubleBuffering(true);
 
-  QColor aColor = mgr->colorValue( "SUPERVGraph", "Background", DEF_MAIN_COLOR );
+  // mkr : IPAL10825 -->
+  SUPERVGUI* aSupMod = SUPERVGUI::Supervision();
+  if ( !aSupMod ) {
+    MESSAGE("NULL Supervision module!");
+    return;
+  }
+  QColor aColor =  aSupMod->getIVFBackgroundColor();
+  if ( !aColor.isValid() )
+    aColor = mgr->colorValue( "SUPERVGraph", "Background", DEF_MAIN_COLOR );
+  // <--
+  
   //aColor = QColor(SUIT_Session::session()->resourceMgr()->integerValue( "SUPERVGraph", "BackgroundColorRed" ), 
   //             SUIT_Session::session()->resourceMgr()->integerValue( "SUPERVGraph", "BackgroundColorGreen" ), 
   //             SUIT_Session::session()->resourceMgr()->integerValue( "SUPERVGraph", "BackgroundColorBlue" ) );
index b9eeaffc5d04ebd3807b59bfe8bb9d48718be83f..ccf9f06afc66148a26c9fb6d90df537d6a6c13b7 100644 (file)
@@ -204,7 +204,7 @@ void SUPERVGUI_CanvasCellNodePrs::setState(SUPERV::GraphState theState)
 
   default:
     setStatus("No Status");
-    setStatusColor( resMgr()->colorValue( "SUPERVGraph", "Background", DEF_MAIN_BACK ) );
+    setStatusColor( resMgr()->colorValue( "SUPERVGraph", "NodeBody", DEF_MAIN_BACK ) ); // mkr : IPAL10829
     break;
   }
 
index 7eb774c1644a152887f07b2338cc49b7c02ba247..75bd1b8b5be4509d4ce2dc97517ab5f83c8c9871 100644 (file)
@@ -673,10 +673,10 @@ void SUPERVGUI_CanvasNodePrs::drawPort(QPainter& thePainter)
        aPort = (SUPERVGUI_CanvasPort*) obj;
 
        SUPERV_Port aPortEng = aPort->getEngine();
-       if ( CORBA::is_nil( aPortEng ) )
-         printf ( "---\n port engine IS NIL ---\n\n" );
+       //      if ( CORBA::is_nil( aPortEng ) )
+       //        printf ( "---\n port engine IS NIL ---\n\n" );
 
-       if (!aPort->getEngine()->IsGate()) {
+       if ( !CORBA::is_nil( aPortEng ) && !aPortEng->IsGate() ) {
          aPort->getPrs()->draw(thePainter);
        }
       }
@@ -889,7 +889,7 @@ QString SUPERVGUI_CanvasPortPrs::getText() const
     if (aPort->IsParam() || aPort->IsInLine() || myPort->isStream())
       aText = aText + "=" + aPort->ToString();
   }
-  printf( "--- return text of port : %s ---\n", aText.latin1() );
+  //  printf( "--- return text of port : %s ---\n", aText.latin1() );
   return aText;
 }
 
index 3e52a413e50c30ef05fade6d30c8c11a45b760d8..c33671658d7ee0419d38d0ac5c85d2243ea95aca 100644 (file)
@@ -10,6 +10,7 @@
 
 using namespace std;
 
+#include "SUPERVGUI.h"
 #include "SUPERVGUI_CanvasView.h"
 #include "SUPERVGUI_Main.h"
 #include "SUPERVGUI_CanvasNode.h"
@@ -571,6 +572,15 @@ void SUPERVGUI_CanvasView::changeBackground()
     // change background color for array view
     getMain()->getArrayView()->canvas()->setBackgroundColor(aColor);
     getMain()->getArrayView()->setPaletteBackgroundColor(aColor.light(120));
+
+    // mkr : IPAL10825 -->
+    SUPERVGUI* aSupMod = SUPERVGUI::Supervision();
+    if ( !aSupMod ) {
+      MESSAGE("NULL Supervision module!");
+      return;
+    }
+    aSupMod->setIVFBackgroundColor(aColor); 
+    // <--
   }
 }