/usr/share/qt5/doc/qtquickextras/qtquickextras-flat-content-qml.html is in qtquickcontrols5-doc-html 5.5.1-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Content.qml Example File | Qt Quick Extras 5.5</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
<div class="main">
<div class="main-rounded">
<div class="navigationbar">
<ul>
<li>Qt 5.5</li>
<li><a href="qtquickextras-index.html">Qt Quick Extras</a></li>
<li><a href="qtquickextras-flat-example.html">Qt Quick Extras - Flat</a></li>
<li>Content.qml Example File</li>
<li id="buildversion">Qt 5.5.1 Reference Documentation</li>
</ul>
</div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Content.qml Example File</h1>
<span class="subtitle">flat/Content.qml</span>
<!-- $$$flat/Content.qml-description -->
<div class="descr"> <a name="details"></a>
<pre class="qml"><span class="comment">/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/</span>
import QtQuick 2.4
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles.Flat 1.0 as Flat
import QtQuick.Extras 1.4
import QtQuick.XmlListModel 2.0
<span class="type"><a href="../qtquick/qml-qtquick-item.html">Item</a></span> {
<span class="name">anchors</span>.fill: <span class="name">parent</span>
<span class="type"><a href="../qtquick/qml-qtquick-text.html">Text</a></span> {
<span class="name">id</span>: <span class="name">text</span>
<span class="name">visible</span>: <span class="number">false</span>
}
<span class="type"><a href="../qtquick/qml-qtquick-fontmetrics.html">FontMetrics</a></span> {
<span class="name">id</span>: <span class="name">fontMetrics</span>
<span class="name">font</span>.family: <span class="name">Flat</span>.<span class="name">FlatStyle</span>.<span class="name">fontFamily</span>
}
readonly property <span class="type">int</span> <span class="name">layoutSpacing</span>: <span class="name">Math</span>.<span class="name">round</span>(<span class="number">5</span> <span class="operator">*</span> <span class="name">Flat</span>.<span class="name">FlatStyle</span>.<span class="name">scaleFactor</span>)
property <span class="type">var</span> <span class="name">componentModel</span>: [
{ name: <span class="string">"Buttons"</span>, component: <span class="name">buttonsComponent</span> },
{ name: <span class="string">"Calendar"</span>, component: <span class="name">calendarComponent</span> },
{ name: <span class="string">"DelayButton"</span>, component: <span class="name">delayButtonComponent</span> },
{ name: <span class="string">"Dial"</span>, component: <span class="name">dialComponent</span> },
{ name: <span class="string">"Input"</span>, component: <span class="name">inputComponent</span> },
{ name: <span class="string">"PieMenu"</span>, component: <span class="name">pieMenuComponent</span> },
{ name: <span class="string">"Progress"</span>, component: <span class="name">progressComponent</span> },
{ name: <span class="string">"TableView"</span>, component: <span class="name">tableViewComponent</span> },
{ name: <span class="string">"TextArea"</span>, component: <span class="name">textAreaComponent</span> },
{ name: <span class="string">"Tumbler"</span>, component: <span class="name">tumblerComponent</span> }
]
<span class="type"><a href="../qtquick/qml-qtquick-loader.html">Loader</a></span> {
<span class="name">id</span>: <span class="name">componentLoader</span>
<span class="name">anchors</span>.fill: <span class="name">parent</span>
<span class="name">sourceComponent</span>: <span class="name">componentModel</span>[<span class="name">controlData</span>.<span class="name">componentIndex</span>].<span class="name">component</span>
}
property <span class="type"><a href="../qtqml/qml-qtqml-component.html">Component</a></span> <span class="name">buttonsComponent</span>: <span class="name">ScrollView</span> {
<span class="name">id</span>: <span class="name">scrollView</span>
<span class="name">horizontalScrollBarPolicy</span>: <span class="name">Qt</span>.<span class="name">ScrollBarAlwaysOff</span>
<span class="type"><a href="../qtquick/qml-qtquick-flickable.html">Flickable</a></span> {
<span class="name">anchors</span>.fill: <span class="name">parent</span>
<span class="name">contentWidth</span>: <span class="name">viewport</span>.<span class="name">width</span>
<span class="name">contentHeight</span>: <span class="name">buttoncolumn</span>.<span class="name">implicitHeight</span> <span class="operator">+</span> <span class="name">textMargins</span> <span class="operator">*</span> <span class="number">1.5</span>
<span class="type">ColumnLayout</span> {
<span class="name">id</span>: <span class="name">buttoncolumn</span>
<span class="name">anchors</span>.fill: <span class="name">parent</span>
<span class="name">anchors</span>.margins: <span class="name">textMargins</span>
<span class="name">anchors</span>.topMargin: <span class="name">textMargins</span> <span class="operator">/</span> <span class="number">2</span>
<span class="name">spacing</span>: <span class="name">textMargins</span> <span class="operator">/</span> <span class="number">2</span>
<span class="name">enabled</span>: !<span class="name">settingsData</span>.<span class="name">allDisabled</span>
<span class="type">GroupBox</span> {
<span class="name">title</span>: <span class="string">"Button"</span>
<span class="name">checkable</span>: <span class="name">settingsData</span>.<span class="name">checks</span>
<span class="name">flat</span>: !<span class="name">settingsData</span>.<span class="name">frames</span>
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
<span class="type">GridLayout</span> {
<span class="name">columns</span>: <span class="name">Math</span>.<span class="name">max</span>(<span class="number">1</span>, <span class="name">Math</span>.<span class="name">floor</span>(<span class="name">scrollView</span>.<span class="name">width</span> <span class="operator">/</span> <span class="name">button</span>.<span class="name">implicitWidth</span> <span class="operator">-</span> <span class="number">0.5</span>))
<span class="type">Button</span> {
<span class="name">id</span>: <span class="name">button</span>
<span class="name">text</span>: <span class="string">"Normal"</span>
}
<span class="type">Button</span> {
<span class="name">text</span>: <span class="string">"Default"</span>
<span class="name">isDefault</span>: <span class="number">true</span>
}
<span class="type">Button</span> {
<span class="name">text</span>: <span class="string">"Checkable"</span>
<span class="name">checkable</span>: <span class="number">true</span>
}
<span class="type">Button</span> {
<span class="name">text</span>: <span class="string">"Menu"</span>
<span class="name">menu</span>: <span class="name">Menu</span> {
<span class="type">MenuItem</span> { <span class="name">text</span>: <span class="string">"Normal"</span>; <span class="name">shortcut</span>: <span class="string">"Ctrl+N"</span> }
<span class="type">MenuSeparator</span> { }
<span class="type">MenuItem</span> { <span class="name">text</span>: <span class="string">"Checkable 1"</span>; <span class="name">checkable</span>: <span class="number">true</span>; <span class="name">checked</span>: <span class="number">true</span> }
<span class="type">MenuItem</span> { <span class="name">text</span>: <span class="string">"Checkable 2"</span>; <span class="name">checkable</span>: <span class="number">true</span>; <span class="name">checked</span>: <span class="number">true</span> }
<span class="type">MenuSeparator</span> { }
}
<span class="name">visible</span>: <span class="name">Qt</span>.<span class="name">application</span>.<span class="name">supportsMultipleWindows</span>
}
}
}
<span class="type">GroupBox</span> {
<span class="name">title</span>: <span class="string">"RadioButton"</span>
<span class="name">checkable</span>: <span class="name">settingsData</span>.<span class="name">checks</span>
<span class="name">flat</span>: !<span class="name">settingsData</span>.<span class="name">frames</span>
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
<span class="type">ExclusiveGroup</span> { <span class="name">id</span>: <span class="name">radiobuttongroup</span> }
<span class="type">ColumnLayout</span> {
<span class="name">anchors</span>.fill: <span class="name">parent</span>
<span class="type"><a href="../qtquick/qml-qtquick-repeater.html">Repeater</a></span> {
<span class="name">model</span>: [<span class="string">"First"</span>, <span class="string">"Second"</span>, <span class="string">"Third"</span>]
<span class="type">RadioButton</span> {
<span class="name">text</span>: <span class="name">modelData</span>
<span class="name">checked</span>: <span class="name">index</span> <span class="operator">===</span> <span class="number">0</span>
<span class="name">exclusiveGroup</span>: <span class="name">radiobuttongroup</span>
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
}
}
}
}
<span class="type">GroupBox</span> {
<span class="name">title</span>: <span class="string">"CheckBox"</span>
<span class="name">checkable</span>: <span class="name">settingsData</span>.<span class="name">checks</span>
<span class="name">flat</span>: !<span class="name">settingsData</span>.<span class="name">frames</span>
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
<span class="type">ColumnLayout</span> {
<span class="name">anchors</span>.fill: <span class="name">parent</span>
<span class="type"><a href="../qtquick/qml-qtquick-repeater.html">Repeater</a></span> {
<span class="name">model</span>: [<span class="string">"First"</span>, <span class="string">"Second"</span>, <span class="string">"Third"</span>]
<span class="type">CheckBox</span> {
<span class="name">text</span>: <span class="name">modelData</span>
<span class="name">checked</span>: <span class="name">index</span> <span class="operator">===</span> <span class="number">0</span>
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
}
}
}
}
<span class="type">GroupBox</span> {
<span class="name">title</span>: <span class="string">"Switch"</span>
<span class="name">checkable</span>: <span class="name">settingsData</span>.<span class="name">checks</span>
<span class="name">flat</span>: !<span class="name">settingsData</span>.<span class="name">frames</span>
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
<span class="type">ColumnLayout</span> {
<span class="name">anchors</span>.fill: <span class="name">parent</span>
<span class="type"><a href="../qtquick/qml-qtquick-repeater.html">Repeater</a></span> {
<span class="name">model</span>: [<span class="string">"First"</span>, <span class="string">"Second"</span>, <span class="string">"Third"</span>]
<span class="type">RowLayout</span> {
<span class="name">spacing</span>: <span class="name">layoutSpacing</span> <span class="operator">*</span> <span class="number">2</span>
<span class="type">Label</span> {
<span class="name">text</span>: <span class="name">modelData</span>
<span class="name">font</span>.family: <span class="name">Flat</span>.<span class="name">FlatStyle</span>.<span class="name">fontFamily</span>
<span class="name">renderType</span>: <span class="name">Text</span>.<span class="name">QtRendering</span>
<span class="name">Layout</span>.preferredWidth: <span class="name">fontMetrics</span>.<span class="name">advanceWidth</span>(<span class="string">"Second"</span>)
}
<span class="type">Switch</span> { <span class="name">checked</span>: <span class="name">index</span> <span class="operator">==</span> <span class="number">0</span> }
}
}
}
}
<span class="type">GroupBox</span> {
<span class="name">title</span>: <span class="string">"ToggleButton"</span>
<span class="name">checkable</span>: <span class="name">settingsData</span>.<span class="name">checks</span>
<span class="name">flat</span>: !<span class="name">settingsData</span>.<span class="name">frames</span>
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
<span class="type">GridLayout</span> {
<span class="name">columns</span>: <span class="name">Math</span>.<span class="name">max</span>(<span class="number">1</span>, !!<span class="name">children</span>[<span class="number">0</span>] ? <span class="name">Math</span>.<span class="name">floor</span>(<span class="name">scrollView</span>.<span class="name">width</span> <span class="operator">/</span> <span class="name">children</span>[<span class="number">0</span>].<span class="name">implicitWidth</span> <span class="operator">-</span> <span class="number">0.5</span>) : <span class="name">children</span>.<span class="name">length</span>)
<span class="type"><a href="qml-qtquick-extras-togglebutton.html">ToggleButton</a></span> {
<span class="name">text</span>: <span class="string">"Pump 1"</span>
<span class="name">checked</span>: <span class="number">true</span>
}
<span class="type"><a href="qml-qtquick-extras-togglebutton.html">ToggleButton</a></span> {
<span class="name">text</span>: <span class="string">"Pump 2"</span>
<span class="name">checked</span>: <span class="number">false</span>
}
}
}
<span class="type">GroupBox</span> {
<span class="name">title</span>: <span class="string">"StatusIndicator"</span>
<span class="name">checkable</span>: <span class="name">settingsData</span>.<span class="name">checks</span>
<span class="name">flat</span>: !<span class="name">settingsData</span>.<span class="name">frames</span>
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
<span class="type">GridLayout</span> {
<span class="name">columns</span>: <span class="name">Math</span>.<span class="name">max</span>(<span class="number">1</span>, <span class="name">Math</span>.<span class="name">floor</span>(<span class="name">scrollView</span>.<span class="name">width</span> <span class="operator">/</span> <span class="name">recordButton</span>.<span class="name">implicitWidth</span> <span class="operator">-</span> <span class="number">0.5</span>))
<span class="name">columnSpacing</span>: <span class="name">layoutSpacing</span> <span class="operator">*</span> <span class="number">4</span>
<span class="type">Button</span> {
<span class="name">id</span>: <span class="name">recordButton</span>
<span class="name">text</span>: <span class="string">"Record"</span>
<span class="name">Layout</span>.alignment: <span class="name">Qt</span>.<span class="name">AlignTop</span>
<span class="name">onClicked</span>: <span class="name">recordStatusIndicator</span>.<span class="name">active</span> <span class="operator">=</span> !<span class="name">recordStatusIndicator</span>.<span class="name">active</span>
<span class="type"><a href="qml-qtquick-extras-statusindicator.html">StatusIndicator</a></span> {
<span class="name">id</span>: <span class="name">recordStatusIndicator</span>
<span class="name">active</span>: <span class="number">false</span>
<span class="name">anchors</span>.left: <span class="name">parent</span>.<span class="name">left</span>
<span class="name">anchors</span>.leftMargin: <span class="name">Math</span>.<span class="name">max</span>(<span class="number">6</span>, <span class="name">Math</span>.<span class="name">round</span>(<span class="name">text</span>.<span class="name">implicitHeight</span> <span class="operator">*</span> <span class="number">0.4</span>))
<span class="name">anchors</span>.verticalCenter: <span class="name">parent</span>.<span class="name">verticalCenter</span>
<span class="name">rotation</span>: <span class="number">90</span>
}
}
<span class="type">ColumnLayout</span> {
<span class="type"><a href="../qtquick/qml-qtquick-repeater.html">Repeater</a></span> {
<span class="name">model</span>: <span class="number">3</span>
<span class="name">delegate</span>: <span class="name">RowLayout</span> {
<span class="name">Layout</span>.alignment: <span class="name">Qt</span>.<span class="name">AlignCenter</span>
<span class="type"><a href="qml-qtquick-extras-statusindicator.html">StatusIndicator</a></span> {
<span class="name">active</span>: <span class="number">true</span>
<span class="name">color</span>: <span class="string">"#f09116"</span>
}
<span class="type">Label</span> {
<span class="name">text</span>: <span class="string">"Camera "</span> <span class="operator">+</span> (<span class="name">index</span> <span class="operator">+</span> <span class="number">1</span>)
<span class="name">font</span>.family: <span class="name">Flat</span>.<span class="name">FlatStyle</span>.<span class="name">fontFamily</span>
<span class="name">renderType</span>: <span class="name">Text</span>.<span class="name">QtRendering</span>
}
}
}
}
}
}
}
}
}
property <span class="type"><a href="../qtqml/qml-qtqml-component.html">Component</a></span> <span class="name">progressComponent</span>: <span class="name">ScrollView</span> {
<span class="name">id</span>: <span class="name">scrollView</span>
<span class="name">horizontalScrollBarPolicy</span>: <span class="name">Qt</span>.<span class="name">ScrollBarAlwaysOff</span>
<span class="type"><a href="../qtquick/qml-qtquick-flickable.html">Flickable</a></span> {
<span class="name">anchors</span>.fill: <span class="name">parent</span>
<span class="name">contentWidth</span>: <span class="name">viewport</span>.<span class="name">width</span>
<span class="name">contentHeight</span>: <span class="name">progresscolumn</span>.<span class="name">implicitHeight</span> <span class="operator">+</span> <span class="name">textMargins</span> <span class="operator">*</span> <span class="number">1.5</span>
<span class="type">ColumnLayout</span> {
<span class="name">id</span>: <span class="name">progresscolumn</span>
<span class="name">anchors</span>.fill: <span class="name">parent</span>
<span class="name">anchors</span>.leftMargin: <span class="name">textMargins</span>
<span class="name">anchors</span>.rightMargin: <span class="name">textMargins</span>
<span class="name">anchors</span>.bottomMargin: <span class="name">textMargins</span>
<span class="name">anchors</span>.topMargin: <span class="name">textMargins</span> <span class="operator">/</span> <span class="number">2</span>
<span class="name">spacing</span>: <span class="name">textMargins</span> <span class="operator">/</span> <span class="number">2</span>
<span class="name">enabled</span>: !<span class="name">settingsData</span>.<span class="name">allDisabled</span>
<span class="type">GroupBox</span> {
<span class="name">title</span>: <span class="string">"BusyIndicator"</span>
<span class="name">checkable</span>: <span class="name">settingsData</span>.<span class="name">checks</span>
<span class="name">flat</span>: !<span class="name">settingsData</span>.<span class="name">frames</span>
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
<span class="type">BusyIndicator</span> {
<span class="name">id</span>: <span class="name">busyindicator</span>
<span class="name">anchors</span>.centerIn: <span class="name">parent</span>
<span class="name">running</span>: <span class="name">scrollView</span>.<span class="name">visible</span>
}
}
<span class="type">GroupBox</span> {
<span class="name">title</span>: <span class="string">"ProgressBar"</span>
<span class="name">checkable</span>: <span class="name">settingsData</span>.<span class="name">checks</span>
<span class="name">flat</span>: !<span class="name">settingsData</span>.<span class="name">frames</span>
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
<span class="type">ColumnLayout</span> {
<span class="name">anchors</span>.fill: <span class="name">parent</span>
<span class="type">ProgressBar</span> {
<span class="name">value</span>: <span class="name">slider</span>.<span class="name">value</span>
<span class="name">maximumValue</span>: <span class="name">slider</span>.<span class="name">maximumValue</span>
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
}
<span class="type">ProgressBar</span> {
<span class="name">indeterminate</span>: <span class="number">true</span>
<span class="name">value</span>: <span class="name">slider</span>.<span class="name">value</span>
<span class="name">maximumValue</span>: <span class="name">slider</span>.<span class="name">maximumValue</span>
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
}
}
}
<span class="type">GroupBox</span> {
<span class="name">title</span>: <span class="string">"Slider"</span>
<span class="name">checkable</span>: <span class="name">settingsData</span>.<span class="name">checks</span>
<span class="name">flat</span>: !<span class="name">settingsData</span>.<span class="name">frames</span>
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
<span class="type">ColumnLayout</span> {
<span class="name">anchors</span>.fill: <span class="name">parent</span>
<span class="type">Slider</span> {
<span class="name">id</span>: <span class="name">slider</span>
<span class="comment">// TODO: can't use maximumValue / 2 here, otherwise the gauges</span>
<span class="comment">// initially show up as empty; find out why.</span>
<span class="name">value</span>: <span class="number">50</span>
<span class="comment">// If we use the default value of 1 here, we run into QTBUG-42358,</span>
<span class="comment">// even though that report specifically uses 100 as an example...</span>
<span class="name">maximumValue</span>: <span class="number">100</span>
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
}
}
}
<span class="type">GroupBox</span> {
<span class="name">title</span>: <span class="string">"Gauge"</span>
<span class="name">checkable</span>: <span class="name">settingsData</span>.<span class="name">checks</span>
<span class="name">flat</span>: !<span class="name">settingsData</span>.<span class="name">frames</span>
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
<span class="type"><a href="qml-qtquick-extras-gauge.html">Gauge</a></span> {
<span class="name">id</span>: <span class="name">gauge</span>
<span class="name">value</span>: <span class="name">slider</span>.<span class="name">value</span> <span class="operator">*</span> <span class="number">1.4</span>
<span class="name">orientation</span>: <span class="name">window</span>.<span class="name">width</span> <span class="operator"><</span> <span class="name">window</span>.<span class="name">height</span> ? <span class="name">Qt</span>.<span class="name">Vertical</span> : <span class="name">Qt</span>.<span class="name">Horizontal</span>
<span class="name">minimumValue</span>: <span class="name">slider</span>.<span class="name">minimumValue</span> <span class="operator">*</span> <span class="number">1.4</span>
<span class="name">maximumValue</span>: <span class="name">slider</span>.<span class="name">maximumValue</span> <span class="operator">*</span> <span class="number">1.4</span>
<span class="name">tickmarkStepSize</span>: <span class="number">20</span>
<span class="name">anchors</span>.centerIn: <span class="name">parent</span>
}
}
<span class="type">GroupBox</span> {
<span class="name">title</span>: <span class="string">"CircularGauge"</span>
<span class="name">checkable</span>: <span class="name">settingsData</span>.<span class="name">checks</span>
<span class="name">flat</span>: !<span class="name">settingsData</span>.<span class="name">frames</span>
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
<span class="name">Layout</span>.minimumWidth: <span class="number">0</span>
<span class="type"><a href="qml-qtquick-extras-circulargauge.html">CircularGauge</a></span> {
<span class="name">id</span>: <span class="name">circularGauge</span>
<span class="name">value</span>: <span class="name">slider</span>.<span class="name">value</span> <span class="operator">*</span> <span class="number">3.2</span>
<span class="name">minimumValue</span>: <span class="name">slider</span>.<span class="name">minimumValue</span> <span class="operator">*</span> <span class="number">3.2</span>
<span class="name">maximumValue</span>: <span class="name">slider</span>.<span class="name">maximumValue</span> <span class="operator">*</span> <span class="number">3.2</span>
<span class="name">anchors</span>.centerIn: <span class="name">parent</span>
<span class="name">width</span>: <span class="name">Math</span>.<span class="name">min</span>(<span class="name">implicitWidth</span>, <span class="name">parent</span>.<span class="name">width</span>)
<span class="name">height</span>: <span class="name">Math</span>.<span class="name">min</span>(<span class="name">implicitHeight</span>, <span class="name">parent</span>.<span class="name">height</span>)
<span class="name">style</span>: <span class="name">Flat</span>.CircularGaugeStyle {
<span class="name">tickmarkStepSize</span>: <span class="number">20</span>
<span class="name">labelStepSize</span>: <span class="number">40</span>
<span class="name">minorTickmarkCount</span>: <span class="number">2</span>
}
<span class="type"><a href="../qtquick/qml-qtquick-column.html">Column</a></span> {
<span class="name">anchors</span>.centerIn: <span class="name">parent</span>
<span class="type">Label</span> {
<span class="name">text</span>: <span class="name">Math</span>.<span class="name">floor</span>(<span class="name">circularGauge</span>.<span class="name">value</span>)
<span class="name">anchors</span>.horizontalCenter: <span class="name">parent</span>.<span class="name">horizontalCenter</span>
<span class="name">renderType</span>: <span class="name">Text</span>.<span class="name">QtRendering</span>
<span class="name">font</span>.pixelSize: <span class="name">unitLabel</span>.<span class="name">font</span>.<span class="name">pixelSize</span> <span class="operator">*</span> <span class="number">2</span>
<span class="name">font</span>.family: <span class="name">Flat</span>.<span class="name">FlatStyle</span>.<span class="name">fontFamily</span>
<span class="name">font</span>.weight: <span class="name">Font</span>.<span class="name">Light</span>
}
<span class="type">Label</span> {
<span class="name">id</span>: <span class="name">unitLabel</span>
<span class="name">text</span>: <span class="string">"km/h"</span>
<span class="name">renderType</span>: <span class="name">Text</span>.<span class="name">QtRendering</span>
<span class="name">font</span>.family: <span class="name">Flat</span>.<span class="name">FlatStyle</span>.<span class="name">fontFamily</span>
<span class="name">anchors</span>.horizontalCenter: <span class="name">parent</span>.<span class="name">horizontalCenter</span>
}
}
}
}
}
}
}
property <span class="type"><a href="../qtqml/qml-qtqml-component.html">Component</a></span> <span class="name">inputComponent</span>: <span class="name">ScrollView</span> {
<span class="name">id</span>: <span class="name">scrollView</span>
<span class="name">horizontalScrollBarPolicy</span>: <span class="name">Qt</span>.<span class="name">ScrollBarAlwaysOff</span>
<span class="type"><a href="../qtquick/qml-qtquick-flickable.html">Flickable</a></span> {
<span class="name">anchors</span>.fill: <span class="name">parent</span>
<span class="name">contentWidth</span>: <span class="name">viewport</span>.<span class="name">width</span>
<span class="name">contentHeight</span>: <span class="name">inputcolumn</span>.<span class="name">implicitHeight</span> <span class="operator">+</span> <span class="name">textMargins</span> <span class="operator">*</span> <span class="number">1.5</span>
<span class="type">ColumnLayout</span> {
<span class="name">id</span>: <span class="name">inputcolumn</span>
<span class="name">anchors</span>.fill: <span class="name">parent</span>
<span class="name">anchors</span>.margins: <span class="name">textMargins</span>
<span class="name">spacing</span>: <span class="name">textMargins</span> <span class="operator">/</span> <span class="number">2</span>
<span class="name">enabled</span>: !<span class="name">settingsData</span>.<span class="name">allDisabled</span>
<span class="type">GroupBox</span> {
<span class="name">title</span>: <span class="string">"TextField"</span>
<span class="name">checkable</span>: <span class="name">settingsData</span>.<span class="name">checks</span>
<span class="name">flat</span>: !<span class="name">settingsData</span>.<span class="name">frames</span>
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
<span class="type">ColumnLayout</span> {
<span class="name">anchors</span>.fill: <span class="name">parent</span>
<span class="type">TextField</span> {
<span class="name">z</span>: <span class="number">1</span>
<span class="name">placeholderText</span>: <span class="string">"TextField"</span>
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
}
<span class="type">TextField</span> {
<span class="name">placeholderText</span>: <span class="string">"Password"</span>
<span class="name">echoMode</span>: <span class="name">TextInput</span>.<span class="name">Password</span> <span class="comment">// TODO: PasswordEchoOnEdit</span>
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
}
}
}
<span class="type">GroupBox</span> {
<span class="name">title</span>: <span class="string">"ComboBox"</span>
<span class="name">checkable</span>: <span class="name">settingsData</span>.<span class="name">checks</span>
<span class="name">flat</span>: !<span class="name">settingsData</span>.<span class="name">frames</span>
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
<span class="name">visible</span>: <span class="name">Qt</span>.<span class="name">application</span>.<span class="name">supportsMultipleWindows</span>
<span class="type">ColumnLayout</span> {
<span class="name">anchors</span>.fill: <span class="name">parent</span>
<span class="type">ComboBox</span> {
<span class="name">model</span>: [<span class="string">"Option 1"</span>, <span class="string">"Option 2"</span>, <span class="string">"Option 3"</span>]
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
}
<span class="type">ComboBox</span> {
<span class="name">editable</span>: <span class="number">true</span>
<span class="name">model</span>: <span class="name">ListModel</span> {
<span class="name">id</span>: <span class="name">combomodel</span>
<span class="type"><a href="../qtqml/qml-qtqml-models-listelement.html">ListElement</a></span> { <span class="name">text</span>: <span class="string">"Option 1"</span> }
<span class="type"><a href="../qtqml/qml-qtqml-models-listelement.html">ListElement</a></span> { <span class="name">text</span>: <span class="string">"Option 2"</span> }
<span class="type"><a href="../qtqml/qml-qtqml-models-listelement.html">ListElement</a></span> { <span class="name">text</span>: <span class="string">"Option 3"</span> }
}
<span class="name">onAccepted</span>: {
<span class="keyword">if</span> (<span class="name">find</span>(<span class="name">currentText</span>) <span class="operator">===</span> -<span class="number">1</span>) {
<span class="name">combomodel</span>.<span class="name">append</span>({text: <span class="name">editText</span>})
<span class="name">currentIndex</span> <span class="operator">=</span> <span class="name">find</span>(<span class="name">editText</span>)
}
}
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
}
}
}
<span class="type">GroupBox</span> {
<span class="name">title</span>: <span class="string">"SpinBox"</span>
<span class="name">checkable</span>: <span class="name">settingsData</span>.<span class="name">checks</span>
<span class="name">flat</span>: !<span class="name">settingsData</span>.<span class="name">frames</span>
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
<span class="type">GridLayout</span> {
<span class="name">anchors</span>.fill: <span class="name">parent</span>
<span class="name">columns</span>: <span class="name">Math</span>.<span class="name">max</span>(<span class="number">1</span>, <span class="name">Math</span>.<span class="name">floor</span>(<span class="name">scrollView</span>.<span class="name">width</span> <span class="operator">/</span> <span class="name">spinbox</span>.<span class="name">implicitWidth</span> <span class="operator">-</span> <span class="number">0.5</span>))
<span class="type">SpinBox</span> {
<span class="name">id</span>: <span class="name">spinbox</span>
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
}
<span class="type">SpinBox</span> {
<span class="name">decimals</span>: <span class="number">1</span>
<span class="name">Layout</span>.fillWidth: <span class="number">true</span>
}
}
}
}
}
}
<span class="type"><a href="../qtqml/qml-qtqml-component.html">Component</a></span> {
<span class="name">id</span>: <span class="name">tableViewComponent</span>
<span class="type">TableView</span> {
<span class="name">id</span>: <span class="name">view</span>
<span class="name">enabled</span>: !<span class="name">settingsData</span>.<span class="name">allDisabled</span>
<span class="type">TableViewColumn</span> {
<span class="name">role</span>: <span class="string">"title"</span>
<span class="name">title</span>: <span class="string">"Title"</span>
<span class="name">width</span>: <span class="name">view</span>.<span class="name">width</span> <span class="operator">/</span> <span class="number">2</span>
<span class="name">resizable</span>: <span class="number">false</span>
<span class="name">movable</span>: <span class="number">false</span>
}
<span class="type">TableViewColumn</span> {
<span class="name">role</span>: <span class="string">"author"</span>
<span class="name">title</span>: <span class="string">"Author"</span>
<span class="name">width</span>: <span class="name">view</span>.<span class="name">width</span> <span class="operator">/</span> <span class="number">2</span>
<span class="name">resizable</span>: <span class="number">false</span>
<span class="name">movable</span>: <span class="number">false</span>
}
<span class="name">frameVisible</span>: <span class="number">false</span>
<span class="name">backgroundVisible</span>: <span class="number">true</span>
<span class="name">alternatingRowColors</span>: <span class="number">false</span>
<span class="name">model</span>: <span class="name">ListModel</span> {
<span class="type"><a href="../qtqml/qml-qtqml-models-listelement.html">ListElement</a></span> {
<span class="name">title</span>: <span class="string">"Moby-Dick"</span>
<span class="name">author</span>: <span class="string">"Herman Melville"</span>
}
<span class="type"><a href="../qtqml/qml-qtqml-models-listelement.html">ListElement</a></span> {
<span class="name">title</span>: <span class="string">"The Adventures of Tom Sawyer"</span>
<span class="name">author</span>: <span class="string">"Mark Twain"</span>
}
<span class="type"><a href="../qtqml/qml-qtqml-models-listelement.html">ListElement</a></span> {
<span class="name">title</span>: <span class="string">"Cat���s Cradle"</span>
<span class="name">author</span>: <span class="string">"Kurt Vonnegut"</span>
}
<span class="type"><a href="../qtqml/qml-qtqml-models-listelement.html">ListElement</a></span> {
<span class="name">title</span>: <span class="string">"Farenheit 451"</span>
<span class="name">author</span>: <span class="string">"Ray Bradbury"</span>
}
<span class="type"><a href="../qtqml/qml-qtqml-models-listelement.html">ListElement</a></span> {
<span class="name">title</span>: <span class="string">"It"</span>
<span class="name">author</span>: <span class="string">"Stephen King"</span>
}
<span class="type"><a href="../qtqml/qml-qtqml-models-listelement.html">ListElement</a></span> {
<span class="name">title</span>: <span class="string">"On the Road"</span>
<span class="name">author</span>: <span class="string">"Jack Kerouac"</span>
}
<span class="type"><a href="../qtqml/qml-qtqml-models-listelement.html">ListElement</a></span> {
<span class="name">title</span>: <span class="string">"Of Mice and Men"</span>
<span class="name">author</span>: <span class="string">"John Steinbeck"</span>
}
<span class="type"><a href="../qtqml/qml-qtqml-models-listelement.html">ListElement</a></span> {
<span class="name">title</span>: <span class="string">"Do Androids Dream of Electric Sheep?"</span>
<span class="name">author</span>: <span class="string">"Philip K. Dick"</span>
}
<span class="type"><a href="../qtqml/qml-qtqml-models-listelement.html">ListElement</a></span> {
<span class="name">title</span>: <span class="string">"Uncle Tom���s Cabin"</span>
<span class="name">author</span>: <span class="string">"Harriet Beecher Stowe"</span>
}
<span class="type"><a href="../qtqml/qml-qtqml-models-listelement.html">ListElement</a></span> {
<span class="name">title</span>: <span class="string">"The Call of the Wild"</span>
<span class="name">author</span>: <span class="string">"Jack London"</span>
}
<span class="type"><a href="../qtqml/qml-qtqml-models-listelement.html">ListElement</a></span> {
<span class="name">title</span>: <span class="string">"The Old Man and the Sea"</span>
<span class="name">author</span>: <span class="string">"Ernest Hemingway"</span>
}
<span class="type"><a href="../qtqml/qml-qtqml-models-listelement.html">ListElement</a></span> {
<span class="name">title</span>: <span class="string">"A Streetcar Named Desire"</span>
<span class="name">author</span>: <span class="string">"Tennessee Williams"</span>
}
<span class="type"><a href="../qtqml/qml-qtqml-models-listelement.html">ListElement</a></span> {
<span class="name">title</span>: <span class="string">"Catch-22"</span>
<span class="name">author</span>: <span class="string">"Joseph Heller"</span>
}
<span class="type"><a href="../qtqml/qml-qtqml-models-listelement.html">ListElement</a></span> {
<span class="name">title</span>: <span class="string">"One Flew Over the Cuckoo���s Nest"</span>
<span class="name">author</span>: <span class="string">"Ken Kesey"</span>
}
<span class="type"><a href="../qtqml/qml-qtqml-models-listelement.html">ListElement</a></span> {
<span class="name">title</span>: <span class="string">"The Murders in the Rue Morgue"</span>
<span class="name">author</span>: <span class="string">"Edgar Allan Poe"</span>
}
<span class="type"><a href="../qtqml/qml-qtqml-models-listelement.html">ListElement</a></span> {
<span class="name">title</span>: <span class="string">"Breakfast at Tiffany���s"</span>
<span class="name">author</span>: <span class="string">"Truman Capote"</span>
}
<span class="type"><a href="../qtqml/qml-qtqml-models-listelement.html">ListElement</a></span> {
<span class="name">title</span>: <span class="string">"Death of a Salesman"</span>
<span class="name">author</span>: <span class="string">"Arthur Miller"</span>
}
<span class="type"><a href="../qtqml/qml-qtqml-models-listelement.html">ListElement</a></span> {
<span class="name">title</span>: <span class="string">"Post Office"</span>
<span class="name">author</span>: <span class="string">"Charles Bukowski"</span>
}
<span class="type"><a href="../qtqml/qml-qtqml-models-listelement.html">ListElement</a></span> {
<span class="name">title</span>: <span class="string">"Herbert West���Reanimator"</span>
<span class="name">author</span>: <span class="string">"H. P. Lovecraft"</span>
}
}
}
}
<span class="type"><a href="../qtqml/qml-qtqml-component.html">Component</a></span> {
<span class="name">id</span>: <span class="name">calendarComponent</span>
<span class="type"><a href="../qtquick/qml-qtquick-item.html">Item</a></span> {
<span class="name">enabled</span>: !<span class="name">settingsData</span>.<span class="name">allDisabled</span>
<span class="type">Calendar</span> {
<span class="name">anchors</span>.centerIn: <span class="name">parent</span>
<span class="name">weekNumbersVisible</span>: <span class="number">true</span>
<span class="name">frameVisible</span>: <span class="name">settingsData</span>.<span class="name">frames</span>
}
}
}
<span class="type"><a href="../qtqml/qml-qtqml-component.html">Component</a></span> {
<span class="name">id</span>: <span class="name">textAreaComponent</span>
<span class="type">TextArea</span> {
<span class="name">enabled</span>: !<span class="name">settingsData</span>.<span class="name">allDisabled</span>
<span class="name">frameVisible</span>: <span class="number">false</span>
<span class="name">flickableItem</span>.flickableDirection: <span class="name">Flickable</span>.<span class="name">VerticalFlick</span>
<span class="name">text</span>: <span class="string">"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum quis justo a sem faucibus mattis nec vitae nisi. Fusce fringilla nulla a tellus vehicula sodales. Etiam volutpat suscipit erat vitae adipiscing. Sed vestibulum massa nisl, eget posuere urna porta ac. Morbi at nunc ligula. Cras et mauris aliquet ligula sodales suscipit eget imperdiet augue. Ut eget dui eu magna malesuada imperdiet. Donec imperdiet urna eu consequat ornare. Cras at metus tristique, ullamcorper nisl ut, faucibus mauris. Fusce in euismod arcu. Donec tristique rutrum porta. Praesent mattis ac tortor quis scelerisque. Integer luctus nulla ut lacinia tempus."</span>
}
}
<span class="type"><a href="../qtqml/qml-qtqml-component.html">Component</a></span> {
<span class="name">id</span>: <span class="name">pieMenuComponent</span>
<span class="type"><a href="../qtquick/qml-qtquick-item.html">Item</a></span> {
<span class="name">enabled</span>: !<span class="name">settingsData</span>.<span class="name">allDisabled</span>
<span class="type"><a href="../qtquick/qml-qtquick-column.html">Column</a></span> {
<span class="name">anchors</span>.fill: <span class="name">parent</span>
<span class="name">anchors</span>.bottom: <span class="name">parent</span>.<span class="name">bottom</span>
<span class="name">anchors</span>.bottomMargin: <span class="name">controlData</span>.<span class="name">textMargins</span>
<span class="name">spacing</span>: <span class="name">Math</span>.<span class="name">round</span>(<span class="name">controlData</span>.<span class="name">textMargins</span> <span class="operator">*</span> <span class="number">0.5</span>)
<span class="type"><a href="../qtquick/qml-qtquick-image.html">Image</a></span> {
<span class="name">id</span>: <span class="name">pieMenuImage</span>
<span class="name">source</span>: <span class="string">"qrc:/images/piemenu-image-rgb.jpg"</span>
<span class="name">fillMode</span>: <span class="name">Image</span>.<span class="name">PreserveAspectFit</span>
<span class="name">width</span>: <span class="name">parent</span>.<span class="name">width</span>
<span class="name">height</span>: <span class="name">Math</span>.<span class="name">min</span>((<span class="name">width</span> <span class="operator">/</span> <span class="name">sourceSize</span>.<span class="name">width</span>) <span class="operator">*</span> <span class="name">sourceSize</span>.<span class="name">height</span>, (<span class="name">parent</span>.<span class="name">height</span> <span class="operator">-</span> <span class="name">parent</span>.<span class="name">spacing</span>) <span class="operator">*</span> <span class="number">0.88</span>)
}
<span class="type"><a href="../qtquick/qml-qtquick-item.html">Item</a></span> {
<span class="name">width</span>: <span class="name">parent</span>.<span class="name">width</span>
<span class="name">height</span>: <span class="name">parent</span>.<span class="name">height</span> <span class="operator">-</span> <span class="name">pieMenuImage</span>.<span class="name">height</span> <span class="operator">-</span> <span class="name">parent</span>.<span class="name">spacing</span>
<span class="type"><a href="../qtquick/qml-qtquick-text.html">Text</a></span> {
<span class="name">id</span>: <span class="name">instructionText</span>
<span class="name">anchors</span>.fill: <span class="name">parent</span>
<span class="name">anchors</span>.leftMargin: <span class="name">controlData</span>.<span class="name">textMargins</span>
<span class="name">anchors</span>.rightMargin: <span class="name">controlData</span>.<span class="name">textMargins</span>
<span class="name">horizontalAlignment</span>: <span class="name">Text</span>.<span class="name">AlignHCenter</span>
<span class="name">verticalAlignment</span>: <span class="name">Text</span>.<span class="name">AlignVCenter</span>
<span class="name">text</span>: <span class="string">"Tap and hold to open menu"</span>
<span class="name">font</span>.family: <span class="name">Flat</span>.<span class="name">FlatStyle</span>.<span class="name">fontFamily</span>
<span class="name">font</span>.pixelSize: <span class="name">Math</span>.<span class="name">round</span>(<span class="number">20</span> <span class="operator">*</span> <span class="name">Flat</span>.<span class="name">FlatStyle</span>.<span class="name">scaleFactor</span>)
<span class="name">fontSizeMode</span>: <span class="name">Text</span>.<span class="name">Fit</span>
<span class="name">color</span>: <span class="name">Flat</span>.<span class="name">FlatStyle</span>.<span class="name">lightFrameColor</span>
}
}
}
<span class="type"><a href="../qtquick/qml-qtquick-mousearea.html">MouseArea</a></span> {
<span class="name">id</span>: <span class="name">mouseArea</span>
<span class="name">anchors</span>.fill: <span class="name">parent</span>
<span class="name">onPressAndHold</span>: <span class="name">pieMenu</span>.<span class="name">popup</span>(<span class="name">mouse</span>.<span class="name">x</span>, <span class="name">mouse</span>.<span class="name">y</span>)
}
<span class="type"><a href="qml-qtquick-extras-piemenu.html">PieMenu</a></span> {
<span class="name">id</span>: <span class="name">pieMenu</span>
<span class="name">triggerMode</span>: <span class="name">TriggerMode</span>.<span class="name">TriggerOnClick</span>
<span class="type">MenuItem</span> {
<span class="name">iconSource</span>: <span class="string">"qrc:/images/piemenu-rgb-"</span> <span class="operator">+</span> (<span class="name">pieMenu</span>.<span class="name">currentIndex</span> <span class="operator">===</span> <span class="number">0</span> ? <span class="string">"pressed"</span> : <span class="string">"normal"</span>) <span class="operator">+</span> <span class="string">".png"</span>
<span class="name">onTriggered</span>: <span class="name">pieMenuImage</span>.<span class="name">source</span> <span class="operator">=</span> <span class="string">"qrc:/images/piemenu-image-rgb.jpg"</span>
}
<span class="type">MenuItem</span> {
<span class="name">iconSource</span>: <span class="string">"qrc:/images/piemenu-bw-"</span> <span class="operator">+</span> (<span class="name">pieMenu</span>.<span class="name">currentIndex</span> <span class="operator">===</span> <span class="number">1</span> ? <span class="string">"pressed"</span> : <span class="string">"normal"</span>) <span class="operator">+</span> <span class="string">".png"</span>
<span class="name">onTriggered</span>: <span class="name">pieMenuImage</span>.<span class="name">source</span> <span class="operator">=</span> <span class="string">"qrc:/images/piemenu-image-bw.jpg"</span>
}
<span class="type">MenuItem</span> {
<span class="name">iconSource</span>: <span class="string">"qrc:/images/piemenu-sepia-"</span> <span class="operator">+</span> (<span class="name">pieMenu</span>.<span class="name">currentIndex</span> <span class="operator">===</span> <span class="number">2</span> ? <span class="string">"pressed"</span> : <span class="string">"normal"</span>) <span class="operator">+</span> <span class="string">".png"</span>
<span class="name">onTriggered</span>: <span class="name">pieMenuImage</span>.<span class="name">source</span> <span class="operator">=</span> <span class="string">"qrc:/images/piemenu-image-sepia.jpg"</span>
}
}
}
}
<span class="type"><a href="../qtqml/qml-qtqml-component.html">Component</a></span> {
<span class="name">id</span>: <span class="name">delayButtonComponent</span>
<span class="type"><a href="../qtquick/qml-qtquick-item.html">Item</a></span> {
<span class="name">enabled</span>: !<span class="name">settingsData</span>.<span class="name">allDisabled</span>
<span class="type"><a href="qml-qtquick-extras-delaybutton.html">DelayButton</a></span> {
<span class="name">text</span>: <span class="name">progress</span> <span class="operator"><</span> <span class="number">1</span> ? <span class="string">"START"</span> : <span class="string">"STOP"</span>
<span class="name">anchors</span>.centerIn: <span class="name">parent</span>
}
}
}
<span class="type"><a href="../qtqml/qml-qtqml-component.html">Component</a></span> {
<span class="name">id</span>: <span class="name">dialComponent</span>
<span class="type"><a href="../qtquick/qml-qtquick-item.html">Item</a></span> {
<span class="name">enabled</span>: !<span class="name">settingsData</span>.<span class="name">allDisabled</span>
<span class="type"><a href="qml-qtquick-extras-dial.html">Dial</a></span> {
<span class="name">anchors</span>.centerIn: <span class="name">parent</span>
}
}
}
<span class="type"><a href="../qtqml/qml-qtqml-component.html">Component</a></span> {
<span class="name">id</span>: <span class="name">tumblerComponent</span>
<span class="type"><a href="../qtquick/qml-qtquick-item.html">Item</a></span> {
<span class="name">enabled</span>: !<span class="name">settingsData</span>.<span class="name">allDisabled</span>
<span class="type"><a href="qml-qtquick-extras-tumbler.html">Tumbler</a></span> {
<span class="name">anchors</span>.centerIn: <span class="name">parent</span>
<span class="type"><a href="qml-qtquick-extras-tumblercolumn.html">TumblerColumn</a></span> {
<span class="name">model</span>: {
var <span class="name">hours</span> = [];
<span class="keyword">for</span> (<span class="keyword">var</span> <span class="name">i</span> = <span class="number">1</span>; <span class="name">i</span> <span class="operator"><=</span> <span class="number">24</span>; ++<span class="name">i</span>)
<span class="name">hours</span>.<span class="name">push</span>(<span class="name">i</span> <span class="operator"><</span> <span class="number">10</span> ? <span class="string">"0"</span> <span class="operator">+</span> <span class="name">i</span> : <span class="name">i</span>);
<span class="name">hours</span>;
}
}
<span class="type"><a href="qml-qtquick-extras-tumblercolumn.html">TumblerColumn</a></span> {
<span class="name">model</span>: {
var <span class="name">minutes</span> = [];
<span class="keyword">for</span> (<span class="keyword">var</span> <span class="name">i</span> = <span class="number">0</span>; <span class="name">i</span> <span class="operator"><</span> <span class="number">60</span>; ++<span class="name">i</span>)
<span class="name">minutes</span>.<span class="name">push</span>(<span class="name">i</span> <span class="operator"><</span> <span class="number">10</span> ? <span class="string">"0"</span> <span class="operator">+</span> <span class="name">i</span> : <span class="name">i</span>);
<span class="name">minutes</span>;
}
}
}
}
}
}</pre>
</div>
<!-- @@@flat/Content.qml -->
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2015 The Qt Company Ltd.
Documentation contributions included herein are the copyrights of
their respective owners.<br> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br> Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners. </p>
</div>
</body>
</html>
|