00001 // @(#)root/qt:$Id: TQtEvent.h 28205 2009-04-14 19:38:00Z brun $ 00002 // Author: Valeri Fine 21/01/2002 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * 00006 * Copyright (C) 2002 by Valeri Fine. * 00007 * All rights reserved. * 00008 * * 00009 * For the licensing terms see $ROOTSYS/LICENSE. * 00010 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00011 *************************************************************************/ 00012 00013 #ifndef ROOT_TQtEvent 00014 #define ROOT_TQtEvent 00015 00016 #include <QEvent> 00017 00018 class TQtObject; 00019 class TWaitCondition; 00020 //______________________________________________________________________________ 00021 class TQtEvent : public QEvent 00022 { 00023 00024 private: 00025 TWaitCondition *fCondition; 00026 unsigned long *fResult; // QApplication owns QEvent and will destroy it 00027 QObject *fReceiver; 00028 QEvent *fThatEvent; 00029 00030 public: 00031 TQtEvent(int code); 00032 TQtEvent(QObject *o, QEvent *e); 00033 virtual ~TQtEvent(){} 00034 void SetWait(TWaitCondition &condition, unsigned long &result); 00035 void SetWait(TWaitCondition &condition); 00036 void SetResult(unsigned long e=0); 00037 // QEvent *WaitResult(); too dangerous 00038 bool Notify(); 00039 virtual void ExecuteCB(){;} 00040 }; 00041 00042 #endif