summaryrefslogtreecommitdiffstats
path: root/examples/webkit
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2011-04-13 17:16:08 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2011-04-13 17:16:08 (GMT)
commitc4c813bd982717c643485e22bede84c0997253bb (patch)
tree02c6285ef9bd2094369d846f7604487fa09d8593 /examples/webkit
parentbbd2a1b1d2e940a4051ffffc54a2d0d81f1e5e0c (diff)
downloadQt-c4c813bd982717c643485e22bede84c0997253bb.zip
Qt-c4c813bd982717c643485e22bede84c0997253bb.tar.gz
Qt-c4c813bd982717c643485e22bede84c0997253bb.tar.bz2
Added missing data files. Renamed resource files.
Diffstat (limited to 'examples/webkit')
-rw-r--r--examples/webkit/simplewebplugin/data/accounts.csv11
-rw-r--r--examples/webkit/simplewebplugin/pages/index.html27
-rw-r--r--examples/webkit/simplewebplugin/simplecsvplugin.qrc6
-rw-r--r--examples/webkit/simplewebplugin/simplewebplugin.pro2
-rw-r--r--examples/webkit/webplugin/csvplugin.qrc6
-rw-r--r--examples/webkit/webplugin/data/accounts.csv11
-rw-r--r--examples/webkit/webplugin/pages/index.html64
-rw-r--r--examples/webkit/webplugin/webplugin.pro2
8 files changed, 115 insertions, 14 deletions
diff --git a/examples/webkit/simplewebplugin/data/accounts.csv b/examples/webkit/simplewebplugin/data/accounts.csv
new file mode 100644
index 0000000..2ea3bd6
--- /dev/null
+++ b/examples/webkit/simplewebplugin/data/accounts.csv
@@ -0,0 +1,11 @@
+"Name","Address","Quantity"
+"Kristian Quan","123 Company Place, Big City","4"
+"Matthew Rand","The Orchard, Little Village","2"
+"Eirik Asaki","497 Park Skyway, Future City","29"
+"Jarek Hanssen","1023 Riviera Drive, Southern Precinct","45"
+"Carlos Hartmann","The Manor House, Country Estate","1"
+"Bea King","Floor 201, Sun Tower, Central City","32"
+"Stian Hinton","Mechanical workshop, Fishing Village, North River","0"
+"Shane Bowland","P.O. Box 419, Beach Resort","1"
+"Gavin Holm","19 Library Road, University Campus, near Large Town","16"
+"Adrienna Randles","98 Tapestry Road, Market Town, The Shires","1"
diff --git a/examples/webkit/simplewebplugin/pages/index.html b/examples/webkit/simplewebplugin/pages/index.html
new file mode 100644
index 0000000..9581a8e
--- /dev/null
+++ b/examples/webkit/simplewebplugin/pages/index.html
@@ -0,0 +1,27 @@
+<html>
+<head>
+<title>Simple Web Plugin</title>
+</head>
+
+<body>
+<h1>Simple Web Plugin</h1>
+
+<p>
+ This plugin displays comma-separated value (CSV) files in Web pages using
+ a subclass of Qt's
+ <a href="http://doc.trolltech.com/4.4/qtableview.html">QTableView</a>
+ widget.
+</p>
+
+<!-- [embedded object] -->
+<object type="text/csv;header=present;charset=utf8"
+ data="qrc:/data/accounts.csv"
+ width="100%" height="300"></object>
+<!-- [embedded object] -->
+
+<p>
+ The above table shows some sample data rendered by the plugin.
+</p>
+
+</body>
+</html>
diff --git a/examples/webkit/simplewebplugin/simplecsvplugin.qrc b/examples/webkit/simplewebplugin/simplecsvplugin.qrc
deleted file mode 100644
index 14f80e7..0000000
--- a/examples/webkit/simplewebplugin/simplecsvplugin.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<RCC>
- <qresource prefix="/" >
- <file>pages/index.html</file>
- <file>data/accounts.csv</file>
- </qresource>
-</RCC>
diff --git a/examples/webkit/simplewebplugin/simplewebplugin.pro b/examples/webkit/simplewebplugin/simplewebplugin.pro
index c3f5a9b..c16302d 100644
--- a/examples/webkit/simplewebplugin/simplewebplugin.pro
+++ b/examples/webkit/simplewebplugin/simplewebplugin.pro
@@ -9,7 +9,7 @@ SOURCES = csvfactory.cpp \
main.cpp \
mainwindow.cpp
-RESOURCES = simplecsvplugin.qrc
+RESOURCES = simplewebplugin.qrc
# install
target.path = $$[QT_INSTALL_EXAMPLES]/webkit/simplewebplugin
diff --git a/examples/webkit/webplugin/csvplugin.qrc b/examples/webkit/webplugin/csvplugin.qrc
deleted file mode 100644
index 14f80e7..0000000
--- a/examples/webkit/webplugin/csvplugin.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<RCC>
- <qresource prefix="/" >
- <file>pages/index.html</file>
- <file>data/accounts.csv</file>
- </qresource>
-</RCC>
diff --git a/examples/webkit/webplugin/data/accounts.csv b/examples/webkit/webplugin/data/accounts.csv
new file mode 100644
index 0000000..2ea3bd6
--- /dev/null
+++ b/examples/webkit/webplugin/data/accounts.csv
@@ -0,0 +1,11 @@
+"Name","Address","Quantity"
+"Kristian Quan","123 Company Place, Big City","4"
+"Matthew Rand","The Orchard, Little Village","2"
+"Eirik Asaki","497 Park Skyway, Future City","29"
+"Jarek Hanssen","1023 Riviera Drive, Southern Precinct","45"
+"Carlos Hartmann","The Manor House, Country Estate","1"
+"Bea King","Floor 201, Sun Tower, Central City","32"
+"Stian Hinton","Mechanical workshop, Fishing Village, North River","0"
+"Shane Bowland","P.O. Box 419, Beach Resort","1"
+"Gavin Holm","19 Library Road, University Campus, near Large Town","16"
+"Adrienna Randles","98 Tapestry Road, Market Town, The Shires","1"
diff --git a/examples/webkit/webplugin/pages/index.html b/examples/webkit/webplugin/pages/index.html
new file mode 100644
index 0000000..fe38bba
--- /dev/null
+++ b/examples/webkit/webplugin/pages/index.html
@@ -0,0 +1,64 @@
+<html>
+<head>
+<title>Web Plugin</title>
+<!-- [script] -->
+<script type="text/javascript">
+function fillInTable(name, address, quantity)
+{
+ var nameElement = document.getElementById("customers_name");
+ var addressElement = document.getElementById("customers_address");
+ var quantityElement = document.getElementById("customers_quantity");
+
+ nameElement.innerHTML = name;
+ addressElement.innerHTML = address;
+ quantityElement.innerHTML = quantity;
+}
+</script>
+<!-- [script] -->
+</head>
+
+<body>
+<h1>Web Plugin</h1>
+
+<p>
+ This plugin displays comma-separated value (CSV) files in Web pages using
+ a table widget.
+</p>
+
+<!-- [embedded object] -->
+<object type="text/csv;header=present;charset=utf8"
+ data="qrc:/data/accounts.csv"
+ width="100%" height="300">
+</object>
+<!-- [embedded object] -->
+
+<p>
+ The table above shows some sample data rendered by the plugin. It is exposed
+ to this page as the <tt>view</tt> JavaScript object.
+</p>
+
+<p>
+ The fields shown below in an HTML table can be updated by selecting a row in
+ the table above. A signal in the view is connected to a JavaScript function
+ in this page which fills in the values.
+</p>
+
+<div style="margin-left: 5%; width: 90%; background-color: lightgray">
+<!-- [table] -->
+<table>
+<tr>
+ <th>Name:</th>
+ <td id="customers_name"></td>
+</tr><tr>
+ <th>Address:</th>
+ <td id="customers_address"></td>
+</tr><tr>
+ <th>Quantity:</th>
+ <td id="customers_quantity"></td>
+</tr>
+</table>
+<!-- [table] -->
+</div>
+
+</body>
+</html>
diff --git a/examples/webkit/webplugin/webplugin.pro b/examples/webkit/webplugin/webplugin.pro
index cb5ebf3..48f48d1 100644
--- a/examples/webkit/webplugin/webplugin.pro
+++ b/examples/webkit/webplugin/webplugin.pro
@@ -9,7 +9,7 @@ SOURCES = csvfactory.cpp \
main.cpp \
mainwindow.cpp
-RESOURCES = csvplugin.qrc
+RESOURCES = webplugin.qrc
# install
target.path = $$[QT_INSTALL_EXAMPLES]/webkit/webplugin