Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/qtroot/interface/tqcanvasmenu.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 #ifndef TQCANVASMENU_H
00017 #define TQCANVASMENU_H
00018 
00019 using namespace std;
00020 #include "qobject.h"
00021 #include "tqrootdialog.h"
00022 #include "qpopupmenu.h"
00023 #include "TMethodArg.h"
00024 #include  "TList.h"
00025 
00026 class QAction;
00027 class QMouseEvent;
00028 class QResizeEvent;
00029 class QPaintEvent;
00030 class TCanvas;
00031 
00048 class TQCanvasMenu : public QObject {
00049   Q_OBJECT
00050 public:
00051   TQCanvasMenu(QWidget* parent = 0, TCanvas *canvas = 0) {
00052                        c=canvas;
00053                        fPopup = new QPopupMenu;
00054                        fCurrObj=0;
00055                        fParent= parent;
00056                        fTabWin=0;
00057                        }
00058 
00059   TQCanvasMenu(QWidget* parent, QWidget *tabWin, TCanvas *canvas) {
00060                        c=canvas;
00061                        fPopup = new QPopupMenu;
00062                        fParent = parent;
00063                        fTabWin = tabWin;
00064                        fCurrObj=0;
00065                        }
00066 
00067 
00068 
00069   ~TQCanvasMenu() {
00070                   if(fPopup) delete fPopup;
00071            qDebug(" ~TQCanvasMenu \n");
00072                  }
00073 
00081 //  void popup(TObject *obj,const QPoint &p);
00082     void popup(TObject *obj, double x, double y, QMouseEvent *e);
00090   void dialog(TObject *obj, TMethod* method);
00094   char* createDialogTitle( TObject *object, TMethod *method );
00098    char* createArgumentTitle(TMethodArg *argument);
00099 
00100    void ChangeHisLineColor();
00101      void ChangeHisFillColor();
00102 
00103 signals:
00104 
00105 public slots:
00111   void execute(int id);
00112 
00113 
00114 protected:
00115   TObject* fCurrObj;
00116   QPopupMenu  *fPopup;
00117   TList fMethods;
00118   TCanvas *c;
00119   TQRootDialog *fDialog;
00120   QWidget *fParent,*fTabWin;
00121   double MousePosX;    // mouse position in user coordinate
00122   double MousePosY;    // mouse position in user coordinate
00123 };
00124 
00125 #endif
00126 
00127 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:56:09 2005 for Go4-v2.10-5 by doxygen1.2.15