Logo ROOT   6.16/01
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
29class TMethod;
30class TCanvas;
31
32class TQRootDialog : public QWidget
33{
34#ifndef __CINT__
35 Q_OBJECT
36#endif
37private:
40
41public:
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
49public slots:
50 void Receive(){ExecuteMethod();} // to be replaced
51 void ExecuteMethod();
52
53protected:
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
#define ClassDef(name, id)
Definition: Rtypes.h:324
int type
Definition: TGX11.cxx:120
The Canvas class.
Definition: TCanvas.h:31
Each ROOT class (see TClass) has a linked list of methods.
Definition: TMethod.h:38
Mother of all ROOT objects.
Definition: TObject.h:37
void SetTCanvas(TCanvas *aCanvas)
Definition: TQRootDialog.h:47
TMethod * fCurMethod
Definition: TQRootDialog.h:57
TCanvas * fCurCanvas
Definition: TQRootDialog.h:58
QList< QLineEdit * > fList
Definition: TQRootDialog.h:60
void ExecuteMethod()
Execute ROOT methods.
void Receive()
Definition: TQRootDialog.h:50
TQRootDialog(const TQRootDialog &)
TQRootDialog & operator=(const TQRootDialog &)
QLineEdit * fLineEdit
Definition: TQRootDialog.h:55
void Add(const char *argname, const char *value, const char *type)
Add widgets for arguments.
void Popup()
Show the dialog.
TObject * fCurObj
Definition: TQRootDialog.h:56
QWidget * fParent
Definition: TQRootDialog.h:59
void closeEvent(QCloseEvent *ce)
Handle close event.
virtual ~TQRootDialog()
dtor