Qt 4.8
Public Functions | Properties | List of all members
QEglFSWindow Class Reference

#include <qeglfswindow.h>

Inheritance diagram for QEglFSWindow:
QPlatformWindow

Public Functions

QPlatformGLContextglContext () const
 Reimplement to return the glContext associated with the window. More...
 
 QEglFSWindow (QWidget *w, QEglFSScreen *screen)
 
void setGeometry (const QRect &)
 This function is called by Qt whenever a window is moved or the window is resized. More...
 
WId winId () const
 Reimplement in subclasses to return a handle to the native window. More...
 
- Public Functions inherited from QPlatformWindow
virtual QRect geometry () const
 Returnes the current geometry of a window. More...
 
virtual void lower ()
 Reimplement to be able to let Qt lower windows to the bottom of the desktop. More...
 
 QPlatformWindow (QWidget *tlw)
 Constructs a platform window with the given top level widget. More...
 
virtual void raise ()
 Reimplement to be able to let Qt rais windows to the top of the desktop. More...
 
virtual void requestActivateWindow ()
 Reimplement to let Qt be able to request activation/focus for a window. More...
 
virtual void setOpacity (qreal level)
 Reimplement to be able to let Qt set the opacity level of a window. More...
 
virtual void setParent (const QPlatformWindow *window)
 This function is called to enable native child widgets in QPA. More...
 
virtual void setVisible (bool visible)
 Reimplemented in subclasses to show the surface if visible is true, and hide it if visible is false. More...
 
virtual Qt::WindowFlags setWindowFlags (Qt::WindowFlags flags)
 Requests setting the window flags of this surface to type. More...
 
virtual void setWindowTitle (const QString &title)
 Reimplement to set the window title to title. More...
 
QWidgetwidget () const
 Returnes the widget which belongs to the QPlatformWindow. More...
 
virtual Qt::WindowFlags windowFlags () const
 Returns the effective window flags for this surface. More...
 
virtual ~QPlatformWindow ()
 Virtual destructor does not delete its top level widget. More...
 

Properties

QEglFSScreenm_screen
 
WId m_winid
 

Additional Inherited Members

- Protected Variables inherited from QPlatformWindow
QScopedPointer< QPlatformWindowPrivated_ptr
 

Detailed Description

Definition at line 53 of file qeglfswindow.h.

Constructors and Destructors

◆ QEglFSWindow()

QEglFSWindow::QEglFSWindow ( QWidget w,
QEglFSScreen screen 
)

Definition at line 48 of file qeglfswindow.cpp.

49  : QPlatformWindow(w), m_screen(screen)
50 {
51  static int serialNo = 0;
52  m_winid = ++serialNo;
53 #ifdef QEGL_EXTRA_DEBUG
54  qWarning("QEglWindow %p: %p %p 0x%x\n", this, w, screen, uint(m_winid));
55 #endif
56 }
QPlatformWindow(QWidget *tlw)
Constructs a platform window with the given top level widget.
Q_CORE_EXPORT void qWarning(const char *,...)
unsigned int uint
Definition: qglobal.h:996
QEglFSScreen * m_screen
Definition: qeglfswindow.h:64

Functions

◆ glContext()

QPlatformGLContext * QEglFSWindow::glContext ( ) const
virtual

Reimplement to return the glContext associated with the window.

Reimplemented from QPlatformWindow.

Definition at line 78 of file qeglfswindow.cpp.

79 {
80 #ifdef QEGL_EXTRA_DEBUG
81  qWarning("QEglWindow::glContext %p\n", m_screen->platformContext());
82 #endif
84  return m_screen->platformContext();
85 }
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
Q_CORE_EXPORT void qWarning(const char *,...)
QPlatformGLContext * platformContext() const
QEglFSScreen * m_screen
Definition: qeglfswindow.h:64

◆ setGeometry()

void QEglFSWindow::setGeometry ( const QRect rect)
virtual

This function is called by Qt whenever a window is moved or the window is resized.

The resize can happen programatically(from ie. user application) or by the window manager. This means that there is no need to call this function specifically from the window manager callback, instead call QWindowSystemInterface::handleGeometryChange(QWidget *w, const QRect &newRect);

Reimplemented from QPlatformWindow.

Definition at line 59 of file qeglfswindow.cpp.

60 {
61  // We only support full-screen windows
64 
65  // Since toplevels are fullscreen, propegate the screen size back to the widget
66  widget()->setGeometry(rect);
67 
69 }
virtual void setGeometry(const QRect &rect)
This function is called by Qt whenever a window is moved or the window is resized.
void setGeometry(int x, int y, int w, int h)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: qwidget.h:1017
virtual QRect availableGeometry() const
Reimplement in subclass to return the pixel geometry of the available space This normally is the desk...
static void handleGeometryChange(QWidget *w, const QRect &newRect)
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
QEglFSScreen * m_screen
Definition: qeglfswindow.h:64
QWidget * widget() const
Returnes the widget which belongs to the QPlatformWindow.

◆ winId()

WId QEglFSWindow::winId ( ) const
virtual

Reimplement in subclasses to return a handle to the native window.

Reimplemented from QPlatformWindow.

Definition at line 71 of file qeglfswindow.cpp.

72 {
73  return m_winid;
74 }

Properties

◆ m_screen

QEglFSScreen* QEglFSWindow::m_screen
private

Definition at line 64 of file qeglfswindow.h.

Referenced by glContext(), and setGeometry().

◆ m_winid

WId QEglFSWindow::m_winid
private

Definition at line 65 of file qeglfswindow.h.

Referenced by QEglFSWindow(), and winId().


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