// Author: Valeri Fine   13/05/2003
/****************************************************************************
** $Id: TQtRootGuiFactory.h,v 1.3 2007/11/02 17:08:10 fine Exp $
**
** Copyright (C) 2002 by Valeri Fine.  All rights reserved.
**
*****************************************************************************/

#ifndef ROOT_TQtRootGuiFactory
#define ROOT_TQtRootGuiFactory

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TQtRootGuiFactory                                                    //
//                                                                      //
// This class is a proxy-factory for Qt-base ROOT GUI components.       //
// It overrides the member functions of the X11/win32gdk-based          //
// TRootGuiFactory.                                                     //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#include "TGuiFactory.h"

class TQtApplication;
class TVirtualX;
class TGClient;

class TQtRootGuiFactory : public  TGuiFactory {

private:
   TGuiFactory *fGuiProxy;

protected:
  static void CreateQClient();
  static TGClient *gfQtClient;

public:
   TQtRootGuiFactory();
   TQtRootGuiFactory(const char *name, const char *title= "Qt-based ROOT GUI Factory");
   virtual ~TQtRootGuiFactory() { delete fGuiProxy; }

   virtual TApplicationImp *CreateApplicationImp(const char *classname, int *argc, char **argv);

   virtual TCanvasImp *CreateCanvasImp(TCanvas *c, const char *title, UInt_t width, UInt_t height);
   virtual TCanvasImp *CreateCanvasImp(TCanvas *c, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height);

   virtual TBrowserImp *CreateBrowserImp(TBrowser *b, const char *title, UInt_t width, UInt_t height);
   virtual TBrowserImp *CreateBrowserImp(TBrowser *b, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height);

   virtual TBrowserImp *CreateBrowserImp(TBrowser *b, const char *title, UInt_t width, UInt_t height, Option_t *opt);
   virtual TBrowserImp *CreateBrowserImp(TBrowser *b, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height, Option_t *opt);

   virtual TContextMenuImp *CreateContextMenuImp(TContextMenu *c, const char *name, const char *title);

   virtual TControlBarImp *CreateControlBarImp(TControlBar *c, const char *title);
   virtual TControlBarImp *CreateControlBarImp(TControlBar *c, const char *title, Int_t x, Int_t y);

   virtual TInspectorImp *CreateInspectorImp(const TObject *obj, UInt_t width, UInt_t height);

   static TGClient *GetRootClient();
   ClassDef(TQtRootGuiFactory,0)  //Factory for Qt-based ROOT GUI components
};

inline TGClient *TQtRootGuiFactory::GetRootClient(){ return gfQtClient; }


#endif
 TQtRootGuiFactory.h:1
 TQtRootGuiFactory.h:2
 TQtRootGuiFactory.h:3
 TQtRootGuiFactory.h:4
 TQtRootGuiFactory.h:5
 TQtRootGuiFactory.h:6
 TQtRootGuiFactory.h:7
 TQtRootGuiFactory.h:8
 TQtRootGuiFactory.h:9
 TQtRootGuiFactory.h:10
 TQtRootGuiFactory.h:11
 TQtRootGuiFactory.h:12
 TQtRootGuiFactory.h:13
 TQtRootGuiFactory.h:14
 TQtRootGuiFactory.h:15
 TQtRootGuiFactory.h:16
 TQtRootGuiFactory.h:17
 TQtRootGuiFactory.h:18
 TQtRootGuiFactory.h:19
 TQtRootGuiFactory.h:20
 TQtRootGuiFactory.h:21
 TQtRootGuiFactory.h:22
 TQtRootGuiFactory.h:23
 TQtRootGuiFactory.h:24
 TQtRootGuiFactory.h:25
 TQtRootGuiFactory.h:26
 TQtRootGuiFactory.h:27
 TQtRootGuiFactory.h:28
 TQtRootGuiFactory.h:29
 TQtRootGuiFactory.h:30
 TQtRootGuiFactory.h:31
 TQtRootGuiFactory.h:32
 TQtRootGuiFactory.h:33
 TQtRootGuiFactory.h:34
 TQtRootGuiFactory.h:35
 TQtRootGuiFactory.h:36
 TQtRootGuiFactory.h:37
 TQtRootGuiFactory.h:38
 TQtRootGuiFactory.h:39
 TQtRootGuiFactory.h:40
 TQtRootGuiFactory.h:41
 TQtRootGuiFactory.h:42
 TQtRootGuiFactory.h:43
 TQtRootGuiFactory.h:44
 TQtRootGuiFactory.h:45
 TQtRootGuiFactory.h:46
 TQtRootGuiFactory.h:47
 TQtRootGuiFactory.h:48
 TQtRootGuiFactory.h:49
 TQtRootGuiFactory.h:50
 TQtRootGuiFactory.h:51
 TQtRootGuiFactory.h:52
 TQtRootGuiFactory.h:53
 TQtRootGuiFactory.h:54
 TQtRootGuiFactory.h:55
 TQtRootGuiFactory.h:56
 TQtRootGuiFactory.h:57
 TQtRootGuiFactory.h:58
 TQtRootGuiFactory.h:59
 TQtRootGuiFactory.h:60
 TQtRootGuiFactory.h:61
 TQtRootGuiFactory.h:62
 TQtRootGuiFactory.h:63
 TQtRootGuiFactory.h:64
 TQtRootGuiFactory.h:65
 TQtRootGuiFactory.h:66
 TQtRootGuiFactory.h:67