v2.10-0 (21000JUN2005)

qtroot.interface
Class TQCanvasMenu


class TQCanvasMenu
derived from QObject

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.

Version: 2.0
See Also: QObject,
short interface to context sensitive menu
authors Denis Bertini

Field Summary
 protected TCanvas*c
           
 protected TObject*fCurrObj
           
 protected TQRootDialog*fDialog
           
 protected TListfMethods
           
 protected QWidget*fParent
           
 protected QPopupMenu*fPopup
           
 protected QWidget*fTabWin
           
 protected doubleMousePosX
           
 protected doubleMousePosY
           
 private :publicslots:voidexecutesignals
           

Constructor Summary
 private TQCanvasMenu(QWidget* parent, QWidget* tabWin, TCanvas* canvas)
           

Destructor Summary
 private synchronized ~TQCanvasMenu()
           

Method Summary
 private voidChangeHisFillColor()
           
 private voidChangeHisLineColor()
           
 private char *createArgumentTitle(TMethodArg* argument)
          Create string describing argument (for use in dialog box).
 private char *createDialogTitle(TObject* object, TMethod* method)
          Create a dialog title
 private voiddialog(TObject* obj, TMethod* method)
          Create a dialog object with OK and Cancel
buttons.
 private voidpopup(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).

Field Detail

c

protected TCanvas* c

fCurrObj

protected TObject* fCurrObj

fDialog

protected TQRootDialog* fDialog

fMethods

protected TList fMethods

fParent

protected QWidget* fParent

fPopup

protected QPopupMenu* fPopup

fTabWin

protected QWidget* fTabWin

MousePosX

protected double MousePosX

MousePosY

protected double MousePosY

signals

private :publicslots:voidexecute signals
Constructor Detail

TQCanvasMenu

private TQCanvasMenu(QWidget* parent, QWidget* tabWin, TCanvas* canvas)
Method Detail

~TQCanvasMenu

private synchronized ~TQCanvasMenu()
Method Detail

ChangeHisFillColor

private void ChangeHisFillColor()

ChangeHisLineColor

private void ChangeHisLineColor()

createArgumentTitle

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

createDialogTitle

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

dialog

private void 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*)

popup

private 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).
Parameters:
obj (TObject*)
p (QPoint&)

Association Links

to Class TList

to Class TCanvas

to Class TQRootDialog


J.Adamczewski, M.Al-Turany, D.Bertini, H.G.Essel, S.Linev

30-06-2005