// @(#)root/qtgsi:$Id$
// Author: Denis Bertini, M. Al-Turany  01/11/2000

/*************************************************************************
 * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TQRootDialog
#define ROOT_TQRootDialog

////////////////////////////////////////////////////////////////////////////
//
// TQRootDialog
//
// A TQRootDialog is used to prompt for the arguments of an object's
// member function. It is called by the TQCanvasMenu class
// @see TQCanvasMenu, QList, QVBox, TMethod, TCanvas
// @authors Denis Bertini <d.bertini@gsi.de>
//    M. AL-Turany  <m.al-turany@gsi.de>
////////////////////////////////////////////////////////////////////////////

#ifndef __CINT__
# include "qlineedit.h"
# include "qnamespace.h"
# if (QT_VERSION > 0x039999) // Added by cholm@nbi.dk - for Qt 4
#  include "qlist.h"
#  include "q3vbox.h"
typedef Q3VBox QVBox;
# else
#  include "qvbox.h"
# endif
#endif

#ifndef ROOT_TObject
#include "TObject.h"
#endif

class TMethod;
class TCanvas;

class QCloseEvent;
class QLineEdit;
class QWidget;
#ifdef __CINT__
template <typename T> class QList;
class QLineEdit;
class QList<QLineEdit*>;
class QVBox;
#if QTVERS > 3
class WindowFlags;
typedef WindowFlags Qt::WFlags;
#endif
#endif

class TQRootDialog: public QVBox
{
#ifndef __CINT__
   Q_OBJECT
#endif
private:
   TQRootDialog(const TQRootDialog &);
   TQRootDialog& operator=(const TQRootDialog &);

public:
   TQRootDialog(QWidget *parent, const char *name, Qt::WFlags f=0,
                TObject *obj=0,TMethod *meth=0);
   virtual ~TQRootDialog();
   void Add(const char* argname, const char* value, const char* type);
   void Popup();
   void SetTCanvas(TCanvas* aCanvas){fCurCanvas=aCanvas;}

public slots:
   void   Receive(){ExecuteMethod();} // to be replaced
   void   ExecuteMethod();

protected:
   void closeEvent( QCloseEvent* ce);
   QVBox *fArgBox;         // Box layout
   QLineEdit *fLineEdit;   // LineEdit widget for arguments
   TObject *fCurObj;       // Selected object
   TMethod *fCurMethod;    // method to be executed
   TCanvas* fCurCanvas;    // current canvas
   QWidget* fParent;       // parent widget
# if (QT_VERSION > 0x039999) // Added by cholm@nbi.dk - for Qt 4
   QList<QLineEdit*> fList; // list of widget corresponding to the number of arguments
#else
   QList<QLineEdit> fList; // list of widget corresponding to the number of arguments
#endif
   ClassDef(TQRootDialog,1)  //prompt for the arguments of an object's member function
};

#endif
 TQRootDialog.h:1
 TQRootDialog.h:2
 TQRootDialog.h:3
 TQRootDialog.h:4
 TQRootDialog.h:5
 TQRootDialog.h:6
 TQRootDialog.h:7
 TQRootDialog.h:8
 TQRootDialog.h:9
 TQRootDialog.h:10
 TQRootDialog.h:11
 TQRootDialog.h:12
 TQRootDialog.h:13
 TQRootDialog.h:14
 TQRootDialog.h:15
 TQRootDialog.h:16
 TQRootDialog.h:17
 TQRootDialog.h:18
 TQRootDialog.h:19
 TQRootDialog.h:20
 TQRootDialog.h:21
 TQRootDialog.h:22
 TQRootDialog.h:23
 TQRootDialog.h:24
 TQRootDialog.h:25
 TQRootDialog.h:26
 TQRootDialog.h:27
 TQRootDialog.h:28
 TQRootDialog.h:29
 TQRootDialog.h:30
 TQRootDialog.h:31
 TQRootDialog.h:32
 TQRootDialog.h:33
 TQRootDialog.h:34
 TQRootDialog.h:35
 TQRootDialog.h:36
 TQRootDialog.h:37
 TQRootDialog.h:38
 TQRootDialog.h:39
 TQRootDialog.h:40
 TQRootDialog.h:41
 TQRootDialog.h:42
 TQRootDialog.h:43
 TQRootDialog.h:44
 TQRootDialog.h:45
 TQRootDialog.h:46
 TQRootDialog.h:47
 TQRootDialog.h:48
 TQRootDialog.h:49
 TQRootDialog.h:50
 TQRootDialog.h:51
 TQRootDialog.h:52
 TQRootDialog.h:53
 TQRootDialog.h:54
 TQRootDialog.h:55
 TQRootDialog.h:56
 TQRootDialog.h:57
 TQRootDialog.h:58
 TQRootDialog.h:59
 TQRootDialog.h:60
 TQRootDialog.h:61
 TQRootDialog.h:62
 TQRootDialog.h:63
 TQRootDialog.h:64
 TQRootDialog.h:65
 TQRootDialog.h:66
 TQRootDialog.h:67
 TQRootDialog.h:68
 TQRootDialog.h:69
 TQRootDialog.h:70
 TQRootDialog.h:71
 TQRootDialog.h:72
 TQRootDialog.h:73
 TQRootDialog.h:74
 TQRootDialog.h:75
 TQRootDialog.h:76
 TQRootDialog.h:77
 TQRootDialog.h:78
 TQRootDialog.h:79
 TQRootDialog.h:80
 TQRootDialog.h:81
 TQRootDialog.h:82
 TQRootDialog.h:83
 TQRootDialog.h:84
 TQRootDialog.h:85
 TQRootDialog.h:86
 TQRootDialog.h:87
 TQRootDialog.h:88
 TQRootDialog.h:89
 TQRootDialog.h:90
 TQRootDialog.h:91
 TQRootDialog.h:92
 TQRootDialog.h:93
 TQRootDialog.h:94
 TQRootDialog.h:95
 TQRootDialog.h:96