summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformwindow.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2012-10-01 12:22:44 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-01 16:03:48 +0200
commitff3e2fbe2134fe0ae8c5427b91424c6a585c2dae (patch)
treeece59e0fe68817cf8c2e796d5c172cc35ec26d5d /src/gui/kernel/qplatformwindow.cpp
parent39a06115b638487b1e3a5ab0911ca82de525b275 (diff)
Document QPA implementation aspects.
Change-Id: I4fef8a534b145efa9655a9070f790bf9aba030d9 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/gui/kernel/qplatformwindow.cpp')
-rw-r--r--src/gui/kernel/qplatformwindow.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp
index 43fbbed269..9e1e6be532 100644
--- a/src/gui/kernel/qplatformwindow.cpp
+++ b/src/gui/kernel/qplatformwindow.cpp
@@ -456,6 +456,37 @@ bool QPlatformWindow::frameStrutEventsEnabled() const
The only way to retrieve a QPlatformOpenGLContext in QPA is by calling the glContext() function
on QPlatformWindow.
+ \section1 Implementation Aspects
+
+ \list 1
+ \li Mouse grab: Qt expects windows to automatically grab the mouse if the user presses
+ a button until the button is released.
+ Automatic grab should be released if some window is explicitly grabbed.
+ \li Enter/Leave events: Enter and leave events should be sent independently of
+ explicit mouse grabs (\c{setMouseGrabEnabled()}). That is, if the mouse leaves
+ a window that has explicit mouse grab, a leave event should be sent and other
+ windows should get enter/leave events as well as the mouse traverses them.
+ For automatic mouse grab, however, a leave event should be sent when the
+ button is released.
+ \li Window positioning: When calling \c{QWindow::setFramePos()}, the flag
+ \c{QWindowPrivate::positionPolicy} is set to \c{QWindowPrivate::WindowFrameInclusive}.
+ This means the position includes the window frame, whose size is at this point
+ unknown and the geometry's topleft point is the position of the window frame.
+ \endlist
+
+ Apart from the auto-tests (\c{tests/auto/gui/kernel/qwindow},
+ \c{tests/auto/gui/kernel/qguiapplication} and \c{tests/auto/widgets/kernel/qwidget}),
+ there are a number of manual tests and examples that can help testing a platform plugin:
+
+ \list 1
+ \li \c{examples/qpa/windows}: Basic \c{QWindow} creation.
+ \li \c{examples/opengl/hellowindow}: Basic Open GL windows.
+ \li \c{tests/manual/windowflags}: Tests setting the window flags.
+ \li \c{tests/manual/windowgeometry} Tests setting the window geometry.
+ \li \c{tests/manual/windowmodality} Tests setting the window modality.
+ \li \c{tests/manual/widgetgrab} Tests mouse grab and dialogs.
+ \endlist
+
\sa QBackingStore, QWindow
*/