ROOT  6.06/09
Reference Guide
TQRootDialog.h
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 #ifndef ROOT_TQRootDialog
13 #define ROOT_TQRootDialog
14 
15 ////////////////////////////////////////////////////////////////////////////
16 //
17 // TQRootDialog
18 //
19 // A TQRootDialog is used to prompt for the arguments of an object's
20 // member function. It is called by the TQCanvasMenu class
21 // @see TQCanvasMenu, QList, QVBox, TMethod, TCanvas
22 // @authors Denis Bertini <d.bertini@gsi.de>
23 // M. AL-Turany <m.al-turany@gsi.de>
24 ////////////////////////////////////////////////////////////////////////////
25 
26 #ifndef __CINT__
27 # include "qlineedit.h"
28 # include "qnamespace.h"
29 # if (QT_VERSION > 0x039999) // Added by cholm@nbi.dk - for Qt 4
30 # include "qlist.h"
31 # include "q3vbox.h"
32 typedef Q3VBox QVBox;
33 # else
34 # include "qvbox.h"
35 # endif
36 #endif
37 
38 #ifndef ROOT_TObject
39 #include "TObject.h"
40 #endif
41 
42 class TMethod;
43 class TCanvas;
44 
45 class QCloseEvent;
46 class QLineEdit;
47 class QWidget;
48 #ifdef __CINT__
49 template <typename T> class QList;
50 class QLineEdit;
51 class QList<QLineEdit*>;
52 class QVBox;
53 #if QTVERS > 3
54 class WindowFlags;
55 typedef WindowFlags Qt::WFlags;
56 #endif
57 #endif
58 
59 class TQRootDialog: public QVBox
60 {
61 #ifndef __CINT__
62  Q_OBJECT
63 #endif
64 private:
65  TQRootDialog(const TQRootDialog &);
67 
68 public:
69  TQRootDialog(QWidget *parent, const char *name, Qt::WFlags f=0,
70  TObject *obj=0,TMethod *meth=0);
71  virtual ~TQRootDialog();
72  void Add(const char* argname, const char* value, const char* type);
73  void Popup();
74  void SetTCanvas(TCanvas* aCanvas){fCurCanvas=aCanvas;}
75 
76 public slots:
77  void Receive(){ExecuteMethod();} // to be replaced
78  void ExecuteMethod();
79 
80 protected:
81  void closeEvent( QCloseEvent* ce);
82  QVBox *fArgBox; // Box layout
83  QLineEdit *fLineEdit; // LineEdit widget for arguments
84  TObject *fCurObj; // Selected object
85  TMethod *fCurMethod; // method to be executed
86  TCanvas* fCurCanvas; // current canvas
87  QWidget* fParent; // parent widget
88 # if (QT_VERSION > 0x039999) // Added by cholm@nbi.dk - for Qt 4
89  QList<QLineEdit*> fList; // list of widget corresponding to the number of arguments
90 #else
91  QList<QLineEdit> fList; // list of widget corresponding to the number of arguments
92 #endif
93  ClassDef(TQRootDialog,1) //prompt for the arguments of an object's member function
94 };
95 
96 #endif
TQRootDialog & operator=(const TQRootDialog &)
QList< QLineEdit > fList
Definition: TQRootDialog.h:91
void SetTCanvas(TCanvas *aCanvas)
Definition: TQRootDialog.h:74
TCanvas * fCurCanvas
Definition: TQRootDialog.h:86
void Add(const char *argname, const char *value, const char *type)
Add widgets for arguments.
void closeEvent(QCloseEvent *ce)
Handle close event.
#define ClassDef(name, id)
Definition: Rtypes.h:254
QLineEdit * fLineEdit
Definition: TQRootDialog.h:83
TQRootDialog(const TQRootDialog &)
TObject * fCurObj
Definition: TQRootDialog.h:84
QVBox * fArgBox
Definition: TQRootDialog.h:82
virtual ~TQRootDialog()
dtor
TMethod * fCurMethod
Definition: TQRootDialog.h:85
QWidget * fParent
Definition: TQRootDialog.h:87
The Canvas class.
Definition: TCanvas.h:48
double f(double x)
int type
Definition: TGX11.cxx:120
#define name(a, b)
Definition: linkTestLib0.cpp:5
Mother of all ROOT objects.
Definition: TObject.h:58
Each ROOT class (see TClass) has a linked list of methods.
Definition: TMethod.h:40
void Popup()
Show the dialog.
TObject * obj
float value
Definition: math.cpp:443
void Receive()
Definition: TQRootDialog.h:77
void ExecuteMethod()
Execute ROOT methods.