ROOT
6.16/01
Reference Guide
gui
qtgsi
src
TQRootGuiFactory.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
// TQRootGuiFactory //
16
// //
17
// This class is a factory for Qt GUI components. It overrides //
18
// the member functions of the ABS TGuiFactory. //
19
// //
20
//////////////////////////////////////////////////////////////////////////
21
22
#include "
TQRootGuiFactory.h
"
23
#include "
TRootCanvas.h
"
24
#include "
TQCanvasImp.h
"
25
26
ClassImp
(
TQRootGuiFactory
);
27
28
////////////////////////////////////////////////////////////////////////////////
29
/// TQRootGuiFactory ctor.
30
/// The default implementation is not customized.
31
/// The ROOT TRootCanvas class is being used.
32
33
TQRootGuiFactory::TQRootGuiFactory
(
const
char
*
name
,
const
char
*title)
34
:
TRootGuiFactory
(
name
, title)
35
{
36
fCustom
=
kFALSE
;
37
38
}
39
////////////////////////////////////////////////////////////////////////////////
40
///destructor
41
42
TQRootGuiFactory::~TQRootGuiFactory
()
43
{
44
}
45
46
////////////////////////////////////////////////////////////////////////////////
47
/// Create a ROOT native GUI version of TCanvasImp
48
/// @param TCanvas *c (ptr to ROOT TCanvas)
49
/// @param char* title (title for canvas)
50
/// @param width
51
/// @param height
52
/// @return QCanvasImp*
53
54
TCanvasImp
*
TQRootGuiFactory::CreateCanvasImp
(
TCanvas
*
c
,
const
char
*title,
55
UInt_t
width
,
UInt_t
height)
56
{
57
if
(
fCustom
) {
58
TQCanvasImp
* cimp=
new
TQCanvasImp
(
c
,title,
width
,height);
59
return
( cimp );
60
}
61
else
{
62
return
new
TRootCanvas
(
c
, title,
width
, height);
63
}
64
}
65
66
////////////////////////////////////////////////////////////////////////////////
67
/// Create a ROOT native GUI version of TCanvasImp
68
/// @param TCanvas *c (ptr to ROOT TCanvas)
69
/// @param char* title (title for canvas)
70
/// @param x
71
/// @param y
72
/// @param width
73
/// @param height
74
/// @return TQCanvasImp*
75
76
TCanvasImp
*
TQRootGuiFactory::CreateCanvasImp
(
TCanvas
*
c
,
const
char
*title,
77
Int_t
x
,
Int_t
y
,
UInt_t
width
,
UInt_t
height)
78
{
79
if
(
fCustom
) {
80
TQCanvasImp
* cimp=
new
TQCanvasImp
(
c
,title,
x
,
y
,
width
,height);
81
return
cimp ;
82
}
83
else
{
84
return
new
TRootCanvas
(
c
, title,
x
,
y
,
width
, height);
85
}
86
}
87
c
#define c(i)
Definition:
RSha256.hxx:101
Int_t
int Int_t
Definition:
RtypesCore.h:41
UInt_t
unsigned int UInt_t
Definition:
RtypesCore.h:42
kFALSE
const Bool_t kFALSE
Definition:
RtypesCore.h:88
ClassImp
#define ClassImp(name)
Definition:
Rtypes.h:363
width
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition:
TDocParser.cxx:121
TQCanvasImp.h
TQRootGuiFactory.h
TRootCanvas.h
TCanvasImp
ABC describing GUI independent main window (with menubar, scrollbars and a drawing area).
Definition:
TCanvasImp.h:30
TCanvas
The Canvas class.
Definition:
TCanvas.h:31
TQCanvasImp
Definition:
TQCanvasImp.h:28
TQRootGuiFactory
Definition:
TQRootGuiFactory.h:39
TQRootGuiFactory::~TQRootGuiFactory
virtual ~TQRootGuiFactory()
destructor
Definition:
TQRootGuiFactory.cxx:42
TQRootGuiFactory::CreateCanvasImp
TCanvasImp * CreateCanvasImp(TCanvas *c, const char *title, UInt_t width, UInt_t height)
Create a ROOT native GUI version of TCanvasImp.
Definition:
TQRootGuiFactory.cxx:54
TQRootGuiFactory::TQRootGuiFactory
TQRootGuiFactory(const char *name="QRoot", const char *title="Qt/ROOT GUI Factory")
TQRootGuiFactory ctor.
Definition:
TQRootGuiFactory.cxx:33
TQRootGuiFactory::fCustom
Bool_t fCustom
Definition:
TQRootGuiFactory.h:42
TRootCanvas
Definition:
TRootCanvas.h:42
TRootGuiFactory
Definition:
TRootGuiFactory.h:36
y
Double_t y[n]
Definition:
legend1.C:17
x
Double_t x[n]
Definition:
legend1.C:17
RegressionKeras.name
name
Definition:
RegressionKeras.py:29