00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef TQCANVASMENU_H
00017 #define TQCANVASMENU_H
00018
00019 #include "qobject.h"
00020 #include "TList.h"
00021
00022 class TCanvas;
00023 class QPopupMenu;
00024 class TMethodArg;
00025
00042 class TQCanvasMenu : public QObject {
00043 Q_OBJECT
00044
00045 public:
00046 TQCanvasMenu(QWidget* parent = 0, TCanvas *canvas = 0);
00047 TQCanvasMenu(QWidget* parent, QWidget *tabWin, TCanvas *canvas);
00048 virtual ~TQCanvasMenu();
00049
00055 void popup(TObject *obj, double x, double y, QMouseEvent *e);
00056
00061 void dialog(TObject *obj, TMethod* method);
00062
00064 char* createDialogTitle(TObject *object, TMethod *method);
00065
00067 char* createArgumentTitle(TMethodArg *argument);
00068
00069 void ChangeHisLineColor();
00070 void ChangeHisFillColor();
00071
00072 signals:
00073 void MenuCommandExecuted(TObject*, const char*);
00074
00075 public slots:
00076
00079 void execute(int id);
00080 void EmitMenuCommandExecuted(TObject*, const char*);
00081
00082 protected:
00083 TObject* fCurrObj;
00084 QPopupMenu* fPopup;
00085 TList fMethods;
00086 TCanvas* c;
00087 QWidget* fParent;
00088 QWidget* fTabWin;
00089 double MousePosX;
00090 double MousePosY;
00091 };
00092
00093 #endif
00094
00095