]> SALOME platform Git repositories - modules/med.git/blob - src/MEDCalc/gui/MEDModule.hxx
Salome HOME
[MEDCalc] add presentations and view mode
[modules/med.git] / src / MEDCalc / gui / MEDModule.hxx
1 // Copyright (C) 2007-2016  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, or (at your option) any later version.
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 // Author : Guillaume Boulant (EDF)
21
22 #ifndef _MED_MODULE_HXX_
23 #define _MED_MODULE_HXX_
24
25 #include "MEDCALCGUI.hxx"
26
27 #include <SalomeApp_Module.h>
28
29 #include "WorkspaceController.hxx"
30 #include "XmedDataModel.hxx"
31 #include "DatasourceController.hxx"
32 #include "PresentationController.hxx"
33
34 #include <SALOMEconfig.h>
35 #include CORBA_CLIENT_HEADER(MED_Gen)
36 #include CORBA_SERVER_HEADER(MEDPresentationManager)
37
38 class SalomeApp_Application;
39
40 /*!
41  * This class defines the gui of the MED module.
42  */
43 class MEDCALCGUI_EXPORT MEDModule: public SalomeApp_Module
44 {
45   Q_OBJECT
46
47   // ===========================================================
48   // This part implements the standard interface of a SALOME gui
49   // ===========================================================
50
51 public:
52   MEDModule();
53   ~MEDModule();
54
55   static MED_ORB::MED_Gen_var engine();
56
57   virtual void                    initialize( CAM_Application* app );
58   virtual QString                 engineIOR() const;
59
60   virtual QString                 iconName() const;
61
62   virtual void                    windows( QMap<int, int>& theMap ) const;
63   virtual void                    viewManagers( QStringList& theList ) const;
64
65   int createStandardAction(const QString& label,
66                            QObject * slotobject,
67                            const char* slotmember,
68                            const QString& iconName,
69                            const QString& tooltip=QString());
70   void addActionInPopupMenu(int actionId,const QString& menus="",const QString& rule="client='ObjectBrowser'");
71
72   MEDCALC::MEDPresentationViewMode getSelectedViewMode();
73
74 public slots:
75   virtual bool                    activateModule( SUIT_Study* theStudy );
76   virtual bool                    deactivateModule( SUIT_Study* theStudy );
77
78 private:
79   void createModuleWidgets();
80   void createModuleActions();
81   static void init();
82
83 private:
84   DatasourceController * _datasourceController;
85   WorkspaceController *  _workspaceController;
86   XmedDataModel *        _xmedDataModel;
87   PresentationController *  _presentationController;
88   static MED_ORB::MED_Gen_var myEngine;
89 };
90
91 #endif