Salome HOME
ec2ee35e0f6e61498b11addcbce91671f78d2b80
[modules/jobmanager.git] / src / wrappers / BL_MainWindows_SALOME.hxx
1 //  Copyright (C) 2009 CEA/DEN, EDF R&D
2 //
3 //  This library is free software; you can redistribute it and/or
4 //  modify it under the terms of the GNU Lesser General Public
5 //  License as published by the Free Software Foundation; either
6 //  version 2.1 of the License.
7 //
8 //  This library is distributed in the hope that it will be useful,
9 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 //  Lesser General Public License for more details.
12 //
13 //  You should have received a copy of the GNU Lesser General Public
14 //  License along with this library; if not, write to the Free Software
15 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18
19
20 #ifndef _BL_MAINWINDOWS_SALOME_HXX_
21 #define _BL_MAINWINDOWS_SALOME_HXX_
22
23 #include "BL_MainWindows_Wrap.hxx"
24
25 #include <SalomeApp_Application.h>
26 #include <SalomeApp_Module.h>
27
28 #include <SUIT_ViewManager.h>
29 #include <SUIT_ViewModel.h>
30 #include <SUIT_ViewWindow.h>
31 #include <SUIT_Desktop.h>
32
33 namespace BL
34 {
35   class MainWindows_SALOME : virtual public MainWindows_Wrap, 
36                              virtual public SalomeApp_Module
37   {
38     public:
39       MainWindows_SALOME(const QString & module_name);
40       virtual ~MainWindows_SALOME();
41
42       // mandatory by SalomeApp_Module
43       virtual QString  engineIOR() const;
44
45       // Usefull methods for good integration in SALOME
46       virtual void viewManagers( QStringList& list) const; // --- On ajoute nos viewManagers et ensuite LigthApp affiche le dernier
47
48       // mandatory by  MainWindows_Wrap
49       virtual QMainWindow * getDockParent();
50       virtual QMainWindow * getTabParent();
51
52       virtual QAction* createAction(const QString& toolTip,
53                                     const QIcon& icon,
54                                     const QString& menu,
55                                     const QString& status,
56                                     const int shortCut,
57                                     QObject* parent =0,
58                                     bool checkable = false,
59                                     QObject* receiver =0,
60                                     const char* member =0);
61
62       virtual int createTopMenu(const QString & menu_name);
63       virtual void addActionToMenu(QAction * action, int menu_id);
64
65       // Usefull methods
66       virtual void initialize(SalomeApp_Application * appli);
67
68     protected:
69       SalomeApp_Application * _appli;
70       SalomeApp_Module * _module;
71       SUIT_ViewManager * _svm;
72       SUIT_ViewWindow  * _viewWin;
73
74       int _actionId;
75       int getActionId() { return _actionId++; }
76   };
77 }
78
79 #endif
80