24 #ifndef SALOME_EVENT_H
25 #define SALOME_EVENT_H
32 #define SALOME_EVENT QEvent::Type( QEvent::User + 10000 )
41 void setData(
void* data );
55 void ExecutePostedEvent();
58 static bool IsSessionThread();
63 static void GetSessionThread();
107 template<
class TObject,
typename TRes,
typename TArg,
typename TStoreArg = TArg>
131 template<
class TObject,
typename TArg,
typename TStoreArg = TArg>
151 template<
class TObject,
typename TRes,
typename TArg,
typename TArg1,
typename TStoreArg = TArg,
typename TStoreArg1 = TArg1>
159 TArg theArg, TArg1 theArg1,
178 template<
class TObject,
typename TArg,
typename TArg1,
typename TStoreArg = TArg,
typename TStoreArg1 = TArg1>
182 typedef void (TObject::*
TAction)(TArg,TArg1);
200 template<
class TEvent>
inline typename TEvent::TResult
ProcessEvent(TEvent* theEvent)
202 typename TEvent::TResult aResult;
205 aResult = theEvent->myResult;
209 aResult = theEvent->myResult;
#define EVENT_EXPORT
Definition: Event.h:33
TEvent::TResult ProcessEvent(TEvent *theEvent)
Definition: SALOME_Event.h:200
void ProcessVoidEvent(SALOME_Event *theEvent)
Definition: SALOME_Event.h:215
Generic event class for user-defined events.
Definition: SALOME_Event.h:35
void * d
internal data
Definition: SALOME_Event.h:44
The class which encapsulates data and functionality required for posting component-specific events to...
Definition: SALOME_Event.h:50
virtual void Execute()=0
This method should be redefined in the successor classes to do real work.
void process()
Post the event and wait for its completion. process() should be called from a secondary thread only.
Definition: SALOME_Event.cxx:243
QSemaphore * mySemaphore
internal semaphore
Definition: SALOME_Event.h:66
static bool IsSessionThread()
Check if the processing is in the main application thread.
Definition: SALOME_Event.cxx:192
Template class for event which calls the function with one argument and returning result.
Definition: SALOME_Event.h:109
TResult myResult
Definition: SALOME_Event.h:112
TResult(TObject::* TAction)(TArg)
Definition: SALOME_Event.h:113
TRes TResult
Definition: SALOME_Event.h:111
TStoreArg myArg
Definition: SALOME_Event.h:128
TAction myAction
Definition: SALOME_Event.h:127
TObject * myObject
Definition: SALOME_Event.h:126
TMemFun1ArgEvent(TObject *theObject, TAction theAction, TArg theArg, TResult theResult=TResult())
Definition: SALOME_Event.h:114
virtual void Execute()
This method should be redefined in the successor classes to do real work.
Definition: SALOME_Event.h:121
Template class for event which calls the function with two arguments and returning result.
Definition: SALOME_Event.h:153
TObject * myObject
Definition: SALOME_Event.h:172
virtual void Execute()
This method should be redefined in the successor classes to do real work.
Definition: SALOME_Event.h:167
TResult(TObject::* TAction)(TArg, TArg1)
Definition: SALOME_Event.h:157
TMemFun2ArgEvent(TObject *theObject, TAction theAction, TArg theArg, TArg1 theArg1, TResult theResult=TResult())
Definition: SALOME_Event.h:158
TStoreArg myArg
Definition: SALOME_Event.h:174
TRes TResult
Definition: SALOME_Event.h:155
TAction myAction
Definition: SALOME_Event.h:173
TResult myResult
Definition: SALOME_Event.h:156
TStoreArg1 myArg1
Definition: SALOME_Event.h:175
Template class for event which calls the function without arguments and returning result.
Definition: SALOME_Event.h:70
TAction myAction
Definition: SALOME_Event.h:87
TResult(TObject::* TAction)()
Definition: SALOME_Event.h:74
TResult myResult
Definition: SALOME_Event.h:73
TObject * myObject
Definition: SALOME_Event.h:86
TMemFunEvent(TObject *theObject, TAction theAction, TResult theResult=TResult())
Definition: SALOME_Event.h:75
virtual void Execute()
This method should be redefined in the successor classes to do real work.
Definition: SALOME_Event.h:81
TRes TResult
Definition: SALOME_Event.h:72
Template class for event which calls the function with one argument and without return value.
Definition: SALOME_Event.h:133
TObject * myObject
Definition: SALOME_Event.h:146
TStoreArg myArg
Definition: SALOME_Event.h:148
TVoidMemFun1ArgEvent(TObject *theObject, TAction theAction, TArg theArg)
Definition: SALOME_Event.h:136
TAction myAction
Definition: SALOME_Event.h:147
virtual void Execute()
This method should be redefined in the successor classes to do real work.
Definition: SALOME_Event.h:141
void(TObject::* TAction)(TArg)
Definition: SALOME_Event.h:135
Template class for event which calls the function with two arguments and without return value.
Definition: SALOME_Event.h:180
TVoidMemFun2ArgEvent(TObject *theObject, TAction theAction, TArg theArg, TArg1 theArg1)
Definition: SALOME_Event.h:183
void(TObject::* TAction)(TArg, TArg1)
Definition: SALOME_Event.h:182
TStoreArg myArg
Definition: SALOME_Event.h:196
TAction myAction
Definition: SALOME_Event.h:195
virtual void Execute()
This method should be redefined in the successor classes to do real work.
Definition: SALOME_Event.h:189
TStoreArg1 myArg1
Definition: SALOME_Event.h:197
TObject * myObject
Definition: SALOME_Event.h:194
Template class for event which calls the function without arguments and without return value.
Definition: SALOME_Event.h:91
TAction myAction
Definition: SALOME_Event.h:104
TObject * myObject
Definition: SALOME_Event.h:103
virtual void Execute()
This method should be redefined in the successor classes to do real work.
Definition: SALOME_Event.h:98
void(TObject::* TAction)()
Definition: SALOME_Event.h:93
TVoidMemFunEvent(TObject *theObject, TAction theAction)
Definition: SALOME_Event.h:94
int Type
Definition: VTKViewer_Actor.h:62