TQRootDialog.h

Go to the documentation of this file.
00001 // @(#)root/qtgsi:$Id: TQRootDialog.h 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: Denis Bertini, M. Al-Turany  01/11/2000
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TQRootDialog
00013 #define ROOT_TQRootDialog
00014 
00015 ////////////////////////////////////////////////////////////////////////////
00016 //
00017 // TQRootDialog
00018 //
00019 // A TQRootDialog is used to prompt for the arguments of an object's
00020 // member function. It is called by the TQCanvasMenu class
00021 // @see TQCanvasMenu, QList, QVBox, TMethod, TCanvas
00022 // @authors Denis Bertini <d.bertini@gsi.de>
00023 //         M. AL-Turany  <m.al-turany@gsi.de>
00024 ////////////////////////////////////////////////////////////////////////////
00025 
00026 #ifndef __CINT__
00027 # include "qlineedit.h"
00028 # include "qnamespace.h"
00029 # if (QT_VERSION > 0x039999) // Added by cholm@nbi.dk - for Qt 4
00030 #  include "qlist.h"
00031 #  include "q3vbox.h"
00032 typedef Q3VBox QVBox;
00033 using namespace Qt;
00034 # else
00035 #  include "qvbox.h"
00036 # endif
00037 #endif
00038 
00039 #ifndef ROOT_TObject
00040 #include "TObject.h"
00041 #endif
00042 
00043 class TMethod;
00044 class TCanvas;
00045 
00046 class QLineEdit;
00047 class QWidget;
00048 #ifdef __CINT__
00049 template <typename T> class QList;
00050 class QLineEdit;
00051 class QList<QLineEdit*>;
00052 class QVBox;
00053 #if QTVERS > 3
00054 class WindowFlags;
00055 typedef WindowFlags WFlags;
00056 #endif
00057 #endif
00058 
00059 class TQRootDialog: public QVBox
00060 {
00061 #ifndef __CINT__
00062    Q_OBJECT
00063 #endif
00064 private:
00065    TQRootDialog(const TQRootDialog &);
00066    TQRootDialog& operator=(const TQRootDialog &);
00067       
00068 public:
00069    TQRootDialog(QWidget *parent, const char *name, WFlags f=0,
00070                 TObject *obj=0,TMethod *meth=0);
00071    virtual ~TQRootDialog();
00072    void Add(const char* argname, const char* value, const char* type);
00073    void Popup();
00074    void SetTCanvas(TCanvas* aCanvas){fCurCanvas=aCanvas;}
00075 
00076 public slots:
00077    void   Receive(){ExecuteMethod();} // to be replaced
00078    void   ExecuteMethod();
00079 
00080 protected:
00081    void closeEvent( QCloseEvent* ce);
00082    QVBox *fArgBox;         // Box layout
00083    QLineEdit *fLineEdit;   // LineEdit widget for arguments
00084    TObject *fCurObj;       // Selected object
00085    TMethod *fCurMethod;    // method to be executed
00086    TCanvas* fCurCanvas;    // current canvas
00087    QWidget* fParent;       // parent widget
00088 # if (QT_VERSION > 0x039999) // Added by cholm@nbi.dk - for Qt 4
00089    QList<QLineEdit*> fList; // list of widget corresponding to the number of arguments
00090 #else
00091    QList<QLineEdit> fList; // list of widget corresponding to the number of arguments
00092 #endif      
00093    ClassDef(TQRootDialog,1)  //prompt for the arguments of an object's member function
00094 };
00095 
00096 #endif

Generated on Tue Jul 5 14:22:20 2011 for ROOT_528-00b_version by  doxygen 1.5.1