// @(#)root/qtgsi:$Id$
// Author: Denis Bertini, M. Al-Turany  01/11/2000

/*************************************************************************
 * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TQRootGuiFactory                                                     //
//                                                                      //
// This class is a factory for Qt GUI components. It overrides          //
// the member functions of the ABS TGuiFactory.                         //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#include "TQRootGuiFactory.h"
#include "TRootCanvas.h"
#include "TQCanvasImp.h"

ClassImp(TQRootGuiFactory)

//______________________________________________________________________________
TQRootGuiFactory::TQRootGuiFactory(const char *name, const char *title)
   : TRootGuiFactory(name, title)
{
   // TQRootGuiFactory ctor.
   // The default implementation is not customized.
   // The ROOT TRootCanvas class is being used.

   fCustom=kFALSE;

}
//______________________________________________________________________________
TQRootGuiFactory::~TQRootGuiFactory()
{
   //destructor
}

//______________________________________________________________________________
TCanvasImp *TQRootGuiFactory::CreateCanvasImp(TCanvas *c, const char *title,
                                             UInt_t width, UInt_t height)
{
   // Create a ROOT native GUI version of TCanvasImp
   //  @param TCanvas *c (ptr to ROOT TCanvas)
   //  @param char* title (title for canvas)
   //  @param width
   //  @param height
   //  @return QCanvasImp*

   if ( fCustom ) {
      TQCanvasImp* cimp= new TQCanvasImp(c,title,width,height);
      return ( cimp );
   }
   else {
      return new TRootCanvas(c, title, width, height);
   }
}

//______________________________________________________________________________
TCanvasImp *TQRootGuiFactory::CreateCanvasImp(TCanvas *c, const char *title,
                                  Int_t x, Int_t y, UInt_t width, UInt_t height)
{
   // Create a ROOT native GUI version of TCanvasImp
   //    @param TCanvas *c (ptr to ROOT TCanvas)
   //    @param char* title (title for canvas)
   //    @param x
   //    @param y
   //    @param width
   //    @param height
   //    @return TQCanvasImp*

   if ( fCustom ) {
      TQCanvasImp* cimp= new TQCanvasImp(c,title,x,y,width,height);
      return cimp ;
   }
   else {
      return new TRootCanvas(c, title, x, y, width, height);
   }
}

 TQRootGuiFactory.cxx:1
 TQRootGuiFactory.cxx:2
 TQRootGuiFactory.cxx:3
 TQRootGuiFactory.cxx:4
 TQRootGuiFactory.cxx:5
 TQRootGuiFactory.cxx:6
 TQRootGuiFactory.cxx:7
 TQRootGuiFactory.cxx:8
 TQRootGuiFactory.cxx:9
 TQRootGuiFactory.cxx:10
 TQRootGuiFactory.cxx:11
 TQRootGuiFactory.cxx:12
 TQRootGuiFactory.cxx:13
 TQRootGuiFactory.cxx:14
 TQRootGuiFactory.cxx:15
 TQRootGuiFactory.cxx:16
 TQRootGuiFactory.cxx:17
 TQRootGuiFactory.cxx:18
 TQRootGuiFactory.cxx:19
 TQRootGuiFactory.cxx:20
 TQRootGuiFactory.cxx:21
 TQRootGuiFactory.cxx:22
 TQRootGuiFactory.cxx:23
 TQRootGuiFactory.cxx:24
 TQRootGuiFactory.cxx:25
 TQRootGuiFactory.cxx:26
 TQRootGuiFactory.cxx:27
 TQRootGuiFactory.cxx:28
 TQRootGuiFactory.cxx:29
 TQRootGuiFactory.cxx:30
 TQRootGuiFactory.cxx:31
 TQRootGuiFactory.cxx:32
 TQRootGuiFactory.cxx:33
 TQRootGuiFactory.cxx:34
 TQRootGuiFactory.cxx:35
 TQRootGuiFactory.cxx:36
 TQRootGuiFactory.cxx:37
 TQRootGuiFactory.cxx:38
 TQRootGuiFactory.cxx:39
 TQRootGuiFactory.cxx:40
 TQRootGuiFactory.cxx:41
 TQRootGuiFactory.cxx:42
 TQRootGuiFactory.cxx:43
 TQRootGuiFactory.cxx:44
 TQRootGuiFactory.cxx:45
 TQRootGuiFactory.cxx:46
 TQRootGuiFactory.cxx:47
 TQRootGuiFactory.cxx:48
 TQRootGuiFactory.cxx:49
 TQRootGuiFactory.cxx:50
 TQRootGuiFactory.cxx:51
 TQRootGuiFactory.cxx:52
 TQRootGuiFactory.cxx:53
 TQRootGuiFactory.cxx:54
 TQRootGuiFactory.cxx:55
 TQRootGuiFactory.cxx:56
 TQRootGuiFactory.cxx:57
 TQRootGuiFactory.cxx:58
 TQRootGuiFactory.cxx:59
 TQRootGuiFactory.cxx:60
 TQRootGuiFactory.cxx:61
 TQRootGuiFactory.cxx:62
 TQRootGuiFactory.cxx:63
 TQRootGuiFactory.cxx:64
 TQRootGuiFactory.cxx:65
 TQRootGuiFactory.cxx:66
 TQRootGuiFactory.cxx:67
 TQRootGuiFactory.cxx:68
 TQRootGuiFactory.cxx:69
 TQRootGuiFactory.cxx:70
 TQRootGuiFactory.cxx:71
 TQRootGuiFactory.cxx:72
 TQRootGuiFactory.cxx:73
 TQRootGuiFactory.cxx:74
 TQRootGuiFactory.cxx:75
 TQRootGuiFactory.cxx:76
 TQRootGuiFactory.cxx:77
 TQRootGuiFactory.cxx:78
 TQRootGuiFactory.cxx:79
 TQRootGuiFactory.cxx:80
 TQRootGuiFactory.cxx:81
 TQRootGuiFactory.cxx:82
 TQRootGuiFactory.cxx:83
 TQRootGuiFactory.cxx:84
 TQRootGuiFactory.cxx:85
 TQRootGuiFactory.cxx:86