00001 // @(#)root/qt:$Id: TQtApplication.h 35874 2010-09-30 07:56:02Z 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_TQtApplication 00014 #define ROOT_TQtApplication 00015 00016 ////////////////////////////////////////////////////////////////////////// 00017 // // 00018 // TQtApplication - Instantiate the Qt system within ROOT environment // 00019 // // 00020 // Instantiate the Qt package by creating Qapplication object if any // 00021 // // 00022 ////////////////////////////////////////////////////////////////////////// 00023 00024 #include "TQtRConfig.h" 00025 #include "Rtypes.h" 00026 00027 class TQtApplicationThread; 00028 00029 class TQtApplication { // : public TApplicationImp 00030 00031 private: 00032 friend class TQtApplicationThread; 00033 TQtApplicationThread *fGUIThread; 00034 00035 void CreateGUIThread(int &argc, char **argv); 00036 00037 static void CreateQApplication(int &argc, char ** argv, bool GUIenabled); 00038 00039 void operator=(const TQtApplication&); 00040 TQtApplication(const TQtApplication&); 00041 00042 protected: 00043 static TQtApplication *fgQtApplication; 00044 00045 public: 00046 00047 TQtApplication() {fGUIThread=0;}; 00048 TQtApplication(const char *appClassName, int &argc, char **argv); 00049 virtual ~TQtApplication(); 00050 static bool Terminate(); 00051 00052 static TQtApplication *GetQtApplication(); 00053 static bool IsThisGuiThread(); 00054 static Int_t QtVersion(); 00055 ClassDef(TQtApplication,0) // Instantiate the Qt system within ROOT environment 00056 00057 }; 00058 #endif