diff options
author | Roopesh Chander <roop@forwardbias.in> | 2009-10-16 16:15:42 +0530 |
---|---|---|
committer | Roopesh Chander <roop@forwardbias.in> | 2009-10-19 11:21:16 +0530 |
commit | 5302c03ae8920352fa57615bb1fbbaf049ef6ea6 (patch) | |
tree | 3befbafe6b4ee3a812bd2c7bebdb8e0dfe4d0846 /webview.h | |
parent | 3e9e25df7eec16f21641e09d7a978a5370de2ec6 (diff) |
port the browser (that helps create the scraps) to QGraphicsWebView
(but it doesn't respond to hover events anymore now)
Diffstat (limited to 'webview.h')
-rw-r--r-- | webview.h | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -1,18 +1,22 @@ #ifndef WEBVIEW_H #define WEBVIEW_H -#include <QWebView> +#include <QGraphicsWebView> +#include <QGraphicsSceneMouseEvent> +#include <QKeyEvent> +#include <QPainter> +#include <QWebPage> -class WebView : public QWebView +class WebView : public QGraphicsWebView { public: - WebView(QWidget * parent = 0); + WebView(QGraphicsItem * parent = 0); protected: - void mouseMoveEvent(QMouseEvent* event); - void mousePressEvent(QMouseEvent* event); + void mouseMoveEvent(QGraphicsSceneMouseEvent* event); + void mousePressEvent(QGraphicsSceneMouseEvent* event); void keyPressEvent(QKeyEvent *event); - void paintEvent(QPaintEvent* event); + void paint(QPainter* painter, const QStyleOptionGraphicsItem* options, QWidget* widget = 0); private: QRect m_scrapRect; |