Salome HOME
ee85bb7e327bcb10cdd1ec12a82074f704d80f2d
[modules/med.git] / src / MEDCalc / gui / MEDEventListener_i.hxx
1 // Copyright (C) 2011-2021  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 // Authors : Guillaume Boulant (EDF) - 01/06/2011
21
22 #ifndef _MED_EVENTLISTENER_I_HXX_
23 #define _MED_EVENTLISTENER_I_HXX_
24
25 #include <Python.h>
26 #include <SALOMEconfig.h>
27 #include CORBA_SERVER_HEADER(MEDEventListener)
28 #include "SALOME_GenericObj_i.hh"
29
30 #include "MEDCALCGUI.hxx"
31
32 #include <QObject>
33
34 // Multiple inheritance requires QObject to be first
35 class MEDCALCGUI_EXPORT MEDEventListener_i: public QObject,
36         public POA_MEDCALC::MEDEventListener,
37         public SALOME::GenericObj_i
38
39 {
40   Q_OBJECT
41
42 public:
43
44   //
45   // ===========================================================
46   // Functions specified in the IDL interface
47   // ===========================================================
48   //
49   void processMedEvent(const MEDCALC::MedEvent & event);
50
51   //
52   // ===========================================================
53   // Other public functions (non available via CORBA)
54   // ===========================================================
55   //
56   static MEDEventListener_i * getInstance();
57   static void release();
58
59 signals:
60   //void medEventSignal();
61   void medEventSignal(const MEDCALC::MedEvent * event);
62
63
64 private:
65   MEDEventListener_i();
66   ~MEDEventListener_i();
67
68   static MEDEventListener_i * _instance;
69
70 };
71
72 #endif // _MED_EVENTLISTENER_I_HXX_