Messagelib

webengineaccesskey.h
1 /*
2  SPDX-FileCopyrightText: 2016-2022 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "webengineviewer_export.h"
10 #include <QObject>
11 #include <memory>
12 
13 class KActionCollection;
14 class QWheelEvent;
15 class QResizeEvent;
16 class QKeyEvent;
17 class QWebEngineView;
18 namespace WebEngineViewer
19 {
20 class WebEngineAccessKeyPrivate;
21 /**
22  * @brief The WebEngineAccessKey class
23  * @author Laurent Montel <[email protected]>
24  */
25 class WEBENGINEVIEWER_EXPORT WebEngineAccessKey : public QObject
26 {
27  Q_OBJECT
28 public:
29  explicit WebEngineAccessKey(QWebEngineView *webEngine, QObject *parent = nullptr);
30  ~WebEngineAccessKey() override;
31 
32  void setActionCollection(KActionCollection *ac);
33 
34  void wheelEvent(QWheelEvent *e);
35  void resizeEvent(QResizeEvent *);
36  void keyPressEvent(QKeyEvent *e);
37  void keyReleaseEvent(QKeyEvent *e);
38 
39  void showAccessKeys();
40  void hideAccessKeys();
41 
42 Q_SIGNALS:
43  void openUrl(const QUrl &url);
44 
45 private Q_SLOTS:
46  void handleSearchAccessKey(const QVariant &res);
47 
48 private:
49  std::unique_ptr<WebEngineAccessKeyPrivate> const d;
50 };
51 }
The WebEngineAccessKey class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu May 19 2022 03:53:26 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.