+// 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
//! 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
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 );
private:
SUIT_Study* myStudy;
SUIT_Desktop* myDesktop;
+ QMap<int, QAction*> myActionMap;
QLabel* myStatusLabel;
};