forked from qt/qt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move WebView to an extension plugin.
Using WebView now requires: import org.webkit 1.0 Task-number: QT-2995
- Loading branch information
Warwick Allison
committed
Mar 2, 2010
1 parent
26e6b83
commit feb79bb
Showing
44 changed files
with
257 additions
and
262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import Qt 4.6 | ||
import org.webkit 1.0 | ||
|
||
Flipable { | ||
id: container | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import Qt 4.6 | ||
import org.webkit 1.0 | ||
|
||
Flickable { | ||
property alias title: webView.title | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import Qt 4.6 | ||
import org.webkit 1.0 | ||
|
||
import "content" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import Qt 4.6 | ||
import org.webkit 1.0 | ||
|
||
Item { | ||
id: page | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import Qt 4.6 | ||
import org.webkit 1.0 | ||
|
||
Item { | ||
height: 640 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
// order to create a Map. | ||
|
||
import Qt 4.6 | ||
import org.webkit 1.0 | ||
import "content/Mapping" | ||
|
||
Map { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import Qt 4.6 | ||
import org.webkit 1.0 | ||
|
||
// Inline HTML with loose formatting can be | ||
// set on the html property. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import Qt 4.6 | ||
import org.webkit 1.0 | ||
|
||
// The WebView supports QML data through the HTML OBJECT tag | ||
Rectangle { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
plugin webkitqmlplugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
** All rights reserved. | ||
** Contact: Nokia Corporation ([email protected]) | ||
** | ||
** This file is part of the test suite of the Qt Toolkit. | ||
** This file is part of the plugins of the Qt Toolkit. | ||
** | ||
** $QT_BEGIN_LICENSE:LGPL$ | ||
** No Commercial Usage | ||
|
@@ -38,29 +38,29 @@ | |
** $QT_END_LICENSE$ | ||
** | ||
****************************************************************************/ | ||
#ifndef TESTTYPES_H | ||
#define TESTTYPES_H | ||
|
||
#include <private/qdeclarativewebview_p.h> | ||
#include <QtDeclarative/qdeclarativeextensionplugin.h> | ||
#include <QtDeclarative/qdeclarative.h> | ||
|
||
class MyWebView : public QDeclarativeWebView | ||
#include "qdeclarativewebview_p.h" | ||
#include "qdeclarativewebview_p_p.h" | ||
|
||
QT_BEGIN_NAMESPACE | ||
|
||
class WebKitQmlPlugin : public QDeclarativeExtensionPlugin | ||
{ | ||
Q_OBJECT | ||
Q_PROPERTY(int pixelsPainted READ pixelsPainted); | ||
|
||
public: | ||
MyWebView() : pp(0) {} | ||
|
||
int pixelsPainted() const { return pp; } | ||
|
||
void drawContents(QPainter *p, const QRect &r); | ||
|
||
private: | ||
int pp; | ||
virtual void registerTypes(const char *uri) | ||
{ | ||
Q_ASSERT(QLatin1String(uri) == QLatin1String("org.webkit")); | ||
qmlRegisterType<QDeclarativeWebView>(uri,1,0,"WebView"); | ||
} | ||
}; | ||
|
||
QML_DECLARE_TYPE(MyWebView); | ||
QT_END_NAMESPACE | ||
|
||
#include "plugin.moc" | ||
|
||
void registerTypes(); | ||
Q_EXPORT_PLUGIN2(webkitqmlplugin, QT_PREPEND_NAMESPACE(WebKitQmlPlugin)); | ||
|
||
#endif // TESTTYPES_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
18 changes: 18 additions & 0 deletions
18
src/plugins/qdeclarativemodules/webkitqmlplugin/webkitqmlplugin.pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
TARGET = webkitqmlplugin | ||
include(../../qpluginbase.pri) | ||
|
||
contains(QT_CONFIG, webkit) { | ||
QT += webkit declarative | ||
|
||
SOURCES += qdeclarativewebview.cpp plugin.cpp | ||
HEADERS += qdeclarativewebview_p.h | ||
HEADERS += qdeclarativewebview_p_p.h | ||
|
||
QTDIR_build:DESTDIR = $$QT_BUILD_TREE/imports/org/webkit | ||
target.path = $$[QT_INSTALL_IMPORTS]/org/webkit | ||
|
||
qmldir.files += $$QT_BUILD_TREE/imports/org/webkit/qmldir | ||
qmldir.path += $$[QT_INSTALL_IMPORTS]/org/webkit | ||
|
||
INSTALLS += target qmldir | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import Qt 4.6 | ||
import org.webkit 1.0 | ||
|
||
WebView { | ||
url: "basic.html" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import Qt 4.6 | ||
import org.webkit 1.0 | ||
|
||
WebView { | ||
url: "elements.html" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import Qt 4.6 | ||
import org.webkit 1.0 | ||
|
||
WebView { | ||
url: "javaScript.html" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import Qt 4.6 | ||
import org.webkit 1.0 | ||
|
||
WebView { | ||
url: "does-not-exist.html" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
// Demonstrates opening new WebViews from HTML | ||
|
||
import Qt 4.6 | ||
import org.webkit 1.0 | ||
|
||
Grid { | ||
columns: 3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import Qt 4.6 | ||
import org.webkit 1.0 | ||
|
||
WebView { | ||
html: "<p>This is a <b>string</b> set on the WebView" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.