|
1 /* |
|
2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
|
3 * |
|
4 * This library is free software; you can redistribute it and/or |
|
5 * modify it under the terms of the GNU Library General Public |
|
6 * License as published by the Free Software Foundation; either |
|
7 * version 2 of the License, or (at your option) any later version. |
|
8 * |
|
9 * This program is distributed in the hope that it will be useful, |
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
12 * Library General Public License for more details. |
|
13 * |
|
14 * You should have received a copy of the GNU Library General Public License |
|
15 * along with this program; see the file COPYING.LIB. If not, write to |
|
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
|
17 * Boston, MA 02110-1301, USA. |
|
18 * |
|
19 */ |
|
20 |
|
21 #ifndef qwkpage_p_h |
|
22 #define qwkpage_p_h |
|
23 |
|
24 #include "DrawingAreaProxy.h" |
|
25 #include "PageClient.h" |
|
26 #include "qwkpage.h" |
|
27 #include "WebPageNamespace.h" |
|
28 #include "WebPageProxy.h" |
|
29 #include <QBasicTimer> |
|
30 #include <wtf/RefPtr.h> |
|
31 #include <QGraphicsView> |
|
32 #include <QKeyEvent> |
|
33 |
|
34 class QWKPagePrivate : public WebKit::PageClient { |
|
35 public: |
|
36 QWKPagePrivate(QWKPage*, WKPageNamespaceRef); |
|
37 ~QWKPagePrivate(); |
|
38 |
|
39 static QWKPagePrivate* get(QWKPage* page) { return page->d; } |
|
40 |
|
41 void init(const QSize& viewportSize, WebKit::DrawingAreaProxy*); |
|
42 |
|
43 virtual void processDidExit() {} |
|
44 virtual void processDidRevive() {} |
|
45 virtual void takeFocus(bool direction) {} |
|
46 virtual void toolTipChanged(const WebCore::String&, const WebCore::String&); |
|
47 |
|
48 void paint(QPainter* painter, QRect); |
|
49 |
|
50 void keyPressEvent(QKeyEvent*); |
|
51 void keyReleaseEvent(QKeyEvent*); |
|
52 void mouseMoveEvent(QGraphicsSceneMouseEvent*); |
|
53 void mousePressEvent(QGraphicsSceneMouseEvent*); |
|
54 void mouseReleaseEvent(QGraphicsSceneMouseEvent*); |
|
55 void mouseDoubleClickEvent(QGraphicsSceneMouseEvent*); |
|
56 void wheelEvent(QGraphicsSceneWheelEvent*); |
|
57 |
|
58 void updateAction(QWKPage::WebAction action); |
|
59 void updateNavigationActions(); |
|
60 void updateEditorActions(); |
|
61 |
|
62 void _q_webActionTriggered(bool checked); |
|
63 |
|
64 QAction* actions[QWKPage::WebActionCount]; |
|
65 |
|
66 QWKPage* q; |
|
67 RefPtr<WebKit::WebPageProxy> page; |
|
68 |
|
69 QWKPage::CreateNewPageFn createNewPageFn; |
|
70 |
|
71 QPoint tripleClick; |
|
72 QBasicTimer tripleClickTimer; |
|
73 }; |
|
74 |
|
75 #endif /* qkpage_p_h */ |