aboutsummaryrefslogtreecommitdiff
path: root/src/webview.h
diff options
context:
space:
mode:
authorLibravatar Mubashshir <ahm@jadupc.com>2023-03-07 21:11:06 +0600
committerLibravatar Mubashshir <ahm@jadupc.com>2023-03-07 21:11:06 +0600
commitd830bfc8ce7c6763d074beafdde7cab1835d31f9 (patch)
tree179f81f3b42779b1f6fb69deed6b69dab39f4f89 /src/webview.h
downloadwhatsie-d830bfc8ce7c6763d074beafdde7cab1835d31f9.tar.gz
whatsie-d830bfc8ce7c6763d074beafdde7cab1835d31f9.zip
Import Upstream version 4.12.0upstream/4.12.0
Diffstat (limited to 'src/webview.h')
-rw-r--r--src/webview.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/webview.h b/src/webview.h
new file mode 100644
index 0000000..81f5f43
--- /dev/null
+++ b/src/webview.h
@@ -0,0 +1,25 @@
+#ifndef WEBVIEW_H
+#define WEBVIEW_H
+
+#include <QSettings>
+#include <QWebEngineView>
+#include <QKeyEvent>
+
+class WebView : public QWebEngineView {
+ Q_OBJECT
+
+public:
+ WebView(QWidget *parent = nullptr, QStringList dictionaries = {});
+
+protected:
+ void contextMenuEvent(QContextMenuEvent *event) override;
+
+protected slots:
+ void wheelEvent(QWheelEvent *event);
+
+private:
+ QStringList m_dictionaries;
+ QSettings settings;
+};
+
+#endif // WEBVIEW_H