]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To move Set/GetBarOrientation from Colored3d to ScalarMap to provide backward compati...
authorapo <apo@opencascade.com>
Wed, 5 Oct 2005 08:00:12 +0000 (08:00 +0000)
committerapo <apo@opencascade.com>
Wed, 5 Oct 2005 08:00:12 +0000 (08:00 +0000)
src/VISU_I/VISU_ColoredPrs3d_i.cc
src/VISU_I/VISU_ColoredPrs3d_i.hh
src/VISU_I/VISU_ScalarMap_i.cc

index 154bec64ab26577facbbcd3618cd42fcab4da600..d6a8349888bd4bbb8fe2758ca06ec0643027aa6c 100644 (file)
@@ -95,7 +95,7 @@ VISU::ColoredPrs3d_i
 
   SetScalarMode(anOrigin->GetScalarMode());
   SetNbColors(anOrigin->GetNbColors());
-  SetScalarBarOrientation(anOrigin->GetScalarBarOrientation());
+  SetBarOrientation(anOrigin->GetBarOrientation());
 
   SetPosition(anOrigin->GetPosX(), anOrigin->GetPosY());
   SetSize(anOrigin->GetWidth(), anOrigin->GetHeight());
@@ -162,14 +162,14 @@ VISU::ColoredPrs3d_i
 
 void
 VISU::ColoredPrs3d_i
-::SetScalarBarOrientation(VISU::ColoredPrd3d::ScalarBarOrientation theOrientation)
+::SetBarOrientation(VISU::ScalarMap::Orientation theOrientation)
 {
   myOrientation = theOrientation;
 }
 
-VISU::ColoredPrd3d::ScalarBarOrientation 
+VISU::ScalarMap::Orientation 
 VISU::ColoredPrs3d_i
-::GetScalarBarOrientation() 
+::GetBarOrientation() 
 {
   return myOrientation;
 }
@@ -419,26 +419,26 @@ VISU::ColoredPrs3d_i
   // Orientation
   int anOrientation = aResourceMgr->integerValue("VISU", "scalar_bar_orientation", 0);
   if(anOrientation == 1)
-    myOrientation = VISU::ColoredPrd3d::HORIZONTAL;
+    myOrientation = VISU::ScalarMap::HORIZONTAL;
   else
-    myOrientation = VISU::ColoredPrd3d::VERTICAL;
+    myOrientation = VISU::ScalarMap::VERTICAL;
 
   // Scalar Bar origin
   QString propertyName = QString( "scalar_bar_%1_" ).arg( anOrientation == 0 ? "vertical" : "horizontal" );
 
-  float aXorigin = (myOrientation == VISU::ColoredPrd3d::VERTICAL) ? 0.01 : 0.2;
+  float aXorigin = (myOrientation == VISU::ScalarMap::VERTICAL) ? 0.01 : 0.2;
   aXorigin = aResourceMgr->doubleValue("VISU", propertyName + "x", aXorigin);
   myPosition[0] = aXorigin;
 
-  float aYorigin = (myOrientation == VISU::ColoredPrd3d::VERTICAL) ? 0.1 : 0.012;
+  float aYorigin = (myOrientation == VISU::ScalarMap::VERTICAL) ? 0.1 : 0.012;
   aYorigin = aResourceMgr->doubleValue("VISU", propertyName + "y", aYorigin);
   myPosition[1] = aYorigin;
 
   // Scalar Bar size
-  myWidth = (myOrientation == VISU::ColoredPrd3d::VERTICAL)? 0.1 : 0.6;
+  myWidth = (myOrientation == VISU::ScalarMap::VERTICAL)? 0.1 : 0.6;
   myWidth = aResourceMgr->doubleValue("VISU", propertyName + "width", myWidth);
 
-  myHeight = (myOrientation == VISU::ColoredPrd3d::VERTICAL)? 0.8:0.12;
+  myHeight = (myOrientation == VISU::ScalarMap::VERTICAL)? 0.8:0.12;
   myHeight = aResourceMgr->doubleValue("VISU", propertyName + "height", myHeight);
 
   // Nb of Labels
@@ -509,7 +509,7 @@ VISU::ColoredPrs3d_i
 
   SetScalarMode(VISU::Storable::FindValue(theMap,"myScalarMode").toInt());
   SetNbColors(VISU::Storable::FindValue(theMap,"myNumberOfColors").toInt());
-  SetScalarBarOrientation((VISU::ColoredPrd3d::ScalarBarOrientation)VISU::Storable::FindValue(theMap,"myOrientation").toInt());
+  SetBarOrientation((VISU::ScalarMap::Orientation)VISU::Storable::FindValue(theMap,"myOrientation").toInt());
   
   myMeshName = VISU::Storable::FindValue(theMap,"myMeshName").latin1();
   myEntity = (VISU::TEntity)VISU::Storable::FindValue(theMap,"myEntity").toInt();
index 57456253ffdc217184288f0bc838dffcd4031940..cdbfaeb29846cb753bab90c39f36c77ade06a357 100644 (file)
@@ -76,11 +76,11 @@ namespace VISU
 
     virtual
     void
-    SetScalarBarOrientation(VISU::ColoredPrd3d::ScalarBarOrientation theOrientation);
+    SetBarOrientation(VISU::ScalarMap::Orientation theOrientation);
 
     virtual 
-    VISU::ColoredPrd3d::ScalarBarOrientation 
-    GetScalarBarOrientation();
+    VISU::ScalarMap::Orientation 
+    GetBarOrientation();
 
     virtual
     void
@@ -124,7 +124,7 @@ namespace VISU
 
     //----------------------------------------------------------------------------
   protected:
-    VISU::ColoredPrd3d::ScalarBarOrientation myOrientation;
+    VISU::ScalarMap::Orientation myOrientation;
     std::string myTitle;
     int myNumberOfLabels;
     float myPosition[2], myWidth, myHeight;
index 66b1f09a9c032693d24c6ee0784e5cefc0b81f36..3677b0d0a4772817e322eef9610b5cbf5df083a9 100644 (file)
@@ -209,14 +209,14 @@ void
 VISU::ScalarMap_i
 ::SetBarOrientation(VISU::ScalarMap::Orientation theOrientation)
 {
-  SetScalarBarOrientation((VISU::ColoredPrd3d::ScalarBarOrientation)theOrientation);
+  TSuperClass::SetBarOrientation(theOrientation);
 }
 
 VISU::ScalarMap::Orientation 
 VISU::ScalarMap_i
 ::GetBarOrientation() 
 {
-  return (VISU::ScalarMap::Orientation)GetScalarBarOrientation();
+  return TSuperClass::GetBarOrientation();
 }
 
 VISU::Scaling