Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/qtroot/interface/tqrootguifactory.cpp

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE 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 
00030 //                                                                      //
00031 // TQRootGuiFactory                                                      //
00032 //                                                                      //
00033 // This class is a factory for Qt GUI components. It overrides          //
00034 // the member functions of the ABS TGuiFactory.                         //
00035 //                                                                      //
00037 
00038 #include "tqrootguifactory.h"
00039 
00040 #include <iostream.h>
00041 using namespace std;
00042 #include "TRootCanvas.h"
00043 #include "tqcanvasimp.h"
00044 #include "lockguard.h"
00045 
00046 //______________________________________________________________________________
00047 TQRootGuiFactory::TQRootGuiFactory(const char *name, const char *title)
00048    : TRootGuiFactory(name, title)
00049 {
00050 Qtrootlockguard threadlock;
00051   // TQRootGuiFactory ctor.
00052   // The default implementation  is not customized:
00053   // The  ROOT TRootCanvas class is being used
00054   fCustom=kFALSE;
00055 
00056 }
00057 
00058 
00059 //______________________________________________________________________________
00060 TCanvasImp *TQRootGuiFactory::CreateCanvasImp(TCanvas *c, const char *title,
00061                                              UInt_t width, UInt_t height)
00062 {
00063   // Create a ROOT native GUI version of TCanvasImp
00064 Qtrootlockguard threadlock;
00065 #if DEBUG_LEVEL>0
00066   qDebug("TQRootGuiFactory::CreateCanvasImp: \n creating a TCanvasImp with parameters:  %x name:%s \n w:%i h:%i \n",
00067         c, title, width, height );
00068 #endif
00069 
00070   if ( fCustom ) {
00071     TQCanvasImp* cimp= new TQCanvasImp(c,title,width,height);
00072     return ( cimp );
00073   }else{
00074     return new TRootCanvas(c, title, width, height);
00075   }
00076 
00077 }
00078 
00079 //______________________________________________________________________________
00080 TCanvasImp *TQRootGuiFactory::CreateCanvasImp(TCanvas *c, const char *title,
00081                                   Int_t x, Int_t y, UInt_t width, UInt_t height)
00082 {
00083  // Create a ROOT native GUI version of TCanvasImp
00084 Qtrootlockguard threadlock;
00085 #if DEBUG_LEVEL>0
00086   qDebug("TQRootGuiFactory::CreateCanvasImp:\n creating a TCanvasImp with parameters:  %x name:%s  \n w:%i h:%i x:%i y:%i\n",  c, title, width, height, x, y );
00087 #endif
00088 
00089   if ( fCustom ) {
00090     TQCanvasImp* cimp= new TQCanvasImp(c,title,x,y,width,height);
00091     return cimp ;
00092   }else{
00093     return new TRootCanvas(c, title, x, y, width, height);
00094   }
00095 
00096 }
00097 
00098 
00099 
00100 
00101 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:56:09 2005 for Go4-v2.10-5 by doxygen1.2.15