diff options
Diffstat (limited to 'examples/webenginewidgets/printme/data')
-rw-r--r-- | examples/webenginewidgets/printme/data/data.qrc | 7 | ||||
-rw-r--r-- | examples/webenginewidgets/printme/data/icon.svg | 24 | ||||
-rw-r--r-- | examples/webenginewidgets/printme/data/index.html | 24 | ||||
-rw-r--r-- | examples/webenginewidgets/printme/data/style.css | 72 |
4 files changed, 127 insertions, 0 deletions
diff --git a/examples/webenginewidgets/printme/data/data.qrc b/examples/webenginewidgets/printme/data/data.qrc new file mode 100644 index 000000000..a9c76cc7e --- /dev/null +++ b/examples/webenginewidgets/printme/data/data.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/printme/data/icon.svg b/examples/webenginewidgets/printme/data/icon.svg new file mode 100644 index 000000000..b90ff26dd --- /dev/null +++ b/examples/webenginewidgets/printme/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/printme/data/index.html b/examples/webenginewidgets/printme/data/index.html new file mode 100644 index 000000000..cf286e85a --- /dev/null +++ b/examples/webenginewidgets/printme/data/index.html @@ -0,0 +1,24 @@ +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>PrintMe</title> + <link rel="stylesheet" type="text/css" href="style.css"> + <script> + function printNow() { + window.print(); + } + </script> + </head> + <body> + <form class="form"> + <img class="logo" src="icon.svg" alt="qtwebengine"> + <div class="header"> + <h1>Hello Paper World!</h1> + <h2>Press Ctrl+p to print with print preview</h2> + <h2>Press Ctrl+Shift+p to print without print preview</h2> + <h2>Click the button to print using JavaScript</h2> + <p class="button" onclick="printNow()">Print Now</p> + </form> + </body> +</html> diff --git a/examples/webenginewidgets/printme/data/style.css b/examples/webenginewidgets/printme/data/style.css new file mode 100644 index 000000000..cf6a2b7bf --- /dev/null +++ b/examples/webenginewidgets/printme/data/style.css @@ -0,0 +1,72 @@ +html,body { + height:100%; + width:100%; + margin:0; +} + body { + display:flex; +} + .logo { + width: 75px; + height: 75px; + 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: 480px; + height: 170px; + 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; +} + .button{ + display: inline-block; + background: #46a2da; + width: 100px; + height: 30px; + padding: 0px; + text-align: center; + font-weight: bold; + color: #ffffff; + text-decoration: none; + border: 1px solid #999; + margin-left: 190px; +} + .button:hover { + background-color: #46a200 +} + .button:active { + background-color: #3e8e41; +} |