00001 //------------------------------------------------------------- 00002 // Go4 Release Package v3.04-01 (build 30401) 00003 // 28-November-2008 00004 //--------------------------------------------------------------- 00005 // The GSI Online Offline Object Oriented (Go4) Project 00006 // Experiment Data Processing at EE department, GSI 00007 //--------------------------------------------------------------- 00008 // 00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI 00010 // Planckstr. 1, 64291 Darmstadt, Germany 00011 //Contact: http://go4.gsi.de 00012 //---------------------------------------------------------------- 00013 //This software can be used under the license agreements as stated 00014 //in Go4License.txt file which is part of the distribution. 00015 //---------------------------------------------------------------- 00016 //Author : Denis Bertini 01.11.2000 00017 00018 /************************************************************************** 00019 * Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI * 00020 * Planckstr. 1, 64291 Darmstadt, Germany * 00021 * All rights reserved. * 00022 * Contact: http://go4.gsi.de * 00023 * * 00024 * This software can be used under the license agreements as stated in * 00025 * Go4License.txt file which is part of the distribution. * 00026 ***************************************************************************/ 00027 00028 00029 00031 // // 00032 // TQApplication // 00033 // // 00034 // This class create the ROOT native GUI version of the ROOT // 00035 // application environment. This in contrast to the Win32 version. // 00036 // Once the native widgets work on Win32 this class can be folded into // 00037 // the TApplication class (since all graphic will go via TVirtualX). // 00038 // // 00040 00041 #include "tqapplication.h" 00042 00043 #include "Riostream.h" 00044 00045 #include "TROOT.h" 00046 #include "TSystem.h" 00047 #include "TGX11.h" 00048 00049 #include "qglobal.h" 00050 00051 #include "tqrootguifactory.h" 00052 00053 //______________________________________________________________________________ 00054 TQApplication::TQApplication() : 00055 TApplication() 00056 { 00057 } 00058 00059 00060 //______________________________________________________________________________ 00061 TQApplication::TQApplication(const char *appClassName, 00062 Int_t *argc, char **argv, void *options, Int_t numOptions) 00063 : TApplication(appClassName,argc,argv,options,numOptions) 00064 { 00065 //qDebug(" TQApplication:creating a qtroot environment\n"); 00066 customized=kFALSE; 00067 LoadGraphicsLibs(); 00068 } 00069 00070 //______________________________________________________________________________ 00071 TQApplication::~TQApplication() 00072 { 00073 00074 // Delete ROOT application environment. 00075 qDebug("~TQApplication called \n"); 00076 if(gApplication) gApplication->Terminate(0); 00077 } 00078 00079 00080 //______________________________________________________________________________ 00081 void TQApplication::LoadGraphicsLibs() 00082 { 00083 //*** No Win32 Gui Factory implemented 00084 if (gROOT->IsBatch()) return; 00085 // loading Canvas and Setting the global GUI Factory ptr 00086 gROOT->LoadClass("TCanvas", "Gpad"); 00087 // gROOT->LoadClass("TGX11", "GX11"); // implicitely loads X11 and Xpm 00088 // gROOT->ProcessLineFast("new TGX11(\"X11\", \"ROOT interface to X11\");"); 00089 gGuiFactory = new TQRootGuiFactory(); 00090 } 00091 00092 //______________________________________________________________________________ 00093 void TQApplication::setCustomized() 00094 { 00095 customized=kTRUE; 00096 if (customized) 00097 ((TQRootGuiFactory*) gGuiFactory)->setCustomFlag(kTRUE); 00098 } 00099 00100 00101 00102 00103 //----------------------------END OF GO4 SOURCE FILE ---------------------