Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TQCanvasMenu Class Reference

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.
void EmitMenuCommandExecuted (TObject *, const char *)

Signals

void MenuCommandExecuted (TObject *, const char *)

Public Member Functions

 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)
 Perform the corresponding selected TObject popup in the position defined by x, y coordinates (in user coordinate system).
void dialog (TObject *obj, TMethod *method)
 Create a dialog object with OK and Cancel buttons.
char * createDialogTitle (TObject *object, TMethod *method)
 Create a dialog title.
char * createArgumentTitle (TMethodArg *argument)
 Create string describing argument (for use in dialog box).
void ChangeHisLineColor ()
void ChangeHisFillColor ()

Protected Attributes

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


Detailed Description

interface to context sensitive menu

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.

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

Definition at line 42 of file tqcanvasmenu.h.


Constructor & Destructor Documentation

TQCanvasMenu::TQCanvasMenu QWidget *  parent = 0,
TCanvas *  canvas = 0
 

Definition at line 44 of file tqcanvasmenu.cpp.

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

TQCanvasMenu::TQCanvasMenu QWidget *  parent,
QWidget *  tabWin,
TCanvas *  canvas
 

Definition at line 53 of file tqcanvasmenu.cpp.

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

TQCanvasMenu::~TQCanvasMenu  )  [virtual]
 

Definition at line 62 of file tqcanvasmenu.cpp.

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 101 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 219 of file tqcanvasmenu.cpp.

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

Referenced by execute().

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

Create a dialog title.

Definition at line 67 of file tqcanvasmenu.cpp.

Referenced by dialog().

char * TQCanvasMenu::createArgumentTitle TMethodArg *  argument  ) 
 

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

Definition at line 82 of file tqcanvasmenu.cpp.

Referenced by dialog().

void TQCanvasMenu::ChangeHisLineColor  ) 
 

Definition at line 329 of file tqcanvasmenu.cpp.

References fCurrObj, and MenuCommandExecuted().

Referenced by execute().

void TQCanvasMenu::ChangeHisFillColor  ) 
 

Definition at line 342 of file tqcanvasmenu.cpp.

References fCurrObj, and MenuCommandExecuted().

Referenced by execute().

void TQCanvasMenu::MenuCommandExecuted TObject *  ,
const char * 
[signal]
 

Referenced by ChangeHisFillColor(), ChangeHisLineColor(), EmitMenuCommandExecuted(), and execute().

void TQCanvasMenu::execute int  id  )  [slot]
 

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

test: do this in any case!

Definition at line 145 of file tqcanvasmenu.cpp.

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

Referenced by popup().

void TQCanvasMenu::EmitMenuCommandExecuted TObject *  ,
const char * 
[slot]
 

Definition at line 214 of file tqcanvasmenu.cpp.

References MenuCommandExecuted().

Referenced by TQRootDialog::executeMethod().


Member Data Documentation

TObject* TQCanvasMenu::fCurrObj [protected]
 

Definition at line 83 of file tqcanvasmenu.h.

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

QPopupMenu* TQCanvasMenu::fPopup [protected]
 

Definition at line 84 of file tqcanvasmenu.h.

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

TList TQCanvasMenu::fMethods [protected]
 

Definition at line 85 of file tqcanvasmenu.h.

Referenced by execute(), and popup().

TCanvas* TQCanvasMenu::c [protected]
 

Definition at line 86 of file tqcanvasmenu.h.

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

QWidget* TQCanvasMenu::fParent [protected]
 

Definition at line 87 of file tqcanvasmenu.h.

Referenced by dialog(), and TQCanvasMenu().

QWidget* TQCanvasMenu::fTabWin [protected]
 

Definition at line 88 of file tqcanvasmenu.h.

Referenced by TQCanvasMenu().

double TQCanvasMenu::MousePosX [protected]
 

Definition at line 89 of file tqcanvasmenu.h.

Referenced by execute(), and popup().

double TQCanvasMenu::MousePosY [protected]
 

Definition at line 90 of file tqcanvasmenu.h.

Referenced by execute(), and popup().


The documentation for this class was generated from the following files:
Generated on Fri Nov 28 13:01:25 2008 for Go4-v3.04-1 by  doxygen 1.4.2