From: apo Date: Mon, 10 Oct 2005 05:36:24 +0000 (+0000) Subject: To apply background color to SVTK viewer X-Git-Tag: BR-D5-38-2003_D2005-12-10~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=00201a3ede631b42341d51d3485df30921e7a978;p=modules%2Fgui.git To apply background color to SVTK viewer --- diff --git a/src/SVTK/SVTK_ViewModel.cxx b/src/SVTK/SVTK_ViewModel.cxx index e569f82b6..888e3ac63 100644 --- a/src/SVTK/SVTK_ViewModel.cxx +++ b/src/SVTK/SVTK_ViewModel.cxx @@ -50,25 +50,42 @@ static _PTR(Study) getStudyDS() } //========================================================== -SVTK_Viewer::SVTK_Viewer() +SVTK_Viewer +::SVTK_Viewer() { - myTrihedronSize = 100; + myTrihedronSize = 105; } //========================================================== -SVTK_Viewer::~SVTK_Viewer() +SVTK_Viewer +::~SVTK_Viewer() { } -QColor SVTK_Viewer::backgroundColor() const +QColor +SVTK_Viewer +::backgroundColor() const { return myBgColor; } -void SVTK_Viewer::setBackgroundColor( const QColor& c ) +void +SVTK_Viewer +::setBackgroundColor( const QColor& theColor ) { - if ( c.isValid() ) - myBgColor = c; + if ( !theColor.isValid() ) + return; + + QPtrVector aViews = myViewManager->getViews(); + for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){ + if(SUIT_ViewWindow* aViewWindow = aViews.at(i)){ + if(TViewWindow* aView = dynamic_cast(aViewWindow)){ + aView->getMainWindow()->SetBackgroundColor(theColor); + } + } + } + + myBgColor = theColor; } //==========================================================