diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-06-21 13:39:26 +0200 |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2011-06-21 14:02:22 +0200 |
commit | 176f30b13739b352cbe453cba7796d9a9c808bcd (patch) | |
tree | 8fa60b6ae4ef06455652863a0406bc5e86a22303 /src/gui/kernel/qplatformwindow_qpa.cpp | |
parent | 272daebaa07b21e372ad4274fafb51ce0be92396 (diff) |
OpenGL API refactor.
Rename QGuiGLFormat to QSurfaceFormat, and make QWindow sub-class of
QSurface and QPlatformWindow sub-class of QPlatformSurface, instead of
having QPlatformGLSurface accessor in QWindow.
Diffstat (limited to 'src/gui/kernel/qplatformwindow_qpa.cpp')
-rw-r--r-- | src/gui/kernel/qplatformwindow_qpa.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/gui/kernel/qplatformwindow_qpa.cpp b/src/gui/kernel/qplatformwindow_qpa.cpp index feffd0cfed..b1fdc9734d 100644 --- a/src/gui/kernel/qplatformwindow_qpa.cpp +++ b/src/gui/kernel/qplatformwindow_qpa.cpp @@ -56,7 +56,8 @@ class QPlatformWindowPrivate */ QPlatformWindow::QPlatformWindow(QWindow *window) - : d_ptr(new QPlatformWindowPrivate) + : QPlatformSurface(QSurface::Window) + , d_ptr(new QPlatformWindowPrivate) { Q_D(QPlatformWindow); d->window = window; @@ -88,6 +89,14 @@ QPlatformWindow *QPlatformWindow::parent() const } /*! + Returns the actual surface format of the window. +*/ +QSurfaceFormat QPlatformWindow::format() const +{ + return QSurfaceFormat(); +} + +/*! 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 @@ -209,14 +218,6 @@ void QPlatformWindow::requestActivateWindow() QWindowSystemInterface::handleWindowActivated(window()); } -/*! - Reimplement to create a GL surface for the window. -*/ -QPlatformGLSurface *QPlatformWindow::createGLSurface() const -{ - return 0; -} - bool QPlatformWindow::setKeyboardGrabEnabled(bool grab) { Q_UNUSED(grab); |