Public Member Functions | Protected Member Functions | Protected Attributes

QRootWindow Class Reference

#include <QRootWindow.h>

List of all members.

Public Member Functions

 QRootWindow (QWidget *parent=0, const char *name=0, bool designermode=false)
virtual ~QRootWindow ()
TGCompositeFrame * GetRootFrame ()
int GetRootWid ()
void AddSubFrame (TGFrame *f, TGLayoutHints *l=0)
void SetEditable (bool on=true)
void SetResizeOnPaint (bool on=true)

Protected Member Functions

virtual bool eventFilter (QObject *, QEvent *)
virtual void paintEvent (QPaintEvent *e)
virtual void closeEvent (QCloseEvent *e)
Bool_t MapQMouseEvent (QMouseEvent *e, Event_t *rev)

Protected Attributes

TQRootFramefxRootwindow
Int_t fiWinid
WId fQtWinId
Bool_t fbResizeOnPaint

Detailed Description

Qt widget wrapper for ROOT TGWindow class.

Author:
J.Adamczewski

Definition at line 32 of file QRootWindow.h.


Constructor & Destructor Documentation

QRootWindow::QRootWindow ( QWidget *  parent = 0,
const char *  name = 0,
bool  designermode = false 
)

real ctor

Definition at line 62 of file QRootWindow.cpp.

References fiWinid, fQtWinId, and fxRootwindow.

QRootWindow::~QRootWindow (  )  [virtual]

Definition at line 219 of file QRootWindow.cpp.

References fxRootwindow.


Member Function Documentation

void QRootWindow::AddSubFrame ( TGFrame *  f,
TGLayoutHints *  l = 0 
)

Add root subframe into this widget

Definition at line 87 of file QRootWindow.cpp.

References fxRootwindow.

void QRootWindow::closeEvent ( QCloseEvent *  e  )  [protected, virtual]

Definition at line 210 of file QRootWindow.cpp.

References fxRootwindow.

bool QRootWindow::eventFilter ( QObject *  o,
QEvent *  e 
) [protected, virtual]

Event filter is used to pass Qt mouse events root, after translating them in MapQMouseEvent. Note that root grabs gui buttons via x11 directly, thus this mechanism is not used for the regular root widgets!

Definition at line 188 of file QRootWindow.cpp.

References fxRootwindow, and MapQMouseEvent().

TGCompositeFrame * QRootWindow::GetRootFrame (  ) 

Definition at line 227 of file QRootWindow.cpp.

References fxRootwindow.

int QRootWindow::GetRootWid (  )  [inline]

Definition at line 42 of file QRootWindow.h.

References fiWinid.

Bool_t QRootWindow::MapQMouseEvent ( QMouseEvent *  e,
Event_t *  rev 
) [protected]

translate Qt mouse event into root event structure.

Definition at line 103 of file QRootWindow.cpp.

References fiWinid.

Referenced by eventFilter().

void QRootWindow::paintEvent ( QPaintEvent *  e  )  [protected, virtual]

Definition at line 163 of file QRootWindow.cpp.

References fbResizeOnPaint, fiWinid, fQtWinId, and fxRootwindow.

void QRootWindow::SetEditable ( bool  on = true  ) 

make this frame to current root master frame.

Definition at line 98 of file QRootWindow.cpp.

References fxRootwindow.

Referenced by TGo4ViewPanel::StartRootEditor().

void QRootWindow::SetResizeOnPaint ( bool  on = true  )  [inline]

switch root frame resize mode on paint event: true=explicit resize, false=no resize of TQRootFrame

Definition at line 52 of file QRootWindow.h.

References fbResizeOnPaint.

Referenced by TGo4ViewPanel::StartRootEditor().


Member Data Documentation

Bool_t QRootWindow::fbResizeOnPaint [protected]

switch if paint event does explicit resize of ROOT frame (default) for embedded TGedEditor, we better disable it and resize editor from parent widget

Definition at line 81 of file QRootWindow.h.

Referenced by paintEvent(), and SetResizeOnPaint().

Int_t QRootWindow::fiWinid [protected]

ROOT internal window index

Definition at line 74 of file QRootWindow.h.

Referenced by GetRootWid(), MapQMouseEvent(), paintEvent(), and QRootWindow().

WId QRootWindow::fQtWinId [protected]

Qt window id as received from Qt (may change during runtime?)

Definition at line 76 of file QRootWindow.h.

Referenced by paintEvent(), and QRootWindow().

this is the pseudo root window embedded into this widget. is used as parent for subwindows

Definition at line 71 of file QRootWindow.h.

Referenced by AddSubFrame(), closeEvent(), eventFilter(), GetRootFrame(), paintEvent(), QRootWindow(), SetEditable(), and ~QRootWindow().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines