-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
class QString;
class QAction;
class QWidget;
+class QKeySequence;
class SUIT_Desktop;
class SUIT_ViewManager;
//! Returns main widget (Desktop) of the application (if it exists)
virtual SUIT_Desktop* desktop();
- /*! Returns FALSE if application can not be closed (because of non saved data for example).
+ /*! Returns \c 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( bool& );
virtual void viewManagers( const QString&, QList<SUIT_ViewManager*>& ) const = 0;
QAction* action( const int ) const;
+ void addPostRoutine( void (*theRoutine)() );
+
+ /** @name Create tool functions*/ //@{
+ int createTool( const QString&, const QString& = QString() );
+ int createTool( const int, const int, const int = -1 );
+ int createTool( const int, const QString&, const int = -1 );
+ int createTool( QAction*, const int, const int = -1, const int = -1 );
+ int createTool( QAction*, const QString&, const int = -1, const int = -1 );//@}
+ void clearTool( const QString& );
+
+ /** @name Create menu functions*/ //@{
+ int createMenu( const QString&, const int, const int = -1, const int = -1, const int = -1 );
+ int createMenu( const QString&, const QString&, const int = -1, const int = -1, const int = -1 );
+ int createMenu( const int, const int, const int = -1, const int = -1 );
+ int createMenu( const int, const QString&, const int = -1, const int = -1 );
+ int createMenu( QAction*, const int, const int = -1, const int = -1, const int = -1 );
+ int createMenu( QAction*, const QString&, const int = -1, const int = -1, const int = -1 );//@}
+
signals:
void applicationClosed( SUIT_Application* );
void activated( SUIT_Application* );
+// void moving();
void infoChanged( QString );
public slots:
virtual SUIT_Study* createNewStudy();
virtual void setActiveStudy( SUIT_Study* );
- /** @name Create tool functions*/ //@{
- int createTool( const QString& );
- int createTool( const int, const int, const int = -1 );
- int createTool( const int, const QString&, const int = -1 );
- int createTool( QAction*, const int, const int = -1, const int = -1 );
- int createTool( QAction*, const QString&, const int = -1, const int = -1 );//@}
-
- /** @name Create menu functions*/ //@{
- int createMenu( const QString&, const int, const int = -1, const int = -1, const int = -1 );
- int createMenu( const QString&, const QString&, const int = -1, const int = -1, const int = -1 );
- int createMenu( const int, const int, const int = -1, const int = -1 );
- int createMenu( const int, const QString&, const int = -1, const int = -1 );
- int createMenu( QAction*, const int, const int = -1, const int = -1, const int = -1 );
- int createMenu( QAction*, const QString&, const int = -1, const int = -1, const int = -1 );//@}
-
/** @name Set menu shown functions*/ //@{
void setMenuShown( QAction*, const bool );
void setMenuShown( const int, const bool );//@}
const QString&, const int, QObject* = 0,
const bool = false, QObject* = 0, const char* = 0,
const QString& = QString() );
+ QAction* createAction( const int, const QString&, const QIcon&, const QString&,
+ const QString&, const QKeySequence&, QObject* = 0,
+ const bool = false, QObject* = 0, const char* = 0,
+ const QString& = QString() );
protected slots:
virtual void onDesktopActivated();
+// void onDesktopMoved();
private:
SUIT_Study* myStudy;
SUIT_ShortcutMgr* myShortcutMgr;
QLabel* myStatusLabel;
+
+ typedef void (*PostRoutine)();
+ QList<PostRoutine> myPostRoutines;
};
//! This function must return a new application instance.