From f18cfd4053f6abb5c16dfabb3058202a3ae081a5 Mon Sep 17 00:00:00 2001 From: apo Date: Wed, 5 Oct 2005 08:00:12 +0000 Subject: [PATCH] To move Set/GetBarOrientation from Colored3d to ScalarMap to provide backward compatibility --- src/VISU_I/VISU_ColoredPrs3d_i.cc | 22 +++++++++++----------- src/VISU_I/VISU_ColoredPrs3d_i.hh | 8 ++++---- src/VISU_I/VISU_ScalarMap_i.cc | 4 ++-- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/VISU_I/VISU_ColoredPrs3d_i.cc b/src/VISU_I/VISU_ColoredPrs3d_i.cc index 154bec64..d6a83498 100644 --- a/src/VISU_I/VISU_ColoredPrs3d_i.cc +++ b/src/VISU_I/VISU_ColoredPrs3d_i.cc @@ -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(); diff --git a/src/VISU_I/VISU_ColoredPrs3d_i.hh b/src/VISU_I/VISU_ColoredPrs3d_i.hh index 57456253..cdbfaeb2 100644 --- a/src/VISU_I/VISU_ColoredPrs3d_i.hh +++ b/src/VISU_I/VISU_ColoredPrs3d_i.hh @@ -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; diff --git a/src/VISU_I/VISU_ScalarMap_i.cc b/src/VISU_I/VISU_ScalarMap_i.cc index 66b1f09a..3677b0d0 100644 --- a/src/VISU_I/VISU_ScalarMap_i.cc +++ b/src/VISU_I/VISU_ScalarMap_i.cc @@ -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 -- 2.39.2