Merge lp:~uriboni/qt-halide/documentation into lp:qt-halide
- documentation
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Florian Boucault |
Approved revision: | 315 |
Merged at revision: | 310 |
Proposed branch: | lp:~uriboni/qt-halide/documentation |
Merge into: | lp:qt-halide |
Diff against target: |
2323 lines (+2024/-18) 14 files modified
CMakeLists.txt (+1/-0) documentation/CMakeLists.txt (+9/-0) documentation/css/base.css (+638/-0) documentation/css/breadcrumbs.js (+21/-0) documentation/css/qtquick.css (+788/-0) documentation/css/reset.css (+8/-0) documentation/css/scratch.css (+104/-0) documentation/qt-halide.qdocconf (+45/-0) src/QtHalide/halide_function.cpp (+61/-0) src/QtHalide/halide_function_list_model.cpp (+64/-0) src/QtHalide/halide_image.cpp (+65/-18) src/QtHalide/halide_image_renderer.cpp (+97/-0) src/QtHalide/halide_transform.cpp (+118/-0) src/QtHalide/qthalide_qml_plugin.cpp (+5/-0) |
To merge this branch: | bzr merge lp:~uriboni/qt-halide/documentation |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Florian Boucault (community) | Needs Fixing | ||
Ubuntu Phablet Team | Pending | ||
Review via email: mp+255563@code.launchpad.net |
Commit message
Description of the change
Add documentation.
Use make docs to generate.
- 311. By Ugo Riboni
-
Document the rest of the classes accessible from QML
- 312. By Ugo Riboni
-
Merge changes from trunk
- 313. By Ugo Riboni
-
Remove debug flag from qdoc invocation
- 314. By Ugo Riboni
-
Remove some unnecessary code blocks
Florian Boucault (fboucault) wrote : | # |
HalideFunction.
Florian Boucault (fboucault) wrote : | # |
HalideFunctionL
Florian Boucault (fboucault) wrote : | # |
HalideTransform
Florian Boucault (fboucault) wrote : | # |
HalideTransform has no example. In fact its example seems to be in HalideFunction for some reason.
Florian Boucault (fboucault) wrote : | # |
HalideImage and HalideImageRenderer have no examples
Florian Boucault (fboucault) wrote : | # |
HalideImageRend
horizontalAlignment : FillMode
verticalAlignment : FillMode
- 315. By Ugo Riboni
-
Fix documentation and add examples
Ugo Riboni (uriboni) wrote : | # |
> HalideImage and HalideImageRenderer have no examples
Addressed all concerns except for HalideImage examples, of which there are various in other documentation files now, so I just redirect the reader there.
Florian Boucault (fboucault) wrote : | # |
> "Import Statement: import QtHalide ."
>
> are missing the versions
That was not fixed.
Also the html pages have in their title "QtHalide 1.1"
Preview Diff
1 | === modified file 'CMakeLists.txt' |
2 | --- CMakeLists.txt 2015-04-06 16:12:13 +0000 |
3 | +++ CMakeLists.txt 2015-04-09 21:30:48 +0000 |
4 | @@ -66,6 +66,7 @@ |
5 | add_subdirectory(src) |
6 | add_subdirectory(tests) |
7 | add_subdirectory(examples) |
8 | +add_subdirectory(documentation) |
9 | |
10 | set(make_check_depends qthalide-qml QtHalideTestHelper) |
11 | if(NOT ${CMAKE_CURRENT_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) |
12 | |
13 | === added directory 'documentation' |
14 | === added file 'documentation/CMakeLists.txt' |
15 | --- documentation/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
16 | +++ documentation/CMakeLists.txt 2015-04-09 21:30:48 +0000 |
17 | @@ -0,0 +1,9 @@ |
18 | +add_custom_target("docs" |
19 | + COMMAND /usr/bin/qdoc --outputdir ${CMAKE_CURRENT_BINARY_DIR} qt-halide.qdocconf |
20 | + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) |
21 | + |
22 | +file(GLOB QT_HALIDE_DOC_WEB_FILES css/*.css) |
23 | +file(GLOB QT_HALIDE_DOC_CONF_FILES *.qdocconf) |
24 | + |
25 | +# Make the documentation files visible in qtcreator |
26 | +add_custom_target(qthalide_docs_config ALL SOURCES ${QT_HALIDE_DOC_CONF_FILES} ${QT_HALIDE_DOC_WEB_FILES}) |
27 | |
28 | === added directory 'documentation/css' |
29 | === added file 'documentation/css/base.css' |
30 | --- documentation/css/base.css 1970-01-01 00:00:00 +0000 |
31 | +++ documentation/css/base.css 2015-04-09 21:30:48 +0000 |
32 | @@ -0,0 +1,638 @@ |
33 | +/** |
34 | +* Ubuntu Developer base stylesheet |
35 | +* |
36 | +* A base stylesheet containing site-wide styles |
37 | +* |
38 | +* @project Ubuntu Developer |
39 | +* @version 1.0 |
40 | +* @author Canonical Web Team: Steve Edwards |
41 | +* @copyright 2011 Canonical Ltd. |
42 | +*/ |
43 | + |
44 | +/** |
45 | +* @section Global |
46 | +*/ |
47 | + |
48 | +body { |
49 | + font-family: 'Ubuntu', 'Ubuntu Beta', UbuntuBeta, Ubuntu, 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; |
50 | + font-size: 13px; |
51 | + line-height: 1.4; |
52 | + color: #333; |
53 | +} |
54 | +a { |
55 | + color: #dd4814; |
56 | + text-decoration: none; |
57 | + outline: 0; |
58 | +} |
59 | +p, dl { |
60 | + margin-bottom: 10px; |
61 | +} |
62 | +strong { |
63 | + font-weight: bold; |
64 | +} |
65 | +em { |
66 | + font-style: italic; |
67 | +} |
68 | +code{ |
69 | + padding: 10px; |
70 | + font-family: 'Ubuntu Mono', 'Consolas', 'Monaco', 'DejaVu Sans Mono', Courier, monospace; |
71 | + background-color: #fdf6f2; |
72 | + display: block; |
73 | + margin-bottom: 10px; |
74 | + -moz-border-radius: 4px; |
75 | + -webkit-border-radius: 4px; |
76 | + border-radius: 4px; |
77 | +} |
78 | +h1 { |
79 | + font-size: 36px; |
80 | + line-height: 1.1; |
81 | + margin-bottom: 20px; |
82 | +} |
83 | +article h1, |
84 | +h2 { |
85 | + font-size: 24px; |
86 | + line-height: 1.2; |
87 | + margin-bottom: 14px; |
88 | +} |
89 | +h3 { |
90 | + font-size: 16px; |
91 | + line-height: 1.3; |
92 | + margin-bottom: 8px; |
93 | +} |
94 | +h4 { |
95 | + font-weight: bold; |
96 | +} |
97 | + |
98 | +time { |
99 | + color:#999; |
100 | +} |
101 | + |
102 | +/** |
103 | +* @section Structure |
104 | +*/ |
105 | + |
106 | +.header-login, |
107 | +.header-navigation div, |
108 | +.header-content div { |
109 | + margin: 0 auto; |
110 | + width: 940px; |
111 | +} |
112 | + |
113 | +.header-content h1{ |
114 | + background-color:#ffffff; |
115 | + display:inline-block; |
116 | +} |
117 | + |
118 | +.header-content h2{ |
119 | + background-color:#ffffff; |
120 | + display:table; |
121 | +} |
122 | + |
123 | +.header-login ul { |
124 | + margin: 4px 0; |
125 | + float: right; |
126 | +} |
127 | +.header-login li { |
128 | + margin-right: 10px; |
129 | + float: left; |
130 | +} |
131 | +.header-login a { |
132 | + color: #333; |
133 | +} |
134 | +.header-navigation { |
135 | + border-top: 2px solid #dd4814; |
136 | + border-bottom: 2px solid #dd4814; |
137 | + background-color: #fff; |
138 | + height: 54px; |
139 | + clear: right; |
140 | + overflow: hidden; |
141 | +} |
142 | +.header-navigation nav ul { |
143 | + border-right: 1px solid #dd4814; |
144 | + float: right; |
145 | +} |
146 | +.header-navigation nav li { |
147 | + border-left: 1px solid #dd4814; |
148 | + float: left; |
149 | + height: 54px; |
150 | +} |
151 | +.header-navigation nav a { |
152 | + padding: 18px 14px 0; |
153 | + font-size: 14px; |
154 | + display: block; |
155 | + height: 36px; |
156 | +} |
157 | +.header-navigation nav a:hover { |
158 | + background-color: #fcece7; |
159 | +} |
160 | +.header-navigation nav .current_page_item a, |
161 | +.header-navigation nav .current_page_parent a, |
162 | +.header-navigation nav .current_page_ancestor a { |
163 | + background-color: #dd4814; |
164 | + color: #fff; |
165 | +} |
166 | +.header-navigation input { |
167 | + margin: 12px 10px 0 10px; |
168 | + padding: 5px; |
169 | + border-top: 1px solid #a1a1a1; |
170 | + border-right: 1px solid #e0e0e0; |
171 | + border-bottom: 1px solid #fff; |
172 | + border-left: 1px solid #e0e0e0; |
173 | + width: 90px; |
174 | + font-style: italic; |
175 | + color: #ccc; |
176 | + -moz-border-radius: 3px; |
177 | + -webkit-border-radius: 3px; |
178 | + border-radius: 3px; |
179 | + -moz-box-shadow: inset 0 1px 1px #e0e0e0; |
180 | + -webkit-box-shadow: inset 0 1px 1px #e0e0e0; |
181 | + box-shadow: inset 0 1px 1px #e0e0e0; |
182 | +} |
183 | +.header-navigation h2 { |
184 | + margin: 18px 0 0 6px; |
185 | + text-transform: lowercase; |
186 | + font-size: 22px; |
187 | + color: #dd4814; |
188 | + float: left; |
189 | +} |
190 | +.header-navigation .logo-ubuntu { |
191 | + margin-top: 12px; |
192 | + float: left; |
193 | +} |
194 | +.header-content .header-navigation-secondary { |
195 | + margin-bottom: 40px; |
196 | + padding: 0; |
197 | + position: relative; |
198 | + z-index: 2; |
199 | +} |
200 | +.header-navigation-secondary div { |
201 | + padding: 0; |
202 | + border: 2px solid #dd4814; |
203 | + -moz-border-radius: 0px 0px 4px 4px; |
204 | + -webkit-border-radius: 0px 0px 4px 4px; |
205 | + border-radius: 0px 0px 4px 4px; |
206 | + background: #fff; |
207 | + border-top: 0px; |
208 | + width: 936px; |
209 | +} |
210 | +.header-navigation-secondary nav li { |
211 | + float: left; |
212 | +} |
213 | +.header-navigation-secondary nav li a { |
214 | + color: #333; |
215 | + display: block; |
216 | + height: 25px; |
217 | + padding: 8px 8px 0; |
218 | +} |
219 | +.header-navigation-secondary nav li:hover, |
220 | +.header-navigation-secondary nav .current_page_item a { |
221 | + background: url("../img/sec-nav-hover.gif"); |
222 | +} |
223 | +.header-content { |
224 | + padding-bottom: 30px; |
225 | + border-bottom: 1px solid #e0e0e0; |
226 | + -moz-box-shadow: 0 1px 3px #e0e0e0; |
227 | + -webkit-box-shadow: 0 1px 3px #e0e0e0; |
228 | + box-shadow: 0 1px 3px #e0e0e0; |
229 | + margin-bottom: 3px; |
230 | + position: relative; |
231 | + overflow: hidden; |
232 | +} |
233 | +footer { |
234 | + padding: 10px 10px 40px 10px; |
235 | + position: relative; |
236 | + -moz-border-radius: 0 0 4px 4px; |
237 | + -webkit-border-radius: 0 0 4px 4px; |
238 | + border-radius: 0 0 4px 4px; |
239 | + font-size: 12px; |
240 | + background: url("../img/background-footer.png") repeat scroll 0 0 #f7f6f5; |
241 | +} |
242 | +footer div { |
243 | + margin: 0 auto; |
244 | + padding: 0 10px; |
245 | + width: 940px; |
246 | +} |
247 | +footer a { |
248 | + color: #000; |
249 | +} |
250 | +footer nav ul { |
251 | + margin: 10px 17px 30px 0; |
252 | + width: 172px; |
253 | + display: inline-block; |
254 | + vertical-align: top; |
255 | + height: auto; |
256 | + zoom: 1; |
257 | + *display: inline; |
258 | +} |
259 | +footer nav ul.last { |
260 | + margin-right: 0; |
261 | +} |
262 | +footer nav li { |
263 | + margin-bottom: 8px; |
264 | +} |
265 | +footer nav li:first-child { |
266 | + font-weight: bold; |
267 | +} |
268 | +footer p { |
269 | + margin-bottom: 0; |
270 | +} |
271 | +#content { |
272 | + padding-top: 35px; |
273 | +} |
274 | +.arrow-nav { |
275 | + display: none; |
276 | + position: absolute; |
277 | + top: -1px; |
278 | + z-index: 3; |
279 | +} |
280 | +.shadow { |
281 | + margin: 30px 0 3px 0; |
282 | + border-bottom: 1px solid #e0e0e0; |
283 | + -moz-box-shadow: 0 2px 3px #e0e0e0; |
284 | + -webkit-box-shadow: 0 2px 3px #e0e0e0; |
285 | + box-shadow: 0 2px 3px #e0e0e0; |
286 | + height: 3px; |
287 | +} |
288 | + |
289 | +/** |
290 | +* @section Site-wide |
291 | +*/ |
292 | + |
293 | +#content h2{ |
294 | + font-size:24px; |
295 | +} |
296 | + |
297 | +.box-orange { |
298 | + padding: 10px; |
299 | + border: 3px solid #dd4814; |
300 | + -moz-border-radius: 4px; |
301 | + -webkit-border-radius: 4px; |
302 | + border-radius: 4px; |
303 | +} |
304 | +.box-orange .link-action-small { |
305 | + float: right; |
306 | + margin: 0 0 0 20px; |
307 | +} |
308 | +.link-bug { |
309 | + margin-left: 10px; |
310 | + color: #999; |
311 | +} |
312 | +.link-action { |
313 | + float: left; |
314 | + margin-bottom: 20px; |
315 | + padding: 8px 12px; |
316 | + display: block; |
317 | + background-color: #dd4814; |
318 | + color: #fff; |
319 | + -moz-border-radius: 20px; |
320 | + -webkit-border-radius: 20px; |
321 | + border-radius: 20px; |
322 | + font-size: 16px; |
323 | + line-height: 1.3; |
324 | + border-top: 3px solid #e6633a; |
325 | + border-bottom: 3px solid #c03d14; |
326 | +} |
327 | +.link-action2 { |
328 | + float: left; |
329 | + display: block; |
330 | + color: #fff; |
331 | + font-size: 16px; |
332 | + line-height: 1.3; |
333 | +} |
334 | +.link-action2 span{ |
335 | + display:block; |
336 | + float:left; |
337 | +} |
338 | +.link-action2 .cta-left{ |
339 | + background:url(../img/button-cta-left.png) no-repeat; |
340 | + width:22px; |
341 | + height:48px; |
342 | +} |
343 | +.link-action2 .cta-center{ |
344 | + background:url(../img/button-cta-slice.png) repeat-x; |
345 | + line-height:45px; |
346 | + height:48px; |
347 | +} |
348 | +.link-action2 .cta-right{ |
349 | + background:url(../img/button-cta-right.png) no-repeat; |
350 | + width:22px; |
351 | + height:48px; |
352 | +} |
353 | + |
354 | +.link-action-small { |
355 | + float: left; |
356 | + display: block; |
357 | + color: #fff; |
358 | + font-size: 16px; |
359 | +} |
360 | +.link-action-small span{ |
361 | + display:block; |
362 | + float:left; |
363 | + height:42px; |
364 | +} |
365 | +.link-action-small .cta-left{ |
366 | + background:url(../img/button-cta-left-small.png) no-repeat; |
367 | + width:19px; |
368 | +} |
369 | +.link-action-small .cta-center{ |
370 | + background:url(../img/button-cta-slice-small.png) repeat-x; |
371 | + line-height:42px; |
372 | +} |
373 | +.link-action-small .cta-right{ |
374 | + background:url(../img/button-cta-right-small.png) no-repeat; |
375 | + width:19px; |
376 | +} |
377 | + |
378 | +.link-action:active { |
379 | + position: relative; |
380 | + top: 1px; |
381 | +} |
382 | +.link-action2:active { |
383 | + position: relative; |
384 | + top: 1px; |
385 | +} |
386 | +.link-action-small:active { |
387 | + position: relative; |
388 | + top: 1px; |
389 | +} |
390 | +.list-bullets li { |
391 | + margin-bottom: 10px; |
392 | + list-style: disc; |
393 | + list-style-position: inside; |
394 | +} |
395 | +.box { |
396 | + margin-bottom: 30px; |
397 | + padding: 15px; |
398 | + border: 1px solid #aea79f; |
399 | + -moz-border-radius: 4px; |
400 | + -webkit-border-radius: 4px; |
401 | + border-radius: 4px; |
402 | +} |
403 | +.box-padded { |
404 | + margin-bottom: 30px; |
405 | + padding: 5px; |
406 | + border: 2px solid #aea79f; |
407 | + -moz-border-radius: 4px; |
408 | + -webkit-border-radius: 4px; |
409 | + border-radius: 4px; |
410 | + background: url("../img/pattern-featured.gif") repeat scroll 0 0 #ebe9e7; |
411 | + overflow: hidden; |
412 | +} |
413 | +.box-padded h3 { |
414 | + margin: 5px 0 10px 5px; |
415 | +} |
416 | +.box-padded div { |
417 | + padding: 10px; |
418 | + border: 1px solid #aea79f; |
419 | + -moz-border-radius: 4px; |
420 | + -webkit-border-radius: 4px; |
421 | + border-radius: 4px; |
422 | + background-color: #fff; |
423 | + overflow: hidden; |
424 | +} |
425 | +.box-padded li { |
426 | + padding: 0 10px; |
427 | + float: left; |
428 | + width: 211px; |
429 | + border-right: 1px dotted #aea79f; |
430 | +} |
431 | +.box-padded li.first { |
432 | + padding: 0; |
433 | + margin-bottom: 0; |
434 | +} |
435 | +.box-padded li.last { |
436 | + border: 0; |
437 | + width: 217px; |
438 | +} |
439 | +.box-padded img { |
440 | + margin: 0 10px 50px 0; |
441 | + float: left; |
442 | + -moz-border-radius: 8px; |
443 | + -webkit-border-radius: 8px; |
444 | + border-radius: 8px; |
445 | +} |
446 | +.box-clear { |
447 | + margin-bottom: 40px; |
448 | +} |
449 | +.box-clear .grid-4.first { |
450 | + margin-right: 15px; |
451 | + padding-right: 15px; |
452 | +} |
453 | +.box-clear .grid-4 { |
454 | + margin-left: 0; |
455 | + margin-right: 10px; |
456 | + padding-right: 10px; |
457 | + width: 298px; |
458 | +} |
459 | +.box-clear time { |
460 | + display: block; |
461 | + border-bottom: 1px dotted #aea79f; |
462 | + padding-bottom: 10px; |
463 | + margin-bottom: 10px; |
464 | +} |
465 | +.box-clear div.first { |
466 | + border-right: 1px dotted #aea79f; |
467 | +} |
468 | +.box-clear a { |
469 | + display: block; |
470 | +} |
471 | +.box-clear .rss { |
472 | + background: url("../img/rss.jpg") no-repeat scroll 0 center; |
473 | + padding-left: 20px; |
474 | +} |
475 | +.box-clear .location { |
476 | + display: block; |
477 | + margin-bottom: 1px; |
478 | +} |
479 | +.box-clear .last { |
480 | + margin: 0; |
481 | + padding-right: 0; |
482 | + -moz-border-radius: 4px; |
483 | + -webkit-border-radius: 4px; |
484 | + border-radius: 4px; |
485 | + width: 293px; |
486 | +} |
487 | + |
488 | +/* Widgets */ |
489 | + |
490 | +.ui-state-focus { |
491 | + outline: none; |
492 | +} |
493 | +.ui-accordion { |
494 | + border-bottom: 1px dotted #aea79f; |
495 | +} |
496 | +.ui-accordion a { |
497 | + display: block; |
498 | +} |
499 | +.ui-accordion h3 { |
500 | + margin-bottom: 0; |
501 | + border-top: 1px dotted #aea79f; |
502 | + position: relative; |
503 | + font-size: 13px; |
504 | + font-weight: bold; |
505 | +} |
506 | +.ui-accordion h3 a { |
507 | + padding: 10px 0; |
508 | + color: #333; |
509 | +} |
510 | +.ui-accordion h4 { |
511 | + margin-bottom: 5px; |
512 | +} |
513 | +.ui-accordion div fieldset { |
514 | + padding-bottom: 5px; |
515 | +} |
516 | +.ui-accordion div li, |
517 | +.ui-accordion div input { |
518 | + margin-bottom: 10px; |
519 | +} |
520 | +.ui-accordion .ui-icon { |
521 | + position: absolute; |
522 | + top: 15px; |
523 | + right: 0; |
524 | + display: block; |
525 | + width: 8px; |
526 | + height: 8px; |
527 | + background: url("../img/icon-accordion-inactive.png") 0 0 no-repeat transparent; |
528 | +} |
529 | +.ui-accordion .ui-state-active .ui-icon { |
530 | + background-image: url("../img/icon-accordion-active.png"); |
531 | +} |
532 | +.ui-accordion .current_page_item a { |
533 | + color: #333; |
534 | +} |
535 | +.container-tweet { |
536 | + -moz-border-radius: 4px 4px 4px 4px; |
537 | + -webkit-border-radius: 4px 4px 4px 4px; |
538 | + border-radius: 4px 4px 4px 4px; |
539 | + padding: 10px 10px 10px; |
540 | + background-color: #f7f7f7; |
541 | +} |
542 | +.container-tweet .tweet-follow { |
543 | + margin-top: 10px; |
544 | + margin-bottom: -10px; |
545 | + padding-left: 55px; |
546 | + padding-bottom: 6px; |
547 | + background: url("../img/tweet-follow.png") 0 5px no-repeat; |
548 | + display: block; |
549 | +} |
550 | +.container-tweet .tweet-follow span { |
551 | + font-size: 16px; |
552 | + font-weight: bold; |
553 | + line-height: 1.2; |
554 | + display: block; |
555 | +} |
556 | +.tweet a { |
557 | + display: inline; |
558 | +} |
559 | +.tweet .tweet_text { |
560 | + padding: 10px; |
561 | + background-color: #fff; |
562 | + -moz-border-radius: 4px 4px 4px 4px; |
563 | + -webkit-border-radius: 4px 4px 4px 4px; |
564 | + border-radius: 4px 4px 4px 4px; |
565 | + border: 1px solid #dd4814; |
566 | + font-size: 16px; |
567 | + display: block; |
568 | + clear: both; |
569 | +} |
570 | +.tweet.tweet-small .tweet_text { |
571 | + font-size: inherit; |
572 | +} |
573 | +.tweet .tweet_text a { |
574 | + color: #333; |
575 | +} |
576 | +.tweet .tweet_time, |
577 | +.tweet .tweet_user_and_time { |
578 | + padding: 15px 0 10px 0; |
579 | + position: relative; |
580 | + top: -2px; |
581 | + background: url("../img/tweet-arrow.png") no-repeat; |
582 | + display: block; |
583 | +} |
584 | +.tweet .tweet_odd .tweet_time, |
585 | +.tweet .tweet_odd .tweet_user_and_time { |
586 | + background-position: right 0; |
587 | + float: right; |
588 | +} |
589 | +.tweet .tweet_even .tweet_time, |
590 | +.tweet .tweet_even .tweet_user_and_time { |
591 | + background-position: left 0; |
592 | + float: left; |
593 | +} |
594 | + |
595 | +/* Search */ |
596 | + |
597 | +#content .list-search li { |
598 | + list-style-type:none; |
599 | + border:0px; |
600 | + margin-bottom: 15px; |
601 | + padding-top: 15px; |
602 | +} |
603 | + |
604 | +/* Blog */ |
605 | + |
606 | +.blog-article #nav-single { |
607 | + margin-top: 30px; |
608 | + margin-bottom: 30px; |
609 | +} |
610 | +.blog-article #nav-single .nav-next { |
611 | + float: right; |
612 | +} |
613 | +.blog-article article header .entry-meta { |
614 | + margin-bottom: 20px; |
615 | +} |
616 | +.blog-article article .entry-meta { |
617 | + color: #999; |
618 | +} |
619 | +.blog-article #respond form input[type="submit"] { |
620 | + float: left; |
621 | + cursor: pointer; |
622 | + margin-bottom: 20px; |
623 | + padding: 8px 12px; |
624 | + display: block; |
625 | + background-color: #dd4814; |
626 | + color: #fff; |
627 | + -moz-border-radius: 20px; |
628 | + -webkit-border-radius: 20px; |
629 | + border-radius: 20px; |
630 | + font-size: 16px; |
631 | + line-height: 1.3; |
632 | + border-top: 3px solid #e6633a; |
633 | + border-left: 3px solid #e6633a; |
634 | + border-right: 3px solid #e6633a; |
635 | + border-bottom: 3px solid #c03d14; |
636 | +} |
637 | +.blog-article #respond form input[type="submit"]:active { |
638 | + position: relative; |
639 | + top: 1px; |
640 | +} |
641 | + |
642 | +.alignnone{ |
643 | + float:left; |
644 | + margin:10px 20px 10px 0; |
645 | +} |
646 | +.alignleft{ |
647 | + float:left; |
648 | + margin:10px 20px 10px 0; |
649 | +} |
650 | +.alignright{ |
651 | + float:right; |
652 | + margin:10px 0 10px 20px; |
653 | +} |
654 | + |
655 | +.aligncenter{ |
656 | + float:left; |
657 | + margin:10px 20px 10px 0; |
658 | +} |
659 | +.entry-content h2, .entry-content h3{ |
660 | + margin-top:20px; |
661 | +} |
662 | +.entry-content ul li{ |
663 | + list-style-type: circle; |
664 | + margin-left:16px; |
665 | +} |
666 | + |
667 | +.entry-content hr{ |
668 | + border:none; |
669 | + border-top: 1px dotted #AEA79F; |
670 | +} |
671 | |
672 | === added file 'documentation/css/breadcrumbs.js' |
673 | --- documentation/css/breadcrumbs.js 1970-01-01 00:00:00 +0000 |
674 | +++ documentation/css/breadcrumbs.js 2015-04-09 21:30:48 +0000 |
675 | @@ -0,0 +1,21 @@ |
676 | +/* |
677 | + * Copyright 2013 Canonical Ltd. |
678 | + * |
679 | + * This program is free software; you can redistribute it and/or modify |
680 | + * it under the terms of the GNU Lesser General Public License as published by |
681 | + * the Free Software Foundation; version 3. |
682 | + * |
683 | + * This program is distributed in the hope that it will be useful, |
684 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
685 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
686 | + * GNU Lesser General Public License for more details. |
687 | + * |
688 | + * You should have received a copy of the GNU Lesser General Public License |
689 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
690 | + */ |
691 | + |
692 | +$(document).ready(function(){ |
693 | + var ul = $("ul.breadcrumb"); |
694 | + var li = ul.children("li:has(a)").remove(); |
695 | + ul.prepend(li); |
696 | +}); |
697 | |
698 | === added file 'documentation/css/qtquick.css' |
699 | --- documentation/css/qtquick.css 1970-01-01 00:00:00 +0000 |
700 | +++ documentation/css/qtquick.css 2015-04-09 21:30:48 +0000 |
701 | @@ -0,0 +1,788 @@ |
702 | +/* |
703 | + * Copyright 2013 Canonical Ltd. |
704 | + * |
705 | + * This program is free software; you can redistribute it and/or modify |
706 | + * it under the terms of the GNU Lesser General Public License as published by |
707 | + * the Free Software Foundation; version 3. |
708 | + * |
709 | + * This program is distributed in the hope that it will be useful, |
710 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
711 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
712 | + * GNU Lesser General Public License for more details. |
713 | + * |
714 | + * You should have received a copy of the GNU Lesser General Public License |
715 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
716 | + */ |
717 | + |
718 | +@media screen |
719 | +{ |
720 | + |
721 | +/* basic elements */ |
722 | + html |
723 | + { |
724 | + color: #000000; |
725 | + background: #FFFFFF; |
726 | + } |
727 | + table |
728 | + { |
729 | + border-collapse: collapse; |
730 | + border-spacing: 0; |
731 | + } |
732 | + fieldset, img |
733 | + { |
734 | + border: 0; |
735 | + max-width:100%; |
736 | + } |
737 | + address, caption, cite, code, dfn, em, strong, th, var, optgroup |
738 | + { |
739 | + font-style: inherit; |
740 | + font-weight: inherit; |
741 | + } |
742 | + del, ins |
743 | + { |
744 | + text-decoration: none; |
745 | + } |
746 | + ol li |
747 | + { |
748 | + list-style: decimal; |
749 | + } |
750 | + ul li |
751 | + { |
752 | + list-style: none; |
753 | + } |
754 | + caption, th |
755 | + { |
756 | + text-align: left; |
757 | + } |
758 | + h1.title |
759 | + { |
760 | + font-weight: bold; |
761 | + font-size: 150%; |
762 | + } |
763 | + h0 |
764 | + { |
765 | + font-weight: bold; |
766 | + font-size: 130%; |
767 | + } |
768 | + h1, h2, h3, h4, h5, h6 |
769 | + { |
770 | + font-size: 100%; |
771 | + } |
772 | + q:before, q:after |
773 | + { |
774 | + content: ''; |
775 | + } |
776 | + abbr, acronym |
777 | + { |
778 | + border: 0; |
779 | + font-variant: normal; |
780 | + } |
781 | + sup, sub |
782 | + { |
783 | + vertical-align: baseline; |
784 | + } |
785 | + tt, .qmlreadonly span, .qmldefault span |
786 | + { |
787 | + word-spacing:0.5em; |
788 | + } |
789 | + legend |
790 | + { |
791 | + color: #000000; |
792 | + } |
793 | + strong |
794 | + { |
795 | + font-weight: bold; |
796 | + } |
797 | + em |
798 | + { |
799 | + font-style: italic; |
800 | + } |
801 | + |
802 | + body |
803 | + { |
804 | + margin: 0 1.5em 0 1.5em; |
805 | + font-family: ubuntu; |
806 | + line-height: normal |
807 | + } |
808 | + a |
809 | + { |
810 | + color: #00732F; |
811 | + text-decoration: none; |
812 | + } |
813 | + hr |
814 | + { |
815 | + background-color: #E6E6E6; |
816 | + border: 1px solid #E6E6E6; |
817 | + height: 1px; |
818 | + width: 100%; |
819 | + text-align: left; |
820 | + margin: 1.5em 0 1.5em 0; |
821 | + } |
822 | + |
823 | + pre |
824 | + { |
825 | + border: 1px solid #DDDDDD; |
826 | + -moz-border-radius: 0.7em 0.7em 0.7em 0.7em; |
827 | + -webkit-border-radius: 0.7em 0.7em 0.7em 0.7em; |
828 | + border-radius: 0.7em 0.7em 0.7em 0.7em; |
829 | + padding: 1em 1em 1em 1em; |
830 | + overflow-x: auto; |
831 | + } |
832 | + table, pre |
833 | + { |
834 | + -moz-border-radius: 0.7em 0.7em 0.7em 0.7em; |
835 | + -webkit-border-radius: 0.7em 0.7em 0.7em 0.7em; |
836 | + border-radius: 0.7em 0.7em 0.7em 0.7em; |
837 | + background-color: #F6F6F6; |
838 | + border: 1px solid #E6E6E6; |
839 | + border-collapse: separate; |
840 | + margin-bottom: 2.5em; |
841 | + } |
842 | + pre { |
843 | + font-size: 90%; |
844 | + display: block; |
845 | + overflow:hidden; |
846 | + } |
847 | + thead |
848 | + { |
849 | + margin-top: 0.5em; |
850 | + font-weight: bold |
851 | + } |
852 | + th |
853 | + { |
854 | + padding: 0.5em 1.5em 0.5em 1em; |
855 | + background-color: #E1E1E1; |
856 | + border-left: 1px solid #E6E6E6; |
857 | + } |
858 | + td |
859 | + { |
860 | + padding: 0.25em 1.5em 0.25em 1em; |
861 | + } |
862 | + |
863 | + td.rightAlign |
864 | + { |
865 | + padding: 0.25em 0.5em 0.25em 1em; |
866 | + } |
867 | + table tr.odd |
868 | + { |
869 | + border-left: 1px solid #E6E6E6; |
870 | + background-color: #F6F6F6; |
871 | + color: black; |
872 | + } |
873 | + table tr.even |
874 | + { |
875 | + border-left: 1px solid #E6E6E6; |
876 | + background-color: #ffffff; |
877 | + color: #202020; |
878 | + } |
879 | + |
880 | + div.float-left |
881 | + { |
882 | + float: left; margin-right: 2em |
883 | + } |
884 | + div.float-right |
885 | + { |
886 | + float: right; margin-left: 2em |
887 | + } |
888 | + |
889 | + span.comment |
890 | + { |
891 | + color: #008B00; |
892 | + } |
893 | + span.string, span.char |
894 | + { |
895 | + color: #000084; |
896 | + } |
897 | + span.number |
898 | + { |
899 | + color: #a46200; |
900 | + } |
901 | + span.operator |
902 | + { |
903 | + color: #202020; |
904 | + } |
905 | + span.keyword |
906 | + { |
907 | + color: #840000; |
908 | + } |
909 | + span.name |
910 | + { |
911 | + color: black |
912 | + } |
913 | + span.type |
914 | + { |
915 | + font-weight: bold |
916 | + } |
917 | + span.type a:visited |
918 | + { |
919 | + color: #0F5300; |
920 | + } |
921 | + span.preprocessor |
922 | + { |
923 | + color: #404040 |
924 | + } |
925 | +/* end basic elements */ |
926 | + |
927 | +/* font style elements */ |
928 | + .heading |
929 | + { |
930 | + font-weight: bold; |
931 | + font-size: 125%; |
932 | + } |
933 | + .subtitle |
934 | + { |
935 | + font-size: 110% |
936 | + } |
937 | + .small-subtitle |
938 | + { |
939 | + font-size: 100% |
940 | + } |
941 | + .red |
942 | + { |
943 | + color:red; |
944 | + } |
945 | +/* end font style elements */ |
946 | + |
947 | +/* global settings*/ |
948 | + .header, .footer |
949 | + { |
950 | + display: block; |
951 | + clear: both; |
952 | + overflow: hidden; |
953 | + } |
954 | +/* end global settings*/ |
955 | + |
956 | +/* header elements */ |
957 | + .header .qtref |
958 | + { |
959 | + color: #00732F; |
960 | + font-weight: bold; |
961 | + font-size: 130%; |
962 | + } |
963 | + |
964 | + .header .content |
965 | + { |
966 | + margin-left: 5px; |
967 | + margin-top: 5px; |
968 | + margin-bottom: 0.5em; |
969 | + } |
970 | + |
971 | + .header .breadcrumb |
972 | + { |
973 | + font-size: 90%; |
974 | + padding: 0.5em 0 0.5em 1em; |
975 | + margin: 0; |
976 | + background-color: #fafafa; |
977 | + height: 1.35em; |
978 | + border-bottom: 1px solid #d1d1d1; |
979 | + } |
980 | + |
981 | + .header .breadcrumb ul |
982 | + { |
983 | + margin: 0; |
984 | + padding: 0; |
985 | + } |
986 | + |
987 | + .header .content |
988 | + { |
989 | + word-wrap: break-word; |
990 | + } |
991 | + |
992 | + .header .breadcrumb ul li |
993 | + { |
994 | + float: left; |
995 | + background: url(../images/breadcrumb.png) no-repeat 0 3px; |
996 | + padding-left: 1.5em; |
997 | + margin-left: 1.5em; |
998 | + } |
999 | + |
1000 | + .header .breadcrumb ul li.last |
1001 | + { |
1002 | + font-weight: normal; |
1003 | + } |
1004 | + |
1005 | + .header .breadcrumb ul li a |
1006 | + { |
1007 | + color: #00732F; |
1008 | + } |
1009 | + |
1010 | + .header .breadcrumb ul li.first |
1011 | + { |
1012 | + background-image: none; |
1013 | + padding-left: 0; |
1014 | + margin-left: 0; |
1015 | + } |
1016 | + |
1017 | + .header .content ol li { |
1018 | + background: none; |
1019 | + margin-bottom: 1.0em; |
1020 | + margin-left: 1.2em; |
1021 | + padding-left: 0 |
1022 | + } |
1023 | + |
1024 | + .header .content li |
1025 | + { |
1026 | + background: url(../images/bullet_sq.png) no-repeat 0 5px; |
1027 | + margin-bottom: 1em; |
1028 | + padding-left: 1.2em; |
1029 | + } |
1030 | + |
1031 | +/* end header elements */ |
1032 | + |
1033 | +/* content elements */ |
1034 | + .content h1 |
1035 | + { |
1036 | + font-weight: bold; |
1037 | + font-size: 130% |
1038 | + } |
1039 | + |
1040 | + .content h2 |
1041 | + { |
1042 | + font-weight: bold; |
1043 | + font-size: 120%; |
1044 | + width: 100%; |
1045 | + } |
1046 | + .content h3 |
1047 | + { |
1048 | + font-weight: bold; |
1049 | + font-size: 110%; |
1050 | + width: 100%; |
1051 | + } |
1052 | + .content table p |
1053 | + { |
1054 | + margin: 0 |
1055 | + } |
1056 | + .content ul |
1057 | + { |
1058 | + padding-left: 2.5em; |
1059 | + } |
1060 | + .content li |
1061 | + { |
1062 | + padding-top: 0.25em; |
1063 | + padding-bottom: 0.25em; |
1064 | + } |
1065 | + .content ul img { |
1066 | + vertical-align: middle; |
1067 | + } |
1068 | + |
1069 | + .content a:visited |
1070 | + { |
1071 | + color: #4c0033; |
1072 | + text-decoration: none; |
1073 | + } |
1074 | + |
1075 | + .content a:visited:hover |
1076 | + { |
1077 | + color: #4c0033; |
1078 | + text-decoration: underline; |
1079 | + } |
1080 | + |
1081 | + a:hover |
1082 | + { |
1083 | + color: #4c0033; |
1084 | + text-decoration: underline; |
1085 | + } |
1086 | + descr p a |
1087 | + { |
1088 | + text-decoration: underline; |
1089 | + } |
1090 | + |
1091 | + .descr p a:visited |
1092 | + { |
1093 | + text-decoration: underline; |
1094 | + } |
1095 | + |
1096 | + .alphaChar{ |
1097 | + width:95%; |
1098 | + background-color:#F6F6F6; |
1099 | + border:1px solid #E6E6E6; |
1100 | + -moz-border-radius: 7px 7px 7px 7px; |
1101 | + border-radius: 7px 7px 7px 7px; |
1102 | + -webkit-border-radius: 7px 7px 7px 7px; |
1103 | + font-size:12pt; |
1104 | + padding-left:10px; |
1105 | + margin-top:10px; |
1106 | + margin-bottom:10px; |
1107 | + } |
1108 | + .flowList{ |
1109 | + /*vertical-align:top;*/ |
1110 | + /*margin:20px auto;*/ |
1111 | + |
1112 | + column-count:3; |
1113 | + -webkit-column-count:3; |
1114 | + -moz-column-count:3; |
1115 | +/* |
1116 | + column-width:100%; |
1117 | + -webkit-column-width:200px; |
1118 | + -col-column-width:200px; |
1119 | +*/ |
1120 | + column-gap:41px; |
1121 | + -webkit-column-gap:41px; |
1122 | + -moz-column-gap:41px; |
1123 | + |
1124 | + column-rule: 1px dashed #ccc; |
1125 | + -webkit-column-rule: 1px dashed #ccc; |
1126 | + -moz-column-rule: 1px dashed #ccc; |
1127 | + } |
1128 | + |
1129 | + .flowList dl{ |
1130 | + } |
1131 | + .flowList dd{ |
1132 | + /*display:inline-block;*/ |
1133 | + margin-left:10px; |
1134 | + min-width:250px; |
1135 | + line-height: 1.5; |
1136 | + min-width:100%; |
1137 | + min-height:15px; |
1138 | + } |
1139 | + |
1140 | + .flowList dd a{ |
1141 | + } |
1142 | + |
1143 | + .mainContent |
1144 | + { |
1145 | + padding-left:5px; |
1146 | + } |
1147 | + |
1148 | + .content .flowList p{ |
1149 | + padding:0px; |
1150 | + } |
1151 | + |
1152 | + .content .alignedsummary |
1153 | + { |
1154 | + margin: 15px; |
1155 | + } |
1156 | + |
1157 | + |
1158 | + .qmltype |
1159 | + { |
1160 | + text-align: center; |
1161 | + font-size: 120%; |
1162 | + } |
1163 | + .qmlreadonly |
1164 | + { |
1165 | + padding-left: 5px; |
1166 | + float: right; |
1167 | + color: #254117; |
1168 | + } |
1169 | + |
1170 | + .qmldefault |
1171 | + { |
1172 | + padding-left: 5px; |
1173 | + float: right; |
1174 | + color: red; |
1175 | + } |
1176 | + |
1177 | + .qmldoc |
1178 | + { |
1179 | + } |
1180 | + |
1181 | + .generic .alphaChar{ |
1182 | + margin-top:5px; |
1183 | + } |
1184 | + |
1185 | + .generic .odd .alphaChar{ |
1186 | + background-color: #F6F6F6; |
1187 | + } |
1188 | + |
1189 | + .generic .even .alphaChar{ |
1190 | + background-color: #FFFFFF; |
1191 | + } |
1192 | + |
1193 | + .memItemRight{ |
1194 | + padding: 0.25em 1.5em 0.25em 0; |
1195 | + } |
1196 | + .highlightedCode |
1197 | + { |
1198 | + margin: 1.0em; |
1199 | + } |
1200 | + .annotated td { |
1201 | + padding: 0.25em 0.5em 0.25em 0.5em; |
1202 | + } |
1203 | + |
1204 | + .toc |
1205 | + { |
1206 | + font-size: 80% |
1207 | + } |
1208 | + |
1209 | + .header .content .toc ul |
1210 | + { |
1211 | + padding-left: 0px; |
1212 | + } |
1213 | + |
1214 | + .content .toc h3 { |
1215 | + border-bottom: 0px; |
1216 | + margin-top: 0px; |
1217 | + } |
1218 | + |
1219 | + .content .toc h3 a:hover { |
1220 | + color: #00732F; |
1221 | + text-decoration: none; |
1222 | + } |
1223 | + |
1224 | + .content .toc .level2 |
1225 | + { |
1226 | + margin-left: 1.5em; |
1227 | + } |
1228 | + |
1229 | + .content .toc .level3 |
1230 | + { |
1231 | + margin-left: 3.0em; |
1232 | + } |
1233 | + |
1234 | + .content ul li |
1235 | + { |
1236 | + background: url(../images/bullet_sq.png) no-repeat 0 0.7em; |
1237 | + padding-left: 1em |
1238 | + } |
1239 | + |
1240 | + .content .toc li |
1241 | + { |
1242 | + background: url(../images/bullet_dn.png) no-repeat 0 5px; |
1243 | + padding-left: 1em |
1244 | + } |
1245 | + |
1246 | + .relpage |
1247 | + { |
1248 | + -moz-border-radius: 7px 7px 7px 7px; |
1249 | + -webkit-border-radius: 7px 7px 7px 7px; |
1250 | + border-radius: 7px 7px 7px 7px; |
1251 | + border: 1px solid #DDDDDD; |
1252 | + padding: 25px 25px; |
1253 | + clear: both; |
1254 | + } |
1255 | + .relpage ul |
1256 | + { |
1257 | + float: none; |
1258 | + padding: 1.5em; |
1259 | + } |
1260 | + |
1261 | + h3.fn, span.fn |
1262 | + { |
1263 | + -moz-border-radius:7px 7px 7px 7px; |
1264 | + -webkit-border-radius:7px 7px 7px 7px; |
1265 | + border-radius:7px 7px 7px 7px; |
1266 | + background-color: #F6F6F6; |
1267 | + border-width: 1px; |
1268 | + border-style: solid; |
1269 | + border-color: #E6E6E6; |
1270 | + font-weight: bold; |
1271 | + word-spacing:3px; |
1272 | + padding:3px 5px; |
1273 | + } |
1274 | + |
1275 | + .functionIndex { |
1276 | + font-size:12pt; |
1277 | + word-spacing:10px; |
1278 | + margin-bottom:10px; |
1279 | + background-color: #F6F6F6; |
1280 | + border-width: 1px; |
1281 | + border-style: solid; |
1282 | + border-color: #E6E6E6; |
1283 | + -moz-border-radius: 7px 7px 7px 7px; |
1284 | + -webkit-border-radius: 7px 7px 7px 7px; |
1285 | + border-radius: 7px 7px 7px 7px; |
1286 | + width:100%; |
1287 | + } |
1288 | + |
1289 | + .centerAlign |
1290 | + { |
1291 | + text-align:center; |
1292 | + } |
1293 | + |
1294 | + .rightAlign |
1295 | + { |
1296 | + text-align:right; |
1297 | + } |
1298 | + |
1299 | + .leftAlign |
1300 | + { |
1301 | + text-align:left; |
1302 | + } |
1303 | + |
1304 | + .topAlign{ |
1305 | + vertical-align:top |
1306 | + } |
1307 | + |
1308 | + .functionIndex a{ |
1309 | + display:inline-block; |
1310 | + } |
1311 | + |
1312 | +/* end content elements */ |
1313 | +/* footer elements */ |
1314 | + |
1315 | + .footer |
1316 | + { |
1317 | + color: #393735; |
1318 | + font-size: 0.75em; |
1319 | + text-align: center; |
1320 | + padding-top: 1.5em; |
1321 | + padding-bottom: 1em; |
1322 | + background-color: #E6E7E8; |
1323 | + margin: 0; |
1324 | + } |
1325 | + .footer p |
1326 | + { |
1327 | + margin: 0.25em |
1328 | + } |
1329 | + .small |
1330 | + { |
1331 | + font-size: 0.5em; |
1332 | + } |
1333 | +/* end footer elements */ |
1334 | + |
1335 | + .item { |
1336 | + float: left; |
1337 | + position: relative; |
1338 | + width: 100%; |
1339 | + overflow: hidden; |
1340 | + } |
1341 | + |
1342 | + |
1343 | + .item .primary { |
1344 | + margin-right: 220px; |
1345 | + position: relative; |
1346 | + } |
1347 | + |
1348 | + .item hr { |
1349 | + margin-left: -220px; |
1350 | + } |
1351 | + |
1352 | + .item .secondary { |
1353 | + float: right; |
1354 | + width: 200px; |
1355 | + position: relative; |
1356 | + } |
1357 | + |
1358 | + .item .cols { |
1359 | + clear: both; |
1360 | + display: block; |
1361 | + } |
1362 | + |
1363 | + .item .cols .col { |
1364 | + float: left; |
1365 | + margin-left: 1.5%; |
1366 | + } |
1367 | + |
1368 | + .item .cols .col.first { |
1369 | + margin-left: 0; |
1370 | + } |
1371 | + |
1372 | + .item .cols.two .col { |
1373 | + width: 45%; |
1374 | + } |
1375 | + |
1376 | + .item .box { |
1377 | + margin: 0 0 10px 0; |
1378 | + } |
1379 | + |
1380 | + .item .box h3 { |
1381 | + margin: 0 0 10px 0; |
1382 | + } |
1383 | + |
1384 | + .cols.unclear { |
1385 | + clear:none; |
1386 | + } |
1387 | +} |
1388 | + |
1389 | +/* end of screen media */ |
1390 | + |
1391 | +/* start of print media */ |
1392 | + |
1393 | +@media print |
1394 | +{ |
1395 | + input, textarea, .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft, #feedbackBox, #blurpage, .toc, .breadcrumb, .toolbar, .floatingResult |
1396 | + { |
1397 | + display: none; |
1398 | + background: none; |
1399 | + } |
1400 | + .content |
1401 | + { |
1402 | + background: none; |
1403 | + display: block; |
1404 | + width: 100%; margin: 0; float: none; |
1405 | + } |
1406 | +} |
1407 | +/* end of print media */ |
1408 | + |
1409 | + |
1410 | +/* modify the TOC layouts */ |
1411 | +div.toc ul { |
1412 | + padding-left: 20px; |
1413 | +} |
1414 | +div.toc li { |
1415 | + padding-left: 4px; |
1416 | +} |
1417 | +/* Remove the border around images*/ |
1418 | +a img |
1419 | +{ |
1420 | + border:none; |
1421 | +} |
1422 | + |
1423 | +/*Add styling to the front pages*/ |
1424 | + |
1425 | +.threecolumn_area |
1426 | +{ |
1427 | + padding-top: 20px; |
1428 | + padding-bottom: 20px; |
1429 | +} |
1430 | +.threecolumn_piece |
1431 | +{ |
1432 | + display: inline-block; |
1433 | + margin-left: 78px; |
1434 | + margin-top: 8px; |
1435 | + padding: 0; |
1436 | + vertical-align: top; |
1437 | + width: 25.5%; |
1438 | +} |
1439 | +div.threecolumn_piece ul { |
1440 | + list-style-type: none; |
1441 | + padding-left: 0px; |
1442 | + margin-top: 2px; |
1443 | +} |
1444 | +div.threecolumn_piece p { |
1445 | + margin-bottom: 7px; |
1446 | + color: #5C626E; |
1447 | + text-decoration: none; |
1448 | + font-weight: bold; |
1449 | +} |
1450 | +div.threecolumn_piece li { |
1451 | + padding-left: 0px; |
1452 | + margin-bottom: 5px; |
1453 | +} |
1454 | +div.threecolumn_piece a { |
1455 | + font-weight: normal; |
1456 | +} |
1457 | +/* Add style to guide page*/ |
1458 | +.fourcolumn_area |
1459 | +{ |
1460 | + padding-top: 20px; |
1461 | + padding-bottom: 20px; |
1462 | +} |
1463 | +.fourcolumn_piece |
1464 | +{ |
1465 | + display: inline-block; |
1466 | + margin-left: 35px; |
1467 | + margin-top: 8px; |
1468 | + padding: 0; |
1469 | + vertical-align: top; |
1470 | + width: 21.3%; |
1471 | +} |
1472 | +div.fourcolumn_piece ul { |
1473 | + list-style-type: none; |
1474 | + padding-left: 0px; |
1475 | + margin-top: 2px; |
1476 | +} |
1477 | +div.fourcolumn_piece p { |
1478 | + margin-bottom: 7px; |
1479 | + color: #40444D; |
1480 | + text-decoration: none; |
1481 | + font-weight: bold; |
1482 | +} |
1483 | +div.fourcolumn_piece li { |
1484 | + padding-left: 0px; |
1485 | + margin-bottom: 5px; |
1486 | +} |
1487 | +div.fourcolumn_piece a { |
1488 | + font-weight: normal; |
1489 | +} |
1490 | |
1491 | === added file 'documentation/css/reset.css' |
1492 | --- documentation/css/reset.css 1970-01-01 00:00:00 +0000 |
1493 | +++ documentation/css/reset.css 2015-04-09 21:30:48 +0000 |
1494 | @@ -0,0 +1,8 @@ |
1495 | +/* |
1496 | +Copyright (c) 2010, Yahoo! Inc. All rights reserved. |
1497 | +Code licensed under the BSD License: |
1498 | +http://developer.yahoo.com/yui/license.html |
1499 | +version: 3.3.0 |
1500 | +build: 3167 |
1501 | +*/ |
1502 | +html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;} |
1503 | \ No newline at end of file |
1504 | |
1505 | === added file 'documentation/css/scratch.css' |
1506 | --- documentation/css/scratch.css 1970-01-01 00:00:00 +0000 |
1507 | +++ documentation/css/scratch.css 2015-04-09 21:30:48 +0000 |
1508 | @@ -0,0 +1,104 @@ |
1509 | +/* |
1510 | + * Copyright 2013 Canonical Ltd. |
1511 | + * |
1512 | + * This program is free software; you can redistribute it and/or modify |
1513 | + * it under the terms of the GNU Lesser General Public License as published by |
1514 | + * the Free Software Foundation; version 3. |
1515 | + * |
1516 | + * This program is distributed in the hope that it will be useful, |
1517 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1518 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1519 | + * GNU Lesser General Public License for more details. |
1520 | + * |
1521 | + * You should have received a copy of the GNU Lesser General Public License |
1522 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1523 | + */ |
1524 | + |
1525 | +body { |
1526 | + margin: 0; |
1527 | +} |
1528 | +div.toc ul { |
1529 | + padding: 0; |
1530 | +} |
1531 | +div.toc li { |
1532 | + margin-bottom: 3px; |
1533 | +} |
1534 | +h1.title { |
1535 | + font-size: 36px; |
1536 | + line-height: 1.1; |
1537 | + font-weight: normal; |
1538 | +} |
1539 | +h0, h2 { |
1540 | + font-size: 24px; |
1541 | + line-height: 1.2; |
1542 | + margin: 14px 0; |
1543 | + font-weight: normal; |
1544 | + display: block; |
1545 | +} |
1546 | +a:hover { |
1547 | + color: #dd4814; |
1548 | + text-decoration: underline; |
1549 | + outline: 0; |
1550 | +} |
1551 | +table, pre { |
1552 | + border-radius: 0; |
1553 | + white-space: pre-wrap; |
1554 | +} |
1555 | +.annotated td { |
1556 | + padding: 0.8em 1em 0.3em; |
1557 | +} |
1558 | +.wrapper { |
1559 | + width: 940px; |
1560 | + margin: 0 auto; |
1561 | +} |
1562 | +.main-content { |
1563 | + width: 668px; |
1564 | + position: relative; |
1565 | + left: 270px; |
1566 | +} |
1567 | +.title { |
1568 | + margin-left: -270px; |
1569 | + margin-top: 30px; |
1570 | + margin-bottom: 50px; |
1571 | +} |
1572 | +.toc { |
1573 | + margin-left: -270px; |
1574 | + font-size: 100%; |
1575 | + margin-bottom: 40px; |
1576 | + padding: 0; |
1577 | + z-index: 2; |
1578 | + position: absolute; |
1579 | + top: 100px; |
1580 | + width: 250px; |
1581 | +} |
1582 | +.breadcrumb { |
1583 | + position: relative; |
1584 | + left: -270px; |
1585 | + top: 30px; |
1586 | + width: auto; |
1587 | + padding-bottom: 30px; |
1588 | + margin-bottom: 30px; |
1589 | + float:left; |
1590 | +} |
1591 | +.breadcrumb li { |
1592 | + float: left; |
1593 | + margin-right: 8px; |
1594 | +} |
1595 | +.breadcrumb a:link, |
1596 | +.breadcrumb a:visited { |
1597 | + color: #AEA79F; |
1598 | +} |
1599 | +.breadcrumb a:after { |
1600 | + content: '\0000a0\0000a0 >'; |
1601 | +} |
1602 | +.title { |
1603 | + margin-top: 50px; |
1604 | + clear:both; |
1605 | +} |
1606 | +.breadcrumb + .toc { |
1607 | + top: 170px; |
1608 | +} |
1609 | +.breadcrumb p { |
1610 | + display: inline; |
1611 | +} |
1612 | + |
1613 | |
1614 | === added file 'documentation/qt-halide.qdocconf' |
1615 | --- documentation/qt-halide.qdocconf 1970-01-01 00:00:00 +0000 |
1616 | +++ documentation/qt-halide.qdocconf 2015-04-09 21:30:48 +0000 |
1617 | @@ -0,0 +1,45 @@ |
1618 | +project = QtHalide |
1619 | +description = Qt Halide Documentation |
1620 | +sourcedirs = ./ |
1621 | +sourcedirs += ../src/QtHalide |
1622 | +headerdirs = ../src/QtHalide |
1623 | +exampledirs += snippets |
1624 | +sources.fileextensions = "*.qdoc *.cpp" |
1625 | +headers.fileextensions = "*.h" |
1626 | +outputdir = html |
1627 | +outputformats = HTML |
1628 | +version = 1.1 |
1629 | +syntaxhighlighting = true |
1630 | +sourceencoding = UTF-8 |
1631 | +outputencoding = UTF-8 |
1632 | + |
1633 | +HTML.templatedir = . |
1634 | +HTML.endheader = "</head>\n" |
1635 | +HTML.nobreadcrumbs = "true" |
1636 | + |
1637 | +HTML.stylesheets = \ |
1638 | + css/reset.css \ |
1639 | + css/qtquick.css \ |
1640 | + css/base.css \ |
1641 | + css/scratch.css |
1642 | + |
1643 | +HTML.headerstyles = \ |
1644 | + "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/reset.css\" />\n" \ |
1645 | + "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/qtquick.css\" />\n" \ |
1646 | + "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/base.css\" />\n" \ |
1647 | + "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/scratch.css\" />\n" |
1648 | + |
1649 | +HTML.postheader = \ |
1650 | + " <div class=\"wrapper\">\n" \ |
1651 | + " <div class=\"main-content\">\n" |
1652 | + |
1653 | +HTML.footer = \ |
1654 | + "</div></div>\n" \ |
1655 | + "<div class=\"shadow\"></div>\n" \ |
1656 | + "<footer>\n" \ |
1657 | + " <div>\n" \ |
1658 | + " <nav role=\"navigation\" class=\"clearfix\">\n" \ |
1659 | + " </nav>\n" \ |
1660 | + " <p>© 2015 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd.</p>\n" \ |
1661 | + " </div>\n" \ |
1662 | + "</footer>\n" |
1663 | |
1664 | === modified file 'src/QtHalide/halide_function.cpp' |
1665 | --- src/QtHalide/halide_function.cpp 2015-04-08 18:49:13 +0000 |
1666 | +++ src/QtHalide/halide_function.cpp 2015-04-09 21:30:48 +0000 |
1667 | @@ -23,6 +23,54 @@ |
1668 | #include "halide_image.h" |
1669 | #include "halide_transform_worker.h" |
1670 | |
1671 | +/*! |
1672 | + \qmltype HalideFunction |
1673 | + \inqmlmodule QtHalide 0.1 |
1674 | + \brief Instantiates a Halide function and allows setting its parameters so that it can be used in a \l HalideTransform. |
1675 | + |
1676 | + Assign a \l name to specify which function generator to use. A suitable |
1677 | + generator needs to be linked to the application or to a library loaded by |
1678 | + the application. If the generator is not compiled ahead of time then it will |
1679 | + be compiled just in time when the HalideFunction is used in any \l HalideTransform. |
1680 | + |
1681 | + To assign parameters to the underlying function you need to define QML |
1682 | + properties on the HalideFunction instance, with types and names matching |
1683 | + the parameters you want to set. You will receive warning messages if you are |
1684 | + missing some properties or use the wrong types. |
1685 | + |
1686 | + For example if we have a generator declared as follows: |
1687 | + |
1688 | + \code |
1689 | + |
1690 | + class Rotation : public HalideGeneratorExtended<Rotation> { |
1691 | + public: |
1692 | + ImageParam input{ Halide::type_of<uint8_t>(), 3, "input" }; |
1693 | + Param<float> angle{ "angle", 1.0 }; |
1694 | + |
1695 | + // ... |
1696 | + |
1697 | + }; |
1698 | + |
1699 | + Halide::RegisterGenerator<Rotation> register_rotation{"rotation"}; |
1700 | + |
1701 | + \endcode |
1702 | + |
1703 | + Then the corresponding QML that insteantiates an HalideFunction using it |
1704 | + should be: |
1705 | + |
1706 | + \qml |
1707 | + |
1708 | + HalideFunction { |
1709 | + name: "rotation" |
1710 | + property HalideImage input |
1711 | + property real angle: 45.0 |
1712 | + } |
1713 | + |
1714 | + \endqml |
1715 | + |
1716 | + If you want to temporarily disable the function, use the \l enabled property. |
1717 | +*/ |
1718 | + |
1719 | HalideFunction::HalideFunction(QObject *parent) : |
1720 | QObject(parent), |
1721 | m_enabled(true), |
1722 | @@ -31,6 +79,13 @@ |
1723 | { |
1724 | } |
1725 | |
1726 | +/*! |
1727 | + \qmlproperty string HalideFunction::name |
1728 | + |
1729 | + Name of the function generator to use. It is usually a fatal error to |
1730 | + use a name that does not correspond to any generator available at runtime |
1731 | + to the current executable. |
1732 | +*/ |
1733 | QString HalideFunction::name() const |
1734 | { |
1735 | return m_name; |
1736 | @@ -45,6 +100,12 @@ |
1737 | } |
1738 | } |
1739 | |
1740 | +/*! |
1741 | + \qmlproperty bool HalideFunction::enabled |
1742 | + |
1743 | + If set to false the function will behave as if it was not present in any |
1744 | + list of functions it is part of within an \l HalideTransform. |
1745 | +*/ |
1746 | bool HalideFunction::enabled() const |
1747 | { |
1748 | return m_enabled; |
1749 | |
1750 | === modified file 'src/QtHalide/halide_function_list_model.cpp' |
1751 | --- src/QtHalide/halide_function_list_model.cpp 2015-04-08 15:48:49 +0000 |
1752 | +++ src/QtHalide/halide_function_list_model.cpp 2015-04-09 21:30:48 +0000 |
1753 | @@ -16,10 +16,32 @@ |
1754 | |
1755 | #include "halide_function_list_model.h" |
1756 | |
1757 | +/*! |
1758 | + \qmltype HalideFunctionListModel |
1759 | + \inqmlmodule QtHalide 0.1 |
1760 | + \brief Allows accessing and manipulating a list of \l HalideFunction instances. |
1761 | + |
1762 | + Add functions to the end of the list by calling \l append or in any location |
1763 | + within by calling \l insert. Shift a function to a different place in the |
1764 | + list by calling \l move. |
1765 | + |
1766 | + Remove a function from the list by calling \l remove or \l clear to remove |
1767 | + all of them in one go. |
1768 | + |
1769 | + Access functions by index using \l get and \l count to know how long the |
1770 | + list is. |
1771 | +*/ |
1772 | + |
1773 | HalideFunctionListModel::HalideFunctionListModel(QObject* parent) : QAbstractListModel(parent) |
1774 | { |
1775 | } |
1776 | |
1777 | +/*! |
1778 | + \qmlmethod HalideFunctionListModel::clear() |
1779 | + |
1780 | + Removes all functions from the list. |
1781 | +*/ |
1782 | + |
1783 | void HalideFunctionListModel::clear() |
1784 | { |
1785 | beginRemoveRows(QModelIndex(), 0, m_list.size() - 1); |
1786 | @@ -28,16 +50,33 @@ |
1787 | Q_EMIT countChanged(); |
1788 | } |
1789 | |
1790 | +/*! |
1791 | + \qmlproperty int HalideFunctionListModel::count |
1792 | + |
1793 | + Returns the number of items in the list. |
1794 | +*/ |
1795 | int HalideFunctionListModel::count() |
1796 | { |
1797 | return m_list.size(); |
1798 | } |
1799 | |
1800 | +/*! |
1801 | + \qmlmethod HalideFunctionListModel::get(row) |
1802 | + |
1803 | + Returns the item at the zero-based index \a row, or null if the index is |
1804 | + out of bounds. |
1805 | +*/ |
1806 | HalideFunction* HalideFunctionListModel::get(int row) |
1807 | { |
1808 | return data(index(row)).value<HalideFunction*>(); |
1809 | } |
1810 | |
1811 | + |
1812 | +/*! |
1813 | + \qmlmethod HalideFunctionListModel::append(function) |
1814 | + |
1815 | + Appends a \a function to the end of the list. |
1816 | +*/ |
1817 | void HalideFunctionListModel::append(HalideFunction* function) |
1818 | { |
1819 | insert(m_list.size(), function); |
1820 | @@ -64,6 +103,13 @@ |
1821 | Q_EMIT countChanged(); |
1822 | } |
1823 | |
1824 | +/*! |
1825 | + \qmlmethod HalideFunctionListModel::insert(index, function) |
1826 | + |
1827 | + Inserts a \a function in the list at the specified zero-based \a index. |
1828 | + If the \a index is is out of bounds then the nearest index within bounds |
1829 | + will be used as the location for the insert operation. |
1830 | +*/ |
1831 | void HalideFunctionListModel::insert(int index, HalideFunction* function) |
1832 | { |
1833 | if (!function) { |
1834 | @@ -80,6 +126,12 @@ |
1835 | Q_EMIT countChanged(); |
1836 | } |
1837 | |
1838 | +/*! |
1839 | + \qmlmethod HalideFunctionListModel::remove(index) |
1840 | + |
1841 | + Removes the function at the specified zero-based \a index from the list, if |
1842 | + the index is not out of bounds. |
1843 | +*/ |
1844 | bool HalideFunctionListModel::remove(int index) |
1845 | { |
1846 | if (index < 0 || index >= m_list.size()) { |
1847 | @@ -94,11 +146,23 @@ |
1848 | return true; |
1849 | } |
1850 | |
1851 | +/*! |
1852 | + \qmlmethod HalideFunctionListModel::remove(function) |
1853 | + |
1854 | + If the specified \a function is in the list, it will be removed from it. |
1855 | +*/ |
1856 | bool HalideFunctionListModel::remove(HalideFunction* function) |
1857 | { |
1858 | return remove(m_list.indexOf(function)); |
1859 | } |
1860 | |
1861 | +/*! |
1862 | + \qmlmethod HalideFunctionListModel::move(from, to) |
1863 | + |
1864 | + Move a function in the list from the index specified by \a from |
1865 | + to the index specified by \a to. |
1866 | + If either of the indexes is out of bounds, no operation is performed. |
1867 | +*/ |
1868 | bool HalideFunctionListModel::move(int from, int to) |
1869 | { |
1870 | if (from < 0 || from >= m_list.size() || to < 0 || to > m_list.size()) { |
1871 | |
1872 | === modified file 'src/QtHalide/halide_image.cpp' |
1873 | --- src/QtHalide/halide_image.cpp 2015-04-08 15:48:49 +0000 |
1874 | +++ src/QtHalide/halide_image.cpp 2015-04-09 21:30:48 +0000 |
1875 | @@ -18,6 +18,22 @@ |
1876 | #include "halide_common.h" |
1877 | #include <QtCore/QDebug> |
1878 | |
1879 | +/*! |
1880 | + \qmltype HalideImage |
1881 | + \inqmlmodule QtHalide 0.1 |
1882 | + \brief HalideImage allows loading images that can be used with QtHalide. |
1883 | + |
1884 | + Specify a \l source and a \l sourceSize to define how the image will be |
1885 | + loaded, then use the \l status property to monitor loading and check for |
1886 | + errors. |
1887 | + |
1888 | + Images loaded with this class can be directly rendered with |
1889 | + \l HalideImageRenderer or passed as input buffers to an \l HalideFunction |
1890 | + (either directly or by setting the \l HalideTransform::input property of a |
1891 | + \l HalideTransform). Please see the documentation on these classes for |
1892 | + usage examples. |
1893 | +*/ |
1894 | + |
1895 | HalideImage::HalideImage(QObject *parent) : |
1896 | QObject(parent), |
1897 | m_componentCompleted(false), |
1898 | @@ -45,16 +61,56 @@ |
1899 | scheduleReloadSource(); |
1900 | } |
1901 | |
1902 | +/*! |
1903 | + \qmlproperty QUrl HalideImage::source |
1904 | + |
1905 | + Path of the image to be loaded. The URL may be absolute, or relative to the |
1906 | + URL of the component. |
1907 | +*/ |
1908 | QUrl HalideImage::source() const |
1909 | { |
1910 | return m_source; |
1911 | } |
1912 | |
1913 | +void HalideImage::setSource(QUrl source) |
1914 | +{ |
1915 | + if (source != m_source) { |
1916 | + m_source = source; |
1917 | + scheduleReloadSource(); |
1918 | + Q_EMIT sourceChanged(); |
1919 | + } |
1920 | +} |
1921 | + |
1922 | +/*! |
1923 | + \qmlproperty QSize HalideImage::sourceSize |
1924 | + |
1925 | + This property sets the actual number of pixels stored for the loaded image |
1926 | + so that large images do not use more memory than necessary. |
1927 | + |
1928 | + If the image's actual size is larger than the sourceSize, the image is |
1929 | + scaled down. If only one dimension of the size is set to greater than 0, |
1930 | + the other dimension is set in proportion to preserve the source image's |
1931 | + aspect ratio. |
1932 | +*/ |
1933 | QSize HalideImage::sourceSize() const |
1934 | { |
1935 | return m_sourceSize; |
1936 | } |
1937 | |
1938 | +void HalideImage::setSourceSize(QSize sourceSize) |
1939 | +{ |
1940 | + if (sourceSize != m_sourceSize) { |
1941 | + m_sourceSize = sourceSize; |
1942 | + scheduleReloadSource(); |
1943 | + Q_EMIT sourceSizeChanged(); |
1944 | + } |
1945 | +} |
1946 | + |
1947 | +/*! |
1948 | + \qmlproperty QSize HalideImage::size |
1949 | + |
1950 | + Returns the actual size of the loaded image. |
1951 | +*/ |
1952 | QSize HalideImage::size() const |
1953 | { |
1954 | if (m_data) { |
1955 | @@ -64,6 +120,15 @@ |
1956 | } |
1957 | } |
1958 | |
1959 | +/*! |
1960 | + \qmlproperty Status HalideImage::status |
1961 | + \value Null no source has been set and no image has been loaded |
1962 | + \value Loading loading the image is in progress |
1963 | + \value Error loading the image failed |
1964 | + \value Ready the image has been successfully loaded |
1965 | + |
1966 | + Returns the loading status of the image. |
1967 | +*/ |
1968 | HalideImage::Status HalideImage::status() const |
1969 | { |
1970 | return m_status; |
1971 | @@ -77,24 +142,6 @@ |
1972 | } |
1973 | } |
1974 | |
1975 | -void HalideImage::setSource(QUrl source) |
1976 | -{ |
1977 | - if (source != m_source) { |
1978 | - m_source = source; |
1979 | - scheduleReloadSource(); |
1980 | - Q_EMIT sourceChanged(); |
1981 | - } |
1982 | -} |
1983 | - |
1984 | -void HalideImage::setSourceSize(QSize sourceSize) |
1985 | -{ |
1986 | - if (sourceSize != m_sourceSize) { |
1987 | - m_sourceSize = sourceSize; |
1988 | - scheduleReloadSource(); |
1989 | - Q_EMIT sourceSizeChanged(); |
1990 | - } |
1991 | -} |
1992 | - |
1993 | void HalideImage::setData(QSharedPointer<HalideImageData> data) |
1994 | { |
1995 | Q_ASSERT_X(!data.isNull(), "HalideImage::setData", "cannot set null data"); |
1996 | |
1997 | === modified file 'src/QtHalide/halide_image_renderer.cpp' |
1998 | --- src/QtHalide/halide_image_renderer.cpp 2015-04-08 15:48:49 +0000 |
1999 | +++ src/QtHalide/halide_image_renderer.cpp 2015-04-09 21:30:48 +0000 |
2000 | @@ -17,6 +17,72 @@ |
2001 | #include "halide_image_renderer.h" |
2002 | #include <QtQuick/QQuickWindow> |
2003 | |
2004 | +/*! |
2005 | + \qmltype HalideImageRenderer |
2006 | + \inqmlmodule QtHalide 0.1 |
2007 | + \brief HalideImageRenderer is a QML Item used to display images loaded by \l HalideImage or the results of a \l HalideTransform. |
2008 | + |
2009 | + Specify the image you want to render with the \l image property. |
2010 | + |
2011 | + The \l fillMode, \l horizontalAlignment and \l verticalAlignment control |
2012 | + how the image is scaled and aligned in case the size of the rendered image |
2013 | + does not match the size of this Item. |
2014 | + |
2015 | + You can use \l HalideImageRenderer for rendering the results of a \l HalideTransform |
2016 | + like this: |
2017 | + |
2018 | + |
2019 | + \qml |
2020 | + |
2021 | + Item { |
2022 | + HalideTransform { |
2023 | + id: transform |
2024 | + live: true |
2025 | + input: HalideImage { |
2026 | + source: "photo.jpg" |
2027 | + } |
2028 | + |
2029 | + HalideFunction { |
2030 | + name: "rotate" |
2031 | + property HalideImage input |
2032 | + property real angle: 45 |
2033 | + } |
2034 | + } |
2035 | + |
2036 | + HalideImageRenderer { |
2037 | + anchors.fill: parent |
2038 | + verticalAlignment: HalideImageRenderer.AlignVCenter |
2039 | + horizontalAlignment: HalideImageRenderer.AlignHCenter |
2040 | + fillMode: HalideImageRenderer.PreserveAspectFit |
2041 | + image: transform.output |
2042 | + } |
2043 | + } |
2044 | + |
2045 | + \endqml |
2046 | + |
2047 | + The example above will render the output of the transform, scale it to fill |
2048 | + the entire rendering area preserving the aspect ratio, then center it within |
2049 | + that area. |
2050 | + |
2051 | + You can also directly render an \l HalideImage, like this: |
2052 | + |
2053 | + \qml |
2054 | + |
2055 | + HalideImageRenderer { |
2056 | + anchors.centerIn: parent |
2057 | + width: image.size.width |
2058 | + height: image.size.height |
2059 | + image: HalideImage { |
2060 | + source: "whatever.jpg" |
2061 | + } |
2062 | + } |
2063 | + |
2064 | + \endqml |
2065 | + |
2066 | + The above example will render the image in its original size, centered |
2067 | + inside the parent. |
2068 | +*/ |
2069 | + |
2070 | HalideImageRenderer::HalideImageRenderer(QQuickItem *parent) : |
2071 | QQuickItem(parent), |
2072 | m_textureNeedsUpdate(true), |
2073 | @@ -183,6 +249,11 @@ |
2074 | return texture; |
2075 | } |
2076 | |
2077 | +/*! |
2078 | + \qmlproperty HalideImage HalideImageRenderer::image |
2079 | + |
2080 | + The image to be rendered. |
2081 | +*/ |
2082 | HalideImage* HalideImageRenderer::image() const |
2083 | { |
2084 | return m_image; |
2085 | @@ -205,6 +276,14 @@ |
2086 | } |
2087 | } |
2088 | |
2089 | +/*! |
2090 | + \qmlproperty FillMode HalideImageRenderer::fillMode |
2091 | + \value PreserveAspectFit scale uniformly to fit without cropping |
2092 | + \value PreserveAspectCrop scale uniformly to fill, cropping if necessary |
2093 | + |
2094 | + Set this property to define what happens when the rendered \l HalideImage |
2095 | + has a different size than this renderer. |
2096 | +*/ |
2097 | HalideImageRenderer::FillMode HalideImageRenderer::fillMode() const |
2098 | { |
2099 | return m_fillMode; |
2100 | @@ -219,6 +298,15 @@ |
2101 | } |
2102 | } |
2103 | |
2104 | +/*! |
2105 | + \qmlproperty HorizontalAlignment HalideImageRenderer::horizontalAlignment |
2106 | + \value AlignLeft align the image to the left |
2107 | + \value AlignRight align the image to the right |
2108 | + \value AlignHCenter center the image horizontally |
2109 | + |
2110 | + If the rendered and scaled image is smaller than the rendering area, |
2111 | + the value of this property decides how it is aligned horizontally within it. |
2112 | +*/ |
2113 | HalideImageRenderer::HorizontalAlignment HalideImageRenderer::horizontalAlignment() const |
2114 | { |
2115 | return m_horizontalAlignment; |
2116 | @@ -233,6 +321,15 @@ |
2117 | } |
2118 | } |
2119 | |
2120 | +/*! |
2121 | + \qmlproperty VerticalAlignment HalideImageRenderer::verticalAlignment |
2122 | + \value AlignTop align the image to the top |
2123 | + \value AlignBottom align the image to the bottom |
2124 | + \value AlignVCenter center the image vertically |
2125 | + |
2126 | + If the rendered and scaled image is smaller than the rendering area, |
2127 | + the value of this property decides how it is aligned vertically within it. |
2128 | +*/ |
2129 | HalideImageRenderer::VerticalAlignment HalideImageRenderer::verticalAlignment() const |
2130 | { |
2131 | return m_verticalAlignment; |
2132 | |
2133 | === modified file 'src/QtHalide/halide_transform.cpp' |
2134 | --- src/QtHalide/halide_transform.cpp 2015-04-08 15:48:49 +0000 |
2135 | +++ src/QtHalide/halide_transform.cpp 2015-04-09 21:30:48 +0000 |
2136 | @@ -25,6 +25,69 @@ |
2137 | #include <QtQuick/QQuickItem> |
2138 | #include <QtConcurrent/QtConcurrent> |
2139 | |
2140 | +/*! |
2141 | + \qmltype HalideTransform |
2142 | + \inqmlmodule QtHalide 0.1 |
2143 | + \brief Transforms an \l HalideImage by applying a chain of \l HalideFunction to it. |
2144 | + |
2145 | + Assign the \l HalideImage that you want to trasnform to the \l input property. |
2146 | + |
2147 | + Instantiate one or more \l HalideFunction and assign them to the \l functions |
2148 | + list model. The model is an instance of \l HalideFunctionListModel and as |
2149 | + such has various methods to allow manipulating and accessing the list. |
2150 | + |
2151 | + The functions will be applied in sequence and the output will be available |
2152 | + through the \l output property. You can then save it to disk with \l saveToFile or |
2153 | + display it using an \l HalideImageRenderer. |
2154 | + |
2155 | + As a convenience, since most functions operate on an input buffer, if a |
2156 | + property of type \l HalideImage named "input" exists on any HalideFunction |
2157 | + in the \l functions list, it will be assigned automatically the output of |
2158 | + the previous function in the list, or the \l HalideTransform's input if it |
2159 | + is the first in the list. |
2160 | + This allows more convenient chaining of functions without having to |
2161 | + explicitly assign the output of each one to the input of the next. |
2162 | + |
2163 | + |
2164 | + For example the following code will produce the correct output, even if the |
2165 | + input parameter of the various HalideFunctions has been left unset. |
2166 | + |
2167 | + \qml |
2168 | + |
2169 | + HalideTransform { |
2170 | + live: true |
2171 | + input: HalideImage { |
2172 | + source: "photo.jpg" |
2173 | + } |
2174 | + |
2175 | + HalideFunction { |
2176 | + name: "rotate" |
2177 | + property HalideImage input |
2178 | + property real angle: 45 |
2179 | + } |
2180 | + |
2181 | + HalideFunction { |
2182 | + name: "saturation" |
2183 | + property HalideImage input |
2184 | + property real saturation: 1.8 |
2185 | + } |
2186 | + } |
2187 | + |
2188 | + \endqml |
2189 | + |
2190 | + Changing any of the parameters on any of the functions in the list, or the |
2191 | + number or order of the items in the list, will cause the HalideTransform to |
2192 | + recompute the transform chain as efficiently as possible. You can also |
2193 | + call \l scheduleUpdate to request the transform to be recomputed. |
2194 | + |
2195 | + While the output is being recomputed the \l updating property will be set |
2196 | + to true. |
2197 | + |
2198 | + If you want to temporarily disable a transform from recomputing, for example |
2199 | + so that you can change several parameters in one go without too many |
2200 | + recomputations, you can set \l live to false while you do so. |
2201 | +*/ |
2202 | + |
2203 | HalideTransform::HalideTransform(QObject *parent) : |
2204 | QObject(parent), |
2205 | m_componentCompleted(false), |
2206 | @@ -83,6 +146,13 @@ |
2207 | } |
2208 | } |
2209 | |
2210 | +/*! |
2211 | + \qmlproperty bool HalideTransform::live |
2212 | + |
2213 | + If set to false the transform will stop recomputing its output in reaction |
2214 | + to changes in the \l functions parameters or order, until set to true |
2215 | + again. |
2216 | +*/ |
2217 | bool HalideTransform::live() const |
2218 | { |
2219 | return m_live; |
2220 | @@ -111,11 +181,23 @@ |
2221 | } |
2222 | } |
2223 | |
2224 | +/*! |
2225 | + \qmlproperty bool HalideTransform::updating |
2226 | + |
2227 | + Set to true while the \l output is being recomputed. |
2228 | +*/ |
2229 | bool HalideTransform::updating() const |
2230 | { |
2231 | return m_updateTimer.isValid(); |
2232 | } |
2233 | |
2234 | + |
2235 | +/*! |
2236 | + \qmlproperty HalideImage HalideTransform::input |
2237 | + |
2238 | + The input of the transform, upon which the \l functions will be applied to |
2239 | + produce the \l output. |
2240 | +*/ |
2241 | HalideImage* HalideTransform::input() const |
2242 | { |
2243 | return m_input; |
2244 | @@ -193,6 +275,13 @@ |
2245 | } |
2246 | } |
2247 | |
2248 | + |
2249 | +/*! |
2250 | + \qmlproperty HalideImage HalideTransform::output |
2251 | + |
2252 | + The output of the transform, that is the product of applying the \l functions |
2253 | + to the \l input image. |
2254 | +*/ |
2255 | HalideImage* HalideTransform::output() const |
2256 | { |
2257 | return m_output; |
2258 | @@ -206,6 +295,12 @@ |
2259 | } |
2260 | } |
2261 | |
2262 | + |
2263 | +/*! |
2264 | + \qmlmethod HalideTransform::scheduleUpdate() |
2265 | + |
2266 | + Requests the transform to recompute its output. |
2267 | +*/ |
2268 | void HalideTransform::scheduleUpdate() |
2269 | { |
2270 | doUpdate(false); |
2271 | @@ -291,6 +386,17 @@ |
2272 | } |
2273 | } |
2274 | |
2275 | +/*! |
2276 | + \qmlmethod HalideTransform::saveToFile(fileName) |
2277 | + |
2278 | + Requests the transform to save its output to disk. The \a fileName |
2279 | + specifies the path of a file relative to the default pictures folder for the |
2280 | + current user. The image format is decided based on the file extension. |
2281 | + |
2282 | + Returns true if the saving process was successfully started. The image is |
2283 | + actually saved to disk asynchronously and there is currently no way to know |
2284 | + if the operation succeeded. |
2285 | +*/ |
2286 | bool HalideTransform::saveToFile(QString fileName) |
2287 | { |
2288 | QString directory = QStandardPaths::writableLocation(QStandardPaths::PicturesLocation); |
2289 | @@ -322,6 +428,18 @@ |
2290 | } |
2291 | } |
2292 | |
2293 | +/*! |
2294 | + \qmlproperty HalideFunctionListModel HalideTransform::functions |
2295 | + |
2296 | + Access the model holding the list of \l HalideFunction that will be applied |
2297 | + to the \l input. |
2298 | + |
2299 | + You can set this property to a QML list of \l HalideFunction |
2300 | + instances or read it to retrieve the \l HalideFunctionListModel and use its |
2301 | + methods to manipulate and access the functions list. |
2302 | + |
2303 | + Set to an empty QML list to clear the model. |
2304 | +*/ |
2305 | QVariant HalideTransform::functions() const |
2306 | { |
2307 | return QVariant::fromValue(m_functionsModel); |
2308 | |
2309 | === modified file 'src/QtHalide/qthalide_qml_plugin.cpp' |
2310 | --- src/QtHalide/qthalide_qml_plugin.cpp 2015-04-08 15:48:49 +0000 |
2311 | +++ src/QtHalide/qthalide_qml_plugin.cpp 2015-04-09 21:30:48 +0000 |
2312 | @@ -23,6 +23,11 @@ |
2313 | #include "halide_image_renderer.h" |
2314 | #include "halide_transform_worker.h" |
2315 | |
2316 | +/*! \qmlmodule QtHalide |
2317 | + |
2318 | + A module allowing to use Halide from QML. |
2319 | +*/ |
2320 | + |
2321 | void QtHalideQmlPlugin::registerTypes(const char *uri) |
2322 | { |
2323 | Q_ASSERT(uri == QLatin1String("QtHalide")); |
"Import Statement: import QtHalide ."
are missing the versions