Salome HOME
Join modifications from branch OCC_development_for_3_2_0a2
[modules/gui.git] / src / SUIT / SUIT_Application.h
index 283d546de6103c869087bd5012a8651aa376bd70..5bab83a1445a7154eb515c0d995bc3158ac9498a 100755 (executable)
@@ -1,3 +1,21 @@
+// Copyright (C) 2005  OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either 
+// version 2.1 of the License.
+// 
+// This library is distributed in the hope that it will be useful 
+// but WITHOUT ANY WARRANTY; without even the implied warranty of 
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public  
+// License along with this library; if not, write to the Free Software 
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/
+//
 #ifndef SUIT_APPLICATION_H
 #define SUIT_APPLICATION_H
 
@@ -38,10 +56,12 @@ public:
   //! Returns main widget (Desktop) of the application (if it exists)
   virtual SUIT_Desktop* desktop();
 
-  /*! Returns FALSE if applic ation can not be closed (because of non saved data for example). 
+  /*! Returns FALSE if application can not be closed (because of non saved data for example). 
       This method called by SUIT_Session whin closing of application was requested. */
   virtual bool          isPossibleToClose();
 
+  /*! Performs some finalization of life cycle of this application.
+      For instance, the application can force its documents(s) to close. */
   virtual void          closeApplication();
 
   //! Returns active Study. If Application supports wirking with several studies this method should be redefined
@@ -120,10 +140,13 @@ protected:
   void                  setToolShown( QAction*, const bool );
   void                  setToolShown( const int, const bool );//@}
 
+  void                  setActionShown( QAction*, const bool );
+  void                  setActionShown( const int, const bool );
+
   static QAction*       separator();
   QAction*              action( const int ) const;
   int                   actionId( const QAction* ) const;
-  void                  registerAction( const int, QAction* );
+  int                   registerAction( const int, QAction* );
   QAction*              createAction( const int, const QString&, const QIconSet&, const QString&,
                                       const QString&, const int, QObject* = 0,
                                       const bool = false, QObject* = 0, const char* = 0 );
@@ -134,6 +157,7 @@ protected slots:
 private:
   SUIT_Study*           myStudy;
   SUIT_Desktop*         myDesktop;
+  QMap<int, QAction*>   myActionMap;
 
   QLabel*               myStatusLabel;
 };