summaryrefslogtreecommitdiffstats
path: root/src/webengine/api/qquickwebengineview_p.h
diff options
context:
space:
mode:
authorSzabolcs David <davidsz@inf.u-szeged.hu>2015-03-02 08:00:59 -0800
committerSzabolcs David <davidsz@inf.u-szeged.hu>2015-03-09 11:54:11 +0000
commit769b3a61f5d2abcb3f694ade95e1e8f1c505b75a (patch)
tree593d303493d3b771c32438cf12a44b34c4eff819 /src/webengine/api/qquickwebengineview_p.h
parent42c39d0545ee98feccf6d8059aee082c47a8e730 (diff)
Promote fullscreen API to 5.5 public
Introduce a new FullScreenRequest object as the parameter of the fullScreenRequested signal and expose the isFullScreen property as read-only. This makes the API harder to misuse. Change-Id: Ibb072ec93843e6df265bd930e8721d244bc2f4bc Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'src/webengine/api/qquickwebengineview_p.h')
-rw-r--r--src/webengine/api/qquickwebengineview_p.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/webengine/api/qquickwebengineview_p.h b/src/webengine/api/qquickwebengineview_p.h
index d4a492efb..248ee62b6 100644
--- a/src/webengine/api/qquickwebengineview_p.h
+++ b/src/webengine/api/qquickwebengineview_p.h
@@ -58,6 +58,20 @@ class QQuickWebEngineViewPrivate;
class QQuickWebEngineTestSupport;
#endif
+class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineFullScreenRequest {
+ Q_GADGET
+ Q_PROPERTY(bool toggleOn READ toggleOn)
+public:
+ QQuickWebEngineFullScreenRequest();
+ QQuickWebEngineFullScreenRequest(QQuickWebEngineViewPrivate *viewPrivate, bool toggleOn);
+
+ Q_INVOKABLE void accept();
+ bool toggleOn() { return m_toggleOn; }
+
+private:
+ QQuickWebEngineViewPrivate *viewPrivate;
+ bool m_toggleOn;
+};
class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineView : public QQuickItem {
Q_OBJECT
@@ -68,6 +82,7 @@ class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineView : public QQuickItem {
Q_PROPERTY(QString title READ title NOTIFY titleChanged)
Q_PROPERTY(bool canGoBack READ canGoBack NOTIFY urlChanged)
Q_PROPERTY(bool canGoForward READ canGoForward NOTIFY urlChanged)
+ Q_PROPERTY(bool isFullScreen READ isFullScreen NOTIFY isFullScreenChanged REVISION 1)
Q_PROPERTY(qreal zoomFactor READ zoomFactor WRITE setZoomFactor NOTIFY zoomFactorChanged REVISION 1)
Q_PROPERTY(QQuickWebEngineProfile *profile READ profile WRITE setProfile FINAL REVISION 1)
Q_PROPERTY(QQuickWebEngineSettings *settings READ settings REVISION 1)
@@ -99,6 +114,7 @@ public:
QString title() const;
bool canGoBack() const;
bool canGoForward() const;
+ bool isFullScreen() const;
qreal zoomFactor() const;
void setZoomFactor(qreal arg);
@@ -185,6 +201,7 @@ public Q_SLOTS:
void reload();
void stop();
Q_REVISION(1) void findText(const QString &subString, FindFlags options = 0, const QJSValue &callback = QJSValue());
+ Q_REVISION(1) void fullScreenCancelled();
Q_SIGNALS:
void titleChanged();
@@ -196,6 +213,8 @@ Q_SIGNALS:
void navigationRequested(QQuickWebEngineNavigationRequest *request);
void javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, const QString &message, int lineNumber, const QString &sourceID);
Q_REVISION(1) void certificateError(QQuickWebEngineCertificateError *error);
+ Q_REVISION(1) void fullScreenRequested(const QQuickWebEngineFullScreenRequest &request);
+ Q_REVISION(1) void isFullScreenChanged();
Q_REVISION(1) void newViewRequested(QQuickWebEngineNewViewRequest *request);
Q_REVISION(1) void zoomFactorChanged(qreal arg);
Q_REVISION(1) void webChannelChanged();
@@ -220,5 +239,6 @@ private:
QT_END_NAMESPACE
QML_DECLARE_TYPE(QQuickWebEngineView)
+Q_DECLARE_METATYPE(QQuickWebEngineFullScreenRequest)
#endif // QQUICKWEBENGINEVIEW_P_H