iOS: Add support for QWindow::setOpacity()

Change-Id: I027154aef35d219f08915e195f2baf8595ef7343
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
This commit is contained in:
Tor Arne Vestbø 2014-07-25 16:03:28 +02:00
parent 552639c359
commit fea21655a8
2 changed files with 7 additions and 0 deletions

View File

@ -73,6 +73,7 @@ public:
void setParent(const QPlatformWindow *window);
void handleContentOrientationChange(Qt::ScreenOrientation orientation);
void setVisible(bool visible);
void setOpacity(qreal level) Q_DECL_OVERRIDE;
bool isExposed() const Q_DECL_OVERRIDE;

View File

@ -74,6 +74,7 @@ QIOSWindow::QIOSWindow(QWindow *window)
screen()->availableGeometry().width(), screen()->availableGeometry().height());
setWindowState(window->windowState());
setOpacity(window->opacity());
}
QIOSWindow::~QIOSWindow()
@ -135,6 +136,11 @@ void QIOSWindow::setVisible(bool visible)
}
}
void QIOSWindow::setOpacity(qreal level)
{
m_view.alpha = qBound(0.0, level, 1.0);
}
void QIOSWindow::setGeometry(const QRect &rect)
{
m_normalGeometry = rect;