From bfca433a73891cc49eaaf9a1b9e615e2fae73b93 Mon Sep 17 00:00:00 2001 From: ouv Date: Thu, 13 Oct 2005 11:25:45 +0000 Subject: [PATCH] Inherited from the SALOME_View --- src/VVTK/VVTK_ViewModel.cxx | 16 ++++++++++++++++ src/VVTK/VVTK_ViewModel.h | 7 ++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/VVTK/VVTK_ViewModel.cxx b/src/VVTK/VVTK_ViewModel.cxx index e0a4b62f..d2618e99 100644 --- a/src/VVTK/VVTK_ViewModel.cxx +++ b/src/VVTK/VVTK_ViewModel.cxx @@ -90,6 +90,22 @@ VVTK_Viewer } +//========================================================== +bool +VVTK_Viewer +::isVisible( const Handle(SALOME_InteractiveObject)& io ) +{ + 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)) + if(!aView->getView()->isVisible( io )) + return false; + + return true; +} + + //========================================================== void VVTK_Viewer diff --git a/src/VVTK/VVTK_ViewModel.h b/src/VVTK/VVTK_ViewModel.h index 3c8bd709..6c2453b1 100644 --- a/src/VVTK/VVTK_ViewModel.h +++ b/src/VVTK/VVTK_ViewModel.h @@ -6,9 +6,12 @@ #include "VVTK.h" #include "SVTK_ViewModelBase.h" +#include "SALOME_Prs.h" +#include "SALOME_InteractiveObject.hxx" + class VVTK_ViewWindow; -class VVTK_EXPORT VVTK_Viewer : public SVTK_ViewModelBase +class VVTK_EXPORT VVTK_Viewer : public SVTK_ViewModelBase, public SALOME_View { Q_OBJECT; @@ -27,6 +30,8 @@ public: virtual void Repaint(); + virtual bool isVisible( const Handle(SALOME_InteractiveObject)& ); + QColor backgroundColor() const; void setBackgroundColor( const QColor& ); -- 2.39.2