diff options
author | Valentin Fokin <fokinv@inf.u-szeged.hu> | 2018-05-30 14:46:15 +0200 |
---|---|---|
committer | Peter Varga <pvarga@inf.u-szeged.hu> | 2018-08-02 14:17:17 +0000 |
commit | 1481e8d87fe89d9e27d9de593767b55a0e84a31f (patch) | |
tree | 7ff04c22c4c880ec8d0951255772ce8b2c49bf3a /src/webengine/ui_delegates_manager.h | |
parent | 6a5f8d69fc1d090326fa92a0b24bd494369c2d0d (diff) |
Introduce WebEngineAction in Quick API
Also implement QQuickWebEngineView::action() method similar to the Widget API
to access the WebEngineActions.
[ChangeLog][QtWebEngine] Introduce WebEngineAction in Quick API
Task-number: QTBUG-56117
Change-Id: I758cd4703db4c111c1ed9187e091d4c845486c46
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'src/webengine/ui_delegates_manager.h')
-rw-r--r-- | src/webengine/ui_delegates_manager.h | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/webengine/ui_delegates_manager.h b/src/webengine/ui_delegates_manager.h index 1cbf2ad28..18457e4ed 100644 --- a/src/webengine/ui_delegates_manager.h +++ b/src/webengine/ui_delegates_manager.h @@ -40,6 +40,7 @@ #ifndef UI_DELEGATES_MANAGER_H #define UI_DELEGATES_MANAGER_H +#include "api/qquickwebengineaction_p.h" #include "qglobal.h" #include "web_contents_adapter.h" #include "web_contents_adapter_client.h" @@ -83,15 +84,6 @@ class FilePickerController; const char *defaultPropertyName(QObject *obj); -class MenuItemHandler : public QObject { -Q_OBJECT -public: - MenuItemHandler(QObject *parent); - -Q_SIGNALS: - void triggered(); -}; - class UIDelegatesManager { Q_DECLARE_TR_FUNCTIONS(UIDelegatesManager) @@ -106,9 +98,7 @@ public: virtual ~UIDelegatesManager(); virtual bool initializeImportDirs(QStringList &dirs, QQmlEngine *engine); - virtual void addMenuItem(MenuItemHandler *menuItemHandler, const QString &text, - const QString &iconName = QString(), - bool enabled = true, + virtual void addMenuItem(QQuickWebEngineAction *action, QObject *menu, bool checkable = false, bool checked = true); void addMenuSeparator(QObject *menu); virtual QObject *addMenu(QObject *parentMenu, const QString &title, @@ -143,9 +133,7 @@ public: bool initializeImportDirs(QStringList &dirs, QQmlEngine *engine) override; QObject *addMenu(QObject *parentMenu, const QString &title, const QPoint &pos = QPoint()) override; - void addMenuItem(MenuItemHandler *menuItemHandler, const QString &text, - const QString &iconName = QString(), - bool enabled = true, + void addMenuItem(QQuickWebEngineAction *action, QObject *menu, bool checkable = false, bool checked = false) override; void showMenu(QObject *menu) override; Q_DISABLE_COPY(UI2DelegatesManager) |