From: apo Date: Thu, 22 Sep 2005 05:58:33 +0000 (+0000) Subject: Implementation of InteractorObserver functionality for the GaussPoints Actor class X-Git-Tag: BR-D5-38-2003_D2005-12-10~167 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4afe27dd5ac14de1604c8ca0d5db81114f89f930;p=modules%2Fvisu.git Implementation of InteractorObserver functionality for the GaussPoints Actor class --- diff --git a/src/VISU_I/VISU_GaussPoints_i.cc b/src/VISU_I/VISU_GaussPoints_i.cc index 7fa87b1d..abd082fb 100644 --- a/src/VISU_I/VISU_GaussPoints_i.cc +++ b/src/VISU_I/VISU_GaussPoints_i.cc @@ -33,7 +33,7 @@ using namespace VISU; using namespace std; #ifdef _DEBUG_ -static int MYDEBUG = 0; +static int MYDEBUG = 1; #else static int MYDEBUG = 0; #endif @@ -146,6 +146,43 @@ VISU::GaussPoints_i } +//---------------------------------------------------------------------------- +VISU_GaussPointsPL* +VISU::GaussPoints_i +::GetGaussPointsPL() +{ + return myGaussPointsPL; +} + +QColor +VISU::GaussPoints_i +::GetColor() +{ + return myColor; +} + +void +VISU::GaussPoints_i +::SetColor( const QColor& theColor ) +{ + myColor = theColor; +} + +bool +VISU::GaussPoints_i +::IsColored() +{ + return myIsColored; +} + +void +VISU::GaussPoints_i +::ShowColored( bool theColored ) +{ + myIsColored = theColored; +} + + //---------------------------------------------------------------------------- void VISU::GaussPoints_i @@ -188,10 +225,7 @@ VISU_PipeLine* VISU::GaussPoints_i ::GetPipeLine() { - VISU_GaussPointsPL* aPipeLine = VISU_GaussPointsPL::New(); - aPipeLine->ShallowCopy(myPipeLine); - aPipeLine->Update(); - return aPipeLine; + return GetPL(); } @@ -213,6 +247,13 @@ VISU::GaussPoints_i return anActor; } +//---------------------------------------------------------------------------- +VISU_Actor* +VISU::GaussPoints_i +::CloneActor(VISU_Actor* theActor) +{ + VISU::ScalarMap_i::CloneActor(theActor); +} //---------------------------------------------------------------------------- void @@ -235,23 +276,26 @@ VISU::GaussPoints_i } } - //---------------------------------------------------------------------------- -VISU_Actor* +void VISU::GaussPoints_i -::CloneActor(VISU_Actor* theActor) +::UpdateFromActor(VISU_Actor* theActor) { - VISU::ScalarMap_i::CloneActor(theActor); + if(VISU_GaussPtsAct* anActor = dynamic_cast(theActor)){ + bool aChangeMagnification = anActor->ChangeMagnification(); + if(MYDEBUG) MESSAGE("GaussPoints_i::UpdateFromActor - this = "<