00001 // @(#)root/qtgsi:$Id: TQRootApplication.h 32344 2010-02-15 16:15:57Z bellenot $ 00002 // Author: Denis Bertini, M. AL-Turany 01/11/2000 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. * 00006 * All rights reserved. * 00007 * * 00008 * For the licensing terms see $ROOTSYS/LICENSE. * 00009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00010 *************************************************************************/ 00011 00012 #ifndef ROOT_TQRootApplication 00013 #define ROOT_TQRootApplication 00014 00015 ////////////////////////////////////////////////////////////////////// 00016 // 00017 // TQRootApplication 00018 // 00019 // This class creates Qt environement that will 00020 // interface with the ROOT windowing system eventloop and eventhandlers, 00021 // via a polling mechanism. 00022 // 00023 /////////////////////////////////////////////////////////////////////// 00024 00025 #ifndef __CINT__ 00026 #include "qapplication.h" 00027 #include "qobject.h" 00028 #include "qtimer.h" 00029 #endif 00030 00031 #ifndef ROOT_Rtypes 00032 #include "Rtypes.h" 00033 #endif 00034 00035 class TTimer; 00036 class QApplication; 00037 class QTimer; 00038 00039 class TQRootApplication : public QApplication { 00040 #ifndef __CINT__ 00041 Q_OBJECT 00042 #endif 00043 private: 00044 TQRootApplication(const TQRootApplication &); 00045 TQRootApplication& operator=(const TQRootApplication &); 00046 protected: 00047 QTimer *fQTimer; // Qt timer that poll the event loop of ROOT 00048 TTimer *fRTimer; // Root timer 00049 public: 00050 static Bool_t fgDebug, fgWarning; // debug and warning flags 00051 00052 TQRootApplication(int &argc, char **argv,int poll=0); 00053 ~TQRootApplication(); 00054 void SetDebugOn(){ fgDebug=kTRUE; } 00055 void SetWarningOn(){ fgWarning=kTRUE;} 00056 public slots: 00057 void Execute(); 00058 void Quit(); 00059 00060 public: 00061 ClassDef(TQRootApplication,1) //creates Qt environement interface with the ROOT windowing system 00062 }; 00063 00064 #endif