00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TQCanvasMenu
00013 #define ROOT_TQCanvasMenu
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef __CINT__
00026 #include "qobject.h"
00027 # if (QT_VERSION > 0x039999) // Added by cholm@nbi.dk - for Qt 3
00028 # include <q3popupmenu.h>
00029 typedef Q3PopupMenu QPopupMenu;
00030 # else
00031 class QPopupMenu;
00032 # endif
00033 #else
00034 class QPopupMenu;
00035 #endif
00036
00037 #ifndef ROOT_TList
00038 #include "TList.h"
00039 #endif
00040
00041 class TCanvas;
00042 class TObject;
00043 class TMethodArg;
00044 class TQRootDialog;
00045
00046 class QObject;
00047 class QAction;
00048 class QMouseEvent;
00049 class QResizeEvent;
00050 class QPaintEvent;
00051 class QWidget;
00052
00053 class TQCanvasMenu : public QObject {
00054 #ifndef __CINT__
00055 Q_OBJECT
00056 #endif
00057 private:
00058 TQCanvasMenu(const TQCanvasMenu &c);
00059 TQCanvasMenu& operator=(const TQCanvasMenu&) {return *this;}
00060
00061 public:
00062 TQCanvasMenu(QWidget* parent = 0, TCanvas *canvas = 0);
00063 TQCanvasMenu(QWidget* parent, QWidget *tabWin, TCanvas *canvas) ;
00064 virtual ~TQCanvasMenu();
00065 void Popup(TObject *obj, double x, double y, QMouseEvent *e);
00066 void Dialog(TObject *obj, TMethod* method);
00067 char* CreateDialogTitle( TObject *object, TMethod *method );
00068 char* CreateArgumentTitle(TMethodArg *argument);
00069
00070 public slots:
00071 void Execute(int id);
00072
00073 protected:
00074 TObject* fCurrObj;
00075 QPopupMenu *fPopup;
00076 TList fMethods;
00077 TCanvas *fc;
00078 TQRootDialog *fDialog;
00079
00080 QWidget *fParent,*fTabWin;
00081 double fMousePosX;
00082 double fMousePosY;
00083
00084 ClassDef(TQCanvasMenu,1)
00085 };
00086
00087 #endif