summaryrefslogtreecommitdiffstats
path: root/examples/webenginewidgets/spellchecker/data
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@theqtcompany.com>2016-04-13 16:06:23 +0200
committerMichal Klocek <michal.klocek@theqtcompany.com>2016-07-02 04:34:51 +0000
commite8d1b9915a60732b764d6c18efd184b5ae73c06b (patch)
tree45161068eec50879086c5f886bbb2cfef8397979 /examples/webenginewidgets/spellchecker/data
parent42504596248a10eb31a5b719e0676b71f55871e4 (diff)
Add widget based spellchecker example
This example demonstrates how to convert 'dic' dictionary files into 'bdict' binary format using qwebengine_convert_dict tool. It shows how to implement language selection. It adds two dummy dictionaries. Change-Id: Iffc23a0ed4e51cbc749f666c8f565fafb3739a9b Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'examples/webenginewidgets/spellchecker/data')
-rw-r--r--examples/webenginewidgets/spellchecker/data/icon.svg24
-rw-r--r--examples/webenginewidgets/spellchecker/data/index.html33
-rw-r--r--examples/webenginewidgets/spellchecker/data/spellchecker.qrc7
-rw-r--r--examples/webenginewidgets/spellchecker/data/style.css90
4 files changed, 154 insertions, 0 deletions
diff --git a/examples/webenginewidgets/spellchecker/data/icon.svg b/examples/webenginewidgets/spellchecker/data/icon.svg
new file mode 100644
index 000000000..b90ff26dd
--- /dev/null
+++ b/examples/webenginewidgets/spellchecker/data/icon.svg
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="94px" height="94px" viewBox="0 0 94 94" enable-background="new 0 0 94 94" xml:space="preserve">
+<g>
+ <circle fill="none" cx="47" cy="47" r="47"/>
+ <g>
+ <path fill="#46A2DA" d="M47,92.979c-11.779,0-23.559-4.484-32.526-13.451C-3.461,61.591-3.461,32.409,14.472,14.474
+ C32.41-3.463,61.592-3.461,79.526,14.473c17.935,17.936,17.935,47.119,0.002,65.054l-0.002,0.001
+ C70.559,88.495,58.779,92.979,47,92.979z"/>
+ </g>
+ <path fill="#80C342" d="M93,47C93,21.595,72.405,1,47,1C34.297,1,22.797,6.149,14.473,14.473l65.054,65.054
+ C87.851,71.203,93,59.703,93,47z"/>
+ <g>
+ <path fill="#46A2DA" d="M47,65c-4.808,0-9.328-1.873-12.728-5.272c-7.018-7.019-7.018-18.438,0-25.456
+ C37.672,30.873,42.192,29,47,29s9.328,1.873,12.728,5.272c7.018,7.019,7.018,18.438,0,25.456C56.328,63.127,51.808,65,47,65z"/>
+ <path fill="#FFFFFF" d="M62.248,59.919c6.671-7.858,6.312-19.644-1.105-27.061C57.237,28.953,52.118,27,47,27
+ c-5.118,0-10.237,1.953-14.142,5.858c-7.81,7.81-7.81,20.474,0,28.284C36.763,65.047,41.882,67,47,67
+ c4.379,0,8.752-1.441,12.372-4.3L77.88,81.209c0.989-0.895,1.935-1.837,2.843-2.814L62.248,59.919z M35.686,58.314
+ c-6.238-6.238-6.238-16.389,0-22.627C38.708,32.664,42.726,31,47,31c4.274,0,8.292,1.664,11.314,4.686
+ c6.238,6.238,6.238,16.389,0,22.627C55.292,61.336,51.274,63,47,63C42.726,63,38.708,61.336,35.686,58.314z"/>
+ </g>
+</g>
+</svg>
diff --git a/examples/webenginewidgets/spellchecker/data/index.html b/examples/webenginewidgets/spellchecker/data/index.html
new file mode 100644
index 000000000..b6cec5fe0
--- /dev/null
+++ b/examples/webenginewidgets/spellchecker/data/index.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Contact us</title>
+ <link rel="stylesheet" type="text/css" href="style.css">
+ </head>
+ <body>
+ <form class="form">
+ <img class="logo" src="icon.svg" alt="qtwebengine">
+ <div class="header">
+ <h1>Contact us</h1>
+ <h2>We are here to help</h2>
+ </div>
+ <label>
+ <span>First Name:</span><input id="firstname" type="text" name="name" />
+ </label>
+ <label>
+ <span>Last Name:</span><input id="lastName" type="text" name="name" />
+ </label>
+ <label>
+ <span>Email Address:</span><input id="email" type="text" name="email" />
+ </label>
+ <label>
+ <span>Subject:</span><input id="subject" type="text" name="subject" />
+ </label>
+ <label>
+ <span>Message:</span><textarea id="feedback" name="feedback"></textarea>
+ </label>
+ <input type="submit" value="Send" />
+ </form>
+ </body>
+</html>
diff --git a/examples/webenginewidgets/spellchecker/data/spellchecker.qrc b/examples/webenginewidgets/spellchecker/data/spellchecker.qrc
new file mode 100644
index 000000000..a9c76cc7e
--- /dev/null
+++ b/examples/webenginewidgets/spellchecker/data/spellchecker.qrc
@@ -0,0 +1,7 @@
+<RCC>
+ <qresource prefix="/">
+ <file>index.html</file>
+ <file>style.css</file>
+ <file>icon.svg</file>
+ </qresource>
+</RCC>
diff --git a/examples/webenginewidgets/spellchecker/data/style.css b/examples/webenginewidgets/spellchecker/data/style.css
new file mode 100644
index 000000000..7b6736f1f
--- /dev/null
+++ b/examples/webenginewidgets/spellchecker/data/style.css
@@ -0,0 +1,90 @@
+.logo {
+ width: 50px;
+ height: 50px;
+ float: left;
+ margin: 20px 20px 0px 20px;
+ -webkit-animation:spin 8s linear infinite;
+}
+@-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } }
+
+.header {
+ display: inline
+}
+
+.form {
+ width: 450px;
+ height: 600px;
+ background: -webkit-linear-gradient(bottom, #ddd, #fff);
+ border: 1px solid #999;
+ border-radius: 12px;
+ color: #46a;
+ font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
+ font-size: 14px;
+ font-style: italic;
+ font-weight: bold;
+ margin: auto;
+ padding: 10px;
+ position: relative;
+ line-height: 26px;
+ text-decoration: none;
+ -webkit-box-shadow: 0px 0px 5px #444;
+}
+
+h1 {
+ padding-left:40px;
+ color: #46a2da;
+}
+
+h2 {
+ color: #80c342;
+ font-size: 13px;
+ margin-top: -20px;
+}
+
+span {
+ margin-left: 20px;
+}
+
+input {
+ width: 400px;
+ display: block;
+ border: 1px solid #999;
+ height: 25px;
+ margin-left: 20px;
+ margin-bottom: 10px;
+ padding-left: 10px;
+ -webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
+}
+
+textarea {
+ width: 400px;
+ max-width: 400px;
+ height: 180px;
+ max-height: 400px;
+ display: block;
+ margin-left: 20px;
+ padding-left: 10px;
+ padding-right: 10px;
+ -webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
+}
+
+input:focus, textarea:focus {
+ outline:none;
+ border: 1px solid #46a2da;
+}
+
+input[type=submit] {
+ width: 100px;
+ left: 170px;
+ bottom: 10px;
+ background: #46a2da;
+ color: #fff;
+ height: 30px;
+ position: absolute;
+ border-radius: 14px;
+}
+
+input[type=submit]:hover {
+ background: #80c342;
+}
+