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