23 #ifndef __GenericEventNotify_h__
24 #define __GenericEventNotify_h__ 1
35 class GenericEventNotifyReceiver;
85 #define DECLARE_GENERICEVENTNOTIFY_SENDER(T,B) \
86 class T : public B, public GenericEventNotifySender \
89 T (QWidget* xparent) : B (xparent), GenericEventNotifySender () { } \
92 bool event (QEvent* evt) \
95 if (! notifyReceiversBefore (this, evt)) \
96 result = B::event (evt); \
97 notifyReceiversAfter (this, evt); \
GenericEventNotifyReceiver(void)
QSet< GenericEventNotifyReceiver * > m_receivers
virtual ~GenericEventNotifySender(void)
virtual void eventNotifyAfter(QObject *obj, QEvent *evt)=0
void notifyReceiversAfter(QObject *obj, QEvent *evt)
bool notifyReceiversBefore(QObject *obj, QEvent *evt)
virtual ~GenericEventNotifyReceiver(void)
void removeReceiver(GenericEventNotifyReceiver *r)
void addReceiver(GenericEventNotifyReceiver *r)
virtual bool eventNotifyBefore(QObject *obj, QEvent *evt)=0
GenericEventNotifySender(void)