#include "TQtRootGuiFactory.h"
#include "TRootGuiFactory.h"
#include "TQtRConfig.h"
#include "TApplication.h"
#include "TQtApplication.h"
#include "TSystem.h"
#ifdef R__QTWIN32
# if ROOT_VERSION_CODE < ROOT_VERSION(5,13,0)
# include "TWin32Application.h"
# endif
#else
# include "TROOT.h"
# include "TQtRootApplication.h"
#endif
#include "TGClient.h"
#include "TRootCanvas.h"
#include "TRootBrowser.h"
#include "TRootControlBar.h"
#include "TContextMenu.h"
#include "TRootContextMenu.h"
#include "TGQt.h"
TGClient *TQtRootGuiFactory::gfQtClient = 0;
ClassImp(TQtRootGuiFactory)
TQtRootGuiFactory::TQtRootGuiFactory()
: TGuiFactory("QtRootProxy","Qt-based ROOT GUI Factory"),fGuiProxy(0)
{
if (TGQt::GetVirtualX()) gVirtualX = TGQt::GetVirtualX();
fGuiProxy = new TRootGuiFactory();
}
TQtRootGuiFactory::TQtRootGuiFactory(const char *name, const char *title)
: TGuiFactory(name, title),fGuiProxy(0)
{
if (TGQt::GetVirtualX()) gVirtualX = TGQt::GetVirtualX();
fGuiProxy = new TRootGuiFactory(name,title);
}
TApplicationImp *TQtRootGuiFactory::CreateApplicationImp(const char *classname, int *argc, char **argv)
{
TGQt::CreateQtApplicationImp();
TApplicationImp *app = 0;
#ifdef R__QTWIN32
# if ROOT_VERSION_CODE < ROOT_VERSION(5,13,0)
app = new TWin32Application(classname, argc, argv);
# endif
#else
app = new TQtRootApplication (classname, argc, argv);
#endif
CreateQClient();
return app;
}
void TQtRootGuiFactory::CreateQClient()
{
gfQtClient = new TGClient();
}
TCanvasImp *TQtRootGuiFactory::CreateCanvasImp(TCanvas *c, const char *title, UInt_t width, UInt_t height)
{ return fGuiProxy ? fGuiProxy->CreateCanvasImp( c, title, width, height) : 0; }
TCanvasImp *TQtRootGuiFactory::CreateCanvasImp(TCanvas *c, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height)
{ return fGuiProxy ? fGuiProxy->CreateCanvasImp(c, title, x, y, width, height) : 0 ;}
TBrowserImp *TQtRootGuiFactory::CreateBrowserImp(TBrowser *b, const char *title, UInt_t width, UInt_t height)
{
return CreateBrowserImp(b, title, width, height, (Option_t *)0);
}
TBrowserImp *TQtRootGuiFactory::CreateBrowserImp(TBrowser *b, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height)
{
return CreateBrowserImp(b, title, x, y, width, height, (Option_t *)0);
}
TBrowserImp *TQtRootGuiFactory::CreateBrowserImp(TBrowser *b, const char *title, UInt_t width, UInt_t height,Option_t *opt)
{
return fGuiProxy ?
#if ROOT_VERSION_CODE < ROOT_VERSION(5,17,5)
fGuiProxy->CreateBrowserImp(b, title, width, height)
#else
fGuiProxy->CreateBrowserImp(b, title, width, height, opt)
#endif
: 0;
}
TBrowserImp *TQtRootGuiFactory::CreateBrowserImp(TBrowser *b, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height,Option_t *opt)
{
return fGuiProxy ?
#if ROOT_VERSION_CODE < ROOT_VERSION(5,17,5)
fGuiProxy->CreateBrowserImp(b, title, x, y, width, height)
#else
fGuiProxy->CreateBrowserImp(b, title, x, y, width, height, opt)
#endif
: 0 ;
}
TContextMenuImp *TQtRootGuiFactory::CreateContextMenuImp(TContextMenu *c, const char *name, const char *title)
{ return fGuiProxy ? fGuiProxy->CreateContextMenuImp(c, name, title): 0;}
TControlBarImp *TQtRootGuiFactory::CreateControlBarImp(TControlBar *c, const char *title)
{ return fGuiProxy ? fGuiProxy->CreateControlBarImp(c,title) : 0;}
TControlBarImp *TQtRootGuiFactory::CreateControlBarImp(TControlBar *c, const char *title, Int_t x, Int_t y)
{ return fGuiProxy ? fGuiProxy->CreateControlBarImp(c, title, x, y):0;}
TInspectorImp *TQtRootGuiFactory::CreateInspectorImp(const TObject *obj, UInt_t width, UInt_t height)
{ return fGuiProxy ? fGuiProxy->CreateInspectorImp(obj, width, height) :0 ;}
TQtRootGuiFactory.cxx:100 TQtRootGuiFactory.cxx:101 TQtRootGuiFactory.cxx:102 TQtRootGuiFactory.cxx:103 TQtRootGuiFactory.cxx:104 TQtRootGuiFactory.cxx:105 TQtRootGuiFactory.cxx:106 TQtRootGuiFactory.cxx:107 TQtRootGuiFactory.cxx:108 TQtRootGuiFactory.cxx:109 TQtRootGuiFactory.cxx:110 TQtRootGuiFactory.cxx:111 TQtRootGuiFactory.cxx:112 TQtRootGuiFactory.cxx:113 TQtRootGuiFactory.cxx:114 TQtRootGuiFactory.cxx:115 TQtRootGuiFactory.cxx:116 TQtRootGuiFactory.cxx:117 TQtRootGuiFactory.cxx:118 TQtRootGuiFactory.cxx:119 TQtRootGuiFactory.cxx:120 TQtRootGuiFactory.cxx:121 TQtRootGuiFactory.cxx:122 TQtRootGuiFactory.cxx:123 TQtRootGuiFactory.cxx:124 TQtRootGuiFactory.cxx:125 TQtRootGuiFactory.cxx:126 TQtRootGuiFactory.cxx:127 TQtRootGuiFactory.cxx:128 TQtRootGuiFactory.cxx:129 TQtRootGuiFactory.cxx:130 TQtRootGuiFactory.cxx:131 TQtRootGuiFactory.cxx:132 TQtRootGuiFactory.cxx:133 TQtRootGuiFactory.cxx:134 TQtRootGuiFactory.cxx:135 TQtRootGuiFactory.cxx:136 TQtRootGuiFactory.cxx:137 TQtRootGuiFactory.cxx:138 TQtRootGuiFactory.cxx:139 TQtRootGuiFactory.cxx:140 TQtRootGuiFactory.cxx:141 TQtRootGuiFactory.cxx:142 TQtRootGuiFactory.cxx:143 TQtRootGuiFactory.cxx:144 TQtRootGuiFactory.cxx:145 TQtRootGuiFactory.cxx:146 TQtRootGuiFactory.cxx:147 TQtRootGuiFactory.cxx:148 TQtRootGuiFactory.cxx:149 TQtRootGuiFactory.cxx:150 TQtRootGuiFactory.cxx:151 TQtRootGuiFactory.cxx:152 TQtRootGuiFactory.cxx:153