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

TQCanvasMenu Class Reference

TQCanvasMenu interface to context sensitive menu. More...

#include <tqcanvasmenu.h>

List of all members.

Public Slots

void execute (int id)
 Slot defined to execute a method from a selected TObject using TObject::Execute() function. More...


Public Methods

 TQCanvasMenu (QWidget *parent=0, TCanvas *canvas=0)
 TQCanvasMenu (QWidget *parent, QWidget *tabWin, TCanvas *canvas)
 ~TQCanvasMenu ()
void popup (TObject *obj, double x, double y, QMouseEvent *e)
 Perform the corresponding selected TObject popup in the position defined by x, y coordinates (in user coordinate system). More...

void dialog (TObject *obj, TMethod *method)
 Create a dialog object with OK and Cancel buttons. More...

char * createDialogTitle (TObject *object, TMethod *method)
 Create a dialog title. More...

char * createArgumentTitle (TMethodArg *argument)
 Create string describing argument (for use in dialog box). More...

void ChangeHisLineColor ()
void ChangeHisFillColor ()

Protected Attributes

TObject * fCurrObj
QPopupMenu * fPopup
TList fMethods
TCanvas * c
TQRootDialogfDialog
QWidget * fParent
QWidget * fTabWin
double MousePosX
double MousePosY


Detailed Description

TQCanvasMenu interface to context sensitive menu.

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.

See also:
QObject, TQCanvasMenu, TQPopupMenu, TQRootdialog
Authors:
Denis Bertini <d.bertini@gsi.de>
Version:
2.0

Definition at line 48 of file tqcanvasmenu.h.


Constructor & Destructor Documentation

TQCanvasMenu::TQCanvasMenu QWidget *    parent = 0,
TCanvas *    canvas = 0
[inline]
 

Definition at line 51 of file tqcanvasmenu.h.

References c, fCurrObj, fParent, fPopup, and fTabWin.

TQCanvasMenu::TQCanvasMenu QWidget *    parent,
QWidget *    tabWin,
TCanvas *    canvas
[inline]
 

Definition at line 59 of file tqcanvasmenu.h.

References c, fCurrObj, fParent, fPopup, and fTabWin.

TQCanvasMenu::~TQCanvasMenu   [inline]
 

Definition at line 69 of file tqcanvasmenu.h.

References fPopup.


Member Function Documentation

void TQCanvasMenu::popup TObject *    obj,
double    x,
double    y,
QMouseEvent *    e
 

Perform the corresponding selected TObject popup in the position defined by x, y coordinates (in user coordinate system).

Parameters:
obj  (TObject*)
p  (QPoint&)

Definition at line 116 of file tqcanvasmenu.cpp.

References execute(), fCurrObj, fMethods, fPopup, MousePosX, and MousePosY.

Referenced by TQRootCanvas::mousePressEvent().

void TQCanvasMenu::dialog TObject *    obj,
TMethod *    method
 

Create a dialog object with OK and Cancel buttons.

This dialog prompts for the arguments of "method"

Parameters:
obj  (TObject*)
method  (TMethod*)

Definition at line 254 of file tqcanvasmenu.cpp.

References TQRootDialog::add(), c, createArgumentTitle(), createDialogTitle(), fDialog, fParent, TQRootDialog::popup(), and TQRootDialog::setTCanvas().

Referenced by execute().

char * TQCanvasMenu::createDialogTitle TObject *    object,
TMethod *    method
 

Create a dialog title.

Definition at line 84 of file tqcanvasmenu.cpp.

Referenced by dialog().

char * TQCanvasMenu::createArgumentTitle TMethodArg *    argument
 

Create string describing argument (for use in dialog box).

Definition at line 98 of file tqcanvasmenu.cpp.

Referenced by dialog().

void TQCanvasMenu::ChangeHisLineColor  
 

Definition at line 362 of file tqcanvasmenu.cpp.

References c, and fCurrObj.

Referenced by execute().

void TQCanvasMenu::ChangeHisFillColor  
 

Definition at line 376 of file tqcanvasmenu.cpp.

References c, and fCurrObj.

Referenced by execute().

void TQCanvasMenu::execute int    id [slot]
 

Slot defined to execute a method from a selected TObject using TObject::Execute() function.

Definition at line 160 of file tqcanvasmenu.cpp.

References c, ChangeHisFillColor(), ChangeHisLineColor(), dialog(), fCurrObj, fMethods, MousePosX, and MousePosY.

Referenced by popup().


Member Data Documentation

TObject* TQCanvasMenu::fCurrObj [protected]
 

Definition at line 115 of file tqcanvasmenu.h.

Referenced by ChangeHisFillColor(), ChangeHisLineColor(), execute(), popup(), and TQCanvasMenu().

QPopupMenu* TQCanvasMenu::fPopup [protected]
 

Definition at line 116 of file tqcanvasmenu.h.

Referenced by popup(), TQCanvasMenu(), and ~TQCanvasMenu().

TList TQCanvasMenu::fMethods [protected]
 

Definition at line 117 of file tqcanvasmenu.h.

Referenced by execute(), and popup().

TCanvas* TQCanvasMenu::c [protected]
 

Definition at line 118 of file tqcanvasmenu.h.

Referenced by ChangeHisFillColor(), ChangeHisLineColor(), dialog(), execute(), and TQCanvasMenu().

TQRootDialog* TQCanvasMenu::fDialog [protected]
 

Definition at line 119 of file tqcanvasmenu.h.

Referenced by dialog().

QWidget* TQCanvasMenu::fParent [protected]
 

Definition at line 120 of file tqcanvasmenu.h.

Referenced by dialog(), and TQCanvasMenu().

QWidget * TQCanvasMenu::fTabWin [protected]
 

Definition at line 120 of file tqcanvasmenu.h.

Referenced by TQCanvasMenu().

double TQCanvasMenu::MousePosX [protected]
 

Definition at line 121 of file tqcanvasmenu.h.

Referenced by execute(), and popup().

double TQCanvasMenu::MousePosY [protected]
 

Definition at line 122 of file tqcanvasmenu.h.

Referenced by execute(), and popup().


The documentation for this class was generated from the following files:
Generated on Tue Nov 8 10:56:58 2005 for Go4-v2.10-5 by doxygen1.2.15