Logo ROOT   6.14/05
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, QVBoxLayout, TMethod, TCanvas
22 // @authors Denis Bertini <d.bertini@gsi.de>
23 // M. AL-Turany <m.al-turany@gsi.de>
24 ////////////////////////////////////////////////////////////////////////////
25 
26 #include "TQtGSIIncludes.h"
27 #include "TObject.h"
28 
29 class TMethod;
30 class TCanvas;
31 
32 class TQRootDialog : public QWidget
33 {
34 #ifndef __CINT__
35  Q_OBJECT
36 #endif
37 private:
38  TQRootDialog(const TQRootDialog &);
40 
41 public:
42  TQRootDialog(QWidget *parent, const QString& title,
43  TObject *obj = nullptr, TMethod *method = nullptr);
44  virtual ~TQRootDialog();
45  void Add(const char* argname, const char* value, const char* type);
46  void Popup();
47  void SetTCanvas(TCanvas* aCanvas){fCurCanvas=aCanvas;}
48 
49 public slots:
50  void Receive(){ExecuteMethod();} // to be replaced
51  void ExecuteMethod();
52 
53 protected:
54  void closeEvent( QCloseEvent* ce);
55  QLineEdit *fLineEdit; // LineEdit widget for arguments
56  TObject *fCurObj; // Selected object
57  TMethod *fCurMethod; // method to be executed
58  TCanvas* fCurCanvas; // current canvas
59  QWidget* fParent; // parent widget
60  QList<QLineEdit*> fList; // list of widget corresponding to the number of arguments
61  ClassDef(TQRootDialog,1) //prompt for the arguments of an object's member function
62 };
63 
64 #endif
TQRootDialog & operator=(const TQRootDialog &)
void SetTCanvas(TCanvas *aCanvas)
Definition: TQRootDialog.h:47
TCanvas * fCurCanvas
Definition: TQRootDialog.h:58
void Add(const char *argname, const char *value, const char *type)
Add widgets for arguments.
void closeEvent(QCloseEvent *ce)
Handle close event.
QList< QLineEdit * > fList
Definition: TQRootDialog.h:60
#define ClassDef(name, id)
Definition: Rtypes.h:320
QLineEdit * fLineEdit
Definition: TQRootDialog.h:55
TQRootDialog(const TQRootDialog &)
TObject * fCurObj
Definition: TQRootDialog.h:56
virtual ~TQRootDialog()
dtor
TMethod * fCurMethod
Definition: TQRootDialog.h:57
QWidget * fParent
Definition: TQRootDialog.h:59
The Canvas class.
Definition: TCanvas.h:31
int type
Definition: TGX11.cxx:120
Mother of all ROOT objects.
Definition: TObject.h:37
Each ROOT class (see TClass) has a linked list of methods.
Definition: TMethod.h:38
void Popup()
Show the dialog.
void Receive()
Definition: TQRootDialog.h:50
void ExecuteMethod()
Execute ROOT methods.