ROOT logo
// @(#)root/qtgsi:$Id: TQCanvasMenu.h 20882 2007-11-19 11:31:26Z rdm $
// 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_TQCanvasMenu
#define ROOT_TQCanvasMenu

////////////////////////////////////////////////////////////////////////////////
//
// TQCanvasMenu
//
// This class provides an interface to Qt based context sensitive popup menus.
// These menus pop up when the user hits the right mouse button, and
// are destroyed when the menu pops downs.
//
////////////////////////////////////////////////////////////////////////////////

#ifndef __CINT__
#include "qobject.h"
# if (QT_VERSION > 0x039999) // Added by cholm@nbi.dk - for Qt 3
#  include <q3popupmenu.h>
typedef Q3PopupMenu QPopupMenu;
# else 
class QPopupMenu;
# endif
#else
class QPopupMenu;
#endif

#ifndef ROOT_TList
#include "TList.h"
#endif

class TCanvas;
class TObject;
class TMethodArg;
class TQRootDialog;

class QObject;
class QAction;
class QMouseEvent;
class QResizeEvent;
class QPaintEvent;
class QWidget;

class TQCanvasMenu : public QObject {
#ifndef __CINT__
   Q_OBJECT
#endif
private:
   TQCanvasMenu(const TQCanvasMenu &c);
   TQCanvasMenu& operator=(const TQCanvasMenu&) {return *this;} 
      
public:
   TQCanvasMenu(QWidget* parent = 0, TCanvas *canvas = 0);
   TQCanvasMenu(QWidget* parent, QWidget *tabWin, TCanvas *canvas) ;
   virtual ~TQCanvasMenu();
   void Popup(TObject *obj, double x, double y, QMouseEvent *e);
   void Dialog(TObject *obj, TMethod* method);
   char* CreateDialogTitle( TObject *object, TMethod *method );
   char* CreateArgumentTitle(TMethodArg *argument);

public slots:
   void Execute(int id);

protected:
   TObject* fCurrObj;         // current selected object
   QPopupMenu  *fPopup;       // Qt popup menu
   TList fMethods;            // list of Root metheds associated with the selected object
   TCanvas *fc;               // pointer to the ROOT canvas
   TQRootDialog *fDialog;     // the TQRootDialog which is used to prompt for
                              //the arguments of an object's member function.
   QWidget *fParent,*fTabWin; //parents widgets
   double fMousePosX;         // mouse position in user coordinate
   double fMousePosY;         // mouse position in user coordinate

   ClassDef(TQCanvasMenu,1)  //interface to Qt based context sensitive popup menus
};
   
#endif
 TQCanvasMenu.h:1
 TQCanvasMenu.h:2
 TQCanvasMenu.h:3
 TQCanvasMenu.h:4
 TQCanvasMenu.h:5
 TQCanvasMenu.h:6
 TQCanvasMenu.h:7
 TQCanvasMenu.h:8
 TQCanvasMenu.h:9
 TQCanvasMenu.h:10
 TQCanvasMenu.h:11
 TQCanvasMenu.h:12
 TQCanvasMenu.h:13
 TQCanvasMenu.h:14
 TQCanvasMenu.h:15
 TQCanvasMenu.h:16
 TQCanvasMenu.h:17
 TQCanvasMenu.h:18
 TQCanvasMenu.h:19
 TQCanvasMenu.h:20
 TQCanvasMenu.h:21
 TQCanvasMenu.h:22
 TQCanvasMenu.h:23
 TQCanvasMenu.h:24
 TQCanvasMenu.h:25
 TQCanvasMenu.h:26
 TQCanvasMenu.h:27
 TQCanvasMenu.h:28
 TQCanvasMenu.h:29
 TQCanvasMenu.h:30
 TQCanvasMenu.h:31
 TQCanvasMenu.h:32
 TQCanvasMenu.h:33
 TQCanvasMenu.h:34
 TQCanvasMenu.h:35
 TQCanvasMenu.h:36
 TQCanvasMenu.h:37
 TQCanvasMenu.h:38
 TQCanvasMenu.h:39
 TQCanvasMenu.h:40
 TQCanvasMenu.h:41
 TQCanvasMenu.h:42
 TQCanvasMenu.h:43
 TQCanvasMenu.h:44
 TQCanvasMenu.h:45
 TQCanvasMenu.h:46
 TQCanvasMenu.h:47
 TQCanvasMenu.h:48
 TQCanvasMenu.h:49
 TQCanvasMenu.h:50
 TQCanvasMenu.h:51
 TQCanvasMenu.h:52
 TQCanvasMenu.h:53
 TQCanvasMenu.h:54
 TQCanvasMenu.h:55
 TQCanvasMenu.h:56
 TQCanvasMenu.h:57
 TQCanvasMenu.h:58
 TQCanvasMenu.h:59
 TQCanvasMenu.h:60
 TQCanvasMenu.h:61
 TQCanvasMenu.h:62
 TQCanvasMenu.h:63
 TQCanvasMenu.h:64
 TQCanvasMenu.h:65
 TQCanvasMenu.h:66
 TQCanvasMenu.h:67
 TQCanvasMenu.h:68
 TQCanvasMenu.h:69
 TQCanvasMenu.h:70
 TQCanvasMenu.h:71
 TQCanvasMenu.h:72
 TQCanvasMenu.h:73
 TQCanvasMenu.h:74
 TQCanvasMenu.h:75
 TQCanvasMenu.h:76
 TQCanvasMenu.h:77
 TQCanvasMenu.h:78
 TQCanvasMenu.h:79
 TQCanvasMenu.h:80
 TQCanvasMenu.h:81
 TQCanvasMenu.h:82
 TQCanvasMenu.h:83
 TQCanvasMenu.h:84
 TQCanvasMenu.h:85
 TQCanvasMenu.h:86
 TQCanvasMenu.h:87