summaryrefslogtreecommitdiffstats
path: root/webview.h
diff options
context:
space:
mode:
authorRoopesh Chander <roop@forwardbias.in>2009-10-16 16:15:42 +0530
committerRoopesh Chander <roop@forwardbias.in>2009-10-19 11:21:16 +0530
commit5302c03ae8920352fa57615bb1fbbaf049ef6ea6 (patch)
tree3befbafe6b4ee3a812bd2c7bebdb8e0dfe4d0846 /webview.h
parent3e9e25df7eec16f21641e09d7a978a5370de2ec6 (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.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/webview.h b/webview.h
index 74d7a7d..b326da0 100644
--- a/webview.h
+++ b/webview.h
@@ -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;