API Documentation
Loading...
Searching...
No Matches
WindowContainer Class Reference

A (hacky) class for storing a window into a container. This is used if the rendering engine for a particular widget is different from the one used by the application. The hackiness comes from Qt's limited support for this functionality which results in the need to hack around the errors in Qt's core library. More...

#include <WindowContainer.h>

Inheritance diagram for WindowContainer:
[legend]
Collaboration diagram for WindowContainer:
[legend]

Public Member Functions

bool event (QEvent *event) override
 
void paintEvent (QPaintEvent *event) override
 
void resizeEvent (QResizeEvent *resize_event) override
 
void setEventForwarder (const std::function< bool(QEvent *event)> &forwarder)
 
void setWidget (QWidget *window)
 
void setWindow (QWindow *window)
 
virtual void updateSize ()
 
void visibleHack ()
 
 WindowContainer (QWidget *parent=nullptr)
 
QPoint windowOffset () const
 

Static Public Member Functions

static Qt::WindowFlags windowFlags ()
 

Protected Attributes

QWidget * m_container
 
std::function< bool(QEvent *event)> m_event_forwarder
 
QSize m_last_paint_size
 
QTimer * m_location_timer
 
QWindow * m_window
 

Detailed Description

A (hacky) class for storing a window into a container. This is used if the rendering engine for a particular widget is different from the one used by the application. The hackiness comes from Qt's limited support for this functionality which results in the need to hack around the errors in Qt's core library.


Constructor & Destructor Documentation

◆ WindowContainer()

WindowContainer ( QWidget * parent = nullptr)
inline

Member Function Documentation

◆ event()

bool event ( QEvent * event)
inlineoverride

◆ paintEvent()

void paintEvent ( QPaintEvent * event)
inlineoverride

◆ resizeEvent()

void resizeEvent ( QResizeEvent * resize_event)
inlineoverride

◆ setEventForwarder()

void setEventForwarder ( const std::function< bool(QEvent *event)> & forwarder)
inline

◆ setWidget()

void setWidget ( QWidget * window)
inline

◆ setWindow()

void setWindow ( QWindow * window)
inline

◆ updateSize()

virtual void updateSize ( )
inlinevirtual

Reimplemented in QTGraphicsWidget.

◆ visibleHack()

void visibleHack ( )
inline

◆ windowFlags()

static Qt::WindowFlags windowFlags ( )
inlinestatic

◆ windowOffset()

QPoint windowOffset ( ) const
inline

Member Data Documentation

◆ m_container

QWidget* m_container
protected

◆ m_event_forwarder

std::function<bool(QEvent * event)> m_event_forwarder
protected

◆ m_last_paint_size

QSize m_last_paint_size
protected

◆ m_location_timer

QTimer* m_location_timer
protected

◆ m_window

QWindow* m_window
protected

The documentation for this class was generated from the following file: