class TQtClientWidget: public QFrame


  TQtClientWidget is QFrame designed to back the ROOT GUI TGWindow class objects

 TQtClientWidget  is a QFrame implementation backing  ROOT TGWindow objects
 It tries to mimic the X11 Widget behaviour, that kind the ROOT Gui relies on heavily.

 Since ROOT has a habit to destroy the widget many times, to protect the C++ QWidget
 against of double deleting all TQtClientWidgets are to be registered with a special
 "guard" container


Function Members (Methods)

public:
virtual~TQtClientWidget()
virtual voidAccelerate(int id)
EMouseButtonButton() const
UInt_tButtonEventMask() const
UInt_tButtonMask() const
static TClass*Class()
virtual voidcloseEvent(QCloseEvent* ev)
boolDeleteNotify()
TQtWidget*GetCanvasWidget() const
QCursor*GrabButtonCursor() const
voidGrabEvent(Event_t& ev, bool own = TRUE)
QCursor*GrabPointerCursor() const
Q3Accel*HasAccel() const
virtual TClass*IsA() const
boolIsClosing()
UInt_tIsEventSelected(UInt_t evmask) const
boolIsGrabbed(Event_t& ev)
boolIsGrabButtonSelected(UInt_t evmask) const
boolIsGrabOwner()
boolIsGrabPointerSelected(UInt_t evmask) const
TQtClientWidget*IsKeyGrabbed(const Event_t& ev)
UInt_tPointerMask() const
virtual voidpolish()
UInt_tSelectEventMask() const
voidSelectInput(UInt_t evmask)
voidSetAttributeEventMask(UInt_t evmask)
voidSetButtonEventMask(UInt_t evmask, Cursor_t cursor = 0)
voidSetButtonMask(UInt_t modifier = kAnyModifier, EMouseButton button = kAnyButton)
voidSetClosing(bool flag = kTRUE)
voidSetCursor()
voidSetCursor(Cursor_t cursor)
voidSetDeleteNotify(bool flag = true)
virtual voidsetEraseColor(const QColor& color)
virtual voidsetErasePixmap(const QPixmap& pixmap)
Bool_tSetKeyMask(Int_t keycode = 0, UInt_t modifier = kAnyModifier, int insert = kInsert)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
voidUnSetButtonMask(bool dtor = false)
voidUnSetKeyMask(Int_t keycode = 0, UInt_t modifier = kAnyModifier)
protected:
TQtClientWidget(TQtClientGuard* guard, int* parent = 0, const char* name = 0, int f = 0)
virtual voidpaintEvent(QPaintEvent*)
voidSetCanvasWidget(TQtWidget* widget)
private:
TQtClientWidget(const TQtClientWidget&)
voidoperator=(const TQtClientWidget&)

Data Members

public:
enum { kRemove
kTestKey
kInsert
};
protected:
EMouseButtonfButton
TQtWidget*fCanvasWidget
boolfDeleteNotify
QColor*fEraseColorColor to paint widget background with our PainEvent
QPixmap*fErasePixmappixmap to paint widget background with our PainEvent
QCursor*fGrabButtonCursor
UInt_tfGrabButtonMaskmodifier button mask for TVirtualX::GrabButton
UInt_tfGrabEventButtonMaskinput event mask for TVirtualX::GrabButton
UInt_tfGrabEventPointerMaskinput event mask for TVirtualX::GrabPointer
QCursor*fGrabPointerCursor
QAccel*fGrabbedKey
TQtClientGuard*fGuard
boolfIsClosing
TGWindow*fMyRootWindowback pointer to the host window object
QCursor*fNormalPointerCursor
Bool_tfPointerOwner
UInt_tfSaveSelectInputMaskTo save dutinr the grabbing the selectInput
UInt_tfSelectEventMaskinput mask for SelectInput

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TQtClientWidget(TQtClientGuard* guard, int* parent = 0, const char* name = 0, int f = 0)
~TQtClientWidget()
 fprintf(stderr, "TQtClientWidget::~TQtClientWidget dtor %p\n", this);
 remove the event filter
void closeEvent(QCloseEvent* ev)
 This Qt QCloseEvent event handler
void setEraseColor(const QColor& color)
 Color to paint widget background with our PainEvent
void setErasePixmap(const QPixmap& pixmap)
 pixmap to paint widget background with our PainEvent
bool IsGrabbed(Event_t& ev)
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 XGrabButton(3X11)         XLIB FUNCTIONS        XGrabButton(3X11)
   ·    The pointer is not grabbed, and the specified button is logically
        pressed when the specified modifier keys are logically down,
        and no other buttons or modifier keys are logically down.
   ·    The grab_window contains the pointer.
   ·    The confine_to window (if any) is viewable.
   ·    A passive grab on the same button/key combination does not exist
        on any ancestor of grab_window.
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TQtClientWidget * IsKeyGrabbed(const Event_t& ev)
 Check ROOT Event_t ev structure for the KeyGrab mask
void GrabEvent(Event_t& ev, bool own = TRUE)
 replace the original Windows_t  with the grabbing id and
 re-caclulate the mouse coordinate
 to respect the new Windows_t id if any
void SelectInput(UInt_t evmask)
 Select input and chech whether qwe nat mouse tracking
void SetButtonMask(UInt_t modifier = kAnyModifier, EMouseButton button = kAnyButton)
 Set the Button mask
void UnSetButtonMask(bool dtor = false)
 Unset the Button mask
Bool_t SetKeyMask(Int_t keycode = 0, UInt_t modifier = kAnyModifier, int insert = kInsert)
 Set the key button mask
 insert   = -1 - remove
             0 - test
            +1 - insert
void SetCanvasWidget(TQtWidget* widget)
 Associate this widget with the parent ROOT gui widget
void UnSetKeyMask(Int_t keycode = 0, UInt_t modifier = kAnyModifier)
 Unset the key button mask
void Accelerate(int id)
 Qt slot to respond to the "Keyboard accelerator signal"
void paintEvent(QPaintEvent* )
void polish()
 Delayed initialization of a widget.
 This function will be called after a widget has been fully created
 and before it is shown the very first time.
bool DeleteNotify()
{return fDeleteNotify; }
TQtWidget * GetCanvasWidget()
{ return fCanvasWidget;}
QAccel * HasAccel()
{ return fGrabbedKey; }
bool IsClosing()
{ return fIsClosing; }
UInt_t IsEventSelected(UInt_t evmask) const
void SetCursor(Cursor_t cursor)
void SetCursor(Cursor_t cursor)
void SetClosing(bool flag = kTRUE)
{ fIsClosing = flag;}
void SetDeleteNotify(bool flag = true)
{fDeleteNotify = flag;}
void SetAttributeEventMask(UInt_t evmask)
{ SelectInput (evmask);}
void SetButtonEventMask(UInt_t evmask, Cursor_t cursor = 0)
{ fGrabEventButtonMask = evmask; fGrabButtonCursor =(QCursor *) cursor; }
EMouseButton Button()
{ return fButton; }
UInt_t ButtonEventMask()
{ return fGrabEventButtonMask;}
UInt_t ButtonMask()
{ return fGrabButtonMask; }
UInt_t PointerMask()
{ return fGrabEventPointerMask;}
UInt_t SelectEventMask()
{return fSelectEventMask;}
QCursor * GrabButtonCursor()
{ return fGrabButtonCursor; }
QCursor * GrabPointerCursor()
{ return fGrabPointerCursor; }
bool IsGrabPointerSelected(UInt_t evmask) const
{ return evmask & PointerMask(); }
bool IsGrabButtonSelected(UInt_t evmask) const
{ return evmask & ButtonEventMask(); }
void operator=(const TQtClientWidget& )
TQtClientWidget(const TQtClientWidget& )
bool IsGrabOwner()
{ return fPointerOwner;}

Last change: root/qt:$Id: TQtClientWidget.h 21429 2007-12-17 18:19:41Z brun $
Last generated: 2008-06-25 08:51
Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.