summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformwindow_qpa.cpp
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2012-02-05 21:25:31 +0100
committerJoão Abecasis <joao.abecasis@nokia.com>2012-02-05 21:26:33 +0100
commitd065dfd454890c332482a6109ed34a989e50809b (patch)
tree0d3e9c5367c1fad7d089d368182374e8d1d46ca1 /src/gui/kernel/qplatformwindow_qpa.cpp
parent632840cb0f5ad355d87fc040b015d04af86371ec (diff)
parent9f54846d951838361f4188b423e7aa7c7b9a9540 (diff)
Merge remote-tracking branch 'gerrit/master' into containers
Conflicts: src/corelib/tools/qstring.cpp Change-Id: I23d214bf33c2badfae1876da3cc7d6d8f6e635fb
Diffstat (limited to 'src/gui/kernel/qplatformwindow_qpa.cpp')
-rw-r--r--src/gui/kernel/qplatformwindow_qpa.cpp35
1 files changed, 30 insertions, 5 deletions
diff --git a/src/gui/kernel/qplatformwindow_qpa.cpp b/src/gui/kernel/qplatformwindow_qpa.cpp
index d69cb0e64e..c52a1cf757 100644
--- a/src/gui/kernel/qplatformwindow_qpa.cpp
+++ b/src/gui/kernel/qplatformwindow_qpa.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -239,17 +239,42 @@ void QPlatformWindow::requestActivateWindow()
}
/*!
- Set the orientation of the platform window's contents.
+ Handle changes to the orientation of the platform window's contents.
This is a hint to the window manager in case it needs to display
additional content like popups, dialogs, status bars, or similar
in relation to the window.
- \sa QWindow::setOrientation()
+ \sa QWindow::reportContentOrientationChange()
+*/
+void QPlatformWindow::handleContentOrientationChange(Qt::ScreenOrientation orientation)
+{
+ Q_UNUSED(orientation);
+}
+
+/*!
+ Request a different orientation of the platform window.
+
+ This tells the window manager how the window wants to be rotated in order
+ to be displayed, and how input events should be translated.
+
+ As an example, a portrait compositor might rotate the window by 90 degrees,
+ if the window is in landscape. It will also rotate input coordinates from
+ portrait to landscape such that top right in portrait gets mapped to top
+ left in landscape.
+
+ If the implementation doesn't support the requested orientation it should
+ signal this by returning an actual supported orientation.
+
+ If the implementation doesn't support rotating the window at all it should
+ return Qt::PrimaryOrientation, this is also the default value.
+
+ \sa QWindow::requestWindowOrientation()
*/
-void QPlatformWindow::setOrientation(Qt::ScreenOrientation orientation)
+Qt::ScreenOrientation QPlatformWindow::requestWindowOrientation(Qt::ScreenOrientation orientation)
{
Q_UNUSED(orientation);
+ return Qt::PrimaryOrientation;
}
bool QPlatformWindow::setKeyboardGrabEnabled(bool grab)