From: stv Date: Mon, 21 Nov 2005 13:38:25 +0000 (+0000) Subject: Method setShown( bool ) was added. This method allow to show or hide all views. X-Git-Tag: BR_3_1_0_deb~64 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1bbe280f64cbc74a35a7d7e92270ebf4a6e9b0b7;p=modules%2Fgui.git Method setShown( bool ) was added. This method allow to show or hide all views. --- 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();