diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/webkit/simplewebplugin/data/accounts.csv | 11 | ||||
-rw-r--r-- | examples/webkit/simplewebplugin/pages/index.html | 27 | ||||
-rw-r--r-- | examples/webkit/simplewebplugin/simplewebplugin.pro | 23 | ||||
-rw-r--r-- | examples/webkit/webplugin/data/accounts.csv | 11 | ||||
-rw-r--r-- | examples/webkit/webplugin/pages/index.html | 64 | ||||
-rw-r--r-- | examples/webkit/webplugin/webplugin.pro | 23 |
6 files changed, 159 insertions, 0 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/simplewebplugin.pro b/examples/webkit/simplewebplugin/simplewebplugin.pro new file mode 100644 index 0000000..c16302d --- /dev/null +++ b/examples/webkit/simplewebplugin/simplewebplugin.pro @@ -0,0 +1,23 @@ +QT += webkit network + +HEADERS = csvfactory.h \ + csvview.h \ + mainwindow.h + +SOURCES = csvfactory.cpp \ + csvview.cpp \ + main.cpp \ + mainwindow.cpp + +RESOURCES = simplewebplugin.qrc + +# install +target.path = $$[QT_INSTALL_EXAMPLES]/webkit/simplewebplugin +sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/webkit/simplewebplugin +INSTALLS += target sources + +symbian { + TARGET.UID3 = 0xA000EFFF + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +} 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 new file mode 100644 index 0000000..48f48d1 --- /dev/null +++ b/examples/webkit/webplugin/webplugin.pro @@ -0,0 +1,23 @@ +QT += webkit network + +HEADERS = csvfactory.h \ + csvview.h \ + mainwindow.h + +SOURCES = csvfactory.cpp \ + csvview.cpp \ + main.cpp \ + mainwindow.cpp + +RESOURCES = webplugin.qrc + +# install +target.path = $$[QT_INSTALL_EXAMPLES]/webkit/webplugin +sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/webkit/webplugin +INSTALLS += target sources + +symbian { + TARGET.UID3 = 0xA000EFFE + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +} |