From cfddcf10326b1b2a5181789e2bdff11fb15292dd Mon Sep 17 00:00:00 2001 From: mkr Date: Thu, 8 Nov 2007 11:23:49 +0000 Subject: [PATCH] 1) IMP NPAL13547: Checkbox to kill SALOME completely. 2) Add SUIT_ViewManager::getId() method. --- src/SUIT/SUIT_Session.cxx | 20 +++++++++++++++++++- src/SUIT/SUIT_Session.h | 3 +++ src/SUIT/SUIT_ViewManager.h | 2 ++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/SUIT/SUIT_Session.cxx b/src/SUIT/SUIT_Session.cxx index b42d02b15..31b38b3a4 100755 --- a/src/SUIT/SUIT_Session.cxx +++ b/src/SUIT/SUIT_Session.cxx @@ -47,7 +47,8 @@ SUIT_Session::SUIT_Session() myResMgr( 0 ), myHandler( 0 ), myActiveApp( 0 ), -myExitStatus( FROM_GUI ) +myExitStatus( FROM_GUI ), +myServersShutdown ( true ) { SUIT_ASSERT( !mySession ) @@ -260,6 +261,23 @@ void SUIT_Session::closeSession( int mode ) } } +/*! + Set a flag to shutdown or not standalone servers at exit of application. +*/ +void SUIT_Session::serversShutdown( bool theVal ) +{ + myServersShutdown = theVal; +} + +/*! + \retval Return TRUE, if standalone servers will be shutdown at exit of application, + FALSE otherwise. +*/ +bool SUIT_Session::isServersShutdown() const +{ + return myServersShutdown; +} + /*! \retval return myHandler*/ SUIT_ExceptionHandler* SUIT_Session::handler() const { diff --git a/src/SUIT/SUIT_Session.h b/src/SUIT/SUIT_Session.h index 840de5927..1565fc40e 100755 --- a/src/SUIT/SUIT_Session.h +++ b/src/SUIT/SUIT_Session.h @@ -71,6 +71,8 @@ public: SUIT_ResourceMgr* resourceMgr() const; void closeSession( int mode = ASK ); + void serversShutdown( bool theVal ); + bool isServersShutdown() const; SUIT_ExceptionHandler* handler() const; @@ -108,6 +110,7 @@ private: static SUIT_Session* mySession; int myExitStatus; + bool myServersShutdown; }; #endif diff --git a/src/SUIT/SUIT_ViewManager.h b/src/SUIT/SUIT_ViewManager.h index 9fdd2ecd8..ced80a1c7 100755 --- a/src/SUIT/SUIT_ViewManager.h +++ b/src/SUIT/SUIT_ViewManager.h @@ -68,6 +68,8 @@ public: virtual void setShown( const bool ); virtual void setDestructiveClose( const bool ); + int getId() const { return myId; } + public slots: void createView(); void closeAllViews(); -- 2.39.2