From: ouv Date: Mon, 3 Oct 2005 12:42:18 +0000 (+0000) Subject: Loading presentation parameters from resources X-Git-Tag: BR-D5-38-2003_D2005-12-10~85 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=de1a5edb7d125ac0f6de3b2a40fc4d8331612c74;p=modules%2Fvisu.git Loading presentation parameters from resources --- diff --git a/src/VISU_I/VISU_GaussPoints_i.cc b/src/VISU_I/VISU_GaussPoints_i.cc index 6be98763..aa9f70e9 100644 --- a/src/VISU_I/VISU_GaussPoints_i.cc +++ b/src/VISU_I/VISU_GaussPoints_i.cc @@ -106,7 +106,8 @@ GaussPoints_i(Result_i* theResult, myIsColored(true), myColor(Qt::blue), myIsActiveLocalScalarBar(true), - myIsDispGlobalScalarBar(true) + myIsDispGlobalScalarBar(true), + mySpacing(0.01) { if(MYDEBUG) MESSAGE("GaussPoints_i::GaussPoints_i - this = "<integerValue( "VISU", "scalar_bar_active_local", GetIsActiveLocalScalarBar() ); + SetIsActiveLocalScalarBar( anActiveLocal == 0 ); + + bool aDisplayGlobal = aResourceMgr->booleanValue( "VISU", "scalar_bar_diplay_global", GetIsDispGlobalScalarBar() ); + SetIsDispGlobalScalarBar( aDisplayGlobal ); + + int aBicolor = aResourceMgr->integerValue( "VISU", "scalar_bar_bicolor", GetGaussPointsPL()->GetBicolor() ); + GetGaussPointsPL()->SetBicolor( aBicolor == 0 ); + + float aSpacing = aResourceMgr->doubleValue( "VISU", "scalar_bar_spacing", GetSpacing() ); + SetSpacing( aSpacing ); + float aClamp = aResourceMgr->doubleValue( "VISU", "point_sprite_clamp", GetClamp() ); SetClamp( aClamp ); - float aConstSize = aResourceMgr->doubleValue( "VISU", "point_sprite_size", GetConstSize() ); - SetConstSize( aConstSize ); - float aMinSize = aResourceMgr->doubleValue( "VISU", "point_sprite_min_size", GetMinSize() ); SetMinSize( aMinSize ); float aMaxSize = aResourceMgr->doubleValue( "VISU", "point_sprite_max_size", GetMaxSize() ); SetMaxSize( aMaxSize ); + float aConstSize = aResourceMgr->doubleValue( "VISU", "point_sprite_size", GetConstSize() ); + SetConstSize( aConstSize ); + float aMagnification = aResourceMgr->doubleValue( "VISU", "point_sprite_magnification", GetMagnification() ); SetMagnification( aMagnification ); @@ -215,6 +228,14 @@ VISU::GaussPoints_i return myGaussPointsPL; } +void +VISU::GaussPoints_i +::SetIsColored( bool theIsColored ) +{ + myIsColored = theIsColored; + myGaussPointsPL->SetIsColored( theIsColored ); +} + bool VISU::GaussPoints_i ::SetMainTexture( const QString& theMainTexture ) @@ -510,6 +531,8 @@ VISU::GaussPoints_i aScalarBarCtrl->SetHeight(myHeight); aScalarBarCtrl->SetPosition(myPosition); + aScalarBarCtrl->SetSpacing(mySpacing); + // Bicolor bool anIsBicolor = GetGaussPointsPL()->GetBicolor(); aScalarBarCtrl->SetBicolor(anIsBicolor); @@ -615,3 +638,17 @@ VISU::GaussPoints_i { return myIsDispGlobalScalarBar; } + +void +VISU::GaussPoints_i +::SetSpacing(const float theSpacing) +{ + mySpacing = theSpacing; +} + +float +VISU::GaussPoints_i +::GetSpacing() const +{ + return mySpacing; +} diff --git a/src/VISU_I/VISU_GaussPoints_i.hh b/src/VISU_I/VISU_GaussPoints_i.hh index 312c1c8d..6c63572c 100644 --- a/src/VISU_I/VISU_GaussPoints_i.hh +++ b/src/VISU_I/VISU_GaussPoints_i.hh @@ -78,7 +78,7 @@ namespace VISU GetIsColored() { return myIsColored; } void - SetIsColored( bool theIsColored ) { myIsColored = theIsColored; } + SetIsColored( bool theIsColored ); bool SetMainTexture( const QString& theMainTexture ); @@ -156,6 +156,12 @@ namespace VISU bool GetIsDispGlobalScalarBar() const; + void + SetSpacing(const float theSpacing); + + float + GetSpacing() const; + protected: virtual void @@ -186,6 +192,7 @@ namespace VISU bool myIsDispGlobalScalarBar; bool myIsActiveLocalScalarBar; QColor myColor; + float mySpacing; QString myMainTexture; QString myAlphaTexture;