1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef GINEBRA_RENDERER_H |
|
20 #define GINEBRA_RENDERER_H |
|
21 |
|
22 #include "qwebpage.h" |
|
23 #include <QtGui> |
|
24 |
|
25 class QWebPage; |
|
26 class ChromeWidget; |
|
27 |
|
28 /** |
|
29 * \brief Manages the chrome web page. |
|
30 * |
|
31 * The ChromeRenderer class owns and manages the web page that contains a graphical |
|
32 * representation of the the components of the browser chrome. These components are |
|
33 * layed-out and rendered by the web page but actually displayed by ChromeWidget and |
|
34 * ChromeSnippet. |
|
35 * |
|
36 * \sa ChromeSnippet |
|
37 * \sa ChromeWidget |
|
38 */ |
|
39 class ChromeRenderer : public QWidget |
|
40 { |
|
41 Q_OBJECT |
|
42 |
|
43 public: |
|
44 ChromeRenderer(QWidget *parent = 0); |
|
45 virtual ~ChromeRenderer(); |
|
46 |
|
47 QWebPage *page() const; |
|
48 void setPage(QWebPage *page); |
|
49 void setWidget(ChromeWidget *widget) {m_widget = widget;} |
|
50 QVariant inputMethodQuery(Qt::InputMethodQuery property) const; |
|
51 |
|
52 QSize sizeHint() const; |
|
53 |
|
54 virtual bool event(QEvent *); |
|
55 |
|
56 signals: |
|
57 void symbianCarriageReturn(); // HACK |
|
58 |
|
59 protected: |
|
60 //void resizeEvent(QResizeEvent *e); |
|
61 //void paintEvent(QPaintEvent *ev); |
|
62 |
|
63 /* virtual void changeEvent(QEvent*); |
|
64 |
|
65 virtual void mouseMoveEvent(QMouseEvent*); |
|
66 virtual void mousePressEvent(QMouseEvent*); |
|
67 virtual void mouseDoubleClickEvent(QMouseEvent*); |
|
68 virtual void mouseReleaseEvent(QMouseEvent*);*/ |
|
69 virtual void keyPressEvent(QKeyEvent*); |
|
70 virtual void keyReleaseEvent(QKeyEvent*); |
|
71 virtual void focusInEvent(QFocusEvent*); |
|
72 virtual void focusOutEvent(QFocusEvent*); |
|
73 virtual void inputMethodEvent(QInputMethodEvent*); |
|
74 |
|
75 virtual bool focusNextPrevChild(bool next); |
|
76 |
|
77 private: |
|
78 QWebPage * m_page; |
|
79 ChromeWidget * m_widget; |
|
80 }; |
|
81 |
|
82 #endif // GINEBRA_RENDERER_H |
|