GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QRootWindow Class Reference

#include <QRootWindow.h>

+ Inheritance diagram for QRootWindow:

Public Member Functions

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

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
 
double fQtScalingfactor
 

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, fQtScalingfactor, fQtWinId, and fxRootwindow.

QRootWindow::~QRootWindow ( )
virtual

Definition at line 224 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 92 of file QRootWindow.cpp.

References fxRootwindow.

void QRootWindow::closeEvent ( QCloseEvent *  e)
protectedvirtual

Definition at line 215 of file QRootWindow.cpp.

References fxRootwindow.

bool QRootWindow::eventFilter ( QObject *  o,
QEvent *  e 
)
protectedvirtual

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 193 of file QRootWindow.cpp.

References fxRootwindow, and MapQMouseEvent().

TGCompositeFrame * QRootWindow::GetRootFrame ( )

Definition at line 232 of file QRootWindow.cpp.

References fxRootwindow.

int QRootWindow::GetRootWid ( ) const
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 108 of file QRootWindow.cpp.

References fiWinid.

Referenced by eventFilter().

void QRootWindow::paintEvent ( QPaintEvent *  e)
protectedvirtual

Definition at line 168 of file QRootWindow.cpp.

References fbResizeOnPaint, fiWinid, fQtWinId, and fxRootwindow.

double QRootWindow::ScaledHeight ( )

deliver Heightth scaled with Qt5 screen scaling factor

Definition at line 244 of file QRootWindow.cpp.

References fQtScalingfactor.

Referenced by TGo4ViewPanel::ResizeGedEditor().

double QRootWindow::ScaledWidth ( )

deliver width scaled with Qt5 screen scaling factor

Definition at line 239 of file QRootWindow.cpp.

References fQtScalingfactor.

Referenced by TGo4ViewPanel::ResizeGedEditor().

void QRootWindow::SetEditable ( bool  on = true)

make this frame to current root master frame.

Definition at line 103 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 87 of file QRootWindow.h.

Referenced by paintEvent(), and SetResizeOnPaint().

Int_t QRootWindow::fiWinid
protected

ROOT internal window index

Definition at line 80 of file QRootWindow.h.

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

double QRootWindow::fQtScalingfactor
protected

Definition at line 89 of file QRootWindow.h.

Referenced by QRootWindow(), ScaledHeight(), and ScaledWidth().

WId QRootWindow::fQtWinId
protected

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

Definition at line 82 of file QRootWindow.h.

Referenced by paintEvent(), and QRootWindow().

TQRootFrame* QRootWindow::fxRootwindow
protected

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

Definition at line 77 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: