Logo ROOT   6.08/07
Reference Guide
TQApplication.cxx
Go to the documentation of this file.
1 // @(#)root/qtgsi:$Id$
2 // Author: Denis Bertini, M. Al-Turany 01/11/2000
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 
13 //////////////////////////////////////////////////////////////////////////
14 // //
15 // TQApplication //
16 // //
17 // This class create the ROOT native GUI version of the ROOT //
18 // application environment. This in contrast to the Win32 version. //
19 // Once the native widgets work on Win32 this class can be folded into //
20 // the TApplication class (since all graphic will go via TVirtualX). //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #include "TROOT.h"
25 #include "TQApplication.h"
26 #include "TQRootGuiFactory.h"
27 
29 
30 ////////////////////////////////////////////////////////////////////////////////
31 /// Used by Dictionary()
32 
34  :TApplication()
35 {
36  fCustomized=kFALSE;
37 }
38 
39 ////////////////////////////////////////////////////////////////////////////////
40 /// Create the root application and load the graphic libraries
41 
42 TQApplication::TQApplication(const char *appClassName,
43  Int_t *argc, char **argv, void *options, Int_t numOptions)
44  : TApplication(appClassName,argc,argv,options,numOptions)
45 {
48 }
49 
50 ////////////////////////////////////////////////////////////////////////////////
51 /// Delete ROOT application environment.
52 
54 {
56 }
57 
58 ////////////////////////////////////////////////////////////////////////////////
59 /// Here we overload the LoadGraphicsLibs() function.
60 /// This function now just instantiates a QRootGuiFactory
61 /// object and redirect the global pointer gGuiFactory to point
62 /// to it.
63 
65 {
66  if (gROOT->IsBatch()) return;
67  gROOT->LoadClass("TCanvas", "Gpad");
69 
70 }
71 
72 ////////////////////////////////////////////////////////////////////////////////
73 /// Set the custom flag
74 
76 {
78  if (fCustomized) ((TQRootGuiFactory*) gGuiFactory)->SetCustomFlag(kTRUE);
79 }
virtual void LoadGraphicsLibs()
Here we overload the LoadGraphicsLibs() function.
virtual ~TQApplication()
Delete ROOT application environment.
#define gROOT
Definition: TROOT.h:364
int Int_t
Definition: RtypesCore.h:41
const Bool_t kFALSE
Definition: Rtypes.h:92
virtual void Terminate(Int_t status=0)
Terminate the application by call TSystem::Exit() unless application has been told to return from Run...
R__EXTERN TApplication * gApplication
Definition: TApplication.h:171
Bool_t fCustomized
Definition: TQApplication.h:33
TQApplication()
Used by Dictionary()
R__EXTERN TGuiFactory * gGuiFactory
Definition: TGuiFactory.h:68
void SetCustomized()
Set the custom flag.
#define ClassImp(name)
Definition: Rtypes.h:279
This class creates the ROOT Application Environment that interfaces to the windowing system eventloop...
Definition: TApplication.h:45
const Bool_t kTRUE
Definition: Rtypes.h:91