summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qplatformwindow.cpp25
-rw-r--r--src/gui/kernel/qplatformwindow.h1
-rw-r--r--src/gui/kernel/qwindow.cpp69
-rw-r--r--src/gui/kernel/qwindow.h3
-rw-r--r--src/gui/kernel/qwindow_p.h2
5 files changed, 10 insertions, 90 deletions
diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp
index 25b863c9a3..a1a06a6021 100644
--- a/src/gui/kernel/qplatformwindow.cpp
+++ b/src/gui/kernel/qplatformwindow.cpp
@@ -331,31 +331,6 @@ void QPlatformWindow::handleContentOrientationChange(Qt::ScreenOrientation orien
}
/*!
- 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()
-*/
-Qt::ScreenOrientation QPlatformWindow::requestWindowOrientation(Qt::ScreenOrientation orientation)
-{
- Q_UNUSED(orientation);
- return Qt::PrimaryOrientation;
-}
-
-/*!
Reimplement this function in subclass to return the device pixel ratio
for the window. This is the ratio between physical pixels
and device-independent pixels.
diff --git a/src/gui/kernel/qplatformwindow.h b/src/gui/kernel/qplatformwindow.h
index 607c8e4035..5d7323ae2b 100644
--- a/src/gui/kernel/qplatformwindow.h
+++ b/src/gui/kernel/qplatformwindow.h
@@ -115,7 +115,6 @@ public:
virtual void requestActivateWindow();
virtual void handleContentOrientationChange(Qt::ScreenOrientation orientation);
- virtual Qt::ScreenOrientation requestWindowOrientation(Qt::ScreenOrientation orientation);
virtual qreal devicePixelRatio() const;
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index aaf2b25ad4..b1fd2d3f6b 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -89,23 +89,16 @@ QT_BEGIN_NAMESPACE
buffers to support double and triple buffering, as well as depth and stencil
buffers. To release a window's memory resources, call the destroy() function.
- \section1 Window and content orientation
-
- QWindow has reportContentOrientationChange() and
- requestWindowOrientation() that can be used to specify the
- layout of the window contents in relation to the screen. The
- window orientation determines the actual buffer layout of the
- window, and the windowing system uses this value to rotate the
- window before it ends up on the display, and to ensure that input
- coordinates are in the correct coordinate space relative to the
- application.
-
- On the other hand, the content orientation is simply a hint to the
- windowing system about which orientation the window contents are in.
- It's useful when you wish to keep the same buffer layout, but rotate
- the contents instead, especially when doing rotation animations
- between different orientations. The windowing system might use this
- value to determine the layout of system popups or dialogs.
+ \section1 Content orientation
+
+ QWindow has reportContentOrientationChange() that can be used to specify
+ the layout of the window contents in relation to the screen. The content
+ orientation is simply a hint to the windowing system about which
+ orientation the window contents are in. It's useful when you wish to keep
+ the same window size, but rotate the contents instead, especially when
+ doing rotation animations between different orientations. The windowing
+ system might use this value to determine the layout of system popups or
+ dialogs.
\section1 Visibility and Windowing system exposure.
@@ -743,8 +736,6 @@ bool QWindow::isActive() const
to compute the necessary transform.
The default value is Qt::PrimaryOrientation
-
- \sa requestOrientation(), QScreen::orientation()
*/
void QWindow::reportContentOrientationChange(Qt::ScreenOrientation orientation)
{
@@ -766,46 +757,6 @@ Qt::ScreenOrientation QWindow::contentOrientation() const
}
/*!
- Requests the given window \a orientation.
-
- The window \a orientation specifies how the window should be rotated
- by the window manager in order to be displayed. Input events will
- be correctly mapped to the given \a orientation.
-
- The return value is false if the system doesn't support the given
- \a orientation (for example when requesting a portrait orientation
- on a device that only handles landscape buffers, typically a desktop
- system).
-
- If the return value is false, call \l orientation() to get the actual
- supported orientation.
-
- \sa orientation(), reportContentOrientationChange(), QScreen::orientation()
-*/
-bool QWindow::requestOrientation(Qt::ScreenOrientation orientation)
-{
- Q_D(QWindow);
- if (!d->platformWindow)
- create();
- Q_ASSERT(d->platformWindow);
- d->windowOrientation = d->platformWindow->requestWindowOrientation(orientation);
- return d->windowOrientation == orientation;
-}
-
-/*!
- Returns the actual window orientation.
-
- The default value is Qt::PrimaryOrientation.
-
- \sa requestOrientation()
-*/
-Qt::ScreenOrientation QWindow::orientation() const
-{
- Q_D(const QWindow);
- return d->windowOrientation;
-}
-
-/*!
Returns the ratio between physical pixels and device-independent pixels
for the window. This value is dependent on the screen the window is on,
and may change when the window is moved.
diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h
index 179db9964f..6dcd4ed477 100644
--- a/src/gui/kernel/qwindow.h
+++ b/src/gui/kernel/qwindow.h
@@ -157,9 +157,6 @@ public:
qreal devicePixelRatio() const;
- bool requestOrientation(Qt::ScreenOrientation orientation);
- Qt::ScreenOrientation orientation() const;
-
Qt::WindowState windowState() const;
void setWindowState(Qt::WindowState state);
diff --git a/src/gui/kernel/qwindow_p.h b/src/gui/kernel/qwindow_p.h
index fcc5540185..93179d99b6 100644
--- a/src/gui/kernel/qwindow_p.h
+++ b/src/gui/kernel/qwindow_p.h
@@ -89,7 +89,6 @@ public:
, receivedExpose(false)
, positionPolicy(WindowFrameExclusive)
, contentOrientation(Qt::PrimaryOrientation)
- , windowOrientation(Qt::PrimaryOrientation)
, minimumSize(0, 0)
, maximumSize(QWINDOWSIZE_MAX, QWINDOWSIZE_MAX)
, modality(Qt::NonModal)
@@ -136,7 +135,6 @@ public:
bool receivedExpose;
PositionPolicy positionPolicy;
Qt::ScreenOrientation contentOrientation;
- Qt::ScreenOrientation windowOrientation;
QSize minimumSize;
QSize maximumSize;