summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindow.h
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2012-01-13 10:31:11 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-24 15:38:48 +0100
commitb39df8bf92a530783144dbcf5cae939742ff2d23 (patch)
tree0560985d33f59a48693acadbdfbb59b328131499 /src/gui/kernel/qwindow.h
parentb0a0403daf81e82ea732aa91ec92cf94553a7935 (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.h')
-rw-r--r--src/gui/kernel/qwindow.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h
index 6f3c64fe15..088192d714 100644
--- a/src/gui/kernel/qwindow.h
+++ b/src/gui/kernel/qwindow.h
@@ -91,7 +91,6 @@ class Q_GUI_EXPORT QWindow : public QObject, public QSurface
Q_PROPERTY(int width READ width WRITE setWidth NOTIFY widthChanged)
Q_PROPERTY(int height READ height WRITE setHeight NOTIFY heightChanged)
Q_PROPERTY(bool visible READ visible WRITE setVisible NOTIFY visibleChanged)
- Q_PROPERTY(Qt::ScreenOrientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged)
public:
enum SurfaceType { RasterSurface, OpenGLSurface };
@@ -133,8 +132,11 @@ public:
bool isActive() const;
- Qt::ScreenOrientation orientation() const;
- void setOrientation(Qt::ScreenOrientation orientation);
+ void reportContentOrientationChange(Qt::ScreenOrientation orientation);
+ Qt::ScreenOrientation contentOrientation() const;
+
+ bool requestWindowOrientation(Qt::ScreenOrientation orientation);
+ Qt::ScreenOrientation windowOrientation() const;
Qt::WindowState windowState() const;
void setWindowState(Qt::WindowState state);
@@ -252,17 +254,13 @@ Q_SIGNALS:
void screenChanged(QScreen *screen);
void xChanged(int arg);
-
void yChanged(int arg);
void widthChanged(int arg);
-
void heightChanged(int arg);
void visibleChanged(bool arg);
- void orientationChanged(Qt::ScreenOrientation arg);
-
private Q_SLOTS:
void screenDestroyed(QObject *screen);