From 1bbe280f64cbc74a35a7d7e92270ebf4a6e9b0b7 Mon Sep 17 00:00:00 2001 From: stv Date: Mon, 21 Nov 2005 13:38:25 +0000 Subject: [PATCH] Method setShown( bool ) was added. This method allow to show or hide all views. --- src/SUIT/SUIT_ViewManager.cxx | 14 ++++++++++++-- src/SUIT/SUIT_ViewManager.h | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/SUIT/SUIT_ViewManager.cxx b/src/SUIT/SUIT_ViewManager.cxx index 66ebcf7c0..124328901 100755 --- a/src/SUIT/SUIT_ViewManager.cxx +++ b/src/SUIT/SUIT_ViewManager.cxx @@ -38,8 +38,9 @@ myStudy( NULL ) /*!Destructor.*/ SUIT_ViewManager::~SUIT_ViewManager() { - if (myViewModel) { - myViewModel->setViewManager(0); + if ( myViewModel ) + { + myViewModel->setViewManager( 0 ); delete myViewModel; } } @@ -169,6 +170,15 @@ void SUIT_ViewManager::removeView(SUIT_ViewWindow* theView) emit lastViewClosed(this); } +/*! + Show or hide all views (view windows) +*/ +void SUIT_ViewManager::setShown( const bool on ) +{ + for ( uint i = 0; i < myViews.count(); i++ ) + myViews.at( i )->setShown( on ); +} + /*!Emit on \a theEvent mouse pressed in \a theView.*/ void SUIT_ViewManager::onMousePressed(SUIT_ViewWindow* theView, QMouseEvent* theEvent) { diff --git a/src/SUIT/SUIT_ViewManager.h b/src/SUIT/SUIT_ViewManager.h index eb82e0b7a..af358d1d7 100755 --- a/src/SUIT/SUIT_ViewManager.h +++ b/src/SUIT/SUIT_ViewManager.h @@ -46,6 +46,8 @@ public: SUIT_ViewWindow* createViewWindow(); + virtual void setShown( const bool ); + public slots: void createView(); void closeAllViews(); -- 2.39.2