ROOT » GRAF2D » QT » TQtWidget

class TQtWidget: public QWidget

  TQtWidget is a QWidget with the QPixmap double buffer
  It is designed to back the ROOT TCanvasImp class interface  and it can be used
  as a regular Qt Widget to create Qt-based GUI with the embedded TCanvas objects

           This widget can be used as a Qt "custom widget"
         to build a custom GUI interfaces with  Qt Designer

 The class emits the Qt signals and has Qt public slots

  Public slots:  (Qt)

   virtual void cd();  // make the associated TCanvas the current one (shortcut to TCanvas::cd())
   virtual void cd(int subpadnumber); // as above - shortcut to Canvas::cd(int subpadnumber)
   void Disconnect(); // disconnect the QWidget from the ROOT TCanvas (used in the class dtor)
   void Refresh();    // force the associated TCanvas::Update to be called
   virtual bool Save(const QString &fileName) const;  // Save the widget image with some ppixmap file
   virtual bool Save(const char    *fileName) const;
   virtual bool Save(const QString &fileName,const char *format,int quality=60) const;
   virtual bool Save(const char    *fileName,const char *format,int quality=60) const;

  signals        (Qt)

    CanvasPainted();  // Signal the TCanvas has been painted onto the screen
    Saved(bool ok);   // Signal the TCanvas has been saved into the file
    RootEventProcessed(TObject *selected, unsigned int event, TCanvas *c);
                      // Signal the Qt mouse/keyboard event has been process by ROOT
                      // This "signal" is emitted by the enabled mouse events only.
                      // See: EnableSignalEvents
                      // ---  DisableSignalEvents

  public methods:
    The methods below define whether the TQtWidget object emits "RootEventProcessed" Qt signals
     (By default no  RootEventProcessed Qt signal is emitted )
     void EnableSignalEvents (UInt_t f)
     void DisableSignalEvents(UInt_t f),
         where f is a bitwise OR of the mouse event flags:
                  kMousePressEvent       // TCanvas processed QEvent mousePressEvent
                  kMouseMoveEvent        // TCanvas processed QEvent mouseMoveEvent
                  kMouseReleaseEvent     // TCanvas processed QEvent mouseReleaseEvent
                  kMouseDoubleClickEvent // TCanvas processed QEvent mouseDoubleClickEvent
                  kKeyPressEvent         // TCanvas processed QEvent keyPressEvent
                  kEnterEvent            // TCanvas processed QEvent enterEvent
                  kLeaveEvent            // TCanvas processed QEvent leaveEvent

  For example to create the custom responce to the mouse crossing TCanvas
  connect the RootEventProsecced signal with your qt slot:

 connect(tQtWidget,SIGNAL(RootEventProcessed(TObject *, unsigned int, TCanvas *))
          ,this,SLOT(CanvasEvent(TObject *, unsigned int, TCanvas *)));
  . . .

void qtrootexample1::CanvasEvent(TObject *obj, unsigned int event, TCanvas *)
  TQtWidget *tipped = (TQtWidget *)sender();
  const char *objectInfo =
  QString tipText ="You have ";
  if  (tipped == tQtWidget1)
     tipText +="clicked";
     tipText +="passed";
  tipText += " the object <";
  tipText += obj->GetName();
  tipText += "> of class ";
  tipText += obj->ClassName();
  tipText += " : ";
  tipText += objectInfo;


Function Members (Methods)

boolQWidget::acceptDrops() const
QStringQWidget::accessibleDescription() const
QStringQWidget::accessibleName() const
QList<QAction*>QWidget::actions() const
voidQWidget::addAction(QAction* action)
voidQWidget::addActions(QList<QAction*> actions)
boolQWidget::autoFillBackground() const
QPalette::ColorRoleQWidget::backgroundRole() const
QSizeQWidget::baseSize() const
boolQObject::blockSignals(bool b)
static TCanvas*Canvas(TQtWidget* widget)
static TQtWidget*Canvas(const TCanvas* canvas)
static TQtWidget*Canvas(Int_t id)
virtual voidcd()
virtual voidcd(int subpadnumber)
QWidget*QWidget::childAt(const QPoint& p) const
QWidget*QWidget::childAt(int x, int y) const
const QObjectList&QObject::children() const
QRectQWidget::childrenRect() const
QRegionQWidget::childrenRegion() const
static TClass*Class()
intQPaintDevice::colorCount() const
boolQObject::connect(const QObject* sender, const char* signal, const char* member, Qt::ConnectionType type = Qt::AutoConnection) const
static boolQObject::connect(const QObject* sender, const char* signal, const QObject* receiver, const char* member, Qt::ConnectionType = Qt::AutoConnection)
static boolQObject::connect(const QObject* sender, const QMetaMethod& signal, const QObject* receiver, const QMetaMethod& method, Qt::ConnectionType type = Qt::AutoConnection)
QMarginsQWidget::contentsMargins() const
QRectQWidget::contentsRect() const
Qt::ContextMenuPolicyQWidget::contextMenuPolicy() const
QCursorQWidget::cursor() const
intQPaintDevice::depth() const
virtual intQWidget::devType() const
voidDisableSignalEvents(UInt_t f)
boolQObject::disconnect(const QObject* receiver, const char* member = 0)
boolQObject::disconnect(const char* signal = 0, const QObject* receiver = 0, const char* member = 0)
static boolQObject::disconnect(const QObject* sender, const char* signal, const QObject* receiver, const char* member)
static boolQObject::disconnect(const QObject* sender, const QMetaMethod& signal, const QObject* receiver, const QMetaMethod& member)
QList<QByteArray>QObject::dynamicPropertyNames() const
WIdQWidget::effectiveWinId() const
voidEmitSignal(UInt_t f)
voidEnableSignalEvents(UInt_t f)
voidQWidget::ensurePolished() const
virtual voidErase()
virtual boolQObject::eventFilter(QObject*, QEvent*)
static QWidget*QWidget::find(WId)
Qt::FocusPolicyQWidget::focusPolicy() const
QWidget*QWidget::focusProxy() const
QWidget*QWidget::focusWidget() const
const QFont&QWidget::font() const
QFontInfoQWidget::fontInfo() const
QFontMetricsQWidget::fontMetrics() const
QPalette::ColorRoleQWidget::foregroundRole() const
QRectQWidget::frameGeometry() const
QSizeQWidget::frameSize() const
const QRect&QWidget::geometry() const
UInt_tGetAllBits() const
const TQtWidgetBuffer*GetBuffer() const
TCanvas*GetCanvas() const
voidQWidget::getContentsMargins(int* left, int* top, int* right, int* bottom) const
Int_tGetEvent() const
Int_tGetEventX() const
Int_tGetEventY() const
QPixmap*GetOffScreenBuffer() const
TObject*GetSelected() const
TVirtualPad*GetSelectedPad() const
Int_tGetSelectedX() const
Int_tGetSelectedY() const
voidQWidget::grabGesture(Qt::GestureType type, Qt::GestureFlags flags = Qt::GestureFlags())
voidQWidget::grabMouse(const QCursor&)
intQWidget::grabShortcut(const QKeySequence& key, Qt::ShortcutContext context = Qt::WindowShortcut)
QGraphicsEffect*QWidget::graphicsEffect() const
QGraphicsProxyWidget*QWidget::graphicsProxyWidget() const
Qt::HANDLEQWidget::handle() const
boolQWidget::hasFocus() const
boolQWidget::hasMouseTracking() const
intQWidget::height() const
virtual intQWidget::heightForWidth(int) const
intQPaintDevice::heightMM() const
boolQObject::inherits(const char* classname) const
static TApplication*InitRint(Bool_t prompt = kFALSE, const char* appClassName = "QtRint", int* argc = 0, char** argv = 0, void* options = 0, int numOptions = 0, Bool_t noLogo = kTRUE)
Qt::InputMethodHintsQWidget::inputMethodHints() const
virtual QVariantQWidget::inputMethodQuery(Qt::InputMethodQuery) const
voidQWidget::insertAction(QAction* before, QAction* action)
voidQWidget::insertActions(QAction* before, QList<QAction*> actions)
WIdQWidget::internalWinId() const
voidInvertBit(UInt_t f)
virtual TClass*IsA() const
boolQWidget::isActiveWindow() const
boolQWidget::isAncestorOf(const QWidget* child) const
boolIsDoubleBuffered() const
boolQWidget::isEnabled() const
boolQWidget::isEnabledTo(QWidget*) const
boolQWidget::isEnabledToTLW() const
boolQWidget::isFullScreen() const
boolQWidget::isHidden() const
boolQWidget::isLeftToRight() const
boolQWidget::isMaximized() const
boolQWidget::isMinimized() const
boolQWidget::isModal() const
boolQWidget::isRightToLeft() const
Bool_tIsSignalEventEnabled(UInt_t f) const
boolQWidget::isTopLevel() const
boolQWidget::isVisible() const
boolQWidget::isVisibleTo(QWidget*) const
boolQObject::isWidgetType() const
boolQWidget::isWindow() const
boolQWidget::isWindowModified() const
static QWidget*QWidget::keyboardGrabber()
voidQObject::killTimer(int id)
QLayout*QWidget::layout() const
Qt::LayoutDirectionQWidget::layoutDirection() const
QLocaleQWidget::locale() const
intQPaintDevice::logicalDpiX() const
intQPaintDevice::logicalDpiY() const
QPointQWidget::mapFrom(QWidget*, const QPoint&) const
QPointQWidget::mapFromGlobal(const QPoint&) const
QPointQWidget::mapFromParent(const QPoint&) const
QPointQWidget::mapTo(QWidget*, const QPoint&) const
QPointQWidget::mapToGlobal(const QPoint&) const
QPointQWidget::mapToParent(const QPoint&) const
QRegionQWidget::mask() const
intQWidget::maximumHeight() const
QSizeQWidget::maximumSize() const
intQWidget::maximumWidth() const
virtual const QMetaObject*metaObject() const
intQWidget::minimumHeight() const
QSizeQWidget::minimumSize() const
virtual QSizeminimumSizeHint() const
intQWidget::minimumWidth() const
static QWidget*QWidget::mouseGrabber()
voidQWidget::move(const QPoint&)
voidQWidget::move(int x, int y)
voidQObject::moveToThread(QThread* thread)
QWidget*QWidget::nativeParentWidget() const
QWidget*QWidget::nextInFocusChain() const
QRectQWidget::normalGeometry() const
intQPaintDevice::numColors() const
QStringQObject::objectName() const
voidQWidget::overrideWindowFlags(Qt::WindowFlags type)
voidQWidget::overrideWindowState(Qt::WindowStates state)
virtual QPaintEngine*QWidget::paintEngine() const
boolQPaintDevice::paintingActive() const
const QPalette&QWidget::palette() const
QObject*QObject::parent() const
QWidget*QWidget::parentWidget() const
intQPaintDevice::physicalDpiX() const
intQPaintDevice::physicalDpiY() const
QPointQWidget::pos() const
QWidget*QWidget::previousInFocusChain() const
QVariantQObject::property(const char* name) const
virtual intqt_metacall(QMetaObject::Call, int, void**)
virtual void*qt_metacast(const char*)
QRectQWidget::rect() const
static uintQObject::registerUserData()
voidQWidget::releaseShortcut(int id)
voidQWidget::removeAction(QAction* action)
voidQWidget::render(QPaintDevice* target, const QPoint& targetOffset = QPoint(), const QRegion& sourceRegion = QRegion(), QWidget::RenderFlags renderFlags = RenderFlags(DrawWindowBackground | DrawChildren))
voidQWidget::render(QPainter* painter, const QPoint& targetOffset = QPoint(), const QRegion& sourceRegion = QRegion(), QWidget::RenderFlags renderFlags = RenderFlags(DrawWindowBackground | DrawChildren))
voidQWidget::repaint(const QRect&)
voidQWidget::repaint(const QRegion&)
voidQWidget::repaint(int x, int y, int w, int h)
voidResetBit(UInt_t f)
voidQWidget::resize(const QSize&)
voidQWidget::resize(int w, int h)
boolQWidget::restoreGeometry(const QByteArray& geometry)
virtual boolSave(const QString& fileName) const
virtual boolSave(const char* fileName) const
virtual boolSave(const QString& fileName, const char* format, int quality = 60) const
virtual boolSave(const char* fileName, const char* format, int quality = 60) const
QByteArrayQWidget::saveGeometry() const
voidQWidget::scroll(int dx, int dy)
voidQWidget::scroll(int dx, int dy, const QRect&)
voidQWidget::setAcceptDrops(bool on)
voidQWidget::setAccessibleDescription(const QString& description)
voidQWidget::setAccessibleName(const QString& name)
voidSetAllBits(UInt_t f)
voidQWidget::setAttribute(Qt::WidgetAttribute, bool on = true)
voidQWidget::setAutoFillBackground(bool enabled)
voidQWidget::setBaseSize(const QSize&)
voidQWidget::setBaseSize(int basew, int baseh)
voidSetBit(UInt_t f)
voidSetBit(UInt_t f, Bool_t set)
voidSetCanvas(TCanvas* c)
voidSetCanvasDecorator(TQtCanvasPainter* decorator)
voidQWidget::setContentsMargins(const QMargins& margins)
voidQWidget::setContentsMargins(int left, int top, int right, int bottom)
voidQWidget::setContextMenuPolicy(Qt::ContextMenuPolicy policy)
voidQWidget::setCursor(const QCursor&)
voidSetDoubleBuffer(bool on = true)
voidQWidget::setFixedHeight(int h)
voidQWidget::setFixedSize(const QSize&)
voidQWidget::setFixedSize(int w, int h)
voidQWidget::setFixedWidth(int w)
voidQWidget::setFocus(Qt::FocusReason reason)
voidQWidget::setFocusPolicy(Qt::FocusPolicy policy)
voidQWidget::setFont(const QFont&)
voidQWidget::setGeometry(const QRect&)
voidQWidget::setGeometry(int x, int y, int w, int h)
voidQWidget::setGraphicsEffect(QGraphicsEffect* effect)
voidQWidget::setHidden(bool hidden)
voidQWidget::setInputMethodHints(Qt::InputMethodHints hints)
voidQWidget::setLayoutDirection(Qt::LayoutDirection direction)
voidQWidget::setLocale(const QLocale& locale)
voidQWidget::setMask(const QBitmap&)
voidQWidget::setMask(const QRegion&)
voidQWidget::setMaximumHeight(int maxh)
voidQWidget::setMaximumSize(const QSize&)
voidQWidget::setMaximumSize(int maxw, int maxh)
voidQWidget::setMaximumWidth(int maxw)
voidQWidget::setMinimumHeight(int minh)
voidQWidget::setMinimumSize(const QSize&)
voidQWidget::setMinimumSize(int minw, int minh)
voidQWidget::setMinimumWidth(int minw)
voidQWidget::setMouseTracking(bool enable)
voidQObject::setObjectName(const QString& name)
voidQWidget::setPalette(const QPalette&)
voidQWidget::setParent(QWidget* parent)
voidQWidget::setParent(QWidget* parent, Qt::WindowFlags f)
boolQObject::setProperty(const char* name, const QVariant& value)
virtual voidSetSaveFormat(const char* format)
voidQWidget::setShortcutAutoRepeat(int id, bool enable = true)
voidQWidget::setShortcutEnabled(int id, bool enable = true)
voidQWidget::setShown(bool shown)
voidQWidget::setSizeIncrement(const QSize&)
voidQWidget::setSizeIncrement(int w, int h)
voidQWidget::setSizePolicy(QSizePolicy::Policy horizontal, QSizePolicy::Policy vertical)
voidQWidget::setStatusTip(const QString&)
voidQWidget::setStyleSheet(const QString& styleSheet)
static voidQWidget::setTabOrder(QWidget*, QWidget*)
voidQWidget::setToolTip(const QString&)
voidQWidget::setUpdatesEnabled(bool enable)
voidQObject::setUserData(uint id, QObjectUserData* data)
virtual voidQWidget::setVisible(bool visible)
voidQWidget::setWhatsThis(const QString&)
voidQWidget::setWindowFilePath(const QString& filePath)
voidQWidget::setWindowFlags(Qt::WindowFlags type)
voidQWidget::setWindowIcon(const QIcon& icon)
voidQWidget::setWindowIconText(const QString&)
voidQWidget::setWindowModality(Qt::WindowModality windowModality)
voidQWidget::setWindowOpacity(qreal level)
voidQWidget::setWindowRole(const QString&)
voidQWidget::setWindowState(Qt::WindowStates state)
voidQWidget::setWindowSurface(QWindowSurface* surface)
voidQWidget::setWindowTitle(const QString&)
virtual voidShowMembers(TMemberInspector& insp) const
boolQObject::signalsBlocked() const
QSizeQWidget::size() const
virtual QSizesizeHint() const
QSizeQWidget::sizeIncrement() const
virtual QSizePolicysizePolicy() const
intQObject::startTimer(int interval)
QStringQWidget::statusTip() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
QStyle*QWidget::style() const
QStringQWidget::styleSheet() const
boolQWidget::testAttribute(Qt::WidgetAttribute) const
Bool_tTestBit(UInt_t f) const
Int_tTestBits(UInt_t f) const
QThread*QObject::thread() const
QStringQWidget::toolTip() const
QWidget*QWidget::topLevelWidget() const
TQtWidget(QWidget* parent = 0, Qt::WFlags f = 0, bool embedded = true)
TQtWidget(QWidget* parent, const char* name, Qt::WFlags f = 0, bool embedded = true)
static QStringtr(const char* s, const char* c = 0)
static QStringtr(const char* s, const char* c, int n)
static QStringtrUtf8(const char* s, const char* c = 0)
static QStringtrUtf8(const char* s, const char* c, int n)
boolQWidget::underMouse() const
voidQWidget::ungrabGesture(Qt::GestureType type)
voidQWidget::update(const QRect&)
voidQWidget::update(const QRegion&)
voidQWidget::update(int x, int y, int w, int h)
boolQWidget::updatesEnabled() const
QObjectUserData*QObject::userData(uint id) const
QRegionQWidget::visibleRegion() const
QStringQWidget::whatsThis() const
intQWidget::width() const
intQPaintDevice::widthMM() const
QWidget*QWidget::window() const
QStringQWidget::windowFilePath() const
Qt::WindowFlagsQWidget::windowFlags() const
QIconQWidget::windowIcon() const
QStringQWidget::windowIconText() const
Qt::WindowModalityQWidget::windowModality() const
qrealQWidget::windowOpacity() const
QStringQWidget::windowRole() const
Qt::WindowStatesQWidget::windowState() const
QWindowSurface*QWidget::windowSurface() const
QStringQWidget::windowTitle() const
Qt::WindowTypeQWidget::windowType() const
WIdQWidget::winId() const
intQWidget::x() const
const QX11Info&QWidget::x11Info() const
Qt::HANDLEQWidget::x11PictureHandle() const
intQWidget::y() const
virtual voidQWidget::actionEvent(QActionEvent*)
virtual voidQWidget::changeEvent(QEvent*)
virtual voidQObject::childEvent(QChildEvent*)
virtual voidQWidget::closeEvent(QCloseEvent*)
virtual voidQObject::connectNotify(const char* signal)
virtual voidcontextMenuEvent(QContextMenuEvent*)
voidQWidget::create(WId = 0, bool initializeWindow = true, bool destroyOldWindow = true)
voidQWidget::customContextMenuRequested(const QPoint& pos)
virtual voidcustomEvent(QEvent*)
voidQWidget::destroy(bool destroyWindow = true, bool destroySubWindows = true)
voidQObject::destroyed(QObject* = 0)
virtual voidQObject::disconnectNotify(const char* signal)
virtual voidQWidget::dragEnterEvent(QDragEnterEvent*)
virtual voidQWidget::dragLeaveEvent(QDragLeaveEvent*)
virtual voidQWidget::dragMoveEvent(QDragMoveEvent*)
virtual voidQWidget::dropEvent(QDropEvent*)
virtual voidEmitCanvasPainted()
virtual voidQWidget::enabledChange(bool)
virtual voidenterEvent(QEvent*)
virtual boolQWidget::event(QEvent*)
virtual voidexitSizeEvent()
virtual voidfocusInEvent(QFocusEvent*)
virtual boolQWidget::focusNextPrevChild(bool next)
virtual voidfocusOutEvent(QFocusEvent*)
virtual voidQWidget::fontChange(const QFont&)
QWidget*GetRootID() const
virtual voidQWidget::hideEvent(QHideEvent*)
virtual voidQWidget::inputMethodEvent(QInputMethodEvent*)
virtual voidkeyPressEvent(QKeyEvent*)
virtual voidkeyReleaseEvent(QKeyEvent*)
virtual voidQWidget::languageChange()
virtual voidleaveEvent(QEvent*)
virtual intQWidget::metric(QPaintDevice::PaintDeviceMetric) const
virtual voidmouseDoubleClickEvent(QMouseEvent*)
virtual voidmouseMoveEvent(QMouseEvent*)
virtual voidmousePressEvent(QMouseEvent*)
virtual voidmouseReleaseEvent(QMouseEvent*)
virtual voidQWidget::moveEvent(QMoveEvent*)
virtual voidpaintEvent(QPaintEvent*)
boolpaintFlag(bool mode = true)
boolPaintingActive() const
virtual voidQWidget::paletteChange(const QPalette&)
intQObject::receivers(const char* signal) const
virtual voidresizeEvent(QResizeEvent*)
voidRootEventProcessed(TObject* selected, unsigned int event, TCanvas* c)
voidSaved(bool ok)
QObject*QObject::sender() const
intQObject::senderSignalIndex() const
voidSetIgnoreLeaveEnter(int ignoreLE = 1)
voidSetRootID(QWidget* wrapper)
virtual voidSetSizeHint(const QSize& size)
virtual voidshowEvent(QShowEvent*)
virtual voidstretchWidget(QResizeEvent* e)
virtual voidQWidget::styleChange(QStyle&)
virtual voidQWidget::tabletEvent(QTabletEvent*)
virtual voidQObject::timerEvent(QTimerEvent*)
virtual voidQWidget::wheelEvent(QWheelEvent*)
virtual voidQWidget::windowActivationChange(bool)
virtual boolQWidget::x11Event(XEvent*)
voidoperator=(const TQtWidget&)
static voidqt_static_metacall(QObject*, QMetaObject::Call, int, void**)
TQtWidget(const TQtWidget&)

Data Members

static QWidget::RenderFlagQWidget::DrawChildren
static QWidget::RenderFlagQWidget::DrawWindowBackground
static QWidget::RenderFlagQWidget::IgnoreMask
static QPaintDevice::PaintDeviceMetricQPaintDevice::PdmDepth
static QPaintDevice::PaintDeviceMetricQPaintDevice::PdmDpiX
static QPaintDevice::PaintDeviceMetricQPaintDevice::PdmDpiY
static QPaintDevice::PaintDeviceMetricQPaintDevice::PdmHeight
static QPaintDevice::PaintDeviceMetricQPaintDevice::PdmHeightMM
static QPaintDevice::PaintDeviceMetricQPaintDevice::PdmNumColors
static QPaintDevice::PaintDeviceMetricQPaintDevice::PdmPhysicalDpiX
static QPaintDevice::PaintDeviceMetricQPaintDevice::PdmPhysicalDpiY
static QPaintDevice::PaintDeviceMetricQPaintDevice::PdmWidth
static QPaintDevice::PaintDeviceMetricQPaintDevice::PdmWidthMM
static TQtWidget::(anonymous)kENTERSIZEMOVE
static TQtWidget::(anonymous)kEXITSIZEMOVE
static TQtWidget::(anonymous)kFORCESIZE
static const QMetaObjectstaticMetaObject
static const QMetaObjectQWidget::staticMetaObject
static const QMetaObjectQObject::staticMetaObject
TQtWidgetBuffer*fPixmapIDDouble buffer of this widget
TQtWidgetBuffer*fPixmapScreenDouble buffer for no-double buffer operation
static const QMetaObjectQObject::staticQtMetaObject
UInt_tfBitsbit field status word
QPointer<TQtCanvasPainter>fCanvasDecorator< The object to paint onto the TQtWidget on the top of TCanvas image
static TQtWidget::(anonymous)kBitMask
static const QMetaObjectExtraDatastaticMetaObjectExtraData

Class Charts

Inheritance Chart:

Function documentation

TQtWidget(QWidget* parent, const char* name, Qt::WFlags f = 0, bool embedded = true)
TQtWidget(QWidget* parent = 0, Qt::WFlags f = 0, bool embedded = true)
{ setObjectName("tqtwidget"); Init() ;}
void Init()
void AdjustBufferSize()
 Adjust the widget buffer size
TCanvas * Canvas()
 Alias for GetCanvas method
TCanvas * Canvas(TQtWidget* widget)
 static: return TCanvas by TQtWidget pointer
TQtWidget * Canvas(const TCanvas* canvas)
 static: return the TQtWidget backend for TCanvas *canvas object
TQtWidget * Canvas(Int_t id)
 static: return TQtWidget by TCanvas id
TApplication * InitRint(Bool_t prompt = kFALSE, const char* appClassName = "QtRint", int* argc = 0, char** argv = 0, void* options = 0, int numOptions = 0, Bool_t noLogo = kTRUE)
 Instantiate ROOT from within Qt application if needed
 Return the TRint pointer
 Most parametrs are passed to TRint class ctor

 Bool_t prompt = kTRUE;  Instantiate ROOT with ROOT command prompt
                 kFALSE; No ROOT prompt. The default for Qt GUI applications

  The prompt option can be defined via ROOT parameter file ".rootrc"
    . . .
  Gui.Prompt   yes

void Erase()
 Erases the entire widget and its double buffer
void cd()
 [slot] to make this embedded canvas the current one
void cd(int subpadnumber)
 [slot] to make this embedded canvas / pad the current one
void Disconnect()
 [slot] Disconnect the Qt widget from TCanvas object before deleting
 to avoid the dead lock
 one has to set CanvasID = 0 to disconnect things properly.
void Refresh()
 [slot]  to allow Qt signal refreshing the ROOT TCanvas if needed
 use the permanent single shot timer to eliminate
 the redundand refreshing for the sake of the performance
void RefreshCB()
 [slot]  to allow Qt signal refreshing the ROOT TCanvas if needed
void SetCanvas(TCanvas* c)
  remember my host TCanvas and adopt its name
customEvent(QEvent* )
 The custom response to the special WIN32 events
 These events are not present with X11 systems
void contextMenuEvent(QContextMenuEvent* )
 The custom response to the Qt QContextMenuEvent
 Map QContextMenuEvent to the ROOT kButton3Down = 3  event
void focusInEvent(QFocusEvent* )
 The custom response to the Qt QFocusEvent "in"
 this imposes an extra protection to avoid TObject interaction with
 mouse event accidently
void focusOutEvent(QFocusEvent* )
 The custom response to the Qt QFocusEvent "out"
 this imposes an extra protection to avoid TObject interaction with
 mouse event accidently
void mousePressEvent(QMouseEvent* )
 Map the Qt mouse press button event to the ROOT TCanvas events
 Mouse events occur when a mouse button is pressed or released inside
 a widget or when the mouse cursor is moved.
void mouseMoveEvent(QMouseEvent* )
  Map the Qt mouse move pointer event to the ROOT TCanvas events
  kMouseMotion   = 51,
  kButton1Motion = 21, kButton2Motion = 22, kButton3Motion = 23, kKeyPress = 24
void mouseReleaseEvent(QMouseEvent* )
  Map the Qt mouse button release event to the ROOT TCanvas events
   kButton1Up     = 11, kButton2Up     = 12, kButton3Up     = 13
void mouseDoubleClickEvent(QMouseEvent* )
  Map the Qt mouse double click button event to the ROOT TCanvas events
  kButton1Double = 61, kButton2Double = 62, kButton3Double = 63
void keyPressEvent(QKeyEvent* )
 Map the Qt key press event to the ROOT TCanvas events
 kKeyDown  =  4
void keyReleaseEvent(QKeyEvent* )
 Map the Qt key release event to the ROOT TCanvas events
 kKeyUp    = 14
void enterEvent(QEvent* )
 Map the Qt mouse enters widget event to the ROOT TCanvas events
 kMouseEnter    = 52
void leaveEvent(QEvent* )
  Map the Qt mouse leaves widget event to the ROOT TCanvas events
 kMouseLeave    = 53
void resizeEvent(QResizeEvent* )
 The widget will be erased and receive a paint event immediately after
 processing the resize event.
 No drawing need be (or should be) done inside this handler.
void SetSaveFormat(const char* format)
 Set the default save format for the widget
bool Save(const char* fileName) const
  TQtWidget::Save(const QString &fileName) is a public Qt slot.
  it saves the double buffer of this object using the default save
  format  defined the file extension
  If the "fileName" has no extension the "default" format is to be used instead
  The default format is "PNG".
  It can be changed with the TQtWidget::SetSaveFormat method

bool Save(const QString& fileName) const
  TQtWidget::Save(const QString &fileName) is a public Qt slot.
  it saves the double buffer of this object using the default save
  format  defined the file extension
  If the "fileName" has no extension the "default" format is to be used instead
  The default format is "PNG".
  It can be changed with the TQtWidget::SetSaveFormat method

bool Save(const char* fileName, const char* format, int quality = 60) const
bool Save(const QString& fileName, const char* format, int quality = 60) const
  TQtWidget::save is a public Qt slot.
  it saves the double buffer of this object using QPixmap facility
void SetDoubleBuffer(bool on = true)
 Set the double buffered mode on/off
void stretchWidget(QResizeEvent* e)
 Stretch the widget during sizing
void exitSizeEvent()
 Response to the "exit size event"
bool paintFlag(bool mode = true)
  Set new fPaint flag
  Returns: the previous version of the flag
void showEvent(QShowEvent* )
 Custom handler of the Qt show event
 Non-spontaneous show events are sent to widgets immediately before
 they are shown.
 The spontaneous show events of top-level widgets are delivered afterwards.
void paintEvent(QPaintEvent* )
 Custom handler of the Qt paint event
 A paint event is a request to repaint all or part of the widget.
 It can happen as a result of repaint() or update(), or because the widget
 was obscured and has now been uncovered, or for many other reasons.
void SetSizeHint(const QSize& size)
  sets the preferred size of the widget.
QSize sizeHint() const
  returns the preferred size of the widget.
QSize minimumSizeHint() const
 returns the smallest size the widget can have.
QSizePolicy sizePolicy() const
  returns a QSizePolicy; a value describing the space requirements
void EmitTestedSignal()
void SetBit(UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f.
TQtWidgetBuffer & SetBuffer()
 Create (if needed) and return the buffer
QPixmap * GetOffScreenBuffer() const
  return the current widget buffer;
TCanvas * GetCanvas() const
{ return fCanvas; }
const TQtWidgetBuffer * GetBuffer() const
bool PaintingActive() const
void SetRootID(QWidget* wrapper)
{ fWrapper = wrapper;}
QWidget * GetRootID() const
{ return fWrapper;}
Int_t GetEvent() const

  Proxy methods to access the TCanvas selected TObject
  and last processed event

{ return GetCanvas()->GetEvent(); }
Int_t GetEventX() const
{ return GetCanvas()->GetEventX(); }
Int_t GetEventY() const
{ return GetCanvas()->GetEventY(); }
TObject * GetSelected() const
{ return GetCanvas()->GetSelected(); }
Int_t GetSelectedX() const
{ return GetCanvas()->GetSelectedX(); }
Int_t GetSelectedY() const
{ return GetCanvas()->GetSelectedY(); }
TVirtualPad * GetSelectedPad() const
{ return GetCanvas()->GetSelectedPad(); }
UInt_t GetAllBits() const
----- bit manipulation
{ return fBits; }
void SetAllBits(UInt_t f)
{ fBits = f; }
void SetBit(UInt_t f)
{ fBits |= f & kBitMask; }
void ResetBit(UInt_t f)
{ fBits &= ~(f & kBitMask); }
Bool_t TestBit(UInt_t f) const
{ return (Bool_t) ((fBits & f) != 0); }
Int_t TestBits(UInt_t f) const
{ return (Int_t) (fBits & f); }
void InvertBit(UInt_t f)
{ fBits ^= f & kBitMask; }
TQtCanvasPainter * CanvasDecorator()
{ return fCanvasDecorator; }
void SetCanvasDecorator(TQtCanvasPainter* decorator)
{ fCanvasDecorator = decorator;}
void EnableSignalEvents(UInt_t f)
{ SetBit (f); }
void DisableSignalEvents(UInt_t f)
{ ResetBit(f); }
Bool_t IsSignalEventEnabled(UInt_t f) const
{ return TestBit (f); }
void EmitSignal(UInt_t f)
void SetIgnoreLeaveEnter(int ignoreLE = 1)
{ fIgnoreLeaveEnter = ignoreLE; }
TQtWidget(const TQtWidget& )
void operator=(const TQtWidget& )
----- Private bits, clients can only test but not change them
void ResetCanvas()
{ fCanvas = 0;}
bool IsDoubleBuffered() const
{ return fDoubleBufferOn; }
void EmitCanvasPainted()
{ emit CanvasPainted(); }
void CanvasPainted()
 emit the Qt signal when the double buffer of the TCamvas has been filled up
void Saved(bool ok)
void RootEventProcessed(TObject* selected, unsigned int event, TCanvas* c)