From 00201a3ede631b42341d51d3485df30921e7a978 Mon Sep 17 00:00:00 2001 From: apo Date: Mon, 10 Oct 2005 05:36:24 +0000 Subject: [PATCH] To apply background color to SVTK viewer --- src/SVTK/SVTK_ViewModel.cxx | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) 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; } //========================================================== -- 2.39.2