2 Copyright (C) 2007 Trolltech ASA
3 Copyright (C) 2007 Staikos Computing Services Inc.
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
20 This class provides all functionality needed for loading images, style sheets and html
21 pages from the web. It has a memory cache for these objects.
27 #include <QtCore/qobject.h>
28 #include <QtCore/qurl.h>
30 #include "qwebkitglobal.h"
38 class QWebNetworkRequest;
40 class QWebFramePrivate;
45 class FrameLoaderClientQt;
50 class QWEBKIT_EXPORT QWebFrame : public QObject
54 QWebFrame(QWebPage *parent, QWebFrameData *frameData);
55 QWebFrame(QWebFrame *parent, QWebFrameData *frameData);
59 QWebPage *page() const;
61 void load(const QUrl &url);
62 void load(const QWebNetworkRequest &request);
63 void setHtml(const QString &html, const QUrl &baseUrl = QUrl());
64 void setHtml(const QByteArray &html, const QUrl &baseUrl = QUrl());
65 void setContent(const QByteArray &data, const QString &mimeType = QString(), const QUrl &baseUrl = QUrl());
67 void addToJSWindowObject(const QString &name, QObject *object);
68 QString markup() const;
69 QString innerText() const;
70 QString renderTreeDump() const;
72 QString title() const;
78 QList<QWebFrame*> childFrames() const;
80 Qt::ScrollBarPolicy verticalScrollBarPolicy() const;
81 void setVerticalScrollBarPolicy(Qt::ScrollBarPolicy);
82 Qt::ScrollBarPolicy horizontalScrollBarPolicy() const;
83 void setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy);
85 void render(QPainter *painter, const QRect &source);
89 QRect geometry() const;
92 QString evaluateJavaScript(const QString& scriptSource);
96 void loadDone(bool ok);
97 void provisionalLoad();
98 void titleChanged(const QString &title);
99 void hoveringOverLink(const QString &link, const QString &title, const QString &textContent);
105 * Signal is emitted when the mainframe()'s initial layout is completed.
107 void initialLayoutComplete();
110 * Signal is emitted when an icon ("favicon") is loaded from the site.
115 friend class QWebPage;
116 friend class QWebPagePrivate;
117 friend class WebCore::WidgetPrivate;
118 friend class WebCore::FrameLoaderClientQt;
119 friend class WebCore::ChromeClientQt;