diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2012-01-13 10:31:11 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-24 15:38:48 +0100 |
commit | b39df8bf92a530783144dbcf5cae939742ff2d23 (patch) | |
tree | 0560985d33f59a48693acadbdfbb59b328131499 /src/gui/kernel/qwindow_p.h | |
parent | b0a0403daf81e82ea732aa91ec92cf94553a7935 (diff) |
Made window orientation API more flexible.
Previously we only had QWindow::setOrientation() which was a hint about
the orientation the window's contents were rendered in.
However, it's necessary to separate between the orientation
corresponding to the window buffer layout and orientation of the
contents. A game for example might typically want to use a landscape
buffer even on a portrait device. Thus, we replace
QWindow::orientation() with QWindow::reportContentOrientationChange() and
QWindow::requestWindowOrientation().
Change-Id: I1f07362192daf36c45519cb05b43ac352f1945b5
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/gui/kernel/qwindow_p.h')
-rw-r--r-- | src/gui/kernel/qwindow_p.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/kernel/qwindow_p.h b/src/gui/kernel/qwindow_p.h index 2bb9173d94..2e28205f86 100644 --- a/src/gui/kernel/qwindow_p.h +++ b/src/gui/kernel/qwindow_p.h @@ -76,7 +76,8 @@ public: , windowState(Qt::WindowNoState) , resizeEventPending(true) , positionPolicy(WindowFrameExclusive) - , orientation(Qt::UnknownOrientation) + , contentOrientation(Qt::PrimaryOrientation) + , windowOrientation(Qt::PrimaryOrientation) , maximumSize(QWINDOWSIZE_MAX, QWINDOWSIZE_MAX) , modality(Qt::NonModal) , transientParent(0) @@ -111,7 +112,8 @@ public: Qt::WindowState windowState; bool resizeEventPending; PositionPolicy positionPolicy; - Qt::ScreenOrientation orientation; + Qt::ScreenOrientation contentOrientation; + Qt::ScreenOrientation windowOrientation; QSize minimumSize; QSize maximumSize; |