GSI Object Oriented Online Offline (Go4)
GO4-6.3.0
|
#include <QRootWindow.h>
Public Member Functions | |
QRootWindow (QWidget *parent=nullptr, const char *name=nullptr, bool designermode=false) | |
virtual | ~QRootWindow () |
TGCompositeFrame * | GetRootFrame () |
int | GetRootWid () const |
void | AddSubFrame (TGFrame *f, TGLayoutHints *l=nullptr) |
void | SetEditable (bool on=true) |
void | SetResizeOnPaint (bool on=true) |
double | ScaledWidth () |
double | ScaledHeight () |
Protected Member Functions | |
bool | eventFilter (QObject *, QEvent *) override |
void | paintEvent (QPaintEvent *e) override |
void | closeEvent (QCloseEvent *e) override |
Bool_t | MapQMouseEvent (QMouseEvent *e, Event_t *rev) |
Protected Attributes | |
TQRootFrame * | fxRootwindow {nullptr} |
Int_t | fiWinid {0} |
WId | fQtWinId |
Bool_t | fbResizeOnPaint {kFALSE} |
double | fQtScalingfactor {0} |
Qt widget wrapper for ROOT TGWindow class.
Definition at line 32 of file QRootWindow.h.
QRootWindow::QRootWindow | ( | QWidget * | parent = nullptr , |
const char * | name = nullptr , |
||
bool | designermode = false |
||
) |
real ctor
Definition at line 64 of file QRootWindow.cpp.
References fiWinid, fQtScalingfactor, fQtWinId, and fxRootwindow.
|
virtual |
Definition at line 233 of file QRootWindow.cpp.
References fxRootwindow.
void QRootWindow::AddSubFrame | ( | TGFrame * | f, |
TGLayoutHints * | l = nullptr |
||
) |
Add root subframe into this widget
Definition at line 90 of file QRootWindow.cpp.
References fxRootwindow.
Referenced by GetRootWid().
|
overrideprotected |
Definition at line 224 of file QRootWindow.cpp.
References fxRootwindow.
Referenced by SetResizeOnPaint().
|
overrideprotected |
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 200 of file QRootWindow.cpp.
References fxRootwindow, and MapQMouseEvent().
Referenced by SetResizeOnPaint().
TGCompositeFrame * QRootWindow::GetRootFrame | ( | ) |
Definition at line 241 of file QRootWindow.cpp.
References fxRootwindow.
|
inline |
Definition at line 42 of file QRootWindow.h.
References AddSubFrame(), fiWinid, l, and SetEditable().
|
protected |
translate Qt mouse event into root event structure.
Definition at line 106 of file QRootWindow.cpp.
References fiWinid.
Referenced by eventFilter(), and SetResizeOnPaint().
|
overrideprotected |
Definition at line 173 of file QRootWindow.cpp.
References fbResizeOnPaint, fiWinid, fQtWinId, and fxRootwindow.
Referenced by SetResizeOnPaint().
double QRootWindow::ScaledHeight | ( | ) |
deliver Height scaled with Qt5 screen scaling factor
Definition at line 251 of file QRootWindow.cpp.
References fQtScalingfactor.
Referenced by QRootCanvas::resizeEditor(), and SetResizeOnPaint().
double QRootWindow::ScaledWidth | ( | ) |
deliver width scaled with Qt5 screen scaling factor
Definition at line 246 of file QRootWindow.cpp.
References fQtScalingfactor.
Referenced by QRootCanvas::resizeEditor(), and SetResizeOnPaint().
void QRootWindow::SetEditable | ( | bool | on = true | ) |
make this frame to current root master frame.
Definition at line 101 of file QRootWindow.cpp.
References fxRootwindow.
Referenced by GetRootWid(), and QRootCanvas::toggleEditor().
|
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 closeEvent(), eventFilter(), fbResizeOnPaint, MapQMouseEvent(), paintEvent(), ScaledHeight(), and ScaledWidth().
Referenced by QRootCanvas::toggleEditor().
|
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().
|
protected |
ROOT internal window index
Definition at line 80 of file QRootWindow.h.
Referenced by GetRootWid(), MapQMouseEvent(), paintEvent(), and QRootWindow().
|
protected |
Definition at line 89 of file QRootWindow.h.
Referenced by QRootWindow(), ScaledHeight(), and ScaledWidth().
|
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().
|
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().