diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-06-29 11:55:06 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-07-06 09:34:51 +0000 |
commit | 0cc881b5bf8a4a6da8277d5166da92a1675f4654 (patch) | |
tree | db798f94a0fd1e51ba99a1a74bb971ed74c9f6a4 /src/webengine/api/qquickwebengineview_p.h | |
parent | c0d5f7e6c10e56777b025b83a1fc53c610927714 (diff) |
Add WebAction to QML api
Adds WebActions matching QWebEnginePage to QQuickWebEngineView, this
makes it possible to support copy/paste on OS X, and makes it possible
to do rich text copy to clipboard on all platforms.
Change-Id: If43c1b2e8ae0496423f830cfe6b86e0fa1b8126e
Task-number: QTBUG-44289
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.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/webengine/api/qquickwebengineview_p.h b/src/webengine/api/qquickwebengineview_p.h index 462278571..95a9b2a2e 100644 --- a/src/webengine/api/qquickwebengineview_p.h +++ b/src/webengine/api/qquickwebengineview_p.h @@ -73,7 +73,7 @@ private: bool m_toggleOn; }; -#define LATEST_WEBENGINEVIEW_REVISION 2 +#define LATEST_WEBENGINEVIEW_REVISION 3 class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineView : public QQuickItem { Q_OBJECT @@ -105,6 +105,7 @@ class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineView : public QQuickItem { Q_ENUMS(Feature); Q_ENUMS(JavaScriptConsoleMessageLevel); Q_FLAGS(FindFlags); + Q_ENUMS(WebAction); public: QQuickWebEngineView(QQuickItem *parent = 0); @@ -173,6 +174,27 @@ public: Geolocation }; + enum WebAction { + NoWebAction = - 1, + Back, + Forward, + Stop, + Reload, + + Cut, + Copy, + Paste, + + Undo, + Redo, + SelectAll, + ReloadAndBypassCache, + + PasteAndMatchStyle, + + WebActionCount + }; + // must match WebContentsAdapterClient::JavaScriptConsoleMessageLevel enum JavaScriptConsoleMessageLevel { InfoMessageLevel = 0, @@ -218,6 +240,7 @@ public Q_SLOTS: Q_REVISION(1) void fullScreenCancelled(); Q_REVISION(1) void grantFeaturePermission(const QUrl &securityOrigin, Feature, bool granted); Q_REVISION(2) void setActiveFocusOnPress(bool arg); + Q_REVISION(3) void triggerWebAction(WebAction action); Q_SIGNALS: void titleChanged(); |