From 56ceccc4d4ff395983c4a2fbbe12fe8cb591cfb5 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 31 Mar 2016 11:26:52 +0200 Subject: QML API for context menu data Adds QML API for the context menu data and improved spell checking API. Change-Id: I47868bdfaaec42d13aa7693bdc14bc75b008b862 Reviewed-by: Joerg Bornemann --- src/webengine/api/qquickwebengineview_p.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/webengine/api/qquickwebengineview_p.h') diff --git a/src/webengine/api/qquickwebengineview_p.h b/src/webengine/api/qquickwebengineview_p.h index 595da26cd..7a23e3011 100644 --- a/src/webengine/api/qquickwebengineview_p.h +++ b/src/webengine/api/qquickwebengineview_p.h @@ -59,6 +59,7 @@ QT_BEGIN_NAMESPACE class QQmlWebChannel; class QQuickWebEngineCertificateError; +class QQuickWebEngineContextMenuData; class QQuickWebEngineHistory; class QQuickWebEngineLoadRequest; class QQuickWebEngineNavigationRequest; @@ -116,6 +117,7 @@ class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineView : public QQuickItem { Q_PROPERTY(bool audioMuted READ isAudioMuted WRITE setAudioMuted NOTIFY audioMutedChanged FINAL REVISION 3) Q_PROPERTY(bool recentlyAudible READ recentlyAudible NOTIFY recentlyAudibleChanged FINAL REVISION 3) Q_PROPERTY(uint webChannelWorld READ webChannelWorld WRITE setWebChannelWorld NOTIFY webChannelWorldChanged REVISION 3) + Q_PROPERTY(const QQuickWebEngineContextMenuData *contextMenuData READ contextMenuData NOTIFY contextMenuDataChanged CONSTANT REVISION 3) #ifdef ENABLE_QML_TESTSUPPORT_API Q_PROPERTY(QQuickWebEngineTestSupport *testSupport READ testSupport WRITE setTestSupport FINAL) @@ -242,10 +244,6 @@ public: SavePage, #if !defined(QT_NO_SPELLCHECK) ToggleSpellcheck, - ReplaceMisspelledWord_1, - ReplaceMisspelledWord_2, - ReplaceMisspelledWord_3, - ReplaceMisspelledWord_4, #endif WebActionCount }; @@ -452,6 +450,8 @@ public: void setAudioMuted(bool muted); bool recentlyAudible() const; + const QQuickWebEngineContextMenuData *contextMenuData() const; + #ifdef ENABLE_QML_TESTSUPPORT_API QQuickWebEngineTestSupport *testSupport() const; void setTestSupport(QQuickWebEngineTestSupport *testSupport); @@ -477,6 +477,10 @@ public Q_SLOTS: Q_REVISION(3) void printToPdf(const QString &filePath, PrintedPageSizeId pageSizeId = PrintedPageSizeId::A4, PrintedPageOrientation orientation = PrintedPageOrientation::Portrait); Q_REVISION(3) void printToPdf(PrintedPageSizeId pageSizeId = PrintedPageSizeId::A4, PrintedPageOrientation orientation = PrintedPageOrientation::Portrait, const QJSValue &callback = QJSValue()); +#if !defined(QT_NO_SPELLCHECK) + Q_REVISION(3) void replaceMisspelledWord(const QString &replacement); +#endif + private Q_SLOTS: void lazyInitialize(); @@ -506,6 +510,7 @@ Q_SIGNALS: Q_REVISION(3) void audioMutedChanged(bool muted); Q_REVISION(3) void recentlyAudibleChanged(bool recentlyAudible); Q_REVISION(3) void webChannelWorldChanged(uint); + Q_REVISION(3) void contextMenuDataChanged(); protected: void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry); -- cgit v1.2.3