aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick')
-rw-r--r--examples/quick/.prev_CMakeLists.txt40
-rw-r--r--examples/quick/CMakeLists.txt81
-rw-r--r--examples/quick/animation/CMakeLists.txt181
-rw-r--r--examples/quick/animation/animation.qml55
-rw-r--r--examples/quick/animation/animation.qmlproject1
-rw-r--r--examples/quick/animation/animation.qrc2
-rw-r--r--examples/quick/animation/basics/animators.qml53
-rw-r--r--examples/quick/animation/basics/color-animation.qml55
-rw-r--r--examples/quick/animation/basics/property-animation.qml55
-rw-r--r--examples/quick/animation/behaviors/FocusRect.qml53
-rw-r--r--examples/quick/animation/behaviors/SideRect.qml53
-rw-r--r--examples/quick/animation/behaviors/behavior-example.qml53
-rw-r--r--examples/quick/animation/behaviors/tvtennis.qml130
-rw-r--r--examples/quick/animation/behaviors/wigglytext.qml71
-rw-r--r--examples/quick/animation/doc/src/animation.qdoc30
-rw-r--r--examples/quick/animation/easing/easing.qml70
-rw-r--r--examples/quick/animation/main.cpp51
-rw-r--r--examples/quick/animation/pathanimation/pathanimation.qml59
-rw-r--r--examples/quick/animation/pathinterpolator/pathinterpolator.qml59
-rw-r--r--examples/quick/animation/states/states.qml68
-rw-r--r--examples/quick/animation/states/transitions.qml69
-rw-r--r--examples/quick/canvas/CMakeLists.txt174
-rw-r--r--examples/quick/canvas/LabeledSlider.qml37
-rw-r--r--examples/quick/canvas/bezierCurve/bezierCurve.qml211
-rw-r--r--examples/quick/canvas/canvas.qml80
-rw-r--r--examples/quick/canvas/canvas.qrc3
-rw-r--r--examples/quick/canvas/clip/clip.qml238
-rw-r--r--examples/quick/canvas/doc/src/canvas.qdoc29
-rw-r--r--examples/quick/canvas/main.cpp51
-rw-r--r--examples/quick/canvas/quadraticCurveTo/quadraticCurveTo.qml213
-rw-r--r--examples/quick/canvas/roundedrect/roundedrect.qml191
-rw-r--r--examples/quick/canvas/smile/smile.qml203
-rw-r--r--examples/quick/canvas/squircle/squircle.qml229
-rw-r--r--examples/quick/canvas/tiger/tiger.qml191
-rw-r--r--examples/quick/customitems/.prev_CMakeLists.txt4
-rw-r--r--examples/quick/customitems/CMakeLists.txt8
-rw-r--r--examples/quick/customitems/customitems.pro11
-rw-r--r--examples/quick/customitems/dialcontrol/CMakeLists.txt82
-rw-r--r--examples/quick/customitems/dialcontrol/Dial.qml49
-rw-r--r--examples/quick/customitems/dialcontrol/QuitButton.qml15
-rw-r--r--examples/quick/customitems/dialcontrol/background.png (renamed from examples/quick/customitems/dialcontrol/content/background.png)bin35876 -> 35876 bytes
-rw-r--r--examples/quick/customitems/dialcontrol/content/Dial.qml96
-rw-r--r--examples/quick/customitems/dialcontrol/content/QuitButton.qml61
-rw-r--r--examples/quick/customitems/dialcontrol/dialcontrol.qml58
-rw-r--r--examples/quick/customitems/dialcontrol/dialcontrol.qrc16
-rw-r--r--examples/quick/customitems/dialcontrol/doc/src/dialcontrol.qdoc29
-rw-r--r--examples/quick/customitems/dialcontrol/main.cpp53
-rw-r--r--examples/quick/customitems/dialcontrol/needle.png (renamed from examples/quick/customitems/dialcontrol/content/needle.png)bin342 -> 342 bytes
-rw-r--r--examples/quick/customitems/dialcontrol/needle_shadow.png (renamed from examples/quick/customitems/dialcontrol/content/needle_shadow.png)bin632 -> 632 bytes
-rw-r--r--examples/quick/customitems/dialcontrol/overlay.png (renamed from examples/quick/customitems/dialcontrol/content/overlay.png)bin3564 -> 3564 bytes
-rw-r--r--examples/quick/customitems/dialcontrol/quit.png (renamed from examples/quick/customitems/dialcontrol/content/quit.png)bin583 -> 583 bytes
-rw-r--r--examples/quick/customitems/flipable/5_heart.png (renamed from examples/quick/customitems/flipable/content/5_heart.png)bin3872 -> 3872 bytes
-rw-r--r--examples/quick/customitems/flipable/9_club.png (renamed from examples/quick/customitems/flipable/content/9_club.png)bin6135 -> 6135 bytes
-rw-r--r--examples/quick/customitems/flipable/CMakeLists.txt51
-rw-r--r--examples/quick/customitems/flipable/Card.qml43
-rw-r--r--examples/quick/customitems/flipable/back.png (renamed from examples/quick/customitems/flipable/content/back.png)bin1418 -> 1418 bytes
-rw-r--r--examples/quick/customitems/flipable/content/Card.qml90
-rw-r--r--examples/quick/customitems/flipable/doc/src/flipable.qdoc29
-rw-r--r--examples/quick/customitems/flipable/flipable.qml58
-rw-r--r--examples/quick/customitems/flipable/flipable.qrc10
-rw-r--r--examples/quick/customitems/flipable/main.cpp53
-rw-r--r--examples/quick/customitems/maskedmousearea/CMakeLists.txt65
-rw-r--r--examples/quick/customitems/maskedmousearea/images/cloud_1.pngbin49395 -> 0 bytes
-rw-r--r--examples/quick/customitems/maskedmousearea/images/cloud_2.pngbin32288 -> 0 bytes
-rw-r--r--examples/quick/customitems/maskedmousearea/images/moon.pngbin13263 -> 0 bytes
-rw-r--r--examples/quick/customitems/maskedmousearea/main.cpp64
-rw-r--r--examples/quick/customitems/maskedmousearea/maskedmousearea.cpp151
-rw-r--r--examples/quick/customitems/maskedmousearea/maskedmousearea.h109
-rw-r--r--examples/quick/customitems/maskedmousearea/maskedmousearea.pro17
-rw-r--r--examples/quick/customitems/maskedmousearea/maskedmousearea.qml142
-rw-r--r--examples/quick/customitems/maskedmousearea/maskedmousearea.qmlproject16
-rw-r--r--examples/quick/customitems/maskedmousearea/maskedmousearea.qrc8
-rw-r--r--examples/quick/customitems/painteditem/CMakeLists.txt82
-rw-r--r--examples/quick/customitems/painteditem/TextBalloon/CMakeLists.txt28
-rw-r--r--examples/quick/customitems/painteditem/TextBalloon/plugin.h12
-rw-r--r--examples/quick/customitems/painteditem/TextBalloon/qmldir (renamed from examples/quick/customitems/painteditem/TextBalloonPlugin/qmldir)1
-rw-r--r--examples/quick/customitems/painteditem/TextBalloon/textballoon.cpp56
-rw-r--r--examples/quick/customitems/painteditem/TextBalloon/textballoon.h31
-rw-r--r--examples/quick/customitems/painteditem/TextBalloon/textballoon.pro28
-rw-r--r--examples/quick/customitems/painteditem/TextBalloon/textballoon.qrc5
-rw-r--r--examples/quick/customitems/painteditem/TextBalloonPlugin/plugin.h59
-rw-r--r--examples/quick/customitems/painteditem/doc/src/textballoons.qdoc51
-rw-r--r--examples/quick/customitems/painteditem/main.cpp4
-rw-r--r--examples/quick/customitems/painteditem/painteditem.pro31
-rw-r--r--examples/quick/customitems/painteditem/painteditem.qrc3
-rw-r--r--examples/quick/customitems/painteditem/textballoon.cpp103
-rw-r--r--examples/quick/customitems/painteditem/textballoon.h78
-rw-r--r--examples/quick/customitems/painteditem/textballoons.qml63
-rw-r--r--examples/quick/customitems/painteditem/textballoonuser.pro10
-rw-r--r--examples/quick/customitems/progressbar/content/ProgressBar.qml93
-rw-r--r--examples/quick/customitems/progressbar/content/background.pngbin299 -> 0 bytes
-rw-r--r--examples/quick/customitems/progressbar/main.qml83
-rw-r--r--examples/quick/customitems/scrollbar/ScrollBar.qml84
-rw-r--r--examples/quick/customitems/scrollbar/doc/images/qml-scrollbar-example.pngbin157358 -> 0 bytes
-rw-r--r--examples/quick/customitems/scrollbar/doc/src/scrollbar.qdoc38
-rw-r--r--examples/quick/customitems/scrollbar/main.cpp51
-rw-r--r--examples/quick/customitems/scrollbar/main.qml103
-rw-r--r--examples/quick/customitems/scrollbar/pics/niagara_falls.jpgbin142510 -> 0 bytes
-rw-r--r--examples/quick/customitems/scrollbar/scrollbar.pro9
-rw-r--r--examples/quick/customitems/scrollbar/scrollbar.qmlproject16
-rw-r--r--examples/quick/customitems/scrollbar/scrollbar.qrc7
-rw-r--r--examples/quick/customitems/searchbox/SearchBox.qml119
-rw-r--r--examples/quick/customitems/searchbox/images/clear.pngbin320 -> 0 bytes
-rw-r--r--examples/quick/customitems/searchbox/images/lineedit-bg-focus.pngbin297 -> 0 bytes
-rw-r--r--examples/quick/customitems/searchbox/images/lineedit-bg.pngbin299 -> 0 bytes
-rw-r--r--examples/quick/customitems/searchbox/main.cpp51
-rw-r--r--examples/quick/customitems/searchbox/main.qml70
-rw-r--r--examples/quick/customitems/searchbox/searchbox.pro9
-rw-r--r--examples/quick/customitems/searchbox/searchbox.qmlproject16
-rw-r--r--examples/quick/customitems/searchbox/searchbox.qrc9
-rw-r--r--examples/quick/customitems/slideswitch/content/Switch.qml127
-rw-r--r--examples/quick/customitems/slideswitch/content/background.pngbin3091 -> 0 bytes
-rw-r--r--examples/quick/customitems/slideswitch/content/background.svg23
-rw-r--r--examples/quick/customitems/slideswitch/content/knob.pngbin3101 -> 0 bytes
-rw-r--r--examples/quick/customitems/slideswitch/content/knob.svg867
-rw-r--r--examples/quick/customitems/slideswitch/doc/src/example-slideswitch.qdoc132
-rw-r--r--examples/quick/customitems/slideswitch/slideswitch.qml61
-rw-r--r--examples/quick/customitems/spinner/content/Spinner.qml80
-rw-r--r--examples/quick/customitems/spinner/content/spinner-bg.pngbin274 -> 0 bytes
-rw-r--r--examples/quick/customitems/spinner/content/spinner-select.pngbin320 -> 0 bytes
-rw-r--r--examples/quick/customitems/spinner/main.cpp51
-rw-r--r--examples/quick/customitems/spinner/main.qml71
-rw-r--r--examples/quick/customitems/spinner/spinner.pro9
-rw-r--r--examples/quick/customitems/spinner/spinner.qmlproject16
-rw-r--r--examples/quick/customitems/spinner/spinner.qrc8
-rw-r--r--examples/quick/customitems/tabwidget/TabWidget.qml112
-rw-r--r--examples/quick/customitems/tabwidget/doc/images/qml-tabwidget-example.pngbin4798 -> 0 bytes
-rw-r--r--examples/quick/customitems/tabwidget/doc/images/tab.pngbin309 -> 0 bytes
-rw-r--r--examples/quick/customitems/tabwidget/doc/src/tabwidget.qdoc42
-rw-r--r--examples/quick/customitems/tabwidget/main.cpp51
-rw-r--r--examples/quick/customitems/tabwidget/main.qml109
-rw-r--r--examples/quick/customitems/tabwidget/tabwidget.pro9
-rw-r--r--examples/quick/customitems/tabwidget/tabwidget.qmlproject16
-rw-r--r--examples/quick/customitems/tabwidget/tabwidget.qrc8
-rw-r--r--examples/quick/delegatechooser/CMakeLists.txt125
-rw-r--r--examples/quick/delegatechooser/delegatechooser.pro8
-rw-r--r--examples/quick/delegatechooser/delegatechooser.qml145
-rw-r--r--examples/quick/delegatechooser/main.cpp51
-rw-r--r--examples/quick/draganddrop/CMakeLists.txt151
-rw-r--r--examples/quick/draganddrop/doc/src/draganddrop.qdoc29
-rw-r--r--examples/quick/draganddrop/draganddrop.qml60
-rw-r--r--examples/quick/draganddrop/draganddrop.qrc3
-rw-r--r--examples/quick/draganddrop/external/externaldraganddrop.qml84
-rw-r--r--examples/quick/draganddrop/main.cpp51
-rw-r--r--examples/quick/draganddrop/tiles/DragTile.qml80
-rw-r--r--examples/quick/draganddrop/tiles/DropTile.qml69
-rw-r--r--examples/quick/draganddrop/tiles/tiles.qml87
-rw-r--r--examples/quick/draganddrop/views/Icon.qml59
-rw-r--r--examples/quick/draganddrop/views/gridview.qml74
-rw-r--r--examples/quick/embeddedinwidgets/CMakeLists.txt69
-rw-r--r--examples/quick/embeddedinwidgets/Main.qml53
-rw-r--r--examples/quick/embeddedinwidgets/TextBox.qml85
-rw-r--r--examples/quick/embeddedinwidgets/doc/images/qml-embeddedinwidgets-example.jpgbin0 -> 27138 bytes
-rw-r--r--examples/quick/embeddedinwidgets/doc/src/embeddedinwidgets.qdoc46
-rw-r--r--examples/quick/embeddedinwidgets/embeddedinwidgets.pro11
-rw-r--r--examples/quick/embeddedinwidgets/embeddedinwidgets.qrc6
-rw-r--r--examples/quick/embeddedinwidgets/main.cpp55
-rw-r--r--examples/quick/embeddedinwidgets/main.qml122
-rw-r--r--examples/quick/embeddedinwidgets/qmldir4
-rw-r--r--examples/quick/embeddedinwidgets/reflect.frag25
-rw-r--r--examples/quick/embeddedinwidgets/reflect.frag.qsbbin0 -> 1976 bytes
-rw-r--r--examples/quick/externaldraganddrop/CMakeLists.txt126
-rw-r--r--examples/quick/externaldraganddrop/DragAndDropTextItem.qml113
-rw-r--r--examples/quick/externaldraganddrop/doc/images/qml-dnd2-example.pngbin48666 -> 0 bytes
-rw-r--r--examples/quick/externaldraganddrop/doc/src/externaldraganddrop.qdoc44
-rw-r--r--examples/quick/externaldraganddrop/externaldraganddrop.pro12
-rw-r--r--examples/quick/externaldraganddrop/externaldraganddrop.qml89
-rw-r--r--examples/quick/externaldraganddrop/externaldraganddrop.qmlproject16
-rw-r--r--examples/quick/externaldraganddrop/externaldraganddrop.qrc6
-rw-r--r--examples/quick/externaldraganddrop/main.cpp51
-rw-r--r--examples/quick/imageelements/BorderImageSelector.qml64
-rw-r--r--examples/quick/imageelements/CMakeLists.txt189
-rw-r--r--examples/quick/imageelements/ImageCell.qml25
-rw-r--r--examples/quick/imageelements/MyBorderImage.qml65
-rw-r--r--examples/quick/imageelements/ShadowRectangle.qml33
-rw-r--r--examples/quick/imageelements/animatedimage.qml110
-rw-r--r--examples/quick/imageelements/animatedsprite.qml73
-rw-r--r--examples/quick/imageelements/borderimage.qml142
-rw-r--r--examples/quick/imageelements/content/BorderImageSelector.qml109
-rw-r--r--examples/quick/imageelements/content/ImageCell.qml67
-rw-r--r--examples/quick/imageelements/content/MyBorderImage.qml101
-rw-r--r--examples/quick/imageelements/content/ShadowRectangle.qml66
-rw-r--r--examples/quick/imageelements/doc/src/imageelements.qdoc31
-rw-r--r--examples/quick/imageelements/framestepping.qml64
-rw-r--r--examples/quick/imageelements/image.qml61
-rw-r--r--examples/quick/imageelements/imageelements.qml74
-rw-r--r--examples/quick/imageelements/imageelements.qrc36
-rw-r--r--examples/quick/imageelements/main.cpp51
-rw-r--r--examples/quick/imageelements/multiframeborderimage.qml70
-rw-r--r--examples/quick/imageelements/pics/BearSheet.png (renamed from examples/quick/imageelements/content/BearSheet.png)bin406337 -> 406337 bytes
-rw-r--r--examples/quick/imageelements/pics/Uniflow_steam_engine.gif (renamed from examples/quick/imageelements/content/Uniflow_steam_engine.gif)bin45328 -> 45328 bytes
-rw-r--r--examples/quick/imageelements/pics/arrow.png (renamed from examples/quick/imageelements/content/arrow.png)bin247 -> 247 bytes
-rw-r--r--examples/quick/imageelements/pics/bw.png (renamed from examples/quick/imageelements/content/bw.png)bin1357 -> 1357 bytes
-rw-r--r--examples/quick/imageelements/pics/colors-round.sci (renamed from examples/quick/imageelements/content/colors-round.sci)0
-rw-r--r--examples/quick/imageelements/pics/colors-stretch.sci (renamed from examples/quick/imageelements/content/colors-stretch.sci)0
-rw-r--r--examples/quick/imageelements/pics/colors.png (renamed from examples/quick/imageelements/content/colors.png)bin974 -> 974 bytes
-rw-r--r--examples/quick/imageelements/pics/multi.ico (renamed from examples/quick/imageelements/content/multi.ico)bin27110 -> 27110 bytes
-rw-r--r--examples/quick/imageelements/pics/qt-logo.png (renamed from examples/quick/imageelements/content/qt-logo.png)bin5149 -> 5149 bytes
-rw-r--r--examples/quick/imageelements/pics/shadow.png (renamed from examples/quick/imageelements/content/shadow.png)bin371 -> 371 bytes
-rw-r--r--examples/quick/imageelements/pics/speaker.png (renamed from examples/quick/imageelements/content/speaker.png)bin784525 -> 784525 bytes
-rw-r--r--examples/quick/imageelements/shadows.qml69
-rw-r--r--examples/quick/imageelements/spritesequence.qml99
-rw-r--r--examples/quick/imageprovider/CMakeLists.txt50
-rw-r--r--examples/quick/imageprovider/doc/src/imageprovider.qdoc29
-rw-r--r--examples/quick/imageprovider/imageprovider-example.qml53
-rw-r--r--examples/quick/imageprovider/imageprovider.cpp51
-rw-r--r--examples/quick/imageresponseprovider/CMakeLists.txt43
-rw-r--r--examples/quick/imageresponseprovider/doc/src/imageresponseprovider.qdoc29
-rw-r--r--examples/quick/imageresponseprovider/imageresponseprovider-example.qml53
-rw-r--r--examples/quick/imageresponseprovider/imageresponseprovider.cpp51
-rw-r--r--examples/quick/itemvariablerefreshrate/CMakeLists.txt45
-rw-r--r--examples/quick/itemvariablerefreshrate/content/qt_logo.pngbin0 -> 6208 bytes
-rw-r--r--examples/quick/itemvariablerefreshrate/doc/images/qml-itemvariablerefreshrate-example.pngbin0 -> 43432 bytes
-rw-r--r--examples/quick/itemvariablerefreshrate/doc/src/itemvariablerefreshrate.qdoc37
-rw-r--r--examples/quick/itemvariablerefreshrate/itemvariablerefreshrate.pro8
-rw-r--r--examples/quick/itemvariablerefreshrate/itemvariablerefreshrate.qml85
-rw-r--r--examples/quick/itemvariablerefreshrate/itemvariablerefreshrate.qrc6
-rw-r--r--examples/quick/itemvariablerefreshrate/main.cpp4
-rw-r--r--examples/quick/keyinteraction/CMakeLists.txt83
-rw-r--r--examples/quick/keyinteraction/ContextMenu.qml34
-rw-r--r--examples/quick/keyinteraction/GridMenu.qml105
-rw-r--r--examples/quick/keyinteraction/ListMenu.qml122
-rw-r--r--examples/quick/keyinteraction/ListViewDelegate.qml73
-rw-r--r--examples/quick/keyinteraction/TabMenu.qml98
-rw-r--r--examples/quick/keyinteraction/doc/src/keyinteraction.qdoc29
-rw-r--r--examples/quick/keyinteraction/focus.qml160
-rw-r--r--examples/quick/keyinteraction/focus/Core/ContextMenu.qml76
-rw-r--r--examples/quick/keyinteraction/focus/Core/GridMenu.qml117
-rw-r--r--examples/quick/keyinteraction/focus/Core/ListMenu.qml119
-rw-r--r--examples/quick/keyinteraction/focus/Core/ListViewDelegate.qml97
-rw-r--r--examples/quick/keyinteraction/focus/Core/TabMenu.qml113
-rw-r--r--examples/quick/keyinteraction/focus/focus.qml177
-rw-r--r--examples/quick/keyinteraction/images/arrow.png (renamed from examples/quick/keyinteraction/focus/Core/images/arrow.png)bin411 -> 411 bytes
-rw-r--r--examples/quick/keyinteraction/images/qt-logo.png (renamed from examples/quick/keyinteraction/focus/Core/images/qt-logo.png)bin5149 -> 5149 bytes
-rw-r--r--examples/quick/keyinteraction/keyinteraction.qml55
-rw-r--r--examples/quick/keyinteraction/keyinteraction.qrc18
-rw-r--r--examples/quick/keyinteraction/main.cpp51
-rw-r--r--examples/quick/layouts/CMakeLists.txt69
-rw-r--r--examples/quick/layouts/doc/src/qtquicklayouts-examples.qdoc29
-rw-r--r--examples/quick/layouts/layouts.qml92
-rw-r--r--examples/quick/layouts/layouts.qmlproject16
-rw-r--r--examples/quick/layouts/layouts.qrc2
-rw-r--r--examples/quick/layouts/main.cpp53
-rw-r--r--examples/quick/localstorage/CMakeLists.txt48
-rw-r--r--examples/quick/localstorage/Database.js73
-rw-r--r--examples/quick/localstorage/Header.qml (renamed from examples/quick/localstorage/localstorage/Header.qml)87
-rw-r--r--examples/quick/localstorage/MyDelegate.qml69
-rw-r--r--examples/quick/localstorage/MyModel.qml11
-rw-r--r--examples/quick/localstorage/doc/src/localstorage.qdoc29
-rw-r--r--examples/quick/localstorage/localstorage.pro11
-rw-r--r--examples/quick/localstorage/localstorage.qml (renamed from examples/quick/localstorage/localstorage/localstorage.qml)100
-rw-r--r--examples/quick/localstorage/localstorage.qrc (renamed from examples/quick/localstorage/localstorage/localstorage.qrc)2
-rw-r--r--examples/quick/localstorage/localstorage/CMakeLists.txt58
-rw-r--r--examples/quick/localstorage/localstorage/Database.js120
-rw-r--r--examples/quick/localstorage/localstorage/MyDelegate.qml116
-rw-r--r--examples/quick/localstorage/localstorage/MyModel.qml58
-rw-r--r--examples/quick/localstorage/localstorage/localstorage.pro9
-rw-r--r--examples/quick/localstorage/localstorage/main.cpp61
-rw-r--r--examples/quick/localstorage/main.cpp14
-rw-r--r--examples/quick/models/CMakeLists.txt9
-rw-r--r--examples/quick/models/abstractitemmodel/CMakeLists.txt66
-rw-r--r--examples/quick/models/abstractitemmodel/abstractitemmodel.qrc2
-rw-r--r--examples/quick/models/abstractitemmodel/doc/src/abstractitemmodel-example.qdoc29
-rw-r--r--examples/quick/models/abstractitemmodel/main.cpp53
-rw-r--r--examples/quick/models/abstractitemmodel/model.cpp51
-rw-r--r--examples/quick/models/abstractitemmodel/model.h59
-rw-r--r--examples/quick/models/abstractitemmodel/view.qml53
-rw-r--r--examples/quick/models/objectlistmodel/CMakeLists.txt66
-rw-r--r--examples/quick/models/objectlistmodel/dataobject.cpp51
-rw-r--r--examples/quick/models/objectlistmodel/dataobject.h51
-rw-r--r--examples/quick/models/objectlistmodel/doc/src/objectlistmodel-example.qdoc29
-rw-r--r--examples/quick/models/objectlistmodel/main.cpp83
-rw-r--r--examples/quick/models/objectlistmodel/objectlistmodel.qrc2
-rw-r--r--examples/quick/models/objectlistmodel/view.qml62
-rw-r--r--examples/quick/models/stringlistmodel/CMakeLists.txt66
-rw-r--r--examples/quick/models/stringlistmodel/doc/src/stringlistmodel-example.qdoc29
-rw-r--r--examples/quick/models/stringlistmodel/main.cpp53
-rw-r--r--examples/quick/models/stringlistmodel/stringlistmodel.qrc2
-rw-r--r--examples/quick/models/stringlistmodel/view.qml53
-rw-r--r--examples/quick/mousearea/CMakeLists.txt68
-rw-r--r--examples/quick/mousearea/doc/src/mousearea.qdoc29
-rw-r--r--examples/quick/mousearea/main.cpp51
-rw-r--r--examples/quick/mousearea/mousearea-wheel-example.qml67
-rw-r--r--examples/quick/mousearea/mousearea.qml180
-rw-r--r--examples/quick/mousearea/mousearea.qrc2
-rw-r--r--examples/quick/multieffect/CMakeLists.txt5
-rw-r--r--examples/quick/multieffect/itemswitcher/CMakeLists.txt70
-rw-r--r--examples/quick/multieffect/itemswitcher/doc/images/qml-multieffectitemswitcher-example.jpgbin0 -> 69659 bytes
-rw-r--r--examples/quick/multieffect/itemswitcher/doc/src/itemswitcher.qdoc16
-rw-r--r--examples/quick/multieffect/itemswitcher/itemswitcher.pro10
-rw-r--r--examples/quick/multieffect/itemswitcher/main.cpp4
-rw-r--r--examples/quick/multieffect/itemswitcher/qml.qrc27
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/ItemSwitcher.qml57
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/PagesItem.qml49
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/PagesView.qml30
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/SettingsComponentButton.qml35
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/SettingsComponentSlider.qml54
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/SettingsView.qml168
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/SwitchEffect3DFlip.qml93
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/SwitchEffectBlinds.qml49
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/SwitchEffectBlur.qml34
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/SwitchEffectHeart.qml48
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/SwitchEffectStars.qml50
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/SwitchEffectThunder.qml87
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/images/Built_with_Qt.pngbin0 -> 13891 bytes
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/images/Built_with_Qt_RGB_logo.pngbin0 -> 14224 bytes
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/images/arrow.pngbin0 -> 835 bytes
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/images/background.pngbin0 -> 22366 bytes
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/images/hblinds.pngbin0 -> 12054 bytes
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/images/heart.pngbin0 -> 3786 bytes
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/images/quit_coding.pngbin0 -> 23713 bytes
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/images/smoke.pngbin0 -> 45280 bytes
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/images/star.pngbin0 -> 2852 bytes
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/images/stripes.pngbin0 -> 41520 bytes
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/main.qml219
-rw-r--r--examples/quick/multieffect/multieffect.pro3
-rw-r--r--examples/quick/multieffect/testbed/CMakeLists.txt74
-rw-r--r--examples/quick/multieffect/testbed/doc/images/qml-multieffecttestbed-example.jpgbin0 -> 59436 bytes
-rw-r--r--examples/quick/multieffect/testbed/doc/src/testbed.qdoc16
-rw-r--r--examples/quick/multieffect/testbed/main.cpp4
-rw-r--r--examples/quick/multieffect/testbed/qml.qrc31
-rw-r--r--examples/quick/multieffect/testbed/qml/CustomMultiEffect/BlurHelper.qml66
-rw-r--r--examples/quick/multieffect/testbed/qml/CustomMultiEffect/CustomMultiEffect.qep383
-rw-r--r--examples/quick/multieffect/testbed/qml/CustomMultiEffect/CustomMultiEffect.qml97
-rw-r--r--examples/quick/multieffect/testbed/qml/CustomMultiEffect/bluritems.frag.qsbbin0 -> 1563 bytes
-rw-r--r--examples/quick/multieffect/testbed/qml/CustomMultiEffect/bluritems.vert.qsbbin0 -> 1934 bytes
-rw-r--r--examples/quick/multieffect/testbed/qml/CustomMultiEffect/custommultieffect.frag.qsbbin0 -> 6495 bytes
-rw-r--r--examples/quick/multieffect/testbed/qml/CustomMultiEffect/custommultieffect.vert.qsbbin0 -> 5369 bytes
-rw-r--r--examples/quick/multieffect/testbed/qml/FpsItem.qml65
-rw-r--r--examples/quick/multieffect/testbed/qml/ResetSettingsOverlay.qml170
-rw-r--r--examples/quick/multieffect/testbed/qml/Settings.qml92
-rw-r--r--examples/quick/multieffect/testbed/qml/SettingsComponentCheckBox.qml35
-rw-r--r--examples/quick/multieffect/testbed/qml/SettingsComponentColorSelector.qml135
-rw-r--r--examples/quick/multieffect/testbed/qml/SettingsComponentSlider.qml54
-rw-r--r--examples/quick/multieffect/testbed/qml/SettingsComponentView.qml147
-rw-r--r--examples/quick/multieffect/testbed/qml/SettingsView.qml407
-rw-r--r--examples/quick/multieffect/testbed/qml/ShaderView.qml29
-rw-r--r--examples/quick/multieffect/testbed/qml/TestMaskItem.qml17
-rw-r--r--examples/quick/multieffect/testbed/qml/TestSourceItem.qml113
-rw-r--r--examples/quick/multieffect/testbed/qml/WarningsItem.qml66
-rw-r--r--examples/quick/multieffect/testbed/qml/WarningsView.qml38
-rw-r--r--examples/quick/multieffect/testbed/qml/images/Built_with_Qt.pngbin0 -> 13891 bytes
-rw-r--r--examples/quick/multieffect/testbed/qml/images/Built_with_Qt_RGB_logo.pngbin0 -> 14224 bytes
-rw-r--r--examples/quick/multieffect/testbed/qml/images/arrow.pngbin0 -> 835 bytes
-rw-r--r--examples/quick/multieffect/testbed/qml/images/pause.pngbin0 -> 245 bytes
-rw-r--r--examples/quick/multieffect/testbed/qml/images/play.pngbin0 -> 281 bytes
-rw-r--r--examples/quick/multieffect/testbed/qml/images/spinner.pngbin0 -> 1687 bytes
-rw-r--r--examples/quick/multieffect/testbed/qml/images/warning.pngbin0 -> 10285 bytes
-rw-r--r--examples/quick/multieffect/testbed/qml/main.qml186
-rw-r--r--examples/quick/multieffect/testbed/testbed.pro10
-rw-r--r--examples/quick/particles/.prev_CMakeLists.txt7
-rw-r--r--examples/quick/particles/CMakeLists.txt12
-rw-r--r--examples/quick/particles/affectors/CMakeLists.txt312
-rw-r--r--examples/quick/particles/affectors/GreyButton.qml44
-rw-r--r--examples/quick/particles/affectors/affectors.pro1
-rw-r--r--examples/quick/particles/affectors/affectors.qml77
-rw-r--r--examples/quick/particles/affectors/affectors.qrc39
-rw-r--r--examples/quick/particles/affectors/age.qml62
-rw-r--r--examples/quick/particles/affectors/attractor.qml (renamed from examples/quick/particles/affectors/content/attractor.qml)62
-rw-r--r--examples/quick/particles/affectors/content/GreyButton.qml91
-rw-r--r--examples/quick/particles/affectors/content/age.qml109
-rw-r--r--examples/quick/particles/affectors/content/customaffector.qml156
-rw-r--r--examples/quick/particles/affectors/content/friction.qml121
-rw-r--r--examples/quick/particles/affectors/content/gravity.qml115
-rw-r--r--examples/quick/particles/affectors/content/move.qml157
-rw-r--r--examples/quick/particles/affectors/content/turbulence.qml142
-rw-r--r--examples/quick/particles/affectors/content/wander.qml107
-rw-r--r--examples/quick/particles/affectors/customaffector.qml109
-rw-r--r--examples/quick/particles/affectors/doc/src/affectors.qdoc63
-rw-r--r--examples/quick/particles/affectors/friction.qml74
-rw-r--r--examples/quick/particles/affectors/gravity.qml68
-rw-r--r--examples/quick/particles/affectors/groupgoal.qml (renamed from examples/quick/particles/affectors/content/groupgoal.qml)61
-rw-r--r--examples/quick/particles/affectors/images/_explo.png (renamed from examples/quick/particles/images/_explo.png)bin81528 -> 81528 bytes
-rw-r--r--examples/quick/particles/affectors/images/backgroundLeaves.jpg (renamed from examples/quick/particles/images/backgroundLeaves.jpg)bin78665 -> 78665 bytes
-rw-r--r--examples/quick/particles/affectors/images/candle.png (renamed from examples/quick/particles/images/candle.png)bin1348 -> 1348 bytes
-rw-r--r--examples/quick/particles/affectors/images/finalfrontier.png (renamed from examples/quick/particles/images/finalfrontier.png)bin695061 -> 695061 bytes
-rw-r--r--examples/quick/particles/affectors/images/matchmask.png (renamed from examples/quick/particles/images/matchmask.png)bin2369 -> 2369 bytes
-rw-r--r--examples/quick/particles/affectors/images/meteor.png (renamed from examples/quick/particles/images/meteor.png)bin83169 -> 83169 bytes
-rw-r--r--examples/quick/particles/affectors/images/nullRock.png (renamed from examples/quick/particles/images/nullRock.png)bin140 -> 140 bytes
-rw-r--r--examples/quick/particles/affectors/images/particleA.png (renamed from examples/quick/particles/images/particleA.png)bin870 -> 870 bytes
-rw-r--r--examples/quick/particles/affectors/images/realLeaf1.png (renamed from examples/quick/particles/images/realLeaf1.png)bin15625 -> 15625 bytes
-rw-r--r--examples/quick/particles/affectors/images/realLeaf2.png (renamed from examples/quick/particles/images/realLeaf2.png)bin13660 -> 13660 bytes
-rw-r--r--examples/quick/particles/affectors/images/realLeaf3.png (renamed from examples/quick/particles/images/realLeaf3.png)bin23809 -> 23809 bytes
-rw-r--r--examples/quick/particles/affectors/images/realLeaf4.png (renamed from examples/quick/particles/images/realLeaf4.png)bin23655 -> 23655 bytes
-rw-r--r--examples/quick/particles/affectors/images/rocket.png (renamed from examples/quick/particles/images/rocket.png)bin7315 -> 7315 bytes
-rw-r--r--examples/quick/particles/affectors/images/rocket2.png (renamed from examples/quick/particles/images/rocket2.png)bin1918 -> 1918 bytes
-rw-r--r--examples/quick/particles/affectors/images/snowflake.png (renamed from examples/quick/particles/images/snowflake.png)bin189327 -> 189327 bytes
-rw-r--r--examples/quick/particles/affectors/main.cpp53
-rw-r--r--examples/quick/particles/affectors/move.qml110
-rw-r--r--examples/quick/particles/affectors/spritegoal.qml (renamed from examples/quick/particles/affectors/content/spritegoal.qml)70
-rw-r--r--examples/quick/particles/affectors/turbulence.qml94
-rw-r--r--examples/quick/particles/affectors/wander.qml60
-rw-r--r--examples/quick/particles/emitters/CMakeLists.txt299
-rw-r--r--examples/quick/particles/emitters/burstandpulse.qml75
-rw-r--r--examples/quick/particles/emitters/content/burstandpulse.qml122
-rw-r--r--examples/quick/particles/emitters/content/customemitter.qml106
-rw-r--r--examples/quick/particles/emitters/content/emitmask.qml84
-rw-r--r--examples/quick/particles/emitters/content/maximumemitted.qml92
-rw-r--r--examples/quick/particles/emitters/content/shapeanddirection.qml122
-rw-r--r--examples/quick/particles/emitters/customemitter.qml59
-rw-r--r--examples/quick/particles/emitters/doc/src/emitters.qdoc41
-rw-r--r--examples/quick/particles/emitters/emitmask.qml37
-rw-r--r--examples/quick/particles/emitters/emitters.pro1
-rw-r--r--examples/quick/particles/emitters/emitters.qml71
-rw-r--r--examples/quick/particles/emitters/emitters.qrc18
-rw-r--r--examples/quick/particles/emitters/images/portal_bg.png (renamed from examples/quick/particles/images/portal_bg.png)bin96858 -> 96858 bytes
-rw-r--r--examples/quick/particles/emitters/images/starfish_mask.png (renamed from examples/quick/particles/images/starfish_mask.png)bin7403 -> 7403 bytes
-rw-r--r--examples/quick/particles/emitters/main.cpp53
-rw-r--r--examples/quick/particles/emitters/maximumemitted.qml45
-rw-r--r--examples/quick/particles/emitters/shapeanddirection.qml75
-rw-r--r--examples/quick/particles/emitters/trailemitter.qml (renamed from examples/quick/particles/emitters/content/trailemitter.qml)57
-rw-r--r--examples/quick/particles/emitters/velocityfrommotion.qml (renamed from examples/quick/particles/emitters/content/velocityfrommotion.qml)69
-rw-r--r--examples/quick/particles/imageparticle/CMakeLists.txt305
-rw-r--r--examples/quick/particles/imageparticle/allatonce.qml63
-rw-r--r--examples/quick/particles/imageparticle/colored.qml51
-rw-r--r--examples/quick/particles/imageparticle/colortable.qml49
-rw-r--r--examples/quick/particles/imageparticle/content/allatonce.qml110
-rw-r--r--examples/quick/particles/imageparticle/content/colored.qml98
-rw-r--r--examples/quick/particles/imageparticle/content/colortable.qml96
-rw-r--r--examples/quick/particles/imageparticle/content/deformation.qml135
-rw-r--r--examples/quick/particles/imageparticle/content/rotation.qml83
-rw-r--r--examples/quick/particles/imageparticle/content/sprites.qml126
-rw-r--r--examples/quick/particles/imageparticle/deformation.qml88
-rw-r--r--examples/quick/particles/imageparticle/doc/src/imageparticle.qdoc43
-rw-r--r--examples/quick/particles/imageparticle/imageparticle.pro1
-rw-r--r--examples/quick/particles/imageparticle/imageparticle.qml71
-rw-r--r--examples/quick/particles/imageparticle/imageparticle.qrc24
-rw-r--r--examples/quick/particles/imageparticle/images/bear_tiles.png (renamed from examples/quick/particles/images/bear_tiles.png)bin40349 -> 40349 bytes
-rw-r--r--examples/quick/particles/imageparticle/images/colortable.png (renamed from examples/quick/particles/images/colortable.png)bin571 -> 571 bytes
-rw-r--r--examples/quick/particles/imageparticle/images/flower.png (renamed from examples/quick/particles/images/flower.png)bin4683 -> 4683 bytes
-rw-r--r--examples/quick/particles/imageparticle/images/starfish_0.png (renamed from examples/quick/particles/images/starfish_0.png)bin15972 -> 15972 bytes
-rw-r--r--examples/quick/particles/imageparticle/images/starfish_1.png (renamed from examples/quick/particles/images/starfish_1.png)bin15746 -> 15746 bytes
-rw-r--r--examples/quick/particles/imageparticle/images/starfish_2.png (renamed from examples/quick/particles/images/starfish_2.png)bin16067 -> 16067 bytes
-rw-r--r--examples/quick/particles/imageparticle/images/starfish_3.png (renamed from examples/quick/particles/images/starfish_3.png)bin16201 -> 16201 bytes
-rw-r--r--examples/quick/particles/imageparticle/images/starfish_4.png (renamed from examples/quick/particles/images/starfish_4.png)bin14698 -> 14698 bytes
-rw-r--r--examples/quick/particles/imageparticle/main.cpp53
-rw-r--r--examples/quick/particles/imageparticle/rotation.qml36
-rw-r--r--examples/quick/particles/imageparticle/sharing.qml (renamed from examples/quick/particles/imageparticle/content/sharing.qml)61
-rw-r--r--examples/quick/particles/imageparticle/sprites.qml79
-rw-r--r--examples/quick/particles/images.qrc35
-rw-r--r--examples/quick/particles/images/meteor_explo.pngbin219946 -> 0 bytes
-rw-r--r--examples/quick/particles/images/meteors.pngbin132137 -> 0 bytes
-rw-r--r--examples/quick/particles/images/sizeInOut.pngbin132 -> 0 bytes
-rw-r--r--examples/quick/particles/itemparticle/CMakeLists.txt271
-rw-r--r--examples/quick/particles/itemparticle/content/Delegate.qml98
-rw-r--r--examples/quick/particles/itemparticle/content/Delegate2.qml89
-rw-r--r--examples/quick/particles/itemparticle/content/ExpandingDelegate.qml215
-rw-r--r--examples/quick/particles/itemparticle/content/bubble.pngbin2347 -> 0 bytes
-rw-r--r--examples/quick/particles/itemparticle/content/script.js27
-rw-r--r--examples/quick/particles/itemparticle/delegates.qml105
-rw-r--r--examples/quick/particles/itemparticle/itemparticle.pro12
-rw-r--r--examples/quick/particles/itemparticle/main.cpp51
-rw-r--r--examples/quick/particles/itemparticle/particleview.qml309
-rw-r--r--examples/quick/particles/particles.pro4
-rw-r--r--examples/quick/particles/system/CMakeLists.txt296
-rw-r--r--examples/quick/particles/system/content/dynamiccomparison.qml149
-rw-r--r--examples/quick/particles/system/content/dynamicemitters.qml150
-rw-r--r--examples/quick/particles/system/content/multiplepainters.qml106
-rw-r--r--examples/quick/particles/system/content/startstop.qml96
-rw-r--r--examples/quick/particles/system/content/timedgroupchanges.qml137
-rw-r--r--examples/quick/particles/system/doc/src/system.qdoc39
-rw-r--r--examples/quick/particles/system/dynamiccomparison.qml103
-rw-r--r--examples/quick/particles/system/dynamicemitters.qml107
-rw-r--r--examples/quick/particles/system/images/particle2.png (renamed from examples/quick/particles/images/particle2.png)bin1073 -> 1073 bytes
-rw-r--r--examples/quick/particles/system/images/particle3.png (renamed from examples/quick/particles/images/particle3.png)bin574 -> 574 bytes
-rw-r--r--examples/quick/particles/system/images/sparkleSize.png (renamed from examples/quick/particles/images/sparkleSize.png)bin378 -> 378 bytes
-rw-r--r--examples/quick/particles/system/main.cpp53
-rw-r--r--examples/quick/particles/system/multiplepainters.qml58
-rw-r--r--examples/quick/particles/system/startstop.qml50
-rw-r--r--examples/quick/particles/system/system.pro1
-rw-r--r--examples/quick/particles/system/system.qml67
-rw-r--r--examples/quick/particles/system/system.qrc15
-rw-r--r--examples/quick/particles/system/timedgroupchanges.qml90
-rw-r--r--examples/quick/pointerhandlers/CMakeLists.txt95
-rw-r--r--examples/quick/pointerhandlers/components/Button.qml59
-rw-r--r--examples/quick/pointerhandlers/components/CheckBox.qml58
-rw-r--r--examples/quick/pointerhandlers/components/CorkPanel.qml118
-rw-r--r--examples/quick/pointerhandlers/components/FakeFlickable.qml102
-rw-r--r--examples/quick/pointerhandlers/components/FlashAnimation.qml14
-rw-r--r--examples/quick/pointerhandlers/components/LeftDrawer.qml76
-rw-r--r--examples/quick/pointerhandlers/components/MomentumAnimation.qml34
-rw-r--r--examples/quick/pointerhandlers/components/MouseFeedbackSprite.qml58
-rw-r--r--examples/quick/pointerhandlers/components/QuadPieMenu.qml116
-rw-r--r--examples/quick/pointerhandlers/components/ScrollBar.qml114
-rw-r--r--examples/quick/pointerhandlers/components/Slider.qml112
-rw-r--r--examples/quick/pointerhandlers/components/TouchpointFeedbackSprite.qml25
-rw-r--r--examples/quick/pointerhandlers/components/images/checkmark.pngbin0 -> 809 bytes
-rw-r--r--examples/quick/pointerhandlers/components/images/cork.jpg (renamed from examples/quick/touchinteraction/flickable/content/cork.jpg)bin149337 -> 149337 bytes
-rw-r--r--examples/quick/pointerhandlers/components/images/fingersprite.pngbin0 -> 6792 bytes
-rw-r--r--examples/quick/pointerhandlers/components/images/mixer-knob.pngbin0 -> 7821 bytes
-rw-r--r--examples/quick/pointerhandlers/components/images/mouse.pngbin0 -> 1919 bytes
-rw-r--r--examples/quick/pointerhandlers/components/images/mouse_left.pngbin0 -> 740 bytes
-rw-r--r--examples/quick/pointerhandlers/components/images/mouse_middle.pngbin0 -> 558 bytes
-rw-r--r--examples/quick/pointerhandlers/components/images/mouse_right.pngbin0 -> 906 bytes
-rw-r--r--examples/quick/pointerhandlers/components/images/mouse_wheel_ridges.pngbin0 -> 167 bytes
-rw-r--r--examples/quick/pointerhandlers/components/images/note-yellow.png (renamed from examples/quick/touchinteraction/flickable/content/note-yellow.png)bin54283 -> 54283 bytes
-rw-r--r--examples/quick/pointerhandlers/components/images/tack.png (renamed from examples/quick/touchinteraction/flickable/content/tack.png)bin7282 -> 7282 bytes
-rw-r--r--examples/quick/pointerhandlers/corkboards.qml51
-rw-r--r--examples/quick/pointerhandlers/doc/images/pointerhandlers-example-fakeflickable.jpgbin0 -> 104984 bytes
-rw-r--r--examples/quick/pointerhandlers/doc/images/pointerhandlers-example-fling.webpbin0 -> 48514 bytes
-rw-r--r--examples/quick/pointerhandlers/doc/images/pointerhandlers-example-joystick.jpgbin0 -> 81973 bytes
-rw-r--r--examples/quick/pointerhandlers/doc/images/pointerhandlers-example-map.webpbin0 -> 424394 bytes
-rw-r--r--examples/quick/pointerhandlers/doc/images/pointerhandlers-example-mixer.webpbin0 -> 185554 bytes
-rw-r--r--examples/quick/pointerhandlers/doc/images/pointerhandlers-example-multibutton.webpbin0 -> 620084 bytes
-rw-r--r--examples/quick/pointerhandlers/doc/images/pointerhandlers-example-piemenu.webpbin0 -> 40846 bytes
-rw-r--r--examples/quick/pointerhandlers/doc/images/pointerhandlers-example-pinchhandler.webpbin0 -> 999018 bytes
-rw-r--r--examples/quick/pointerhandlers/doc/images/pointerhandlers-example-pointhandler.webpbin0 -> 286790 bytes
-rw-r--r--examples/quick/pointerhandlers/doc/images/pointerhandlers-example-taphandler.webpbin0 -> 155468 bytes
-rw-r--r--examples/quick/pointerhandlers/doc/src/pointerhandlers.qdoc171
-rw-r--r--examples/quick/pointerhandlers/fakeFlickable.qml103
-rw-r--r--examples/quick/pointerhandlers/flingAnimation.qml101
-rw-r--r--examples/quick/pointerhandlers/images/arrowhead.pngbin0 -> 883 bytes
-rw-r--r--examples/quick/pointerhandlers/images/balloon.pngbin0 -> 3759 bytes
-rw-r--r--examples/quick/pointerhandlers/images/blur-circle.png (renamed from examples/quick/touchinteraction/multipointtouch/content/blur-circle.png)bin4279 -> 4279 bytes
-rw-r--r--examples/quick/pointerhandlers/images/cursor-airbrush.pngbin0 -> 823 bytes
-rw-r--r--examples/quick/pointerhandlers/images/cursor-eraser.pngbin0 -> 1454 bytes
-rw-r--r--examples/quick/pointerhandlers/images/cursor-felt-marker.pngbin0 -> 513 bytes
-rw-r--r--examples/quick/pointerhandlers/images/cursor-pencil.pngbin0 -> 1307 bytes
-rw-r--r--examples/quick/pointerhandlers/images/fighter.pngbin0 -> 9669 bytes
-rw-r--r--examples/quick/pointerhandlers/images/grabbing-location.svg1
-rw-r--r--examples/quick/pointerhandlers/images/joystick-outer-case-pov.jpgbin0 -> 50687 bytes
-rw-r--r--examples/quick/pointerhandlers/images/map.svgzbin0 -> 27956 bytes
-rw-r--r--examples/quick/pointerhandlers/images/missile.pngbin0 -> 2305 bytes
-rw-r--r--examples/quick/pointerhandlers/images/redball.pngbin0 -> 10002 bytes
-rw-r--r--examples/quick/pointerhandlers/joystick.qml50
-rw-r--r--examples/quick/pointerhandlers/main.cpp4
-rw-r--r--examples/quick/pointerhandlers/map.qml86
-rw-r--r--examples/quick/pointerhandlers/mixer.qml34
-rw-r--r--examples/quick/pointerhandlers/multibuttons.qml72
-rw-r--r--examples/quick/pointerhandlers/multiflame.qml69
-rw-r--r--examples/quick/pointerhandlers/pieMenu.qml30
-rw-r--r--examples/quick/pointerhandlers/pinchHandler.qml194
-rw-r--r--examples/quick/pointerhandlers/pointerhandlers.pro (renamed from examples/quick/threading/threading.pro)4
-rw-r--r--examples/quick/pointerhandlers/pointerhandlers.qml48
-rw-r--r--examples/quick/pointerhandlers/qml.qrc55
-rw-r--r--examples/quick/pointerhandlers/sidebar.qml184
-rw-r--r--examples/quick/pointerhandlers/singlePointHandlerProperties.qml139
-rw-r--r--examples/quick/pointerhandlers/tabletCanvasDrawing.qml204
-rw-r--r--examples/quick/pointerhandlers/tapHandler.qml213
-rw-r--r--examples/quick/pointerhandlers/tapWithModifiers.qml30
-rw-r--r--examples/quick/positioners/CMakeLists.txt142
-rw-r--r--examples/quick/positioners/doc/src/positioners.qdoc29
-rw-r--r--examples/quick/positioners/main.cpp51
-rw-r--r--examples/quick/positioners/positioners-attachedproperties.qml101
-rw-r--r--examples/quick/positioners/positioners-transitions.qml279
-rw-r--r--examples/quick/positioners/positioners.qml59
-rw-r--r--examples/quick/positioners/positioners.qrc2
-rw-r--r--examples/quick/quick-accessibility/Button.qml49
-rw-r--r--examples/quick/quick-accessibility/CMakeLists.txt71
-rw-r--r--examples/quick/quick-accessibility/Checkbox.qml44
-rw-r--r--examples/quick/quick-accessibility/Slider.qml53
-rw-r--r--examples/quick/quick-accessibility/accessibility.qml54
-rw-r--r--examples/quick/quick-accessibility/accessibility.qrc8
-rw-r--r--examples/quick/quick-accessibility/content/Button.qml96
-rw-r--r--examples/quick/quick-accessibility/content/Checkbox.qml91
-rw-r--r--examples/quick/quick-accessibility/content/Slider.qml100
-rw-r--r--examples/quick/quick-accessibility/doc/src/accessibility.qdoc31
-rw-r--r--examples/quick/quick-accessibility/main.cpp51
-rw-r--r--examples/quick/quick.pro11
-rw-r--r--examples/quick/quickshapes/CMakeLists.txt18
-rw-r--r--examples/quick/quickshapes/quickshapes.pro2
-rw-r--r--examples/quick/quickshapes/shapes/CMakeLists.txt70
-rw-r--r--examples/quick/quickshapes/shapes/arcDirection.qml59
-rw-r--r--examples/quick/quickshapes/shapes/arcRotation.qml82
-rw-r--r--examples/quick/quickshapes/shapes/capStyles.qml62
-rw-r--r--examples/quick/quickshapes/shapes/clippedtigers.qml110
-rw-r--r--examples/quick/quickshapes/shapes/cubicCurve.qml164
-rw-r--r--examples/quick/quickshapes/shapes/dashPattern.qml43
-rw-r--r--examples/quick/quickshapes/shapes/doc/images/qml-shapes-example.png (renamed from examples/quick/shapes/doc/images/qml-shapes-example.png)bin49261 -> 49261 bytes
-rw-r--r--examples/quick/quickshapes/shapes/doc/src/shapes.qdoc16
-rw-r--r--examples/quick/quickshapes/shapes/ellipticalArcs.qml93
-rw-r--r--examples/quick/quickshapes/shapes/fillRules.qml62
-rw-r--r--examples/quick/quickshapes/shapes/gradientSpreadModes.qml102
-rw-r--r--examples/quick/quickshapes/shapes/interactive.qml247
-rw-r--r--examples/quick/quickshapes/shapes/joinStyles.qml56
-rw-r--r--examples/quick/quickshapes/shapes/largeOrSmallArc.qml52
-rw-r--r--examples/quick/quickshapes/shapes/linearGradient.qml90
-rw-r--r--examples/quick/quickshapes/shapes/main.cpp4
-rw-r--r--examples/quick/quickshapes/shapes/main.qml20
-rw-r--r--examples/quick/quickshapes/shapes/quadraticCurve.qml57
-rw-r--r--examples/quick/quickshapes/shapes/radialGradient.qml113
-rw-r--r--examples/quick/quickshapes/shapes/sampling.qml257
-rw-r--r--examples/quick/quickshapes/shapes/shapegallery.qml184
-rw-r--r--examples/quick/quickshapes/shapes/shapes.pro10
-rw-r--r--examples/quick/quickshapes/shapes/shapes.qrc28
-rw-r--r--examples/quick/quickshapes/shapes/strokeOrFill.qml120
-rw-r--r--examples/quick/quickshapes/shapes/tapableTriangle.qml76
-rw-r--r--examples/quick/quickshapes/shapes/text.qml32
-rw-r--r--examples/quick/quickshapes/shapes/tiger.qml (renamed from examples/quick/shapes/content/tiger.qml)68
-rw-r--r--examples/quick/quickshapes/shapes/tigerLoader.qml32
-rw-r--r--examples/quick/quickshapes/shapes/zoomtiger.qml152
-rw-r--r--examples/quick/quickshapes/weatherforecast/BouncyShape.qml33
-rw-r--r--examples/quick/quickshapes/weatherforecast/CMakeLists.txt84
-rw-r--r--examples/quick/quickshapes/weatherforecast/Cloud.qml5
-rw-r--r--examples/quick/quickshapes/weatherforecast/CloudWithLightning.qml5
-rw-r--r--examples/quick/quickshapes/weatherforecast/CloudWithLightningAndRain_generated.qml140
-rw-r--r--examples/quick/quickshapes/weatherforecast/CloudWithLightning_generated.qml142
-rw-r--r--examples/quick/quickshapes/weatherforecast/CloudWithRain.qml5
-rw-r--r--examples/quick/quickshapes/weatherforecast/CloudWithRain_generated.qml114
-rw-r--r--examples/quick/quickshapes/weatherforecast/CloudWithSnow.qml5
-rw-r--r--examples/quick/quickshapes/weatherforecast/CloudWithSnow_generated.qml74
-rw-r--r--examples/quick/quickshapes/weatherforecast/Cloud_generated.qml59
-rw-r--r--examples/quick/quickshapes/weatherforecast/DemoShape.qml12
-rw-r--r--examples/quick/quickshapes/weatherforecast/Europe.qml176
-rw-r--r--examples/quick/quickshapes/weatherforecast/Europe_generated.qml647
-rw-r--r--examples/quick/quickshapes/weatherforecast/Gear.qml5
-rw-r--r--examples/quick/quickshapes/weatherforecast/Gear_generated.qml36
-rw-r--r--examples/quick/quickshapes/weatherforecast/MapLabel.qml65
-rw-r--r--examples/quick/quickshapes/weatherforecast/SettingsDrawer.qml117
-rw-r--r--examples/quick/quickshapes/weatherforecast/Sun.qml5
-rw-r--r--examples/quick/quickshapes/weatherforecast/SunBehindCloud.qml5
-rw-r--r--examples/quick/quickshapes/weatherforecast/SunBehindCloud_generated.qml90
-rw-r--r--examples/quick/quickshapes/weatherforecast/SunBehindLargeCloud_generated.qml90
-rw-r--r--examples/quick/quickshapes/weatherforecast/SunBehindRainCloud.qml5
-rw-r--r--examples/quick/quickshapes/weatherforecast/SunBehindRainCloud_generated.qml138
-rw-r--r--examples/quick/quickshapes/weatherforecast/SunBehindSmallCloud.qml5
-rw-r--r--examples/quick/quickshapes/weatherforecast/SunBehindSmallCloud_generated.qml106
-rw-r--r--examples/quick/quickshapes/weatherforecast/Sun_generated.qml119
-rw-r--r--examples/quick/quickshapes/weatherforecast/assets/Europe.svg395
-rw-r--r--examples/quick/quickshapes/weatherforecast/assets/OFL.txt93
-rw-r--r--examples/quick/quickshapes/weatherforecast/assets/WorkSans-Regular.ttfbin0 -> 191916 bytes
-rw-r--r--examples/quick/quickshapes/weatherforecast/assets/apache.txt201
-rw-r--r--examples/quick/quickshapes/weatherforecast/assets/attribution.txt10
-rw-r--r--examples/quick/quickshapes/weatherforecast/assets/cloud-svgrepo-com.svg54
-rw-r--r--examples/quick/quickshapes/weatherforecast/assets/cloud-with-lightning-and-rain-svgrepo-com.svg2
-rw-r--r--examples/quick/quickshapes/weatherforecast/assets/cloud-with-lightning-svgrepo-com.svg108
-rw-r--r--examples/quick/quickshapes/weatherforecast/assets/cloud-with-rain-svgrepo-com.svg2
-rw-r--r--examples/quick/quickshapes/weatherforecast/assets/cloud-with-snow-svgrepo-com.svg2
-rw-r--r--examples/quick/quickshapes/weatherforecast/assets/gear-alt-stroke.svg40
-rw-r--r--examples/quick/quickshapes/weatherforecast/assets/sun-behind-cloud-svgrepo-com.svg2
-rw-r--r--examples/quick/quickshapes/weatherforecast/assets/sun-behind-large-cloud-svgrepo-com.svg2
-rw-r--r--examples/quick/quickshapes/weatherforecast/assets/sun-behind-rain-cloud-svgrepo-com.svg2
-rw-r--r--examples/quick/quickshapes/weatherforecast/assets/sun-behind-small-cloud-svgrepo-com.svg2
-rw-r--r--examples/quick/quickshapes/weatherforecast/assets/sun-svgrepo-com.svg89
-rw-r--r--examples/quick/quickshapes/weatherforecast/doc/images/qml-weatherforecast-example.pngbin0 -> 219725 bytes
-rw-r--r--examples/quick/quickshapes/weatherforecast/doc/images/settings.pngbin0 -> 232654 bytes
-rw-r--r--examples/quick/quickshapes/weatherforecast/doc/images/zoomed.pngbin0 -> 173748 bytes
-rw-r--r--examples/quick/quickshapes/weatherforecast/doc/src/weatherforecast.qdoc125
-rw-r--r--examples/quick/quickshapes/weatherforecast/main.cpp25
-rw-r--r--examples/quick/quickshapes/weatherforecast/main.qml358
-rw-r--r--examples/quick/quickshapes/weatherforecast/qt_attribution.json55
-rw-r--r--examples/quick/quickshapes/weatherforecast/qtquickcontrols2.conf2
-rw-r--r--examples/quick/quickshapes/weatherforecast/weatherforecast.pro10
-rw-r--r--examples/quick/quickshapes/weatherforecast/weatherforecast.qrc33
-rw-r--r--examples/quick/quickwidgets/CMakeLists.txt6
-rw-r--r--examples/quick/quickwidgets/qquickviewcomparison/CMakeLists.txt66
-rw-r--r--examples/quick/quickwidgets/qquickviewcomparison/fbitem.h147
-rw-r--r--examples/quick/quickwidgets/qquickviewcomparison/logo.h75
-rw-r--r--examples/quick/quickwidgets/qquickviewcomparison/main.cpp91
-rw-r--r--examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h102
-rw-r--r--examples/quick/quickwidgets/qquickviewcomparison/qquickviewcomparison.qrc5
-rw-r--r--examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/CMakeLists.txt57
-rw-r--r--examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/doc/images/qquickwidgetversuswindow-opengl-example.jpgbin0 -> 25452 bytes
-rw-r--r--examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/doc/src/qquickwidgetversuswindow_opengl.qdoc39
-rw-r--r--examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/fbitem.cpp (renamed from examples/quick/quickwidgets/qquickviewcomparison/fbitem.cpp)51
-rw-r--r--examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/fbitem.h100
-rw-r--r--examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/logo.cpp (renamed from examples/quick/quickwidgets/qquickviewcomparison/logo.cpp)51
-rw-r--r--examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/logo.h28
-rw-r--r--examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/main.cpp42
-rw-r--r--examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/mainwindow.cpp (renamed from examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp)61
-rw-r--r--examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/mainwindow.h55
-rw-r--r--examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/qquickwidgetversuswindow_opengl.pro (renamed from examples/quick/quickwidgets/qquickviewcomparison/qquickviewcomparison.pro)6
-rw-r--r--examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/qquickwidgetversuswindow_opengl.qrc6
-rw-r--r--examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/test.qml (renamed from examples/quick/quickwidgets/qquickviewcomparison/test.qml)69
-rw-r--r--examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/wobble.frag23
-rw-r--r--examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/wobble.frag.qsbbin0 -> 1717 bytes
-rw-r--r--examples/quick/quickwidgets/quickwidget/CMakeLists.txt78
-rw-r--r--examples/quick/quickwidgets/quickwidget/customgl.qml69
-rw-r--r--examples/quick/quickwidgets/quickwidget/doc/src/quickwidget.qdoc30
-rw-r--r--examples/quick/quickwidgets/quickwidget/fbitem.cpp100
-rw-r--r--examples/quick/quickwidgets/quickwidget/fbitem.h64
-rw-r--r--examples/quick/quickwidgets/quickwidget/main.cpp155
-rw-r--r--examples/quick/quickwidgets/quickwidget/quickwidget.pro3
-rw-r--r--examples/quick/quickwidgets/quickwidget/quickwidget.qrc2
-rw-r--r--examples/quick/quickwidgets/quickwidget/rotatingsquare.qml82
-rw-r--r--examples/quick/quickwidgets/quickwidget/rotatingsquaretab.qml76
-rw-r--r--examples/quick/quickwidgets/quickwidgets.pro2
-rw-r--r--examples/quick/rendercontrol/.prev_CMakeLists.txt6
-rw-r--r--examples/quick/rendercontrol/CMakeLists.txt12
-rw-r--r--examples/quick/rendercontrol/rendercontrol.pro2
-rw-r--r--examples/quick/rendercontrol/rendercontrol_d3d11/CMakeLists.txt65
-rw-r--r--examples/quick/rendercontrol/rendercontrol_d3d11/demo.qml63
-rw-r--r--examples/quick/rendercontrol/rendercontrol_d3d11/doc/src/rendercontrol_d3d11.qdoc30
-rw-r--r--examples/quick/rendercontrol/rendercontrol_d3d11/engine.cpp61
-rw-r--r--examples/quick/rendercontrol/rendercontrol_d3d11/engine.h56
-rw-r--r--examples/quick/rendercontrol/rendercontrol_d3d11/main.cpp53
-rw-r--r--examples/quick/rendercontrol/rendercontrol_d3d11/quad.frag3
-rw-r--r--examples/quick/rendercontrol/rendercontrol_d3d11/rendercontrol.qrc2
-rw-r--r--examples/quick/rendercontrol/rendercontrol_d3d11/rendercontrol_d3d11.pro2
-rw-r--r--examples/quick/rendercontrol/rendercontrol_d3d11/window.cpp79
-rw-r--r--examples/quick/rendercontrol/rendercontrol_d3d11/window.h55
-rw-r--r--examples/quick/rendercontrol/rendercontrol_opengl/CMakeLists.txt69
-rw-r--r--examples/quick/rendercontrol/rendercontrol_opengl/cuberenderer.cpp53
-rw-r--r--examples/quick/rendercontrol/rendercontrol_opengl/cuberenderer.h51
-rw-r--r--examples/quick/rendercontrol/rendercontrol_opengl/demo.qml63
-rw-r--r--examples/quick/rendercontrol/rendercontrol_opengl/doc/src/rendercontrol_opengl.qdoc45
-rw-r--r--examples/quick/rendercontrol/rendercontrol_opengl/main.cpp53
-rw-r--r--examples/quick/rendercontrol/rendercontrol_opengl/rendercontrol.qrc2
-rw-r--r--examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.cpp66
-rw-r--r--examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.h53
-rw-r--r--examples/quick/rendercontrol/rendercontrol_rhi/CMakeLists.txt44
-rw-r--r--examples/quick/rendercontrol/rendercontrol_rhi/demo.qml156
-rw-r--r--examples/quick/rendercontrol/rendercontrol_rhi/doc/images/rendercontrol-rhi-example.jpgbin0 -> 117091 bytes
-rw-r--r--examples/quick/rendercontrol/rendercontrol_rhi/doc/src/rendercontrol_rhi.qdoc140
-rw-r--r--examples/quick/rendercontrol/rendercontrol_rhi/main.cpp640
-rw-r--r--examples/quick/rendercontrol/rendercontrol_rhi/rendercontrol_rhi.pro10
-rw-r--r--examples/quick/rendercontrol/rendercontrol_rhi/rendercontrol_rhi.qrc (renamed from examples/quick/delegatechooser/qml.qrc)2
-rw-r--r--examples/quick/responsivelayouts/CMakeLists.txt47
-rw-r--r--examples/quick/responsivelayouts/doc/images/qtquicklayouts-example-responsivelayouts.pngbin0 -> 34381 bytes
-rw-r--r--examples/quick/responsivelayouts/doc/src/qtquickresponsiveLayouts-examples.qdoc67
-rw-r--r--examples/quick/responsivelayouts/icons/grid.svg4
-rw-r--r--examples/quick/responsivelayouts/icons/settings.svg4
-rw-r--r--examples/quick/responsivelayouts/icons/text.svg4
-rw-r--r--examples/quick/responsivelayouts/main.cpp15
-rw-r--r--examples/quick/responsivelayouts/responsivelayouts.pro14
-rw-r--r--examples/quick/responsivelayouts/responsivelayouts.qml160
-rw-r--r--examples/quick/responsivelayouts/responsivelayouts.qrc8
-rw-r--r--examples/quick/righttoleft/CMakeLists.txt128
-rw-r--r--examples/quick/righttoleft/doc/images/qml-righttoleft-example.pngbin35323 -> 0 bytes
-rw-r--r--examples/quick/righttoleft/doc/src/righttoleft.qdoc48
-rw-r--r--examples/quick/righttoleft/layoutdirection/layoutdirection.qml265
-rw-r--r--examples/quick/righttoleft/layoutdirection/layoutdirection.qmlproject16
-rw-r--r--examples/quick/righttoleft/layoutmirroring/layoutmirroring.qml213
-rw-r--r--examples/quick/righttoleft/layoutmirroring/layoutmirroring.qmlproject16
-rw-r--r--examples/quick/righttoleft/main.cpp51
-rw-r--r--examples/quick/righttoleft/righttoleft.pro10
-rw-r--r--examples/quick/righttoleft/righttoleft.qml66
-rw-r--r--examples/quick/righttoleft/righttoleft.qmlproject16
-rw-r--r--examples/quick/righttoleft/righttoleft.qrc8
-rw-r--r--examples/quick/righttoleft/textalignment/textalignment.qml468
-rw-r--r--examples/quick/righttoleft/textalignment/textalignment.qmlproject16
-rw-r--r--examples/quick/scenegraph/.prev_CMakeLists.txt22
-rw-r--r--examples/quick/scenegraph/CMakeLists.txt29
-rw-r--r--examples/quick/scenegraph/customgeometry/.prev_CMakeLists.txt60
-rw-r--r--examples/quick/scenegraph/customgeometry/CMakeLists.txt72
-rw-r--r--examples/quick/scenegraph/customgeometry/beziercurve.cpp57
-rw-r--r--examples/quick/scenegraph/customgeometry/beziercurve.h55
-rw-r--r--examples/quick/scenegraph/customgeometry/doc/src/customgeometry.qdoc62
-rw-r--r--examples/quick/scenegraph/customgeometry/main.cpp51
-rw-r--r--examples/quick/scenegraph/customgeometry/main.qml57
-rw-r--r--examples/quick/scenegraph/custommaterial/.prev_CMakeLists.txt64
-rw-r--r--examples/quick/scenegraph/custommaterial/CMakeLists.txt81
-rw-r--r--examples/quick/scenegraph/custommaterial/customitem.cpp51
-rw-r--r--examples/quick/scenegraph/custommaterial/customitem.h53
-rw-r--r--examples/quick/scenegraph/custommaterial/doc/src/custommaterial.qdoc29
-rw-r--r--examples/quick/scenegraph/custommaterial/main.cpp51
-rw-r--r--examples/quick/scenegraph/custommaterial/main.qml59
-rw-r--r--examples/quick/scenegraph/custommaterial/shaders/mandelbrot.frag22
-rw-r--r--examples/quick/scenegraph/custommaterial/shaders/mandelbrot.frag.qsbbin2538 -> 2603 bytes
-rw-r--r--examples/quick/scenegraph/custommaterial/shaders/mandelbrot.vert.qsbbin1547 -> 1521 bytes
-rw-r--r--examples/quick/scenegraph/customrendernode/CMakeLists.txt54
-rw-r--r--examples/quick/scenegraph/customrendernode/customrender.cpp214
-rw-r--r--examples/quick/scenegraph/customrendernode/customrender.h34
-rw-r--r--examples/quick/scenegraph/customrendernode/doc/images/customrendernode-example.jpgbin0 -> 38552 bytes
-rw-r--r--examples/quick/scenegraph/customrendernode/doc/src/customrendernode.qdoc128
-rw-r--r--examples/quick/scenegraph/customrendernode/main.cpp56
-rw-r--r--examples/quick/scenegraph/customrendernode/main.qml132
-rw-r--r--examples/quick/scenegraph/customrendernode/shaders/customrender.frag18
-rw-r--r--examples/quick/scenegraph/customrendernode/shaders/customrender.vert31
-rw-r--r--examples/quick/scenegraph/d3d11underqml/CMakeLists.txt70
-rw-r--r--examples/quick/scenegraph/d3d11underqml/d3d11squircle.cpp53
-rw-r--r--examples/quick/scenegraph/d3d11underqml/d3d11squircle.h51
-rw-r--r--examples/quick/scenegraph/d3d11underqml/doc/src/d3d11underqml.qdoc29
-rw-r--r--examples/quick/scenegraph/d3d11underqml/main.cpp55
-rw-r--r--examples/quick/scenegraph/d3d11underqml/main.qml55
-rw-r--r--examples/quick/scenegraph/d3d11underqml/squircle.frag3
-rw-r--r--examples/quick/scenegraph/fboitem/CMakeLists.txt68
-rw-r--r--examples/quick/scenegraph/fboitem/doc/images/fboitem-example.jpgbin25863 -> 0 bytes
-rw-r--r--examples/quick/scenegraph/fboitem/doc/src/fboitem.qdoc36
-rw-r--r--examples/quick/scenegraph/fboitem/fboinsgrenderer.cpp85
-rw-r--r--examples/quick/scenegraph/fboitem/fboinsgrenderer.h66
-rw-r--r--examples/quick/scenegraph/fboitem/fboitem.pro20
-rw-r--r--examples/quick/scenegraph/fboitem/fboitem.qrc6
-rw-r--r--examples/quick/scenegraph/fboitem/main.cpp69
-rw-r--r--examples/quick/scenegraph/fboitem/main.qml129
-rw-r--r--examples/quick/scenegraph/fboitem/shaders/checker.frag22
-rw-r--r--examples/quick/scenegraph/fboitem/shaders/checker.frag.qsbbin953 -> 0 bytes
-rw-r--r--examples/quick/scenegraph/graph/CMakeLists.txt79
-rw-r--r--examples/quick/scenegraph/graph/doc/src/graph.qdoc29
-rw-r--r--examples/quick/scenegraph/graph/graph.cpp51
-rw-r--r--examples/quick/scenegraph/graph/graph.h51
-rw-r--r--examples/quick/scenegraph/graph/gridnode.cpp51
-rw-r--r--examples/quick/scenegraph/graph/gridnode.h51
-rw-r--r--examples/quick/scenegraph/graph/linenode.cpp57
-rw-r--r--examples/quick/scenegraph/graph/linenode.h51
-rw-r--r--examples/quick/scenegraph/graph/main.cpp55
-rw-r--r--examples/quick/scenegraph/graph/main.qml67
-rw-r--r--examples/quick/scenegraph/graph/noisynode.cpp58
-rw-r--r--examples/quick/scenegraph/graph/noisynode.h51
-rw-r--r--examples/quick/scenegraph/graph/shaders/compile.bat49
-rw-r--r--examples/quick/scenegraph/graph/shaders/line.frag3
-rw-r--r--examples/quick/scenegraph/graph/shaders/noisy.frag3
-rw-r--r--examples/quick/scenegraph/metaltextureimport/CMakeLists.txt77
-rw-r--r--examples/quick/scenegraph/metaltextureimport/doc/src/metaltextureimport.qdoc34
-rw-r--r--examples/quick/scenegraph/metaltextureimport/main.cpp53
-rw-r--r--examples/quick/scenegraph/metaltextureimport/main.qml55
-rw-r--r--examples/quick/scenegraph/metaltextureimport/metaltextureimport.h51
-rw-r--r--examples/quick/scenegraph/metaltextureimport/metaltextureimport.mm51
-rw-r--r--examples/quick/scenegraph/metaltextureimport/squircle.frag3
-rw-r--r--examples/quick/scenegraph/metalunderqml/CMakeLists.txt74
-rw-r--r--examples/quick/scenegraph/metalunderqml/doc/src/metalunderqml.qdoc29
-rw-r--r--examples/quick/scenegraph/metalunderqml/main.cpp55
-rw-r--r--examples/quick/scenegraph/metalunderqml/main.qml55
-rw-r--r--examples/quick/scenegraph/metalunderqml/metalsquircle.h51
-rw-r--r--examples/quick/scenegraph/metalunderqml/metalsquircle.mm53
-rw-r--r--examples/quick/scenegraph/metalunderqml/squircle.frag3
-rw-r--r--examples/quick/scenegraph/openglunderqml/CMakeLists.txt73
-rw-r--r--examples/quick/scenegraph/openglunderqml/doc/src/openglunderqml.qdoc30
-rw-r--r--examples/quick/scenegraph/openglunderqml/main.cpp55
-rw-r--r--examples/quick/scenegraph/openglunderqml/main.qml57
-rw-r--r--examples/quick/scenegraph/openglunderqml/squircle.cpp53
-rw-r--r--examples/quick/scenegraph/openglunderqml/squircle.h58
-rw-r--r--examples/quick/scenegraph/rhitextureitem/CMakeLists.txt77
-rw-r--r--examples/quick/scenegraph/rhitextureitem/SettingsDrawer.qml117
-rw-r--r--examples/quick/scenegraph/rhitextureitem/doc/images/rhitextureitem-example.jpgbin0 -> 96428 bytes
-rw-r--r--examples/quick/scenegraph/rhitextureitem/doc/src/rhitextureitem.qdoc106
-rw-r--r--examples/quick/scenegraph/rhitextureitem/icon_settings.pngbin0 -> 3175 bytes
-rw-r--r--examples/quick/scenegraph/rhitextureitem/icon_settings@2x.pngbin0 -> 6616 bytes
-rw-r--r--examples/quick/scenegraph/rhitextureitem/icon_settings@3x.pngbin0 -> 10083 bytes
-rw-r--r--examples/quick/scenegraph/rhitextureitem/icon_settings@4x.pngbin0 -> 13502 bytes
-rw-r--r--examples/quick/scenegraph/rhitextureitem/main.cpp18
-rw-r--r--examples/quick/scenegraph/rhitextureitem/main.qml259
-rw-r--r--examples/quick/scenegraph/rhitextureitem/prebuilts_for_qmake/checker.frag.qsbbin0 -> 1611 bytes
-rw-r--r--examples/quick/scenegraph/rhitextureitem/prebuilts_for_qmake/color.frag.qsbbin0 -> 853 bytes
-rw-r--r--examples/quick/scenegraph/rhitextureitem/prebuilts_for_qmake/color.vert.qsbbin0 -> 1256 bytes
-rw-r--r--examples/quick/scenegraph/rhitextureitem/rhitextureitem.cpp141
-rw-r--r--examples/quick/scenegraph/rhitextureitem/rhitextureitem.h57
-rw-r--r--examples/quick/scenegraph/rhitextureitem/rhitextureitem.pro16
-rw-r--r--examples/quick/scenegraph/rhitextureitem/rhitextureitem.qrc8
-rw-r--r--examples/quick/scenegraph/rhitextureitem/shaders/checker.frag26
-rw-r--r--examples/quick/scenegraph/rhitextureitem/shaders/color.frag13
-rw-r--r--examples/quick/scenegraph/rhitextureitem/shaders/color.vert16
-rw-r--r--examples/quick/scenegraph/rhiunderqml/CMakeLists.txt61
-rw-r--r--examples/quick/scenegraph/rhiunderqml/doc/images/rhiunderqml-example.jpgbin0 -> 35984 bytes
-rw-r--r--examples/quick/scenegraph/rhiunderqml/doc/src/rhiunderqml.qdoc236
-rw-r--r--examples/quick/scenegraph/rhiunderqml/main.cpp17
-rw-r--r--examples/quick/scenegraph/rhiunderqml/main.qml39
-rw-r--r--examples/quick/scenegraph/rhiunderqml/prebuilts_for_qmake/squircle_rhi.frag.qsbbin0 -> 1537 bytes
-rw-r--r--examples/quick/scenegraph/rhiunderqml/prebuilts_for_qmake/squircle_rhi.vert.qsbbin0 -> 1214 bytes
-rw-r--r--examples/quick/scenegraph/rhiunderqml/rhisquircle.cpp224
-rw-r--r--examples/quick/scenegraph/rhiunderqml/rhisquircle.h43
-rw-r--r--examples/quick/scenegraph/rhiunderqml/rhiunderqml.pro11
-rw-r--r--examples/quick/scenegraph/rhiunderqml/rhiunderqml.qrc7
-rw-r--r--examples/quick/scenegraph/scenegraph.pro7
-rw-r--r--examples/quick/scenegraph/shared/logorenderer.cpp266
-rw-r--r--examples/quick/scenegraph/shared/logorenderer.h88
-rw-r--r--examples/quick/scenegraph/shared/squircle_rhi.frag14
-rw-r--r--examples/quick/scenegraph/shared/squircle_rhi.vert7
-rw-r--r--examples/quick/scenegraph/threadedanimation/CMakeLists.txt73
-rw-r--r--examples/quick/scenegraph/threadedanimation/doc/images/threadedanimation-example.jpgbin0 -> 37409 bytes
-rw-r--r--examples/quick/scenegraph/threadedanimation/doc/src/threadedanimation.qdoc33
-rw-r--r--examples/quick/scenegraph/threadedanimation/main.cpp53
-rw-r--r--examples/quick/scenegraph/threadedanimation/main.qml59
-rw-r--r--examples/quick/scenegraph/threadedanimation/spinner.cpp51
-rw-r--r--examples/quick/scenegraph/threadedanimation/spinner.h53
-rw-r--r--examples/quick/scenegraph/twotextureproviders/CMakeLists.txt79
-rw-r--r--examples/quick/scenegraph/twotextureproviders/doc/src/twotextureproviders.qdoc29
-rw-r--r--examples/quick/scenegraph/twotextureproviders/main.cpp53
-rw-r--r--examples/quick/scenegraph/twotextureproviders/main.qml63
-rw-r--r--examples/quick/scenegraph/twotextureproviders/shaders/checker.frag3
-rw-r--r--examples/quick/scenegraph/twotextureproviders/shaders/compile.bat42
-rw-r--r--examples/quick/scenegraph/twotextureproviders/shaders/xorblender.frag3
-rw-r--r--examples/quick/scenegraph/twotextureproviders/xorblender.cpp51
-rw-r--r--examples/quick/scenegraph/twotextureproviders/xorblender.h53
-rw-r--r--examples/quick/scenegraph/vulkantextureimport/CMakeLists.txt78
-rw-r--r--examples/quick/scenegraph/vulkantextureimport/doc/src/vulkantextureimport.qdoc31
-rw-r--r--examples/quick/scenegraph/vulkantextureimport/main.cpp53
-rw-r--r--examples/quick/scenegraph/vulkantextureimport/main.qml57
-rw-r--r--examples/quick/scenegraph/vulkantextureimport/vulkantextureimport.cpp51
-rw-r--r--examples/quick/scenegraph/vulkantextureimport/vulkantextureimport.h51
-rw-r--r--examples/quick/scenegraph/vulkanunderqml/CMakeLists.txt78
-rw-r--r--examples/quick/scenegraph/vulkanunderqml/doc/src/vulkanunderqml.qdoc116
-rw-r--r--examples/quick/scenegraph/vulkanunderqml/main.cpp53
-rw-r--r--examples/quick/scenegraph/vulkanunderqml/main.qml57
-rw-r--r--examples/quick/scenegraph/vulkanunderqml/vulkansquircle.cpp57
-rw-r--r--examples/quick/scenegraph/vulkanunderqml/vulkansquircle.h51
-rw-r--r--examples/quick/shadereffects/CMakeLists.txt92
-rw-r--r--examples/quick/shadereffects/content/Slider.qml102
-rw-r--r--examples/quick/shadereffects/content/shaders/blur.frag3
-rw-r--r--examples/quick/shadereffects/content/shaders/colorize.frag3
-rwxr-xr-xexamples/quick/shadereffects/content/shaders/compile.bat56
-rw-r--r--examples/quick/shadereffects/content/shaders/outline.frag3
-rw-r--r--examples/quick/shadereffects/content/shaders/shadow.frag3
-rw-r--r--examples/quick/shadereffects/content/shaders/wobble.frag3
-rw-r--r--examples/quick/shadereffects/doc/src/shadereffects.qdoc29
-rw-r--r--examples/quick/shadereffects/main.cpp51
-rw-r--r--examples/quick/shadereffects/shadereffects.qml73
-rw-r--r--examples/quick/shadereffects/shadereffects.qrc3
-rw-r--r--examples/quick/shapes/CMakeLists.txt169
-rw-r--r--examples/quick/shapes/content/clippedtigers.qml137
-rw-r--r--examples/quick/shapes/content/interactive.qml344
-rw-r--r--examples/quick/shapes/content/item10.qml174
-rw-r--r--examples/quick/shapes/content/item11.qml115
-rw-r--r--examples/quick/shapes/content/item12.qml113
-rw-r--r--examples/quick/shapes/content/item13.qml97
-rw-r--r--examples/quick/shapes/content/item14.qml91
-rw-r--r--examples/quick/shapes/content/item15.qml113
-rw-r--r--examples/quick/shapes/content/item17.qml77
-rw-r--r--examples/quick/shapes/content/item18.qml71
-rw-r--r--examples/quick/shapes/content/item2.qml153
-rw-r--r--examples/quick/shapes/content/item3.qml98
-rw-r--r--examples/quick/shapes/content/item4.qml86
-rw-r--r--examples/quick/shapes/content/item5.qml89
-rw-r--r--examples/quick/shapes/content/item6.qml89
-rw-r--r--examples/quick/shapes/content/item7.qml95
-rw-r--r--examples/quick/shapes/content/item8.qml93
-rw-r--r--examples/quick/shapes/content/item9.qml100
-rw-r--r--examples/quick/shapes/content/main.qml65
-rw-r--r--examples/quick/shapes/content/sampling.qml186
-rw-r--r--examples/quick/shapes/content/shapegallery.qml200
-rw-r--r--examples/quick/shapes/content/tapableTriangle.qml101
-rw-r--r--examples/quick/shapes/doc/src/shapes.qdoc39
-rw-r--r--examples/quick/shapes/main.cpp51
-rw-r--r--examples/quick/shapes/shapes.pro31
-rw-r--r--examples/quick/shapes/shapes.qrc33
-rw-r--r--examples/quick/shared/Button.qml55
-rw-r--r--examples/quick/shared/CMakeLists.txt38
-rw-r--r--examples/quick/shared/CheckBox.qml53
-rw-r--r--examples/quick/shared/FlickrRssModel.qml92
-rw-r--r--examples/quick/shared/Images.qml14
-rw-r--r--examples/quick/shared/Label.qml53
-rw-r--r--examples/quick/shared/LauncherList.qml77
-rw-r--r--examples/quick/shared/SimpleLauncherDelegate.qml126
-rw-r--r--examples/quick/shared/Slider.qml69
-rw-r--r--examples/quick/shared/TabSet.qml55
-rw-r--r--examples/quick/shared/TextField.qml53
-rw-r--r--examples/quick/shared/qmldir3
-rw-r--r--examples/quick/shared/shared.h66
-rw-r--r--examples/quick/shared/shared.qrc15
-rw-r--r--examples/quick/tableview/CMakeLists.txt6
-rw-r--r--examples/quick/tableview/gameoflife/CMakeLists.txt72
-rw-r--r--examples/quick/tableview/gameoflife/doc/src/gameoflife.qdoc29
-rw-r--r--examples/quick/tableview/gameoflife/gameoflifemodel.cpp51
-rw-r--r--examples/quick/tableview/gameoflife/gameoflifemodel.h51
-rw-r--r--examples/quick/tableview/gameoflife/main.cpp53
-rw-r--r--examples/quick/tableview/gameoflife/main.qml75
-rw-r--r--examples/quick/tableview/pixelator/CMakeLists.txt70
-rw-r--r--examples/quick/tableview/pixelator/doc/src/pixelator.qdoc29
-rw-r--r--examples/quick/tableview/pixelator/imagemodel.cpp51
-rw-r--r--examples/quick/tableview/pixelator/imagemodel.h51
-rw-r--r--examples/quick/tableview/pixelator/main.cpp53
-rw-r--r--examples/quick/tableview/pixelator/main.qml57
-rw-r--r--examples/quick/text/.prev_CMakeLists.txt144
-rw-r--r--examples/quick/text/CMakeLists.txt190
-rw-r--r--examples/quick/text/doc/src/text.qdoc29
-rw-r--r--examples/quick/text/fonts/availableFonts.qml60
-rw-r--r--examples/quick/text/fonts/banner.qml84
-rw-r--r--examples/quick/text/fonts/fonts.qml104
-rw-r--r--examples/quick/text/fonts/hello.qml82
-rw-r--r--examples/quick/text/imgtag/TextWithImage.qml53
-rw-r--r--examples/quick/text/imgtag/imgtag.qml53
-rw-r--r--examples/quick/text/main.cpp51
-rw-r--r--examples/quick/text/styledtext-layout.qml71
-rw-r--r--examples/quick/text/text.qml68
-rw-r--r--examples/quick/text/text.qmlproject1
-rw-r--r--examples/quick/text/text.qrc7
-rw-r--r--examples/quick/text/textselection/pics/endHandle.pngbin90 -> 0 bytes
-rw-r--r--examples/quick/text/textselection/pics/endHandle.sci5
-rw-r--r--examples/quick/text/textselection/pics/startHandle.pngbin88 -> 0 bytes
-rw-r--r--examples/quick/text/textselection/pics/startHandle.sci5
-rw-r--r--examples/quick/text/textselection/textselection.qml221
-rw-r--r--examples/quick/threading/CMakeLists.txt130
-rw-r--r--examples/quick/threading/doc/images/qml-threading-example.pngbin22778 -> 0 bytes
-rw-r--r--examples/quick/threading/doc/src/threading.qdoc68
-rw-r--r--examples/quick/threading/main.cpp51
-rw-r--r--examples/quick/threading/threadedlistmodel/dataloader.mjs59
-rw-r--r--examples/quick/threading/threadedlistmodel/doc/src/threadedlistmodel.qdoc37
-rw-r--r--examples/quick/threading/threadedlistmodel/threadedlistmodel.qmlproject66
-rw-r--r--examples/quick/threading/threadedlistmodel/timedisplay.qml89
-rw-r--r--examples/quick/threading/threading.qml65
-rw-r--r--examples/quick/threading/threading.qmlproject16
-rw-r--r--examples/quick/threading/threading.qrc10
-rw-r--r--examples/quick/threading/workerscript/Spinner.qml98
-rw-r--r--examples/quick/threading/workerscript/workerscript.mjs74
-rw-r--r--examples/quick/threading/workerscript/workerscript.qml109
-rw-r--r--examples/quick/threading/workerscript/workerscript.qmlproject66
-rw-r--r--examples/quick/touchinteraction/CMakeLists.txt147
-rw-r--r--examples/quick/touchinteraction/doc/images/qml-touchinteraction-example.pngbin35860 -> 0 bytes
-rw-r--r--examples/quick/touchinteraction/doc/src/touchinteraction.qdoc79
-rw-r--r--examples/quick/touchinteraction/flickable/basic-flickable.qml80
-rw-r--r--examples/quick/touchinteraction/flickable/content/Panel.qml155
-rw-r--r--examples/quick/touchinteraction/flickable/corkboards.qml99
-rw-r--r--examples/quick/touchinteraction/main.cpp51
-rw-r--r--examples/quick/touchinteraction/multipointtouch/bearwhack.qml145
-rw-r--r--examples/quick/touchinteraction/multipointtouch/content/AugmentedTouchPoint.qml82
-rw-r--r--examples/quick/touchinteraction/multipointtouch/content/Bear0.pngbin14359 -> 0 bytes
-rw-r--r--examples/quick/touchinteraction/multipointtouch/content/Bear1.pngbin99378 -> 0 bytes
-rw-r--r--examples/quick/touchinteraction/multipointtouch/content/Bear2.pngbin80759 -> 0 bytes
-rw-r--r--examples/quick/touchinteraction/multipointtouch/content/Bear3.pngbin21122 -> 0 bytes
-rw-r--r--examples/quick/touchinteraction/multipointtouch/content/BearB.pngbin16505 -> 0 bytes
-rw-r--r--examples/quick/touchinteraction/multipointtouch/content/BearWhackParticleSystem.qml193
-rw-r--r--examples/quick/touchinteraction/multipointtouch/content/ParticleFlame.qml80
-rw-r--r--examples/quick/touchinteraction/multipointtouch/content/blur-circle3.pngbin5148 -> 0 bytes
-rw-r--r--examples/quick/touchinteraction/multipointtouch/content/heart-blur.pngbin5406 -> 0 bytes
-rw-r--r--examples/quick/touchinteraction/multipointtouch/content/title.pngbin76389 -> 0 bytes
-rw-r--r--examples/quick/touchinteraction/multipointtouch/multiflame.qml105
-rw-r--r--examples/quick/touchinteraction/pincharea/flickresize.qml109
-rw-r--r--examples/quick/touchinteraction/pincharea/qt-logo.jpgbin40886 -> 0 bytes
-rw-r--r--examples/quick/touchinteraction/touchinteraction.pro10
-rw-r--r--examples/quick/touchinteraction/touchinteraction.qml68
-rw-r--r--examples/quick/touchinteraction/touchinteraction.qmlproject16
-rw-r--r--examples/quick/touchinteraction/touchinteraction.qrc27
-rw-r--r--examples/quick/tutorials/CMakeLists.txt4
-rw-r--r--examples/quick/tutorials/dynamicview/CMakeLists.txt7
-rw-r--r--examples/quick/tutorials/dynamicview/dynamicview1/CMakeLists.txt49
-rw-r--r--examples/quick/tutorials/dynamicview/dynamicview1/PetsModel.qml107
-rw-r--r--examples/quick/tutorials/dynamicview/dynamicview1/dynamicview.qml82
-rw-r--r--examples/quick/tutorials/dynamicview/dynamicview1/dynamicview1.qrc2
-rw-r--r--examples/quick/tutorials/dynamicview/dynamicview1/main.cpp53
-rw-r--r--examples/quick/tutorials/dynamicview/dynamicview2/CMakeLists.txt49
-rw-r--r--examples/quick/tutorials/dynamicview/dynamicview2/PetsModel.qml107
-rw-r--r--examples/quick/tutorials/dynamicview/dynamicview2/dynamicview.qml101
-rw-r--r--examples/quick/tutorials/dynamicview/dynamicview2/dynamicview2.qrc2
-rw-r--r--examples/quick/tutorials/dynamicview/dynamicview2/main.cpp53
-rw-r--r--examples/quick/tutorials/dynamicview/dynamicview3/CMakeLists.txt49
-rw-r--r--examples/quick/tutorials/dynamicview/dynamicview3/PetsModel.qml107
-rw-r--r--examples/quick/tutorials/dynamicview/dynamicview3/dynamicview.qml110
-rw-r--r--examples/quick/tutorials/dynamicview/dynamicview3/dynamicview3.qrc2
-rw-r--r--examples/quick/tutorials/dynamicview/dynamicview3/main.cpp53
-rw-r--r--examples/quick/tutorials/dynamicview/dynamicview4/CMakeLists.txt50
-rw-r--r--examples/quick/tutorials/dynamicview/dynamicview4/ListSelector.qml95
-rw-r--r--examples/quick/tutorials/dynamicview/dynamicview4/PetsModel.qml107
-rw-r--r--examples/quick/tutorials/dynamicview/dynamicview4/dynamicview.qml133
-rw-r--r--examples/quick/tutorials/dynamicview/dynamicview4/dynamicview4.qrc4
-rw-r--r--examples/quick/tutorials/dynamicview/dynamicview4/main.cpp53
-rw-r--r--examples/quick/tutorials/helloworld/Cell.qml53
-rw-r--r--examples/quick/tutorials/helloworld/tutorial1.qml53
-rw-r--r--examples/quick/tutorials/helloworld/tutorial2.qml53
-rw-r--r--examples/quick/tutorials/helloworld/tutorial3.qml61
-rw-r--r--examples/quick/tutorials/samegame/CMakeLists.txt7
-rw-r--r--examples/quick/tutorials/samegame/samegame1/Block.qml55
-rw-r--r--examples/quick/tutorials/samegame/samegame1/Button.qml53
-rw-r--r--examples/quick/tutorials/samegame/samegame1/CMakeLists.txt53
-rw-r--r--examples/quick/tutorials/samegame/samegame1/main.cpp53
-rw-r--r--examples/quick/tutorials/samegame/samegame1/pics/background.jpg (renamed from examples/quick/tutorials/samegame/shared/pics/background.jpg)bin36473 -> 36473 bytes
-rw-r--r--examples/quick/tutorials/samegame/samegame1/pics/redStone.png (renamed from examples/quick/tutorials/samegame/shared/pics/redStone.png)bin2902 -> 2902 bytes
-rw-r--r--examples/quick/tutorials/samegame/samegame1/samegame.qml55
-rw-r--r--examples/quick/tutorials/samegame/samegame1/samegame1.pro5
-rw-r--r--examples/quick/tutorials/samegame/samegame1/samegame1.qrc4
-rw-r--r--examples/quick/tutorials/samegame/samegame2/Block.qml55
-rw-r--r--examples/quick/tutorials/samegame/samegame2/Button.qml53
-rw-r--r--examples/quick/tutorials/samegame/samegame2/CMakeLists.txt54
-rw-r--r--examples/quick/tutorials/samegame/samegame2/main.cpp53
-rw-r--r--examples/quick/tutorials/samegame/samegame2/pics/background.jpgbin0 -> 36473 bytes
-rw-r--r--examples/quick/tutorials/samegame/samegame2/pics/redStone.pngbin0 -> 2902 bytes
-rw-r--r--examples/quick/tutorials/samegame/samegame2/samegame.qml55
-rw-r--r--examples/quick/tutorials/samegame/samegame2/samegame2.pro5
-rw-r--r--examples/quick/tutorials/samegame/samegame2/samegame2.qrc4
-rw-r--r--examples/quick/tutorials/samegame/samegame3/Block.qml59
-rw-r--r--examples/quick/tutorials/samegame/samegame3/Button.qml53
-rw-r--r--examples/quick/tutorials/samegame/samegame3/CMakeLists.txt57
-rw-r--r--examples/quick/tutorials/samegame/samegame3/Dialog.qml53
-rw-r--r--examples/quick/tutorials/samegame/samegame3/main.cpp53
-rw-r--r--examples/quick/tutorials/samegame/samegame3/pics/background.jpgbin0 -> 36473 bytes
-rw-r--r--examples/quick/tutorials/samegame/samegame3/pics/blueStone.png (renamed from examples/quick/tutorials/samegame/shared/pics/blueStone.png)bin3054 -> 3054 bytes
-rw-r--r--examples/quick/tutorials/samegame/samegame3/pics/greenStone.png (renamed from examples/quick/tutorials/samegame/shared/pics/greenStone.png)bin2932 -> 2932 bytes
-rw-r--r--examples/quick/tutorials/samegame/samegame3/pics/redStone.pngbin0 -> 2902 bytes
-rw-r--r--examples/quick/tutorials/samegame/samegame3/samegame.qml55
-rw-r--r--examples/quick/tutorials/samegame/samegame3/samegame3.pro5
-rw-r--r--examples/quick/tutorials/samegame/samegame3/samegame3.qrc7
-rw-r--r--examples/quick/tutorials/samegame/samegame4/BoomBlock.qml92
-rw-r--r--examples/quick/tutorials/samegame/samegame4/Button.qml44
-rw-r--r--examples/quick/tutorials/samegame/samegame4/CMakeLists.txt64
-rw-r--r--examples/quick/tutorials/samegame/samegame4/Dialog.qml70
-rw-r--r--examples/quick/tutorials/samegame/samegame4/content/BoomBlock.qml139
-rw-r--r--examples/quick/tutorials/samegame/samegame4/content/Button.qml91
-rw-r--r--examples/quick/tutorials/samegame/samegame4/content/Dialog.qml117
-rw-r--r--examples/quick/tutorials/samegame/samegame4/main.cpp53
-rw-r--r--examples/quick/tutorials/samegame/samegame4/pics/background.jpgbin0 -> 36473 bytes
-rw-r--r--examples/quick/tutorials/samegame/samegame4/pics/blueStar.png (renamed from examples/quick/tutorials/samegame/shared/pics/blueStar.png)bin149 -> 149 bytes
-rw-r--r--examples/quick/tutorials/samegame/samegame4/pics/blueStone.pngbin0 -> 3054 bytes
-rw-r--r--examples/quick/tutorials/samegame/samegame4/pics/greenStar.png (renamed from examples/quick/tutorials/samegame/shared/pics/greenStar.png)bin149 -> 149 bytes
-rw-r--r--examples/quick/tutorials/samegame/samegame4/pics/greenStone.pngbin0 -> 2932 bytes
-rw-r--r--examples/quick/tutorials/samegame/samegame4/pics/redStar.png (renamed from examples/quick/tutorials/samegame/shared/pics/redStar.png)bin148 -> 148 bytes
-rw-r--r--examples/quick/tutorials/samegame/samegame4/pics/redStone.pngbin0 -> 2902 bytes
-rw-r--r--examples/quick/tutorials/samegame/samegame4/samegame.js (renamed from examples/quick/tutorials/samegame/samegame4/content/samegame.js)11
-rw-r--r--examples/quick/tutorials/samegame/samegame4/samegame.qml58
-rw-r--r--examples/quick/tutorials/samegame/samegame4/samegame4.pro5
-rw-r--r--examples/quick/tutorials/samegame/samegame4/samegame4.qrc17
-rw-r--r--examples/quick/tutorials/samegame/shared/pics/shared.qrc13
-rw-r--r--examples/quick/tutorials/samegame/shared/pics/star.pngbin262 -> 0 bytes
-rw-r--r--examples/quick/tutorials/samegame/shared/pics/yellowStone.pngbin3056 -> 0 bytes
-rw-r--r--examples/quick/views/CMakeLists.txt230
-rw-r--r--examples/quick/views/delegatemodel/delegatemodel.qmlproject14
-rw-r--r--examples/quick/views/delegatemodel/dragselection.qml181
-rw-r--r--examples/quick/views/delegatemodel/flipable.pro9
-rw-r--r--examples/quick/views/delegatemodel/flipable.qrc9
-rw-r--r--examples/quick/views/delegatemodel/main.cpp51
-rw-r--r--examples/quick/views/delegatemodel/slideshow.qml164
-rw-r--r--examples/quick/views/doc/src/views.qdoc36
-rw-r--r--examples/quick/views/gridview/gridview-example.qml76
-rw-r--r--examples/quick/views/listview/content/PetsModel.qml53
-rw-r--r--examples/quick/views/listview/content/PressAndHoldButton.qml55
-rw-r--r--examples/quick/views/listview/content/RecipesModel.qml85
-rw-r--r--examples/quick/views/listview/content/SmallText.qml55
-rw-r--r--examples/quick/views/listview/content/TextButton.qml55
-rw-r--r--examples/quick/views/listview/content/ToggleButton.qml53
-rw-r--r--examples/quick/views/listview/displaymargin.qml59
-rw-r--r--examples/quick/views/listview/dynamiclist.qml153
-rw-r--r--examples/quick/views/listview/expandingdelegates.qml161
-rw-r--r--examples/quick/views/listview/highlight.qml99
-rw-r--r--examples/quick/views/listview/highlightranges.qml117
-rw-r--r--examples/quick/views/listview/sections.qml154
-rw-r--r--examples/quick/views/main.cpp51
-rw-r--r--examples/quick/views/objectmodel/objectmodel.qml119
-rw-r--r--examples/quick/views/package/Delegate.qml96
-rw-r--r--examples/quick/views/package/view.qml75
-rw-r--r--examples/quick/views/pathview/pathview-example.qml137
-rw-r--r--examples/quick/views/views.qml59
-rw-r--r--examples/quick/views/views.qmlproject1
-rw-r--r--examples/quick/views/views.qrc4
-rw-r--r--examples/quick/window/AllScreens.qml55
-rw-r--r--examples/quick/window/CMakeLists.txt146
-rw-r--r--examples/quick/window/CurrentScreen.qml51
-rw-r--r--examples/quick/window/Splash.qml73
-rw-r--r--examples/quick/window/doc/src/window.qdoc32
-rw-r--r--examples/quick/window/main.cpp58
-rw-r--r--examples/quick/window/window.qml97
-rw-r--r--examples/quick/window/window.qrc2
1119 files changed, 26344 insertions, 38751 deletions
diff --git a/examples/quick/.prev_CMakeLists.txt b/examples/quick/.prev_CMakeLists.txt
deleted file mode 100644
index 5299e95ae2..0000000000
--- a/examples/quick/.prev_CMakeLists.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-# Generated from quick.pro.
-
-add_subdirectory(quick-accessibility)
-add_subdirectory(animation)
-add_subdirectory(draganddrop)
-add_subdirectory(externaldraganddrop)
-add_subdirectory(canvas)
-add_subdirectory(imageelements)
-add_subdirectory(keyinteraction)
-add_subdirectory(layouts)
-add_subdirectory(localstorage)
-add_subdirectory(models)
-add_subdirectory(views)
-add_subdirectory(tableview)
-add_subdirectory(mousearea)
-add_subdirectory(positioners)
-add_subdirectory(righttoleft)
-add_subdirectory(scenegraph)
-add_subdirectory(shadereffects)
-add_subdirectory(text)
-add_subdirectory(threading)
-add_subdirectory(touchinteraction)
-add_subdirectory(tutorials)
-add_subdirectory(customitems)
-add_subdirectory(imageprovider)
-add_subdirectory(imageresponseprovider)
-add_subdirectory(window)
-add_subdirectory(particles)
-add_subdirectory(delegatechooser)
-add_subdirectory(shapes)
-if(QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3)
- add_subdirectory(textureprovider)
- add_subdirectory(rendercontrol)
-endif()
-if(TARGET Qt::Widgets)
- add_subdirectory(embeddedinwidgets)
-endif()
-if(TARGET Qt::Widgets AND (QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3) AND (QT_FEATURE_opengles2 OR QT_FEATURE_opengles3 OR TARGET Qt::QuickWidgets))
- add_subdirectory(quickwidgets)
-endif()
diff --git a/examples/quick/CMakeLists.txt b/examples/quick/CMakeLists.txt
index 6da827e757..ae3580eb56 100644
--- a/examples/quick/CMakeLists.txt
+++ b/examples/quick/CMakeLists.txt
@@ -1,39 +1,68 @@
-# Generated from quick.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-add_subdirectory(quick-accessibility)
-add_subdirectory(animation)
-add_subdirectory(draganddrop)
-add_subdirectory(externaldraganddrop)
-add_subdirectory(canvas)
-add_subdirectory(imageelements)
-add_subdirectory(keyinteraction)
-add_subdirectory(layouts)
-add_subdirectory(localstorage)
+qt_internal_add_example(quick-accessibility)
+qt_internal_add_example(animation)
+qt_internal_add_example(draganddrop)
+qt_internal_add_example(canvas)
+qt_internal_add_example(imageelements)
+qt_internal_add_example(keyinteraction)
+qt_internal_add_example(layouts)
+qt_internal_add_example(responsivelayouts)
+qt_internal_add_example(localstorage)
add_subdirectory(models)
-add_subdirectory(views)
+qt_internal_add_example(views)
add_subdirectory(tableview)
-add_subdirectory(mousearea)
-add_subdirectory(positioners)
-add_subdirectory(righttoleft)
+qt_internal_add_example(mousearea)
+qt_internal_add_example(positioners)
add_subdirectory(scenegraph)
-add_subdirectory(shadereffects)
-add_subdirectory(text)
-add_subdirectory(threading)
-add_subdirectory(touchinteraction)
+qt_internal_add_example(shadereffects)
+qt_internal_add_example(text)
add_subdirectory(tutorials)
add_subdirectory(customitems)
-add_subdirectory(imageprovider)
-add_subdirectory(imageresponseprovider)
-add_subdirectory(window)
+qt_internal_add_example(imageprovider)
+qt_internal_add_example(imageresponseprovider)
+qt_internal_add_example(window)
add_subdirectory(particles)
-add_subdirectory(delegatechooser)
-add_subdirectory(shapes)
+qt_internal_add_example(itemvariablerefreshrate)
+add_subdirectory(multieffect)
if(QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3)
add_subdirectory(rendercontrol)
endif()
-if(TARGET Qt::Widgets)
- add_subdirectory(embeddedinwidgets)
+if(TARGET Qt6::Widgets)
+ qt_internal_add_example(embeddedinwidgets)
endif()
-if(TARGET Qt::QuickWidgets AND TARGET Qt::Widgets AND (QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3))
+if(TARGET Qt6::QuickWidgets AND TARGET Qt6::Widgets AND (QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3))
add_subdirectory(quickwidgets)
endif()
+add_subdirectory(quickshapes)
+
+# qt_examples_build_end() misses at least some of these due to some
+# source subdirectories being added multiple times. See QTBUG-96159.
+set(reused_dir_targets
+ animation_shared
+ canvas_shared
+ views_shared
+ positioners_shared
+ text_shared
+ window_shared
+ imageelements_shared
+ pointerhandlers_shared
+ affectors_shared
+ emitters_shared
+ imageparticle_shared
+ itemparticle_shared
+ system_shared
+ draganddrop_shared
+ testbed_shared
+ itemswitcher_shared
+)
+
+foreach(target IN LISTS reused_dir_targets)
+ if(TARGET ${target})
+ qt_autogen_tools(${target} ENABLE_AUTOGEN_TOOLS moc rcc)
+ if(TARGET Qt6::Widgets)
+ qt_autogen_tools(${target} ENABLE_AUTOGEN_TOOLS uic)
+ endif()
+ endif()
+endforeach()
diff --git a/examples/quick/animation/CMakeLists.txt b/examples/quick/animation/CMakeLists.txt
index 4352823374..5dc6d73547 100644
--- a/examples/quick/animation/CMakeLists.txt
+++ b/examples/quick/animation/CMakeLists.txt
@@ -1,144 +1,67 @@
-# Generated from animation.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(animation LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup(REQUIRES 6.5)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
+add_subdirectory("../shared" "shared")
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/animation")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(animation
+qt_add_executable(animationexample
+ WIN32
+ MACOSX_BUNDLE
main.cpp
)
-set_target_properties(animation PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(animation PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-# Resources:
-set_source_files_properties("../shared/Button.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Button.qml"
-)
-set_source_files_properties("../shared/CheckBox.qml"
- PROPERTIES QT_RESOURCE_ALIAS "CheckBox.qml"
-)
-set_source_files_properties("../shared/FlickrRssModel.qml"
- PROPERTIES QT_RESOURCE_ALIAS "FlickrRssModel.qml"
-)
-set_source_files_properties("../shared/Label.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Label.qml"
-)
-set_source_files_properties("../shared/LauncherList.qml"
- PROPERTIES QT_RESOURCE_ALIAS "LauncherList.qml"
-)
-set_source_files_properties("../shared/SimpleLauncherDelegate.qml"
- PROPERTIES QT_RESOURCE_ALIAS "SimpleLauncherDelegate.qml"
-)
-set_source_files_properties("../shared/Slider.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Slider.qml"
-)
-set_source_files_properties("../shared/TabSet.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TabSet.qml"
-)
-set_source_files_properties("../shared/TextField.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TextField.qml"
-)
-set_source_files_properties("../shared/images/back.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/back.png"
-)
-set_source_files_properties("../shared/images/checkmark.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/checkmark.png"
-)
-set_source_files_properties("../shared/images/next.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/next.png"
-)
-set_source_files_properties("../shared/images/qt-logo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/qt-logo.png"
-)
-set_source_files_properties("../shared/images/slider_handle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/slider_handle.png"
-)
-set_source_files_properties("../shared/images/tab.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/tab.png"
-)
-set(shared_resource_files
- "Button.qml"
- "CheckBox.qml"
- "FlickrRssModel.qml"
- "Label.qml"
- "LauncherList.qml"
- "SimpleLauncherDelegate.qml"
- "Slider.qml"
- "TabSet.qml"
- "TextField.qml"
- "images/back.png"
- "images/checkmark.png"
- "images/next.png"
- "images/qt-logo.png"
- "images/slider_handle.png"
- "images/tab.png"
+target_link_libraries(animationexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
-qt6_add_resources(animation "shared"
- PREFIX
- "/shared"
- BASE
- "../shared"
- FILES
- ${shared_resource_files}
-)
-set(animation_resource_files
- "animation.qml"
- "basics/animators.qml"
- "basics/color-animation.qml"
- "basics/images/face-smile.png"
- "basics/images/moon.png"
- "basics/images/shadow.png"
- "basics/images/star.png"
- "basics/images/sun.png"
- "basics/property-animation.qml"
- "behaviors/FocusRect.qml"
- "behaviors/SideRect.qml"
- "behaviors/behavior-example.qml"
- "behaviors/tvtennis.qml"
- "behaviors/wigglytext.qml"
- "easing/easing.qml"
- "pathanimation/pathanimation.qml"
- "pathinterpolator/pathinterpolator.qml"
- "states/qt-logo.png"
- "states/states.qml"
- "states/transitions.qml"
-)
+add_dependencies(animationexample animation_shared)
-qt6_add_resources(animation "animation"
- PREFIX
- "/animation"
- FILES
- ${animation_resource_files}
+qt_add_qml_module(animationexample
+ URI animation
+ QML_FILES
+ "animation.qml"
+ "basics/animators.qml"
+ "basics/color-animation.qml"
+ "basics/property-animation.qml"
+ "behaviors/FocusRect.qml"
+ "behaviors/SideRect.qml"
+ "behaviors/behavior-example.qml"
+ "behaviors/tvtennis.qml"
+ "behaviors/wigglytext.qml"
+ "easing/easing.qml"
+ "pathanimation/pathanimation.qml"
+ "pathinterpolator/pathinterpolator.qml"
+ "states/states.qml"
+ "states/transitions.qml"
+ RESOURCES
+ "basics/images/face-smile.png"
+ "basics/images/moon.png"
+ "basics/images/shadow.png"
+ "basics/images/star.png"
+ "basics/images/sun.png"
+ "states/qt-logo.png"
)
-install(TARGETS animation
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+install(TARGETS animationexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
+
+qt_generate_deploy_qml_app_script(
+ TARGET animationexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/animation/animation.qml b/examples/quick/animation/animation.qml
index efc4e6fa27..75e6b86b29 100644
--- a/examples/quick/animation/animation.qml
+++ b/examples/quick/animation/animation.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import "../shared" as Examples
+import QtQuick
+import shared as Examples
Item {
height: 480
diff --git a/examples/quick/animation/animation.qmlproject b/examples/quick/animation/animation.qmlproject
index 2e96daa881..94433ab9d0 100644
--- a/examples/quick/animation/animation.qmlproject
+++ b/examples/quick/animation/animation.qmlproject
@@ -2,6 +2,7 @@ import QmlProject 1.1
Project {
mainFile: "animation.qml"
+ importPaths: ["../"]
/* Include .qml, .js, and image files from current directory and subdirectories */
QmlFiles {
diff --git a/examples/quick/animation/animation.qrc b/examples/quick/animation/animation.qrc
index 2d88c03007..3489d66d6e 100644
--- a/examples/quick/animation/animation.qrc
+++ b/examples/quick/animation/animation.qrc
@@ -1,5 +1,5 @@
<RCC>
- <qresource prefix="/animation">
+ <qresource prefix="/qt/qml/animation">
<file>animation.qml</file>
<file>basics/images/face-smile.png</file>
<file>basics/images/moon.png</file>
diff --git a/examples/quick/animation/basics/animators.qml b/examples/quick/animation/basics/animators.qml
index 430e71bb26..80765d21d4 100644
--- a/examples/quick/animation/basics/animators.qml
+++ b/examples/quick/animation/basics/animators.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.2
+import QtQuick
Item {
id: window
diff --git a/examples/quick/animation/basics/color-animation.qml b/examples/quick/animation/basics/color-animation.qml
index 7fbfe0224b..6427e06ad2 100644
--- a/examples/quick/animation/basics/color-animation.qml
+++ b/examples/quick/animation/basics/color-animation.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import QtQuick.Particles 2.0
+import QtQuick
+import QtQuick.Particles
Item {
id: window
diff --git a/examples/quick/animation/basics/property-animation.qml b/examples/quick/animation/basics/property-animation.qml
index 8d640c9dda..cd9b8277f5 100644
--- a/examples/quick/animation/basics/property-animation.qml
+++ b/examples/quick/animation/basics/property-animation.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQml 2.0
-import QtQuick 2.0
+import QtQml
+import QtQuick
Item {
id: window
diff --git a/examples/quick/animation/behaviors/FocusRect.qml b/examples/quick/animation/behaviors/FocusRect.qml
index 5188919606..9841162e57 100644
--- a/examples/quick/animation/behaviors/FocusRect.qml
+++ b/examples/quick/animation/behaviors/FocusRect.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
Rectangle {
id: focusRect
diff --git a/examples/quick/animation/behaviors/SideRect.qml b/examples/quick/animation/behaviors/SideRect.qml
index 19c0528054..5230e5a406 100644
--- a/examples/quick/animation/behaviors/SideRect.qml
+++ b/examples/quick/animation/behaviors/SideRect.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
Rectangle {
id: myRect
diff --git a/examples/quick/animation/behaviors/behavior-example.qml b/examples/quick/animation/behaviors/behavior-example.qml
index 43ca31f185..c994ec18d9 100644
--- a/examples/quick/animation/behaviors/behavior-example.qml
+++ b/examples/quick/animation/behaviors/behavior-example.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
Rectangle {
width: 320; height: 480
diff --git a/examples/quick/animation/behaviors/tvtennis.qml b/examples/quick/animation/behaviors/tvtennis.qml
index 261f603de6..4a55448ad7 100644
--- a/examples/quick/animation/behaviors/tvtennis.qml
+++ b/examples/quick/animation/behaviors/tvtennis.qml
@@ -1,84 +1,74 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
Rectangle {
id: page
width: 320; height: 480;
color: "#1e1b18"
+ state: "right"
+ states: [
+ State {
+ name: "left"
+ PropertyChanges {
+ leftBat {
+ y: (ball.y + ball.height / 2) - leftBat.height / 2
+ }
+ rightBat {
+ y: page.height / 2 - rightBat.height / 2
+ }
+ }
+ },
+ State {
+ name: "right"
+ PropertyChanges {
+ rightBat {
+ y: (ball.y + ball.height / 2) - rightBat.height / 2
+ }
+ leftBat {
+ y: page.height / 2 - leftBat.height / 2
+ }
+ }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ from: "left"; to: "right"
+ NumberAnimation { property: "y"; easing.type: Easing.InOutQuad; duration: 200}
+ },
+ Transition {
+ from: "right"; to: "left"
+ NumberAnimation { property: "y"; easing.type: Easing.InOutQuad; duration: 200}
+ }
+ ]
+
// Make a ball to bounce
Rectangle {
id: ball
- // Add a property for the target y coordinate
- property variant direction : "right"
-
- x: 20; width: 20; height: 20; z: 1
+ width: 20
+ height: 20
+ z: 1
color: "#80c342"
// Move the ball to the right and back to the left repeatedly
SequentialAnimation on x {
loops: Animation.Infinite
NumberAnimation { to: page.width - 40; duration: 2000 }
- PropertyAction { target: ball; property: "direction"; value: "left" }
+ PropertyAction { target: page; property: "state"; value: "left" }
NumberAnimation { to: 20; duration: 2000 }
- PropertyAction { target: ball; property: "direction"; value: "right" }
+ PropertyAction { target: page; property: "state"; value: "right" }
}
// Make y move with a velocity of 200
- Behavior on y { SpringAnimation{ velocity: 200; }
+ Behavior on y {
+ SpringAnimation { velocity: 200; }
}
- Component.onCompleted: y = page.height-10; // start the ball motion
+ Component.onCompleted: y = page.height - 10; // start the ball motion
// Detect the ball hitting the top or bottom of the view and bounce it
onYChanged: {
@@ -95,31 +85,27 @@ Rectangle {
Rectangle {
id: leftBat
color: "#328930"
- x: 2; width: 20; height: 90
- // ![0]
- y: ball.direction == 'left' ? ball.y - 45 : page.height/2 -45;
- Behavior on y { SpringAnimation{ velocity: 300 } }
- // ![0]
+ width: 20; height: 90
+ x: 2;
}
Rectangle {
id: rightBat
color: "#328930"
- x: page.width - 22; width: 20; height: 90
- y: ball.direction == 'right' ? ball.y - 45 : page.height/2 -45;
- Behavior on y { SpringAnimation{ velocity: 300 } }
+ width: 20; height: 90
+ x: page.width - width - 2
}
// The rest, to make it look realistic, if neither ever scores...
- Rectangle { color: "#328930"; x: page.width/2-80; y: 0; width: 40; height: 60 }
- Rectangle { color: "#1e1b18"; x: page.width/2-70; y: 10; width: 20; height: 40 }
- Rectangle { color: "#328930"; x: page.width/2+40; y: 0; width: 40; height: 60 }
- Rectangle { color: "#1e1b18"; x: page.width/2+50; y: 10; width: 20; height: 40 }
+ Rectangle { color: "#328930"; x: page.width / 2 - 80; y: 0; width: 40; height: 60 }
+ Rectangle { color: "#1e1b18"; x: page.width / 2 - 70; y: 10; width: 20; height: 40 }
+ Rectangle { color: "#328930"; x: page.width / 2 + 40; y: 0; width: 40; height: 60 }
+ Rectangle { color: "#1e1b18"; x: page.width / 2 + 50; y: 10; width: 20; height: 40 }
Repeater {
model: page.height / 20
- Rectangle {
+ delegate: Rectangle {
required property int index
color: "#328930"
- x: page.width / 2 - 5
+ x: parent.width / 2 - 5
y: index * 20
width: 10
height: 10
diff --git a/examples/quick/animation/behaviors/wigglytext.qml b/examples/quick/animation/behaviors/wigglytext.qml
index 81d4a8aef9..1b987f6391 100644
--- a/examples/quick/animation/behaviors/wigglytext.qml
+++ b/examples/quick/animation/behaviors/wigglytext.qml
@@ -1,76 +1,31 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQml 2.0
-import QtQuick 2.0
+import QtQml
+import QtQuick
+
+pragma ComponentBehavior: Bound
Rectangle {
id: container
- property string text: "Drag me!"
+ property string text: qsTr("Drag me!")
property bool animated: true
width: 320; height: 480; color: "#474747"; focus: true
Keys.onPressed: (event) => {
- if (event.key == Qt.Key_Delete || event.key == Qt.Key_Backspace)
+ if (event.key === Qt.Key_Delete || event.key === Qt.Key_Backspace)
container.remove()
- else if (event.text != "") {
+ else if (event.text !== "") {
container.append(event.text)
}
}
function append(text) {
container.animated = false
- var lastLetter = container.children[container.children.length - 1]
- var newLetter = letterComponent.createObject(container)
+ const lastLetter = container.children[container.children.length - 1]
+ let newLetter = letterComponent.createObject(container)
newLetter.text = text
newLetter.follow = lastLetter
container.animated = true
@@ -83,8 +38,8 @@ Rectangle {
function doLayout() {
var follow = null
- for (var i = 0; i < container.text.length; ++i) {
- var newLetter = letterComponent.createObject(container)
+ for (let i = 0; i < container.text.length; ++i) {
+ let newLetter = letterComponent.createObject(container)
newLetter.text = container.text[i]
newLetter.follow = follow
follow = newLetter
diff --git a/examples/quick/animation/doc/src/animation.qdoc b/examples/quick/animation/doc/src/animation.qdoc
index 97a574d768..26e056b813 100644
--- a/examples/quick/animation/doc/src/animation.qdoc
+++ b/examples/quick/animation/doc/src/animation.qdoc
@@ -1,29 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Qt Quick Examples - Animation
@@ -31,6 +7,7 @@
\brief This is a collection of QML Animation examples.
\image qml-animations-example.png
\ingroup qtquickexamples
+ \examplecategory {Graphics}
\e Animation is a collection of small QML examples relating to animation.
Each example is a small QML file emphasizing a particular type or feature.
@@ -77,7 +54,6 @@
\e{Tv Tennis} uses complex behaviors to make the paddles follow a ball to
simulate an infinite tennis game. Again, a binding which depends on other
values is applied to the position and a behavior provided the animation.
- \snippet animation/behaviors/tvtennis.qml 0
\section1 Easing Curves
diff --git a/examples/quick/animation/easing/easing.qml b/examples/quick/animation/easing/easing.qml
index 44c078b9a2..8b58bd5538 100644
--- a/examples/quick/animation/easing/easing.qml
+++ b/examples/quick/animation/easing/easing.qml
@@ -1,56 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQml 2.15
-import QtQml.Models 2.15
-import QtQuick 2.0
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQml
+import QtQml.Models
+import QtQuick
+
+pragma ComponentBehavior: Bound
Rectangle {
id: window
@@ -137,7 +92,7 @@ Rectangle {
anchors.verticalCenter: parent.verticalCenter
MouseArea {
- onClicked: if (rect.state == '') rect.state = "right"; else rect.state = ''
+ onClicked: if (rect.state === '') rect.state = "right"; else rect.state = ''
anchors.fill: parent
anchors.margins: -5 // Make MouseArea bigger than the rectangle, itself
}
@@ -145,9 +100,10 @@ Rectangle {
states : State {
name: "right"
PropertyChanges {
- target: rect;
- x: window.width - 76;
- color: delegateInstance.ballColor
+ rect {
+ x: window.width - 76;
+ color: delegateInstance.ballColor
+ }
}
}
diff --git a/examples/quick/animation/main.cpp b/examples/quick/animation/main.cpp
index 2defa0a32e..cec3e1eafa 100644
--- a/examples/quick/animation/main.cpp
+++ b/examples/quick/animation/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(animation/animation)
diff --git a/examples/quick/animation/pathanimation/pathanimation.qml b/examples/quick/animation/pathanimation/pathanimation.qml
index ae96b32680..b366f8178d 100644
--- a/examples/quick/animation/pathanimation/pathanimation.qml
+++ b/examples/quick/animation/pathanimation/pathanimation.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQml 2.0
-import QtQuick 2.0
+import QtQml
+import QtQuick
Rectangle {
id: window
@@ -62,7 +15,7 @@ Rectangle {
antialiasing: true
onPaint: {
- var context = canvas.getContext("2d")
+ let context = canvas.getContext("2d")
context.clearRect(0, 0, width, height)
context.strokeStyle = "black"
context.path = pathAnim.path
@@ -112,7 +65,7 @@ Rectangle {
Text {
anchors.centerIn: parent
- text: "Box"
+ text: qsTr("Box")
}
}
}
diff --git a/examples/quick/animation/pathinterpolator/pathinterpolator.qml b/examples/quick/animation/pathinterpolator/pathinterpolator.qml
index 07a82fc916..102aee9cee 100644
--- a/examples/quick/animation/pathinterpolator/pathinterpolator.qml
+++ b/examples/quick/animation/pathinterpolator/pathinterpolator.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQml 2.0
-import QtQuick 2.0
+import QtQml
+import QtQuick
Rectangle {
id: window
@@ -62,7 +15,7 @@ Rectangle {
antialiasing: true
onPaint: {
- var context = canvas.getContext("2d")
+ let context = canvas.getContext("2d")
context.clearRect(0, 0, width, height)
context.strokeStyle = "black"
context.path = motionPath.path
@@ -118,7 +71,7 @@ Rectangle {
Text {
anchors.centerIn: parent
- text: "Box"
+ text: qsTr("Box")
}
}
}
diff --git a/examples/quick/animation/states/states.qml b/examples/quick/animation/states/states.qml
index 5ff8e5318c..47d10287b1 100644
--- a/examples/quick/animation/states/states.qml
+++ b/examples/quick/animation/states/states.qml
@@ -1,55 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQml 2.0
-import QtQuick 2.0
+import QtQuick
Rectangle {
id: page
@@ -101,13 +53,23 @@ Rectangle {
// In state 'middleRight', move the image to middleRightRect
State {
name: "middleRight"
- PropertyChanges { target: userIcon; x: middleRightRect.x; y: middleRightRect.y }
+ PropertyChanges {
+ userIcon {
+ x: middleRightRect.x
+ y: middleRightRect.y
+ }
+ }
},
// In state 'bottomLeft', move the image to bottomLeftRect
State {
name: "bottomLeft"
- PropertyChanges { target: userIcon; x: bottomLeftRect.x; y: bottomLeftRect.y }
+ PropertyChanges {
+ userIcon {
+ x: bottomLeftRect.x
+ y: bottomLeftRect.y
+ }
+ }
}
// ![0]
]
diff --git a/examples/quick/animation/states/transitions.qml b/examples/quick/animation/states/transitions.qml
index 1cfdfec18a..a318bc82b0 100644
--- a/examples/quick/animation/states/transitions.qml
+++ b/examples/quick/animation/states/transitions.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
/*
This is exactly the same as states.qml, except that we have appended
@@ -105,13 +58,23 @@ Rectangle {
// In state 'middleRight', move the image to middleRightRect
State {
name: "middleRight"
- PropertyChanges { target: userIcon; x: middleRightRect.x; y: middleRightRect.y }
+ PropertyChanges {
+ userIcon {
+ x: middleRightRect.x
+ y: middleRightRect.y
+ }
+ }
},
// In state 'bottomLeft', move the image to bottomLeftRect
State {
name: "bottomLeft"
- PropertyChanges { target: userIcon; x: bottomLeftRect.x; y: bottomLeftRect.y }
+ PropertyChanges {
+ userIcon {
+ x: bottomLeftRect.x
+ y: bottomLeftRect.y
+ }
+ }
}
]
diff --git a/examples/quick/canvas/CMakeLists.txt b/examples/quick/canvas/CMakeLists.txt
index ef978ee80b..b48770f0a6 100644
--- a/examples/quick/canvas/CMakeLists.txt
+++ b/examples/quick/canvas/CMakeLists.txt
@@ -1,135 +1,57 @@
-# Generated from canvas.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(canvas LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup(REQUIRES 6.5)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
+add_subdirectory("../shared" "shared")
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/canvas")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(canvas
+qt_add_executable(canvasexample
+ WIN32
+ MACOSX_BUNDLE
main.cpp
)
-set_target_properties(canvas PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(canvas PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-
-# Resources:
-set(canvas_resource_files
- "bezierCurve/bezierCurve.qml"
- "canvas.qml"
- "clip/clip.qml"
- "contents/qt-logo.png"
- "quadraticCurveTo/quadraticCurveTo.qml"
- "roundedrect/roundedrect.qml"
- "smile/smile.qml"
- "squircle/squircle.png"
- "squircle/squircle.qml"
- "tiger/tiger.js"
- "tiger/tiger.qml"
-)
-
-qt6_add_resources(canvas "canvas"
- PREFIX
- "/canvas"
- FILES
- ${canvas_resource_files}
-)
-set_source_files_properties("../shared/Button.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Button.qml"
-)
-set_source_files_properties("../shared/CheckBox.qml"
- PROPERTIES QT_RESOURCE_ALIAS "CheckBox.qml"
-)
-set_source_files_properties("../shared/FlickrRssModel.qml"
- PROPERTIES QT_RESOURCE_ALIAS "FlickrRssModel.qml"
-)
-set_source_files_properties("../shared/Label.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Label.qml"
-)
-set_source_files_properties("../shared/LauncherList.qml"
- PROPERTIES QT_RESOURCE_ALIAS "LauncherList.qml"
-)
-set_source_files_properties("../shared/SimpleLauncherDelegate.qml"
- PROPERTIES QT_RESOURCE_ALIAS "SimpleLauncherDelegate.qml"
-)
-set_source_files_properties("../shared/Slider.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Slider.qml"
-)
-set_source_files_properties("../shared/TabSet.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TabSet.qml"
-)
-set_source_files_properties("../shared/TextField.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TextField.qml"
-)
-set_source_files_properties("../shared/images/back.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/back.png"
-)
-set_source_files_properties("../shared/images/checkmark.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/checkmark.png"
-)
-set_source_files_properties("../shared/images/next.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/next.png"
-)
-set_source_files_properties("../shared/images/qt-logo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/qt-logo.png"
-)
-set_source_files_properties("../shared/images/slider_handle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/slider_handle.png"
-)
-set_source_files_properties("../shared/images/tab.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/tab.png"
-)
-set(shared_resource_files
- "Button.qml"
- "CheckBox.qml"
- "FlickrRssModel.qml"
- "Label.qml"
- "LauncherList.qml"
- "SimpleLauncherDelegate.qml"
- "Slider.qml"
- "TabSet.qml"
- "TextField.qml"
- "images/back.png"
- "images/checkmark.png"
- "images/next.png"
- "images/qt-logo.png"
- "images/slider_handle.png"
- "images/tab.png"
-)
-qt6_add_resources(canvas "shared"
- PREFIX
- "/shared"
- BASE
- "../shared"
- FILES
- ${shared_resource_files}
-)
-
-install(TARGETS canvas
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
+target_link_libraries(canvasexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
+
+qt_add_qml_module(canvasexample
+ URI canvas
+ QML_FILES
+ "LabeledSlider.qml"
+ "bezierCurve/bezierCurve.qml"
+ "canvas.qml"
+ "clip/clip.qml"
+ "quadraticCurveTo/quadraticCurveTo.qml"
+ "roundedrect/roundedrect.qml"
+ "smile/smile.qml"
+ "squircle/squircle.qml"
+ "tiger/tiger.js"
+ "tiger/tiger.qml"
+ RESOURCES
+ "contents/qt-logo.png"
+ "squircle/squircle.png"
+)
+
+install(TARGETS canvasexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET canvasexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/canvas/LabeledSlider.qml b/examples/quick/canvas/LabeledSlider.qml
new file mode 100644
index 0000000000..fa0ab98f78
--- /dev/null
+++ b/examples/quick/canvas/LabeledSlider.qml
@@ -0,0 +1,37 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+
+Item {
+ id: labeledSlider
+ property alias name: label.text
+ property real min: 0.0
+ property real max: 1.0
+ property alias value: quickControlsSlider.value
+
+ implicitHeight: Math.max(label.implicitHeight, quickControlsSlider.implicitHeight)
+
+ Label {
+ id: label
+ anchors.left: parent.left
+ anchors.leftMargin: 10
+ anchors.verticalCenter: labeledSlider.verticalCenter
+ font: Qt.font({pointSize: 13})
+ }
+
+ Slider {
+ id: quickControlsSlider
+ anchors {
+ verticalCenter: labeledSlider.verticalCenter
+ right: labeledSlider.right
+ rightMargin: 10
+ left: label.right
+ leftMargin: 10
+ }
+ from: labeledSlider.min
+ to: labeledSlider.max
+ width: labeledSlider.width - label.implicitWidth - (label.anchors.leftMargin + anchors.rightMargin + anchors.leftMargin)
+ }
+}
diff --git a/examples/quick/canvas/bezierCurve/bezierCurve.qml b/examples/quick/canvas/bezierCurve/bezierCurve.qml
index 4f573ed64e..0965a1e3db 100644
--- a/examples/quick/canvas/bezierCurve/bezierCurve.qml
+++ b/examples/quick/canvas/bezierCurve/bezierCurve.qml
@@ -1,137 +1,134 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import "../contents"
-import "../../shared"
+import QtQuick
+import QtQuick.Controls
+import "../"
Item {
- id:container
+ id: root
width: 320
height: 480
Column {
- spacing:5
- anchors.fill: parent
- anchors.topMargin: 12
+ spacing: 5
+ anchors {
+ fill: parent
+ topMargin: 12
+ }
- Text {
- font.pointSize: 24
- font.bold: true
- text: "Bezier Curve"
+ Label {
anchors.horizontalCenter: parent.horizontalCenter
- color: "#777"
+ text: qsTr("Bezier Curve")
+ color: Qt.lighter(palette.text)
+ font {
+ pointSize: 24
+ bold: true
+ }
}
Canvas {
- id:canvas
- width:320
- height:280
- property color strokeStyle: Qt.darker(fillStyle, 1.4)
- property color fillStyle: "#b40000" // red
- property int lineWidth: lineWidthCtrl.value
- property bool fill: true
- property bool stroke: true
- property real alpha: 1.0
- property real scale : scaleCtrl.value
- property real rotate : rotateCtrl.value
+ id: canvas
+
+ readonly property color strokeStyle: Qt.darker(fillStyle, 1.4)
+ readonly property color fillStyle: "#b40000" // red
+ readonly property alias lineWidth: lineWidthCtrl.value
+ readonly property alias fill: toggleFillCheckBox.checked
+ readonly property alias stroke: toggleStrokeCheckBox.checked
+ readonly property real alpha: 1.0
+ readonly property alias scale: scaleCtrl.value
+ readonly property alias rotate: rotateCtrl.value
+
+ width: root.width
+ height: parent.height - controls.height
antialiasing: true
- onLineWidthChanged:requestPaint();
- onFillChanged:requestPaint();
- onStrokeChanged:requestPaint();
- onScaleChanged:requestPaint();
- onRotateChanged:requestPaint();
+ onLineWidthChanged: requestPaint()
+ onFillChanged: requestPaint()
+ onStrokeChanged: requestPaint()
+ onScaleChanged: requestPaint()
+ onRotateChanged: requestPaint()
- onPaint: {
- var ctx = canvas.getContext('2d');
- var originX = 85
- var originY = 75
- ctx.save();
- ctx.clearRect(0, 0, canvas.width, canvas.height);
- ctx.translate(originX, originX);
- ctx.globalAlpha = canvas.alpha;
- ctx.strokeStyle = canvas.strokeStyle;
- ctx.fillStyle = canvas.fillStyle;
- ctx.lineWidth = canvas.lineWidth;
+ onPaint: function() {
+ let ctx = canvas.getContext('2d')
+ const originX = 85
+ const originY = 75
+ ctx.save()
+ ctx.clearRect(0, 0, canvas.width, canvas.height)
+ ctx.translate(originX, originX)
+ ctx.globalAlpha = canvas.alpha
+ ctx.strokeStyle = canvas.strokeStyle
+ ctx.fillStyle = canvas.fillStyle
+ ctx.lineWidth = canvas.lineWidth
ctx.translate(originX, originY)
- ctx.scale(canvas.scale, canvas.scale);
- ctx.rotate(canvas.rotate);
+ ctx.scale(canvas.scale, canvas.scale)
+ ctx.rotate(canvas.rotate)
ctx.translate(-originX, -originY)
//! [0]
- ctx.beginPath();
- ctx.moveTo(75,40);
- ctx.bezierCurveTo(75,37,70,25,50,25);
- ctx.bezierCurveTo(20,25,20,62.5,20,62.5);
- ctx.bezierCurveTo(20,80,40,102,75,120);
- ctx.bezierCurveTo(110,102,130,80,130,62.5);
- ctx.bezierCurveTo(130,62.5,130,25,100,25);
- ctx.bezierCurveTo(85,25,75,37,75,40);
- ctx.closePath();
+ ctx.beginPath()
+ ctx.moveTo(75,40)
+ ctx.bezierCurveTo(75,37,70,25,50,25)
+ ctx.bezierCurveTo(20,25,20,62.5,20,62.5)
+ ctx.bezierCurveTo(20,80,40,102,75,120)
+ ctx.bezierCurveTo(110,102,130,80,130,62.5)
+ ctx.bezierCurveTo(130,62.5,130,25,100,25)
+ ctx.bezierCurveTo(85,25,75,37,75,40)
+ ctx.closePath()
//! [0]
if (canvas.fill)
- ctx.fill();
+ ctx.fill()
if (canvas.stroke)
- ctx.stroke();
- ctx.restore();
+ ctx.stroke()
+ ctx.restore()
}
}
}
Column {
id: controls
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 12
- Slider {id: lineWidthCtrl; min: 1; max: 10; init: 2; name: "Outline"}
- Slider {id: scaleCtrl; min: 0.1; max: 10; init: 1; name: "Scale"}
- Slider {id: rotateCtrl; min: 0; max: Math.PI*2; init: 0; name: "Rotate"}
+ anchors {
+ bottom: parent.bottom
+ bottomMargin: 12
+ }
+
+ LabeledSlider {
+ id: lineWidthCtrl
+ name: qsTr("Outline")
+ min: 1
+ max: 10
+ value: 2
+ width: root.width
+ }
+
+ LabeledSlider {
+ id: scaleCtrl
+ name: qsTr("Scale")
+ min: 0.1
+ max: 10
+ value: 1
+ width: root.width
+ }
+
+ LabeledSlider {
+ id: rotateCtrl
+ name: qsTr("Rotate")
+ min: 0
+ max: Math.PI * 2
+ value: 0
+ width: root.width
+ }
+ Row {
+ CheckBox {
+ id: toggleFillCheckBox
+ checked: true
+ text: qsTr("Toggle fill")
+ }
+ CheckBox {
+ id: toggleStrokeCheckBox
+ checked: true
+ text: qsTr("Toggle stroke")
+ }
+ }
}
}
diff --git a/examples/quick/canvas/canvas.qml b/examples/quick/canvas/canvas.qml
index 7768e1092b..6ac856eb6d 100644
--- a/examples/quick/canvas/canvas.qml
+++ b/examples/quick/canvas/canvas.qml
@@ -1,70 +1,30 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import "../shared" as Examples
+import QtQuick
+import shared as Examples
Item {
+ id: root
height: 480
width: 320
Examples.LauncherList {
- id: ll
- anchors.fill: parent
+ anchors.fill: root
Component.onCompleted: {
- addExample("Red heart", "Draws a red heart with bezier curves", Qt.resolvedUrl("bezierCurve/bezierCurve.qml"));
- addExample("Talk bubble", "Draws a talk bubble with quadratic curves", Qt.resolvedUrl("quadraticCurveTo/quadraticCurveTo.qml"));
- addExample("Squircle", "Draws a smooth squircle with simple lines", Qt.resolvedUrl("squircle/squircle.qml"));
- addExample("Rounded rectangle", "Draws a rounded rectangle with lines and arcs", Qt.resolvedUrl("roundedrect/roundedrect.qml"));
- addExample("Smile face", "Draws a smile face with complex paths", Qt.resolvedUrl("smile/smile.qml"));
- addExample("Clip", "Shows the canvas clip feature", Qt.resolvedUrl("clip/clip.qml"));
- addExample("Tiger", "Draw a tiger with a collection of SVG paths", Qt.resolvedUrl("tiger/tiger.qml"));
+ addExample(qsTr("Red heart"), qsTr("Draws a red heart with bezier curves"),
+ Qt.resolvedUrl("bezierCurve/bezierCurve.qml"))
+ addExample(qsTr("Talk bubble"), qsTr("Draws a talk bubble with quadratic curves"),
+ Qt.resolvedUrl("quadraticCurveTo/quadraticCurveTo.qml"))
+ addExample(qsTr("Squircle"), qsTr("Draws a smooth squircle with simple lines"),
+ Qt.resolvedUrl("squircle/squircle.qml"))
+ addExample(qsTr("Rounded rectangle"), qsTr("Draws a rounded rectangle with lines and arcs"),
+ Qt.resolvedUrl("roundedrect/roundedrect.qml"))
+ addExample(qsTr("Smile face"), qsTr("Draws a smile face with complex paths"),
+ Qt.resolvedUrl("smile/smile.qml"))
+ addExample(qsTr("Clip"), qsTr("Shows the canvas clip feature"),
+ Qt.resolvedUrl("clip/clip.qml"))
+ addExample(qsTr("Tiger"), qsTr("Draw a tiger with a collection of SVG paths"),
+ Qt.resolvedUrl("tiger/tiger.qml"))
}
}
}
diff --git a/examples/quick/canvas/canvas.qrc b/examples/quick/canvas/canvas.qrc
index cfdfc844b9..eb7b3ad6d6 100644
--- a/examples/quick/canvas/canvas.qrc
+++ b/examples/quick/canvas/canvas.qrc
@@ -1,6 +1,7 @@
<RCC>
- <qresource prefix="/canvas">
+ <qresource prefix="/qt/qml/canvas">
<file>canvas.qml</file>
+ <file>LabeledSlider.qml</file>
<file>bezierCurve/bezierCurve.qml</file>
<file>clip/clip.qml</file>
<file>contents/qt-logo.png</file>
diff --git a/examples/quick/canvas/clip/clip.qml b/examples/quick/canvas/clip/clip.qml
index 1771121cd6..3d0591f97a 100644
--- a/examples/quick/canvas/clip/clip.qml
+++ b/examples/quick/canvas/clip/clip.qml
@@ -1,158 +1,142 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import "../contents"
-import "../../shared"
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import "../"
Item {
- id:container
+ id: root
width: 320
height: 480
Column {
- spacing:5
- anchors.fill: parent
- anchors.topMargin: 12
- Text {
- font.pointSize: 24
- font.bold: true
- text: "Squircle with Clip"
+ spacing: 5
+ anchors {
+ fill: root
+ topMargin: 12
+ }
+
+ Label {
anchors.horizontalCenter: parent.horizontalCenter
- color: "#777"
+ text: qsTr("Squircle with Clip")
+ color: Qt.lighter(palette.text)
+ font {
+ pointSize: 24
+ bold: true
+ }
}
Canvas {
id: canvas
- width: 320
- height: 280
- property color strokeStyle: Qt.darker(fillStyle, 1.2)
- property color fillStyle:"#14aaff" // green
- property int lineWidth:2
- property int nSize:nCtrl.value
- property real radius:rCtrl.value
- property bool fill:true
- property bool stroke:false
- property real px: width/2
- property real py: height/2 + 20
- property real alpha: 1.0
- property string imagefile:"../contents/qt-logo.png"
+
+ readonly property color strokeStyle: Qt.darker(fillStyle, 1.2)
+ readonly property color fillStyle: "#14aaff" // green
+ readonly property int lineWidth: 2
+ readonly property alias nSize: nCtrl.value
+ readonly property alias radius: rCtrl.value
+ readonly property alias fill: toggleFillCheckBox.checked
+ readonly property alias stroke: toggleStrokeCheckBox.checked
+ readonly property real px: width / 2
+ readonly property real py: height / 2 + 20
+ readonly property real alpha: 1.0
+ readonly property string imagefile: "../contents/qt-logo.png"
+
+ width: root.width
+ height: parent.height - controls.height
antialiasing: true
- Component.onCompleted:loadImage(canvas.imagefile);
-
- onRadiusChanged:requestPaint();
- onLineWidthChanged:requestPaint();
- onNSizeChanged:requestPaint();
- onFillChanged:requestPaint();
- onStrokeChanged:requestPaint();
- onImageLoaded : requestPaint();
- onPaint: squcirle();
-
- function squcirle() {
- var ctx = canvas.getContext("2d");
- var N = canvas.nSize;
- var R = canvas.radius;
-
- N=Math.abs(N);
- var M=N;
- if (N>100) M=100;
- if (N<0.00000000001) M=0.00000000001;
-
- ctx.save();
- ctx.globalAlpha = canvas.alpha;
- ctx.fillStyle = "white";
- ctx.fillRect(0, 0, canvas.width, canvas.height);
-
- ctx.strokeStyle = canvas.strokeStyle;
- ctx.fillStyle = canvas.fillStyle;
- ctx.lineWidth = canvas.lineWidth;
-
- ctx.beginPath();
- var i = 0, x, y;
- for (i=0; i<(2*R+1); i++){
- x = Math.round(i-R) + canvas.px;
- y = Math.round(Math.pow(Math.abs(Math.pow(R,M)-Math.pow(Math.abs(i-R),M)),1/M)) + canvas.py;
-
- if (i == 0)
- ctx.moveTo(x, y);
+
+ Component.onCompleted: loadImage(canvas.imagefile)
+ onRadiusChanged: requestPaint()
+ onLineWidthChanged: requestPaint()
+ onNSizeChanged: requestPaint()
+ onFillChanged: requestPaint()
+ onStrokeChanged: requestPaint()
+ onImageLoaded: requestPaint()
+
+ onPaint: function() {
+ let ctx = canvas.getContext("2d")
+ const N = Math.abs(canvas.nSize)
+ const R = canvas.radius
+
+ const M = Math.max(0.00000000001, Math.min(N, 100))
+
+ ctx.save()
+ ctx.globalAlpha = canvas.alpha
+ ctx.fillStyle = "white"
+ ctx.fillRect(0, 0, canvas.width, canvas.height)
+
+ ctx.strokeStyle = canvas.strokeStyle
+ ctx.fillStyle = canvas.fillStyle
+ ctx.lineWidth = canvas.lineWidth
+
+ ctx.beginPath()
+ let i, x, y
+ for (i = 0; i < (2 * R + 1); i++) {
+ x = Math.round(i - R) + canvas.px
+ y = Math.round(Math.pow(Math.abs(Math.pow(R, M) - Math.pow(Math.abs(i - R), M)), 1 / M)) + canvas.py
+
+ if (i === 0)
+ ctx.moveTo(x, y)
else
- ctx.lineTo(x, y);
+ ctx.lineTo(x, y)
}
- for (i=(2*R); i<(4*R+1); i++){
- x =Math.round(3*R-i)+canvas.px;
- y = Math.round(-Math.pow(Math.abs(Math.pow(R,M)-Math.pow(Math.abs(3*R-i),M)),1/M)) + canvas.py;
- ctx.lineTo(x, y);
+ for (i = (2 * R); i < (4 * R + 1); i++) {
+ x = Math.round(3 * R - i) + canvas.px
+ y = Math.round(-Math.pow(Math.abs(Math.pow(R, M) - Math.pow(Math.abs(3 * R - i), M)), 1 / M)) + canvas.py
+ ctx.lineTo(x, y)
}
- ctx.closePath();
+ ctx.closePath()
if (canvas.stroke) {
- ctx.stroke();
+ ctx.stroke()
}
if (canvas.fill) {
- ctx.fill();
+ ctx.fill()
}
//! [0]
- ctx.clip();
- ctx.drawImage(canvas.imagefile, 0, 0);
+ ctx.clip()
+ ctx.drawImage(canvas.imagefile, 0, 0)
//! [0]
- ctx.restore();
+ ctx.restore()
}
}
}
Column {
id: controls
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 12
- Slider {id: nCtrl; min: 1; max: 10; init: 4; name:"N"}
- Slider {id: rCtrl; min: 30; max: 180; init: 80; name:"Radius"}
+ anchors {
+ bottom: parent.bottom
+ bottomMargin: 12
+ }
+
+ LabeledSlider {
+ id: nCtrl
+ name: qsTr("N")
+ width: root.width
+ min: 1
+ max: 10
+ value: 4
+ }
+ LabeledSlider {
+ id: rCtrl
+ name: qsTr("Radius")
+ width: root.width
+ min: 30
+ max: 180
+ value: 80
+ }
+ Row {
+ CheckBox {
+ id: toggleFillCheckBox
+ checked: true
+ text: qsTr("Toggle fill")
+ }
+ CheckBox {
+ id: toggleStrokeCheckBox
+ text: qsTr("Toggle stroke")
+ }
+ }
}
}
diff --git a/examples/quick/canvas/doc/src/canvas.qdoc b/examples/quick/canvas/doc/src/canvas.qdoc
index 14ee363164..87a7c7b5c4 100644
--- a/examples/quick/canvas/doc/src/canvas.qdoc
+++ b/examples/quick/canvas/doc/src/canvas.qdoc
@@ -1,29 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Qt Quick Examples - Canvas
@@ -31,6 +7,7 @@
\brief This is a collection of QML Canvas examples.
\image qml-canvas-example.png
\ingroup qtquickexamples
+ \examplecategory {Graphics}
\e Canvas is a collection of small QML examples relating to the \l Canvas
type. Each example is a small QML file emphasizing a particular type or
diff --git a/examples/quick/canvas/main.cpp b/examples/quick/canvas/main.cpp
index e2f5eb6bde..160a2e13e1 100644
--- a/examples/quick/canvas/main.cpp
+++ b/examples/quick/canvas/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(canvas/canvas)
diff --git a/examples/quick/canvas/quadraticCurveTo/quadraticCurveTo.qml b/examples/quick/canvas/quadraticCurveTo/quadraticCurveTo.qml
index cd93205995..0f788891ab 100644
--- a/examples/quick/canvas/quadraticCurveTo/quadraticCurveTo.qml
+++ b/examples/quick/canvas/quadraticCurveTo/quadraticCurveTo.qml
@@ -1,145 +1,138 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import "../contents"
-import "../../shared"
+import QtQuick
+import QtQuick.Controls
+import "../"
Item {
- id:container
- width:320
- height:480
+ id: root
+ width: 320
+ height: 480
Column {
- spacing:5
- anchors.fill: parent
- anchors.topMargin: 12
+ spacing: 5
+ anchors {
+ fill: parent
+ topMargin: 12
+ }
- Text {
- font.pointSize: 24
- font.bold: true
- text: "Quadratic Curve"
+ Label {
anchors.horizontalCenter: parent.horizontalCenter
- color: "#777"
+ text: qsTr("Quadratic Curve")
+ color: Qt.lighter(palette.text)
+ font {
+ pointSize: 24
+ bold: true
+ }
}
Canvas {
id: canvas
- width: 320
- height: 280
- property color strokeStyle: Qt.darker(fillStyle, 1.3)
- property color fillStyle: "#14aaff" // blue
- property int lineWidth: lineWidthCtrl.value
- property bool fill: true
- property bool stroke: true
- property real alpha: 1.0
- property real scale : scaleCtrl.value
- property real rotate : rotateCtrl.value
+ readonly property color strokeStyle: Qt.darker(fillStyle, 1.3)
+ readonly property color fillStyle: "#14aaff" // blue
+ readonly property alias lineWidth: lineWidthCtrl.value
+ readonly property alias fill: toggleFillCheckBox.checked
+ readonly property alias stroke: toggleStrokeCheckBox.checked
+ readonly property alias scale: scaleCtrl.value
+ readonly property alias rotate: rotateCtrl.value
+ width: root.width
+ height: parent.height - controls.height
antialiasing: true
- onLineWidthChanged:requestPaint();
- onFillChanged:requestPaint();
- onStrokeChanged:requestPaint();
- onScaleChanged:requestPaint();
- onRotateChanged:requestPaint();
+ onLineWidthChanged: requestPaint()
+ onFillChanged: requestPaint()
+ onStrokeChanged: requestPaint()
+ onScaleChanged: requestPaint()
+ onRotateChanged: requestPaint()
- onPaint: {
- var ctx = canvas.getContext('2d');
- var originX = 75
- var originY = 75
+ onPaint: function() {
+ let ctx = canvas.getContext('2d')
+ const originX = 75
+ const originY = 75
- ctx.save();
- ctx.clearRect(0, 0, canvas.width, canvas.height);
- ctx.translate(originX, originX);
- ctx.strokeStyle = canvas.strokeStyle;
- ctx.fillStyle = canvas.fillStyle;
- ctx.lineWidth = canvas.lineWidth;
+ ctx.save()
+ ctx.clearRect(0, 0, canvas.width, canvas.height)
+ ctx.translate(originX, originX)
+ ctx.strokeStyle = canvas.strokeStyle
+ ctx.fillStyle = canvas.fillStyle
+ ctx.lineWidth = canvas.lineWidth
ctx.translate(originX, originY)
- ctx.rotate(canvas.rotate);
- ctx.scale(canvas.scale, canvas.scale);
+ ctx.rotate(canvas.rotate)
+ ctx.scale(canvas.scale, canvas.scale)
ctx.translate(-originX, -originY)
// ![0]
- ctx.beginPath();
- ctx.moveTo(75,25);
- ctx.quadraticCurveTo(25,25,25,62.5);
- ctx.quadraticCurveTo(25,100,50,100);
- ctx.quadraticCurveTo(50,120,30,125);
- ctx.quadraticCurveTo(60,120,65,100);
- ctx.quadraticCurveTo(125,100,125,62.5);
- ctx.quadraticCurveTo(125,25,75,25);
- ctx.closePath();
+ ctx.beginPath()
+ ctx.moveTo(75, 25)
+ ctx.quadraticCurveTo(25, 25, 25, 62.5)
+ ctx.quadraticCurveTo(25, 100, 50, 100)
+ ctx.quadraticCurveTo(50, 120, 30, 125)
+ ctx.quadraticCurveTo(60, 120, 65, 100)
+ ctx.quadraticCurveTo(125, 100, 125, 62.5)
+ ctx.quadraticCurveTo(125, 25, 75, 25)
+ ctx.closePath()
// ![0]
if (canvas.fill)
- ctx.fill();
+ ctx.fill()
if (canvas.stroke)
- ctx.stroke();
+ ctx.stroke()
// ![1]
- ctx.fillStyle = "white";
- ctx.font = "bold 17px sans-serif";
- ctx.fillText("Qt Quick", 40, 70);
+ ctx.fillStyle = "white"
+ ctx.font = "bold 17px sans-serif"
+ ctx.fillText("Qt Quick", 40, 70)
// ![1]
- ctx.restore();
+ ctx.restore()
}
}
}
Column {
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 12
- Slider {id:lineWidthCtrl; min:1; max:10; init:2; name:"Outline"}
- Slider {id:scaleCtrl; min:0.1; max:10; init:1; name:"Scale"}
- Slider {id:rotateCtrl; min:0; max:Math.PI*2; init:0; name:"Rotate"}
+ id: controls
+ anchors {
+ bottom: parent.bottom
+ bottomMargin: 12
+ }
+
+ LabeledSlider {
+ id: lineWidthCtrl
+ name: qsTr("Outline")
+ width: root.width
+ min: 1
+ max: 10
+ value: 2
+ }
+ LabeledSlider {
+ id: scaleCtrl
+ name: qsTr("Scale")
+ width: root.width
+ min: 0.1
+ max: 10
+ value: 1
+ }
+ LabeledSlider {
+ id: rotateCtrl
+ name: qsTr("Rotate")
+ width: root.width
+ min: 0
+ max: Math.PI * 2
+ value: 0
+ }
+ Row {
+ CheckBox {
+ id: toggleFillCheckBox
+ checked: true
+ text: qsTr("Toggle fill")
+ }
+ CheckBox {
+ id: toggleStrokeCheckBox
+ checked: true
+ text: qsTr("Toggle stroke")
+ }
+ }
}
}
diff --git a/examples/quick/canvas/roundedrect/roundedrect.qml b/examples/quick/canvas/roundedrect/roundedrect.qml
index 08ede9b1e7..26861b921c 100644
--- a/examples/quick/canvas/roundedrect/roundedrect.qml
+++ b/examples/quick/canvas/roundedrect/roundedrect.qml
@@ -1,131 +1,120 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import "../contents"
-import "../../shared"
+import QtQuick
+import QtQuick.Controls
+import "../"
Item {
- id:container
+ id: root
width: 320
height: 480
Column {
spacing: 6
- anchors.fill: parent
- anchors.topMargin: 12
- Text {
- font.pointSize: 24
- font.bold: true
- text: "Rounded rectangle"
+ anchors {
+ fill: parent
+ topMargin: 12
+ }
+
+ Label {
anchors.horizontalCenter: parent.horizontalCenter
- color: "#777"
+ text: qsTr("Rounded rectangle")
+ color: Qt.lighter(palette.text)
+ font {
+ pointSize: 24
+ bold: true
+ }
}
Canvas {
id: canvas
- width: 320
- height: 280
- antialiasing: true
- property int radius: rCtrl.value
- property int rectx: 60
- property int recty: 60
- property int rectWidth: width - 2*rectx
- property int rectHeight: height - 2*recty
- property color strokeStyle: Qt.darker(fillStyle, 1.4)
- property color fillStyle: "#ae32a0" // purple
- property int lineWidth: lineWidthCtrl.value
- property bool fill: true
- property bool stroke: true
- property real alpha: 1.0
+ readonly property alias radius: rCtrl.value
+ readonly property int rectx: 60
+ readonly property int recty: 60
+ readonly property int rectWidth: width - 2 * rectx
+ readonly property int rectHeight: height - 2 * recty
+ readonly property color strokeStyle: Qt.darker(fillStyle, 1.4)
+ readonly property color fillStyle: "#ae32a0" // purple
+ readonly property alias lineWidth: lineWidthCtrl.value
+ readonly property alias fill: toggleFillCheckBox.checked
+ readonly property alias stroke: toggleStrokeCheckBox.checked
+ readonly property real alpha: 1.0
- onLineWidthChanged:requestPaint();
- onFillChanged:requestPaint();
- onStrokeChanged:requestPaint();
- onRadiusChanged:requestPaint();
+ width: root.width
+ height: parent.height - controls.height
+ antialiasing: true
+
+ onLineWidthChanged: requestPaint()
+ onFillChanged: requestPaint()
+ onStrokeChanged: requestPaint()
+ onRadiusChanged: requestPaint()
- onPaint: {
- var ctx = getContext("2d");
- ctx.save();
- ctx.clearRect(0,0,canvas.width, canvas.height);
- ctx.strokeStyle = canvas.strokeStyle;
+ onPaint: function() {
+ var ctx = getContext("2d")
+ ctx.save()
+ ctx.clearRect(0, 0, canvas.width, canvas.height)
+ ctx.strokeStyle = canvas.strokeStyle
ctx.lineWidth = canvas.lineWidth
ctx.fillStyle = canvas.fillStyle
ctx.globalAlpha = canvas.alpha
- ctx.beginPath();
- ctx.moveTo(rectx+radius,recty); // top side
- ctx.lineTo(rectx+rectWidth-radius,recty);
+ ctx.beginPath()
+ ctx.moveTo(rectx + radius, recty) // top side
+ ctx.lineTo(rectx + rectWidth - radius, recty)
// draw top right corner
- ctx.arcTo(rectx+rectWidth,recty,rectx+rectWidth,recty+radius,radius);
- ctx.lineTo(rectx+rectWidth,recty+rectHeight-radius); // right side
+ ctx.arcTo(rectx + rectWidth, recty, rectx + rectWidth, recty + radius, radius)
+ ctx.lineTo(rectx + rectWidth, recty + rectHeight - radius) // right side
// draw bottom right corner
- ctx.arcTo(rectx+rectWidth,recty+rectHeight,rectx+rectWidth-radius,recty+rectHeight,radius);
- ctx.lineTo(rectx+radius,recty+rectHeight); // bottom side
+ ctx.arcTo(rectx + rectWidth, recty + rectHeight, rectx + rectWidth - radius, recty + rectHeight, radius)
+ ctx.lineTo(rectx + radius, recty + rectHeight) // bottom side
// draw bottom left corner
- ctx.arcTo(rectx,recty+rectHeight,rectx,recty+rectHeight-radius,radius);
- ctx.lineTo(rectx,recty+radius); // left side
+ ctx.arcTo(rectx, recty + rectHeight, rectx, recty + rectHeight - radius, radius)
+ ctx.lineTo(rectx, recty + radius) // left side
// draw top left corner
- ctx.arcTo(rectx,recty,rectx+radius,recty,radius);
- ctx.closePath();
+ ctx.arcTo(rectx, recty, rectx + radius, recty, radius)
+ ctx.closePath()
if (canvas.fill)
- ctx.fill();
+ ctx.fill()
if (canvas.stroke)
- ctx.stroke();
- ctx.restore();
+ ctx.stroke()
+ ctx.restore()
}
}
}
Column {
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 12
- Slider {id: lineWidthCtrl ; min: 1 ; max: 10; init: 2 ; name: "Outline"}
- Slider {id: rCtrl ; min: 10 ; max: 80 ; init: 40 ; name: "Radius"}
+ id: controls
+ anchors {
+ bottom: parent.bottom
+ bottomMargin: 12
+ }
+
+ LabeledSlider {
+ id: lineWidthCtrl
+ name: qsTr("Outline")
+ width: root.width
+ min: 1
+ max: 10
+ value: 2
+ }
+ LabeledSlider {
+ id: rCtrl
+ name: qsTr("Radius")
+ width: root.width
+ min: 10
+ max: 80
+ value: 40
+ }
+ Row {
+ CheckBox {
+ id: toggleFillCheckBox
+ checked: true
+ text: qsTr("Toggle fill")
+ }
+ CheckBox {
+ id: toggleStrokeCheckBox
+ checked: true
+ text: qsTr("Toggle stroke")
+ }
+ }
}
}
diff --git a/examples/quick/canvas/smile/smile.qml b/examples/quick/canvas/smile/smile.qml
index cde18d4d38..bf534a3da2 100644
--- a/examples/quick/canvas/smile/smile.qml
+++ b/examples/quick/canvas/smile/smile.qml
@@ -1,138 +1,129 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import "../contents"
-import "../../shared"
+import QtQuick
+import QtQuick.Controls
+import "../"
Item {
- id: container
+ id: root
width: 320
height: 480
Column {
spacing: 6
- anchors.fill: parent
- anchors.topMargin: 12
+ anchors {
+ fill: parent
+ topMargin: 12
+ }
- Text {
- font.pointSize: 24
- font.bold: true
- text: "Smile with arcs"
+ Label {
anchors.horizontalCenter: parent.horizontalCenter
- color: "#777"
+ text: qsTr("Smile with arcs")
+ font {
+ pointSize: 24
+ bold: true
+ }
+ color: Qt.lighter(palette.text)
}
Canvas {
id: canvas
- width: 320
+
+ readonly property color strokeStyle: Qt.darker(fillStyle, 1.6)
+ readonly property color fillStyle: "#e0c31e" // yellow
+ readonly property alias lineWidth: lineWidthCtrl.value
+ readonly property alias fill: toggleFillCheckBox.checked
+ readonly property alias stroke: toggleStrokeCheckBox.checked
+ readonly property alias scale: scaleCtrl.value
+ readonly property alias rotate: rotateCtrl.value
+
+ width: root.width
height: parent.height - controls.height
antialiasing: true
- property color strokeStyle: Qt.darker(fillStyle, 1.6)
- property color fillStyle: "#e0c31e" // yellow
- property int lineWidth: lineWidthCtrl.value
- property bool fill: true
- property bool stroke: true
- property real scale : scaleCtrl.value
- property real rotate : rotateCtrl.value
-
- onLineWidthChanged:requestPaint();
- onFillChanged:requestPaint();
- onStrokeChanged:requestPaint();
- onScaleChanged:requestPaint();
- onRotateChanged:requestPaint();
+ onLineWidthChanged: requestPaint()
+ onFillChanged: requestPaint()
+ onStrokeChanged: requestPaint()
+ onScaleChanged: requestPaint()
+ onRotateChanged: requestPaint()
onPaint: {
- var ctx = canvas.getContext('2d');
- var originX = 85
- var originY = 75
- ctx.save();
- ctx.clearRect(0, 0, canvas.width, canvas.height);
- ctx.translate(originX, originX);
- ctx.strokeStyle = canvas.strokeStyle;
- ctx.fillStyle = canvas.fillStyle;
- ctx.lineWidth = canvas.lineWidth;
+ let ctx = canvas.getContext('2d')
+ const originX = 85
+ const originY = 75
+ ctx.save()
+ ctx.clearRect(0, 0, canvas.width, canvas.height)
+ ctx.translate(originX, originX)
+ ctx.strokeStyle = canvas.strokeStyle
+ ctx.fillStyle = canvas.fillStyle
+ ctx.lineWidth = canvas.lineWidth
ctx.translate(originX, originY)
- ctx.scale(canvas.scale, canvas.scale);
- ctx.rotate(canvas.rotate);
+ ctx.scale(canvas.scale, canvas.scale)
+ ctx.rotate(canvas.rotate)
ctx.translate(-originX, -originY)
- ctx.beginPath();
- ctx.moveTo(75 + 50 * Math.cos(0),
- 75 - 50 * Math.sin(Math.PI*2));
- ctx.arc(75,75,50,0,Math.PI*2,true); // Outer circle
- ctx.moveTo(60,60);
- ctx.arc(60,60,5,0,Math.PI*2,true); // Left eye
- ctx.moveTo(90 + 5 * Math.cos(0),
- 65 - 5 * Math.sin(Math.PI*2));
- ctx.moveTo(90,60);
- ctx.arc(90,60,5,-Math.PI,Math.PI*3,false); // Right eye
- ctx.moveTo(75,70);
- ctx.arc(75,70,35,0,Math.PI,false); // Mouth (clockwise)
- ctx.closePath();
+ ctx.beginPath()
+ ctx.moveTo(75 + 50 * Math.cos(0), 75 - 50 * Math.sin(Math.PI * 2))
+ ctx.arc(75, 75, 50, 0, Math.PI * 2, true) // Outer circle
+ ctx.moveTo(60, 60)
+ ctx.arc(60, 60, 5, 0, Math.PI * 2, true) // Left eye
+ ctx.moveTo(90 + 5 * Math.cos(0), 65 - 5 * Math.sin(Math.PI * 2))
+ ctx.moveTo(90, 60)
+ ctx.arc(90, 60, 5, -Math.PI, Math.PI * 3, false) // Right eye
+ ctx.moveTo(75, 70)
+ ctx.arc(75, 70, 35, 0, Math.PI, false) // Mouth (clockwise)
+ ctx.closePath()
if (canvas.fill)
- ctx.fill();
+ ctx.fill()
if (canvas.stroke)
- ctx.stroke();
- ctx.restore();
+ ctx.stroke()
+ ctx.restore()
}
}
}
Column {
id: controls
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 12
- Slider {id: lineWidthCtrl ; min: 1 ; max: 10 ; init: 2 ; name: "Outline"}
- Slider {id: scaleCtrl ; min: 0.1 ; max: 10 ; init: 1 ; name: "Scale"}
- Slider {id: rotateCtrl ; min: 0 ; max: Math.PI*2 ; init: 0 ; name: "Rotate"}
+ anchors {
+ bottom: parent.bottom
+ bottomMargin: 12
+ }
+
+ LabeledSlider {
+ id: lineWidthCtrl
+ name: qsTr("Outline")
+ width: root.width
+ min: 1
+ max: 10
+ value: 2
+ }
+ LabeledSlider {
+ id: scaleCtrl
+ name: qsTr("Scale")
+ width: root.width
+ min: 0.1
+ max: 10
+ value: 1
+ }
+ LabeledSlider {
+ id: rotateCtrl
+ name: qsTr("Rotate")
+ width: root.width
+ min: 0
+ max: Math.PI * 2
+ value: 0
+ }
+ Row {
+ CheckBox {
+ id: toggleFillCheckBox
+ text: qsTr("Toggle fill")
+ }
+ CheckBox {
+ id: toggleStrokeCheckBox
+ checked: true
+ text: qsTr("Toggle stroke")
+ }
+ }
}
}
diff --git a/examples/quick/canvas/squircle/squircle.qml b/examples/quick/canvas/squircle/squircle.qml
index 5416bfa1c7..3e4755e02c 100644
--- a/examples/quick/canvas/squircle/squircle.qml
+++ b/examples/quick/canvas/squircle/squircle.qml
@@ -1,72 +1,30 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import "../contents"
-import "../../shared"
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import "../"
Item {
- id: container
+ id: root
width: 320
height: 480
Column {
spacing: 6
- anchors.fill: parent
- anchors.topMargin: 12
- Text {
- font.pointSize: 24
- font.bold: true
- text: "Squircles"
+ anchors {
+ fill: parent
+ topMargin: 12
+ }
+
+ Label {
anchors.horizontalCenter: parent.horizontalCenter
- color: "#777"
+ text: qsTr("Squircles")
+ color: Qt.lighter(palette.text)
+ font {
+ pointSize: 24
+ bold: true
+ }
}
Image {
@@ -78,83 +36,106 @@ Item {
Canvas {
id: canvas
- width: 320
- height: 250
+
+ readonly property color strokeStyle: Qt.darker(fillStyle, 1.2)
+ readonly property color fillStyle: "#6400aa"
+ readonly property int lineWidth: 2
+ readonly property alias nSize: nCtrl.value
+ readonly property alias radius: rCtrl.value
+ readonly property alias fill: toggleFillCheckBox.checked
+ readonly property alias stroke: toggleStrokeCheckBox.checked
+ readonly property real px: width / 2
+ readonly property real py: height / 2 + 10
+ readonly property real alpha: 1.0
+
+ width: root.width
+ height: parent.height - controls.height
antialiasing: true
- property color strokeStyle: Qt.darker(fillStyle, 1.2)
- property color fillStyle: "#6400aa"
-
- property int lineWidth: 2
- property int nSize: nCtrl.value
- property real radius: rCtrl.value
- property bool fill: true
- property bool stroke: false
- property real px: width/2
- property real py: height/2 + 10
- property real alpha: 1.0
-
- onRadiusChanged: requestPaint();
- onLineWidthChanged: requestPaint();
- onNSizeChanged: requestPaint();
- onFillChanged: requestPaint();
- onStrokeChanged: requestPaint();
-
- onPaint: squircle();
-
- function squircle() {
- var ctx = canvas.getContext("2d");
- var N = canvas.nSize;
- var R = canvas.radius;
-
- N=Math.abs(N);
- var M=N;
- if (N>100) M=100;
- if (N<0.00000000001) M=0.00000000001;
-
- ctx.save();
- ctx.globalAlpha =canvas.alpha;
- ctx.fillStyle = "white";
- ctx.fillRect(0, 0, canvas.width, canvas.height);
-
- ctx.strokeStyle = canvas.strokeStyle;
- ctx.fillStyle = canvas.fillStyle;
- ctx.lineWidth = canvas.lineWidth;
-
- ctx.beginPath();
- var i = 0, x, y;
- for (i=0; i<(2*R+1); i++){
- x = Math.round(i-R) + canvas.px;
- y = Math.round(Math.pow(Math.abs(Math.pow(R,M)-Math.pow(Math.abs(i-R),M)),1/M)) + canvas.py;
-
- if (i == 0)
- ctx.moveTo(x, y);
+ onRadiusChanged: requestPaint()
+ onLineWidthChanged: requestPaint()
+ onNSizeChanged: requestPaint()
+ onFillChanged: requestPaint()
+ onStrokeChanged: requestPaint()
+
+ onPaint: function () {
+ let ctx = canvas.getContext("2d")
+ const N = Math.abs(canvas.nSize)
+ const R = canvas.radius
+
+ const M = Math.max(0.00000000001, Math.min(N, 100))
+
+ ctx.save()
+ ctx.globalAlpha = canvas.alpha
+ ctx.fillStyle = "white"
+ ctx.fillRect(0, 0, canvas.width, canvas.height)
+
+ ctx.strokeStyle = canvas.strokeStyle
+ ctx.fillStyle = canvas.fillStyle
+ ctx.lineWidth = canvas.lineWidth
+
+ ctx.beginPath()
+ let i, x, y;
+ for (i = 0; i < (2 * R + 1); i++) {
+ x = Math.round(i - R) + canvas.px
+ y = Math.round(Math.pow(Math.abs(Math.pow(R, M) - Math.pow(Math.abs(i - R), M)), 1 / M)) + canvas.py
+
+ if (i === 0)
+ ctx.moveTo(x, y)
else
- ctx.lineTo(x, y);
+ ctx.lineTo(x, y)
}
- for (i=(2*R); i<(4*R+1); i++){
- x =Math.round(3*R-i)+canvas.px;
- y = Math.round(-Math.pow(Math.abs(Math.pow(R,M)-Math.pow(Math.abs(3*R-i),M)),1/M)) + canvas.py;
- ctx.lineTo(x, y);
+ for (i = (2 * R); i < (4 * R + 1); i++) {
+ x = Math.round(3 * R - i) + canvas.px
+ y = Math.round(-Math.pow(Math.abs(Math.pow(R, M) - Math.pow(Math.abs(3 * R - i), M)), 1 / M)) + canvas.py
+ ctx.lineTo(x, y)
}
- ctx.closePath();
+ ctx.closePath()
if (canvas.stroke) {
- ctx.stroke();
+ ctx.stroke()
}
-
if (canvas.fill) {
- ctx.fill();
+ ctx.fill()
}
- ctx.restore();
+ ctx.restore()
}
}
}
Column {
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 12
- Slider {id: nCtrl ; min: 1 ; max: 10 ; init: 2 ; name: "N"}
- Slider {id: rCtrl ; min: 30 ; max: 180 ; init: 60 ; name: "Radius"}
+ id: controls
+ anchors {
+ bottom: parent.bottom
+ bottomMargin: 12
+ }
+
+ LabeledSlider {
+ id: nCtrl
+ name: qsTr("N")
+ width: root.width
+ min: 1
+ max: 10
+ value: 2
+ }
+ LabeledSlider {
+ id: rCtrl
+ name: qsTr("Radius")
+ width: root.width
+ min: 30
+ max: 180
+ value: 60
+ }
+ Row {
+ CheckBox {
+ id: toggleFillCheckBox
+ text: qsTr("Toggle fill")
+ }
+ CheckBox {
+ id: toggleStrokeCheckBox
+ checked: true
+ text: qsTr("Toggle stroke")
+ }
+ }
}
}
diff --git a/examples/quick/canvas/tiger/tiger.qml b/examples/quick/canvas/tiger/tiger.qml
index 71367d560a..e936619411 100644
--- a/examples/quick/canvas/tiger/tiger.qml
+++ b/examples/quick/canvas/tiger/tiger.qml
@@ -1,144 +1,119 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import "../contents"
-import "../../shared"
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import "../"
import "tiger.js" as Tiger
Item {
- id: container
+ id: root
width: 320
height: 480
Column {
spacing: 6
- anchors.fill: parent
- anchors.topMargin: 12
+ anchors {
+ fill: parent
+ topMargin: 12
+ }
- Text {
- font.pointSize: 24
- font.bold: true
- text: "Tiger with SVG path"
+ Label {
anchors.horizontalCenter: parent.horizontalCenter
- color: "#777"
+ text: qsTr("Tiger with SVG path")
+ color: Qt.lighter(palette.text)
+ font {
+ pointSize: 24
+ bold: true
+ }
}
Canvas {
id: canvas
- width: 320
- height: 280
+
+ readonly property real alpha: alphaCtrl.value
+ readonly property real scale: scaleCtrl.value
+ readonly property real rotate: rotateCtrl.value
+
+ width: root.width
+ height: parent.height - controls.height
antialiasing: true
- property string strokeStyle: "steelblue"
- property string fillStyle: "yellow"
- property bool fill: true
- property bool stroke: true
- property real alpha: alphaCtrl.value
- property real scale: scaleCtrl.value
- property real rotate: rotateCtrl.value
- property int frame: 0
-
- onFillChanged: requestPaint();
- onStrokeChanged: requestPaint();
- onAlphaChanged: requestPaint();
- onScaleChanged: requestPaint();
- onRotateChanged: requestPaint();
-
- onPaint: {
- var ctx = canvas.getContext('2d');
- var originX = canvas.width/2 + 30
- var originY = canvas.height/2 + 60
-
- ctx.save();
- ctx.clearRect(0, 0, canvas.width, canvas.height);
- ctx.globalAlpha = canvas.alpha;
- ctx.globalCompositeOperation = "source-over";
+ onAlphaChanged: requestPaint()
+ onScaleChanged: requestPaint()
+ onRotateChanged: requestPaint()
+
+ onPaint: function() {
+ let ctx = canvas.getContext('2d')
+ const originX = canvas.width / 2 + 30
+ const originY = canvas.height / 2 + 60
+
+ ctx.save()
+ ctx.clearRect(0, 0, canvas.width, canvas.height)
+ ctx.globalAlpha = canvas.alpha
+ ctx.globalCompositeOperation = "source-over"
ctx.translate(originX, originY)
- ctx.scale(canvas.scale, canvas.scale);
- ctx.rotate(canvas.rotate);
+ ctx.scale(canvas.scale, canvas.scale)
+ ctx.rotate(canvas.rotate)
ctx.translate(-originX, -originY)
- ctx.strokeStyle = Qt.rgba(.3, .3, .3,1);
- ctx.lineWidth = 1;
+ ctx.strokeStyle = Qt.rgba(.3, .3, .3,1)
+ ctx.lineWidth = 1
//! [0]
- for (var i = 0; i < Tiger.tiger.length; i++) {
- if (Tiger.tiger[i].width != undefined)
- ctx.lineWidth = Tiger.tiger[i].width;
+ for (let i = 0; i < Tiger.tiger.length; i++) {
+ if (Tiger.tiger[i].width !== undefined)
+ ctx.lineWidth = Tiger.tiger[i].width
- if (Tiger.tiger[i].path != undefined)
- ctx.path = Tiger.tiger[i].path;
+ if (Tiger.tiger[i].path !== undefined)
+ ctx.path = Tiger.tiger[i].path
- if (Tiger.tiger[i].fill != undefined) {
- ctx.fillStyle = Tiger.tiger[i].fill;
- ctx.fill();
+ if (Tiger.tiger[i].fill !== undefined) {
+ ctx.fillStyle = Tiger.tiger[i].fill
+ ctx.fill()
}
- if (Tiger.tiger[i].stroke != undefined) {
- ctx.strokeStyle = Tiger.tiger[i].stroke;
- ctx.stroke();
+ if (Tiger.tiger[i].stroke !== undefined) {
+ ctx.strokeStyle = Tiger.tiger[i].stroke
+ ctx.stroke()
}
}
//! [0]
- ctx.restore();
+ ctx.restore()
}
}
}
Column {
id: controls
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 12
- Slider {id: scaleCtrl ; min: 0.1 ; max: 1 ; init: 0.3 ; name: "Scale"}
- Slider {id: rotateCtrl ; min: 0 ; max: Math.PI*2 ; init: 0 ; name: "Rotate"}
- Slider {id: alphaCtrl ; min: 0 ; max: 1 ; init: 1 ; name: "Alpha"}
+ anchors {
+ bottom: parent.bottom
+ bottomMargin: 12
+ }
+
+ LabeledSlider {
+ id: scaleCtrl
+ name: qsTr("Scale")
+ width: root.width
+ min: 0.1
+ max: 1
+ value: 0.3
+ }
+ LabeledSlider {
+ id: rotateCtrl
+ name: qsTr("Rotate")
+ width: root.width
+ min: 0
+ max: Math.PI * 2
+ value: 0
+ }
+ LabeledSlider {
+ id: alphaCtrl
+ name: qsTr("Alpha")
+ width: root.width
+ min: 0
+ max: 1
+ value: 1
+ }
}
}
diff --git a/examples/quick/customitems/.prev_CMakeLists.txt b/examples/quick/customitems/.prev_CMakeLists.txt
deleted file mode 100644
index 4afbfe3f6b..0000000000
--- a/examples/quick/customitems/.prev_CMakeLists.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-# Generated from customitems.pro.
-
-add_subdirectory(painteditem)
-add_subdirectory(maskedmousearea)
diff --git a/examples/quick/customitems/CMakeLists.txt b/examples/quick/customitems/CMakeLists.txt
index 4afbfe3f6b..92c5c8fe85 100644
--- a/examples/quick/customitems/CMakeLists.txt
+++ b/examples/quick/customitems/CMakeLists.txt
@@ -1,4 +1,6 @@
-# Generated from customitems.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-add_subdirectory(painteditem)
-add_subdirectory(maskedmousearea)
+qt_internal_add_example(dialcontrol)
+qt_internal_add_example(flipable)
+qt_internal_add_example(painteditem)
diff --git a/examples/quick/customitems/customitems.pro b/examples/quick/customitems/customitems.pro
index 1e0a2aed49..3199bfc9ad 100644
--- a/examples/quick/customitems/customitems.pro
+++ b/examples/quick/customitems/customitems.pro
@@ -1,14 +1,7 @@
TEMPLATE = subdirs
SUBDIRS = \
- painteditem \
- maskedmousearea
+ painteditem
EXAMPLE_FILES = \
dialcontrol \
- flipable \
- progressbar \
- scrollbar \
- searchbox \
- slideswitch \
- spinner \
- tabwidget
+ flipable
diff --git a/examples/quick/customitems/dialcontrol/CMakeLists.txt b/examples/quick/customitems/dialcontrol/CMakeLists.txt
index 9d2fa2818a..ff26205142 100644
--- a/examples/quick/customitems/dialcontrol/CMakeLists.txt
+++ b/examples/quick/customitems/dialcontrol/CMakeLists.txt
@@ -1,61 +1,53 @@
-# Generated from dialcontrol.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(dialcontrol LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/customitems/dialcontrol")
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
+qt_standard_project_setup(REQUIRES 6.5)
-qt_add_executable(dialcontrol
+qt_add_executable(dialcontrolexample
+ WIN32
+ MACOSX_BUNDLE
main.cpp
)
-set_target_properties(dialcontrol PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(dialcontrol PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
+target_link_libraries(dialcontrolexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
-# Resources:
-set(dialcontrol_resource_files
- "content/Dial.qml"
- "content/QuitButton.qml"
- "content/background.png"
- "content/needle.png"
- "content/needle_shadow.png"
- "content/overlay.png"
- "content/quit.png"
- "dialcontrol.qml"
+qt_add_qml_module(dialcontrolexample
+ URI dialcontrol
+ QML_FILES
+ "Dial.qml"
+ "QuitButton.qml"
+ "dialcontrol.qml"
+ RESOURCES
+ "background.png"
+ "needle.png"
+ "needle_shadow.png"
+ "overlay.png"
+ "quit.png"
)
-qt6_add_resources(dialcontrol "dialcontrol"
- PREFIX
- "/"
- FILES
- ${dialcontrol_resource_files}
+install(TARGETS dialcontrolexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-install(TARGETS dialcontrol
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+qt_generate_deploy_qml_app_script(
+ TARGET dialcontrolexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/customitems/dialcontrol/Dial.qml b/examples/quick/customitems/dialcontrol/Dial.qml
new file mode 100644
index 0000000000..3b9692cc91
--- /dev/null
+++ b/examples/quick/customitems/dialcontrol/Dial.qml
@@ -0,0 +1,49 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Item {
+ id: root
+ property real value : 0
+
+ width: 210; height: 210
+
+ Image { source: "background.png" }
+
+//! [needle_shadow]
+ Image {
+ x: 96
+ y: 35
+ source: "needle_shadow.png"
+ transform: Rotation {
+ origin.x: 9; origin.y: 67
+ angle: needleRotation.angle
+ }
+ }
+//! [needle_shadow]
+//! [needle]
+ Image {
+ id: needle
+ x: 98; y: 33
+ antialiasing: true
+ source: "needle.png"
+ transform: Rotation {
+ id: needleRotation
+ origin.x: 5; origin.y: 65
+ //! [needle angle]
+ angle: Math.min(Math.max(-130, root.value * 2.6 - 130), 133)
+ Behavior on angle {
+ SpringAnimation {
+ spring: 1.4
+ damping: .15
+ }
+ }
+ //! [needle angle]
+ }
+ }
+//! [needle]
+//! [overlay]
+ Image { x: 21; y: 18; source: "overlay.png" }
+//! [overlay]
+}
diff --git a/examples/quick/customitems/dialcontrol/QuitButton.qml b/examples/quick/customitems/dialcontrol/QuitButton.qml
new file mode 100644
index 0000000000..841ff34ee8
--- /dev/null
+++ b/examples/quick/customitems/dialcontrol/QuitButton.qml
@@ -0,0 +1,15 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Image {
+ source: "quit.png"
+ scale: quitMouse.pressed ? 0.8 : 1.0
+ MouseArea {
+ id: quitMouse
+ anchors.fill: parent
+ anchors.margins: -10
+ onClicked: Qt.quit()
+ }
+}
diff --git a/examples/quick/customitems/dialcontrol/content/background.png b/examples/quick/customitems/dialcontrol/background.png
index 75d555d7ab..75d555d7ab 100644
--- a/examples/quick/customitems/dialcontrol/content/background.png
+++ b/examples/quick/customitems/dialcontrol/background.png
Binary files differ
diff --git a/examples/quick/customitems/dialcontrol/content/Dial.qml b/examples/quick/customitems/dialcontrol/content/Dial.qml
deleted file mode 100644
index 108b0e7410..0000000000
--- a/examples/quick/customitems/dialcontrol/content/Dial.qml
+++ /dev/null
@@ -1,96 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Item {
- id: root
- property real value : 0
-
- width: 210; height: 210
-
- Image { source: "background.png" }
-
-//! [needle_shadow]
- Image {
- x: 96
- y: 35
- source: "needle_shadow.png"
- transform: Rotation {
- origin.x: 9; origin.y: 67
- angle: needleRotation.angle
- }
- }
-//! [needle_shadow]
-//! [needle]
- Image {
- id: needle
- x: 98; y: 33
- antialiasing: true
- source: "needle.png"
- transform: Rotation {
- id: needleRotation
- origin.x: 5; origin.y: 65
- //! [needle angle]
- angle: Math.min(Math.max(-130, root.value*2.6 - 130), 133)
- Behavior on angle {
- SpringAnimation {
- spring: 1.4
- damping: .15
- }
- }
- //! [needle angle]
- }
- }
-//! [needle]
-//! [overlay]
- Image { x: 21; y: 18; source: "overlay.png" }
-//! [overlay]
-}
diff --git a/examples/quick/customitems/dialcontrol/content/QuitButton.qml b/examples/quick/customitems/dialcontrol/content/QuitButton.qml
deleted file mode 100644
index 87dc159c5d..0000000000
--- a/examples/quick/customitems/dialcontrol/content/QuitButton.qml
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-Image {
- source: "quit.png"
- scale: quitMouse.pressed ? 0.8 : 1.0
- MouseArea {
- id: quitMouse
- anchors.fill: parent
- anchors.margins: -10
- onClicked: Qt.quit()
- }
-}
diff --git a/examples/quick/customitems/dialcontrol/dialcontrol.qml b/examples/quick/customitems/dialcontrol/dialcontrol.qml
index d0a623a72a..695ec9fb46 100644
--- a/examples/quick/customitems/dialcontrol/dialcontrol.qml
+++ b/examples/quick/customitems/dialcontrol/dialcontrol.qml
@@ -1,57 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//! [imports]
-import QtQuick 2.2
-import QtQuick.Window 2.1
-import "content"
+import QtQuick
+import QtQuick.Window
//! [imports]
//! [0]
@@ -91,7 +43,7 @@ Rectangle {
return
}
- var desiredPercent = slider.x * 100 / (oldWidth - 32)
+ let desiredPercent = slider.x * 100 / (oldWidth - 32)
slider.x = desiredPercent * (width - 32) / 100
oldWidth = width
}
diff --git a/examples/quick/customitems/dialcontrol/dialcontrol.qrc b/examples/quick/customitems/dialcontrol/dialcontrol.qrc
index 6433d68bb8..c3c8d58b66 100644
--- a/examples/quick/customitems/dialcontrol/dialcontrol.qrc
+++ b/examples/quick/customitems/dialcontrol/dialcontrol.qrc
@@ -1,12 +1,12 @@
<RCC>
- <qresource prefix="/">
+ <qresource prefix="/qt/qml/dialcontrol">
+ <file>Dial.qml</file>
+ <file>QuitButton.qml</file>
+ <file>background.png</file>
<file>dialcontrol.qml</file>
- <file>content/background.png</file>
- <file>content/Dial.qml</file>
- <file>content/needle_shadow.png</file>
- <file>content/needle.png</file>
- <file>content/overlay.png</file>
- <file>content/quit.png</file>
- <file>content/QuitButton.qml</file>
+ <file>needle.png</file>
+ <file>needle_shadow.png</file>
+ <file>overlay.png</file>
+ <file>quit.png</file>
</qresource>
</RCC>
diff --git a/examples/quick/customitems/dialcontrol/doc/src/dialcontrol.qdoc b/examples/quick/customitems/dialcontrol/doc/src/dialcontrol.qdoc
index cd50650c0b..7b56478c37 100644
--- a/examples/quick/customitems/dialcontrol/doc/src/dialcontrol.qdoc
+++ b/examples/quick/customitems/dialcontrol/doc/src/dialcontrol.qdoc
@@ -1,35 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title UI Components: Dial Control Example
\example customitems/dialcontrol
\brief The Dial Control Example shows how to create a speedometer-type dial.
+ \examplecategory {User Interface Components}
This example shows how to create a dial-type control. It combines
\l Image elements with \l Rotation transforms and \l SpringAnimation behaviors
diff --git a/examples/quick/customitems/dialcontrol/main.cpp b/examples/quick/customitems/dialcontrol/main.cpp
index 6ebe203a70..56b1d789e7 100644
--- a/examples/quick/customitems/dialcontrol/main.cpp
+++ b/examples/quick/customitems/dialcontrol/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(dialcontrol)
+DECLARATIVE_EXAMPLE_MAIN(dialcontrol/dialcontrol)
diff --git a/examples/quick/customitems/dialcontrol/content/needle.png b/examples/quick/customitems/dialcontrol/needle.png
index 2d19f75039..2d19f75039 100644
--- a/examples/quick/customitems/dialcontrol/content/needle.png
+++ b/examples/quick/customitems/dialcontrol/needle.png
Binary files differ
diff --git a/examples/quick/customitems/dialcontrol/content/needle_shadow.png b/examples/quick/customitems/dialcontrol/needle_shadow.png
index 8d8a928cc5..8d8a928cc5 100644
--- a/examples/quick/customitems/dialcontrol/content/needle_shadow.png
+++ b/examples/quick/customitems/dialcontrol/needle_shadow.png
Binary files differ
diff --git a/examples/quick/customitems/dialcontrol/content/overlay.png b/examples/quick/customitems/dialcontrol/overlay.png
index 3860a7b590..3860a7b590 100644
--- a/examples/quick/customitems/dialcontrol/content/overlay.png
+++ b/examples/quick/customitems/dialcontrol/overlay.png
Binary files differ
diff --git a/examples/quick/customitems/dialcontrol/content/quit.png b/examples/quick/customitems/dialcontrol/quit.png
index b822057d4e..b822057d4e 100644
--- a/examples/quick/customitems/dialcontrol/content/quit.png
+++ b/examples/quick/customitems/dialcontrol/quit.png
Binary files differ
diff --git a/examples/quick/customitems/flipable/content/5_heart.png b/examples/quick/customitems/flipable/5_heart.png
index fb59d81453..fb59d81453 100644
--- a/examples/quick/customitems/flipable/content/5_heart.png
+++ b/examples/quick/customitems/flipable/5_heart.png
Binary files differ
diff --git a/examples/quick/customitems/flipable/content/9_club.png b/examples/quick/customitems/flipable/9_club.png
index 2545001904..2545001904 100644
--- a/examples/quick/customitems/flipable/content/9_club.png
+++ b/examples/quick/customitems/flipable/9_club.png
Binary files differ
diff --git a/examples/quick/customitems/flipable/CMakeLists.txt b/examples/quick/customitems/flipable/CMakeLists.txt
new file mode 100644
index 0000000000..8d1c7ab7cf
--- /dev/null
+++ b/examples/quick/customitems/flipable/CMakeLists.txt
@@ -0,0 +1,51 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+
+project(flipable LANGUAGES CXX)
+
+set(CMAKE_AUTOMOC ON)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
+
+qt_standard_project_setup(REQUIRES 6.5)
+
+qt_add_executable(flipableexample
+ WIN32
+ MACOSX_BUNDLE
+ main.cpp
+)
+
+target_link_libraries(flipableexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
+
+qt_add_qml_module(flipableexample
+ URI flipable
+ QML_FILES
+ "flipable.qml"
+ "Card.qml"
+ RESOURCES
+ "5_heart.png"
+ "9_club.png"
+ "back.png"
+)
+
+install(TARGETS flipableexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET flipableexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/customitems/flipable/Card.qml b/examples/quick/customitems/flipable/Card.qml
new file mode 100644
index 0000000000..0a1e4059f7
--- /dev/null
+++ b/examples/quick/customitems/flipable/Card.qml
@@ -0,0 +1,43 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Flipable {
+ id: container
+
+ property alias source: frontImage.source
+ property bool flipped: true
+ property int xAxis: 0
+ property int yAxis: 0
+ property int angle: 0
+
+ width: front.width; height: front.height
+
+ front: Image { id: frontImage }
+ back: Image { source: "back.png" }
+
+ state: "back"
+
+ MouseArea { anchors.fill: parent; onClicked: container.flipped = !container.flipped }
+
+ transform: Rotation {
+ id: rotation; origin.x: container.width / 2; origin.y: container.height / 2
+ axis.x: container.xAxis; axis.y: container.yAxis; axis.z: 0
+ }
+
+ states: State {
+ name: "back"; when: container.flipped
+ PropertyChanges { rotation.angle: container.angle }
+ }
+
+ transitions: Transition {
+ ParallelAnimation {
+ NumberAnimation { target: rotation; properties: "angle"; duration: 600 }
+ SequentialAnimation {
+ NumberAnimation { target: container; property: "scale"; to: 0.75; duration: 300 }
+ NumberAnimation { target: container; property: "scale"; to: 1.0; duration: 300 }
+ }
+ }
+ }
+}
diff --git a/examples/quick/customitems/flipable/content/back.png b/examples/quick/customitems/flipable/back.png
index f715d7487e..f715d7487e 100644
--- a/examples/quick/customitems/flipable/content/back.png
+++ b/examples/quick/customitems/flipable/back.png
Binary files differ
diff --git a/examples/quick/customitems/flipable/content/Card.qml b/examples/quick/customitems/flipable/content/Card.qml
deleted file mode 100644
index ffffdb6b7d..0000000000
--- a/examples/quick/customitems/flipable/content/Card.qml
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Flipable {
- id: container
-
- property alias source: frontImage.source
- property bool flipped: true
- property int xAxis: 0
- property int yAxis: 0
- property int angle: 0
-
- width: front.width; height: front.height
-
- front: Image { id: frontImage }
- back: Image { source: "back.png" }
-
- state: "back"
-
- MouseArea { anchors.fill: parent; onClicked: container.flipped = !container.flipped }
-
- transform: Rotation {
- id: rotation; origin.x: container.width / 2; origin.y: container.height / 2
- axis.x: container.xAxis; axis.y: container.yAxis; axis.z: 0
- }
-
- states: State {
- name: "back"; when: container.flipped
- PropertyChanges { target: rotation; angle: container.angle }
- }
-
- transitions: Transition {
- ParallelAnimation {
- NumberAnimation { target: rotation; properties: "angle"; duration: 600 }
- SequentialAnimation {
- NumberAnimation { target: container; property: "scale"; to: 0.75; duration: 300 }
- NumberAnimation { target: container; property: "scale"; to: 1.0; duration: 300 }
- }
- }
- }
-}
diff --git a/examples/quick/customitems/flipable/doc/src/flipable.qdoc b/examples/quick/customitems/flipable/doc/src/flipable.qdoc
index 58f5492251..8b2eea6611 100644
--- a/examples/quick/customitems/flipable/doc/src/flipable.qdoc
+++ b/examples/quick/customitems/flipable/doc/src/flipable.qdoc
@@ -1,34 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title UI Components: Flipable Example
\example customitems/flipable
\brief The Flipable Example shows an item that flips whenever clicked, rotating around the y-axis.
+ \examplecategory {User Interface Components}
This example shows how to use the \l Flipable element.
diff --git a/examples/quick/customitems/flipable/flipable.qml b/examples/quick/customitems/flipable/flipable.qml
index 3662898864..3d95afe75e 100644
--- a/examples/quick/customitems/flipable/flipable.qml
+++ b/examples/quick/customitems/flipable/flipable.qml
@@ -1,55 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import "content"
+import QtQuick
Rectangle {
id: window
@@ -59,7 +11,7 @@ Rectangle {
Row {
anchors.centerIn: parent; spacing: 30
- Card { source: "content/9_club.png"; angle: 180; yAxis: 1 }
- Card { source: "content/5_heart.png"; angle: 540; xAxis: 1 }
+ Card { source: "9_club.png"; angle: 180; yAxis: 1 }
+ Card { source: "5_heart.png"; angle: 540; xAxis: 1 }
}
}
diff --git a/examples/quick/customitems/flipable/flipable.qrc b/examples/quick/customitems/flipable/flipable.qrc
index 7918ccf00e..a8056e45f9 100644
--- a/examples/quick/customitems/flipable/flipable.qrc
+++ b/examples/quick/customitems/flipable/flipable.qrc
@@ -1,9 +1,9 @@
<RCC>
- <qresource prefix="/">
+ <qresource prefix="/qt/qml/flipable">
<file>flipable.qml</file>
- <file>content/5_heart.png</file>
- <file>content/9_club.png</file>
- <file>content/back.png</file>
- <file>content/Card.qml</file>
+ <file>5_heart.png</file>
+ <file>9_club.png</file>
+ <file>back.png</file>
+ <file>Card.qml</file>
</qresource>
</RCC>
diff --git a/examples/quick/customitems/flipable/main.cpp b/examples/quick/customitems/flipable/main.cpp
index a0f0d67d45..c94af94422 100644
--- a/examples/quick/customitems/flipable/main.cpp
+++ b/examples/quick/customitems/flipable/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(flipable)
+DECLARATIVE_EXAMPLE_MAIN(flipable/flipable)
diff --git a/examples/quick/customitems/maskedmousearea/CMakeLists.txt b/examples/quick/customitems/maskedmousearea/CMakeLists.txt
deleted file mode 100644
index 0c5a19b5e7..0000000000
--- a/examples/quick/customitems/maskedmousearea/CMakeLists.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-# Generated from maskedmousearea.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(maskedmousearea LANGUAGES CXX)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/customitems/maskedmousearea")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(maskedmousearea
- main.cpp
- maskedmousearea.cpp maskedmousearea.h
-)
-set_target_properties(maskedmousearea PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(maskedmousearea PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-
-# Resources:
-set(maskedmousearea_resource_files
- "images/cloud_1.png"
- "images/cloud_2.png"
- "images/moon.png"
- "maskedmousearea.qml"
-)
-
-qt6_add_resources(maskedmousearea "maskedmousearea"
- PREFIX
- "/customitems/maskedmousearea"
- FILES
- ${maskedmousearea_resource_files}
-)
-
-install(TARGETS maskedmousearea
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
-
-set_target_properties(maskedmousearea PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI Example
-)
-
-qt6_qml_type_registration(maskedmousearea)
diff --git a/examples/quick/customitems/maskedmousearea/images/cloud_1.png b/examples/quick/customitems/maskedmousearea/images/cloud_1.png
deleted file mode 100644
index 9beb7e8442..0000000000
--- a/examples/quick/customitems/maskedmousearea/images/cloud_1.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/maskedmousearea/images/cloud_2.png b/examples/quick/customitems/maskedmousearea/images/cloud_2.png
deleted file mode 100644
index 981bbd2630..0000000000
--- a/examples/quick/customitems/maskedmousearea/images/cloud_2.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/maskedmousearea/images/moon.png b/examples/quick/customitems/maskedmousearea/images/moon.png
deleted file mode 100644
index 0a8037dd85..0000000000
--- a/examples/quick/customitems/maskedmousearea/images/moon.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/maskedmousearea/main.cpp b/examples/quick/customitems/maskedmousearea/main.cpp
deleted file mode 100644
index 5b42516154..0000000000
--- a/examples/quick/customitems/maskedmousearea/main.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-#include <QGuiApplication>
-#include <QQuickView>
-
-#include "maskedmousearea.h"
-
-int main(int argc, char* argv[])
-{
- QGuiApplication app(argc,argv);
- QQuickView view;
-
- view.setSource(QUrl("qrc:///customitems/maskedmousearea/maskedmousearea.qml"));
- view.show();
- return app.exec();
-}
diff --git a/examples/quick/customitems/maskedmousearea/maskedmousearea.cpp b/examples/quick/customitems/maskedmousearea/maskedmousearea.cpp
deleted file mode 100644
index 55fce54ac0..0000000000
--- a/examples/quick/customitems/maskedmousearea/maskedmousearea.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-#include "maskedmousearea.h"
-
-#include <QStyleHints>
-#include <QGuiApplication>
-#include <qqmlfile.h>
-
-MaskedMouseArea::MaskedMouseArea(QQuickItem *parent)
- : QQuickItem(parent),
- m_pressed(false),
- m_alphaThreshold(0.0),
- m_containsMouse(false)
-{
- setAcceptHoverEvents(true);
- setAcceptedMouseButtons(Qt::LeftButton);
-}
-
-void MaskedMouseArea::setPressed(bool pressed)
-{
- if (m_pressed != pressed) {
- m_pressed = pressed;
- emit pressedChanged();
- }
-}
-
-void MaskedMouseArea::setContainsMouse(bool containsMouse)
-{
- if (m_containsMouse != containsMouse) {
- m_containsMouse = containsMouse;
- emit containsMouseChanged();
- }
-}
-
-void MaskedMouseArea::setMaskSource(const QUrl &source)
-{
- if (m_maskSource != source) {
- m_maskSource = source;
- m_maskImage = QImage(QQmlFile::urlToLocalFileOrQrc(source));
- emit maskSourceChanged();
- }
-}
-
-void MaskedMouseArea::setAlphaThreshold(qreal threshold)
-{
- if (m_alphaThreshold != threshold) {
- m_alphaThreshold = threshold;
- emit alphaThresholdChanged();
- }
-}
-
-bool MaskedMouseArea::contains(const QPointF &point) const
-{
- if (!QQuickItem::contains(point) || m_maskImage.isNull())
- return false;
-
- QPoint p = point.toPoint();
-
- if (p.x() < 0 || p.x() >= m_maskImage.width() ||
- p.y() < 0 || p.y() >= m_maskImage.height())
- return false;
-
- qreal r = qBound<int>(0, m_alphaThreshold * 255, 255);
- return qAlpha(m_maskImage.pixel(p)) > r;
-}
-
-void MaskedMouseArea::mousePressEvent(QMouseEvent *event)
-{
- setPressed(true);
- m_pressPoint = event->position().toPoint();
- emit pressed();
-}
-
-void MaskedMouseArea::mouseReleaseEvent(QMouseEvent *event)
-{
- setPressed(false);
- emit released();
-
- const int threshold = qApp->styleHints()->startDragDistance();
- const bool isClick = (threshold >= qAbs(event->position().toPoint().x() - m_pressPoint.x()) &&
- threshold >= qAbs(event->position().toPoint().y() - m_pressPoint.y()));
-
- if (isClick)
- emit clicked();
-}
-
-void MaskedMouseArea::mouseUngrabEvent()
-{
- setPressed(false);
- emit canceled();
-}
-
-void MaskedMouseArea::hoverEnterEvent(QHoverEvent *event)
-{
- Q_UNUSED(event);
- setContainsMouse(true);
-}
-
-void MaskedMouseArea::hoverLeaveEvent(QHoverEvent *event)
-{
- Q_UNUSED(event);
- setContainsMouse(false);
-}
diff --git a/examples/quick/customitems/maskedmousearea/maskedmousearea.h b/examples/quick/customitems/maskedmousearea/maskedmousearea.h
deleted file mode 100644
index 39d78a019a..0000000000
--- a/examples/quick/customitems/maskedmousearea/maskedmousearea.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-#ifndef MASKEDMOUSEAREA_H
-#define MASKEDMOUSEAREA_H
-
-#include <QImage>
-#include <QQuickItem>
-
-
-class MaskedMouseArea : public QQuickItem
-{
- Q_OBJECT
- Q_PROPERTY(bool pressed READ isPressed NOTIFY pressedChanged)
- Q_PROPERTY(bool containsMouse READ containsMouse NOTIFY containsMouseChanged)
- Q_PROPERTY(QUrl maskSource READ maskSource WRITE setMaskSource NOTIFY maskSourceChanged)
- Q_PROPERTY(qreal alphaThreshold READ alphaThreshold WRITE setAlphaThreshold NOTIFY alphaThresholdChanged)
- QML_ELEMENT
-
-public:
- MaskedMouseArea(QQuickItem *parent = 0);
-
- bool contains(const QPointF &point) const;
-
- bool isPressed() const { return m_pressed; }
- bool containsMouse() const { return m_containsMouse; }
-
- QUrl maskSource() const { return m_maskSource; }
- void setMaskSource(const QUrl &source);
-
- qreal alphaThreshold() const { return m_alphaThreshold; }
- void setAlphaThreshold(qreal threshold);
-
-signals:
- void pressed();
- void released();
- void clicked();
- void canceled();
- void pressedChanged();
- void maskSourceChanged();
- void containsMouseChanged();
- void alphaThresholdChanged();
-
-protected:
- void setPressed(bool pressed);
- void setContainsMouse(bool containsMouse);
- void mousePressEvent(QMouseEvent *event);
- void mouseReleaseEvent(QMouseEvent *event);
- void hoverEnterEvent(QHoverEvent *event);
- void hoverLeaveEvent(QHoverEvent *event);
- void mouseUngrabEvent();
-
-private:
- bool m_pressed;
- QUrl m_maskSource;
- QImage m_maskImage;
- QPointF m_pressPoint;
- qreal m_alphaThreshold;
- bool m_containsMouse;
-};
-
-#endif
diff --git a/examples/quick/customitems/maskedmousearea/maskedmousearea.pro b/examples/quick/customitems/maskedmousearea/maskedmousearea.pro
deleted file mode 100644
index c5cedf4e6e..0000000000
--- a/examples/quick/customitems/maskedmousearea/maskedmousearea.pro
+++ /dev/null
@@ -1,17 +0,0 @@
-TEMPLATE = app
-
-QT += quick qml
-
-CONFIG += qmltypes
-QML_IMPORT_NAME = Example
-QML_IMPORT_MAJOR_VERSION = 1
-
-HEADERS += maskedmousearea.h
-
-SOURCES += main.cpp \
- maskedmousearea.cpp
-
-RESOURCES += maskedmousearea.qrc
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/maskedmousearea
-INSTALLS += target
diff --git a/examples/quick/customitems/maskedmousearea/maskedmousearea.qml b/examples/quick/customitems/maskedmousearea/maskedmousearea.qml
deleted file mode 100644
index 2474edaf78..0000000000
--- a/examples/quick/customitems/maskedmousearea/maskedmousearea.qml
+++ /dev/null
@@ -1,142 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Example 1.0
-
-Rectangle {
- height: 480
- width: 320
- color: "black"
-
- Text {
- text: qsTr("CLICK AND HOVER")
- opacity: 0.6
- color: "white"
- font.pixelSize: 20
- anchors.top: parent.top
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.topMargin: 50
- }
-
- Image {
- id: moon
- anchors.centerIn: parent
- scale: moonArea.pressed ? 1.1 : 1.0
- opacity: moonArea.containsMouse ? 1.0 : 0.7
- source: Qt.resolvedUrl("images/moon.png")
-
- MaskedMouseArea {
- id: moonArea
- anchors.fill: parent
- alphaThreshold: 0.4
- maskSource: moon.source
- }
-
- Behavior on opacity {
- NumberAnimation { duration: 200 }
- }
- Behavior on scale {
- NumberAnimation { duration: 100 }
- }
- }
-
- Image {
- id: rightCloud
- anchors {
- centerIn: moon
- verticalCenterOffset: 30
- horizontalCenterOffset: 80
- }
- scale: rightCloudArea.pressed ? 1.1 : 1.0
- opacity: rightCloudArea.containsMouse ? 1.0 : 0.7
- source: Qt.resolvedUrl("images/cloud_2.png")
-
- MaskedMouseArea {
- id: rightCloudArea
- anchors.fill: parent
- alphaThreshold: 0.4
- maskSource: rightCloud.source
- }
-
- Behavior on opacity {
- NumberAnimation { duration: 200 }
- }
- Behavior on scale {
- NumberAnimation { duration: 100 }
- }
- }
-
- Image {
- id: leftCloud
- anchors {
- centerIn: moon
- verticalCenterOffset: 40
- horizontalCenterOffset: -80
- }
- scale: leftCloudArea.pressed ? 1.1 : 1.0
- opacity: leftCloudArea.containsMouse ? 1.0 : 0.7
- source: Qt.resolvedUrl("images/cloud_1.png")
-
- MaskedMouseArea {
- id: leftCloudArea
- anchors.fill: parent
- alphaThreshold: 0.4
- maskSource: leftCloud.source
- }
-
- Behavior on opacity {
- NumberAnimation { duration: 200 }
- }
- Behavior on scale {
- NumberAnimation { duration: 100 }
- }
- }
-}
diff --git a/examples/quick/customitems/maskedmousearea/maskedmousearea.qmlproject b/examples/quick/customitems/maskedmousearea/maskedmousearea.qmlproject
deleted file mode 100644
index 709c19866f..0000000000
--- a/examples/quick/customitems/maskedmousearea/maskedmousearea.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "maskedmousearea.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/quick/customitems/maskedmousearea/maskedmousearea.qrc b/examples/quick/customitems/maskedmousearea/maskedmousearea.qrc
deleted file mode 100644
index 3cc3955e56..0000000000
--- a/examples/quick/customitems/maskedmousearea/maskedmousearea.qrc
+++ /dev/null
@@ -1,8 +0,0 @@
-<RCC>
- <qresource prefix="/customitems/maskedmousearea">
- <file>maskedmousearea.qml</file>
- <file>images/cloud_1.png</file>
- <file>images/cloud_2.png</file>
- <file>images/moon.png</file>
- </qresource>
-</RCC>
diff --git a/examples/quick/customitems/painteditem/CMakeLists.txt b/examples/quick/customitems/painteditem/CMakeLists.txt
index 533396a7cd..ca23161b1c 100644
--- a/examples/quick/customitems/painteditem/CMakeLists.txt
+++ b/examples/quick/customitems/painteditem/CMakeLists.txt
@@ -1,70 +1,46 @@
-# Generated from painteditem.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
-project(qmltextballoonplugin LANGUAGES CXX)
+cmake_minimum_required(VERSION 3.16)
+project(painteditem LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/customitems/painteditem/TextBalloonPlugin")
+qt_standard_project_setup(REQUIRES 6.5)
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Quick)
+add_subdirectory(TextBalloon)
-qt6_add_qml_module(qmltextballoonplugin
- OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/TextBalloonPlugin"
- VERSION 1.0
- URI "TextBalloonPlugin"
- INSTALL_LOCATION ${INSTALL_EXAMPLEDIR}
-)
+qt_add_executable(painteditemexample WIN32 MACOSX_BUNDLE main.cpp)
-target_sources(qmltextballoonplugin PRIVATE
- TextBalloonPlugin/plugin.h
- textballoon.cpp textballoon.h
-)
-set_target_properties(qmltextballoonplugin PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(qmltextballoonplugin PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
+qt_add_qml_module(painteditemexample
+ URI painteditem
+ QML_FILES
+ "textballoons.qml"
)
-
-# Resources:
-set(painteditem_resource_files
- "textballoon.h"
- "textballoons.qml"
+target_link_libraries(painteditemexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
-qt6_add_resources(qmltextballoonplugin "painteditem"
- PREFIX
- "/painteditem"
- FILES
- ${painteditem_resource_files}
-)
+add_dependencies(painteditemexample qmltextballoon)
-install(TARGETS qmltextballoonplugin
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+install(TARGETS painteditemexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-set_target_properties(qmltextballoonplugin PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI TextBalloonPlugin
+qt_generate_deploy_qml_app_script(
+ TARGET painteditemexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
-
-qt6_qml_type_registration(qmltextballoonplugin)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/customitems/painteditem/TextBalloon/CMakeLists.txt b/examples/quick/customitems/painteditem/TextBalloon/CMakeLists.txt
new file mode 100644
index 0000000000..b94b297aeb
--- /dev/null
+++ b/examples/quick/customitems/painteditem/TextBalloon/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+ message(FATAL_ERROR "TextBalloon should be built as part of the 'painteditem' project, and not in isolation.")
+endif()
+
+qt_add_qml_module(qmltextballoon
+ URI "TextBalloon"
+ PLUGIN_TARGET qmltextballoon
+ SOURCES
+ textballoon.cpp textballoon.h
+)
+
+target_link_libraries(qmltextballoon PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
+
+install(TARGETS qmltextballoon
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}/TextBalloon"
+ LIBRARY DESTINATION "${CMAKE_INSTALL_BINDIR}/TextBalloon"
+)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qmldir
+ DESTINATION "${CMAKE_INSTALL_BINDIR}/TextBalloon"
+)
diff --git a/examples/quick/customitems/painteditem/TextBalloon/plugin.h b/examples/quick/customitems/painteditem/TextBalloon/plugin.h
new file mode 100644
index 0000000000..e598501b7e
--- /dev/null
+++ b/examples/quick/customitems/painteditem/TextBalloon/plugin.h
@@ -0,0 +1,12 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include <QQmlEngineExtensionPlugin>
+
+#include "textballoon.h"
+
+class TextBalloonPlugin : public QQmlEngineExtensionPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID QQmlEngineExtensionInterface_iid)
+};
diff --git a/examples/quick/customitems/painteditem/TextBalloonPlugin/qmldir b/examples/quick/customitems/painteditem/TextBalloon/qmldir
index e8a08ae9d3..3b72e9a44d 100644
--- a/examples/quick/customitems/painteditem/TextBalloonPlugin/qmldir
+++ b/examples/quick/customitems/painteditem/TextBalloon/qmldir
@@ -1 +1,2 @@
+module TextBalloon
plugin qmltextballoonplugin
diff --git a/examples/quick/customitems/painteditem/TextBalloon/textballoon.cpp b/examples/quick/customitems/painteditem/TextBalloon/textballoon.cpp
new file mode 100644
index 0000000000..e7fe911147
--- /dev/null
+++ b/examples/quick/customitems/painteditem/TextBalloon/textballoon.cpp
@@ -0,0 +1,56 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include "textballoon.h"
+#include <QPainter>
+
+//! [0]
+TextBalloon::TextBalloon(QQuickItem *parent)
+ : QQuickPaintedItem(parent)
+ , rightAligned(false)
+{
+}
+//! [0]
+
+//! [1]
+void TextBalloon::paint(QPainter *painter)
+{
+ QBrush brush(QColor("#007430"));
+
+ painter->setBrush(brush);
+ painter->setPen(Qt::NoPen);
+ painter->setRenderHint(QPainter::Antialiasing);
+
+ QSizeF itemSize = size();
+ painter->drawRoundedRect(0, 0, itemSize.width(), itemSize.height() - 10, 10, 10);
+
+ if (rightAligned)
+ {
+ const QPointF points[3] = {
+ QPointF(itemSize.width() - 10.0, itemSize.height() - 10.0),
+ QPointF(itemSize.width() - 20.0, itemSize.height()),
+ QPointF(itemSize.width() - 30.0, itemSize.height() - 10.0),
+ };
+ painter->drawConvexPolygon(points, 3);
+ }
+ else
+ {
+ const QPointF points[3] = {
+ QPointF(10.0, itemSize.height() - 10.0),
+ QPointF(20.0, itemSize.height()),
+ QPointF(30.0, itemSize.height() - 10.0),
+ };
+ painter->drawConvexPolygon(points, 3);
+ }
+}
+//! [1]
+
+bool TextBalloon::isRightAligned() const
+{
+ return this->rightAligned;
+}
+
+void TextBalloon::setRightAligned(bool rightAligned)
+{
+ this->rightAligned = rightAligned;
+}
diff --git a/examples/quick/customitems/painteditem/TextBalloon/textballoon.h b/examples/quick/customitems/painteditem/TextBalloon/textballoon.h
new file mode 100644
index 0000000000..a52db11ce7
--- /dev/null
+++ b/examples/quick/customitems/painteditem/TextBalloon/textballoon.h
@@ -0,0 +1,31 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#ifndef TEXTBALLOON_H
+#define TEXTBALLOON_H
+
+#include <QtQuick>
+
+//! [0]
+class TextBalloon : public QQuickPaintedItem
+{
+ Q_OBJECT
+ Q_PROPERTY(bool rightAligned READ isRightAligned WRITE setRightAligned NOTIFY rightAlignedChanged)
+ QML_ELEMENT
+
+ public:
+ TextBalloon(QQuickItem *parent = nullptr);
+ void paint(QPainter *painter) override;
+
+ bool isRightAligned() const;
+ void setRightAligned(bool rightAligned);
+
+ private:
+ bool rightAligned;
+
+ signals:
+ void rightAlignedChanged();
+};
+//! [0]
+
+#endif
diff --git a/examples/quick/customitems/painteditem/TextBalloon/textballoon.pro b/examples/quick/customitems/painteditem/TextBalloon/textballoon.pro
new file mode 100644
index 0000000000..7f7662b451
--- /dev/null
+++ b/examples/quick/customitems/painteditem/TextBalloon/textballoon.pro
@@ -0,0 +1,28 @@
+TEMPLATE = lib
+CONFIG += plugin qmltypes
+QT += qml quick
+
+QML_IMPORT_NAME = TextBalloon
+QML_IMPORT_MAJOR_VERSION = 1
+
+TARGET = qmltextballoonplugin
+
+HEADERS += \
+ plugin.h \
+ textballoon.h
+
+SOURCES += textballoon.cpp
+
+RESOURCES += textballoon.qrc
+
+qmldir_output.files = qmldir
+qmldir_output.path = $$OUT_PWD
+COPIES += qmldir_output
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/painteditem/$$QML_IMPORT_NAME
+qmldir_install.files = qmldir
+qmldir_install.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/painteditem/$$QML_IMPORT_NAME
+
+INSTALLS += qmldir_install target
+
+CONFIG += install_ok # Do not cargo-cult this!
diff --git a/examples/quick/customitems/painteditem/TextBalloon/textballoon.qrc b/examples/quick/customitems/painteditem/TextBalloon/textballoon.qrc
new file mode 100644
index 0000000000..42c42bd0a6
--- /dev/null
+++ b/examples/quick/customitems/painteditem/TextBalloon/textballoon.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/TextBalloon">
+ <file>qmldir</file>
+ </qresource>
+</RCC>
diff --git a/examples/quick/customitems/painteditem/TextBalloonPlugin/plugin.h b/examples/quick/customitems/painteditem/TextBalloonPlugin/plugin.h
deleted file mode 100644
index 4abf2cf3dc..0000000000
--- a/examples/quick/customitems/painteditem/TextBalloonPlugin/plugin.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-#include <QQmlEngineExtensionPlugin>
-
-#include "../textballoon.h"
-
-class TextBalloonPlugin : public QQmlEngineExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID QQmlEngineExtensionInterface_iid)
-};
diff --git a/examples/quick/customitems/painteditem/doc/src/textballoons.qdoc b/examples/quick/customitems/painteditem/doc/src/textballoons.qdoc
index 4541ba0bd9..a0194759bd 100644
--- a/examples/quick/customitems/painteditem/doc/src/textballoons.qdoc
+++ b/examples/quick/customitems/painteditem/doc/src/textballoons.qdoc
@@ -1,34 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Scene Graph - Painted Item
\brief Shows how to implement QPainter-based custom scenegraph items.
\example customitems/painteditem
\ingroup qtquickexamples
+ \examplecategory {Graphics}
The Painted Item example shows how to use the QML Scene Graph framework to
implement custom scenegraph items using QPainter.
@@ -38,16 +15,14 @@
The QQuickPaintedItem class is a class derived from QQuickItem for implementing
custom QML Scene Graph items using the QPainter interfaces.
- The example consists of an item class, a plugin class and a QML file
- to use this plugin. The \c TextBalloon class represents the individual
- text balloons extending QQuickPaintedItem, the \c TextBalloonPlugin class
- represents the skeleton code for a \l {Qt Quick} plugin and the
- \c textballoons.qml file is used to load the plugin and display the text
- balloons.
+ The example consists of an item class and a QML file to use the item. The
+ \c TextBalloon class represents the individual text balloons extending
+ QQuickPaintedItem and the \c textballoons.qml file is used to load the module
+ containing the TextBalloon QML type and display the text balloons.
We will focus on the \c TextBalloon class first and continue with the
- \c textballoons.qml file. For an example on how to implement a \l {Qt Quick}
- plugin please look at \l{Chapter 6: Writing an Extension Plugin}
+ \c textballoons.qml file. For an example on how to implement a plugin for a
+ QML module please look at \l{Chapter 6: Writing an Extension Plugin}
{Writing an Extension Plugin}
\section1 TextBalloon Class Declaration
@@ -56,7 +31,7 @@
is the base class for all QPainter based items in the QML Scene Graph
framework.
- \snippet customitems/painteditem/textballoon.h 0
+ \snippet customitems/painteditem/TextBalloon/textballoon.h 0
To implement a QQuickPaintedItem you must implement QQuickPaintedIem's pure
virtual function \l {QQuickPaintedItem::}{paint()} which implements the
@@ -67,13 +42,13 @@
We have to be sure to initialize the rightAligned property for a
TextBalloon item.
- \snippet customitems/painteditem/textballoon.cpp 0
+ \snippet customitems/painteditem/TextBalloon/textballoon.cpp 0
Then we implement the \c paint() function which is automatically called by
the Scene Graph framework to paint the contents of the item. The function
paints the item in local coordinates.
- \snippet customitems/painteditem/textballoon.cpp 1
+ \snippet customitems/painteditem/TextBalloon/textballoon.cpp 1
We start with setting the pen and brush on the item to define the look of
the item. After that we start drawing. Note that the \l {QQuickPaintedItem::}{contentsBoundingRect()}
@@ -81,7 +56,7 @@
returned by the \l {QQuickPaintedItem::}{contentsBoundingRect()} function is the size
of the item as defined in the QML file.
- \section1 Textballoons.qml File
+ \section1 textballoons.qml File
The Interface consists of two main parts. The scrollable area with the
textballoons and the controls button to add new balloons.
diff --git a/examples/quick/customitems/painteditem/main.cpp b/examples/quick/customitems/painteditem/main.cpp
new file mode 100644
index 0000000000..698db7e67c
--- /dev/null
+++ b/examples/quick/customitems/painteditem/main.cpp
@@ -0,0 +1,4 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+#include "../../shared/shared.h"
+DECLARATIVE_EXAMPLE_MAIN(painteditem/textballoons)
diff --git a/examples/quick/customitems/painteditem/painteditem.pro b/examples/quick/customitems/painteditem/painteditem.pro
index 641833f3aa..7c26304b26 100644
--- a/examples/quick/customitems/painteditem/painteditem.pro
+++ b/examples/quick/customitems/painteditem/painteditem.pro
@@ -1,29 +1,2 @@
-TEMPLATE = lib
-CONFIG += plugin qmltypes
-QT += qml quick
-
-QML_IMPORT_NAME = TextBalloonPlugin
-QML_IMPORT_MAJOR_VERSION = 1
-
-TARGET = qmltextballoonplugin
-
-HEADERS += \
- TextBalloonPlugin/plugin.h \
- textballoon.h
-
-SOURCES += textballoon.cpp
-
-RESOURCES += painteditem.qrc
-
-DESTDIR = $$QML_IMPORT_NAME
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/painteditem/$$QML_IMPORT_NAME
-qmldir.files = $$QML_IMPORT_NAME/qmldir
-qmldir.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/painteditem/$$QML_IMPORT_NAME
-
-INSTALLS += qmldir target
-
-CONFIG += install_ok # Do not cargo-cult this!
-
-OTHER_FILES += \
- textballoons.qml
+TEMPLATE = subdirs
+SUBDIRS = TextBalloon/textballoon.pro textballoonuser.pro
diff --git a/examples/quick/customitems/painteditem/painteditem.qrc b/examples/quick/customitems/painteditem/painteditem.qrc
index c240be02a1..95305efaca 100644
--- a/examples/quick/customitems/painteditem/painteditem.qrc
+++ b/examples/quick/customitems/painteditem/painteditem.qrc
@@ -1,6 +1,5 @@
<RCC>
- <qresource prefix="/painteditem">
- <file>textballoon.h</file>
+ <qresource prefix="/qt/qml/painteditem">
<file>textballoons.qml</file>
</qresource>
</RCC>
diff --git a/examples/quick/customitems/painteditem/textballoon.cpp b/examples/quick/customitems/painteditem/textballoon.cpp
deleted file mode 100644
index de34d67103..0000000000
--- a/examples/quick/customitems/painteditem/textballoon.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-#include "textballoon.h"
-#include <QPainter>
-
-//! [0]
-TextBalloon::TextBalloon(QQuickItem *parent)
- : QQuickPaintedItem(parent)
- , rightAligned(false)
-{
-}
-//! [0]
-
-//! [1]
-void TextBalloon::paint(QPainter *painter)
-{
- QBrush brush(QColor("#007430"));
-
- painter->setBrush(brush);
- painter->setPen(Qt::NoPen);
- painter->setRenderHint(QPainter::Antialiasing);
-
- QSizeF itemSize = size();
- painter->drawRoundedRect(0, 0, itemSize.width(), itemSize.height() - 10, 10, 10);
-
- if (rightAligned)
- {
- const QPointF points[3] = {
- QPointF(itemSize.width() - 10.0, itemSize.height() - 10.0),
- QPointF(itemSize.width() - 20.0, itemSize.height()),
- QPointF(itemSize.width() - 30.0, itemSize.height() - 10.0),
- };
- painter->drawConvexPolygon(points, 3);
- }
- else
- {
- const QPointF points[3] = {
- QPointF(10.0, itemSize.height() - 10.0),
- QPointF(20.0, itemSize.height()),
- QPointF(30.0, itemSize.height() - 10.0),
- };
- painter->drawConvexPolygon(points, 3);
- }
-}
-//! [1]
-
-bool TextBalloon::isRightAligned()
-{
- return this->rightAligned;
-}
-
-void TextBalloon::setRightAligned(bool rightAligned)
-{
- this->rightAligned = rightAligned;
-}
diff --git a/examples/quick/customitems/painteditem/textballoon.h b/examples/quick/customitems/painteditem/textballoon.h
deleted file mode 100644
index eb72804602..0000000000
--- a/examples/quick/customitems/painteditem/textballoon.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-#ifndef TEXTBALLOON_H
-#define TEXTBALLOON_H
-
-#include <QtQuick>
-
-//! [0]
-class TextBalloon : public QQuickPaintedItem
-{
- Q_OBJECT
- Q_PROPERTY(bool rightAligned READ isRightAligned WRITE setRightAligned NOTIFY rightAlignedChanged)
- QML_ELEMENT
-
- public:
- TextBalloon(QQuickItem *parent = 0);
- void paint(QPainter *painter);
-
- bool isRightAligned();
- void setRightAligned(bool rightAligned);
-
- private:
- bool rightAligned;
-
- signals:
- void rightAlignedChanged();
-};
-//! [0]
-
-#endif
diff --git a/examples/quick/customitems/painteditem/textballoons.qml b/examples/quick/customitems/painteditem/textballoons.qml
index 2c749bb440..1ef491f061 100644
--- a/examples/quick/customitems/painteditem/textballoons.qml
+++ b/examples/quick/customitems/painteditem/textballoons.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import "TextBalloonPlugin" 1.0
+import QtQuick
+import TextBalloon
Item {
height: 480
@@ -67,14 +20,14 @@ Item {
}
ListView {
+ id: balloonView
anchors.bottom: controls.top
anchors.bottomMargin: 2
anchors.top: parent.top
- id: balloonView
delegate: TextBalloon {
- anchors.right: index % 2 == 0 ? undefined : parent.right
+ anchors.right: index % 2 != 0 ? parent?.right : undefined
height: 60
- rightAligned: index % 2 == 0 ? false : true
+ rightAligned: index % 2 != 0
width: balloonWidth
}
model: balloonModel
@@ -97,7 +50,7 @@ Item {
Text {
anchors.centerIn: parent
- text: "Add another balloon"
+ text: qsTr("Add another balloon")
}
MouseArea {
diff --git a/examples/quick/customitems/painteditem/textballoonuser.pro b/examples/quick/customitems/painteditem/textballoonuser.pro
new file mode 100644
index 0000000000..7504542f4c
--- /dev/null
+++ b/examples/quick/customitems/painteditem/textballoonuser.pro
@@ -0,0 +1,10 @@
+TEMPLATE = app
+
+QT += qml quick
+
+TARGET = painteditem
+SOURCES += main.cpp
+RESOURCES += painteditem.qrc
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/painteditem
+INSTALLS += target
diff --git a/examples/quick/customitems/progressbar/content/ProgressBar.qml b/examples/quick/customitems/progressbar/content/ProgressBar.qml
deleted file mode 100644
index 594cccfe75..0000000000
--- a/examples/quick/customitems/progressbar/content/ProgressBar.qml
+++ /dev/null
@@ -1,93 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Item {
- id: progressbar
-
- property int minimum: 0
- property int maximum: 100
- property int value: 0
- property alias color: gradient1.color
- property alias secondColor: gradient2.color
-
- width: 250; height: 23
- clip: true
-
- BorderImage {
- source: "background.png"
- width: parent.width; height: parent.height
- border { left: 4; top: 4; right: 4; bottom: 4 }
- }
-
- Rectangle {
- id: highlight
-
- property int widthDest: ((progressbar.width * (value - minimum)) / (maximum - minimum) - 6)
-
- width: highlight.widthDest
- Behavior on width { SmoothedAnimation { velocity: 1200 } }
-
- anchors { left: parent.left; top: parent.top; bottom: parent.bottom; margins: 3 }
- radius: 1
- gradient: Gradient {
- GradientStop { id: gradient1; position: 0.0 }
- GradientStop { id: gradient2; position: 1.0 }
- }
-
- }
- Text {
- anchors { right: highlight.right; rightMargin: 6; verticalCenter: parent.verticalCenter }
- color: "white"
- font.bold: true
- text: Math.floor((value - minimum) / (maximum - minimum) * 100) + '%'
- }
-}
diff --git a/examples/quick/customitems/progressbar/content/background.png b/examples/quick/customitems/progressbar/content/background.png
deleted file mode 100644
index 5c316bc03e..0000000000
--- a/examples/quick/customitems/progressbar/content/background.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/progressbar/main.qml b/examples/quick/customitems/progressbar/main.qml
deleted file mode 100644
index 2dd67621a8..0000000000
--- a/examples/quick/customitems/progressbar/main.qml
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import "content"
-
-Rectangle {
- id: main
-
- width: 600; height: 405
- color: "#edecec"
-
- Flickable {
- anchors.fill: parent
- contentHeight: column.height + 20
-
- Column {
- id: column
- x: 10; y: 10
- spacing: 10
-
- Repeater {
- model: 25
-
- ProgressBar {
- property int r: Math.floor(Math.random() * 5000 + 1000)
- width: main.width - 20
-
- NumberAnimation on value { duration: r; from: 0; to: 100; loops: Animation.Infinite }
- ColorAnimation on color { duration: r; from: "lightsteelblue"; to: "thistle"; loops: Animation.Infinite }
- ColorAnimation on secondColor { duration: r; from: "steelblue"; to: "#CD96CD"; loops: Animation.Infinite }
- }
- }
- }
- }
-}
diff --git a/examples/quick/customitems/scrollbar/ScrollBar.qml b/examples/quick/customitems/scrollbar/ScrollBar.qml
deleted file mode 100644
index f2e46c5681..0000000000
--- a/examples/quick/customitems/scrollbar/ScrollBar.qml
+++ /dev/null
@@ -1,84 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Item {
- id: scrollBar
-
- // The properties that define the scrollbar's state.
- // position and pageSize are in the range 0.0 - 1.0. They are relative to the
- // height of the page, i.e. a pageSize of 0.5 means that you can see 50%
- // of the height of the view.
- // orientation can be either Qt.Vertical or Qt.Horizontal
- property real position
- property real pageSize
- property variant orientation : Qt.Vertical
-
- // A light, semi-transparent background
- Rectangle {
- id: background
- anchors.fill: parent
- radius: orientation == Qt.Vertical ? (width/2 - 1) : (height/2 - 1)
- color: "white"
- opacity: 0.3
- }
-
- // Size the bar to the required size, depending upon the orientation.
- Rectangle {
- x: orientation == Qt.Vertical ? 1 : (scrollBar.position * (scrollBar.width-2) + 1)
- y: orientation == Qt.Vertical ? (scrollBar.position * (scrollBar.height-2) + 1) : 1
- width: orientation == Qt.Vertical ? (parent.width-2) : (scrollBar.pageSize * (scrollBar.width-2))
- height: orientation == Qt.Vertical ? (scrollBar.pageSize * (scrollBar.height-2)) : (parent.height-2)
- radius: orientation == Qt.Vertical ? (width/2 - 1) : (height/2 - 1)
- color: "black"
- opacity: 0.7
- }
-}
diff --git a/examples/quick/customitems/scrollbar/doc/images/qml-scrollbar-example.png b/examples/quick/customitems/scrollbar/doc/images/qml-scrollbar-example.png
deleted file mode 100644
index 2c80421b06..0000000000
--- a/examples/quick/customitems/scrollbar/doc/images/qml-scrollbar-example.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/scrollbar/doc/src/scrollbar.qdoc b/examples/quick/customitems/scrollbar/doc/src/scrollbar.qdoc
deleted file mode 100644
index 37852222c0..0000000000
--- a/examples/quick/customitems/scrollbar/doc/src/scrollbar.qdoc
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-/*!
- \title UI Components: Scroll Bar Example
- \example customitems/scrollbar
- \brief The Scroll Bar Example shows how to use scroll bars on a flickable element.
-
- This example shows how to create scroll bars for a \l Flickable element
- using the \l {Flickable::visibleArea.xPosition}{Flickable::visibleArea}
- properties.
-
- \image qml-scrollbar-example.png
-*/
-
diff --git a/examples/quick/customitems/scrollbar/main.cpp b/examples/quick/customitems/scrollbar/main.cpp
deleted file mode 100644
index 579db41efd..0000000000
--- a/examples/quick/customitems/scrollbar/main.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(main)
diff --git a/examples/quick/customitems/scrollbar/main.qml b/examples/quick/customitems/scrollbar/main.qml
deleted file mode 100644
index 9248e44a42..0000000000
--- a/examples/quick/customitems/scrollbar/main.qml
+++ /dev/null
@@ -1,103 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Rectangle {
- width: 640
- height: 480
-
- // Create a flickable to view a large image.
- Flickable {
- id: view
- anchors.fill: parent
- contentWidth: picture.width
- contentHeight: picture.height
-
- Image {
- id: picture
- source: "pics/niagara_falls.jpg"
- asynchronous: true
- }
-
- // Only show the scrollbars when the view is moving.
- states: State {
- name: "ShowBars"
- when: view.movingVertically || view.movingHorizontally
- PropertyChanges { target: verticalScrollBar; opacity: 1 }
- PropertyChanges { target: horizontalScrollBar; opacity: 1 }
- }
-
- transitions: Transition {
- NumberAnimation { properties: "opacity"; duration: 400 }
- }
- }
-
- // Attach scrollbars to the right and bottom edges of the view.
- ScrollBar {
- id: verticalScrollBar
- width: 12; height: view.height-12
- anchors.right: view.right
- opacity: 0
- orientation: Qt.Vertical
- position: view.visibleArea.yPosition
- pageSize: view.visibleArea.heightRatio
- }
-
- ScrollBar {
- id: horizontalScrollBar
- width: view.width-12; height: 12
- anchors.bottom: view.bottom
- opacity: 0
- orientation: Qt.Horizontal
- position: view.visibleArea.xPosition
- pageSize: view.visibleArea.widthRatio
- }
-}
diff --git a/examples/quick/customitems/scrollbar/pics/niagara_falls.jpg b/examples/quick/customitems/scrollbar/pics/niagara_falls.jpg
deleted file mode 100644
index e625c0d3e6..0000000000
--- a/examples/quick/customitems/scrollbar/pics/niagara_falls.jpg
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/scrollbar/scrollbar.pro b/examples/quick/customitems/scrollbar/scrollbar.pro
deleted file mode 100644
index 7e6ea3c2d6..0000000000
--- a/examples/quick/customitems/scrollbar/scrollbar.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-TEMPLATE = app
-
-QT += quick qml
-SOURCES += main.cpp
-
-RESOURCES += scrollbar.qrc
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/scrollbar
-INSTALLS += target
diff --git a/examples/quick/customitems/scrollbar/scrollbar.qmlproject b/examples/quick/customitems/scrollbar/scrollbar.qmlproject
deleted file mode 100644
index e5a8bf02ca..0000000000
--- a/examples/quick/customitems/scrollbar/scrollbar.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "main.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/quick/customitems/scrollbar/scrollbar.qrc b/examples/quick/customitems/scrollbar/scrollbar.qrc
deleted file mode 100644
index b1ba5f9211..0000000000
--- a/examples/quick/customitems/scrollbar/scrollbar.qrc
+++ /dev/null
@@ -1,7 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>main.qml</file>
- <file>ScrollBar.qml</file>
- <file>pics/niagara_falls.jpg</file>
- </qresource>
-</RCC>
diff --git a/examples/quick/customitems/searchbox/SearchBox.qml b/examples/quick/customitems/searchbox/SearchBox.qml
deleted file mode 100644
index 13927e0d6f..0000000000
--- a/examples/quick/customitems/searchbox/SearchBox.qml
+++ /dev/null
@@ -1,119 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-FocusScope {
- id: focusScope
- width: 250; height: 28
-
- BorderImage {
- source: "images/lineedit-bg.png"
- width: parent.width; height: parent.height
- border { left: 4; top: 4; right: 4; bottom: 4 }
- }
-
- BorderImage {
- source: "images/lineedit-bg-focus.png"
- width: parent.width; height: parent.height
- border { left: 4; top: 4; right: 4; bottom: 4 }
- visible: parent.activeFocus ? true : false
- }
-
- Text {
- id: typeSomething
- anchors.fill: parent; anchors.leftMargin: 8
- verticalAlignment: Text.AlignVCenter
- text: "Type something..."
- color: "gray"
- font.italic: true
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: { focusScope.focus = true; Qt.inputMethod.show(); }
- }
-
- TextInput {
- id: textInput
- anchors { left: parent.left; leftMargin: 8; right: clear.left; rightMargin: 8; verticalCenter: parent.verticalCenter }
- focus: true
- selectByMouse: true
- }
-
- Image {
- id: clear
- anchors { right: parent.right; rightMargin: 8; verticalCenter: parent.verticalCenter }
- source: "images/clear.png"
- opacity: 0
-
- MouseArea {
- anchors.fill: parent
- onClicked: { textInput.text = ''; focusScope.focus = true; textInput.openSoftwareInputPanel(); }
- }
- }
-
- states: State {
- name: "hasText"; when: textInput.text != ''
- PropertyChanges { target: typeSomething; opacity: 0 }
- PropertyChanges { target: clear; opacity: 1 }
- }
-
- transitions: [
- Transition {
- from: ""; to: "hasText"
- NumberAnimation { exclude: typeSomething; properties: "opacity" }
- },
- Transition {
- from: "hasText"; to: ""
- NumberAnimation { properties: "opacity" }
- }
- ]
-}
diff --git a/examples/quick/customitems/searchbox/images/clear.png b/examples/quick/customitems/searchbox/images/clear.png
deleted file mode 100644
index c20a9cfba5..0000000000
--- a/examples/quick/customitems/searchbox/images/clear.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/searchbox/images/lineedit-bg-focus.png b/examples/quick/customitems/searchbox/images/lineedit-bg-focus.png
deleted file mode 100644
index c8f2722298..0000000000
--- a/examples/quick/customitems/searchbox/images/lineedit-bg-focus.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/searchbox/images/lineedit-bg.png b/examples/quick/customitems/searchbox/images/lineedit-bg.png
deleted file mode 100644
index 5c316bc03e..0000000000
--- a/examples/quick/customitems/searchbox/images/lineedit-bg.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/searchbox/main.cpp b/examples/quick/customitems/searchbox/main.cpp
deleted file mode 100644
index 579db41efd..0000000000
--- a/examples/quick/customitems/searchbox/main.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(main)
diff --git a/examples/quick/customitems/searchbox/main.qml b/examples/quick/customitems/searchbox/main.qml
deleted file mode 100644
index bc6900ba7e..0000000000
--- a/examples/quick/customitems/searchbox/main.qml
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Rectangle {
- id: page
- width: 500; height: 250
- color: "#edecec"
-
- MouseArea {
- anchors.fill: parent
- onClicked: page.focus = false;
- }
- Column {
- anchors { horizontalCenter: parent.horizontalCenter; verticalCenter: parent.verticalCenter }
- spacing: 10
-
- SearchBox { id: search1; KeyNavigation.tab: search2; KeyNavigation.backtab: search3; focus: true }
- SearchBox { id: search2; KeyNavigation.tab: search3; KeyNavigation.backtab: search1 }
- SearchBox { id: search3; KeyNavigation.tab: search1; KeyNavigation.backtab: search2 }
- }
-}
diff --git a/examples/quick/customitems/searchbox/searchbox.pro b/examples/quick/customitems/searchbox/searchbox.pro
deleted file mode 100644
index c22fc117aa..0000000000
--- a/examples/quick/customitems/searchbox/searchbox.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-TEMPLATE = app
-
-QT += quick qml
-SOURCES += main.cpp
-
-RESOURCES += searchbox.qrc
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/searchbox
-INSTALLS += target
diff --git a/examples/quick/customitems/searchbox/searchbox.qmlproject b/examples/quick/customitems/searchbox/searchbox.qmlproject
deleted file mode 100644
index e5a8bf02ca..0000000000
--- a/examples/quick/customitems/searchbox/searchbox.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "main.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/quick/customitems/searchbox/searchbox.qrc b/examples/quick/customitems/searchbox/searchbox.qrc
deleted file mode 100644
index f7a8602c9a..0000000000
--- a/examples/quick/customitems/searchbox/searchbox.qrc
+++ /dev/null
@@ -1,9 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>main.qml</file>
- <file>SearchBox.qml</file>
- <file>images/clear.png</file>
- <file>images/lineedit-bg-focus.png</file>
- <file>images/lineedit-bg.png</file>
- </qresource>
-</RCC>
diff --git a/examples/quick/customitems/slideswitch/content/Switch.qml b/examples/quick/customitems/slideswitch/content/Switch.qml
deleted file mode 100644
index 72eb13e1e3..0000000000
--- a/examples/quick/customitems/slideswitch/content/Switch.qml
+++ /dev/null
@@ -1,127 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-
-Item {
- id: toggleswitch
- width: background.width; height: background.height
-
-//![1]
- property bool on: false
-//![1]
-
-//![2]
- function toggle() {
- if (toggleswitch.state == "on")
- toggleswitch.state = "off";
- else
- toggleswitch.state = "on";
- }
-//![2]
-
-//![3]
- function releaseSwitch() {
- if (knob.x == 1) {
- if (toggleswitch.state == "off") return;
- }
- if (knob.x == 78) {
- if (toggleswitch.state == "on") return;
- }
- toggle();
- }
-//![3]
-
-//![4]
- Image {
- id: background
- source: "background.png"
- MouseArea { anchors.fill: parent; onClicked: toggle() }
- }
-//![4]
-
-//![5]
- Image {
- id: knob
- x: 1; y: 2
- source: "knob.png"
-
- MouseArea {
- anchors.fill: parent
- drag.target: knob; drag.axis: Drag.XAxis; drag.minimumX: 1; drag.maximumX: 78
- onClicked: toggle()
- onReleased: releaseSwitch()
- }
- }
-//![5]
-
-//![6]
- states: [
- State {
- name: "on"
- PropertyChanges { target: knob; x: 78 }
- PropertyChanges { target: toggleswitch; on: true }
- },
- State {
- name: "off"
- PropertyChanges { target: knob; x: 1 }
- PropertyChanges { target: toggleswitch; on: false }
- }
- ]
-//![6]
-
-//![7]
- transitions: Transition {
- NumberAnimation { properties: "x"; easing.type: Easing.InOutQuad; duration: 200 }
- }
-//![7]
-}
-//![0]
diff --git a/examples/quick/customitems/slideswitch/content/background.png b/examples/quick/customitems/slideswitch/content/background.png
deleted file mode 100644
index d736815870..0000000000
--- a/examples/quick/customitems/slideswitch/content/background.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/slideswitch/content/background.svg b/examples/quick/customitems/slideswitch/content/background.svg
deleted file mode 100644
index f920d3e47a..0000000000
--- a/examples/quick/customitems/slideswitch/content/background.svg
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
- <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
-]>
-<svg version="1.1"
- xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
- x="0px" y="0px" width="130px" height="56px" viewBox="0 0 130 56" enable-background="new 0 0 130 56" xml:space="preserve">
-<defs>
-</defs>
-<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-37.5005" y1="-66" x2="-37.5005" y2="-121.9985" gradientTransform="matrix(1 0 0 -1 102.5 -66)">
- <stop offset="0.0056" style="stop-color:#000000"/>
- <stop offset="1" style="stop-color:#EAECEF"/>
-</linearGradient>
-<path fill="url(#SVGID_1_)" d="M101.998,55.998H28c-15.439,0-28-12.562-28-28C0,12.56,12.561,0,28,0h73.998
- c15.439,0,28,12.559,28,27.998C129.998,43.438,117.438,55.998,101.998,55.998L101.998,55.998z"/>
-<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="-5.5" y1="-132.1338" x2="-69.5002" y2="-55.8613" gradientTransform="matrix(1 0 0 -1 102.5 -66)">
- <stop offset="0.0056" style="stop-color:#000000"/>
- <stop offset="1" style="stop-color:#828385"/>
-</linearGradient>
-<path fill="url(#SVGID_2_)" d="M127.999,27.998c0,14.359-11.642,26-26,26h-74c-14.359,0-26-11.641-26-26l0,0
- c0-14.359,11.641-26,26-26h74C116.357,1.998,127.999,13.639,127.999,27.998L127.999,27.998z"/>
-</svg>
diff --git a/examples/quick/customitems/slideswitch/content/knob.png b/examples/quick/customitems/slideswitch/content/knob.png
deleted file mode 100644
index ee0a436f84..0000000000
--- a/examples/quick/customitems/slideswitch/content/knob.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/slideswitch/content/knob.svg b/examples/quick/customitems/slideswitch/content/knob.svg
deleted file mode 100644
index fb6933718e..0000000000
--- a/examples/quick/customitems/slideswitch/content/knob.svg
+++ /dev/null
@@ -1,867 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://web.resource.org/cc/"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- version="1.1"
- x="0px"
- y="0px"
- width="52px"
- height="52px"
- viewBox="0 0 52 52"
- enable-background="new 0 0 52 52"
- xml:space="preserve"
- id="svg3883"
- sodipodi:version="0.32"
- inkscape:version="0.44.1"
- sodipodi:docname="knob_on.svg"
- sodipodi:docbase="/local/axel/embeddedwidgets/embeddedstories/skins/svgslideswitch/MetallicBrush"><metadata
- id="metadata4200"><rdf:RDF><cc:Work
- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><sodipodi:namedview
- inkscape:window-height="640"
- inkscape:window-width="937"
- inkscape:pageshadow="2"
- inkscape:pageopacity="0.0"
- guidetolerance="10.0"
- gridtolerance="10.0"
- objecttolerance="10.0"
- borderopacity="1.0"
- bordercolor="#666666"
- pagecolor="#ffffff"
- id="base"
- inkscape:zoom="8.3653846"
- inkscape:cx="26.000002"
- inkscape:cy="26"
- inkscape:window-x="0"
- inkscape:window-y="0"
- inkscape:current-layer="svg3883" />
-<defs
- id="defs3885">
-</defs>
-<linearGradient
- id="SVGID_1_"
- gradientUnits="userSpaceOnUse"
- x1="-59.7866"
- y1="-115.917"
- x2="-93.2123"
- y2="-76.0818"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#000000"
- id="stop3888" />
- <stop
- offset="1"
- style="stop-color:#EAECEF"
- id="stop3890" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="26"
- id="circle3892"
- style="fill:url(#SVGID_1_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="26"
- sodipodi:ry="26"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_2_"
- gradientUnits="userSpaceOnUse"
- x1="-100.5"
- y1="-96"
- x2="-52.5"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop3895" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop3897" />
- <stop
- offset="0.6043"
- style="stop-color:#E7EAED"
- id="stop3899" />
- <stop
- offset="0.6751"
- style="stop-color:#DEE4E7"
- id="stop3901" />
- <stop
- offset="0.7358"
- style="stop-color:#CFD9DD"
- id="stop3903" />
- <stop
- offset="0.791"
- style="stop-color:#B9CACF"
- id="stop3905" />
- <stop
- offset="0.8425"
- style="stop-color:#9EB6BD"
- id="stop3907" />
- <stop
- offset="0.891"
- style="stop-color:#7B9EA7"
- id="stop3909" />
- <stop
- offset="0.9374"
- style="stop-color:#53828C"
- id="stop3911" />
- <stop
- offset="0.9809"
- style="stop-color:#25626E"
- id="stop3913" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop3915" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="24"
- id="circle3917"
- style="fill:url(#SVGID_2_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="24"
- sodipodi:ry="24"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_3_"
- gradientUnits="userSpaceOnUse"
- x1="-98.6328"
- y1="-96"
- x2="-54.3672"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop3920" />
- <stop
- offset="0.073"
- style="stop-color:#8FAECB"
- id="stop3922" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop3924" />
- <stop
- offset="0.5902"
- style="stop-color:#E7E9ED"
- id="stop3926" />
- <stop
- offset="0.618"
- style="stop-color:#E4E7EB"
- id="stop3928" />
- <stop
- offset="0.6697"
- style="stop-color:#E0E4E9"
- id="stop3930" />
- <stop
- offset="0.7211"
- style="stop-color:#D4DCE1"
- id="stop3932" />
- <stop
- offset="0.7722"
- style="stop-color:#C0CFD5"
- id="stop3934" />
- <stop
- offset="0.809"
- style="stop-color:#ADC2C9"
- id="stop3936" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop3938" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="22.132999"
- id="circle3940"
- style="fill:url(#SVGID_3_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="22.132999"
- sodipodi:ry="22.132999"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_4_"
- gradientUnits="userSpaceOnUse"
- x1="-96.7671"
- y1="-96"
- x2="-56.2324"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop3943" />
- <stop
- offset="0.073"
- style="stop-color:#86A7C4"
- id="stop3945" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop3947" />
- <stop
- offset="0.577"
- style="stop-color:#E7EAED"
- id="stop3949" />
- <stop
- offset="0.618"
- style="stop-color:#E1E6EA"
- id="stop3951" />
- <stop
- offset="0.6697"
- style="stop-color:#DDE3E8"
- id="stop3953" />
- <stop
- offset="0.7211"
- style="stop-color:#D1DBE1"
- id="stop3955" />
- <stop
- offset="0.7722"
- style="stop-color:#BDCDD5"
- id="stop3957" />
- <stop
- offset="0.809"
- style="stop-color:#AAC0CA"
- id="stop3959" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop3961" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="20.267"
- id="circle3963"
- style="fill:url(#SVGID_4_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="20.267"
- sodipodi:ry="20.267"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_5_"
- gradientUnits="userSpaceOnUse"
- x1="-94.8999"
- y1="-96"
- x2="-58.0996"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop3966" />
- <stop
- offset="0.073"
- style="stop-color:#7E9FBC"
- id="stop3968" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop3970" />
- <stop
- offset="0.5709"
- style="stop-color:#E6E9ED"
- id="stop3972" />
- <stop
- offset="0.618"
- style="stop-color:#DFE4E9"
- id="stop3974" />
- <stop
- offset="0.6687"
- style="stop-color:#DBE1E7"
- id="stop3976" />
- <stop
- offset="0.7193"
- style="stop-color:#CFD9E0"
- id="stop3978" />
- <stop
- offset="0.7695"
- style="stop-color:#BBCCD6"
- id="stop3980" />
- <stop
- offset="0.809"
- style="stop-color:#A6BECA"
- id="stop3982" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop3984" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="18.4"
- id="circle3986"
- style="fill:url(#SVGID_5_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="18.4"
- sodipodi:ry="18.4"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_6_"
- gradientUnits="userSpaceOnUse"
- x1="-93.0332"
- y1="-96"
- x2="-59.9668"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop3989" />
- <stop
- offset="0.073"
- style="stop-color:#7697B4"
- id="stop3991" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop3993" />
- <stop
- offset="0.5636"
- style="stop-color:#E6E9ED"
- id="stop3995" />
- <stop
- offset="0.618"
- style="stop-color:#DCE2E8"
- id="stop3997" />
- <stop
- offset="0.6687"
- style="stop-color:#D8DFE6"
- id="stop3999" />
- <stop
- offset="0.7193"
- style="stop-color:#CCD7E0"
- id="stop4001" />
- <stop
- offset="0.7695"
- style="stop-color:#B8CAD5"
- id="stop4003" />
- <stop
- offset="0.809"
- style="stop-color:#A3BCCA"
- id="stop4005" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop4007" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="16.533001"
- id="circle4009"
- style="fill:url(#SVGID_6_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="16.533001"
- sodipodi:ry="16.533001"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_7_"
- gradientUnits="userSpaceOnUse"
- x1="-91.167"
- y1="-96"
- x2="-61.833"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop4012" />
- <stop
- offset="0.073"
- style="stop-color:#6D8FAD"
- id="stop4014" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop4016" />
- <stop
- offset="0.5605"
- style="stop-color:#E5E8EC"
- id="stop4018" />
- <stop
- offset="0.618"
- style="stop-color:#DAE1E7"
- id="stop4020" />
- <stop
- offset="0.6679"
- style="stop-color:#D6DEE5"
- id="stop4022" />
- <stop
- offset="0.7175"
- style="stop-color:#CAD6DF"
- id="stop4024" />
- <stop
- offset="0.7669"
- style="stop-color:#B6C9D6"
- id="stop4026" />
- <stop
- offset="0.809"
- style="stop-color:#9FBACB"
- id="stop4028" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop4030" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="14.667"
- id="circle4032"
- style="fill:url(#SVGID_7_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="14.667"
- sodipodi:ry="14.667"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_8_"
- gradientUnits="userSpaceOnUse"
- x1="-89.2998"
- y1="-96"
- x2="-63.7002"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop4035" />
- <stop
- offset="0.073"
- style="stop-color:#6587A5"
- id="stop4037" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop4039" />
- <stop
- offset="0.5588"
- style="stop-color:#E4E8EC"
- id="stop4041" />
- <stop
- offset="0.618"
- style="stop-color:#D8DFE7"
- id="stop4043" />
- <stop
- offset="0.6675"
- style="stop-color:#D4DCE5"
- id="stop4045" />
- <stop
- offset="0.7167"
- style="stop-color:#C8D5E0"
- id="stop4047" />
- <stop
- offset="0.7657"
- style="stop-color:#B4C8D6"
- id="stop4049" />
- <stop
- offset="0.809"
- style="stop-color:#9CB8CB"
- id="stop4051" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop4053" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="12.8"
- id="circle4055"
- style="fill:url(#SVGID_8_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="12.8"
- sodipodi:ry="12.8"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_9_"
- gradientUnits="userSpaceOnUse"
- x1="-87.4331"
- y1="-96"
- x2="-65.5664"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop4058" />
- <stop
- offset="0.073"
- style="stop-color:#5D809D"
- id="stop4060" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop4062" />
- <stop
- offset="0.5567"
- style="stop-color:#E3E7EC"
- id="stop4064" />
- <stop
- offset="0.618"
- style="stop-color:#D5DDE6"
- id="stop4066" />
- <stop
- offset="0.6671"
- style="stop-color:#D1DAE4"
- id="stop4068" />
- <stop
- offset="0.7159"
- style="stop-color:#C5D3DF"
- id="stop4070" />
- <stop
- offset="0.7645"
- style="stop-color:#B1C6D6"
- id="stop4072" />
- <stop
- offset="0.809"
- style="stop-color:#98B5CB"
- id="stop4074" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop4076" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="10.933"
- id="circle4078"
- style="fill:url(#SVGID_9_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="10.933"
- sodipodi:ry="10.933"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_10_"
- gradientUnits="userSpaceOnUse"
- x1="-85.5659"
- y1="-96"
- x2="-67.4336"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop4081" />
- <stop
- offset="0.073"
- style="stop-color:#547896"
- id="stop4083" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop4085" />
- <stop
- offset="0.5588"
- style="stop-color:#E1E6EB"
- id="stop4087" />
- <stop
- offset="0.618"
- style="stop-color:#D3DCE5"
- id="stop4089" />
- <stop
- offset="0.6663"
- style="stop-color:#CFD9E3"
- id="stop4091" />
- <stop
- offset="0.7143"
- style="stop-color:#C3D2DF"
- id="stop4093" />
- <stop
- offset="0.7621"
- style="stop-color:#AFC5D7"
- id="stop4095" />
- <stop
- offset="0.809"
- style="stop-color:#94B3CC"
- id="stop4097" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop4099" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="9.066"
- id="circle4101"
- style="fill:url(#SVGID_10_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="9.066"
- sodipodi:ry="9.066"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_11_"
- gradientUnits="userSpaceOnUse"
- x1="-83.7002"
- y1="-96"
- x2="-69.2998"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop4104" />
- <stop
- offset="0.073"
- style="stop-color:#4C708E"
- id="stop4106" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop4108" />
- <stop
- offset="0.5625"
- style="stop-color:#DEE4EA"
- id="stop4110" />
- <stop
- offset="0.618"
- style="stop-color:#D0DAE4"
- id="stop4112" />
- <stop
- offset="0.6663"
- style="stop-color:#CCD7E2"
- id="stop4114" />
- <stop
- offset="0.7143"
- style="stop-color:#C0D0DE"
- id="stop4116" />
- <stop
- offset="0.7621"
- style="stop-color:#ACC3D6"
- id="stop4118" />
- <stop
- offset="0.809"
- style="stop-color:#91B1CC"
- id="stop4120" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop4122" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="7.1999998"
- id="circle4124"
- style="fill:url(#SVGID_11_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="7.1999998"
- sodipodi:ry="7.1999998"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_12_"
- gradientUnits="userSpaceOnUse"
- x1="-81.833"
- y1="-96"
- x2="-71.167"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop4127" />
- <stop
- offset="0.073"
- style="stop-color:#446986"
- id="stop4129" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop4131" />
- <stop
- offset="0.5757"
- style="stop-color:#D9E0E8"
- id="stop4133" />
- <stop
- offset="0.618"
- style="stop-color:#CED8E3"
- id="stop4135" />
- <stop
- offset="0.6655"
- style="stop-color:#CAD5E2"
- id="stop4137" />
- <stop
- offset="0.7129"
- style="stop-color:#BECEDD"
- id="stop4139" />
- <stop
- offset="0.7601"
- style="stop-color:#AAC1D6"
- id="stop4141" />
- <stop
- offset="0.807"
- style="stop-color:#8EB0CC"
- id="stop4143" />
- <stop
- offset="0.809"
- style="stop-color:#8DAFCC"
- id="stop4145" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop4147" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="5.3330002"
- id="circle4149"
- style="fill:url(#SVGID_12_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="5.3330002"
- sodipodi:ry="5.3330002"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_13_"
- gradientUnits="userSpaceOnUse"
- x1="-79.9658"
- y1="-96"
- x2="-73.0342"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop4152" />
- <stop
- offset="0.073"
- style="stop-color:#3B617F"
- id="stop4154" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop4156" />
- <stop
- offset="0.6087"
- style="stop-color:#CED9E3"
- id="stop4158" />
- <stop
- offset="0.618"
- style="stop-color:#CBD7E2"
- id="stop4160" />
- <stop
- offset="0.6655"
- style="stop-color:#C7D4E1"
- id="stop4162" />
- <stop
- offset="0.7129"
- style="stop-color:#BBCDDD"
- id="stop4164" />
- <stop
- offset="0.7601"
- style="stop-color:#A7C0D6"
- id="stop4166" />
- <stop
- offset="0.807"
- style="stop-color:#8BAECD"
- id="stop4168" />
- <stop
- offset="0.809"
- style="stop-color:#8AADCD"
- id="stop4170" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop4172" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="3.4660001"
- id="circle4174"
- style="fill:url(#SVGID_13_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="3.4660001"
- sodipodi:ry="3.4660001"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_14_"
- gradientUnits="userSpaceOnUse"
- x1="-78.1001"
- y1="-96"
- x2="-74.9004"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop4177" />
- <stop
- offset="0.073"
- style="stop-color:#335977"
- id="stop4179" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop4181" />
- <stop
- offset="0.618"
- style="stop-color:#C9D5E1"
- id="stop4183" />
- <stop
- offset="0.6648"
- style="stop-color:#C5D3E0"
- id="stop4185" />
- <stop
- offset="0.7114"
- style="stop-color:#B9CBDC"
- id="stop4187" />
- <stop
- offset="0.758"
- style="stop-color:#A5BFD6"
- id="stop4189" />
- <stop
- offset="0.8042"
- style="stop-color:#89ADCE"
- id="stop4191" />
- <stop
- offset="0.809"
- style="stop-color:#86ABCD"
- id="stop4193" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop4195" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="1.6"
- id="circle4197"
- style="fill:url(#SVGID_14_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="1.6"
- sodipodi:ry="1.6"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-</svg> \ No newline at end of file
diff --git a/examples/quick/customitems/slideswitch/doc/src/example-slideswitch.qdoc b/examples/quick/customitems/slideswitch/doc/src/example-slideswitch.qdoc
deleted file mode 100644
index 19c79dea97..0000000000
--- a/examples/quick/customitems/slideswitch/doc/src/example-slideswitch.qdoc
+++ /dev/null
@@ -1,132 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-/*!
-\page qmlexampletoggleswitch.html tutorial
-\title Qt Quick Examples - Toggle Switch
-\brief A reusable switch component made in QML
- \ingroup qtquickexamples
-
-This example shows how to create a reusable switch component in QML.
-
-The code for this example can be found in the \c examples/quick/customitems/slideswitch directory.
-
-The objects that compose the switch are:
-
-\list
-\li a \c on property (the interface to interact with the switch),
-\li two images (the background image and the knob),
-\li two mouse regions for user interation (on the background image and on the knob),
-\li two states (an \e on state and an \e off state),
-\li two functions or slots to react to the user interation (\c toggle() and \c dorelease()),
-\li and a transition that describe how to go from one state to the other.
-\endlist
-
-\section1 Switch.qml
-\snippet customitems/slideswitch/content/Switch.qml 0
-
-\section1 Walkthrough
-
-\section2 Interface
-\snippet customitems/slideswitch/content/Switch.qml 1
-
-This property is the interface of the switch. By default, the switch is off and this property is \c false.
-It can be used to activate/deactivate the switch or to query its current state.
-
-In this example:
-
-\qml
-Item {
- Switch {
- id: mySwitch
- on: true
- }
- Text {
- text: "The switch is on"
- visible: mySwitch.on == true
- }
-}
-\endqml
-
-the text will only be visible when the switch is on.
-
-\section2 Images and User Interaction
-\snippet customitems/slideswitch/content/Switch.qml 4
-
-First, we create the background image of the switch.
-In order for the switch to toggle when the user clicks on the background, we add a \l{MouseArea} as a child item of the image.
-A \c MouseArea has a \c onClicked property that is triggered when the item is clicked. For the moment we will just call a
-\c toggle() function. We will see what this function does in a moment.
-
-\snippet customitems/slideswitch/content/Switch.qml 5
-
-Then, we place the image of the knob on top of the background.
-The interaction here is a little more complex. We want the knob to move with the finger when it is clicked. That is what the \c drag
-property of the \c MouseArea is for. We also want to toggle the switch if the knob is released between state. We handle this case
-in the \c dorelease() function that is called in the \c onReleased property.
-
-\section2 States
-\snippet customitems/slideswitch/content/Switch.qml 6
-
-We define the two states of the switch:
-\list
-\li In the \e on state the knob is on the right (\c x position is 78) and the \c on property is \c true.
-\li In the \e off state the knob is on the left (\c x position is 1) and the \c on property is \c false.
-\endlist
-
-For more information on states see \l{Qt Quick States}.
-
-\section2 Functions
-
-We add two JavaScript functions to our switch:
-
-\snippet customitems/slideswitch/content/Switch.qml 2
-
-This first function is called when the background image or the knob are clicked. We simply want the switch to toggle between the two
-states (\e on and \e off).
-
-
-\snippet customitems/slideswitch/content/Switch.qml 3
-
-This second function is called when the knob is released and we want to make sure that the knob does not end up between states
-(neither \e on nor \e off). If it is the case call the \c toggle() function otherwise we do nothing.
-
-For more information on scripts see \l{JavaScript Expressions in QML Documents}.
-
-\section2 Transition
-\snippet customitems/slideswitch/content/Switch.qml 7
-
-At this point, when the switch toggles between the two states the knob will instantly change its \c x position between 1 and 78.
-In order for the knob to move smoothly we add a transition that will animate the \c x property with an easing curve for a duration of 200ms.
-
-For more information on transitions see \l{Animation and Transitions in Qt Quick}.
-
-\section1 Usage
-The switch can be used in a QML file, like this:
-\snippet customitems/slideswitch/slideswitch.qml 0
-*/
diff --git a/examples/quick/customitems/slideswitch/slideswitch.qml b/examples/quick/customitems/slideswitch/slideswitch.qml
deleted file mode 100644
index 7ddbfc2928..0000000000
--- a/examples/quick/customitems/slideswitch/slideswitch.qml
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import "content"
-
-Rectangle {
- color: "white"
- width: 400; height: 250
-
-//![0]
- Switch { anchors.centerIn: parent; on: false }
-//![0]
-}
diff --git a/examples/quick/customitems/spinner/content/Spinner.qml b/examples/quick/customitems/spinner/content/Spinner.qml
deleted file mode 100644
index 0eec968ed1..0000000000
--- a/examples/quick/customitems/spinner/content/Spinner.qml
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Image {
- property alias model: view.model
- property alias delegate: view.delegate
- property alias currentIndex: view.currentIndex
- property real itemHeight: 30
-
- source: "spinner-bg.png"
- clip: true
-
- PathView {
- id: view
- anchors.fill: parent
-
- pathItemCount: height/itemHeight
- preferredHighlightBegin: 0.5
- preferredHighlightEnd: 0.5
- highlight: Image { source: "spinner-select.png"; width: view.width; height: itemHeight+4 }
- dragMargin: view.width/2
-
- path: Path {
- startX: view.width/2; startY: -itemHeight/2
- PathLine { x: view.width/2; y: view.pathItemCount*itemHeight + itemHeight }
- }
- }
-
- Keys.onDownPressed: view.incrementCurrentIndex()
- Keys.onUpPressed: view.decrementCurrentIndex()
-}
diff --git a/examples/quick/customitems/spinner/content/spinner-bg.png b/examples/quick/customitems/spinner/content/spinner-bg.png
deleted file mode 100644
index da34fc4090..0000000000
--- a/examples/quick/customitems/spinner/content/spinner-bg.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/spinner/content/spinner-select.png b/examples/quick/customitems/spinner/content/spinner-select.png
deleted file mode 100644
index 95a17a1fe2..0000000000
--- a/examples/quick/customitems/spinner/content/spinner-select.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/spinner/main.cpp b/examples/quick/customitems/spinner/main.cpp
deleted file mode 100644
index 579db41efd..0000000000
--- a/examples/quick/customitems/spinner/main.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(main)
diff --git a/examples/quick/customitems/spinner/main.qml b/examples/quick/customitems/spinner/main.qml
deleted file mode 100644
index 82b31aba0c..0000000000
--- a/examples/quick/customitems/spinner/main.qml
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import "content"
-
-Rectangle {
- width: 240; height: 320
-
- Column {
- y: 20; x: 20; spacing: 20
-
- Spinner {
- id: spinner
- width: 200; height: 240
- focus: true
- model: 20
- itemHeight: 30
- delegate: Text { font.pixelSize: 25; text: index; height: 30 }
- }
-
- Text { text: "Current item index: " + spinner.currentIndex }
- }
-}
diff --git a/examples/quick/customitems/spinner/spinner.pro b/examples/quick/customitems/spinner/spinner.pro
deleted file mode 100644
index b5be6884d2..0000000000
--- a/examples/quick/customitems/spinner/spinner.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-TEMPLATE = app
-
-QT += quick qml
-SOURCES += main.cpp
-
-RESOURCES += spinner.qrc
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/spinner
-INSTALLS += target
diff --git a/examples/quick/customitems/spinner/spinner.qmlproject b/examples/quick/customitems/spinner/spinner.qmlproject
deleted file mode 100644
index e5a8bf02ca..0000000000
--- a/examples/quick/customitems/spinner/spinner.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "main.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/quick/customitems/spinner/spinner.qrc b/examples/quick/customitems/spinner/spinner.qrc
deleted file mode 100644
index 3a8e4b17fd..0000000000
--- a/examples/quick/customitems/spinner/spinner.qrc
+++ /dev/null
@@ -1,8 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>main.qml</file>
- <file>content/spinner-bg.png</file>
- <file>content/spinner-select.png</file>
- <file>content/Spinner.qml</file>
- </qresource>
-</RCC>
diff --git a/examples/quick/customitems/tabwidget/TabWidget.qml b/examples/quick/customitems/tabwidget/TabWidget.qml
deleted file mode 100644
index d0e6f8224b..0000000000
--- a/examples/quick/customitems/tabwidget/TabWidget.qml
+++ /dev/null
@@ -1,112 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Item {
- id: tabWidget
-
- // Setting the default property to stack.children means any child items
- // of the TabWidget are actually added to the 'stack' item's children.
- // See the "Property Binding"
- // documentation for details on default properties.
- default property alias content: stack.children
-
- property int current: 0
-
- onCurrentChanged: setOpacities()
- Component.onCompleted: setOpacities()
-
- function setOpacities() {
- for (var i = 0; i < stack.children.length; ++i) {
- stack.children[i].opacity = (i == current ? 1 : 0)
- }
- }
-
- Row {
- id: header
-
- Repeater {
- model: stack.children.length
- delegate: Rectangle {
- width: tabWidget.width / stack.children.length; height: 36
-
- Rectangle {
- width: parent.width; height: 1
- anchors { bottom: parent.bottom; bottomMargin: 1 }
- color: "#acb2c2"
- }
- BorderImage {
- anchors { fill: parent; leftMargin: 2; topMargin: 5; rightMargin: 1 }
- border { left: 7; right: 7 }
- source: "tab.png"
- visible: tabWidget.current == index
- }
- Text {
- horizontalAlignment: Qt.AlignHCenter; verticalAlignment: Qt.AlignVCenter
- anchors.fill: parent
- text: stack.children[index].title
- elide: Text.ElideRight
- font.bold: tabWidget.current == index
- }
- MouseArea {
- anchors.fill: parent
- onClicked: tabWidget.current = index
- }
- }
- }
- }
-
- Item {
- id: stack
- width: tabWidget.width
- anchors.top: header.bottom; anchors.bottom: tabWidget.bottom
- }
-}
diff --git a/examples/quick/customitems/tabwidget/doc/images/qml-tabwidget-example.png b/examples/quick/customitems/tabwidget/doc/images/qml-tabwidget-example.png
deleted file mode 100644
index 2e1cae2584..0000000000
--- a/examples/quick/customitems/tabwidget/doc/images/qml-tabwidget-example.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/tabwidget/doc/images/tab.png b/examples/quick/customitems/tabwidget/doc/images/tab.png
deleted file mode 100644
index 2ea989b68d..0000000000
--- a/examples/quick/customitems/tabwidget/doc/images/tab.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/tabwidget/doc/src/tabwidget.qdoc b/examples/quick/customitems/tabwidget/doc/src/tabwidget.qdoc
deleted file mode 100644
index a45c8107cb..0000000000
--- a/examples/quick/customitems/tabwidget/doc/src/tabwidget.qdoc
+++ /dev/null
@@ -1,42 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \title TabWidget Example
- \example customitems/tabwidget
- \brief The TabWidget example shows how to create a tabwidget using property aliases
- and QML Object default properties.
-
- This example shows how to create a tab widget. It also demonstrates how
- \l {Property aliases}{property aliases} and
- \l {QML Object Attributes#Default Properties}{default properties} can be used to collect and
- assemble the child items declared within an \l Item.
-
- \image qml-tabwidget-example.png
-*/
-
-
diff --git a/examples/quick/customitems/tabwidget/main.cpp b/examples/quick/customitems/tabwidget/main.cpp
deleted file mode 100644
index 579db41efd..0000000000
--- a/examples/quick/customitems/tabwidget/main.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(main)
diff --git a/examples/quick/customitems/tabwidget/main.qml b/examples/quick/customitems/tabwidget/main.qml
deleted file mode 100644
index 6867cf450b..0000000000
--- a/examples/quick/customitems/tabwidget/main.qml
+++ /dev/null
@@ -1,109 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-TabWidget {
- id: tabs
- width: 640; height: 480
-
- Rectangle {
- property string title: "Red"
- anchors.fill: parent
- color: "#e3e3e3"
-
- Rectangle {
- anchors.fill: parent; anchors.margins: 20
- color: "#ff7f7f"
- Text {
- width: parent.width - 20
- anchors.centerIn: parent; horizontalAlignment: Qt.AlignHCenter
- text: "Roses are red"
- font.pixelSize: 20
- wrapMode: Text.WordWrap
- }
- }
- }
-
- Rectangle {
- property string title: "Green"
- anchors.fill: parent
- color: "#e3e3e3"
-
- Rectangle {
- anchors.fill: parent; anchors.margins: 20
- color: "#7fff7f"
- Text {
- width: parent.width - 20
- anchors.centerIn: parent; horizontalAlignment: Qt.AlignHCenter
- text: "Flower stems are green"
- font.pixelSize: 20
- wrapMode: Text.WordWrap
- }
- }
- }
-
- Rectangle {
- property string title: "Blue"
- anchors.fill: parent; color: "#e3e3e3"
-
- Rectangle {
- anchors.fill: parent; anchors.margins: 20
- color: "#7f7fff"
- Text {
- width: parent.width - 20
- anchors.centerIn: parent; horizontalAlignment: Qt.AlignHCenter
- text: "Violets are blue"
- font.pixelSize: 20
- wrapMode: Text.WordWrap
- }
- }
- }
-}
diff --git a/examples/quick/customitems/tabwidget/tabwidget.pro b/examples/quick/customitems/tabwidget/tabwidget.pro
deleted file mode 100644
index b852bb4075..0000000000
--- a/examples/quick/customitems/tabwidget/tabwidget.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-TEMPLATE = app
-
-QT += quick qml
-SOURCES += main.cpp
-
-RESOURCES += tabwidget.qrc
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/tabwidget
-INSTALLS += target
diff --git a/examples/quick/customitems/tabwidget/tabwidget.qmlproject b/examples/quick/customitems/tabwidget/tabwidget.qmlproject
deleted file mode 100644
index e5a8bf02ca..0000000000
--- a/examples/quick/customitems/tabwidget/tabwidget.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "main.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/quick/customitems/tabwidget/tabwidget.qrc b/examples/quick/customitems/tabwidget/tabwidget.qrc
deleted file mode 100644
index ee71f677b1..0000000000
--- a/examples/quick/customitems/tabwidget/tabwidget.qrc
+++ /dev/null
@@ -1,8 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>main.qml</file>
- <file>TabWidget.qml</file>
- <file>doc/images/qml-tabwidget-example.png</file>
- <file>doc/images/tab.png</file>
- </qresource>
-</RCC>
diff --git a/examples/quick/delegatechooser/CMakeLists.txt b/examples/quick/delegatechooser/CMakeLists.txt
deleted file mode 100644
index dc45ad5c3c..0000000000
--- a/examples/quick/delegatechooser/CMakeLists.txt
+++ /dev/null
@@ -1,125 +0,0 @@
-# Generated from delegatechooser.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(delegatechooser LANGUAGES CXX)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/delegatechooser")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(delegatechooser
- main.cpp
-)
-set_target_properties(delegatechooser PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(delegatechooser PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-
-# Resources:
-set(qml_resource_files
- "delegatechooser.qml"
-)
-
-qt6_add_resources(delegatechooser "qml"
- PREFIX
- "/"
- FILES
- ${qml_resource_files}
-)
-set_source_files_properties("../shared/Button.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Button.qml"
-)
-set_source_files_properties("../shared/CheckBox.qml"
- PROPERTIES QT_RESOURCE_ALIAS "CheckBox.qml"
-)
-set_source_files_properties("../shared/FlickrRssModel.qml"
- PROPERTIES QT_RESOURCE_ALIAS "FlickrRssModel.qml"
-)
-set_source_files_properties("../shared/Label.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Label.qml"
-)
-set_source_files_properties("../shared/LauncherList.qml"
- PROPERTIES QT_RESOURCE_ALIAS "LauncherList.qml"
-)
-set_source_files_properties("../shared/SimpleLauncherDelegate.qml"
- PROPERTIES QT_RESOURCE_ALIAS "SimpleLauncherDelegate.qml"
-)
-set_source_files_properties("../shared/Slider.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Slider.qml"
-)
-set_source_files_properties("../shared/TabSet.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TabSet.qml"
-)
-set_source_files_properties("../shared/TextField.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TextField.qml"
-)
-set_source_files_properties("../shared/images/back.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/back.png"
-)
-set_source_files_properties("../shared/images/checkmark.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/checkmark.png"
-)
-set_source_files_properties("../shared/images/next.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/next.png"
-)
-set_source_files_properties("../shared/images/qt-logo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/qt-logo.png"
-)
-set_source_files_properties("../shared/images/slider_handle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/slider_handle.png"
-)
-set_source_files_properties("../shared/images/tab.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/tab.png"
-)
-set(shared_resource_files
- "Button.qml"
- "CheckBox.qml"
- "FlickrRssModel.qml"
- "Label.qml"
- "LauncherList.qml"
- "SimpleLauncherDelegate.qml"
- "Slider.qml"
- "TabSet.qml"
- "TextField.qml"
- "images/back.png"
- "images/checkmark.png"
- "images/next.png"
- "images/qt-logo.png"
- "images/slider_handle.png"
- "images/tab.png"
-)
-
-qt6_add_resources(delegatechooser "shared"
- PREFIX
- "/shared"
- BASE
- "../shared"
- FILES
- ${shared_resource_files}
-)
-
-install(TARGETS delegatechooser
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
diff --git a/examples/quick/delegatechooser/delegatechooser.pro b/examples/quick/delegatechooser/delegatechooser.pro
deleted file mode 100644
index f06864ba89..0000000000
--- a/examples/quick/delegatechooser/delegatechooser.pro
+++ /dev/null
@@ -1,8 +0,0 @@
-TEMPLATE = app
-QT += quick qml
-
-SOURCES += main.cpp
-RESOURCES += qml.qrc ../shared/shared.qrc
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/delegatechooser
-INSTALLS += target
diff --git a/examples/quick/delegatechooser/delegatechooser.qml b/examples/quick/delegatechooser/delegatechooser.qml
deleted file mode 100644
index afb8518abf..0000000000
--- a/examples/quick/delegatechooser/delegatechooser.qml
+++ /dev/null
@@ -1,145 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtQml.Models 2.12
-import QtQuick.Layouts 1.12
-import Qt.labs.qmlmodels 1.0
-
-Rectangle {
- visible: true
- width: 640
- height: 640
-
- ListModel {
- id: listModel
- ListElement { dataType: "rect"; color: "green" }
- ListElement { dataType: "image"; source: "../shared/images/qt-logo.png" }
- ListElement { dataType: "rect"; color: "green" }
- ListElement { dataType: "image"; source: "../shared/images/qt-logo.png" }
- ListElement { dataType: "rect"; color: "blue" }
- ListElement { dataType: "rect"; color: "blue" }
- ListElement { dataType: "rect"; color: "blue" }
- ListElement { dataType: "rect"; color: "blue" }
- ListElement { dataType: "rect"; color: "blue" }
- ListElement { dataType: "rect"; color: "blue" }
- }
-
- ListModel {
- id: listModel2
- ListElement { dataType: "rect"; color: "blue" }
- ListElement { dataType: "rect"; color: "blue" }
- ListElement { dataType: "rect"; color: "green" }
- ListElement { dataType: "image"; source: "../shared/images/qt-logo.png" }
- ListElement { dataType: "rect"; color: "green" }
- ListElement { dataType: "image"; source: "../shared/images/qt-logo.png" }
- ListElement { dataType: "rect"; color: "blue" }
- ListElement { dataType: "rect"; color: "lightsteelblue" }
- ListElement { dataType: "rect"; color: "fuchsia" }
- ListElement { dataType: "rect"; color: "lime" }
- }
-
- DelegateChooser {
- id: fancyDelegate
- role: "dataType"
- DelegateChoice {
- roleValue: "rect"
- delegate: DelegateChooser {
- DelegateChoice {
- row: 0
- Rectangle {
- width: parent.width
- height: 50
- color: "red"
- border.color: "black"
- border.width: 1
- }
- }
- DelegateChoice {
- Rectangle {
- width: parent.width
- height: 50
- color: model.color
- border.color: "black"
- border.width: 1
- }
- }
- }
- }
- DelegateChoice {
- roleValue: "image"
- delegate: Image {
- width: parent.width
- height: 100
- source: model.source
- fillMode: Image.PreserveAspectFit
- }
- }
- }
-
- Item {
- anchors.fill: parent
- id: ite
- RowLayout {
- ListView {
- Layout.preferredHeight: ite.height
- Layout.preferredWidth: ite.width * 0.5
- model: listModel
- delegate: fancyDelegate
- }
- ListView {
- Layout.preferredHeight: ite.height
- Layout.preferredWidth: ite.width * 0.5
- model: listModel2
- delegate: fancyDelegate
- }
- }
- }
-}
diff --git a/examples/quick/delegatechooser/main.cpp b/examples/quick/delegatechooser/main.cpp
deleted file mode 100644
index 5df9207e24..0000000000
--- a/examples/quick/delegatechooser/main.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-#include "../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(delegatechooser)
diff --git a/examples/quick/draganddrop/CMakeLists.txt b/examples/quick/draganddrop/CMakeLists.txt
index fe0107938a..0493f8feea 100644
--- a/examples/quick/draganddrop/CMakeLists.txt
+++ b/examples/quick/draganddrop/CMakeLists.txt
@@ -1,130 +1,53 @@
-# Generated from draganddrop.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(draganddrop LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup(REQUIRES 6.5)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
+add_subdirectory("../shared" "shared")
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/draganddrop")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(draganddrop
+qt_add_executable(draganddropexample
+ WIN32
+ MACOSX_BUNDLE
main.cpp
)
-set_target_properties(draganddrop PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(draganddrop PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-# Resources:
-set(draganddrop_resource_files
- "draganddrop.qml"
- "tiles/DragTile.qml"
- "tiles/DropTile.qml"
- "tiles/tiles.qml"
- "views/Icon.qml"
- "views/gridview.qml"
+qt_add_qml_module(draganddropexample
+ URI draganddrop
+ QML_FILES
+ "draganddrop.qml"
+ "tiles/DragTile.qml"
+ "tiles/DropTile.qml"
+ "tiles/tiles.qml"
+ "views/Icon.qml"
+ "views/gridview.qml"
+ "external/externaldraganddrop.qml"
)
-qt6_add_resources(draganddrop "draganddrop"
- PREFIX
- "/draganddrop"
- FILES
- ${draganddrop_resource_files}
-)
-set_source_files_properties("../shared/Button.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Button.qml"
-)
-set_source_files_properties("../shared/CheckBox.qml"
- PROPERTIES QT_RESOURCE_ALIAS "CheckBox.qml"
-)
-set_source_files_properties("../shared/FlickrRssModel.qml"
- PROPERTIES QT_RESOURCE_ALIAS "FlickrRssModel.qml"
-)
-set_source_files_properties("../shared/Label.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Label.qml"
-)
-set_source_files_properties("../shared/LauncherList.qml"
- PROPERTIES QT_RESOURCE_ALIAS "LauncherList.qml"
-)
-set_source_files_properties("../shared/SimpleLauncherDelegate.qml"
- PROPERTIES QT_RESOURCE_ALIAS "SimpleLauncherDelegate.qml"
-)
-set_source_files_properties("../shared/Slider.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Slider.qml"
-)
-set_source_files_properties("../shared/TabSet.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TabSet.qml"
-)
-set_source_files_properties("../shared/TextField.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TextField.qml"
-)
-set_source_files_properties("../shared/images/back.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/back.png"
-)
-set_source_files_properties("../shared/images/checkmark.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/checkmark.png"
-)
-set_source_files_properties("../shared/images/next.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/next.png"
-)
-set_source_files_properties("../shared/images/qt-logo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/qt-logo.png"
-)
-set_source_files_properties("../shared/images/slider_handle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/slider_handle.png"
-)
-set_source_files_properties("../shared/images/tab.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/tab.png"
-)
-set(shared_resource_files
- "Button.qml"
- "CheckBox.qml"
- "FlickrRssModel.qml"
- "Label.qml"
- "LauncherList.qml"
- "SimpleLauncherDelegate.qml"
- "Slider.qml"
- "TabSet.qml"
- "TextField.qml"
- "images/back.png"
- "images/checkmark.png"
- "images/next.png"
- "images/qt-logo.png"
- "images/slider_handle.png"
- "images/tab.png"
+target_link_libraries(draganddropexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
-qt6_add_resources(draganddrop "shared"
- PREFIX
- "/shared"
- BASE
- "../shared"
- FILES
- ${shared_resource_files}
+add_dependencies(draganddropexample draganddrop_shared)
+
+install(TARGETS draganddropexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-install(TARGETS draganddrop
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+qt_generate_deploy_qml_app_script(
+ TARGET draganddropexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/draganddrop/doc/src/draganddrop.qdoc b/examples/quick/draganddrop/doc/src/draganddrop.qdoc
index 754fa8f8cb..444bbafca4 100644
--- a/examples/quick/draganddrop/doc/src/draganddrop.qdoc
+++ b/examples/quick/draganddrop/doc/src/draganddrop.qdoc
@@ -1,35 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Qt Quick Examples - Drag and Drop
\example draganddrop
\brief This is a collection of QML drag and drop examples.
\image qml-draganddrop-example.png
\ingroup qtquickexamples
+ \examplecategory {Graphics}
\e{Drag and Drop} is a collection of small QML examples relating to the drag
and drop functionality. For more information, visit the \l{Drag and Drop}
diff --git a/examples/quick/draganddrop/draganddrop.qml b/examples/quick/draganddrop/draganddrop.qml
index b1fb6eb268..9e1629e5d4 100644
--- a/examples/quick/draganddrop/draganddrop.qml
+++ b/examples/quick/draganddrop/draganddrop.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import "../shared" as Examples
+import QtQuick
+import shared as Examples
Item {
height: 480
@@ -58,8 +11,9 @@ Item {
id: ll
anchors.fill: parent
Component.onCompleted: {
- addExample("Tiles", "Press and drag tiles to move them into the matching colored boxes", Qt.resolvedUrl("tiles/tiles.qml"));
- addExample("GridView", "Press and drag to re-order items in the grid", Qt.resolvedUrl("views/gridview.qml"));
+ addExample(qsTr("Tiles"), qsTr("Press and drag tiles to move them into the matching colored boxes"), Qt.resolvedUrl("tiles/tiles.qml"))
+ addExample(qsTr("GridView"), qsTr("Press and drag to re-order items in the grid"), Qt.resolvedUrl("views/gridview.qml"))
+ addExample(qsTr("External"), qsTr("Drag and drop between this and other applications."), Qt.resolvedUrl("external/externaldraganddrop.qml"))
}
}
}
diff --git a/examples/quick/draganddrop/draganddrop.qrc b/examples/quick/draganddrop/draganddrop.qrc
index df9fec51d2..1e6ae00d12 100644
--- a/examples/quick/draganddrop/draganddrop.qrc
+++ b/examples/quick/draganddrop/draganddrop.qrc
@@ -1,10 +1,11 @@
<RCC>
- <qresource prefix="/draganddrop">
+ <qresource prefix="/qt/qml/draganddrop">
<file>draganddrop.qml</file>
<file>tiles/DragTile.qml</file>
<file>tiles/DropTile.qml</file>
<file>tiles/tiles.qml</file>
<file>views/gridview.qml</file>
<file>views/Icon.qml</file>
+ <file>external/externaldraganddrop.qml</file>
</qresource>
</RCC>
diff --git a/examples/quick/draganddrop/external/externaldraganddrop.qml b/examples/quick/draganddrop/external/externaldraganddrop.qml
new file mode 100644
index 0000000000..8156a13f55
--- /dev/null
+++ b/examples/quick/draganddrop/external/externaldraganddrop.qml
@@ -0,0 +1,84 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
+
+Control {
+ padding: 8
+ contentItem: ColumnLayout {
+ component DragAndDropArea: Rectangle {
+ id: item
+ property string display: qsTr("Drag items to this area, or drag this item to a different drop area.")
+ property alias dropEnabled: acceptDropCB.checked
+ color: dropArea.containsDrag ? Qt.darker(palette.base) : palette.base
+
+ ColorAnimation on color {
+ id: rejectAnimation
+ from: "#FCC"
+ to: palette.base
+ duration: 1000
+ }
+ Label {
+ anchors.fill: parent
+ anchors.margins: 10
+ text: item.display
+ wrapMode: Text.WordWrap
+ }
+ DropArea {
+ id: dropArea
+ anchors.fill: parent
+ keys: ["text/plain"]
+ onEntered: (drag) => {
+ if (!acceptDropCB.checked) {
+ drag.accepted = false
+ rejectAnimation.start()
+ }
+ }
+ onDropped: (drop) => {
+ if (drop.hasText && acceptDropCB.checked) {
+ if (drop.proposedAction === Qt.MoveAction || drop.proposedAction === Qt.CopyAction) {
+ item.display = drop.text
+ drop.acceptProposedAction()
+ }
+ }
+ }
+ }
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+ drag.target: draggable
+ }
+ Item {
+ id: draggable
+ anchors.fill: parent
+ Drag.active: mouseArea.drag.active
+ Drag.hotSpot.x: 0
+ Drag.hotSpot.y: 0
+ Drag.mimeData: { "text/plain": item.display }
+ Drag.dragType: Drag.Automatic
+ Drag.onDragFinished: (dropAction) => {
+ if (dropAction === Qt.MoveAction)
+ item.display = ""
+ }
+ }
+ CheckBox {
+ id: acceptDropCB
+ anchors.bottom: parent.bottom
+ checked: true
+ text: qsTr("accept drop")
+ }
+ }
+
+ DragAndDropArea {
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ }
+
+ DragAndDropArea {
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ }
+ }
+}
diff --git a/examples/quick/draganddrop/main.cpp b/examples/quick/draganddrop/main.cpp
index f31dc51577..e1bf553cea 100644
--- a/examples/quick/draganddrop/main.cpp
+++ b/examples/quick/draganddrop/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(draganddrop/draganddrop)
diff --git a/examples/quick/draganddrop/tiles/DragTile.qml b/examples/quick/draganddrop/tiles/DragTile.qml
index 47f0ebed5e..f35695f865 100644
--- a/examples/quick/draganddrop/tiles/DragTile.qml
+++ b/examples/quick/draganddrop/tiles/DragTile.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
//! [0]
Item {
@@ -57,12 +10,14 @@ Item {
required property string colorKey
required property int modelData
- width: 64; height: 64
+ width: 64
+ height: 64
MouseArea {
id: mouseArea
- width: 64; height: 64
+ width: 64
+ height: 64
anchors.centerIn: parent
drag.target: tile
@@ -72,9 +27,12 @@ Item {
Rectangle {
id: tile
- width: 64; height: 64
- anchors.verticalCenter: parent.verticalCenter
- anchors.horizontalCenter: parent.horizontalCenter
+ width: 64
+ height: 64
+ anchors {
+ verticalCenter: parent.verticalCenter
+ horizontalCenter: parent.horizontalCenter
+ }
color: root.colorKey
@@ -88,16 +46,20 @@ Item {
color: "white"
font.pixelSize: 48
text: root.modelData + 1
- horizontalAlignment:Text.AlignHCenter
+ horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
//! [1]
states: State {
when: mouseArea.drag.active
- ParentChange { target: tile; parent: root }
- AnchorChanges { target: tile; anchors.verticalCenter: undefined; anchors.horizontalCenter: undefined }
+ AnchorChanges {
+ target: tile
+ anchors {
+ verticalCenter: undefined
+ horizontalCenter: undefined
+ }
+ }
}
-
}
}
}
diff --git a/examples/quick/draganddrop/tiles/DropTile.qml b/examples/quick/draganddrop/tiles/DropTile.qml
index bf7101f0f6..409c3801e4 100644
--- a/examples/quick/draganddrop/tiles/DropTile.qml
+++ b/examples/quick/draganddrop/tiles/DropTile.qml
@@ -1,80 +1,23 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
//! [0]
DropArea {
id: dragTarget
property string colorKey
- property alias dropProxy: dragTarget
- width: 64; height: 64
+ width: 64
+ height: 64
keys: [ colorKey ]
Rectangle {
id: dropRectangle
anchors.fill: parent
- color: dragTarget.colorKey
-
- states: [
- State {
- when: dragTarget.containsDrag
- PropertyChanges {
- target: dropRectangle
- color: "grey"
- }
- }
- ]
+ color: dragTarget.containsDrag ? "grey" : dragTarget.colorKey
}
}
//! [0]
diff --git a/examples/quick/draganddrop/tiles/tiles.qml b/examples/quick/draganddrop/tiles/tiles.qml
index 80270354aa..c9667022d7 100644
--- a/examples/quick/draganddrop/tiles/tiles.qml
+++ b/examples/quick/draganddrop/tiles/tiles.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
Rectangle {
id: root
@@ -61,22 +14,28 @@ Rectangle {
Grid {
id: redDestination
- anchors.left: redSource.right; anchors.top: parent.top;
- anchors.margins: 5
+ anchors {
+ left: redSource.right
+ top: parent.top
+ margins: 5
+ }
width: 64*3
height: 64*3
opacity: 0.5
columns: 3
Repeater {
- model: 9;
+ model: 9
delegate: DropTile { colorKey: "red" }
}
}
Grid {
- anchors.right: blueSource.left; anchors.bottom: parent.bottom;
- anchors.margins: 5
+ anchors {
+ right: blueSource.left
+ bottom: parent.bottom
+ margins: 5
+ }
width: 64*3
height: 64*3
@@ -93,8 +52,12 @@ Rectangle {
Column {
id: redSource
- anchors.left: parent.left; anchors.top: parent.top; anchors.bottom: parent.bottom
- anchors.margins: 5
+ anchors {
+ left: parent.left
+ top: parent.top
+ bottom: parent.bottom
+ margins: 5
+ }
width: 64
spacing: -16
@@ -106,8 +69,12 @@ Rectangle {
Column {
id: blueSource
- anchors.right: parent.right; anchors.top: parent.top; anchors.bottom: parent.bottom
- anchors.margins: 5
+ anchors {
+ right: parent.right
+ top: parent.top
+ bottom: parent.bottom
+ margins: 5
+ }
width: 64
spacing: -16
diff --git a/examples/quick/draganddrop/views/Icon.qml b/examples/quick/draganddrop/views/Icon.qml
index 261d6d146a..80bd0c1e7a 100644
--- a/examples/quick/draganddrop/views/Icon.qml
+++ b/examples/quick/draganddrop/views/Icon.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.14
+import QtQuick
Rectangle {
id: icon
@@ -88,8 +41,10 @@ Rectangle {
AnchorChanges {
target: icon
- anchors.horizontalCenter: undefined
- anchors.verticalCenter: undefined
+ anchors {
+ horizontalCenter: undefined
+ verticalCenter: undefined
+ }
}
}
]
diff --git a/examples/quick/draganddrop/views/gridview.qml b/examples/quick/draganddrop/views/gridview.qml
index 05bd48e7fa..244d73341d 100644
--- a/examples/quick/draganddrop/views/gridview.qml
+++ b/examples/quick/draganddrop/views/gridview.qml
@@ -1,64 +1,23 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQml 2.14
-import QtQuick 2.14
-import QtQml.Models 2.14
+pragma ComponentBehavior: Bound
+import QtQml
+import QtQuick
+import QtQml.Models
GridView {
id: root
- width: 320; height: 480
- cellWidth: 80; cellHeight: 80
+ width: 320
+ height: 480
+ cellWidth: 80
+ cellHeight: 80
displaced: Transition {
- NumberAnimation { properties: "x,y"; easing.type: Easing.OutQuad }
+ NumberAnimation {
+ properties: "x,y"
+ easing.type: Easing.OutQuad
+ }
}
//! [0]
@@ -95,9 +54,10 @@ GridView {
//! [1]
delegate: DropArea {
id: delegateRoot
- required property color color;
+ required property color color
- width: 80; height: 80
+ width: 80
+ height: 80
onEntered: function(drag) {
visualModel.items.move((drag.source as Icon).visualIndex, icon.visualIndex)
diff --git a/examples/quick/embeddedinwidgets/CMakeLists.txt b/examples/quick/embeddedinwidgets/CMakeLists.txt
index 4862e58f5c..d977def966 100644
--- a/examples/quick/embeddedinwidgets/CMakeLists.txt
+++ b/examples/quick/embeddedinwidgets/CMakeLists.txt
@@ -1,55 +1,44 @@
-# Generated from embeddedinwidgets.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(embeddedinwidgets LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Quick Widgets)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup(REQUIRES 6.5)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/embeddedinwidgets")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Widgets)
-find_package(Qt6 COMPONENTS Quick)
-
-qt_add_executable(embeddedinwidgets
+qt_add_executable(embeddedinwidgetsexample WIN32 MACOSX_BUNDLE
main.cpp
)
-set_target_properties(embeddedinwidgets PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(embeddedinwidgets PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Quick
- Qt::Widgets
-)
+target_link_libraries(embeddedinwidgetsexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Quick
+ Qt6::Widgets
+)
# Resources:
-set(embeddedinwidgets_resource_files
- "TextBox.qml"
- "main.qml"
+qt_add_qml_module(embeddedinwidgetsexample
+ URI embeddedinwidgets
+ QML_FILES
+ "Main.qml"
+ RESOURCES
+ "reflect.frag.qsb"
)
-qt6_add_resources(embeddedinwidgets "embeddedinwidgets"
- PREFIX
- "/embeddedinwidgets"
- FILES
- ${embeddedinwidgets_resource_files}
+install(TARGETS embeddedinwidgetsexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-install(TARGETS embeddedinwidgets
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+qt_generate_deploy_qml_app_script(
+ TARGET embeddedinwidgetsexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/embeddedinwidgets/Main.qml b/examples/quick/embeddedinwidgets/Main.qml
new file mode 100644
index 0000000000..1408e8f261
--- /dev/null
+++ b/examples/quick/embeddedinwidgets/Main.qml
@@ -0,0 +1,53 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+
+Rectangle {
+ id: window
+
+ width: 400
+ height: 200
+
+ gradient: Gradient {
+ GradientStop { position: 0; color: "lightsteelblue" }
+ GradientStop { position: 1; color: "black" }
+ }
+
+ Column {
+ id: column
+
+ y: 50
+ width: 200
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 4
+
+
+ TextField {
+ text: "A QML text field..."
+ width: parent.width
+ focus: true
+ }
+
+ TextField {
+ text: "Another QML text field..."
+ width: parent.width
+ }
+
+ layer.enabled: true
+ layer.smooth: true
+ }
+
+ ShaderEffect {
+ anchors.top: column.bottom
+ width: column.width
+ height: column.height;
+ anchors.left: column.left
+
+ property variant source: column;
+ property size sourceSize: Qt.size(0.5 / column.width, 0.5 / column.height);
+
+ fragmentShader: "reflect.frag.qsb"
+ }
+}
diff --git a/examples/quick/embeddedinwidgets/TextBox.qml b/examples/quick/embeddedinwidgets/TextBox.qml
deleted file mode 100644
index b45bb0ef1b..0000000000
--- a/examples/quick/embeddedinwidgets/TextBox.qml
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-FocusScope {
- id: root
-
- width: 100
- height: 30
-
- property Item nextInFocus;
- property string label;
-
- Rectangle {
- anchors.margins: 2
- anchors.fill: parent
- radius: 8
- gradient: Gradient {
- GradientStop { position: 0; color: "lightgray" }
- GradientStop { position: 1; color: "white" }
- }
- border.color: "white"
- border.width: 2
- antialiasing: true
-
- TextInput {
- anchors.fill: parent
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- focus: true
-
- text: root.label;
-
- KeyNavigation.tab: root.nextInFocus;
- }
- }
-}
diff --git a/examples/quick/embeddedinwidgets/doc/images/qml-embeddedinwidgets-example.jpg b/examples/quick/embeddedinwidgets/doc/images/qml-embeddedinwidgets-example.jpg
new file mode 100644
index 0000000000..b2d188e422
--- /dev/null
+++ b/examples/quick/embeddedinwidgets/doc/images/qml-embeddedinwidgets-example.jpg
Binary files differ
diff --git a/examples/quick/embeddedinwidgets/doc/src/embeddedinwidgets.qdoc b/examples/quick/embeddedinwidgets/doc/src/embeddedinwidgets.qdoc
new file mode 100644
index 0000000000..5e76b5c472
--- /dev/null
+++ b/examples/quick/embeddedinwidgets/doc/src/embeddedinwidgets.qdoc
@@ -0,0 +1,46 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+/*!
+ \title Qt Quick Examples - Embedded in Widgets
+ \example embeddedinwidgets
+ \image qml-embeddedinwidgets-example.jpg
+ \brief Demonstrates embedding a QQuickWindow into a QWidget UI via QWidget::createWindowContainer().
+ \ingroup qtquickexamples
+ \examplecategory {Graphics}
+
+ This example demonstrates one of the approaches to adding Qt Quick content
+ into a QWidget-based application. QQuickView, and its parent class,
+ QQuickWindow derive from QWindow. This means that they can be used with
+ QWidget::createWindowContainer(), like any other QWindow.
+
+ \include examples-run.qdocinc
+
+ Embedding the window internally leads to creating a native child widget
+ inside the widget hierarchy, and the window (the QQuickView in the example)
+ is reparented. The container widget takes care of repositioning the child
+ window so that it appears to be part of the user interface, even though in
+ reality it is separate native window that paints independently from its
+ parent, the QWidget-based top-level window.
+
+ \snippet embeddedinwidgets/main.cpp ctor
+
+ The key step during initialization is the creation of \c container, a
+ QWidget that wraps and hosts the QQuickView. This widget can then added to a
+ layout like any other QWidget.
+
+ \note Using native window embedding is just one possible approach to
+ combining QWidget and Qt Quick user interfaces. The other, more commonly
+ used approach for this is QQuickWidget. See the \l{Qt Quick Widgets Example}
+ for an example of using QQuickWidget. There are significant differences
+ internally when it comes to rendering and event handling. QQuickWidget does
+ not use native windows at all and redirects the Qt Quick rendering into a
+ texture that is then composited with the rest of the QWidget content via a
+ 3D graphics API such as OpenGL or Vulkan. This brings more flexibility, at
+ the expense of performance. It also works on platforms where there is no
+ actual windowing system and no concept of native windows. Whereas the window
+ embedding approach demonstrated by this example can be more performant, but
+ it is best suited for user interfaces where the Qt Quick content occupies a
+ fixed rectangular area and is not resized, stacked, or clipped afterwards.
+
+ \sa QWidget::createWindowContainer()
+*/
diff --git a/examples/quick/embeddedinwidgets/embeddedinwidgets.pro b/examples/quick/embeddedinwidgets/embeddedinwidgets.pro
index de47a397ab..493f462370 100644
--- a/examples/quick/embeddedinwidgets/embeddedinwidgets.pro
+++ b/examples/quick/embeddedinwidgets/embeddedinwidgets.pro
@@ -3,10 +3,15 @@ QT += widgets quick
SOURCES += main.cpp
-OTHER_FILES += main.qml TextBox.qml
+OTHER_FILES += Main.qml
-RESOURCES += \
- embeddedinwidgets.qrc
+qml_resources.files = \
+ qmldir \
+ Main.qml
+
+qml_resources.prefix = /qt/qml/embeddedinwidgets
+
+RESOURCES += qml_resources
target.path = $$[QT_INSTALL_EXAMPLES]/quick/embeddedinwidgets
INSTALLS += target
diff --git a/examples/quick/embeddedinwidgets/embeddedinwidgets.qrc b/examples/quick/embeddedinwidgets/embeddedinwidgets.qrc
deleted file mode 100644
index 62e0ed2161..0000000000
--- a/examples/quick/embeddedinwidgets/embeddedinwidgets.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<RCC>
- <qresource prefix="/embeddedinwidgets">
- <file>main.qml</file>
- <file>TextBox.qml</file>
- </qresource>
-</RCC>
diff --git a/examples/quick/embeddedinwidgets/main.cpp b/examples/quick/embeddedinwidgets/main.cpp
index 91147772ba..2cc70e195e 100644
--- a/examples/quick/embeddedinwidgets/main.cpp
+++ b/examples/quick/embeddedinwidgets/main.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QMainWindow>
#include <QApplication>
@@ -73,6 +26,7 @@ private:
QQuickView *m_quickView;
};
+//! [ctor]
MainWindow::MainWindow()
: m_quickView(new QQuickView)
{
@@ -84,7 +38,7 @@ MainWindow::MainWindow()
this, &MainWindow::quickViewStatusChanged);
connect(m_quickView, &QQuickWindow::sceneGraphError,
this, &MainWindow::sceneGraphError);
- m_quickView->setSource(QUrl(QStringLiteral("qrc:///embeddedinwidgets/main.qml")));
+ m_quickView->loadFromModule("embeddedinwidgets", "Main");
QWidget *container = QWidget::createWindowContainer(m_quickView);
container->setMinimumSize(m_quickView->size());
@@ -98,6 +52,7 @@ MainWindow::MainWindow()
QMenu *fileMenu = menuBar()->addMenu(tr("File"));
fileMenu->addAction(tr("Quit"), qApp, &QCoreApplication::quit);
}
+//! [ctor]
void MainWindow::quickViewStatusChanged(QQuickView::Status status)
{
diff --git a/examples/quick/embeddedinwidgets/main.qml b/examples/quick/embeddedinwidgets/main.qml
deleted file mode 100644
index e46f027bdb..0000000000
--- a/examples/quick/embeddedinwidgets/main.qml
+++ /dev/null
@@ -1,122 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Rectangle {
- id: window
-
- width: 400
- height: 200
-
- gradient: Gradient {
- GradientStop { position: 0; color: "lightsteelblue" }
- GradientStop { position: 1; color: "black" }
- }
-
- Column {
- id: column
- opacity: 0.99 // work around QTBUG-29037
-
- y: 50
- width: 200
- anchors.horizontalCenter: parent.horizontalCenter
-
- TextBox {
- id: input1
- width: parent.width
- height: 30
- focus: true
-
- label: "A QML text box.."
-
- nextInFocus: input2;
- }
-
- TextBox {
- id: input2
- width: parent.width
- height: 30
-
- label: "Another QML text box.."
-
- nextInFocus: input1;
- }
-
- layer.enabled: true
- layer.smooth: true
- }
-
- ShaderEffect {
- anchors.top: column.bottom
- width: column.width
- height: column.height;
- anchors.left: column.left
-
- property variant source: column;
- property size sourceSize: Qt.size(0.5 / column.width, 0.5 / column.height);
-
- fragmentShader: "
- varying highp vec2 qt_TexCoord0;
- uniform lowp sampler2D source;
- uniform lowp vec2 sourceSize;
- uniform lowp float qt_Opacity;
- void main() {
-
- lowp vec2 tc = qt_TexCoord0 * vec2(1, -1) + vec2(0, 1);
- lowp vec4 col = 0.25 * (texture2D(source, tc + sourceSize)
- + texture2D(source, tc- sourceSize)
- + texture2D(source, tc + sourceSize * vec2(1, -1))
- + texture2D(source, tc + sourceSize * vec2(-1, 1))
- );
- gl_FragColor = col * qt_Opacity * (1.0 - qt_TexCoord0.y) * 0.2;
- }"
- }
-}
diff --git a/examples/quick/embeddedinwidgets/qmldir b/examples/quick/embeddedinwidgets/qmldir
new file mode 100644
index 0000000000..06d6e62c19
--- /dev/null
+++ b/examples/quick/embeddedinwidgets/qmldir
@@ -0,0 +1,4 @@
+module embeddedinwidgets
+prefer :/qt/qml/embeddedinwidgets/
+Main 254.0 Main.qml
+
diff --git a/examples/quick/embeddedinwidgets/reflect.frag b/examples/quick/embeddedinwidgets/reflect.frag
new file mode 100644
index 0000000000..e1d5dbf450
--- /dev/null
+++ b/examples/quick/embeddedinwidgets/reflect.frag
@@ -0,0 +1,25 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#version 440
+
+layout(location = 0) in vec2 qt_TexCoord0;
+layout(location = 0) out vec4 fragColor;
+
+layout(binding = 1) uniform sampler2D source;
+
+layout(std140, binding = 0) uniform buf {
+ mat4 qt_Matrix;
+ float qt_Opacity;
+ vec2 sourceSize;
+};
+
+void main()
+{
+ vec2 tc = qt_TexCoord0 * vec2(1, -1) + vec2(0, 1);
+ vec4 col = 0.25 * (texture(source, tc + sourceSize)
+ + texture(source, tc- sourceSize)
+ + texture(source, tc + sourceSize * vec2(1, -1))
+ + texture(source, tc + sourceSize * vec2(-1, 1)));
+ fragColor = col * qt_Opacity * (1.0 - qt_TexCoord0.y) * 0.2;
+}
diff --git a/examples/quick/embeddedinwidgets/reflect.frag.qsb b/examples/quick/embeddedinwidgets/reflect.frag.qsb
new file mode 100644
index 0000000000..a4d25dcbf5
--- /dev/null
+++ b/examples/quick/embeddedinwidgets/reflect.frag.qsb
Binary files differ
diff --git a/examples/quick/externaldraganddrop/CMakeLists.txt b/examples/quick/externaldraganddrop/CMakeLists.txt
deleted file mode 100644
index 2f801b3045..0000000000
--- a/examples/quick/externaldraganddrop/CMakeLists.txt
+++ /dev/null
@@ -1,126 +0,0 @@
-# Generated from externaldraganddrop.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(externaldraganddrop LANGUAGES CXX)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/externaldraganddrop")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(externaldraganddrop
- main.cpp
-)
-set_target_properties(externaldraganddrop PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(externaldraganddrop PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-
-# Resources:
-set(externaldraganddrop_resource_files
- "DragAndDropTextItem.qml"
- "externaldraganddrop.qml"
-)
-
-qt6_add_resources(externaldraganddrop "externaldraganddrop"
- PREFIX
- "/externaldraganddrop"
- FILES
- ${externaldraganddrop_resource_files}
-)
-set_source_files_properties("../shared/Button.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Button.qml"
-)
-set_source_files_properties("../shared/CheckBox.qml"
- PROPERTIES QT_RESOURCE_ALIAS "CheckBox.qml"
-)
-set_source_files_properties("../shared/FlickrRssModel.qml"
- PROPERTIES QT_RESOURCE_ALIAS "FlickrRssModel.qml"
-)
-set_source_files_properties("../shared/Label.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Label.qml"
-)
-set_source_files_properties("../shared/LauncherList.qml"
- PROPERTIES QT_RESOURCE_ALIAS "LauncherList.qml"
-)
-set_source_files_properties("../shared/SimpleLauncherDelegate.qml"
- PROPERTIES QT_RESOURCE_ALIAS "SimpleLauncherDelegate.qml"
-)
-set_source_files_properties("../shared/Slider.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Slider.qml"
-)
-set_source_files_properties("../shared/TabSet.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TabSet.qml"
-)
-set_source_files_properties("../shared/TextField.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TextField.qml"
-)
-set_source_files_properties("../shared/images/back.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/back.png"
-)
-set_source_files_properties("../shared/images/checkmark.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/checkmark.png"
-)
-set_source_files_properties("../shared/images/next.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/next.png"
-)
-set_source_files_properties("../shared/images/qt-logo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/qt-logo.png"
-)
-set_source_files_properties("../shared/images/slider_handle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/slider_handle.png"
-)
-set_source_files_properties("../shared/images/tab.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/tab.png"
-)
-set(shared_resource_files
- "Button.qml"
- "CheckBox.qml"
- "FlickrRssModel.qml"
- "Label.qml"
- "LauncherList.qml"
- "SimpleLauncherDelegate.qml"
- "Slider.qml"
- "TabSet.qml"
- "TextField.qml"
- "images/back.png"
- "images/checkmark.png"
- "images/next.png"
- "images/qt-logo.png"
- "images/slider_handle.png"
- "images/tab.png"
-)
-
-qt6_add_resources(externaldraganddrop "shared"
- PREFIX
- "/shared"
- BASE
- "../shared"
- FILES
- ${shared_resource_files}
-)
-
-install(TARGETS externaldraganddrop
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
diff --git a/examples/quick/externaldraganddrop/DragAndDropTextItem.qml b/examples/quick/externaldraganddrop/DragAndDropTextItem.qml
deleted file mode 100644
index 605dc07434..0000000000
--- a/examples/quick/externaldraganddrop/DragAndDropTextItem.qml
+++ /dev/null
@@ -1,113 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.2
-import "../shared" as Examples
-
-Rectangle {
- id: item
- property string display
- property alias dropEnabled: acceptDropCB.checked
- color: dropArea.containsDrag ? "#CFC" : "#EEE"
- ColorAnimation on color {
- id: rejectAnimation
- from: "#FCC"
- to: "#EEE"
- duration: 1000
- }
- Text {
- anchors.fill: parent
- text: item.display
- wrapMode: Text.WordWrap
- }
- DropArea {
- id: dropArea
- anchors.fill: parent
- keys: ["text/plain"]
- onEntered: (drag) => {
- if (!acceptDropCB.checked) {
- drag.accepted = false
- rejectAnimation.start()
- }
- }
- onDropped: (drop) => {
- if (drop.hasText && acceptDropCB.checked) {
- if (drop.proposedAction == Qt.MoveAction || drop.proposedAction == Qt.CopyAction) {
- item.display = drop.text
- drop.acceptProposedAction()
- }
- }
- }
- }
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- drag.target: draggable
- }
- Item {
- id: draggable
- anchors.fill: parent
- Drag.active: mouseArea.drag.active
- Drag.hotSpot.x: 0
- Drag.hotSpot.y: 0
- Drag.mimeData: { "text/plain": item.display }
- Drag.dragType: Drag.Automatic
- Drag.onDragFinished: (dropAction) => {
- if (dropAction == Qt.MoveAction)
- item.display = ""
- }
- }
- Examples.CheckBox {
- id: acceptDropCB
- anchors.right: parent.right
- checked: true
- text: "accept drop"
- }
-}
diff --git a/examples/quick/externaldraganddrop/doc/images/qml-dnd2-example.png b/examples/quick/externaldraganddrop/doc/images/qml-dnd2-example.png
deleted file mode 100644
index e657d81795..0000000000
--- a/examples/quick/externaldraganddrop/doc/images/qml-dnd2-example.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/externaldraganddrop/doc/src/externaldraganddrop.qdoc b/examples/quick/externaldraganddrop/doc/src/externaldraganddrop.qdoc
deleted file mode 100644
index 547b7f6695..0000000000
--- a/examples/quick/externaldraganddrop/doc/src/externaldraganddrop.qdoc
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-/*!
- \title Qt Quick Examples - externaldraganddrop
- \example externaldraganddrop
- \brief This is an example of drag-and-drop among QML applications.
- \image qml-dnd2-example.png
- \ingroup qtquickexamples
-
- \e externaldraganddrop demonstrates how to perform drag and
- drop with \l MouseArea and \l DropArea.
-
- The example allows you to drag the text to other boxes, out of boxes into
- other applications, and from other applications into the boxes. Use the
- option or CTRL keys to copy rather than move text when dragging between
- boxes.
-
- \include examples-run.qdocinc
-
-*/
diff --git a/examples/quick/externaldraganddrop/externaldraganddrop.pro b/examples/quick/externaldraganddrop/externaldraganddrop.pro
deleted file mode 100644
index 0a592a84f3..0000000000
--- a/examples/quick/externaldraganddrop/externaldraganddrop.pro
+++ /dev/null
@@ -1,12 +0,0 @@
-TEMPLATE = app
-
-QT += quick qml
-SOURCES += main.cpp
-RESOURCES += externaldraganddrop.qrc ../shared/shared.qrc
-
-EXAMPLE_FILES = \
- externaldraganddrop.qml \
- DragAndDropTextItem.qml
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/externaldraganddrop
-INSTALLS += target
diff --git a/examples/quick/externaldraganddrop/externaldraganddrop.qml b/examples/quick/externaldraganddrop/externaldraganddrop.qml
deleted file mode 100644
index 47a76a259a..0000000000
--- a/examples/quick/externaldraganddrop/externaldraganddrop.qml
+++ /dev/null
@@ -1,89 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.2
-import QtQuick.Layouts 1.0
-
-Item {
- id: root
- width: 320
- height: 480
-
- ColumnLayout {
-
- anchors.fill: parent
- anchors.margins: 8
-
- Text {
- Layout.fillWidth: true
- text: "Drag text into, out of, and between the boxes below."
- wrapMode: Text.WordWrap
- }
-
- DragAndDropTextItem {
- Layout.fillWidth: true
- height: 142
- display: "Sample Text"
- }
-
- DragAndDropTextItem {
- Layout.fillWidth: true
- height: 142
- display: "Option/ctrl drag to copy instead of move text."
- }
-
- DragAndDropTextItem {
- Layout.fillWidth: true
- height: 142
- dropEnabled: false
- display: "Drag out into other applications."
- }
- }
-}
diff --git a/examples/quick/externaldraganddrop/externaldraganddrop.qmlproject b/examples/quick/externaldraganddrop/externaldraganddrop.qmlproject
deleted file mode 100644
index 359efae597..0000000000
--- a/examples/quick/externaldraganddrop/externaldraganddrop.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "externaldraganddrop.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/quick/externaldraganddrop/externaldraganddrop.qrc b/examples/quick/externaldraganddrop/externaldraganddrop.qrc
deleted file mode 100644
index edac9820c9..0000000000
--- a/examples/quick/externaldraganddrop/externaldraganddrop.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<RCC>
- <qresource prefix="/externaldraganddrop">
- <file>externaldraganddrop.qml</file>
- <file>DragAndDropTextItem.qml</file>
- </qresource>
-</RCC>
diff --git a/examples/quick/externaldraganddrop/main.cpp b/examples/quick/externaldraganddrop/main.cpp
deleted file mode 100644
index 555fc93c84..0000000000
--- a/examples/quick/externaldraganddrop/main.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-#include "../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(externaldraganddrop/externaldraganddrop)
diff --git a/examples/quick/imageelements/BorderImageSelector.qml b/examples/quick/imageelements/BorderImageSelector.qml
new file mode 100644
index 0000000000..ae99b35231
--- /dev/null
+++ b/examples/quick/imageelements/BorderImageSelector.qml
@@ -0,0 +1,64 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+pragma ComponentBehavior: Bound
+import QtQuick
+
+Item {
+ id: selector
+
+ property int curIdx: 0
+ property int maxIdx: 3
+ property int gridWidth: 240
+ property Flickable flickable
+ width: parent.width
+ height: 64
+ function advance(steps) {
+ const nextIdx = curIdx + steps
+ if (nextIdx < 0 || nextIdx > maxIdx)
+ return
+ flickable.contentX += gridWidth * steps
+ curIdx += steps
+ }
+ Image {
+ source: "pics/arrow.png"
+ MouseArea{
+ anchors.fill: parent
+ onClicked: selector.advance(-1)
+ }
+ anchors.left: parent.left
+ anchors.leftMargin: 8
+ anchors.verticalCenter: parent.verticalCenter
+ opacity: selector.curIdx == 0 ? 0.2 : 1.0
+ Behavior on opacity {NumberAnimation{}}
+ }
+ Image {
+ source: "pics/arrow.png"
+ mirror: true
+ MouseArea{
+ anchors.fill: parent
+ onClicked: selector.advance(1)
+ }
+ opacity: selector.curIdx == selector.maxIdx ? 0.2 : 1.0
+ Behavior on opacity {NumberAnimation{}}
+ anchors.right: parent.right
+ anchors.rightMargin: 8
+ anchors.verticalCenter: parent.verticalCenter
+ }
+ Repeater {
+ model: [ "Scale", "Repeat", "Scale/Repeat", "Round" ]
+ delegate: Text {
+ required property string modelData
+ required property int index
+
+ text: modelData
+ anchors.verticalCenter: parent.verticalCenter
+
+ x: (index - selector.curIdx) * 80 + 140
+ Behavior on x { NumberAnimation{} }
+
+ opacity: selector.curIdx == index ? 1.0 : 0.0
+ Behavior on opacity { NumberAnimation{} }
+ }
+ }
+}
diff --git a/examples/quick/imageelements/CMakeLists.txt b/examples/quick/imageelements/CMakeLists.txt
index ea354c3305..e13f57af9b 100644
--- a/examples/quick/imageelements/CMakeLists.txt
+++ b/examples/quick/imageelements/CMakeLists.txt
@@ -1,148 +1,69 @@
-# Generated from imageelements.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(imageelements LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup(REQUIRES 6.5)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
+add_subdirectory("../shared" "shared")
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/imageelements")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(imageelements
+qt_add_executable(imageelementsexample
+ WIN32
+ MACOSX_BUNDLE
main.cpp
)
-set_target_properties(imageelements PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(imageelements PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-# Resources:
-set(imageelements_resource_files
- "animatedimage.qml"
- "animatedsprite.qml"
- "borderimage.qml"
- "content/BearSheet.png"
- "content/BorderImageSelector.qml"
- "content/ImageCell.qml"
- "content/MyBorderImage.qml"
- "content/ShadowRectangle.qml"
- "content/Uniflow_steam_engine.gif"
- "content/arrow.png"
- "content/bw.png"
- "content/colors-round.sci"
- "content/colors-stretch.sci"
- "content/colors.png"
- "content/multi.ico"
- "content/qt-logo.png"
- "content/shadow.png"
- "content/speaker.png"
- "framestepping.qml"
- "image.qml"
- "imageelements.qml"
- "multiframeborderimage.qml"
- "shadows.qml"
- "spritesequence.qml"
+target_link_libraries(imageelementsexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
-qt6_add_resources(imageelements "imageelements"
- PREFIX
- "/imageelements"
- FILES
- ${imageelements_resource_files}
-)
-set_source_files_properties("../shared/Button.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Button.qml"
-)
-set_source_files_properties("../shared/CheckBox.qml"
- PROPERTIES QT_RESOURCE_ALIAS "CheckBox.qml"
-)
-set_source_files_properties("../shared/FlickrRssModel.qml"
- PROPERTIES QT_RESOURCE_ALIAS "FlickrRssModel.qml"
-)
-set_source_files_properties("../shared/Label.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Label.qml"
-)
-set_source_files_properties("../shared/LauncherList.qml"
- PROPERTIES QT_RESOURCE_ALIAS "LauncherList.qml"
-)
-set_source_files_properties("../shared/SimpleLauncherDelegate.qml"
- PROPERTIES QT_RESOURCE_ALIAS "SimpleLauncherDelegate.qml"
-)
-set_source_files_properties("../shared/Slider.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Slider.qml"
-)
-set_source_files_properties("../shared/TabSet.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TabSet.qml"
-)
-set_source_files_properties("../shared/TextField.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TextField.qml"
-)
-set_source_files_properties("../shared/images/back.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/back.png"
-)
-set_source_files_properties("../shared/images/checkmark.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/checkmark.png"
-)
-set_source_files_properties("../shared/images/next.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/next.png"
-)
-set_source_files_properties("../shared/images/qt-logo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/qt-logo.png"
-)
-set_source_files_properties("../shared/images/slider_handle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/slider_handle.png"
-)
-set_source_files_properties("../shared/images/tab.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/tab.png"
-)
-set(shared_resource_files
- "Button.qml"
- "CheckBox.qml"
- "FlickrRssModel.qml"
- "Label.qml"
- "LauncherList.qml"
- "SimpleLauncherDelegate.qml"
- "Slider.qml"
- "TabSet.qml"
- "TextField.qml"
- "images/back.png"
- "images/checkmark.png"
- "images/next.png"
- "images/qt-logo.png"
- "images/slider_handle.png"
- "images/tab.png"
-)
+qt_add_qml_module(imageelementsexample
+ URI imageelements
+ QML_FILES
+ "animatedimage.qml"
+ "animatedsprite.qml"
+ "borderimage.qml"
+ "framestepping.qml"
+ "image.qml"
+ "imageelements.qml"
+ "multiframeborderimage.qml"
+ "shadows.qml"
+ "spritesequence.qml"
+ "BorderImageSelector.qml"
+ "ImageCell.qml"
+ "MyBorderImage.qml"
+ "ShadowRectangle.qml"
+ RESOURCES
+ "pics/qt-logo.png"
+ "pics/shadow.png"
+ "pics/speaker.png"
+ "pics/colors.png"
+ "pics/BearSheet.png"
+ "pics/Uniflow_steam_engine.gif"
+ "pics/arrow.png"
+ "pics/bw.png"
+ "pics/multi.ico"
+ "pics/colors-round.sci"
+ "pics/colors-stretch.sci"
+ )
-qt6_add_resources(imageelements "shared"
- PREFIX
- "/shared"
- BASE
- "../shared"
- FILES
- ${shared_resource_files}
+install(TARGETS imageelementsexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-install(TARGETS imageelements
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
+qt_generate_deploy_qml_app_script(
+ TARGET imageelementsexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/imageelements/ImageCell.qml b/examples/quick/imageelements/ImageCell.qml
new file mode 100644
index 0000000000..537ed2a939
--- /dev/null
+++ b/examples/quick/imageelements/ImageCell.qml
@@ -0,0 +1,25 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+import QtQuick
+import QtQuick.Controls
+
+Item {
+ property alias mode: image.fillMode
+ property alias caption: captionItem.text
+
+ Image {
+ id: image
+
+ width: parent.width
+ height: parent.height - captionItem.height
+ source: "pics/qt-logo.png"
+ clip: true // only makes a difference if mode is PreserveAspectCrop
+ }
+
+ Label {
+ id: captionItem
+
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.bottom: parent.bottom
+ }
+}
diff --git a/examples/quick/imageelements/MyBorderImage.qml b/examples/quick/imageelements/MyBorderImage.qml
new file mode 100644
index 0000000000..ae2d4171bd
--- /dev/null
+++ b/examples/quick/imageelements/MyBorderImage.qml
@@ -0,0 +1,65 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQml
+import QtQuick
+
+Item {
+ id: container
+
+ property alias horizontalMode: image.horizontalTileMode
+ property alias verticalMode: image.verticalTileMode
+ property alias source: image.source
+
+ property int minWidth
+ property int minHeight
+ property int maxWidth
+ property int maxHeight
+ property int margin
+
+ width: 240
+ height: 200
+
+ BorderImage {
+ id: image
+
+ anchors.centerIn: parent
+
+ SequentialAnimation on width {
+ loops: Animation.Infinite
+ NumberAnimation {
+ from: container.minWidth
+ to: container.maxWidth
+ duration: 2000
+ easing.type: Easing.InOutQuad
+ }
+ NumberAnimation {
+ from: container.maxWidth
+ to: container.minWidth
+ duration: 2000
+ easing.type: Easing.InOutQuad
+ }
+ }
+
+ SequentialAnimation on height {
+ loops: Animation.Infinite
+ NumberAnimation {
+ from: container.minHeight
+ to: container.maxHeight
+ duration: 2000
+ easing.type: Easing.InOutQuad
+ }
+ NumberAnimation {
+ from: container.maxHeight
+ to: container.minHeight
+ duration: 2000
+ easing.type: Easing.InOutQuad
+ }
+ }
+
+ border.top: container.margin
+ border.left: container.margin
+ border.bottom: container.margin
+ border.right: container.margin
+ }
+}
diff --git a/examples/quick/imageelements/ShadowRectangle.qml b/examples/quick/imageelements/ShadowRectangle.qml
new file mode 100644
index 0000000000..2be2fb81f2
--- /dev/null
+++ b/examples/quick/imageelements/ShadowRectangle.qml
@@ -0,0 +1,33 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Item {
+ property alias color : rectangle.color
+
+//! [shadow]
+ BorderImage {
+ anchors.fill: rectangle
+ anchors {
+ leftMargin: -6
+ topMargin: -6
+ rightMargin: -8
+ bottomMargin: -8
+ }
+ border {
+ left: 10
+ top: 10
+ right: 10
+ bottom: 10
+ }
+ source: "pics/shadow.png"
+ }
+//! [shadow]
+
+ Rectangle {
+ id: rectangle
+
+ anchors.fill: parent
+ }
+}
diff --git a/examples/quick/imageelements/animatedimage.qml b/examples/quick/imageelements/animatedimage.qml
index 04bc38fe95..114b5c9075 100644
--- a/examples/quick/imageelements/animatedimage.qml
+++ b/examples/quick/imageelements/animatedimage.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-import QtQuick 2.12
-import "../shared" as Examples
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+import QtQuick
+import QtQuick.Controls
Column {
width: 320
@@ -59,7 +12,8 @@ Column {
//! [image]
AnimatedImage {
id: animation
- source: "content/Uniflow_steam_engine.gif"
+
+ source: "pics/Uniflow_steam_engine.gif"
anchors.horizontalCenter: parent.horizontalCenter
speed: speedSlider.value
TapHandler {
@@ -70,6 +24,7 @@ Column {
Rectangle {
id: timeline
+
color: "steelblue"
width: animation.width
height: 1
@@ -79,36 +34,53 @@ Column {
Rectangle {
property int frames: animation.frameCount
- width: 4; height: 8
+ width: 4
+ height: 8
x: (animation.width - width) * animation.currentFrame / frames
y: -4
color: "red"
}
}
- Examples.Slider {
- id: speedSlider
- name: "Speed"
- min: 0
- max: 5
- init: 1
- width: 240
- x: animation.x
- Text {
+ Row {
+ spacing: 6
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ Label {
+ text: qsTr("Speed:")
+ font.pointSize: 12
+ anchors.verticalCenter: speedSlider.verticalCenter
+ }
+
+ Slider {
+ id: speedSlider
+
+ from: 0
+ to: 5
+ value: 1
+ }
+
+ Label {
+ font: fontMetrics.font
+ text: qsTr(Math.round(animation.speed * 100) + "%")
+ width: fontMetrics.width
+ anchors.verticalCenter: speedSlider.verticalCenter
+ }
+
+ TextMetrics {
+ id: fontMetrics
+
+ text: "100%"
font.pointSize: 12
- text: Math.round(animation.speed * 100) + "%"
- x: animation.width - width
- anchors.verticalCenter: parent.verticalCenter
- anchors.margins: 6
}
}
- Examples.Button {
- text: "Reset"
+ Button {
+ text: qsTr("Reset")
enabled: speedSlider.value !== 1
anchors.horizontalCenter: parent.horizontalCenter
onClicked: {
- speedSlider.setValue(1)
+ speedSlider.value = 1
animation.playing = true
}
}
diff --git a/examples/quick/imageelements/animatedsprite.qml b/examples/quick/imageelements/animatedsprite.qml
index 8666c2b9fc..50da7cf0e9 100644
--- a/examples/quick/imageelements/animatedsprite.qml
+++ b/examples/quick/imageelements/animatedsprite.qml
@@ -1,53 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-import QtQuick 2.0
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+import QtQuick
+import QtQuick.Controls
Item {
width: 320
@@ -60,8 +14,9 @@ Item {
//! [sprite]
AnimatedSprite {
id: sprite
+
anchors.centerIn: parent
- source: "content/speaker.png"
+ source: "pics/speaker.png"
frameCount: 60
frameSync: true
frameWidth: 170
@@ -70,8 +25,8 @@ Item {
}
//! [sprite]
- Text {
- text: "Left click to resume\nMiddle click to advance backward\nRight click to advance forward"
+ Label {
+ text: qsTr("Left click to resume\nMiddle click to advance backward\nRight click to advance forward")
visible: sprite.paused
}
@@ -80,21 +35,21 @@ Item {
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
onClicked: (mouse) => {
if (!sprite.running) {
- sprite.start();
+ sprite.start()
} else if (!sprite.paused) {
- sprite.pause();
+ sprite.pause()
} else {
if (mouse.button === Qt.LeftButton)
- sprite.resume();
+ sprite.resume()
else if (mouse.button === Qt.MiddleButton)
- sprite.advance(-1);
+ sprite.advance(-1)
else if (mouse.button === Qt.RightButton)
- sprite.advance(1);
+ sprite.advance(1)
}
}
}
- Component.onCompleted: console.log("Press Space to toggle visibility. Click with mouse to pause/resume.")
+ Component.onCompleted: console.log(qsTr("Press Space to toggle visibility. Click with mouse to pause/resume."))
focus: true
Keys.onSpacePressed: sprite.visible = !sprite.visible
}
diff --git a/examples/quick/imageelements/borderimage.qml b/examples/quick/imageelements/borderimage.qml
index 00f18737f6..7c522a64be 100644
--- a/examples/quick/imageelements/borderimage.qml
+++ b/examples/quick/imageelements/borderimage.qml
@@ -1,63 +1,17 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import "content"
+import QtQuick
Rectangle {
id: page
+
width: 320
height: 480
BorderImageSelector {
id: selector
+
curIdx: 0
maxIdx: 3
gridWidth: 240
@@ -68,6 +22,7 @@ Rectangle {
Flickable {
id: mainFlickable
+
width: parent.width
anchors.bottom: parent.bottom
anchors.top: selector.bottom
@@ -77,52 +32,91 @@ Rectangle {
contentWidth: 1030
contentHeight: 420
Grid {
- anchors.centerIn: parent; spacing: 20
+ anchors.centerIn: parent
+ spacing: 20
MyBorderImage {
- minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 200
- source: "content/colors.png"; margin: 30
+ minWidth: 120
+ maxWidth: 240
+ minHeight: 120
+ maxHeight: 200
+ source: Qt.resolvedUrl("pics/colors.png")
+ margin: 30
}
MyBorderImage {
- minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 200
- source: "content/colors.png"; margin: 30
- horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat
+ minWidth: 120
+ maxWidth: 240
+ minHeight: 120
+ maxHeight: 200
+ source: Qt.resolvedUrl("pics/colors.png")
+ margin: 30
+ horizontalMode: BorderImage.Repeat
+ verticalMode: BorderImage.Repeat
}
MyBorderImage {
- minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 200
- source: "content/colors.png"; margin: 30
- horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat
+ minWidth: 120
+ maxWidth: 240
+ minHeight: 120
+ maxHeight: 200
+ source: Qt.resolvedUrl("pics/colors.png")
+ margin: 30
+ horizontalMode: BorderImage.Stretch
+ verticalMode: BorderImage.Repeat
}
MyBorderImage {
- minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 200
- source: "content/colors.png"; margin: 30
- horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round
+ minWidth: 120
+ maxWidth: 240
+ minHeight: 120
+ maxHeight: 200
+ source: Qt.resolvedUrl("pics/colors.png")
+ margin: 30
+ horizontalMode: BorderImage.Round
+ verticalMode: BorderImage.Round
}
MyBorderImage {
- minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200
- source: "content/bw.png"; margin: 10
+ minWidth: 60
+ maxWidth: 200
+ minHeight: 40
+ maxHeight: 200
+ source: Qt.resolvedUrl("pics/bw.png")
+ margin: 10
}
MyBorderImage {
- minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200
- source: "content/bw.png"; margin: 10
- horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat
+ minWidth: 60
+ maxWidth: 200
+ minHeight: 40
+ maxHeight: 200
+ source: Qt.resolvedUrl("pics/bw.png")
+ margin: 10
+ horizontalMode: BorderImage.Repeat
+ verticalMode: BorderImage.Repeat
}
MyBorderImage {
- minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200
- source: "content/bw.png"; margin: 10
- horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat
+ minWidth: 60
+ maxWidth: 200
+ minHeight: 40
+ maxHeight: 200
+ source: Qt.resolvedUrl("pics/bw.png")
+ margin: 10
+ horizontalMode: BorderImage.Stretch
+ verticalMode: BorderImage.Repeat
}
MyBorderImage {
- minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200
- source: "content/bw.png"; margin: 10
- horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round
+ minWidth: 60
+ maxWidth: 200
+ minHeight: 40
+ maxHeight: 200
+ source: Qt.resolvedUrl("pics/bw.png")
+ margin: 10
+ horizontalMode: BorderImage.Round
+ verticalMode: BorderImage.Round
}
}
}
diff --git a/examples/quick/imageelements/content/BorderImageSelector.qml b/examples/quick/imageelements/content/BorderImageSelector.qml
deleted file mode 100644
index d8c2101be7..0000000000
--- a/examples/quick/imageelements/content/BorderImageSelector.qml
+++ /dev/null
@@ -1,109 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Item {
- id: selector
- property int curIdx: 0
- property int maxIdx: 3
- property int gridWidth: 240
- property Flickable flickable
- width: parent.width
- height: 64
- function advance(steps) {
- var nextIdx = curIdx + steps
- if (nextIdx < 0 || nextIdx > maxIdx)
- return;
- flickable.contentX += gridWidth * steps;
- curIdx += steps;
- }
- Image {
- source: "arrow.png"
- MouseArea{
- anchors.fill: parent
- onClicked: selector.advance(-1)
- }
- anchors.left: parent.left
- anchors.leftMargin: 8
- anchors.verticalCenter: parent.verticalCenter
- opacity: selector.curIdx == 0 ? 0.2 : 1.0
- Behavior on opacity {NumberAnimation{}}
- }
- Image {
- source: "arrow.png"
- mirror: true
- MouseArea{
- anchors.fill: parent
- onClicked: selector.advance(1)
- }
- opacity: selector.curIdx == selector.maxIdx ? 0.2 : 1.0
- Behavior on opacity {NumberAnimation{}}
- anchors.right: parent.right
- anchors.rightMargin: 8
- anchors.verticalCenter: parent.verticalCenter
- }
- Repeater {
- model: [ "Scale", "Repeat", "Scale/Repeat", "Round" ]
- delegate: Text {
- required property string modelData
- required property int index
-
- text: modelData
- anchors.verticalCenter: parent.verticalCenter
-
- x: (index - selector.curIdx) * 80 + 140
- Behavior on x { NumberAnimation{} }
-
- opacity: selector.curIdx == index ? 1.0 : 0.0
- Behavior on opacity { NumberAnimation{} }
- }
- }
-}
diff --git a/examples/quick/imageelements/content/ImageCell.qml b/examples/quick/imageelements/content/ImageCell.qml
deleted file mode 100644
index 7804346bd4..0000000000
--- a/examples/quick/imageelements/content/ImageCell.qml
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-
-Item {
- property alias mode: image.fillMode
- property alias caption: captionItem.text
-
- Image {
- id: image
- width: parent.width; height: parent.height - captionItem.height
- source: "qt-logo.png"
- clip: true // only makes a difference if mode is PreserveAspectCrop
- }
-
- Text {
- id: captionItem
- anchors.horizontalCenter: parent.horizontalCenter; anchors.bottom: parent.bottom
- }
-}
diff --git a/examples/quick/imageelements/content/MyBorderImage.qml b/examples/quick/imageelements/content/MyBorderImage.qml
deleted file mode 100644
index 3198de3bf1..0000000000
--- a/examples/quick/imageelements/content/MyBorderImage.qml
+++ /dev/null
@@ -1,101 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQml 2.0
-import QtQuick 2.0
-
-Item {
- id: container
-
- property alias horizontalMode: image.horizontalTileMode
- property alias verticalMode: image.verticalTileMode
- property alias source: image.source
-
- property int minWidth
- property int minHeight
- property int maxWidth
- property int maxHeight
- property int margin
-
- width: 240; height: 200
-
- BorderImage {
- id: image; anchors.centerIn: parent
-
- SequentialAnimation on width {
- loops: Animation.Infinite
- NumberAnimation {
- from: container.minWidth; to: container.maxWidth
- duration: 2000; easing.type: Easing.InOutQuad
- }
- NumberAnimation {
- from: container.maxWidth; to: container.minWidth
- duration: 2000; easing.type: Easing.InOutQuad
- }
- }
-
- SequentialAnimation on height {
- loops: Animation.Infinite
- NumberAnimation {
- from: container.minHeight; to: container.maxHeight
- duration: 2000; easing.type: Easing.InOutQuad
- }
- NumberAnimation {
- from: container.maxHeight; to: container.minHeight
- duration: 2000; easing.type: Easing.InOutQuad
- }
- }
-
- border.top: container.margin
- border.left: container.margin
- border.bottom: container.margin
- border.right: container.margin
- }
-}
diff --git a/examples/quick/imageelements/content/ShadowRectangle.qml b/examples/quick/imageelements/content/ShadowRectangle.qml
deleted file mode 100644
index 7bce665b23..0000000000
--- a/examples/quick/imageelements/content/ShadowRectangle.qml
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Item {
- property alias color : rectangle.color
-
-//! [shadow]
- BorderImage {
- anchors.fill: rectangle
- anchors { leftMargin: -6; topMargin: -6; rightMargin: -8; bottomMargin: -8 }
- border { left: 10; top: 10; right: 10; bottom: 10 }
- source: "shadow.png"
- }
-//! [shadow]
-
- Rectangle { id: rectangle; anchors.fill: parent }
-}
diff --git a/examples/quick/imageelements/doc/src/imageelements.qdoc b/examples/quick/imageelements/doc/src/imageelements.qdoc
index 4c00915e56..06fa25ab19 100644
--- a/examples/quick/imageelements/doc/src/imageelements.qdoc
+++ b/examples/quick/imageelements/doc/src/imageelements.qdoc
@@ -1,35 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Qt Quick Examples - Image Elements
\example imageelements
\brief This is a collection of QML examples relating to image types.
\image qml-imageelements-example.png
\ingroup qtquickexamples
+ \examplecategory {Graphics}
\e{Image Elements} is a collection of small QML examples relating to image
types. For more information, visit \l{Use Case - Visual Elements In QML}.
@@ -49,7 +26,7 @@
\e Shadows shows how to create a drop shadow effect for a rectangular item
using a \l BorderImage:
- \snippet imageelements/content/ShadowRectangle.qml shadow
+ \snippet imageelements/ShadowRectangle.qml shadow
\section1 Sprite Animations with AnimatedSprite
diff --git a/examples/quick/imageelements/framestepping.qml b/examples/quick/imageelements/framestepping.qml
index f5bad46e7b..a06aaae780 100644
--- a/examples/quick/imageelements/framestepping.qml
+++ b/examples/quick/imageelements/framestepping.qml
@@ -1,63 +1,18 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.14
+import QtQuick
+import QtQuick.Controls
Rectangle {
width: 480
height: 320
Image {
id: img
+
anchors.centerIn: parent
cache: true
- source: "content/multi.ico"
+ source: "pics/multi.ico"
Shortcut {
sequence: StandardKey.MoveToNextPage
@@ -71,12 +26,13 @@ Rectangle {
}
}
- Text {
+ Label {
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
anchors.margins: 6
horizontalAlignment: Text.AlignHCenter
- text: "frame " + (img.currentFrame + 1) + " of " + img.frameCount +
- "\nPress PgUp/PgDn to switch frames"
+ text: qsTr("frame %1 of %2 \nPress PgUp/PgDn to switch frames")
+ .arg(img.currentFrame + 1)
+ .arg(img.frameCount)
}
}
diff --git a/examples/quick/imageelements/image.qml b/examples/quick/imageelements/image.qml
index 0750ea3b79..11acb51054 100644
--- a/examples/quick/imageelements/image.qml
+++ b/examples/quick/imageelements/image.qml
@@ -1,60 +1,15 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import "content"
+pragma ComponentBehavior: Bound
+import QtQuick
Rectangle {
width: 320
height: 480
Grid {
+ id: grid
+
property int cellWidth: (width - (spacing * (columns - 1))) / columns
property int cellHeight: (height - (spacing * (rows - 1))) / rows
@@ -66,8 +21,8 @@ Rectangle {
spacing: 30
component SizedImageCell: ImageCell {
- width: parent.cellWidth
- height: parent.cellHeight
+ width: grid.cellWidth
+ height: grid.cellHeight
}
SizedImageCell {
diff --git a/examples/quick/imageelements/imageelements.qml b/examples/quick/imageelements/imageelements.qml
index 91f2e034f7..3470a30879 100644
--- a/examples/quick/imageelements/imageelements.qml
+++ b/examples/quick/imageelements/imageelements.qml
@@ -1,71 +1,25 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import "../shared"
+import QtQuick
+import shared as Shared
Item {
height: 480
width: 320
- LauncherList {
+ Shared.LauncherList {
id: ll
+
anchors.fill: parent
Component.onCompleted: {
- addExample("BorderImage", "An image with scaled borders", Qt.resolvedUrl("borderimage.qml"));
- addExample("Image", "A showcase of the options available to Image", Qt.resolvedUrl("image.qml"));
- addExample("Shadows", "Rectangles with a drop-shadow effect", Qt.resolvedUrl("shadows.qml"));
- addExample("AnimatedImage", "An image which plays animated formats", Qt.resolvedUrl("animatedimage.qml"));
- addExample("AnimatedSprite", "A simple sprite-based animation", Qt.resolvedUrl("animatedsprite.qml"));
- addExample("SpriteSequence", "A sprite-based animation with complex transitions", Qt.resolvedUrl("spritesequence.qml"));
- addExample("FrameStepping", "A multi-frame non-animated image", Qt.resolvedUrl("framestepping.qml"));
- addExample("MultiBorderImage", "A multi-frame image with scaled borders", Qt.resolvedUrl("multiframeborderimage.qml"));
+ addExample(qsTr("BorderImage"), qsTr("An image with scaled borders"), Qt.resolvedUrl("borderimage.qml"))
+ addExample(qsTr("Image"), qsTr("A showcase of the options available to Image"), Qt.resolvedUrl("image.qml"))
+ addExample(qsTr("Shadows"), qsTr("Rectangles with a drop-shadow effect"), Qt.resolvedUrl("shadows.qml"))
+ addExample(qsTr("AnimatedImage"), qsTr("An image which plays animated formats"), Qt.resolvedUrl("animatedimage.qml"))
+ addExample(qsTr("AnimatedSprite"), qsTr("A simple sprite-based animation"), Qt.resolvedUrl("animatedsprite.qml"))
+ addExample(qsTr("SpriteSequence"), qsTr("A sprite-based animation with complex transitions"), Qt.resolvedUrl("spritesequence.qml"))
+ addExample(qsTr("FrameStepping"), qsTr("A multi-frame non-animated image"), Qt.resolvedUrl("framestepping.qml"))
+ addExample(qsTr("MultiBorderImage"), qsTr("A multi-frame image with scaled borders"), Qt.resolvedUrl("multiframeborderimage.qml"))
}
}
}
diff --git a/examples/quick/imageelements/imageelements.qrc b/examples/quick/imageelements/imageelements.qrc
index cedef2204c..75cd996074 100644
--- a/examples/quick/imageelements/imageelements.qrc
+++ b/examples/quick/imageelements/imageelements.qrc
@@ -1,28 +1,28 @@
<RCC>
- <qresource prefix="/imageelements">
- <file>content/arrow.png</file>
- <file>content/BearSheet.png</file>
- <file>content/BorderImageSelector.qml</file>
- <file>content/bw.png</file>
- <file>content/colors-round.sci</file>
- <file>content/colors-stretch.sci</file>
- <file>content/colors.png</file>
- <file>content/ImageCell.qml</file>
- <file>content/multi.ico</file>
- <file>content/MyBorderImage.qml</file>
- <file>content/qt-logo.png</file>
- <file>content/shadow.png</file>
- <file>content/ShadowRectangle.qml</file>
- <file>content/speaker.png</file>
- <file>content/Uniflow_steam_engine.gif</file>
- <file>imageelements.qml</file>
+ <qresource prefix="/qt/qml/imageelements">
<file>animatedimage.qml</file>
<file>animatedsprite.qml</file>
<file>borderimage.qml</file>
+ <file>BorderImageSelector.qml</file>
<file>framestepping.qml</file>
- <file>multiframeborderimage.qml</file>
+ <file>ImageCell.qml</file>
+ <file>imageelements.qml</file>
<file>image.qml</file>
+ <file>multiframeborderimage.qml</file>
+ <file>MyBorderImage.qml</file>
+ <file>ShadowRectangle.qml</file>
<file>shadows.qml</file>
<file>spritesequence.qml</file>
+ <file>pics/arrow.png</file>
+ <file>pics/BearSheet.png</file>
+ <file>pics/bw.png</file>
+ <file>pics/colors-round.sci</file>
+ <file>pics/colors-stretch.sci</file>
+ <file>pics/colors.png</file>
+ <file>pics/multi.ico</file>
+ <file>pics/qt-logo.png</file>
+ <file>pics/shadow.png</file>
+ <file>pics/speaker.png</file>
+ <file>pics/Uniflow_steam_engine.gif</file>
</qresource>
</RCC>
diff --git a/examples/quick/imageelements/main.cpp b/examples/quick/imageelements/main.cpp
index 235976b2fa..c6a28cb2ec 100644
--- a/examples/quick/imageelements/main.cpp
+++ b/examples/quick/imageelements/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(imageelements/imageelements)
diff --git a/examples/quick/imageelements/multiframeborderimage.qml b/examples/quick/imageelements/multiframeborderimage.qml
index 0805ea4243..b5e76ae976 100644
--- a/examples/quick/imageelements/multiframeborderimage.qml
+++ b/examples/quick/imageelements/multiframeborderimage.qml
@@ -1,65 +1,25 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.14
+import QtQuick
+import QtQuick.Controls
Rectangle {
width: 480
height: 320
BorderImage {
id: img
+
anchors.fill: parent
anchors.margins: 6
cache: true
- source: "content/multi.ico"
- border { left: 19; top: 19; right: 19; bottom: 19 }
+ source: "pics/multi.ico"
+ border {
+ left: 19
+ top: 19
+ right: 19
+ bottom: 19
+ }
horizontalTileMode: BorderImage.Stretch
Shortcut {
@@ -74,10 +34,10 @@ Rectangle {
}
}
- Text {
+ Label {
anchors.centerIn: parent
horizontalAlignment: Text.AlignHCenter
- text: "frame " + (img.currentFrame + 1) + " of " + img.frameCount +
- "\nPress PgUp/PgDn to switch frames"
+ text: qsTr("frame " + (img.currentFrame + 1) + " of " + img.frameCount +
+ "\nPress PgUp/PgDn to switch frames")
}
}
diff --git a/examples/quick/imageelements/content/BearSheet.png b/examples/quick/imageelements/pics/BearSheet.png
index a084bf0f1e..a084bf0f1e 100644
--- a/examples/quick/imageelements/content/BearSheet.png
+++ b/examples/quick/imageelements/pics/BearSheet.png
Binary files differ
diff --git a/examples/quick/imageelements/content/Uniflow_steam_engine.gif b/examples/quick/imageelements/pics/Uniflow_steam_engine.gif
index 8754de4af9..8754de4af9 100644
--- a/examples/quick/imageelements/content/Uniflow_steam_engine.gif
+++ b/examples/quick/imageelements/pics/Uniflow_steam_engine.gif
Binary files differ
diff --git a/examples/quick/imageelements/content/arrow.png b/examples/quick/imageelements/pics/arrow.png
index 059be6294e..059be6294e 100644
--- a/examples/quick/imageelements/content/arrow.png
+++ b/examples/quick/imageelements/pics/arrow.png
Binary files differ
diff --git a/examples/quick/imageelements/content/bw.png b/examples/quick/imageelements/pics/bw.png
index 486eaae96e..486eaae96e 100644
--- a/examples/quick/imageelements/content/bw.png
+++ b/examples/quick/imageelements/pics/bw.png
Binary files differ
diff --git a/examples/quick/imageelements/content/colors-round.sci b/examples/quick/imageelements/pics/colors-round.sci
index 506f6f5f99..506f6f5f99 100644
--- a/examples/quick/imageelements/content/colors-round.sci
+++ b/examples/quick/imageelements/pics/colors-round.sci
diff --git a/examples/quick/imageelements/content/colors-stretch.sci b/examples/quick/imageelements/pics/colors-stretch.sci
index e4989a723c..e4989a723c 100644
--- a/examples/quick/imageelements/content/colors-stretch.sci
+++ b/examples/quick/imageelements/pics/colors-stretch.sci
diff --git a/examples/quick/imageelements/content/colors.png b/examples/quick/imageelements/pics/colors.png
index 57f5aca821..57f5aca821 100644
--- a/examples/quick/imageelements/content/colors.png
+++ b/examples/quick/imageelements/pics/colors.png
Binary files differ
diff --git a/examples/quick/imageelements/content/multi.ico b/examples/quick/imageelements/pics/multi.ico
index b748ceaa29..b748ceaa29 100644
--- a/examples/quick/imageelements/content/multi.ico
+++ b/examples/quick/imageelements/pics/multi.ico
Binary files differ
diff --git a/examples/quick/imageelements/content/qt-logo.png b/examples/quick/imageelements/pics/qt-logo.png
index 14ddf2a028..14ddf2a028 100644
--- a/examples/quick/imageelements/content/qt-logo.png
+++ b/examples/quick/imageelements/pics/qt-logo.png
Binary files differ
diff --git a/examples/quick/imageelements/content/shadow.png b/examples/quick/imageelements/pics/shadow.png
index 23c011d0ff..23c011d0ff 100644
--- a/examples/quick/imageelements/content/shadow.png
+++ b/examples/quick/imageelements/pics/shadow.png
Binary files differ
diff --git a/examples/quick/imageelements/content/speaker.png b/examples/quick/imageelements/pics/speaker.png
index fb0e857859..fb0e857859 100644
--- a/examples/quick/imageelements/content/speaker.png
+++ b/examples/quick/imageelements/pics/speaker.png
Binary files differ
diff --git a/examples/quick/imageelements/shadows.qml b/examples/quick/imageelements/shadows.qml
index 981133f725..3f345a3937 100644
--- a/examples/quick/imageelements/shadows.qml
+++ b/examples/quick/imageelements/shadows.qml
@@ -1,74 +1,33 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import "content"
+import QtQuick
Rectangle {
id: window
- width: 480; height: 320
+ width: 480
+ height: 320
color: "gray"
ShadowRectangle {
- anchors.centerIn: parent; width: 250; height: 250
+ anchors.centerIn: parent
+ width: 250
+ height: 250
color: "lightsteelblue"
}
ShadowRectangle {
- anchors.centerIn: parent; width: 200; height: 200
+ anchors.centerIn: parent
+ width: 200
+ height: 200
color: "steelblue"
}
ShadowRectangle {
- anchors.centerIn: parent; width: 150; height: 150
+ anchors.centerIn: parent
+ width: 150
+ height: 150
color: "thistle"
}
}
diff --git a/examples/quick/imageelements/spritesequence.qml b/examples/quick/imageelements/spritesequence.qml
index 8581bf1ea8..d578700195 100644
--- a/examples/quick/imageelements/spritesequence.qml
+++ b/examples/quick/imageelements/spritesequence.qml
@@ -1,81 +1,50 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-import QtQuick 2.0
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+import QtQuick
Item {
width: 320
height: 480
MouseArea {
- onClicked: anim.start();
+ onClicked: anim.start()
anchors.fill: parent
}
//! [animation]
SequentialAnimation {
id: anim
- ScriptAction { script: image.goalSprite = "falling"; }
- NumberAnimation { target: image; property: "y"; to: 480; duration: 12000; }
- ScriptAction { script: {image.goalSprite = ""; image.jumpTo("still");} }
- PropertyAction { target: image; property: "y"; value: 0 }
+
+ ScriptAction { script: image.goalSprite = "falling" }
+ NumberAnimation {
+ target: image
+ property: "y"
+ to: 480
+ duration: 12000
+ }
+ ScriptAction {
+ script: {
+ image.goalSprite = ""
+ image.jumpTo("still")
+ }
+ }
+ PropertyAction {
+ target: image
+ property: "y"
+ value: 0
+ }
}
//! [animation]
SpriteSequence {
id: image
+
width: 256
height: 256
anchors.horizontalCenter: parent.horizontalCenter
interpolate: false
goalSprite: ""
//! [still]
- Sprite{
+ Sprite {
name: "still"
- source: "content/BearSheet.png"
+ source: "pics/BearSheet.png"
frameCount: 1
frameWidth: 256
frameHeight: 256
@@ -83,9 +52,9 @@ Item {
to: {"still":1, "blink":0.1, "floating":0}
}
//! [still]
- Sprite{
+ Sprite {
name: "blink"
- source: "content/BearSheet.png"
+ source: "pics/BearSheet.png"
frameCount: 3
frameX: 256
frameY: 1536
@@ -94,9 +63,9 @@ Item {
frameDuration: 100
to: {"still":1}
}
- Sprite{
+ Sprite {
name: "floating"
- source: "content/BearSheet.png"
+ source: "pics/BearSheet.png"
frameCount: 9
frameX: 0
frameY: 0
@@ -105,9 +74,9 @@ Item {
frameDuration: 160
to: {"still":0, "flailing":1}
}
- Sprite{
+ Sprite {
name: "flailing"
- source: "content/BearSheet.png"
+ source: "pics/BearSheet.png"
frameCount: 8
frameX: 0
frameY: 768
@@ -116,9 +85,9 @@ Item {
frameDuration: 160
to: {"falling":1}
}
- Sprite{
+ Sprite {
name: "falling"
- source: "content/BearSheet.png"
+ source: "pics/BearSheet.png"
frameCount: 5
frameY: 1280
frameWidth: 256
diff --git a/examples/quick/imageprovider/CMakeLists.txt b/examples/quick/imageprovider/CMakeLists.txt
index e3318b0755..a2fa3e5087 100644
--- a/examples/quick/imageprovider/CMakeLists.txt
+++ b/examples/quick/imageprovider/CMakeLists.txt
@@ -1,48 +1,36 @@
-# Generated from imageprovider.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qmlimageproviderplugin LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
+set(QT_QML_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/examples/quick/imageprovider)
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/imageprovider/ImageProviderCore")
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Quick)
+qt_standard_project_setup(REQUIRES 6.5)
qt6_add_qml_module(qmlimageproviderplugin
- OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/ImageProviderCore"
- VERSION 1.0
URI "ImageProviderCore"
- INSTALL_LOCATION ${INSTALL_EXAMPLEDIR}
+ PLUGIN_TARGET qmlimageproviderplugin
+ NO_PLUGIN_OPTIONAL
+ NO_GENERATE_PLUGIN_SOURCE
+ CLASS_NAME ImageProviderExtensionPlugin
+ SOURCES
+ imageprovider.cpp
)
-target_sources(qmlimageproviderplugin PRIVATE
- imageprovider.cpp
-)
-set_target_properties(qmlimageproviderplugin PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
target_link_libraries(qmlimageproviderplugin PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
install(TARGETS qmlimageproviderplugin
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
diff --git a/examples/quick/imageprovider/doc/src/imageprovider.qdoc b/examples/quick/imageprovider/doc/src/imageprovider.qdoc
index 2f380cb2de..d4cc2c923d 100644
--- a/examples/quick/imageprovider/doc/src/imageprovider.qdoc
+++ b/examples/quick/imageprovider/doc/src/imageprovider.qdoc
@@ -1,34 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title C++ Extensions: Image Provider Example
\brief How to load images in QML with QQuickImageProvider.
\example imageprovider
+ \examplecategory {Graphics}
This examples shows how to use QQuickImageProvider to serve images
to QML image elements.
diff --git a/examples/quick/imageprovider/imageprovider-example.qml b/examples/quick/imageprovider/imageprovider-example.qml
index fcda0ff3dc..5bd092bc2d 100644
--- a/examples/quick/imageprovider/imageprovider-example.qml
+++ b/examples/quick/imageprovider/imageprovider-example.qml
@@ -1,53 +1,6 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-import QtQuick 2.0
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+import QtQuick
import "ImageProviderCore" // import the plugin that registers the color image provider
//![0]
diff --git a/examples/quick/imageprovider/imageprovider.cpp b/examples/quick/imageprovider/imageprovider.cpp
index a606352cce..c7ec8536d3 100644
--- a/examples/quick/imageprovider/imageprovider.cpp
+++ b/examples/quick/imageprovider/imageprovider.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <qqmlextensionplugin.h>
diff --git a/examples/quick/imageresponseprovider/CMakeLists.txt b/examples/quick/imageresponseprovider/CMakeLists.txt
index 5f282a0fb9..52486af046 100644
--- a/examples/quick/imageresponseprovider/CMakeLists.txt
+++ b/examples/quick/imageresponseprovider/CMakeLists.txt
@@ -1,48 +1,43 @@
-# Generated from imageresponseprovider.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qmlimageresponseproviderplugin LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
+set(QT_QML_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/examples/quick/imageresponseprovider)
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/imageresponseprovider/ImageResponseProviderCore")
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Quick)
+qt_standard_project_setup(REQUIRES 6.5)
qt6_add_qml_module(qmlimageresponseproviderplugin
- OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/ImageResponseProviderCore"
- VERSION 1.0
URI "ImageResponseProviderCore"
- INSTALL_LOCATION ${INSTALL_EXAMPLEDIR}
+ PLUGIN_TARGET qmlimageresponseproviderplugin
+ NO_PLUGIN_OPTIONAL
+ NO_GENERATE_PLUGIN_SOURCE
+ CLASS_NAME ImageProviderExtensionPlugin
)
target_sources(qmlimageresponseproviderplugin PRIVATE
imageresponseprovider.cpp
)
+
set_target_properties(qmlimageresponseproviderplugin PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(qmlimageresponseproviderplugin PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
install(TARGETS qmlimageresponseproviderplugin
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
diff --git a/examples/quick/imageresponseprovider/doc/src/imageresponseprovider.qdoc b/examples/quick/imageresponseprovider/doc/src/imageresponseprovider.qdoc
index a402033fd0..7d45057116 100644
--- a/examples/quick/imageresponseprovider/doc/src/imageresponseprovider.qdoc
+++ b/examples/quick/imageresponseprovider/doc/src/imageresponseprovider.qdoc
@@ -1,34 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 Canonical Limited and/or its subsidiary(-ies)
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2015 Canonical Limited and/or its subsidiary(-ies)
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title C++ Extensions: Image Response Provider Example
\example imageresponseprovider
\brief How to load images asynchronously in QML.
+ \examplecategory {Graphics}
This examples shows how to use QQuickImageProvider to serve images
diff --git a/examples/quick/imageresponseprovider/imageresponseprovider-example.qml b/examples/quick/imageresponseprovider/imageresponseprovider-example.qml
index 54305f0109..980e25fb5b 100644
--- a/examples/quick/imageresponseprovider/imageresponseprovider-example.qml
+++ b/examples/quick/imageresponseprovider/imageresponseprovider-example.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 Canonical Limited and/or its subsidiary(-ies)
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2015 Canonical Limited and/or its subsidiary(-ies)
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
import "ImageResponseProviderCore"
Column {
diff --git a/examples/quick/imageresponseprovider/imageresponseprovider.cpp b/examples/quick/imageresponseprovider/imageresponseprovider.cpp
index 4ab1090361..05b74d73a0 100644
--- a/examples/quick/imageresponseprovider/imageresponseprovider.cpp
+++ b/examples/quick/imageresponseprovider/imageresponseprovider.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 Canonical Limited and/or its subsidiary(-ies)
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2015 Canonical Limited and/or its subsidiary(-ies)
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <qqmlextensionplugin.h>
diff --git a/examples/quick/itemvariablerefreshrate/CMakeLists.txt b/examples/quick/itemvariablerefreshrate/CMakeLists.txt
new file mode 100644
index 0000000000..ca65a005e1
--- /dev/null
+++ b/examples/quick/itemvariablerefreshrate/CMakeLists.txt
@@ -0,0 +1,45 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(itemvariablerefreshrate LANGUAGES CXX)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
+
+qt_standard_project_setup(REQUIRES 6.5)
+
+qt_add_executable(itemvariablerefreshrateexample
+ WIN32
+ MACOSX_BUNDLE
+ main.cpp
+)
+
+target_link_libraries(itemvariablerefreshrateexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
+
+qt_add_qml_module(itemvariablerefreshrateexample
+ URI itemvariablerefreshrate
+ QML_FILES
+ "itemvariablerefreshrate.qml"
+ RESOURCES
+ "content/qt_logo.png"
+)
+
+install(TARGETS itemvariablerefreshrateexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET itemvariablerefreshrateexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/itemvariablerefreshrate/content/qt_logo.png b/examples/quick/itemvariablerefreshrate/content/qt_logo.png
new file mode 100644
index 0000000000..30c621c9c6
--- /dev/null
+++ b/examples/quick/itemvariablerefreshrate/content/qt_logo.png
Binary files differ
diff --git a/examples/quick/itemvariablerefreshrate/doc/images/qml-itemvariablerefreshrate-example.png b/examples/quick/itemvariablerefreshrate/doc/images/qml-itemvariablerefreshrate-example.png
new file mode 100644
index 0000000000..592baa3a4a
--- /dev/null
+++ b/examples/quick/itemvariablerefreshrate/doc/images/qml-itemvariablerefreshrate-example.png
Binary files differ
diff --git a/examples/quick/itemvariablerefreshrate/doc/src/itemvariablerefreshrate.qdoc b/examples/quick/itemvariablerefreshrate/doc/src/itemvariablerefreshrate.qdoc
new file mode 100644
index 0000000000..51fbc2c523
--- /dev/null
+++ b/examples/quick/itemvariablerefreshrate/doc/src/itemvariablerefreshrate.qdoc
@@ -0,0 +1,37 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+/*!
+ \title Qt Quick Examples - Item Variable Refresh Rate
+ \example itemvariablerefreshrate
+ \image qml-itemvariablerefreshrate-example.png
+ \brief A Qt Quick example shows how to setup variable refresh rate for
+ specific parts of the UI.
+ \ingroup qtquickexamples
+ \examplecategory {Graphics}
+
+ This example demonstrates using the live property of a \l{Item Layers} to get a
+ variable and independent refresh rate for Quick items. This can provide a significant
+ boost to performance if specific parts of a UI does not need to be re-rendered
+ every frame, but still require internal updates. Drawing parts that are static
+ most of the time or animations that does not have to run smoothly at all times
+ is a waste of resources. This property gives the user control over when the item
+ is drawn.
+
+ \note Using \l{Item Layers} may involve a performance penalty, depending on the size
+ of the layered item subtree, due to using separate render targets (textures),
+ which are then blended together in the main render pass.
+ Application designers should always evaluate the impact to ensure that the benefits
+ of using layers outweigh the potential disadvantages.
+
+ The example uses \l FrameAnimation to control how often the item is rendered.
+ Useful when you only want to e.g. every second frame.
+ Using something like a timer or other mechanics to toggle the flag is also valid.
+ \snippet itemvariablerefreshrate/itemvariablerefreshrate.qml frameAnimation
+ In the above snippet, the fps property is only there for visual demonstration purposes.
+
+ The item requires layer.enabled to be true, and then the item will
+ be rendered depending on the state of layer.live as shown in the below snippet.
+ \snippet itemvariablerefreshrate/itemvariablerefreshrate.qml item
+ Using modulo operator and a slider to set the value, we can dynamically change
+ how often the Qt logo is rendered.
+*/
diff --git a/examples/quick/itemvariablerefreshrate/itemvariablerefreshrate.pro b/examples/quick/itemvariablerefreshrate/itemvariablerefreshrate.pro
new file mode 100644
index 0000000000..7981d2492f
--- /dev/null
+++ b/examples/quick/itemvariablerefreshrate/itemvariablerefreshrate.pro
@@ -0,0 +1,8 @@
+TEMPLATE = app
+
+QT += quick qml
+SOURCES += main.cpp
+RESOURCES += itemvariablerefreshrate.qrc
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/itemvariablerefreshrate
+INSTALLS += target
diff --git a/examples/quick/itemvariablerefreshrate/itemvariablerefreshrate.qml b/examples/quick/itemvariablerefreshrate/itemvariablerefreshrate.qml
new file mode 100644
index 0000000000..2ef0cb4326
--- /dev/null
+++ b/examples/quick/itemvariablerefreshrate/itemvariablerefreshrate.qml
@@ -0,0 +1,85 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+
+Rectangle {
+ id: root
+ width: 640
+ height: 480
+ visible: true
+
+ //! [frameAnimation]
+ FrameAnimation {
+ id: frameAnimation
+ property real fps: smoothFrameTime > 0 ? (1.0 / smoothFrameTime) : 0
+ running: true
+ }
+ //! [frameAnimation]
+
+
+ //! [item]
+ Item {
+ id: qt_logo
+ width: 230
+ height: 230
+ anchors.fill: parent
+ anchors.topMargin: 125
+ layer.enabled: true
+ layer.live: slider.value > 0 && frameAnimation.currentFrame % slider.value == 0
+ //! [item]
+
+ Rectangle {
+ id: rectangle
+ anchors.fill: parent
+ color: "black"
+ Image {
+ anchors.fill: parent
+ source: "content/qt_logo.png"
+ }
+
+ // one second is one full rotation
+ RotationAnimation on rotation {
+ loops: Animation.Infinite
+ duration: 1000
+ from: 0
+ to: 360
+ }
+ }
+ }
+
+ Column {
+ anchors.top: root.top
+ anchors.left: root.left
+ anchors.margins: 10
+
+ Label {
+ text: "FPS: " + frameAnimation.fps.toFixed(0)
+ font.pixelSize: 20
+ font.italic: true
+ }
+
+ Label {
+ text: "Rect rotation (degrees): " + rectangle.rotation.toFixed(0)
+ font.pixelSize: 20
+ font.italic: true
+ }
+
+ Row {
+ Label {
+ text: qsTr("Draw every " + slider.value.toFixed(0) + " frame")
+ font.pixelSize: 20
+ font.italic: true
+ }
+
+ Slider {
+ id: slider
+ from: 0
+ value: 1
+ to: 10
+ stepSize: 1
+ }
+ }
+ }
+}
diff --git a/examples/quick/itemvariablerefreshrate/itemvariablerefreshrate.qrc b/examples/quick/itemvariablerefreshrate/itemvariablerefreshrate.qrc
new file mode 100644
index 0000000000..c50b0da872
--- /dev/null
+++ b/examples/quick/itemvariablerefreshrate/itemvariablerefreshrate.qrc
@@ -0,0 +1,6 @@
+<RCC>
+ <qresource prefix="/qt/qml/itemvariablerefreshrate">
+ <file>itemvariablerefreshrate.qml</file>
+ <file>content/qt_logo.png</file>
+ </qresource>
+</RCC>
diff --git a/examples/quick/itemvariablerefreshrate/main.cpp b/examples/quick/itemvariablerefreshrate/main.cpp
new file mode 100644
index 0000000000..078b9b4358
--- /dev/null
+++ b/examples/quick/itemvariablerefreshrate/main.cpp
@@ -0,0 +1,4 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+#include "../shared/shared.h"
+DECLARATIVE_EXAMPLE_MAIN(itemvariablerefreshrate/itemvariablerefreshrate)
diff --git a/examples/quick/keyinteraction/CMakeLists.txt b/examples/quick/keyinteraction/CMakeLists.txt
index b62d6754d3..926e5e58a3 100644
--- a/examples/quick/keyinteraction/CMakeLists.txt
+++ b/examples/quick/keyinteraction/CMakeLists.txt
@@ -1,62 +1,51 @@
-# Generated from keyinteraction.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(keyinteraction LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup(REQUIRES 6.5)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/keyinteraction")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(keyinteraction
+qt_add_executable(keyinteractionexample WIN32 MACOSX_BUNDLE
main.cpp
)
-set_target_properties(keyinteraction PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(keyinteraction PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
+target_link_libraries(keyinteractionexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
# Resources:
-set(keyinteraction_resource_files
- "focus/Core/ContextMenu.qml"
- "focus/Core/GridMenu.qml"
- "focus/Core/ListMenu.qml"
- "focus/Core/ListViewDelegate.qml"
- "focus/Core/TabMenu.qml"
- "focus/Core/images/arrow.png"
- "focus/Core/images/qt-logo.png"
- "focus/focus.qml"
- "keyinteraction.qml"
+qt_add_qml_module(keyinteractionexample
+ URI keyinteraction
+ QML_FILES
+ "ContextMenu.qml"
+ "GridMenu.qml"
+ "ListMenu.qml"
+ "ListViewDelegate.qml"
+ "TabMenu.qml"
+ "focus.qml"
+ "keyinteraction.qml"
+ RESOURCES
+ "images/arrow.png"
+ "images/qt-logo.png"
)
-qt6_add_resources(keyinteraction "keyinteraction"
- PREFIX
- "/keyinteraction"
- FILES
- ${keyinteraction_resource_files}
+install(TARGETS keyinteractionexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-install(TARGETS keyinteraction
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+qt_generate_deploy_qml_app_script(
+ TARGET keyinteractionexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/keyinteraction/ContextMenu.qml b/examples/quick/keyinteraction/ContextMenu.qml
new file mode 100644
index 0000000000..22d149fd9d
--- /dev/null
+++ b/examples/quick/keyinteraction/ContextMenu.qml
@@ -0,0 +1,34 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+FocusScope {
+ id: container
+
+ required property Item keyRightTarget
+
+ property bool open: false
+
+ Item {
+ anchors.fill: parent
+
+ Rectangle {
+ anchors.fill: parent
+ color: "#D1DBBD"
+ focus: true
+ Keys.onRightPressed: container.keyRightTarget.focus = true
+
+ Text {
+ anchors {
+ top: parent.top
+ horizontalCenter: parent.horizontalCenter
+ margins: 30
+ }
+ color: "black"
+ font.pixelSize: 14
+ text: qsTr("Context Menu")
+ }
+ }
+ }
+}
diff --git a/examples/quick/keyinteraction/GridMenu.qml b/examples/quick/keyinteraction/GridMenu.qml
new file mode 100644
index 0000000000..b17a72bdc8
--- /dev/null
+++ b/examples/quick/keyinteraction/GridMenu.qml
@@ -0,0 +1,105 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+pragma ComponentBehavior: Bound
+import QtQuick
+
+FocusScope {
+ id: menu
+
+ property alias interactive: gridView.interactive
+ required property Item keyUpTarget
+ required property Item keyDownTarget
+ required property Item keyLeftTarget
+
+ Rectangle {
+ anchors.fill: parent
+ clip: true
+ gradient: Gradient {
+ GradientStop {
+ position: 0.0
+ color: "#193441"
+ }
+ GradientStop {
+ position: 1.0
+ color: Qt.darker("#193441")
+ }
+ }
+
+ GridView {
+ id: gridView
+
+ anchors.fill: parent
+ anchors.leftMargin: 20
+ anchors.rightMargin: 20
+ cellWidth: 152
+ cellHeight: 152
+ focus: true
+ model: 12
+
+ KeyNavigation.up: menu.keyUpTarget
+ KeyNavigation.down: menu.keyDownTarget
+ KeyNavigation.left: menu.keyLeftTarget
+
+ delegate: Item {
+ id: container
+
+ width: gridView.cellWidth
+ height: gridView.cellHeight
+ required property int index
+
+ Rectangle {
+ id: content
+
+ color: "transparent"
+ antialiasing: true
+ anchors.fill: parent
+ anchors.margins: 20
+ radius: 10
+
+ Rectangle {
+ color: "#91AA9D"
+ anchors.fill: parent
+ anchors.margins: 3
+ radius: 8
+ antialiasing: true
+ }
+ Image {
+ source: "images/qt-logo.png"
+ anchors.centerIn: parent
+ }
+ }
+
+ MouseArea {
+ id: mouseArea
+
+ anchors.fill: parent
+ hoverEnabled: true
+
+ onClicked: {
+ container.GridView.view.currentIndex = container.index
+ container.forceActiveFocus()
+ }
+ }
+
+ states: State {
+ name: "active"
+ when: container.activeFocus
+ PropertyChanges {
+ content {
+ color: "#FCFFF5"
+ scale: 1.1
+ }
+ }
+ }
+
+ transitions: Transition {
+ NumberAnimation {
+ properties: "scale"
+ duration: 100
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/examples/quick/keyinteraction/ListMenu.qml b/examples/quick/keyinteraction/ListMenu.qml
new file mode 100644
index 0000000000..0f4763e1b2
--- /dev/null
+++ b/examples/quick/keyinteraction/ListMenu.qml
@@ -0,0 +1,122 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQml
+import QtQuick
+
+FocusScope {
+ id: menu
+
+ clip: true
+ required property Item keyUpTarget
+ required property Item keyLeftTarget
+
+ ListView {
+ id: list1
+
+ y: activeFocus ? 10 : 40
+ width: parent.width / 3
+ height: parent.height - 20
+ focus: true
+
+ KeyNavigation.up: menu.keyUpTarget
+ KeyNavigation.left: menu.keyLeftTarget
+ KeyNavigation.right: list2
+
+ model: 10
+ cacheBuffer: 200
+ delegate: ListViewDelegate {}
+
+ Behavior on y {
+ NumberAnimation {
+ duration: 600
+ easing.type: Easing.OutQuint
+ }
+ }
+ }
+
+ ListView {
+ id: list2
+
+ y: activeFocus ? 10 : 40
+ x: parseInt(parent.width / 3)
+ width: parent.width / 3
+ height: parent.height - 20
+
+ KeyNavigation.up: menu.keyUpTarget
+ KeyNavigation.left: list1
+ KeyNavigation.right: list3
+
+ model: 10
+ cacheBuffer: 200
+ delegate: ListViewDelegate {}
+
+ Behavior on y {
+ NumberAnimation {
+ duration: 600
+ easing.type: Easing.OutQuint
+ }
+ }
+ }
+
+ ListView {
+ id: list3
+
+ y: activeFocus ? 10 : 40
+ x: parseInt(2 * parent.width / 3)
+ width: parent.width / 3
+ height: parent.height - 20
+
+ KeyNavigation.up: menu.keyUpTarget
+ KeyNavigation.left: list2
+
+ model: 10
+ cacheBuffer: 200
+ delegate: ListViewDelegate {}
+
+ Behavior on y {
+ NumberAnimation {
+ duration: 600
+ easing.type: Easing.OutQuint
+ }
+ }
+ }
+
+ Rectangle {
+ width: parent.width
+ height: 1
+ color: "#D1DBBD"
+ }
+
+ Rectangle {
+ y: 1
+ width: parent.width
+ height: 10
+ gradient: Gradient {
+ GradientStop {
+ position: 0.0
+ color: "#3E606F"
+ }
+ GradientStop {
+ position: 1.0
+ color: "transparent"
+ }
+ }
+ }
+
+ Rectangle {
+ y: parent.height - 10
+ width: parent.width
+ height: 10
+ gradient: Gradient {
+ GradientStop {
+ position: 1.0
+ color: "#3E606F"
+ }
+ GradientStop {
+ position: 0.0
+ color: "transparent"
+ }
+ }
+ }
+}
diff --git a/examples/quick/keyinteraction/ListViewDelegate.qml b/examples/quick/keyinteraction/ListViewDelegate.qml
new file mode 100644
index 0000000000..8ae43c8ab5
--- /dev/null
+++ b/examples/quick/keyinteraction/ListViewDelegate.qml
@@ -0,0 +1,73 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Item {
+ id: container
+ required property int index
+
+ width: ListView.view.width
+ height: 60
+ anchors.leftMargin: 10
+ anchors.rightMargin: 10
+
+ Rectangle {
+ id: content
+
+ anchors.centerIn: parent
+ width: container.width - 40
+ height: container.height - 10
+ color: "transparent"
+ antialiasing: true
+ radius: 10
+
+ Rectangle {
+ anchors.fill: parent
+ anchors.margins: 3
+ color: "#91AA9D"
+ antialiasing: true
+ radius: 8
+ }
+ }
+
+ Text {
+ id: label
+
+ anchors.centerIn: content
+ text: qsTr("List element ") + (container.index + 1)
+ color: "#193441"
+ font.pixelSize: 14
+ }
+
+ MouseArea {
+ id: mouseArea
+
+ anchors.fill: parent
+ hoverEnabled: true
+
+ onClicked: {
+ container.ListView.view.currentIndex = container.index
+ container.forceActiveFocus()
+ }
+ }
+
+ states: State {
+ name: "active"
+ when: container.activeFocus
+ PropertyChanges {
+ content {
+ color: "#FCFFF5"
+ scale: 1.1
+ }
+ label.font.pixelSize: 16
+ }
+ }
+
+ transitions: Transition {
+ NumberAnimation {
+ properties: "scale"
+ duration: 100
+ }
+ }
+}
diff --git a/examples/quick/keyinteraction/TabMenu.qml b/examples/quick/keyinteraction/TabMenu.qml
new file mode 100644
index 0000000000..04451b3206
--- /dev/null
+++ b/examples/quick/keyinteraction/TabMenu.qml
@@ -0,0 +1,98 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+pragma ComponentBehavior: Bound
+import QtQuick
+
+FocusScope {
+ id: menu
+ required property Item keyUpTarget
+ required property Item keyDownTarget
+
+ Rectangle {
+ anchors.fill: parent
+ clip: true
+ gradient: Gradient {
+ GradientStop {
+ position: 0.0
+ color: "#193441"
+ }
+ GradientStop {
+ position: 1.0
+ color: Qt.darker("#193441")
+ }
+ }
+
+ Row {
+ id: tabView
+
+ anchors.fill: parent
+ anchors.leftMargin: 20
+ anchors.rightMargin: 20
+ Repeater {
+ activeFocusOnTab: false
+ model: 5
+ Item {
+ id: container
+
+ width: 152
+ height: 152
+ activeFocusOnTab: true
+ focus: true
+
+ KeyNavigation.up: menu.keyUpTarget
+ KeyNavigation.down: menu.keyDownTarget
+
+ Rectangle {
+ id: content
+ color: "transparent"
+ antialiasing: true
+ anchors.fill: parent
+ anchors.margins: 20
+ radius: 10
+
+ Rectangle {
+ color: "#91AA9D"
+ anchors.fill: parent
+ anchors.margins: 3
+ radius: 8
+ antialiasing: true
+ }
+ Image {
+ source: "images/qt-logo.png"
+ anchors.centerIn: parent
+ }
+ }
+
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+ hoverEnabled: true
+
+ onClicked: {
+ container.forceActiveFocus()
+ }
+ }
+
+ states: State {
+ name: "active"
+ when: container.activeFocus
+ PropertyChanges {
+ content {
+ color: "#FCFFF5"
+ scale: 1.1
+ }
+ }
+ }
+
+ transitions: Transition {
+ NumberAnimation {
+ properties: "scale"
+ duration: 100
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/examples/quick/keyinteraction/doc/src/keyinteraction.qdoc b/examples/quick/keyinteraction/doc/src/keyinteraction.qdoc
index 04824f91de..378169452c 100644
--- a/examples/quick/keyinteraction/doc/src/keyinteraction.qdoc
+++ b/examples/quick/keyinteraction/doc/src/keyinteraction.qdoc
@@ -1,35 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Qt Quick Examples - Key Interaction
\example keyinteraction
\brief This is a collection of QML keyboard interaction examples.
\image qml-keyinteraction-example.png
\ingroup qtquickexamples
+ \examplecategory {Graphics}
\e{Keyboard Focus in Qt Quick} combines various methods of
handling keyboard focus. For more information, visit
diff --git a/examples/quick/keyinteraction/focus.qml b/examples/quick/keyinteraction/focus.qml
new file mode 100644
index 0000000000..42edcb5f01
--- /dev/null
+++ b/examples/quick/keyinteraction/focus.qml
@@ -0,0 +1,160 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQml
+import QtQuick
+
+Rectangle {
+ id: window
+
+ width: 800
+ height: 640
+ color: "#3E606F"
+
+ FocusScope {
+ id: mainView
+
+ width: parent.width
+ height: parent.height
+ focus: true
+
+ TabMenu {
+ id: tabMenu
+
+ y: 160
+ width: parent.width
+ height: 160
+
+ keyUpTarget: listMenu
+ keyDownTarget: gridMenu
+
+ focus: true
+ activeFocusOnTab: true
+
+ onActiveFocusChanged: {
+ if (activeFocus)
+ mainView.state = "showTabViews"
+ }
+ }
+
+ GridMenu {
+ id: gridMenu
+
+ y: 320
+ width: parent.width
+ height: 320
+ activeFocusOnTab: true
+
+ keyUpTarget: tabMenu
+ keyDownTarget: listMenu
+ keyLeftTarget: contextMenu
+
+ onActiveFocusChanged: {
+ if (activeFocus)
+ mainView.state = "showGridViews"
+ }
+ }
+
+ ListMenu {
+ id: listMenu
+
+ y: 640
+ width: parent.width
+ height: 320
+ activeFocusOnTab: true
+
+ keyUpTarget: gridMenu
+ keyLeftTarget: contextMenu
+
+ onActiveFocusChanged: {
+ if (activeFocus)
+ mainView.state = "showListViews"
+ }
+ }
+
+ Rectangle {
+ id: shade
+ anchors.fill: parent
+ color: "black"
+ opacity: 0
+ }
+
+ states: [
+ State {
+ name: "showTabViews"
+ PropertyChanges {
+ tabMenu.y: 160
+ gridMenu.y: 320
+ listMenu.y: 640
+ }
+ },
+
+ State {
+ name: "showGridViews"
+ PropertyChanges {
+ tabMenu.y: 0
+ gridMenu.y: 160
+ listMenu.y: 480
+ }
+ },
+
+ State {
+ name: "showListViews"
+ PropertyChanges {
+ tabMenu.y: -160
+ gridMenu.y: 0
+ listMenu.y: 320
+ }
+ }
+ ]
+
+ transitions: Transition {
+ NumberAnimation {
+ properties: "y"
+ duration: 600
+ easing.type: Easing.OutQuint
+ }
+ }
+ }
+
+ Image {
+ source: "images/arrow.png"
+ rotation: 90
+ anchors.verticalCenter: parent.verticalCenter
+
+ MouseArea {
+ anchors.fill: parent
+ anchors.margins: -10
+ onClicked: contextMenu.focus = true
+ }
+ }
+
+ ContextMenu {
+ keyRightTarget: mainView
+ id: contextMenu
+ x: -265
+ width: 260
+ height: parent.height
+ }
+
+ states: State {
+ name: "contextMenuOpen"
+ when: !mainView.activeFocus
+ PropertyChanges {
+ contextMenu {
+ x: 0
+ open: true
+ }
+ mainView.x: 130
+ shade.opacity: 0.25
+ }
+ }
+
+ transitions: Transition {
+ NumberAnimation {
+ properties: "x,opacity"
+ duration: 600
+ easing.type: Easing.OutQuint
+ }
+ }
+}
diff --git a/examples/quick/keyinteraction/focus/Core/ContextMenu.qml b/examples/quick/keyinteraction/focus/Core/ContextMenu.qml
deleted file mode 100644
index 31b5e1b83d..0000000000
--- a/examples/quick/keyinteraction/focus/Core/ContextMenu.qml
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.1
-
-FocusScope {
- id: container
- required property Item keyRightTarget
-
- property bool open: false
-
- Item {
- anchors.fill: parent
-
- Rectangle {
- anchors.fill: parent
- color: "#D1DBBD"
- focus: true
- Keys.onRightPressed: container.keyRightTarget.focus = true
-
- Text {
- anchors { top: parent.top; horizontalCenter: parent.horizontalCenter; margins: 30 }
- color: "black"
- font.pixelSize: 14
- text: "Context Menu"
- }
- }
- }
-}
diff --git a/examples/quick/keyinteraction/focus/Core/GridMenu.qml b/examples/quick/keyinteraction/focus/Core/GridMenu.qml
deleted file mode 100644
index 78d6654957..0000000000
--- a/examples/quick/keyinteraction/focus/Core/GridMenu.qml
+++ /dev/null
@@ -1,117 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.1
-
-FocusScope {
- id: menu
- property alias interactive: gridView.interactive
- required property Item keyUpTarget
- required property Item keyDownTarget
- required property Item keyLeftTarget
-
- Rectangle {
- anchors.fill: parent
- clip: true
- gradient: Gradient {
- GradientStop { position: 0.0; color: "#193441" }
- GradientStop { position: 1.0; color: Qt.darker("#193441") }
- }
-
- GridView {
- id: gridView
- anchors.fill: parent; anchors.leftMargin: 20; anchors.rightMargin: 20
- cellWidth: 152; cellHeight: 152
- focus: true
- model: 12
-
- KeyNavigation.up: menu.keyUpTarget
- KeyNavigation.down: menu.keyDownTarget
- KeyNavigation.left: menu.keyLeftTarget
-
- delegate: Item {
- id: container
- width: GridView.view.cellWidth
- height: GridView.view.cellHeight
- required property int index
-
- Rectangle {
- id: content
- color: "transparent"
- antialiasing: true
- anchors.fill: parent; anchors.margins: 20; radius: 10
-
- Rectangle { color: "#91AA9D"; anchors.fill: parent; anchors.margins: 3; radius: 8; antialiasing: true }
- Image { source: "images/qt-logo.png"; anchors.centerIn: parent }
- }
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- hoverEnabled: true
-
- onClicked: {
- container.GridView.view.currentIndex = container.index
- container.forceActiveFocus()
- }
- }
-
- states: State {
- name: "active"; when: container.activeFocus
- PropertyChanges { target: content; color: "#FCFFF5"; scale: 1.1 }
- }
-
- transitions: Transition {
- NumberAnimation { properties: "scale"; duration: 100 }
- }
- }
- }
- }
-}
diff --git a/examples/quick/keyinteraction/focus/Core/ListMenu.qml b/examples/quick/keyinteraction/focus/Core/ListMenu.qml
deleted file mode 100644
index 694ae3cac6..0000000000
--- a/examples/quick/keyinteraction/focus/Core/ListMenu.qml
+++ /dev/null
@@ -1,119 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQml 2.1
-import QtQuick 2.1
-
-FocusScope {
- id: menu
- clip: true
- required property Item keyUpTarget
- required property Item keyLeftTarget
-
- ListView {
- id: list1
- y: activeFocus ? 10 : 40; width: parent.width / 3; height: parent.height - 20
- focus: true
- KeyNavigation.up: menu.keyUpTarget
- KeyNavigation.left: menu.keyLeftTarget
- KeyNavigation.right: list2
- model: 10; cacheBuffer: 200
- delegate: ListViewDelegate {}
-
- Behavior on y {
- NumberAnimation { duration: 600; easing.type: Easing.OutQuint }
- }
- }
-
- ListView {
- id: list2
- y: activeFocus ? 10 : 40; x: parseInt(parent.width / 3); width: parent.width / 3; height: parent.height - 20
- KeyNavigation.up: menu.keyUpTarget
- KeyNavigation.left: list1
- KeyNavigation.right: list3
- model: 10; cacheBuffer: 200
- delegate: ListViewDelegate {}
-
- Behavior on y {
- NumberAnimation { duration: 600; easing.type: Easing.OutQuint }
- }
- }
-
- ListView {
- id: list3
- y: activeFocus ? 10 : 40; x: parseInt(2 * parent.width / 3); width: parent.width / 3; height: parent.height - 20
- KeyNavigation.up: menu.keyUpTarget
- KeyNavigation.left: list2
- model: 10; cacheBuffer: 200
- delegate: ListViewDelegate {}
-
- Behavior on y {
- NumberAnimation { duration: 600; easing.type: Easing.OutQuint }
- }
- }
-
- Rectangle { width: parent.width; height: 1; color: "#D1DBBD" }
-
- Rectangle {
- y: 1; width: parent.width; height: 10
- gradient: Gradient {
- GradientStop { position: 0.0; color: "#3E606F" }
- GradientStop { position: 1.0; color: "transparent" }
- }
- }
-
- Rectangle {
- y: parent.height - 10; width: parent.width; height: 10
- gradient: Gradient {
- GradientStop { position: 1.0; color: "#3E606F" }
- GradientStop { position: 0.0; color: "transparent" }
- }
- }
-}
diff --git a/examples/quick/keyinteraction/focus/Core/ListViewDelegate.qml b/examples/quick/keyinteraction/focus/Core/ListViewDelegate.qml
deleted file mode 100644
index 5a2957eab0..0000000000
--- a/examples/quick/keyinteraction/focus/Core/ListViewDelegate.qml
+++ /dev/null
@@ -1,97 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.1
-
-Item {
- id: container
- required property int index
-
- width: ListView.view.width; height: 60; anchors.leftMargin: 10; anchors.rightMargin: 10
-
- Rectangle {
- id: content
- anchors.centerIn: parent; width: container.width - 40; height: container.height - 10
- color: "transparent"
- antialiasing: true
- radius: 10
-
- Rectangle { anchors.fill: parent; anchors.margins: 3; color: "#91AA9D"; antialiasing: true; radius: 8 }
- }
-
- Text {
- id: label
- anchors.centerIn: content
- text: "List element " + (container.index + 1)
- color: "#193441"
- font.pixelSize: 14
- }
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- hoverEnabled: true
-
- onClicked: {
- container.ListView.view.currentIndex = container.index
- container.forceActiveFocus()
- }
- }
-
- states: State {
- name: "active"; when: container.activeFocus
- PropertyChanges { target: content; color: "#FCFFF5"; scale: 1.1 }
- PropertyChanges { target: label; font.pixelSize: 16 }
- }
-
- transitions: Transition {
- NumberAnimation { properties: "scale"; duration: 100 }
- }
-}
diff --git a/examples/quick/keyinteraction/focus/Core/TabMenu.qml b/examples/quick/keyinteraction/focus/Core/TabMenu.qml
deleted file mode 100644
index 11b3d005c3..0000000000
--- a/examples/quick/keyinteraction/focus/Core/TabMenu.qml
+++ /dev/null
@@ -1,113 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.1
-
-FocusScope {
- id: menu
- required property Item keyUpTarget
- required property Item keyDownTarget
-
- Rectangle {
- anchors.fill: parent
- clip: true
- gradient: Gradient {
- GradientStop { position: 0.0; color: "#193441" }
- GradientStop { position: 1.0; color: Qt.darker("#193441") }
- }
-
- Row {
- id: tabView
- anchors.fill: parent; anchors.leftMargin: 20; anchors.rightMargin: 20
- Repeater {
- activeFocusOnTab: false
- model: 5
- Item {
- id: container
- width: 152; height: 152
- activeFocusOnTab: true
- focus: true
-
- KeyNavigation.up: menu.keyUpTarget
- KeyNavigation.down: menu.keyDownTarget
-
- Rectangle {
- id: content
- color: "transparent"
- antialiasing: true
- anchors.fill: parent; anchors.margins: 20; radius: 10
-
- Rectangle { color: "#91AA9D"; anchors.fill: parent; anchors.margins: 3; radius: 8; antialiasing: true }
- Image { source: "images/qt-logo.png"; anchors.centerIn: parent }
- }
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- hoverEnabled: true
-
- onClicked: {
- container.forceActiveFocus()
- }
- }
-
- states: State {
- name: "active"; when: container.activeFocus
- PropertyChanges { target: content; color: "#FCFFF5"; scale: 1.1 }
- }
-
- transitions: Transition {
- NumberAnimation { properties: "scale"; duration: 100 }
- }
- }
- }
- }
- }
-}
diff --git a/examples/quick/keyinteraction/focus/focus.qml b/examples/quick/keyinteraction/focus/focus.qml
deleted file mode 100644
index 9db9ab48bc..0000000000
--- a/examples/quick/keyinteraction/focus/focus.qml
+++ /dev/null
@@ -1,177 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQml 2.1
-import QtQuick 2.1
-import "Core"
-
-Rectangle {
- id: window
-
- width: 800; height: 640
- color: "#3E606F"
-
- FocusScope {
- id: mainView
-
- width: parent.width; height: parent.height
- focus: true
-
- TabMenu {
- id: tabMenu
- y: 160; width: parent.width; height: 160
-
- keyUpTarget: listMenu
- keyDownTarget: gridMenu
-
- focus: true
- activeFocusOnTab: true
-
- onActiveFocusChanged: {
- if (activeFocus)
- mainView.state = "showTabViews"
- }
- }
-
- GridMenu {
- id: gridMenu
- y: 320; width: parent.width; height: 320
- activeFocusOnTab: true
-
- keyUpTarget: tabMenu
- keyDownTarget: listMenu
- keyLeftTarget: contextMenu
-
- onActiveFocusChanged: {
- if (activeFocus)
- mainView.state = "showGridViews"
- }
- }
-
- ListMenu {
- id: listMenu
- y: 640; width: parent.width; height: 320
- activeFocusOnTab: true
-
- keyUpTarget: gridMenu
- keyLeftTarget: contextMenu
-
- onActiveFocusChanged: {
- if (activeFocus)
- mainView.state = "showListViews"
- }
- }
-
- Rectangle {
- id: shade
- anchors.fill: parent
- color: "black"
- opacity: 0
- }
-
- states: [
- State {
- name: "showTabViews"
- PropertyChanges { target: tabMenu; y: 160 }
- PropertyChanges { target: gridMenu; y: 320 }
- PropertyChanges { target: listMenu; y: 640 }
- },
-
- State {
- name: "showGridViews"
- PropertyChanges { target: tabMenu; y: 0 }
- PropertyChanges { target: gridMenu; y: 160 }
- PropertyChanges { target: listMenu; y: 480 }
- },
-
- State {
- name: "showListViews"
- PropertyChanges { target: tabMenu; y: -160 }
- PropertyChanges { target: gridMenu; y: 0 }
- PropertyChanges { target: listMenu; y: 320 }
- }
- ]
-
- transitions: Transition {
- NumberAnimation { properties: "y"; duration: 600; easing.type: Easing.OutQuint }
- }
- }
-
- Image {
- source: "Core/images/arrow.png"
- rotation: 90
- anchors.verticalCenter: parent.verticalCenter
-
- MouseArea {
- anchors.fill: parent; anchors.margins: -10
- onClicked: contextMenu.focus = true
- }
- }
-
- ContextMenu {
- keyRightTarget: mainView
- id: contextMenu
- x: -265
- width: 260
- height: parent.height
- }
-
- states: State {
- name: "contextMenuOpen"
- when: !mainView.activeFocus
- PropertyChanges { target: contextMenu; x: 0; open: true }
- PropertyChanges { target: mainView; x: 130 }
- PropertyChanges { target: shade; opacity: 0.25 }
- }
-
- transitions: Transition {
- NumberAnimation { properties: "x,opacity"; duration: 600; easing.type: Easing.OutQuint }
- }
-}
diff --git a/examples/quick/keyinteraction/focus/Core/images/arrow.png b/examples/quick/keyinteraction/images/arrow.png
index 20ee200f5f..20ee200f5f 100644
--- a/examples/quick/keyinteraction/focus/Core/images/arrow.png
+++ b/examples/quick/keyinteraction/images/arrow.png
Binary files differ
diff --git a/examples/quick/keyinteraction/focus/Core/images/qt-logo.png b/examples/quick/keyinteraction/images/qt-logo.png
index 14ddf2a028..14ddf2a028 100644
--- a/examples/quick/keyinteraction/focus/Core/images/qt-logo.png
+++ b/examples/quick/keyinteraction/images/qt-logo.png
Binary files differ
diff --git a/examples/quick/keyinteraction/keyinteraction.qml b/examples/quick/keyinteraction/keyinteraction.qml
index 7fa3078803..afae2d74d8 100644
--- a/examples/quick/keyinteraction/keyinteraction.qml
+++ b/examples/quick/keyinteraction/keyinteraction.qml
@@ -1,57 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.1
+import QtQuick
Loader {//Just loader, since there's only one.
- source: "focus/focus.qml"
+ source: "focus.qml"
focus: true
// Exception to the standard sizing, because this is primarily a desktop
// example and it benefits from being able to see everything at once.
diff --git a/examples/quick/keyinteraction/keyinteraction.qrc b/examples/quick/keyinteraction/keyinteraction.qrc
index c719654835..3193e39083 100644
--- a/examples/quick/keyinteraction/keyinteraction.qrc
+++ b/examples/quick/keyinteraction/keyinteraction.qrc
@@ -1,13 +1,13 @@
<RCC>
- <qresource prefix="/keyinteraction">
+ <qresource prefix="/qt/qml/keyinteraction">
<file>keyinteraction.qml</file>
- <file>focus/focus.qml</file>
- <file>focus/Core/images/arrow.png</file>
- <file>focus/Core/images/qt-logo.png</file>
- <file>focus/Core/ContextMenu.qml</file>
- <file>focus/Core/GridMenu.qml</file>
- <file>focus/Core/ListMenu.qml</file>
- <file>focus/Core/ListViewDelegate.qml</file>
- <file>focus/Core/TabMenu.qml</file>
+ <file>focus.qml</file>
+ <file>ContextMenu.qml</file>
+ <file>GridMenu.qml</file>
+ <file>ListMenu.qml</file>
+ <file>ListViewDelegate.qml</file>
+ <file>TabMenu.qml</file>
+ <file>images/arrow.png</file>
+ <file>images/qt-logo.png</file>
</qresource>
</RCC>
diff --git a/examples/quick/keyinteraction/main.cpp b/examples/quick/keyinteraction/main.cpp
index 53d26fb9b5..09f3088060 100644
--- a/examples/quick/keyinteraction/main.cpp
+++ b/examples/quick/keyinteraction/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(keyinteraction/keyinteraction)
diff --git a/examples/quick/layouts/CMakeLists.txt b/examples/quick/layouts/CMakeLists.txt
index e87ef25e92..2979b8173d 100644
--- a/examples/quick/layouts/CMakeLists.txt
+++ b/examples/quick/layouts/CMakeLists.txt
@@ -1,54 +1,43 @@
-# Generated from layouts.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(layouts LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup(REQUIRES 6.5)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/layouts")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Quick)
-
-qt_add_executable(layouts
+qt_add_executable(layoutsexample
+ WIN32
+ MACOSX_BUNDLE
main.cpp
)
-set_target_properties(layouts PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(layouts PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
+qt_add_qml_module(layoutsexample
+ URI layouts
+ QML_FILES
+ "layouts.qml"
+)
-# Resources:
-set(layouts_resource_files
- "layouts.qml"
+target_link_libraries(layoutsexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
-qt6_add_resources(layouts "layouts"
- PREFIX
- "/layouts"
- FILES
- ${layouts_resource_files}
+install(TARGETS layoutsexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-install(TARGETS layouts
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+qt_generate_deploy_qml_app_script(
+ TARGET layoutsexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/layouts/doc/src/qtquicklayouts-examples.qdoc b/examples/quick/layouts/doc/src/qtquicklayouts-examples.qdoc
index deb1d62b2b..a7b021f1f9 100644
--- a/examples/quick/layouts/doc/src/qtquicklayouts-examples.qdoc
+++ b/examples/quick/layouts/doc/src/qtquicklayouts-examples.qdoc
@@ -1,35 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Qt Quick Layouts - Basic Example
\example layouts
\brief Demonstrates how to use layout types to arrange a UI.
\image qtquicklayouts-example-layouts.png
\ingroup qtquickexamples
+ \examplecategory {User Interface Components}
This example shows how to easily arrange UI components into
\l{Qt Quick Layouts}{layouts} with \l{GridLayout}, \l{RowLayout}, and
diff --git a/examples/quick/layouts/layouts.qml b/examples/quick/layouts/layouts.qml
index 8a1cb20d22..92fe305559 100644
--- a/examples/quick/layouts/layouts.qml
+++ b/examples/quick/layouts/layouts.qml
@@ -1,63 +1,18 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.2
-import QtQuick.Controls 2.12
-import QtQuick.Layouts 1.3
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
+
+pragma ComponentBehavior: Bound
ApplicationWindow {
id: appWindow
visible: true
- title: "Basic layouts"
- property int margin: 11
+ title: qsTr("Basic layouts")
+ readonly property int margin: 11
Component.onCompleted: {
width = mainLayout.implicitWidth + 2 * margin
@@ -73,27 +28,30 @@ ApplicationWindow {
anchors.margins: appWindow.margin
GroupBox {
id: rowBox
- title: "Row layout"
+ title: qsTr("Row layout")
Layout.fillWidth: true
+ Layout.fillHeight: false
Layout.minimumWidth: rowLayout.Layout.minimumWidth + 30
RowLayout {
id: rowLayout
anchors.fill: parent
TextField {
- placeholderText: "This wants to grow horizontally"
+ placeholderText: qsTr("This wants to grow horizontally")
Layout.fillWidth: true
}
Button {
- text: "Button"
+ text: qsTr("Button")
+ Layout.fillWidth: false
}
}
}
GroupBox {
id: gridBox
- title: "Grid layout"
+ title: qsTr("Grid layout")
Layout.fillWidth: true
+ Layout.fillHeight: false
Layout.minimumWidth: gridLayout.Layout.minimumWidth + 30
GridLayout {
@@ -102,17 +60,17 @@ ApplicationWindow {
flow: GridLayout.TopToBottom
anchors.fill: parent
- Label { text: "Line 1" }
- Label { text: "Line 2" }
- Label { text: "Line 3" }
+ Label { text: qsTr("Line 1") }
+ Label { text: qsTr("Line 2") }
+ Label { text: qsTr("Line 3") }
TextField { }
TextField { }
TextField { }
TextArea {
- text: "This widget spans over three rows in the GridLayout.\n"
- + "All items in the GridLayout are implicitly positioned from top to bottom."
+ text: qsTr("This widget spans over three rows in the GridLayout.\n")
+ + qsTr("All items in the GridLayout are implicitly positioned from top to bottom.")
wrapMode: TextArea.WordWrap
Layout.rowSpan: 3
Layout.fillHeight: true
@@ -124,14 +82,14 @@ ApplicationWindow {
}
TextArea {
id: t3
- text: "This fills the whole cell"
+ text: qsTr("This fills the whole cell")
Layout.minimumHeight: 30
Layout.fillHeight: true
Layout.fillWidth: true
}
GroupBox {
id: stackBox
- title: "Stack layout"
+ title: qsTr("Stack layout")
implicitWidth: 200
implicitHeight: 60
Layout.minimumHeight: 60
@@ -151,8 +109,8 @@ ApplicationWindow {
color: Qt.hsla((0.5 + index) / stackRepeater.count, 0.3, 0.7, 1)
Button {
anchors.centerIn: parent
- text: "Page " + (parent.index + 1)
- onClicked: { stackLayout.advance() }
+ text: qsTr("Page ") + (parent.index + 1)
+ onClicked: stackLayout.advance()
}
}
}
diff --git a/examples/quick/layouts/layouts.qmlproject b/examples/quick/layouts/layouts.qmlproject
deleted file mode 100644
index e5a8bf02ca..0000000000
--- a/examples/quick/layouts/layouts.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "main.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/quick/layouts/layouts.qrc b/examples/quick/layouts/layouts.qrc
index 1e01c43fe1..eddf00069e 100644
--- a/examples/quick/layouts/layouts.qrc
+++ b/examples/quick/layouts/layouts.qrc
@@ -1,5 +1,5 @@
<!DOCTYPE RCC><RCC version="1.0">
-<qresource prefix="/layouts">
+<qresource prefix="/qt/qml/layouts">
<file>layouts.qml</file>
</qresource>
</RCC>
diff --git a/examples/quick/layouts/main.cpp b/examples/quick/layouts/main.cpp
index ef3e27a799..92385c4b11 100644
--- a/examples/quick/layouts/main.cpp
+++ b/examples/quick/layouts/main.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 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$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QGuiApplication>
#include <QQmlApplicationEngine>
@@ -56,7 +9,7 @@ int main(int argc, char* argv[])
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
- engine.load(QUrl(QStringLiteral("qrc:///layouts/layouts.qml")));
+ engine.load(QUrl(QStringLiteral("qrc:/qt/qml/layouts/layouts.qml")));
return app.exec();
}
diff --git a/examples/quick/localstorage/CMakeLists.txt b/examples/quick/localstorage/CMakeLists.txt
index 913f64dd1b..cf39d98c20 100644
--- a/examples/quick/localstorage/CMakeLists.txt
+++ b/examples/quick/localstorage/CMakeLists.txt
@@ -1,3 +1,47 @@
-# Generated from localstorage.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-add_subdirectory(localstorage)
+cmake_minimum_required(VERSION 3.16)
+project(localstorage LANGUAGES CXX)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
+
+qt_standard_project_setup(REQUIRES 6.5)
+
+qt_add_executable(localstorageexample
+ WIN32
+ MACOSX_BUNDLE
+ main.cpp
+)
+
+qt_add_qml_module(localstorageexample
+ URI localstorage
+ QML_FILES
+ "Database.js"
+ "Header.qml"
+ "MyDelegate.qml"
+ "MyModel.qml"
+ "localstorage.qml"
+ )
+
+target_link_libraries(localstorageexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
+
+install(TARGETS localstorageexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET localstorageexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/localstorage/Database.js b/examples/quick/localstorage/Database.js
new file mode 100644
index 0000000000..dd66ce8246
--- /dev/null
+++ b/examples/quick/localstorage/Database.js
@@ -0,0 +1,73 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+function dbInit()
+{
+ let db = LocalStorage.openDatabaseSync("Activity_Tracker_DB", "", "Track exercise", 1000000)
+ try {
+ db.transaction(function (tx) {
+ tx.executeSql('CREATE TABLE IF NOT EXISTS trip_log (date text,trip_desc text,distance numeric)')
+ })
+ } catch (err) {
+ console.log("Error creating table in database: " + err)
+ };
+}
+
+function dbGetHandle()
+{
+ try {
+ var db = LocalStorage.openDatabaseSync("Activity_Tracker_DB", "",
+ "Track exercise", 1000000)
+ } catch (err) {
+ console.log("Error opening database: " + err)
+ }
+ return db
+}
+
+function dbInsert(Pdate, Pdesc, Pdistance)
+{
+ let db = dbGetHandle()
+ let rowid = 0;
+ db.transaction(function (tx) {
+ tx.executeSql('INSERT INTO trip_log VALUES(?, ?, ?)',
+ [Pdate, Pdesc, Pdistance])
+ let result = tx.executeSql('SELECT last_insert_rowid()')
+ rowid = result.insertId
+ })
+ return rowid;
+}
+
+function dbReadAll()
+{
+ let db = dbGetHandle()
+ db.transaction(function (tx) {
+ let results = tx.executeSql(
+ 'SELECT rowid,date,trip_desc,distance FROM trip_log order by rowid desc')
+ for (let i = 0; i < results.rows.length; i++) {
+ listModel.append({
+ id: results.rows.item(i).rowid,
+ checked: " ",
+ date: results.rows.item(i).date,
+ trip_desc: results.rows.item(i).trip_desc,
+ distance: results.rows.item(i).distance
+ })
+ }
+ })
+}
+
+function dbUpdate(Pdate, Pdesc, Pdistance, Prowid)
+{
+ let db = dbGetHandle()
+ db.transaction(function (tx) {
+ tx.executeSql(
+ 'update trip_log set date=?, trip_desc=?, distance=? where rowid = ?', [Pdate, Pdesc, Pdistance, Prowid])
+ })
+}
+
+function dbDeleteRow(Prowid)
+{
+ let db = dbGetHandle()
+ db.transaction(function (tx) {
+ tx.executeSql('delete from trip_log where rowid = ?', [Prowid])
+ })
+}
diff --git a/examples/quick/localstorage/localstorage/Header.qml b/examples/quick/localstorage/Header.qml
index 3328a88559..a539452844 100644
--- a/examples/quick/localstorage/localstorage/Header.qml
+++ b/examples/quick/localstorage/Header.qml
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
@@ -55,15 +8,15 @@ import "Database.js" as JS
Item {
id: root
- width: Screen.width / 2
- height: Screen.height / 7
-
required property ListView listView
signal statusMessage(string msg)
+
+ width: Screen.width / 2
+ height: Screen.height / 7
enabled: false
function insertrec() {
- var rowid = parseInt(JS.dbInsert(dateInput.text, descInput.text, distInput.text), 10)
+ const rowid = parseInt(JS.dbInsert(dateInput.text, descInput.text, distInput.text), 10)
if (rowid) {
listView.model.setProperty(listView.currentIndex, "id", rowid)
listView.forceLayout()
@@ -146,13 +99,13 @@ Item {
font.pixelSize: 22
activeFocusOnPress: true
activeFocusOnTab: true
+ Layout.fillWidth: false
ToolTip {
- parent: dateInput
x: parent.width + 3
y: (parent.height - height) / 2
text: qsTr("Date format = 'YYYY-MM-DD'")
- visible: parent.enabled && parent.hovered
+ visible: dateInput.enabled && dateInput.hovered
delay: 1000
}
@@ -160,13 +113,13 @@ Item {
regularExpression: /\d{4}[,.:/-]\d\d?[,.:/-]\d\d?/
}
- onFocusChanged: ()=> {
+ onFocusChanged: function() {
if (!dateInput.focus && !acceptableInput && root.enabled)
root.statusMessage(qsTr("Please fill in the date"));
}
- onEditingFinished: ()=> {
- let regex = /(\d+)[,.:/-](\d+)[,.:/-](\d+)/
+ onEditingFinished: function() {
+ const regex = /(\d+)[,.:/-](\d+)[,.:/-](\d+)/
if (dateInput.text.match(regex))
dateInput.text = dateInput.text.replace(regex, '$1-$2-$3')
}
@@ -174,29 +127,31 @@ Item {
TextField {
id: descInput
+ property string oldString
font.pixelSize: 22
activeFocusOnPress: true
activeFocusOnTab: true
- property string oldString
- onFocusChanged: ()=> { if (focus) oldString = descInput.text; }
- onEditingFinished: ()=> {
- if (descInput.text.length < 8 && descInput.text != descInput.oldString && root.enabled)
+ Layout.fillWidth: false
+ onFocusChanged: if (focus) oldString = descInput.text
+ onEditingFinished: function() {
+ if (descInput.text.length < 8 && descInput.text !== descInput.oldString && root.enabled)
root.statusMessage(qsTr("Enter a description of minimum 8 characters"))
}
}
TextField {
id: distInput
+ property string oldString
font.pixelSize: 22
activeFocusOnPress: true
activeFocusOnTab: true
+ Layout.fillWidth: false
validator: RegularExpressionValidator {
regularExpression: /\d{1,3}/
}
- property string oldString
- onFocusChanged: ()=> { if (focus) oldString = distInput.text; }
- onEditingFinished: ()=> {
- if (distInput.text == "" && distInput.text != distInput.oldString && root.enabled)
+ onFocusChanged: if (focus) oldString = distInput.text
+ onEditingFinished: function() {
+ if (distInput.text === "" && distInput.text !== distInput.oldString && root.enabled)
root.statusMessage(qsTr("Please fill in the distance"))
}
}
diff --git a/examples/quick/localstorage/MyDelegate.qml b/examples/quick/localstorage/MyDelegate.qml
new file mode 100644
index 0000000000..94f78b5ed6
--- /dev/null
+++ b/examples/quick/localstorage/MyDelegate.qml
@@ -0,0 +1,69 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
+
+Item {
+ id: delegate
+
+ required property int index
+ required property int distance
+ required property string trip_desc
+ required property string date
+
+ signal clicked()
+
+ width: ListView.view.width
+ implicitHeight: rDate.implicitHeight * 1.5
+
+ Rectangle {
+ id: baseRec
+ anchors.fill: parent
+ opacity: 0.8
+ color: delegate.index % 2 ? "lightgrey" : "grey"
+ border {
+ width: 2
+ color: Qt.lighter(color)
+ }
+ radius: 5
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: delegate.clicked()
+ }
+
+ RowLayout {
+ anchors.fill: parent
+
+ Label {
+ id: rDate
+ Layout.preferredWidth: 42
+ Layout.alignment: Qt.AlignCenter
+ horizontalAlignment: Text.AlignHCenter
+ text: delegate.date
+ font.pixelSize: 22
+ color: "black"
+ }
+
+ Label {
+ Layout.preferredWidth: 42
+ Layout.alignment: Qt.AlignCenter
+ horizontalAlignment: Text.AlignHCenter
+ text: delegate.trip_desc
+ font.pixelSize: 22
+ color: "black"
+ }
+
+ Label {
+ Layout.preferredWidth: 42
+ Layout.alignment: Qt.AlignCenter
+ horizontalAlignment: Text.AlignHCenter
+ text: delegate.distance
+ font.pixelSize: 22
+ color: "black"
+ }
+ }
+ }
+}
diff --git a/examples/quick/localstorage/MyModel.qml b/examples/quick/localstorage/MyModel.qml
new file mode 100644
index 0000000000..7a1fc5b0da
--- /dev/null
+++ b/examples/quick/localstorage/MyModel.qml
@@ -0,0 +1,11 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.LocalStorage
+import "Database.js" as JS
+
+ListModel {
+ id: listModel
+ Component.onCompleted: JS.dbReadAll()
+}
diff --git a/examples/quick/localstorage/doc/src/localstorage.qdoc b/examples/quick/localstorage/doc/src/localstorage.qdoc
index 144edae2f5..e9596987dc 100644
--- a/examples/quick/localstorage/doc/src/localstorage.qdoc
+++ b/examples/quick/localstorage/doc/src/localstorage.qdoc
@@ -1,32 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Qt Quick Examples - Local Storage
\example localstorage
+ \examplecategory {Data Processing & I/O}
\brief A collection of QML local storage examples.
\borderedimage qml-localstorage-example.png
diff --git a/examples/quick/localstorage/localstorage.pro b/examples/quick/localstorage/localstorage.pro
index dd2eb80250..9709733c13 100644
--- a/examples/quick/localstorage/localstorage.pro
+++ b/examples/quick/localstorage/localstorage.pro
@@ -1,2 +1,9 @@
-TEMPLATE = subdirs
-SUBDIRS += localstorage
+TEMPLATE = app
+
+QT += quick qml
+SOURCES += main.cpp
+RESOURCES += \
+ localstorage.qrc
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/localstorage
+INSTALLS += target
diff --git a/examples/quick/localstorage/localstorage/localstorage.qml b/examples/quick/localstorage/localstorage.qml
index 15710fc55c..3bed3e99df 100644
--- a/examples/quick/localstorage/localstorage/localstorage.qml
+++ b/examples/quick/localstorage/localstorage.qml
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtQuick.Controls
@@ -54,16 +7,19 @@ import QtQuick.Layouts
import QtQuick.LocalStorage
import "Database.js" as JS
+pragma ComponentBehavior: Bound
+
Window {
id: window
+
+ property bool creatingNewEntry: false
+ property bool editingEntry: false
+
visible: true
width: Screen.width / 2
height: Screen.height / 1.8
color: "#161616"
- property bool creatingNewEntry: false
- property bool editingEntry: false
-
Rectangle {
anchors.fill: parent
@@ -81,6 +37,7 @@ Window {
RowLayout {
Button {
text: qsTr("New")
+ Layout.fillWidth: false
onClicked: {
input.initrec_new()
window.creatingNewEntry = true
@@ -89,10 +46,11 @@ Window {
}
Button {
id: saveButton
- enabled: (window.creatingNewEntry || window.editingEntry) && listView.currentIndex != -1
+ enabled: (window.creatingNewEntry || window.editingEntry) && listView.currentIndex !== -1
text: qsTr("Save")
+ Layout.fillWidth: false
onClicked: {
- var insertedRow = false;
+ let insertedRow = false;
if (listView.model.get(listView.currentIndex).id < 1) {
//insert mode
if (input.insertrec()) {
@@ -123,7 +81,8 @@ Window {
Button {
id: editButton
text: qsTr("Edit")
- enabled: !window.creatingNewEntry && !window.editingEntry && listView.currentIndex != -1
+ enabled: !window.creatingNewEntry && !window.editingEntry && listView.currentIndex !== -1
+ Layout.fillWidth: false
onClicked: {
input.editrec(listView.model.get(listView.currentIndex).date,
listView.model.get(listView.currentIndex).trip_desc,
@@ -136,11 +95,12 @@ Window {
Button {
id: deleteButton
text: qsTr("Delete")
- enabled: !window.creatingNewEntry && listView.currentIndex != -1
+ enabled: !window.creatingNewEntry && listView.currentIndex !== -1
+ Layout.fillWidth: false
onClicked: {
JS.dbDeleteRow(listView.model.get(listView.currentIndex).id)
listView.model.remove(listView.currentIndex, 1)
- if (listView.count == 0) {
+ if (listView.count === 0) {
// ListView doesn't automatically set its currentIndex to -1
// when the count becomes 0.
listView.currentIndex = -1
@@ -150,7 +110,8 @@ Window {
Button {
id: cancelButton
text: qsTr("Cancel")
- enabled: (window.creatingNewEntry || window.editingEntry) && listView.currentIndex != -1
+ enabled: (window.creatingNewEntry || window.editingEntry) && listView.currentIndex !== -1
+ Layout.fillWidth: false
onClicked: {
if (listView.model.get(listView.currentIndex).id === 0) {
// This entry had an id of 0, which means it was being created and hadn't
@@ -165,12 +126,13 @@ Window {
}
Button {
text: qsTr("Exit")
+ Layout.fillWidth: false
onClicked: Qt.quit()
}
}
Item {
Layout.fillWidth: true
- height: 5
+ Layout.preferredHeight: 5
}
Label {
Layout.alignment: Qt.AlignCenter
@@ -180,8 +142,8 @@ Window {
Component {
id: highlightBar
Rectangle {
- width: listView.currentItem !== null ? listView.currentItem.width : implicitWidth
- height: listView.currentItem !== null ? listView.currentItem.height : implicitHeight
+ width: listView.currentItem?.width ?? implicitWidth
+ height: listView.currentItem?.height ?? implicitHeight
color: "lightgreen"
}
}
@@ -204,19 +166,23 @@ Window {
header: Component {
RowLayout {
- property var headerTitles: [qsTr("Date"), qsTr("Description"), qsTr("Distance")]
width: ListView.view.width
Repeater {
- model: headerTitles
+ model: [qsTr("Date"), qsTr("Description"), qsTr("Distance")]
delegate: Label {
id: headerTitleDelegate
+
+ required property string modelData
+
Layout.fillWidth: true
Layout.fillHeight: true
Layout.preferredWidth: 1
text: modelData
- font.pointSize: 15
- font.bold: true
- font.underline: true
+ font {
+ pointSize: 15
+ bold: true
+ underline: true
+ }
padding: 12
horizontalAlignment: Label.AlignHCenter
}
@@ -230,7 +196,7 @@ Window {
font.bold: true
font.pointSize: 20
opacity: 0.0
- visible: opacity !== 0 // properly cull item if effectively invisible
+ visible: opacity > 0 // properly cull item if effectively invisible
Layout.alignment: Layout.Center
function displayWarning(text) {
diff --git a/examples/quick/localstorage/localstorage/localstorage.qrc b/examples/quick/localstorage/localstorage.qrc
index a761306f3d..3950613c7a 100644
--- a/examples/quick/localstorage/localstorage/localstorage.qrc
+++ b/examples/quick/localstorage/localstorage.qrc
@@ -1,5 +1,5 @@
<RCC>
- <qresource prefix="/">
+ <qresource prefix="/qt/qml/localstorage">
<file>Header.qml</file>
<file>Database.js</file>
<file>MyModel.qml</file>
diff --git a/examples/quick/localstorage/localstorage/CMakeLists.txt b/examples/quick/localstorage/localstorage/CMakeLists.txt
deleted file mode 100644
index bfb304b1cc..0000000000
--- a/examples/quick/localstorage/localstorage/CMakeLists.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-# Generated from localstorage.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(localstorage LANGUAGES CXX)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/localstorage/localstorage")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(localstorage
- main.cpp
-)
-set_target_properties(localstorage PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(localstorage PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-
-# Resources:
-set(localstorage_resource_files
- "Database.js"
- "Header.qml"
- "MyDelegate.qml"
- "MyModel.qml"
- "localstorage.qml"
-)
-
-qt6_add_resources(localstorage "localstorage"
- PREFIX
- "/"
- FILES
- ${localstorage_resource_files}
-)
-
-install(TARGETS localstorage
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
diff --git a/examples/quick/localstorage/localstorage/Database.js b/examples/quick/localstorage/localstorage/Database.js
deleted file mode 100644
index 6ad684a2bb..0000000000
--- a/examples/quick/localstorage/localstorage/Database.js
+++ /dev/null
@@ -1,120 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-function dbInit()
-{
- var db = LocalStorage.openDatabaseSync("Activity_Tracker_DB", "", "Track exercise", 1000000)
- try {
- db.transaction(function (tx) {
- tx.executeSql('CREATE TABLE IF NOT EXISTS trip_log (date text,trip_desc text,distance numeric)')
- })
- } catch (err) {
- console.log("Error creating table in database: " + err)
- };
-}
-
-function dbGetHandle()
-{
- try {
- var db = LocalStorage.openDatabaseSync("Activity_Tracker_DB", "",
- "Track exercise", 1000000)
- } catch (err) {
- console.log("Error opening database: " + err)
- }
- return db
-}
-
-function dbInsert(Pdate, Pdesc, Pdistance)
-{
- var db = dbGetHandle()
- var rowid = 0;
- db.transaction(function (tx) {
- tx.executeSql('INSERT INTO trip_log VALUES(?, ?, ?)',
- [Pdate, Pdesc, Pdistance])
- var result = tx.executeSql('SELECT last_insert_rowid()')
- rowid = result.insertId
- })
- return rowid;
-}
-
-function dbReadAll()
-{
- var db = dbGetHandle()
- db.transaction(function (tx) {
- var results = tx.executeSql(
- 'SELECT rowid,date,trip_desc,distance FROM trip_log order by rowid desc')
- for (var i = 0; i < results.rows.length; i++) {
- listModel.append({
- id: results.rows.item(i).rowid,
- checked: " ",
- date: results.rows.item(i).date,
- trip_desc: results.rows.item(i).trip_desc,
- distance: results.rows.item(i).distance
- })
- }
- })
-}
-
-function dbUpdate(Pdate, Pdesc, Pdistance, Prowid)
-{
- var db = dbGetHandle()
- db.transaction(function (tx) {
- tx.executeSql(
- 'update trip_log set date=?, trip_desc=?, distance=? where rowid = ?', [Pdate, Pdesc, Pdistance, Prowid])
- })
-}
-
-function dbDeleteRow(Prowid)
-{
- var db = dbGetHandle()
- db.transaction(function (tx) {
- tx.executeSql('delete from trip_log where rowid = ?', [Prowid])
- })
-}
diff --git a/examples/quick/localstorage/localstorage/MyDelegate.qml b/examples/quick/localstorage/localstorage/MyDelegate.qml
deleted file mode 100644
index b715882ab4..0000000000
--- a/examples/quick/localstorage/localstorage/MyDelegate.qml
+++ /dev/null
@@ -1,116 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-import QtQuick.Layouts
-import QtQuick.LocalStorage
-import "Database.js" as JS
-
-Item {
- id: delegate
-
- width: ListView.view.width
- implicitHeight: rDate.implicitHeight * 1.5
-
- required property int index
- required property int distance
- required property string trip_desc
- required property string date
-
- signal clicked()
-
- Rectangle {
- id: baseRec
- anchors.fill: parent
- opacity: 0.8
- color: delegate.index % 2 ? "lightgrey" : "grey"
- border.width: 2
- border.color: Qt.lighter(color)
- radius: 5
-
- MouseArea {
- anchors.fill: parent
- onClicked: delegate.clicked()
- }
-
- RowLayout {
- anchors.fill: parent
-
- Label {
- id: rDate
- Layout.preferredWidth: 42
- Layout.alignment: Qt.AlignCenter
- horizontalAlignment: Text.AlignHCenter
- text: delegate.date
- font.pixelSize: 22
- color: "black"
- }
-
- Label {
- Layout.preferredWidth: 42
- Layout.alignment: Qt.AlignCenter
- horizontalAlignment: Text.AlignHCenter
- text: delegate.trip_desc
- font.pixelSize: 22
- color: "black"
- }
-
- Label {
- Layout.preferredWidth: 42
- Layout.alignment: Qt.AlignCenter
- horizontalAlignment: Text.AlignHCenter
- text: delegate.distance
- font.pixelSize: 22
- color: "black"
- }
- }
- }
-}
diff --git a/examples/quick/localstorage/localstorage/MyModel.qml b/examples/quick/localstorage/localstorage/MyModel.qml
deleted file mode 100644
index 8665778a8c..0000000000
--- a/examples/quick/localstorage/localstorage/MyModel.qml
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.LocalStorage
-import "Database.js" as JS
-
-ListModel {
- id: listModel
- Component.onCompleted: JS.dbReadAll()
-}
diff --git a/examples/quick/localstorage/localstorage/localstorage.pro b/examples/quick/localstorage/localstorage/localstorage.pro
deleted file mode 100644
index 8feca66f28..0000000000
--- a/examples/quick/localstorage/localstorage/localstorage.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-TEMPLATE = app
-
-QT += quick qml
-SOURCES += main.cpp
-RESOURCES += \
- localstorage.qrc
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/localstorage/localstorage
-INSTALLS += target
diff --git a/examples/quick/localstorage/localstorage/main.cpp b/examples/quick/localstorage/localstorage/main.cpp
deleted file mode 100644
index 293c81768a..0000000000
--- a/examples/quick/localstorage/localstorage/main.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-#include <QGuiApplication>
-#include <QQmlApplicationEngine>
-
-int main(int argc, char *argv[])
-{
- QGuiApplication app(argc, argv);
-
- QQmlApplicationEngine engine;
- engine.load(QUrl(QStringLiteral("qrc:/localstorage.qml")));
-
- return app.exec();
-}
diff --git a/examples/quick/localstorage/main.cpp b/examples/quick/localstorage/main.cpp
new file mode 100644
index 0000000000..56c4552bc8
--- /dev/null
+++ b/examples/quick/localstorage/main.cpp
@@ -0,0 +1,14 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+#include <QGuiApplication>
+#include <QQmlApplicationEngine>
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication app(argc, argv);
+
+ QQmlApplicationEngine engine;
+ engine.load(QUrl(QStringLiteral("qrc:/qt/qml/localstorage/localstorage.qml")));
+
+ return app.exec();
+}
diff --git a/examples/quick/models/CMakeLists.txt b/examples/quick/models/CMakeLists.txt
index 6beadd409c..e8756b65ec 100644
--- a/examples/quick/models/CMakeLists.txt
+++ b/examples/quick/models/CMakeLists.txt
@@ -1,5 +1,6 @@
-# Generated from models.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-add_subdirectory(abstractitemmodel)
-add_subdirectory(objectlistmodel)
-add_subdirectory(stringlistmodel)
+qt_internal_add_example(abstractitemmodel)
+qt_internal_add_example(objectlistmodel)
+qt_internal_add_example(stringlistmodel)
diff --git a/examples/quick/models/abstractitemmodel/CMakeLists.txt b/examples/quick/models/abstractitemmodel/CMakeLists.txt
index 992fdd0f8a..3b3ab40025 100644
--- a/examples/quick/models/abstractitemmodel/CMakeLists.txt
+++ b/examples/quick/models/abstractitemmodel/CMakeLists.txt
@@ -1,55 +1,43 @@
-# Generated from abstractitemmodel.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(abstractitemmodel LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup(REQUIRES 6.5)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/models/abstractitemmodel")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Quick)
-
-qt_add_executable(abstractitemmodel
+qt_add_executable(abstractitemmodelexample WIN32 MACOSX_BUNDLE
main.cpp
model.cpp model.h
)
-set_target_properties(abstractitemmodel PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(abstractitemmodel PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
+target_link_libraries(abstractitemmodelexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
# Resources:
-set(abstractitemmodel_resource_files
- "view.qml"
+qt_add_qml_module(abstractitemmodelexample
+ URI abstractitemmodel
+ QML_FILES
+ "view.qml"
)
-qt6_add_resources(abstractitemmodel "abstractitemmodel"
- PREFIX
- "/"
- FILES
- ${abstractitemmodel_resource_files}
+install(TARGETS abstractitemmodelexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-install(TARGETS abstractitemmodel
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+qt_generate_deploy_qml_app_script(
+ TARGET abstractitemmodelexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/models/abstractitemmodel/abstractitemmodel.qrc b/examples/quick/models/abstractitemmodel/abstractitemmodel.qrc
index 4ae861cb3d..bef1041008 100644
--- a/examples/quick/models/abstractitemmodel/abstractitemmodel.qrc
+++ b/examples/quick/models/abstractitemmodel/abstractitemmodel.qrc
@@ -1,5 +1,5 @@
<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
+<qresource prefix="/qt/qml/abstractitemmodel">
<file>view.qml</file>
</qresource>
</RCC>
diff --git a/examples/quick/models/abstractitemmodel/doc/src/abstractitemmodel-example.qdoc b/examples/quick/models/abstractitemmodel/doc/src/abstractitemmodel-example.qdoc
index 114a04c8f1..6f627d050c 100644
--- a/examples/quick/models/abstractitemmodel/doc/src/abstractitemmodel-example.qdoc
+++ b/examples/quick/models/abstractitemmodel/doc/src/abstractitemmodel-example.qdoc
@@ -1,34 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\example models/abstractitemmodel
\title Models and Views: AbstractItemModel Example
\brief Shows how to use a QAbstractItemModel subclass as a model in QML.
+ \examplecategory {User Interface Components}
\image qml-abstractitemmodel-example.png
*/
diff --git a/examples/quick/models/abstractitemmodel/main.cpp b/examples/quick/models/abstractitemmodel/main.cpp
index dd5b368c6b..a391b5ce67 100644
--- a/examples/quick/models/abstractitemmodel/main.cpp
+++ b/examples/quick/models/abstractitemmodel/main.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "model.h"
#include <QGuiApplication>
@@ -70,7 +23,7 @@ int main(int argc, char ** argv)
view.setResizeMode(QQuickView::SizeRootObjectToView);
view.setInitialProperties({{"model", QVariant::fromValue(&model)}});
//![0]
- view.setSource(QUrl("qrc:view.qml"));
+ view.setSource(QUrl("qrc:/qt/qml/abstractitemmodel/view.qml"));
view.show();
return app.exec();
diff --git a/examples/quick/models/abstractitemmodel/model.cpp b/examples/quick/models/abstractitemmodel/model.cpp
index 9d0032e34c..a9b8ff9f2c 100644
--- a/examples/quick/models/abstractitemmodel/model.cpp
+++ b/examples/quick/models/abstractitemmodel/model.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "model.h"
Animal::Animal(const QString &type, const QString &size)
diff --git a/examples/quick/models/abstractitemmodel/model.h b/examples/quick/models/abstractitemmodel/model.h
index 186388c96f..d4a5e738a7 100644
--- a/examples/quick/models/abstractitemmodel/model.h
+++ b/examples/quick/models/abstractitemmodel/model.h
@@ -1,52 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#ifndef MODEL_H
+#define MODEL_H
+
#include <QAbstractListModel>
#include <QStringList>
@@ -75,7 +32,7 @@ public:
SizeRole
};
- AnimalModel(QObject *parent = 0);
+ AnimalModel(QObject *parent = nullptr);
//![1]
void addAnimal(const Animal &animal);
@@ -92,4 +49,4 @@ private:
};
//![2]
-
+#endif // MODEL_H
diff --git a/examples/quick/models/abstractitemmodel/view.qml b/examples/quick/models/abstractitemmodel/view.qml
index 2b9f87df92..7d2b3ab976 100644
--- a/examples/quick/models/abstractitemmodel/view.qml
+++ b/examples/quick/models/abstractitemmodel/view.qml
@@ -1,53 +1,6 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-import QtQuick 2.0
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+import QtQuick
//![0]
ListView {
diff --git a/examples/quick/models/objectlistmodel/CMakeLists.txt b/examples/quick/models/objectlistmodel/CMakeLists.txt
index 23b4cf7ed5..8e74bb1883 100644
--- a/examples/quick/models/objectlistmodel/CMakeLists.txt
+++ b/examples/quick/models/objectlistmodel/CMakeLists.txt
@@ -1,55 +1,43 @@
-# Generated from objectlistmodel.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(objectlistmodel LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup(REQUIRES 6.5)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/models/objectlistmodel")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Quick)
-
-qt_add_executable(objectlistmodel
+qt_add_executable(objectlistmodelexample WIN32 MACOSX_BUNDLE
dataobject.cpp dataobject.h
main.cpp
)
-set_target_properties(objectlistmodel PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(objectlistmodel PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
+target_link_libraries(objectlistmodelexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
# Resources:
-set(objectlistmodel_resource_files
- "view.qml"
+qt_add_qml_module(objectlistmodelexample
+ URI objectlistmodel
+ QML_FILES
+ "view.qml"
)
-qt6_add_resources(objectlistmodel "objectlistmodel"
- PREFIX
- "/"
- FILES
- ${objectlistmodel_resource_files}
+install(TARGETS objectlistmodelexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-install(TARGETS objectlistmodel
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+qt_generate_deploy_qml_app_script(
+ TARGET objectlistmodelexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/models/objectlistmodel/dataobject.cpp b/examples/quick/models/objectlistmodel/dataobject.cpp
index 6963d75c42..cf8dd3ccef 100644
--- a/examples/quick/models/objectlistmodel/dataobject.cpp
+++ b/examples/quick/models/objectlistmodel/dataobject.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QDebug>
#include "dataobject.h"
diff --git a/examples/quick/models/objectlistmodel/dataobject.h b/examples/quick/models/objectlistmodel/dataobject.h
index 6033ff40c4..93aaa57619 100644
--- a/examples/quick/models/objectlistmodel/dataobject.h
+++ b/examples/quick/models/objectlistmodel/dataobject.h
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef DATAOBJECT_H
#define DATAOBJECT_H
diff --git a/examples/quick/models/objectlistmodel/doc/src/objectlistmodel-example.qdoc b/examples/quick/models/objectlistmodel/doc/src/objectlistmodel-example.qdoc
index 2c9f0f1459..2ceec9376d 100644
--- a/examples/quick/models/objectlistmodel/doc/src/objectlistmodel-example.qdoc
+++ b/examples/quick/models/objectlistmodel/doc/src/objectlistmodel-example.qdoc
@@ -1,34 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\example models/objectlistmodel
\title Models and Views: Object ListModel Example
\brief Shows how to use a QList<QObject*> as a model in QML.
+ \examplecategory {User Interface Components}
\image qml-objectlistmodel-example.png
*/
diff --git a/examples/quick/models/objectlistmodel/main.cpp b/examples/quick/models/objectlistmodel/main.cpp
index 8fbe7c183c..584e091431 100644
--- a/examples/quick/models/objectlistmodel/main.cpp
+++ b/examples/quick/models/objectlistmodel/main.cpp
@@ -1,54 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QGuiApplication>
+#include <QList>
#include <qqmlengine.h>
#include <qqmlcontext.h>
@@ -68,21 +22,36 @@ int main(int argc, char ** argv)
{
QGuiApplication app(argc, argv);
- QList<QObject *> dataList = {
- new DataObject("Item 1", "red"),
- new DataObject("Item 2", "green"),
- new DataObject("Item 3", "blue"),
- new DataObject("Item 4", "yellow")
- };
+ const QStringList colorList = {"red",
+ "green",
+ "blue",
+ "yellow"};
+
+ const QStringList moduleList = {"Core", "GUI", "Multimedia", "Multimedia Widgets", "Network",
+ "QML", "Quick", "Quick Controls", "Quick Dialogs",
+ "Quick Layouts", "Quick Test", "SQL", "Widgets", "3D",
+ "Android Extras", "Bluetooth", "Concurrent", "D-Bus",
+ "Gamepad", "Graphical Effects", "Help", "Image Formats",
+ "Location", "Mac Extras", "NFC", "OpenGL", "Platform Headers",
+ "Positioning", "Print Support", "Purchasing", "Quick Extras",
+ "Quick Timeline", "Quick Widgets", "Remote Objects", "Script",
+ "SCXML", "Script Tools", "Sensors", "Serial Bus",
+ "Serial Port", "Speech", "SVG", "UI Tools", "WebEngine",
+ "WebSockets", "WebView", "Windows Extras", "XML",
+ "XML Patterns", "Charts", "Network Authorization",
+ "Virtual Keyboard", "Quick 3D", "Quick WebGL"};
+
+ QList<QObject *> dataList;
+ for (const QString &module : moduleList)
+ dataList.append(new DataObject("Qt " + module, colorList.at(rand() % colorList.length())));
QQuickView view;
view.setResizeMode(QQuickView::SizeRootObjectToView);
view.setInitialProperties({{ "model", QVariant::fromValue(dataList) }});
//![0]
- view.setSource(QUrl("qrc:view.qml"));
+ view.setSource(QUrl("qrc:/qt/qml/objectlistmodel/view.qml"));
view.show();
return app.exec();
}
-
diff --git a/examples/quick/models/objectlistmodel/objectlistmodel.qrc b/examples/quick/models/objectlistmodel/objectlistmodel.qrc
index 17e9301471..7552b9e751 100644
--- a/examples/quick/models/objectlistmodel/objectlistmodel.qrc
+++ b/examples/quick/models/objectlistmodel/objectlistmodel.qrc
@@ -1,5 +1,5 @@
<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
+<qresource prefix="/qt/qml/objectlistmodel">
<file>view.qml</file>
</qresource>
</RCC>
diff --git a/examples/quick/models/objectlistmodel/view.qml b/examples/quick/models/objectlistmodel/view.qml
index ba0c905e1e..5dd4844b19 100644
--- a/examples/quick/models/objectlistmodel/view.qml
+++ b/examples/quick/models/objectlistmodel/view.qml
@@ -1,66 +1,22 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
+import QtQuick.Controls
//![0]
ListView {
- width: 100; height: 100
+ id: listview
+ width: 200; height: 320
required model
+ ScrollBar.vertical: ScrollBar { }
delegate: Rectangle {
+ width: listview.width; height: 25
+
required color
required property string name
- height: 25
- width: 100
Text { text: parent.name }
}
}
diff --git a/examples/quick/models/stringlistmodel/CMakeLists.txt b/examples/quick/models/stringlistmodel/CMakeLists.txt
index acf6be6981..bdbacace99 100644
--- a/examples/quick/models/stringlistmodel/CMakeLists.txt
+++ b/examples/quick/models/stringlistmodel/CMakeLists.txt
@@ -1,54 +1,42 @@
-# Generated from stringlistmodel.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(stringlistmodel LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup(REQUIRES 6.5)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/models/stringlistmodel")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Quick)
-
-qt_add_executable(stringlistmodel
+qt_add_executable(stringlistmodelexample WIN32 MACOSX_BUNDLE
main.cpp
)
-set_target_properties(stringlistmodel PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(stringlistmodel PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
+target_link_libraries(stringlistmodelexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
# Resources:
-set(stringlistmodel_resource_files
- "view.qml"
+qt_add_qml_module(stringlistmodelexample
+ URI stringlistmodel
+ QML_FILES
+ "view.qml"
)
-qt6_add_resources(stringlistmodel "stringlistmodel"
- PREFIX
- "/"
- FILES
- ${stringlistmodel_resource_files}
+install(TARGETS stringlistmodelexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-install(TARGETS stringlistmodel
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+qt_generate_deploy_qml_app_script(
+ TARGET stringlistmodelexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/models/stringlistmodel/doc/src/stringlistmodel-example.qdoc b/examples/quick/models/stringlistmodel/doc/src/stringlistmodel-example.qdoc
index 3d2fd8cb95..3b00a0e211 100644
--- a/examples/quick/models/stringlistmodel/doc/src/stringlistmodel-example.qdoc
+++ b/examples/quick/models/stringlistmodel/doc/src/stringlistmodel-example.qdoc
@@ -1,34 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\example models/stringlistmodel
\title Models and Views: String ListModel Example
\brief Shows how to use a QStringList as a model in QML.
+ \examplecategory {User Interface Components}
\image qml-stringlistmodel-example.png
*/
diff --git a/examples/quick/models/stringlistmodel/main.cpp b/examples/quick/models/stringlistmodel/main.cpp
index d9de69b3aa..2f2d4b223d 100644
--- a/examples/quick/models/stringlistmodel/main.cpp
+++ b/examples/quick/models/stringlistmodel/main.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QGuiApplication>
#include <QStringList>
@@ -79,7 +32,7 @@ int main(int argc, char ** argv)
view.setInitialProperties({{ "model", QVariant::fromValue(dataList) }});
//![0]
- view.setSource(QUrl("qrc:view.qml"));
+ view.setSource(QUrl("qrc:/qt/qml/stringlistmodel/view.qml"));
view.show();
return app.exec();
diff --git a/examples/quick/models/stringlistmodel/stringlistmodel.qrc b/examples/quick/models/stringlistmodel/stringlistmodel.qrc
index 17e9301471..fa7c643b44 100644
--- a/examples/quick/models/stringlistmodel/stringlistmodel.qrc
+++ b/examples/quick/models/stringlistmodel/stringlistmodel.qrc
@@ -1,5 +1,5 @@
<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
+<qresource prefix="/qt/qml/stringlistmodel">
<file>view.qml</file>
</qresource>
</RCC>
diff --git a/examples/quick/models/stringlistmodel/view.qml b/examples/quick/models/stringlistmodel/view.qml
index e392284d0f..c94987a356 100644
--- a/examples/quick/models/stringlistmodel/view.qml
+++ b/examples/quick/models/stringlistmodel/view.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
//![0]
ListView {
diff --git a/examples/quick/mousearea/CMakeLists.txt b/examples/quick/mousearea/CMakeLists.txt
index 941f02b613..b78d6c9157 100644
--- a/examples/quick/mousearea/CMakeLists.txt
+++ b/examples/quick/mousearea/CMakeLists.txt
@@ -1,55 +1,43 @@
-# Generated from mousearea.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(mousearea LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup(REQUIRES 6.5)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/mousearea")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(mousearea
+qt_add_executable(mouseareaexample WIN32 MACOSX_BUNDLE
main.cpp
)
-set_target_properties(mousearea PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(mousearea PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
+target_link_libraries(mouseareaexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
# Resources:
-set(mousearea_resource_files
- "mousearea-wheel-example.qml"
- "mousearea.qml"
+qt_add_qml_module(mouseareaexample
+ URI mousearea
+ QML_FILES
+ "mousearea-wheel-example.qml"
+ "mousearea.qml"
)
-qt6_add_resources(mousearea "mousearea"
- PREFIX
- "/mousearea"
- FILES
- ${mousearea_resource_files}
+install(TARGETS mouseareaexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-install(TARGETS mousearea
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+qt_generate_deploy_qml_app_script(
+ TARGET mouseareaexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/mousearea/doc/src/mousearea.qdoc b/examples/quick/mousearea/doc/src/mousearea.qdoc
index 3911764614..3ff2422747 100644
--- a/examples/quick/mousearea/doc/src/mousearea.qdoc
+++ b/examples/quick/mousearea/doc/src/mousearea.qdoc
@@ -1,35 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Qt Quick Examples - MouseArea
\example mousearea
\brief This is an example of the MouseArea type in QML.
\image qml-mousearea-example.png
\ingroup qtquickexamples
+ \examplecategory {Graphics}
\e MouseArea example shows how to respond to clicks and drags with a
\l MouseArea. For more information, visit
diff --git a/examples/quick/mousearea/main.cpp b/examples/quick/mousearea/main.cpp
index 6113ab1ad8..e729454ef6 100644
--- a/examples/quick/mousearea/main.cpp
+++ b/examples/quick/mousearea/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(mousearea/mousearea)
diff --git a/examples/quick/mousearea/mousearea-wheel-example.qml b/examples/quick/mousearea/mousearea-wheel-example.qml
index 5e8fba3ac3..145c69fcef 100644
--- a/examples/quick/mousearea/mousearea-wheel-example.qml
+++ b/examples/quick/mousearea/mousearea-wheel-example.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
Rectangle {
height: 700
@@ -74,11 +27,11 @@ Rectangle {
MouseArea {
anchors.fill: parent
- onWheel: {
+ onWheel: (wheel) => {
if (wheel.modifiers & Qt.ControlModifier) {
- parent.scaleFactor += 0.2 * wheel.angleDelta.y / 120;
+ parent.scaleFactor += 0.2 * wheel.angleDelta.y / 120
if (parent.scaleFactor < 0)
- parent.scaleFactor = 0;
+ parent.scaleFactor = 0
}
}
}
@@ -87,9 +40,11 @@ Rectangle {
}
Text {
- anchors.bottom: parent.bottom
- anchors.horizontalCenter: parent.horizontalCenter
+ anchors {
+ bottom: parent.bottom
+ horizontalCenter: parent.horizontalCenter
+ }
color: "#FFD700"
- text: "Rotate the mouse wheel pressing <Control> to resize the squares."
+ text: qsTr("Rotate the mouse wheel pressing <Control> to resize the squares.")
}
}
diff --git a/examples/quick/mousearea/mousearea.qml b/examples/quick/mousearea/mousearea.qml
index ff792f952d..b220b47a9e 100644
--- a/examples/quick/mousearea/mousearea.qml
+++ b/examples/quick/mousearea/mousearea.qml
@@ -1,67 +1,30 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.4
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
Rectangle {
id: box
- width: 320; height: 480
+ width: 320
+ height: 480
Rectangle {
id: redSquare
- width: 120; height: 120
- anchors.top: parent.top; anchors.left: parent.left; anchors.margins: 10
+ width: 120
+ height: 120
+ anchors {
+ top: parent.top
+ left: parent.left
+ margins: 10
+ }
color: "red"
opacity: redSquareMouseArea.containsPress ? 0.6 : 1.0
- Text { text: "Click"; font.pixelSize: 16; anchors.centerIn: parent }
+ Text {
+ text: qsTr("Click")
+ font.pixelSize: 16
+ anchors.centerIn: parent
+ }
MouseArea {
id: redSquareMouseArea
@@ -73,92 +36,99 @@ Rectangle {
// Value 'All.Buttons' is eqivalent to:
// 'Qt::LeftButton | Qt::RightButton | Qt::MiddleButton .... | Qt::ExtraButton24'
- onEntered: info.text = 'Entered'
- onExited: info.text = 'Exited (pressed=' + pressed + ')'
+ onEntered: info.text = qsTr('Entered')
+ onExited: info.text = qsTr('Exited (pressed=') + pressed + ')'
onPressed: (mouse) => {
if (mouse.button == Qt.LeftButton)
- buttonID = 'LeftButton'
+ buttonID = qsTr('LeftButton')
else if (mouse.button == Qt.RightButton)
- buttonID = 'RightButton'
+ buttonID = qsTr('RightButton')
else if (mouse.button == Qt.MiddleButton)
- buttonID = 'MiddleButton'
+ buttonID = qsTr('MiddleButton')
else if (mouse.button == Qt.BackButton)
- buttonID = 'BackButton'
+ buttonID = qsTr('BackButton')
else if (mouse.button == Qt.ForwardButton)
- buttonID = 'ForwardButton'
+ buttonID = qsTr('ForwardButton')
else if (mouse.button == Qt.TaskButton)
- buttonID = 'TaskButton'
+ buttonID = qsTr('TaskButton')
else if (mouse.button == Qt.ExtraButton4)
- buttonID = 'ExtraButton4'
+ buttonID = qsTr('ExtraButton4')
else if (mouse.button == Qt.ExtraButton5)
- buttonID = 'ExtraButton5'
+ buttonID = qsTr('ExtraButton5')
else if (mouse.button == Qt.ExtraButton6)
- buttonID = 'ExtraButton6'
+ buttonID = qsTr('ExtraButton6')
else if (mouse.button == Qt.ExtraButton7)
- buttonID = 'ExtraButton7'
+ buttonID = qsTr('ExtraButton7')
else if (mouse.button == Qt.ExtraButton8)
- buttonID = 'ExtraButton8'
+ buttonID = qsTr('ExtraButton8')
else if (mouse.button == Qt.ExtraButton9)
- buttonID = 'ExtraButton9'
+ buttonID = qsTr('ExtraButton9')
else if (mouse.button == Qt.ExtraButton10)
- buttonID = 'ExtraButton10'
+ buttonID = qsTr('ExtraButton10')
else if (mouse.button == Qt.ExtraButton11)
- buttonID = 'ExtraButton11'
+ buttonID = qsTr('ExtraButton11')
else if (mouse.button == Qt.ExtraButton12)
- buttonID = 'ExtraButton12'
+ buttonID = qsTr('ExtraButton12')
else if (mouse.button == Qt.ExtraButton13)
- buttonID = 'ExtraButton13'
+ buttonID = qsTr('ExtraButton13')
else if (mouse.button == Qt.ExtraButton14)
- buttonID = 'ExtraButton14'
+ buttonID = qsTr('ExtraButton14')
else if (mouse.button == Qt.ExtraButton15)
- buttonID = 'ExtraButton15'
+ buttonID = qsTr('ExtraButton15')
else if (mouse.button == Qt.ExtraButton16)
- buttonID = 'ExtraButton16'
+ buttonID = qsTr('ExtraButton16')
else if (mouse.button == Qt.ExtraButton17)
- buttonID = 'ExtraButton17'
+ buttonID = qsTr('ExtraButton17')
else if (mouse.button == Qt.ExtraButton18)
- buttonID = 'ExtraButton18'
+ buttonID = qsTr('ExtraButton18')
else if (mouse.button == Qt.ExtraButton19)
- buttonID = 'ExtraButton19'
+ buttonID = qsTr('ExtraButton19')
else if (mouse.button == Qt.ExtraButton20)
- buttonID = 'ExtraButton20'
+ buttonID = qsTr('ExtraButton20')
else if (mouse.button == Qt.ExtraButton21)
- buttonID = 'ExtraButton21'
+ buttonID = qsTr('ExtraButton21')
else if (mouse.button == Qt.ExtraButton22)
- buttonID = 'ExtraButton22'
+ buttonID = qsTr('ExtraButton22')
else if (mouse.button == Qt.ExtraButton23)
- buttonID = 'ExtraButton23'
+ buttonID = qsTr('ExtraButton23')
else if (mouse.button == Qt.ExtraButton24)
- buttonID = 'ExtraButton24'
+ buttonID = qsTr('ExtraButton24')
- info.text = 'Pressed (' + buttonID + ' shift='
- + (mouse.modifiers & Qt.ShiftModifier ? 'true' : 'false') + ')'
- var posInBox = redSquare.mapToItem(box, mouse.x, mouse.y)
- posInfo.text = + mouse.x + ',' + mouse.y + ' in square'
- + ' (' + posInBox.x + ',' + posInBox.y + ' in window)'
+ info.text = qsTr('Pressed (') + buttonID + qsTr(' shift=')
+ + (mouse.modifiers & Qt.ShiftModifier ? qsTr('true') : qsTr('false')) + ')'
+ const posInBox = redSquare.mapToItem(box, mouse.x, mouse.y)
+ posInfo.text = + mouse.x + ',' + mouse.y + qsTr(' in square')
+ + ' (' + posInBox.x + ',' + posInBox.y + qsTr(' in window)')
}
onReleased: (mouse) => {
- btn.text = 'Released (isClick=' + mouse.isClick + ' wasHeld=' + mouse.wasHeld + ')'
+ btn.text = qsTr('Released (isClick=') + mouse.isClick + qsTr(' wasHeld=') + mouse.wasHeld + ')'
posInfo.text = ''
}
//! [clicks]
- onPressAndHold: btn.text = 'Press and hold'
- onClicked: (mouse) => { btn.text = 'Clicked (wasHeld=' + mouse.wasHeld + ')' }
- onDoubleClicked: btn.text = 'Double clicked'
+ onPressAndHold: btn.text = qsTr('Press and hold')
+ onClicked: (mouse) => { btn.text = qsTr('Clicked (wasHeld=') + mouse.wasHeld + ')' }
+ onDoubleClicked: btn.text = qsTr('Double clicked')
//! [clicks]
}
}
Rectangle {
id: blueSquare
- width: 120; height: 120
- x: box.width - width - 10; y: 10 // making this item draggable, so don't use anchors
+ width: 120
+ height: 120
+ x: box.width - width - 10
+ y: 10 // making this item draggable, so don't use anchors
color: "blue"
- Text { text: "Drag"; font.pixelSize: 16; color: "white"; anchors.centerIn: parent }
+ Text {
+ text: qsTr("Drag")
+ font.pixelSize: 16
+ color: "white"
+ anchors.centerIn: parent
+ }
MouseArea {
anchors.fill: parent
@@ -175,18 +145,30 @@ Rectangle {
Text {
id: info
- anchors.bottom: btn.top; anchors.horizontalCenter: parent.horizontalCenter; anchors.margins: 20
+ anchors{
+ bottom: btn.top
+ horizontalCenter: parent.horizontalCenter
+ margins: 20
+ }
onTextChanged: console.log(text)
}
Text {
id: btn
- anchors.bottom: posInfo.top; anchors.horizontalCenter: parent.horizontalCenter; anchors.margins: 20
+ anchors {
+ bottom: posInfo.top
+ horizontalCenter: parent.horizontalCenter
+ margins: 20
+ }
}
Text {
id: posInfo
- anchors.bottom: parent.bottom; anchors.horizontalCenter: parent.horizontalCenter; anchors.margins: 20
+ anchors {
+ bottom: parent.bottom
+ horizontalCenter: parent.horizontalCenter
+ margins: 20
+ }
}
}
diff --git a/examples/quick/mousearea/mousearea.qrc b/examples/quick/mousearea/mousearea.qrc
index 23d30aa37c..7c6545b56d 100644
--- a/examples/quick/mousearea/mousearea.qrc
+++ b/examples/quick/mousearea/mousearea.qrc
@@ -1,5 +1,5 @@
<RCC>
- <qresource prefix="/mousearea">
+ <qresource prefix="/qt/qml/mousearea">
<file>mousearea.qml</file>
<file>mousearea-wheel-example.qml</file>
</qresource>
diff --git a/examples/quick/multieffect/CMakeLists.txt b/examples/quick/multieffect/CMakeLists.txt
new file mode 100644
index 0000000000..802cb16eea
--- /dev/null
+++ b/examples/quick/multieffect/CMakeLists.txt
@@ -0,0 +1,5 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+qt_internal_add_example(itemswitcher)
+qt_internal_add_example(testbed)
diff --git a/examples/quick/multieffect/itemswitcher/CMakeLists.txt b/examples/quick/multieffect/itemswitcher/CMakeLists.txt
new file mode 100644
index 0000000000..cb2043d023
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/CMakeLists.txt
@@ -0,0 +1,70 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(itemswitcher LANGUAGES CXX)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick QuickControls2)
+
+qt_standard_project_setup(REQUIRES 6.5)
+
+add_subdirectory("../../shared" "shared")
+
+qt_add_executable(itemswitcherexample WIN32 MACOSX_BUNDLE
+ main.cpp
+)
+
+target_link_libraries(itemswitcherexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+ Qt6::QuickControls2
+)
+
+add_dependencies(itemswitcherexample itemswitcher_shared)
+
+# Resources:
+qt_add_qml_module(itemswitcherexample
+ URI itemswitcher
+ QML_FILES
+ "qml/main.qml"
+ "qml/PagesView.qml"
+ "qml/SwitchEffect3DFlip.qml"
+ "qml/SwitchEffectBlur.qml"
+ "qml/SwitchEffectStars.qml"
+ "qml/ItemSwitcher.qml"
+ "qml/PagesItem.qml"
+ "qml/SettingsView.qml"
+ "qml/SwitchEffectBlinds.qml"
+ "qml/SwitchEffectHeart.qml"
+ "qml/SwitchEffectThunder.qml"
+ "qml/SettingsComponentButton.qml"
+ "qml/SettingsComponentSlider.qml"
+ RESOURCES
+ "qml/images/background.png"
+ "qml/images/hblinds.png"
+ "qml/images/heart.png"
+ "qml/images/quit_coding.png"
+ "qml/images/smoke.png"
+ "qml/images/star.png"
+ "qml/images/stripes.png"
+ "qml/images/arrow.png"
+ "qml/images/Built_with_Qt.png"
+ "qml/images/Built_with_Qt_RGB_logo.png"
+)
+
+install(TARGETS itemswitcherexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET itemswitcherexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/multieffect/itemswitcher/doc/images/qml-multieffectitemswitcher-example.jpg b/examples/quick/multieffect/itemswitcher/doc/images/qml-multieffectitemswitcher-example.jpg
new file mode 100644
index 0000000000..d1d3393e3f
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/doc/images/qml-multieffectitemswitcher-example.jpg
Binary files differ
diff --git a/examples/quick/multieffect/itemswitcher/doc/src/itemswitcher.qdoc b/examples/quick/multieffect/itemswitcher/doc/src/itemswitcher.qdoc
new file mode 100644
index 0000000000..f5588cb71e
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/doc/src/itemswitcher.qdoc
@@ -0,0 +1,16 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+/*!
+ \title Qt Quick Examples - MultiEffect Item Switcher
+ \example multieffect/itemswitcher
+ \image qml-multieffectitemswitcher-example.jpg
+ \brief Demonstrates MultiEffect usage.
+ \ingroup qtquickexamples
+ \examplecategory {Graphics}
+
+ This example demonstrates advanced usage of the MultiEffect type, which
+ offers a simple, efficient solution for applying effects such as blur, drop
+ shadow, or colorize to an Item and its children.
+
+ \include examples-run.qdocinc
+*/
diff --git a/examples/quick/multieffect/itemswitcher/itemswitcher.pro b/examples/quick/multieffect/itemswitcher/itemswitcher.pro
new file mode 100644
index 0000000000..f1ab3e381b
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/itemswitcher.pro
@@ -0,0 +1,10 @@
+TEMPLATE = app
+
+QT += quick qml
+QT += quickcontrols2
+SOURCES += main.cpp
+RESOURCES += \
+ qml.qrc
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/multieffect/itemswitcher
+INSTALLS += target
diff --git a/examples/quick/multieffect/itemswitcher/main.cpp b/examples/quick/multieffect/itemswitcher/main.cpp
new file mode 100644
index 0000000000..a7d7046411
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/main.cpp
@@ -0,0 +1,4 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+#include "../../shared/shared.h"
+DECLARATIVE_EXAMPLE_MAIN(itemswitcher/qml/main)
diff --git a/examples/quick/multieffect/itemswitcher/qml.qrc b/examples/quick/multieffect/itemswitcher/qml.qrc
new file mode 100644
index 0000000000..3ccc23502a
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/qml.qrc
@@ -0,0 +1,27 @@
+<RCC>
+ <qresource prefix="/qt/qml/itemswitcher">
+ <file>qml/ItemSwitcher.qml</file>
+ <file>qml/main.qml</file>
+ <file>qml/SwitchEffectBlur.qml</file>
+ <file>qml/SwitchEffectBlinds.qml</file>
+ <file>qml/images/hblinds.png</file>
+ <file>qml/SwitchEffectHeart.qml</file>
+ <file>qml/images/heart.png</file>
+ <file>qml/SwitchEffectStars.qml</file>
+ <file>qml/images/star.png</file>
+ <file>qml/PagesView.qml</file>
+ <file>qml/PagesItem.qml</file>
+ <file>qml/SwitchEffectThunder.qml</file>
+ <file>qml/images/stripes.png</file>
+ <file>qml/images/background.png</file>
+ <file>qml/SettingsView.qml</file>
+ <file>qml/images/quit_coding.png</file>
+ <file>qml/images/smoke.png</file>
+ <file>qml/SwitchEffect3DFlip.qml</file>
+ <file>qml/SettingsComponentButton.qml</file>
+ <file>qml/SettingsComponentSlider.qml</file>
+ <file>qml/images/arrow.png</file>
+ <file>qml/images/Built_with_Qt.png</file>
+ <file>qml/images/Built_with_Qt_RGB_logo.png</file>
+ </qresource>
+</RCC>
diff --git a/examples/quick/multieffect/itemswitcher/qml/ItemSwitcher.qml b/examples/quick/multieffect/itemswitcher/qml/ItemSwitcher.qml
new file mode 100644
index 0000000000..eb405749be
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/qml/ItemSwitcher.qml
@@ -0,0 +1,57 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Item {
+ id: rootItem
+
+ property var sourceItems: []
+
+ property Item fromItem
+ property Item toItem
+
+ property var effect
+
+ property int currentIndex: 0
+ property int previousIndex: 0
+ property real inAnimation: 0
+ readonly property real outAnimation: 1.0 - inAnimation
+ // Duration of switch animation, in ms
+ property int duration: 1500
+
+ property bool _initialized: false
+
+ onCurrentIndexChanged: {
+ fromItem = sourceItems[previousIndex];
+ toItem = sourceItems[currentIndex];
+ if (_initialized)
+ switchAnimation.restart();
+ previousIndex = currentIndex;
+ }
+
+ // Initialize the items and currentIndex
+ Timer {
+ running: true
+ interval: 0
+ onTriggered: {
+ fromItem = sourceItems[previousIndex];
+ toItem = sourceItems[currentIndex];
+ previousIndex = currentIndex;
+ _initialized = true;
+ }
+ }
+
+ SequentialAnimation {
+ id: switchAnimation
+ alwaysRunToEnd: true
+ NumberAnimation {
+ target: rootItem
+ property: "inAnimation"
+ from: 0
+ to: 1
+ duration: rootItem.duration
+ easing.type: Easing.InOutQuad
+ }
+ }
+}
diff --git a/examples/quick/multieffect/itemswitcher/qml/PagesItem.qml b/examples/quick/multieffect/itemswitcher/qml/PagesItem.qml
new file mode 100644
index 0000000000..87b39d4947
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/qml/PagesItem.qml
@@ -0,0 +1,49 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Item {
+ id: rootItem
+
+ property Item source
+ property bool selected: false
+ property string text
+
+ signal clicked
+
+ Rectangle {
+ anchors.fill: parent
+ color: "#000000"
+ border.color: "#f0f0f0"
+ opacity: rootItem.selected ? 0.4 : 0
+ Behavior on opacity {
+ NumberAnimation {
+ duration: 400
+ easing.type: Easing.InOutQuad
+ }
+ }
+ }
+
+ ShaderEffectSource {
+ anchors.fill: parent
+ anchors.margins: 10
+ sourceItem: rootItem.source
+ smooth: true
+ mipmap: true
+ }
+ Text {
+ anchors.centerIn: parent
+ visible: rootItem.text != ""
+ text: rootItem.text
+ font.pixelSize: 14 * dp
+ color: "#ffffff"
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ rootItem.clicked();
+ }
+ }
+}
diff --git a/examples/quick/multieffect/itemswitcher/qml/PagesView.qml b/examples/quick/multieffect/itemswitcher/qml/PagesView.qml
new file mode 100644
index 0000000000..b6e5c45a94
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/qml/PagesView.qml
@@ -0,0 +1,30 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Item {
+ id: rootItem
+
+ property real itemSize: 120 * dp
+ property real margin: 10 * dp
+
+ default property alias contents: contentItem.children
+
+ width: contentItem.width + 2 * margin
+ height: itemSize + 2 * margin
+
+ Rectangle {
+ anchors.fill: parent
+ color: "#606060"
+ border.color: "#f0f0f0"
+ border.width: 1
+ opacity: 0.4
+ }
+ Row {
+ id: contentItem
+ x: margin
+ y: margin
+ spacing: margin
+ }
+}
diff --git a/examples/quick/multieffect/itemswitcher/qml/SettingsComponentButton.qml b/examples/quick/multieffect/itemswitcher/qml/SettingsComponentButton.qml
new file mode 100644
index 0000000000..26a0085d8a
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/qml/SettingsComponentButton.qml
@@ -0,0 +1,35 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Item {
+ id: rootItem
+
+ property alias text: textItem.text
+ property bool selected: false
+
+ signal clicked
+
+ width: parent.width
+ height: 40 * dp
+ Rectangle {
+ anchors.fill: parent
+ color: "#606060"
+ border.color: "#d0d0d0"
+ border.width: 1
+ opacity: selected ? 0.8 : 0.4
+ }
+ Text {
+ id: textItem
+ anchors.centerIn: parent
+ font.pixelSize: 16 * dp
+ color: "#f0f0f0"
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ rootItem.clicked();
+ }
+ }
+}
diff --git a/examples/quick/multieffect/itemswitcher/qml/SettingsComponentSlider.qml b/examples/quick/multieffect/itemswitcher/qml/SettingsComponentSlider.qml
new file mode 100644
index 0000000000..ed04584e44
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/qml/SettingsComponentSlider.qml
@@ -0,0 +1,54 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.Material
+
+Column {
+ id: rootItem
+
+ property alias text: textItem.text
+ property alias value: slider.value
+ property alias from: slider.from
+ property alias to: slider.to
+ property alias checked: checkBox.checked
+ property alias stepSize: slider.stepSize
+ property bool showCheckbox: false
+
+ signal toggled
+ signal moved
+
+ Material.theme: Material.Dark
+ Material.accent: Material.LightGreen
+ spacing: -12
+
+ Text {
+ id: textItem
+ anchors.horizontalCenter: parent.horizontalCenter
+ color: "#f0f0f0"
+ font.pixelSize: 14 * dp
+ }
+
+ Row {
+ CheckBox {
+ id: checkBox
+ visible: rootItem.showCheckbox
+ checked: true
+ onToggled: {
+ rootItem.toggled();
+ }
+ }
+ Slider {
+ id: slider
+ property real sliderWidth: settings.settingsViewWidth - 50
+ width: rootItem.showCheckbox ? sliderWidth : sliderWidth + checkBox.width
+ value: 50
+ from: 0
+ to: 800
+ onMoved: {
+ rootItem.moved();
+ }
+ }
+ }
+}
diff --git a/examples/quick/multieffect/itemswitcher/qml/SettingsView.qml b/examples/quick/multieffect/itemswitcher/qml/SettingsView.qml
new file mode 100644
index 0000000000..cf1a753b4d
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/qml/SettingsView.qml
@@ -0,0 +1,168 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls.Material
+
+Item {
+ id: rootItem
+
+ property bool show: true
+ property real showAnimation: show ? 1 : 0
+
+ Material.theme: Material.Dark
+ Material.accent: Material.LightGreen
+ width: settings.settingsViewWidth
+ x: -(width + 30) * (1 - showAnimation) + 20
+
+ Behavior on showAnimation {
+ NumberAnimation {
+ duration: 400
+ easing.type: Easing.InOutQuad
+ }
+ }
+
+ // Open/close button
+ Item {
+ width: 30 * dp
+ height: 30 * dp
+ anchors.left: parent.right
+ anchors.leftMargin: 20
+ anchors.top: parent.top
+ anchors.topMargin: -10
+ Rectangle {
+ anchors.fill: parent
+ color: "#404040"
+ opacity: 0.4
+ border.width: 1
+ border.color: "#808080"
+ }
+
+ Image {
+ anchors.centerIn: parent
+ source: "images/arrow.png"
+ rotation: rootItem.showAnimation * 180
+ }
+ MouseArea {
+ anchors.fill: parent
+ anchors.margins: -30 * dp
+ onClicked: {
+ rootItem.show = !rootItem.show;
+ }
+ }
+ }
+
+ // Background
+ Rectangle {
+ anchors.fill: scrollView
+ opacity: showAnimation ? 0.6 : 0
+ visible: opacity
+ anchors.margins: -10
+ color: "#202020"
+ border.color: "#808080"
+ border.width: 1
+ }
+
+ ScrollView {
+ id: scrollView
+ anchors.fill: parent
+ ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
+ ScrollBar.vertical.interactive: false
+ clip: true
+ Column {
+ id: settingsArea
+ width: rootItem.width
+ opacity: showAnimation
+ visible: opacity
+ spacing: 8 * dp
+
+ Item {
+ width: 1
+ height: 20 * dp
+ }
+ Image {
+ anchors.horizontalCenter: parent.horizontalCenter
+ fillMode: Image.PreserveAspectFit
+ width: parent.width * 0.8
+ height: width * 0.25
+ source: "images/Built_with_Qt_RGB_logo.png"
+ }
+ Item {
+ width: 1
+ height: 28 * dp
+ }
+ Text {
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: qsTr("Switching Effects")
+ font.pixelSize: 20 * dp
+ font.bold: true
+ color: "#f0f0f0"
+ }
+ SettingsComponentButton {
+ text: "Blinds"
+ selected: settings.effectIndex === 0
+ onClicked: {
+ settings.effectIndex = 0;
+ }
+ }
+ SettingsComponentButton {
+ text: "Blurry"
+ selected: settings.effectIndex === 1
+ onClicked: {
+ settings.effectIndex = 1;
+ }
+ }
+ SettingsComponentButton {
+ text: "Heart"
+ selected: settings.effectIndex === 2
+ onClicked: {
+ settings.effectIndex = 2;
+ }
+ }
+ SettingsComponentButton {
+ text: "Stars"
+ selected: settings.effectIndex === 3
+ onClicked: {
+ settings.effectIndex = 3;
+ }
+ }
+ SettingsComponentButton {
+ text: "Thunder"
+ selected: settings.effectIndex === 4
+ onClicked: {
+ settings.effectIndex = 4;
+ }
+ }
+ SettingsComponentButton {
+ text: "3D Flip"
+ selected: settings.effectIndex === 5
+ onClicked: {
+ settings.effectIndex = 5;
+ }
+ }
+ Item {
+ width: 1
+ height: 10
+ }
+
+ SettingsComponentSlider {
+ text: qsTr("Animation Duration") + ": " + value.toFixed(0) + " ms"
+ value: settings.switchDuration
+ from: 500
+ to: 5000
+ onMoved: {
+ settings.switchDuration = value;
+ }
+ }
+ SettingsComponentSlider {
+ text: qsTr("Animation Time") + ": " + (value * settings.switchDuration).toFixed(0) + " ms"
+ value: itemSwitcher.inAnimation
+ from: 0
+ to: 1
+ onMoved: {
+ itemSwitcher.inAnimation = value;
+ }
+ }
+ }
+ }
+}
diff --git a/examples/quick/multieffect/itemswitcher/qml/SwitchEffect3DFlip.qml b/examples/quick/multieffect/itemswitcher/qml/SwitchEffect3DFlip.qml
new file mode 100644
index 0000000000..bb33b8c6b6
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/qml/SwitchEffect3DFlip.qml
@@ -0,0 +1,93 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Effects
+
+Item {
+ id: rootItem
+ // We expect all effects to be placed under ItemSwitcher
+ property Item switcher: rootItem.parent
+
+ anchors.fill: parent
+
+ MultiEffect {
+ source: switcher.fromItem
+ width: parent.width
+ height: parent.height
+ x: switcher.inAnimation * rootItem.width
+ blurEnabled: true
+ blur: switcher.inAnimation
+ blurMax: 32
+ blurMultiplier: 0.5
+ opacity: switcher.outAnimation
+
+ saturation: -switcher.inAnimation * 1.5
+
+ maskEnabled: true
+ maskSource: Image {
+ source: "images/smoke.png"
+ visible: false
+ }
+ maskThresholdMin: switcher.inAnimation * 0.6
+ maskSpreadAtMin: 0.1
+ maskThresholdMax: 1.0 - (switcher.inAnimation * 0.6)
+ maskSpreadAtMax: 0.1
+
+ shadowEnabled: true
+ shadowOpacity: 0.5
+ shadowBlur: 0.8
+ shadowVerticalOffset: 5
+ shadowHorizontalOffset: 10 + (x * 0.2)
+ shadowScale: 1.02
+
+ transform: Rotation {
+ origin.x: parent.width / 2
+ origin.y: parent.height / 2
+ axis { x: 0; y: 1; z: 0 }
+ angle: switcher.inAnimation * 60
+ }
+ rotation: -switcher.inAnimation * 20
+ scale: 1.0 + (switcher.inAnimation * 0.2)
+ }
+
+ MultiEffect {
+ source: switcher.toItem
+ width: parent.width
+ height: parent.height
+ x: -switcher.outAnimation * rootItem.width
+ blurEnabled: true
+ blur: switcher.outAnimation * 2
+ blurMax: 32
+ blurMultiplier: 0.5
+ opacity: switcher.inAnimation
+
+ saturation: -switcher.outAnimation * 1.5
+
+ maskEnabled: true
+ maskSource: Image {
+ source: "images/smoke.png"
+ visible: false
+ }
+ maskThresholdMin: switcher.outAnimation * 0.6
+ maskSpreadAtMin: 0.1
+ maskThresholdMax: 1.0 - (switcher.outAnimation * 0.6)
+ maskSpreadAtMax: 0.1
+
+ shadowEnabled: true
+ shadowOpacity: 0.5
+ shadowBlur: 0.8
+ shadowVerticalOffset: 5
+ shadowHorizontalOffset: 10 + (x * 0.2)
+ shadowScale: 1.02
+
+ transform: Rotation {
+ origin.x: parent.width / 2
+ origin.y: parent.height / 2
+ axis { x: 0; y: 1; z: 0 }
+ angle: -switcher.outAnimation * 60
+ }
+ rotation: switcher.outAnimation * 20
+ scale: 1.0 - (switcher.outAnimation * 0.4)
+ }
+}
diff --git a/examples/quick/multieffect/itemswitcher/qml/SwitchEffectBlinds.qml b/examples/quick/multieffect/itemswitcher/qml/SwitchEffectBlinds.qml
new file mode 100644
index 0000000000..8849631be9
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/qml/SwitchEffectBlinds.qml
@@ -0,0 +1,49 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Effects
+
+Item {
+ id: rootItem
+ // We expect all effects to be placed under ItemSwitcher
+ property Item switcher: rootItem.parent
+ property real rotation: 0
+
+ anchors.fill: parent
+
+ Item {
+ id: mask
+ anchors.fill: parent
+ layer.enabled: true
+ visible: false
+ smooth: false
+ clip: true
+ Image {
+ anchors.fill: parent
+ anchors.margins: -parent.width * 0.25
+ source: "images/hblinds.png"
+ rotation: rootItem.rotation
+ smooth: false
+ }
+ }
+
+ // Item going out
+ MultiEffect {
+ source: switcher.fromItem
+ anchors.fill: parent
+ maskEnabled: true
+ maskSource: mask
+ maskThresholdMin: switcher.inAnimation
+ maskSpreadAtMin: 0.4
+ }
+ // Item coming in
+ MultiEffect {
+ source: switcher.toItem
+ anchors.fill: parent
+ maskEnabled: true
+ maskSource: mask
+ maskThresholdMax: switcher.inAnimation
+ maskSpreadAtMax: 0.4
+ }
+}
diff --git a/examples/quick/multieffect/itemswitcher/qml/SwitchEffectBlur.qml b/examples/quick/multieffect/itemswitcher/qml/SwitchEffectBlur.qml
new file mode 100644
index 0000000000..7df93a2f99
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/qml/SwitchEffectBlur.qml
@@ -0,0 +1,34 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Effects
+
+Item {
+ id: rootItem
+ // We expect all effects to be placed under ItemSwitcher
+ property Item switcher: rootItem.parent
+
+ anchors.fill: parent
+
+ MultiEffect {
+ source: switcher.fromItem
+ anchors.fill: parent
+ blurEnabled: true
+ blur: switcher.inAnimation * 4
+ blurMax: 32
+ blurMultiplier: 0.5
+ opacity: switcher.outAnimation
+ saturation: -switcher.inAnimation * 2
+ }
+ MultiEffect {
+ source: switcher.toItem
+ anchors.fill: parent
+ blurEnabled: true
+ blur: switcher.outAnimation * 4
+ blurMax: 32
+ blurMultiplier: 0.5
+ opacity: switcher.inAnimation
+ saturation: -switcher.outAnimation * 2
+ }
+}
diff --git a/examples/quick/multieffect/itemswitcher/qml/SwitchEffectHeart.qml b/examples/quick/multieffect/itemswitcher/qml/SwitchEffectHeart.qml
new file mode 100644
index 0000000000..e80c54460c
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/qml/SwitchEffectHeart.qml
@@ -0,0 +1,48 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Effects
+
+Item {
+ id: rootItem
+ // We expect all effects to be placed under ItemSwitcher
+ property Item switcher: rootItem.parent
+
+ anchors.fill: parent
+
+ Item {
+ id: mask
+ anchors.fill: parent
+ layer.enabled: true
+ visible: false
+ clip: true
+ Image {
+ anchors.fill: parent
+ source: "images/heart.png"
+ scale: switcher.inAnimation * 3
+ }
+ }
+
+ // Item going out
+ MultiEffect {
+ source: switcher.fromItem
+ anchors.fill: parent
+ maskEnabled: true
+ maskSource: mask
+ maskInverted: true
+ maskThresholdMin: 0.5
+ maskSpreadAtMin: 0.0
+ }
+ // Item coming in
+ MultiEffect {
+ source: switcher.toItem
+ anchors.fill: parent
+ maskEnabled: true
+ maskSource: mask
+ maskThresholdMin: 0.5
+ maskSpreadAtMin: 0.0
+ colorizationColor: "red"
+ colorization: Math.max(0, 1.0 - switcher.inAnimation * 2)
+ }
+}
diff --git a/examples/quick/multieffect/itemswitcher/qml/SwitchEffectStars.qml b/examples/quick/multieffect/itemswitcher/qml/SwitchEffectStars.qml
new file mode 100644
index 0000000000..c533572e66
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/qml/SwitchEffectStars.qml
@@ -0,0 +1,50 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Effects
+
+Item {
+ id: rootItem
+ // We expect all effects to be placed under ItemSwitcher
+ property Item switcher: rootItem.parent
+
+ anchors.fill: parent
+
+ Item {
+ id: mask
+ anchors.fill: parent
+ layer.enabled: true
+ visible: false
+ clip: true
+ Image {
+ anchors.fill: parent
+ source: "images/star.png"
+ scale: switcher.inAnimation * 5
+ rotation: switcher.outAnimation * 360
+ }
+ }
+
+ // Item going out
+ MultiEffect {
+ source: switcher.fromItem
+ anchors.fill: parent
+ maskEnabled: true
+ maskSource: mask
+ maskInverted: true
+ maskThresholdMin: 0.5
+ maskSpreadAtMin: 0.5
+ }
+ // Item coming in
+ MultiEffect {
+ source: switcher.toItem
+ anchors.fill: parent
+ maskEnabled: true
+ maskSource: mask
+ maskThresholdMin: 0.5
+ maskSpreadAtMin: 0.5
+ colorizationColor: "#ffd020"
+ colorization: Math.max(0, 1.0 - switcher.inAnimation * 2)
+ brightness: Math.max(0.0, 0.8 - switcher.inAnimation * 2)
+ }
+}
diff --git a/examples/quick/multieffect/itemswitcher/qml/SwitchEffectThunder.qml b/examples/quick/multieffect/itemswitcher/qml/SwitchEffectThunder.qml
new file mode 100644
index 0000000000..80a6e9bf8f
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/qml/SwitchEffectThunder.qml
@@ -0,0 +1,87 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Effects
+
+Item {
+ id: rootItem
+ // We expect all effects to be placed under ItemSwitcher
+ property Item switcher: rootItem.parent
+
+ property real _xPos: Math.sin(switcher.inAnimation * Math.PI * 50) * width * 0.03 * (0.5 - Math.abs(0.5 - switcher.inAnimation))
+ property real _yPos: Math.sin(switcher.inAnimation * Math.PI * 35) * width * 0.02 * (0.5 - Math.abs(0.5 - switcher.inAnimation))
+
+ anchors.fill: parent
+
+ Image {
+ id: maskImage
+ source: "images/stripes.png"
+ visible: false
+ }
+
+ MultiEffect {
+ source: switcher.fromItem
+ width: parent.width
+ height: parent.height
+ x: rootItem._xPos
+ y: rootItem._yPos
+ blurEnabled: true
+ blur: switcher.inAnimation
+ blurMax: 32
+ blurMultiplier: 0.5
+ opacity: switcher.outAnimation
+ colorizationColor: "#f0d060"
+ colorization: switcher.inAnimation
+
+ contrast: switcher.inAnimation
+ brightness: switcher.inAnimation
+
+ maskEnabled: true
+ maskSource: maskImage
+ maskThresholdMin: switcher.inAnimation * 0.9
+ maskSpreadAtMin: 0.2
+ maskThresholdMax: 1.0
+
+ shadowEnabled: true
+ shadowColor: "#f04000"
+ shadowBlur: 1.0
+ shadowOpacity: 5.0 - switcher.outAnimation * 5.0
+ shadowHorizontalOffset: 0
+ shadowVerticalOffset: 0
+ shadowScale: 1.04
+
+ }
+ MultiEffect {
+ source: switcher.toItem
+ width: parent.width
+ height: parent.height
+ x: -rootItem._xPos
+ y: -rootItem._yPos
+ blurEnabled: true
+ blur: switcher.outAnimation * 2
+ blurMax: 32
+ blurMultiplier: 0.5
+ opacity: switcher.inAnimation * 3.0 - 1.0
+
+ colorizationColor: "#f0d060"
+ colorization: switcher.outAnimation
+ contrast: switcher.outAnimation
+ brightness: switcher.outAnimation
+
+ maskEnabled: true
+ maskSource: maskImage
+ maskThresholdMin: switcher.outAnimation * 0.6
+ maskSpreadAtMin: 0.2
+ maskThresholdMax: 1.0
+
+ shadowEnabled: true
+ shadowColor: "#f04000"
+ shadowBlur: 1.0
+ shadowOpacity: 5.0 - switcher.inAnimation * 5.0
+ shadowHorizontalOffset: 0
+ shadowVerticalOffset: 0
+ shadowScale: 1.04
+ }
+
+}
diff --git a/examples/quick/multieffect/itemswitcher/qml/images/Built_with_Qt.png b/examples/quick/multieffect/itemswitcher/qml/images/Built_with_Qt.png
new file mode 100644
index 0000000000..e612481510
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/qml/images/Built_with_Qt.png
Binary files differ
diff --git a/examples/quick/multieffect/itemswitcher/qml/images/Built_with_Qt_RGB_logo.png b/examples/quick/multieffect/itemswitcher/qml/images/Built_with_Qt_RGB_logo.png
new file mode 100644
index 0000000000..8d2dfc17ec
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/qml/images/Built_with_Qt_RGB_logo.png
Binary files differ
diff --git a/examples/quick/multieffect/itemswitcher/qml/images/arrow.png b/examples/quick/multieffect/itemswitcher/qml/images/arrow.png
new file mode 100644
index 0000000000..067bec4509
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/qml/images/arrow.png
Binary files differ
diff --git a/examples/quick/multieffect/itemswitcher/qml/images/background.png b/examples/quick/multieffect/itemswitcher/qml/images/background.png
new file mode 100644
index 0000000000..9b9e9e487d
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/qml/images/background.png
Binary files differ
diff --git a/examples/quick/multieffect/itemswitcher/qml/images/hblinds.png b/examples/quick/multieffect/itemswitcher/qml/images/hblinds.png
new file mode 100644
index 0000000000..09ce73ee03
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/qml/images/hblinds.png
Binary files differ
diff --git a/examples/quick/multieffect/itemswitcher/qml/images/heart.png b/examples/quick/multieffect/itemswitcher/qml/images/heart.png
new file mode 100644
index 0000000000..dda1f4bab1
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/qml/images/heart.png
Binary files differ
diff --git a/examples/quick/multieffect/itemswitcher/qml/images/quit_coding.png b/examples/quick/multieffect/itemswitcher/qml/images/quit_coding.png
new file mode 100644
index 0000000000..0930013af4
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/qml/images/quit_coding.png
Binary files differ
diff --git a/examples/quick/multieffect/itemswitcher/qml/images/smoke.png b/examples/quick/multieffect/itemswitcher/qml/images/smoke.png
new file mode 100644
index 0000000000..83dfcc453c
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/qml/images/smoke.png
Binary files differ
diff --git a/examples/quick/multieffect/itemswitcher/qml/images/star.png b/examples/quick/multieffect/itemswitcher/qml/images/star.png
new file mode 100644
index 0000000000..f83bd87892
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/qml/images/star.png
Binary files differ
diff --git a/examples/quick/multieffect/itemswitcher/qml/images/stripes.png b/examples/quick/multieffect/itemswitcher/qml/images/stripes.png
new file mode 100644
index 0000000000..7a79767e6e
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/qml/images/stripes.png
Binary files differ
diff --git a/examples/quick/multieffect/itemswitcher/qml/main.qml b/examples/quick/multieffect/itemswitcher/qml/main.qml
new file mode 100644
index 0000000000..9685c71ccb
--- /dev/null
+++ b/examples/quick/multieffect/itemswitcher/qml/main.qml
@@ -0,0 +1,219 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Window
+import QtQuick.Controls
+import QtQuick.Controls.Material
+
+Rectangle {
+ id: mainWindow
+
+ // Multiplier for resolution independency
+ readonly property real dp: 0.2 + Math.min(width, height) / 1200
+
+ width: 1280
+ height: 720
+ visible: true
+ color: "#404040"
+
+ QtObject {
+ id: settings
+ property real settingsViewWidth: 100 + 150 * dp
+ property int effectIndex: 0
+ property int switchDuration: 1500
+ property int itemSize: mainWindow.height * 0.6
+ }
+
+ Item {
+ id: testItem1
+ width: 1
+ height: 1
+ }
+
+ Rectangle {
+ id: testItem2
+ anchors.fill: itemSwitcher
+ color: "#d0d0d0"
+ visible: false
+ Image {
+ anchors.fill: parent
+ anchors.margins: 4
+ source: "images/background.png"
+ }
+ Text {
+ anchors.centerIn: parent
+ font.pixelSize: 40 * dp
+ horizontalAlignment: Text.AlignHCenter
+ text: "This is the\nfirst item"
+ color: "#ffffff"
+ style: Text.Outline
+ styleColor: "#202020"
+ }
+ }
+
+ Rectangle {
+ id: testItem3Content
+ anchors.fill: itemSwitcher
+ color: "white"
+ border.width: 5
+ visible: itemSwitcher.currentIndex === 2
+ Text {
+ anchors.centerIn: parent
+ font.pixelSize: 48 * dp
+ horizontalAlignment: Text.AlignHCenter
+ text: "This is a\nDIFFERENT\nsecond item"
+ rotation: slider.value * 360
+ }
+ Slider {
+ id: slider
+ anchors.top: parent.top
+ anchors.topMargin: 20 * dp
+ anchors.horizontalCenter: parent.horizontalCenter
+ from: 0
+ to: 1
+ width: parent.width * 0.8
+ }
+ Button {
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 20 * dp
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: "Controls Button"
+ }
+ }
+ ShaderEffectSource {
+ // Wrap testItem3 into ShaderEffectSource so it doesn't need
+ // visible = false and can be interactive.
+ id: testItem3
+ anchors.fill: testItem3Content
+ sourceItem: testItem3Content
+ hideSource: true
+ visible: false
+ }
+
+ Image {
+ id: testItem4
+ source: "images/Built_with_Qt.png"
+ anchors.fill: itemSwitcher
+ visible: false
+ }
+
+ Image {
+ id: testItem5
+ source: "images/quit_coding.png"
+ anchors.fill: itemSwitcher
+ visible: false
+ }
+
+ Item {
+ id: mainArea
+ anchors.left: settingsView.right
+ anchors.right: parent.right
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+
+ PagesView {
+ id: pagesView
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.top: parent.top
+ anchors.topMargin: 20 * dp
+ PagesItem {
+ width: pagesView.itemSize
+ height: pagesView.itemSize
+ source: testItem1
+ text: "(EMPTY)"
+ selected: itemSwitcher.currentIndex === 0
+ onClicked: {
+ itemSwitcher.currentIndex = 0;
+ }
+ }
+ PagesItem {
+ width: pagesView.itemSize
+ height: pagesView.itemSize
+ source: testItem2
+ selected: itemSwitcher.currentIndex === 1
+ onClicked: {
+ itemSwitcher.currentIndex = 1;
+ }
+ }
+ PagesItem {
+ width: pagesView.itemSize
+ height: pagesView.itemSize
+ source: testItem3
+ selected: itemSwitcher.currentIndex === 2
+ onClicked: {
+ itemSwitcher.currentIndex = 2;
+ }
+ }
+ PagesItem {
+ width: pagesView.itemSize
+ height: pagesView.itemSize
+ source: testItem4
+ selected: itemSwitcher.currentIndex === 3
+ onClicked: {
+ itemSwitcher.currentIndex = 3;
+ }
+ }
+ PagesItem {
+ width: pagesView.itemSize
+ height: pagesView.itemSize
+ source: testItem5
+ selected: itemSwitcher.currentIndex === 4
+ onClicked: {
+ itemSwitcher.currentIndex = 4;
+ }
+ }
+ }
+ }
+ ItemSwitcher {
+ id: itemSwitcher
+ anchors.centerIn: mainArea
+ anchors.verticalCenterOffset: pagesView.height / 2
+ width: settings.itemSize
+ height: settings.itemSize
+ duration: settings.switchDuration
+ Component.onCompleted: {
+ // Add all switchable items into switcher
+ sourceItems.push(testItem1);
+ sourceItems.push(testItem2);
+ sourceItems.push(testItem3);
+ sourceItems.push(testItem4);
+ sourceItems.push(testItem5);
+ // From item is the currently selected one
+ currentIndex = settings.effectIndex;
+ }
+
+ SwitchEffectBlinds {
+ id: blindsEffect
+ visible: settings.effectIndex == 0
+ rotation: 45
+ }
+ SwitchEffectBlur {
+ id: blurEffect
+ visible: settings.effectIndex == 1
+ }
+ SwitchEffectHeart {
+ id: heartEffect
+ visible: settings.effectIndex == 2
+ }
+ SwitchEffectStars {
+ id: starsEffect
+ visible: settings.effectIndex == 3
+ }
+ SwitchEffectThunder {
+ id: thunderEffect
+ visible: settings.effectIndex == 4
+ }
+ SwitchEffect3DFlip {
+ id: flipEffect
+ visible: settings.effectIndex == 5
+ }
+ }
+
+ SettingsView {
+ id: settingsView
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ anchors.margins: 20
+ }
+}
diff --git a/examples/quick/multieffect/multieffect.pro b/examples/quick/multieffect/multieffect.pro
new file mode 100644
index 0000000000..b06faae7df
--- /dev/null
+++ b/examples/quick/multieffect/multieffect.pro
@@ -0,0 +1,3 @@
+TEMPLATE = subdirs
+SUBDIRS += testbed \
+ itemswitcher
diff --git a/examples/quick/multieffect/testbed/CMakeLists.txt b/examples/quick/multieffect/testbed/CMakeLists.txt
new file mode 100644
index 0000000000..fb8c566378
--- /dev/null
+++ b/examples/quick/multieffect/testbed/CMakeLists.txt
@@ -0,0 +1,74 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(testbed LANGUAGES CXX)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick QuickControls2)
+
+qt_standard_project_setup(REQUIRES 6.5)
+
+add_subdirectory("../../shared" "shared")
+
+qt_add_executable(testbedexample WIN32 MACOSX_BUNDLE
+ main.cpp
+)
+
+target_link_libraries(testbedexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+ Qt6::QuickControls2
+)
+
+add_dependencies(testbedexample testbed_shared)
+
+# Resources:
+qt_add_qml_module(testbedexample
+ URI testbed
+ QML_FILES
+ "qml/FpsItem.qml"
+ "qml/main.qml"
+ "qml/ResetSettingsOverlay.qml"
+ "qml/Settings.qml"
+ "qml/SettingsView.qml"
+ "qml/ShaderView.qml"
+ "qml/TestMaskItem.qml"
+ "qml/TestSourceItem.qml"
+ "qml/WarningsItem.qml"
+ "qml/WarningsView.qml"
+ "qml/SettingsComponentView.qml"
+ "qml/SettingsComponentSlider.qml"
+ "qml/SettingsComponentCheckBox.qml"
+ "qml/SettingsComponentColorSelector.qml"
+ "qml/CustomMultiEffect/BlurHelper.qml"
+ "qml/CustomMultiEffect/CustomMultiEffect.qml"
+ RESOURCES
+ "qml/images/pause.png"
+ "qml/images/play.png"
+ "qml/images/spinner.png"
+ "qml/images/warning.png"
+ "qml/images/arrow.png"
+ "qml/images/Built_with_Qt.png"
+ "qml/images/Built_with_Qt_RGB_logo.png"
+ "qml/CustomMultiEffect/bluritems.frag.qsb"
+ "qml/CustomMultiEffect/bluritems.vert.qsb"
+ "qml/CustomMultiEffect/custommultieffect.frag.qsb"
+ "qml/CustomMultiEffect/custommultieffect.vert.qsb"
+)
+
+install(TARGETS testbedexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET testbedexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/multieffect/testbed/doc/images/qml-multieffecttestbed-example.jpg b/examples/quick/multieffect/testbed/doc/images/qml-multieffecttestbed-example.jpg
new file mode 100644
index 0000000000..de6b05da56
--- /dev/null
+++ b/examples/quick/multieffect/testbed/doc/images/qml-multieffecttestbed-example.jpg
Binary files differ
diff --git a/examples/quick/multieffect/testbed/doc/src/testbed.qdoc b/examples/quick/multieffect/testbed/doc/src/testbed.qdoc
new file mode 100644
index 0000000000..64a815b3a8
--- /dev/null
+++ b/examples/quick/multieffect/testbed/doc/src/testbed.qdoc
@@ -0,0 +1,16 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+/*!
+ \title Qt Quick Examples - MultiEffect Test Bed
+ \example multieffect/testbed
+ \image qml-multieffecttestbed-example.jpg
+ \brief Demonstrates MultiEffect usage.
+ \ingroup qtquickexamples
+ \examplecategory {Graphics}
+
+ This example demonstrates the MultiEffect type, which offers a simple,
+ efficient solution for applying effects such as blur, drop shadow, or
+ colorize to an Item and its children.
+
+ \include examples-run.qdocinc
+*/
diff --git a/examples/quick/multieffect/testbed/main.cpp b/examples/quick/multieffect/testbed/main.cpp
new file mode 100644
index 0000000000..130e3ab0b4
--- /dev/null
+++ b/examples/quick/multieffect/testbed/main.cpp
@@ -0,0 +1,4 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+#include "../../shared/shared.h"
+DECLARATIVE_EXAMPLE_MAIN(testbed/qml/main)
diff --git a/examples/quick/multieffect/testbed/qml.qrc b/examples/quick/multieffect/testbed/qml.qrc
new file mode 100644
index 0000000000..4c23cff873
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml.qrc
@@ -0,0 +1,31 @@
+<RCC>
+ <qresource prefix="/qt/qml/testbed">
+ <file>qml/main.qml</file>
+ <file>qml/Settings.qml</file>
+ <file>qml/ResetSettingsOverlay.qml</file>
+ <file>qml/FpsItem.qml</file>
+ <file>qml/images/spinner.png</file>
+ <file>qml/images/warning.png</file>
+ <file>qml/WarningsView.qml</file>
+ <file>qml/WarningsItem.qml</file>
+ <file>qml/ShaderView.qml</file>
+ <file>qml/TestSourceItem.qml</file>
+ <file>qml/TestMaskItem.qml</file>
+ <file>qml/SettingsView.qml</file>
+ <file>qml/images/pause.png</file>
+ <file>qml/images/play.png</file>
+ <file>qml/SettingsComponentCheckBox.qml</file>
+ <file>qml/SettingsComponentColorSelector.qml</file>
+ <file>qml/SettingsComponentSlider.qml</file>
+ <file>qml/SettingsComponentView.qml</file>
+ <file>qml/images/arrow.png</file>
+ <file>qml/images/Built_with_Qt.png</file>
+ <file>qml/images/Built_with_Qt_RGB_logo.png</file>
+ <file>qml/CustomMultiEffect/BlurHelper.qml</file>
+ <file>qml/CustomMultiEffect/bluritems.frag.qsb</file>
+ <file>qml/CustomMultiEffect/bluritems.vert.qsb</file>
+ <file>qml/CustomMultiEffect/custommultieffect.frag.qsb</file>
+ <file>qml/CustomMultiEffect/CustomMultiEffect.qml</file>
+ <file>qml/CustomMultiEffect/custommultieffect.vert.qsb</file>
+ </qresource>
+</RCC>
diff --git a/examples/quick/multieffect/testbed/qml/CustomMultiEffect/BlurHelper.qml b/examples/quick/multieffect/testbed/qml/CustomMultiEffect/BlurHelper.qml
new file mode 100644
index 0000000000..7a9390791b
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/CustomMultiEffect/BlurHelper.qml
@@ -0,0 +1,66 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Item {
+ id: rootItem
+ property alias blurSrc1: blurredItemSource1
+ property alias blurSrc2: blurredItemSource2
+ property alias blurSrc3: blurredItemSource3
+ property alias blurSrc4: blurredItemSource4
+ property alias blurSrc5: blurredItemSource5
+
+ component BlurItem : ShaderEffect {
+ property vector2d offset: Qt.vector2d((1.0 + rootItem.blurMultiplier) / width,
+ (1.0 + rootItem.blurMultiplier) / height)
+ visible: false
+ layer.enabled: true
+ layer.smooth: true
+ vertexShader: "bluritems.vert.qsb"
+ fragmentShader: "bluritems.frag.qsb"
+ }
+
+ QtObject {
+ id: priv
+ property bool useBlurItem1: true
+ property bool useBlurItem2: rootItem.blurMax > 2
+ property bool useBlurItem3: rootItem.blurMax > 8
+ property bool useBlurItem4: rootItem.blurMax > 16
+ property bool useBlurItem5: rootItem.blurMax > 32
+ }
+
+ BlurItem {
+ id: blurredItemSource1
+ property Item src: priv.useBlurItem1 ? source : null
+ // Size of the first blurred item is by default half of the source.
+ // Increase for quality and decrease for performance & more blur.
+ readonly property int blurItemSize: 8
+ width: src ? Math.ceil(src.width / 16) * blurItemSize : 0
+ height: src ? Math.ceil(src.height / 16) * blurItemSize : 0
+ }
+ BlurItem {
+ id: blurredItemSource2
+ property Item src: priv.useBlurItem2 ? blurredItemSource1 : null
+ width: blurredItemSource1.width * 0.5
+ height: blurredItemSource1.height * 0.5
+ }
+ BlurItem {
+ id: blurredItemSource3
+ property Item src: priv.useBlurItem3 ? blurredItemSource2 : null
+ width: blurredItemSource2.width * 0.5
+ height: blurredItemSource2.height * 0.5
+ }
+ BlurItem {
+ id: blurredItemSource4
+ property Item src: priv.useBlurItem4 ? blurredItemSource3 : null
+ width: blurredItemSource3.width * 0.5
+ height: blurredItemSource3.height * 0.5
+ }
+ BlurItem {
+ id: blurredItemSource5
+ property Item src: priv.useBlurItem5 ? blurredItemSource4 : null
+ width: blurredItemSource4.width * 0.5
+ height: blurredItemSource4.height * 0.5
+ }
+}
diff --git a/examples/quick/multieffect/testbed/qml/CustomMultiEffect/CustomMultiEffect.qep b/examples/quick/multieffect/testbed/qml/CustomMultiEffect/CustomMultiEffect.qep
new file mode 100644
index 0000000000..2600bc505f
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/CustomMultiEffect/CustomMultiEffect.qep
@@ -0,0 +1,383 @@
+{
+ "QEP": {
+ "QQEM": "0.43",
+ "connections": [
+ {
+ "fromId": 2,
+ "toId": 1
+ },
+ {
+ "fromId": 0,
+ "toId": 3
+ },
+ {
+ "fromId": 3,
+ "toId": 2
+ }
+ ],
+ "exportDirectory": ".",
+ "exportFlags": 11,
+ "exportName": "CustomMultiEffect",
+ "nodes": [
+ {
+ "fragmentCode": [
+ "void main() {",
+ " fragColor = texture(iSource, texCoord);",
+ " @nodes",
+ " fragColor = fragColor * qt_Opacity;",
+ "}"
+ ],
+ "name": "Main",
+ "nodeId": 0,
+ "type": 0,
+ "vertexCode": [
+ "void main() {",
+ " texCoord = qt_MultiTexCoord0;",
+ " fragCoord = qt_Vertex.xy;",
+ " vec2 vertCoord = qt_Vertex.xy;",
+ " @nodes",
+ " gl_Position = qt_Matrix * vec4(vertCoord, 0.0, 1.0);",
+ "}"
+ ],
+ "x": 140,
+ "y": 35.25
+ },
+ {
+ "name": "Output",
+ "nodeId": 1,
+ "type": 1,
+ "x": 140,
+ "y": 589.75
+ },
+ {
+ "description": "This node matches to features and API of the Qt Quick MultiEffect element. This makes it easy to build customized MultiEffects.",
+ "fragmentCode": [
+ "{",
+ " vec4 color = fragColor;",
+ "#if (BLUR_ENABLED)",
+ " // blur",
+ " vec4 blurredColor = texture(iSource, texCoord) * blurWeight1[0];",
+ " blurredColor += texture(iSourceBlur1, texCoord) * blurWeight1[1];",
+ "#if (BLUR_HELPER_MAX_LEVEL > 2)",
+ " blurredColor += texture(iSourceBlur2, texCoord) * blurWeight1[2];",
+ "#endif",
+ "#if (BLUR_HELPER_MAX_LEVEL > 8)",
+ " blurredColor += texture(iSourceBlur3, texCoord) * blurWeight1[3];",
+ "#endif",
+ "#if (BLUR_HELPER_MAX_LEVEL > 16)",
+ " blurredColor += texture(iSourceBlur4, texCoord) * blurWeight2[0];",
+ "#endif",
+ "#if (BLUR_HELPER_MAX_LEVEL > 32)",
+ " blurredColor += texture(iSourceBlur5, texCoord) * blurWeight2[1];",
+ "#endif",
+ " color = blurredColor;",
+ "#endif",
+ " // contrast, brightness, saturation and colorization",
+ " color.rgb = (color.rgb - 0.5 * color.a) * (1.0 + contrast) + 0.5 * color.a;",
+ " color.rgb += brightness * color.a;",
+ " float gray = dot(color.rgb, vec3(0.299, 0.587, 0.114));",
+ " float colorizationAlpha = colorization * colorizationColor.a;",
+ " color.rgb = mix(color.rgb, gray * colorizationColor.rgb, colorizationAlpha);",
+ " color.rgb = mix(vec3(gray), color.rgb, 1.0 + saturation);",
+ "#if (SHADOW_ENABLED)",
+ " // shadow",
+ " float shadow = texture(iSource, shadowTexCoord).a * shadowBlurWeight1[0];",
+ " shadow += texture(iSourceBlur1, shadowTexCoord).a * shadowBlurWeight1[1];",
+ "#if (BLUR_HELPER_MAX_LEVEL > 2)",
+ " shadow += texture(iSourceBlur2, shadowTexCoord).a * shadowBlurWeight1[2];",
+ "#endif",
+ "#if (BLUR_HELPER_MAX_LEVEL > 8)",
+ " shadow += texture(iSourceBlur3, shadowTexCoord).a * shadowBlurWeight1[3];",
+ "#endif",
+ "#if (BLUR_HELPER_MAX_LEVEL > 16)",
+ " shadow += texture(iSourceBlur4, shadowTexCoord).a * shadowBlurWeight2[0];",
+ "#endif",
+ "#if (BLUR_HELPER_MAX_LEVEL > 32)",
+ " shadow += texture(iSourceBlur5, shadowTexCoord).a * shadowBlurWeight2[1];",
+ "#endif",
+ " shadow *= (shadowColor.a * shadowOpacity);",
+ " float saa = (1.0 - color.a) * (1.0 - shadow);",
+ " color.rgb = mix(shadowColor.rgb * shadow, color.rgb, color.a + saa);",
+ " color.a = 1.0 - saa;",
+ "#endif",
+ "#if (MASK_ENABLED)",
+ " // mask",
+ " vec4 maskTexture = texture(maskSource, texCoord);",
+ " float alphaMask = maskTexture.a;",
+ " const float mSLow = 1.0 + maskSpreadAtMin;",
+ " const float mSUp = 1.0 + maskSpreadAtMax;",
+ " float m1 = smoothstep(maskThresholdMin * mSLow - (mSLow - 0.999), maskThresholdMin * mSLow, alphaMask);",
+ " float m2 = smoothstep((1.0 - maskThresholdMax) * mSUp - (mSUp - 0.999), (1.0 - maskThresholdMax) * mSUp, (1.0 - alphaMask));",
+ " float mm = m1 * m2;",
+ " color *= (1.0 - float(maskInverted)) * mm + float(maskInverted) * (1.0 - mm);",
+ "#endif",
+ " fragColor = color;",
+ "}"
+ ],
+ "name": "MultiEffect",
+ "nodeId": 2,
+ "properties": [
+ {
+ "defaultValue": "0",
+ "maxValue": "1",
+ "minValue": "-1",
+ "name": "contrast",
+ "type": "float",
+ "value": "0"
+ },
+ {
+ "defaultValue": "0",
+ "maxValue": "1",
+ "minValue": "-1",
+ "name": "brightness",
+ "type": "float",
+ "value": "0"
+ },
+ {
+ "defaultValue": "0",
+ "maxValue": "1",
+ "minValue": "-1",
+ "name": "saturation",
+ "type": "float",
+ "value": "0"
+ },
+ {
+ "defaultValue": "0",
+ "maxValue": "1",
+ "minValue": "0",
+ "name": "colorization",
+ "type": "float",
+ "value": "0"
+ },
+ {
+ "defaultValue": "1, 0, 0, 1",
+ "name": "colorizationColor",
+ "type": "color",
+ "value": "1, 0, 0, 1"
+ },
+ {
+ "defaultValue": "1",
+ "description": "Enables the blur effect.",
+ "name": "BLUR_ENABLED",
+ "type": "define",
+ "value": "1"
+ },
+ {
+ "defaultValue": "32",
+ "maxValue": "64",
+ "minValue": "0",
+ "name": "blurMax",
+ "type": "int",
+ "value": "32"
+ },
+ {
+ "defaultValue": "0",
+ "maxValue": "1",
+ "minValue": "0",
+ "name": "blur",
+ "type": "float",
+ "value": "0"
+ },
+ {
+ "defaultValue": "0",
+ "description": "Enables the shadow effect.",
+ "name": "SHADOW_ENABLED",
+ "type": "define",
+ "value": "1"
+ },
+ {
+ "defaultValue": "1",
+ "description": "This property defines how much blur (radius) is applied to the shadow.\n\nThe value ranges from 0.0 (no blur) to 1.0 (full blur). By default, the property is set to \\c 0.0 (no change). The amount of full blur is affected by blurHelperBlurMultiplier.",
+ "maxValue": "1",
+ "minValue": "0",
+ "name": "shadowBlur",
+ "type": "float",
+ "value": "1"
+ },
+ {
+ "defaultValue": "1",
+ "maxValue": "1",
+ "minValue": "0",
+ "name": "shadowOpacity",
+ "type": "float",
+ "value": "1"
+ },
+ {
+ "defaultValue": "0, 0, 0, 1",
+ "name": "shadowColor",
+ "type": "color",
+ "value": "0, 0, 0, 1"
+ },
+ {
+ "defaultValue": "1",
+ "maxValue": "1.2",
+ "minValue": "0.8",
+ "name": "shadowScale",
+ "type": "float",
+ "value": "1"
+ },
+ {
+ "defaultValue": "0",
+ "maxValue": "30",
+ "minValue": "-30",
+ "name": "shadowHorizontalOffset",
+ "type": "float",
+ "value": "0"
+ },
+ {
+ "defaultValue": "0",
+ "maxValue": "30",
+ "minValue": "-30",
+ "name": "shadowVerticalOffset",
+ "type": "float",
+ "value": "0"
+ },
+ {
+ "defaultValue": "1",
+ "description": "Enables the mask effect.",
+ "name": "MASK_ENABLED",
+ "type": "define",
+ "value": "1"
+ },
+ {
+ "defaultValue": "",
+ "description": "Source item for the mask effect. By default the alpha channel of the source item is used for masking but this can be easily adjusted in the shader.",
+ "name": "maskSource",
+ "type": "image",
+ "value": ""
+ },
+ {
+ "defaultValue": "0",
+ "description": "This property defines a lower threshold value for the mask pixels. The mask pixels that have an alpha value below this property are used to completely mask away the corresponding pixels from the source item. The mask pixels that have a higher alpha value are used to alphablend the source item to the display.\n\nThe value ranges from 0.0 (alpha value 0) to 1.0 (alpha value 255). By default, the property is set to 0.0.",
+ "maxValue": "1",
+ "minValue": "0",
+ "name": "maskThresholdMin",
+ "type": "float",
+ "value": "0"
+ },
+ {
+ "defaultValue": "0",
+ "description": "This property defines the smoothness of the mask edges near the maskThresholdMin. Setting higher spread values softens the transition from the transparent mask pixels towards opaque mask pixels by adding interpolated values between them.\n\nThe value ranges from 0.0 (sharp mask edge) to 1.0 (smooth mask edge). By default, the property is set to 0.0.",
+ "maxValue": "1",
+ "minValue": "0",
+ "name": "maskSpreadAtMin",
+ "type": "float",
+ "value": "0"
+ },
+ {
+ "defaultValue": "1",
+ "description": "This property defines an upper threshold value for the mask pixels. The mask pixels that have an alpha value below this property are used to completely mask away the corresponding pixels from the source item. The mask pixels that have a higher alpha value are used to alphablend the source item to the display.\n\nThe value ranges from 0.0 (alpha value 0) to 1.0 (alpha value 255). By default, the property is set to 1.0.",
+ "maxValue": "1",
+ "minValue": "0",
+ "name": "maskThresholdMax",
+ "type": "float",
+ "value": "1"
+ },
+ {
+ "defaultValue": "0",
+ "description": "This property defines the smoothness of the mask edges near the maskThresholdMax. Using higher spread values softens the transition from the transparent mask pixels towards opaque mask pixels by adding interpolated values between them.\n\nThe value ranges from 0.0 (sharp mask edge) to 1.0 (smooth mask edge). By default, the property is set to 0.0.",
+ "maxValue": "1",
+ "minValue": "0",
+ "name": "maskSpreadAtMax",
+ "type": "float",
+ "value": "0"
+ },
+ {
+ "defaultValue": "false",
+ "description": "This property switches the mask to the opposite side; instead of masking away the content outside maskThresholdMin and maskThresholdMax, content between them will get masked away.\n\nBy default, the property is set to false.",
+ "name": "maskInverted",
+ "type": "bool",
+ "value": "false"
+ }
+ ],
+ "type": 2,
+ "vertexCode": [
+ "out vec4 blurWeight1;",
+ "out vec2 blurWeight2;",
+ "out vec2 shadowTexCoord;",
+ "out vec4 shadowBlurWeight1;",
+ "out vec2 shadowBlurWeight2;",
+ "",
+ "float blurWeight(float v) {",
+ " return max(0.0, min(1.0, 1.0 - v * 2.0));",
+ "}",
+ "",
+ "@main",
+ "{",
+ "#if (BLUR_ENABLED)",
+ " float blurLod = sqrt(blur * (blurMax / 64.0)) * 1.2 - 0.2;",
+ " float bw1 = blurWeight(abs(blurLod - 0.1));",
+ " float bw2 = blurWeight(abs(blurLod - 0.3));",
+ " float bw3 = blurWeight(abs(blurLod - 0.5));",
+ " float bw4 = blurWeight(abs(blurLod - 0.7));",
+ " float bw5 = blurWeight(abs(blurLod - 0.9));",
+ " float bw6 = blurWeight(abs(blurLod - 1.1));",
+ "",
+ " float bsum = bw1 + bw2 + bw3 + bw4 + bw5 + bw6;",
+ " blurWeight1 = vec4(bw1 / bsum, bw2 / bsum, bw3 / bsum, bw4 / bsum);",
+ " blurWeight2 = vec2(bw5 / bsum, bw6 / bsum);",
+ "#endif",
+ "#if (SHADOW_ENABLED)",
+ " float shadowBlurLod = sqrt(shadowBlur * (blurMax / 64.0)) * 1.2 - 0.2;",
+ " float sbw1 = blurWeight(abs(shadowBlurLod - 0.1));",
+ " float sbw2 = blurWeight(abs(shadowBlurLod - 0.3));",
+ " float sbw3 = blurWeight(abs(shadowBlurLod - 0.5));",
+ " float sbw4 = blurWeight(abs(shadowBlurLod - 0.7));",
+ " float sbw5 = blurWeight(abs(shadowBlurLod - 0.9));",
+ " float sbw6 = blurWeight(abs(shadowBlurLod - 1.1));",
+ "",
+ " float sbsum = sbw1 + sbw2 + sbw3 + sbw4 + sbw5 + sbw6;",
+ " shadowBlurWeight1 = vec4(sbw1 / sbsum, sbw2 / sbsum, sbw3 / sbsum, sbw4 / sbsum);",
+ " shadowBlurWeight2 = vec2(sbw5 / sbsum, sbw6 / sbsum);",
+ "",
+ " vec2 shadowOffset = vec2(shadowHorizontalOffset / iResolution.x, shadowVerticalOffset / iResolution.y);",
+ " float invertedScale = 1.0 / shadowScale;",
+ " float s = (1.0 - invertedScale) * 0.5;",
+ " vec2 shadowCenterOffset = vec2(s);",
+ " shadowTexCoord = qt_MultiTexCoord0 - shadowOffset;",
+ " shadowTexCoord = (shadowTexCoord * invertedScale) + shadowCenterOffset;",
+ "#endif",
+ "}"
+ ],
+ "x": 105,
+ "y": 327.5
+ },
+ {
+ "description": "This node is required e.g. for FastBlur and DropShadow. It generates blurred iSourceBlur[1..6] samplers to be available for shaders.",
+ "fragmentCode": [
+ "@blursources"
+ ],
+ "name": "BlurHelper",
+ "nodeId": 3,
+ "properties": [
+ {
+ "defaultValue": "64",
+ "description": "This property defines the maximum pixel radius that blur with value 1.0 will reach.\n\nMeaningful range of this value is from 2 (subtle blur) to 64 (high blur). By default, the property is set to 32. For the most optimal performance, select as small value as you need.\n\nNote: This affects to both blur and shadow effects.",
+ "name": "BLUR_HELPER_MAX_LEVEL",
+ "type": "define",
+ "value": "64"
+ },
+ {
+ "defaultValue": "0",
+ "description": "This property defines a multiplier for extending the blur radius.\n\nThe value ranges from 0.0 (not multiplied) to inf. By default, the property is set to 0.0. Incresing the multiplier extends the blur radius, but decreases the blur quality. This is more performant option for a bigger blur radius than BLUR_HELPER_MAX_LEVEL as it doesn't increase the amount of texture lookups.\n\nNote: This affects to both blur and shadow effects.",
+ "maxValue": "2",
+ "minValue": "0",
+ "name": "blurMultiplier",
+ "type": "float",
+ "value": "0"
+ }
+ ],
+ "type": 2,
+ "x": 105,
+ "y": 188.875
+ }
+ ],
+ "settings": {
+ "headings": [
+ "// Copyright (C) 2023 The Qt Company Ltd.",
+ "// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause"
+ ]
+ },
+ "version": 1
+ }
+}
diff --git a/examples/quick/multieffect/testbed/qml/CustomMultiEffect/CustomMultiEffect.qml b/examples/quick/multieffect/testbed/qml/CustomMultiEffect/CustomMultiEffect.qml
new file mode 100644
index 0000000000..d0fdf9c1b9
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/CustomMultiEffect/CustomMultiEffect.qml
@@ -0,0 +1,97 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+// Created with Qt Quick Effect Maker (version 0.43), Thu Feb 16 13:48:55 2023
+
+import QtQuick
+
+Item {
+ id: rootItem
+
+ // This is the main source for the effect
+ property Item source: null
+
+ property real contrast: 0
+ property real brightness: 0
+ property real saturation: 0
+ property real colorization: 0
+ property color colorizationColor: Qt.rgba(1, 0, 0, 1)
+ property int blurMax: 32
+ property real blur: 0
+ // This property defines how much blur (radius) is applied to the shadow.
+ //
+ // The value ranges from 0.0 (no blur) to 1.0 (full blur). By default, the property is set to \c 0.0 (no change). The amount of full blur is affected by blurHelperBlurMultiplier.
+ property real shadowBlur: 1
+ property real shadowOpacity: 1
+ property color shadowColor: Qt.rgba(0, 0, 0, 1)
+ property real shadowScale: 1
+ property real shadowHorizontalOffset: 0
+ property real shadowVerticalOffset: 0
+ // Source item for the mask effect. By default the alpha channel of the source item is used for masking but this can be easily adjusted in the shader.
+ property var maskSource: null
+ // This property defines a lower threshold value for the mask pixels. The mask pixels that have an alpha value below this property are used to completely mask away the corresponding pixels from the source item. The mask pixels that have a higher alpha value are used to alphablend the source item to the display.
+ //
+ // The value ranges from 0.0 (alpha value 0) to 1.0 (alpha value 255). By default, the property is set to 0.0.
+ property real maskThresholdMin: 0
+ // This property defines the smoothness of the mask edges near the maskThresholdMin. Setting higher spread values softens the transition from the transparent mask pixels towards opaque mask pixels by adding interpolated values between them.
+ //
+ // The value ranges from 0.0 (sharp mask edge) to 1.0 (smooth mask edge). By default, the property is set to 0.0.
+ property real maskSpreadAtMin: 0
+ // This property defines an upper threshold value for the mask pixels. The mask pixels that have an alpha value below this property are used to completely mask away the corresponding pixels from the source item. The mask pixels that have a higher alpha value are used to alphablend the source item to the display.
+ //
+ // The value ranges from 0.0 (alpha value 0) to 1.0 (alpha value 255). By default, the property is set to 1.0.
+ property real maskThresholdMax: 1
+ // This property defines the smoothness of the mask edges near the maskThresholdMax. Using higher spread values softens the transition from the transparent mask pixels towards opaque mask pixels by adding interpolated values between them.
+ //
+ // The value ranges from 0.0 (sharp mask edge) to 1.0 (smooth mask edge). By default, the property is set to 0.0.
+ property real maskSpreadAtMax: 0
+ // This property switches the mask to the opposite side; instead of masking away the content outside maskThresholdMin and maskThresholdMax, content between them will get masked away.
+ //
+ // By default, the property is set to false.
+ property bool maskInverted: false
+ // This property defines a multiplier for extending the blur radius.
+ //
+ // The value ranges from 0.0 (not multiplied) to inf. By default, the property is set to 0.0. Incresing the multiplier extends the blur radius, but decreases the blur quality. This is more performant option for a bigger blur radius than BLUR_HELPER_MAX_LEVEL as it doesn't increase the amount of texture lookups.
+ //
+ // Note: This affects to both blur and shadow effects.
+ property real blurMultiplier: 0
+
+ BlurHelper {
+ id: blurHelper
+ anchors.fill: parent
+ property int blurMax: 64
+ property real blurMultiplier: rootItem.blurMultiplier
+ }
+ ShaderEffect {
+ readonly property alias iSource: rootItem.source
+ readonly property vector3d iResolution: Qt.vector3d(width, height, 1.0)
+ readonly property alias iSourceBlur1: blurHelper.blurSrc1
+ readonly property alias iSourceBlur2: blurHelper.blurSrc2
+ readonly property alias iSourceBlur3: blurHelper.blurSrc3
+ readonly property alias iSourceBlur4: blurHelper.blurSrc4
+ readonly property alias iSourceBlur5: blurHelper.blurSrc5
+ readonly property alias contrast: rootItem.contrast
+ readonly property alias brightness: rootItem.brightness
+ readonly property alias saturation: rootItem.saturation
+ readonly property alias colorization: rootItem.colorization
+ readonly property alias colorizationColor: rootItem.colorizationColor
+ readonly property alias blurMax: rootItem.blurMax
+ readonly property alias blur: rootItem.blur
+ readonly property alias shadowBlur: rootItem.shadowBlur
+ readonly property alias shadowOpacity: rootItem.shadowOpacity
+ readonly property alias shadowColor: rootItem.shadowColor
+ readonly property alias shadowScale: rootItem.shadowScale
+ readonly property alias shadowHorizontalOffset: rootItem.shadowHorizontalOffset
+ readonly property alias shadowVerticalOffset: rootItem.shadowVerticalOffset
+ readonly property alias maskSource: rootItem.maskSource
+ readonly property alias maskThresholdMin: rootItem.maskThresholdMin
+ readonly property alias maskSpreadAtMin: rootItem.maskSpreadAtMin
+ readonly property alias maskThresholdMax: rootItem.maskThresholdMax
+ readonly property alias maskSpreadAtMax: rootItem.maskSpreadAtMax
+ readonly property alias maskInverted: rootItem.maskInverted
+ readonly property alias blurMultiplier: rootItem.blurMultiplier
+
+ vertexShader: 'custommultieffect.vert.qsb'
+ fragmentShader: 'custommultieffect.frag.qsb'
+ anchors.fill: parent
+ }
+}
diff --git a/examples/quick/multieffect/testbed/qml/CustomMultiEffect/bluritems.frag.qsb b/examples/quick/multieffect/testbed/qml/CustomMultiEffect/bluritems.frag.qsb
new file mode 100644
index 0000000000..054745d277
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/CustomMultiEffect/bluritems.frag.qsb
Binary files differ
diff --git a/examples/quick/multieffect/testbed/qml/CustomMultiEffect/bluritems.vert.qsb b/examples/quick/multieffect/testbed/qml/CustomMultiEffect/bluritems.vert.qsb
new file mode 100644
index 0000000000..6aa0eb1d4e
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/CustomMultiEffect/bluritems.vert.qsb
Binary files differ
diff --git a/examples/quick/multieffect/testbed/qml/CustomMultiEffect/custommultieffect.frag.qsb b/examples/quick/multieffect/testbed/qml/CustomMultiEffect/custommultieffect.frag.qsb
new file mode 100644
index 0000000000..370cf501dc
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/CustomMultiEffect/custommultieffect.frag.qsb
Binary files differ
diff --git a/examples/quick/multieffect/testbed/qml/CustomMultiEffect/custommultieffect.vert.qsb b/examples/quick/multieffect/testbed/qml/CustomMultiEffect/custommultieffect.vert.qsb
new file mode 100644
index 0000000000..c522c25aee
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/CustomMultiEffect/custommultieffect.vert.qsb
Binary files differ
diff --git a/examples/quick/multieffect/testbed/qml/FpsItem.qml b/examples/quick/multieffect/testbed/qml/FpsItem.qml
new file mode 100644
index 0000000000..53042655a3
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/FpsItem.qml
@@ -0,0 +1,65 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Item {
+ id: root
+ property int frameCounter: 0
+ property int frameCounterAvg: 0
+ property int counter: 0
+ property int fps: 0
+ property int fpsAvg: 0
+
+ width: 200 * dp
+ height: Math.floor(42 * dp)
+
+ Image {
+ id: spinnerImage
+ anchors.verticalCenter: parent.verticalCenter
+ x: 4 * dp
+ width: 32 * dp
+ height: width
+ source: "images/spinner.png"
+ NumberAnimation on rotation {
+ from:0
+ to: 360
+ duration: 800
+ loops: Animation.Infinite
+ }
+ onRotationChanged: frameCounter++;
+ }
+ Image {
+ anchors.centerIn: spinnerImage
+ width: 18 * dp
+ height: width
+ source: settings.animateMovement ? "images/play.png" : "images/pause.png"
+ opacity: 0.5
+ }
+
+ Text {
+ anchors.left: spinnerImage.right
+ anchors.leftMargin: 8 * dp
+ anchors.verticalCenter: spinnerImage.verticalCenter
+ color: "#c0c0c0"
+ font.pixelSize: 22 * dp
+ text: "Ø " + root.fpsAvg + " | " + root.fps + " fps"
+ }
+
+ Timer {
+ interval: 2000
+ repeat: true
+ running: true
+ onTriggered: {
+ frameCounterAvg += frameCounter;
+ root.fps = Math.ceil(frameCounter / 2);
+ counter++;
+ frameCounter = 0;
+ if (counter >= 3) {
+ root.fpsAvg = Math.ceil(frameCounterAvg / (2 * counter));
+ frameCounterAvg = 0;
+ counter = 0;
+ }
+ }
+ }
+}
diff --git a/examples/quick/multieffect/testbed/qml/ResetSettingsOverlay.qml b/examples/quick/multieffect/testbed/qml/ResetSettingsOverlay.qml
new file mode 100644
index 0000000000..3931548124
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/ResetSettingsOverlay.qml
@@ -0,0 +1,170 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+
+Item {
+ id: rootItem
+
+ property real showAnimationProgress: 0
+ property int itemWidth: 256 * dp
+ property int lineSpacing1: 0
+ property int lineWidth1: 20 * dp
+ property int lineSpacing2: 10 * dp
+ property int lineWidth2: 10 * dp
+
+ readonly property int cx: itemWidth / 2
+ readonly property int cy: itemWidth / 2
+
+ signal animationFinished
+
+ function startShow() {
+ hideAnimationItem.stop();
+ showAnimationItem.restart();
+ }
+ function stopShow() {
+ showAnimationItem.stop();
+ hideAnimationItem.restart();
+ }
+
+ function ringProgress() {
+ return showAnimationProgress * (2 * Math.PI) - (Math.PI / 2);
+ }
+
+ function useLargeArcFunc() {
+ return (ringProgress() > Math.PI / 2);
+ }
+
+ anchors.fill: parent
+ visible: opacity
+ opacity: 0
+
+ SequentialAnimation {
+ id: showAnimationItem
+ PauseAnimation {
+ duration: 400
+ }
+ ScriptAction {
+ script: {
+ rootItem.showAnimationProgress = 0;
+ }
+ }
+ NumberAnimation {
+ target: rootItem
+ property: "opacity"
+ to: 1
+ duration: 400
+ easing.type: Easing.InOutQuad
+ }
+ NumberAnimation {
+ target: rootItem
+ property: "showAnimationProgress"
+ to: 1
+ duration: 2000
+ easing.type: Easing.InOutQuad
+ }
+ ScriptAction {
+ script: rootItem.animationFinished();
+ }
+ }
+ SequentialAnimation {
+ id: hideAnimationItem
+ NumberAnimation {
+ target: rootItem
+ property: "opacity"
+ to: 0
+ duration: 400
+ easing.type: Easing.InOutQuad
+ }
+ ScriptAction {
+ script: {
+ rootItem.showAnimationProgress = 0;
+ }
+ }
+ }
+
+ Rectangle {
+ anchors.fill: parent
+ color: "#000000"
+ opacity: 0.6
+ }
+
+ Shape {
+ id: shapeItem
+ x: (parent.width / 2) - (itemWidth / 2)
+ y: (parent.height / 2) - (itemWidth / 2)
+ opacity: rootItem.showAnimationProgress
+ width: itemWidth
+ height: itemWidth
+ rotation: rootItem.showAnimationProgress * 360
+ ShapePath {
+ strokeColor: "#606060"
+ fillColor: "transparent"
+ strokeWidth: lineWidth1
+ capStyle: ShapePath.RoundCap
+ PathMove {
+ x: itemWidth / 2
+ y: pathArc1.spacing
+ }
+ PathArc {
+ id: pathArc1
+ property real spacing: lineSpacing1 + lineWidth1
+ x: cx + ((itemWidth / 2 - spacing) * Math.cos(ringProgress()))
+ y: cy + ((itemWidth / 2 - spacing) * Math.sin(ringProgress()))
+ radiusX: itemWidth / 2 - spacing
+ radiusY: itemWidth / 2 - spacing
+ useLargeArc: useLargeArcFunc()
+ }
+ }
+
+ ShapePath {
+ strokeColor: "#808080"
+ fillColor: "transparent"
+ strokeWidth: lineWidth2
+ capStyle: ShapePath.RoundCap
+ PathMove {
+ x: itemWidth / 2
+ y: pathArc2.spacing
+ }
+ PathArc {
+ id: pathArc2
+ property real spacing: lineSpacing2 + lineWidth2
+ x: cx + ((itemWidth / 2 - spacing) * Math.cos(ringProgress()))
+ y: cy + ((itemWidth / 2 - spacing) * Math.sin(ringProgress()))
+ radiusX: itemWidth / 2 - spacing
+ radiusY: itemWidth / 2 - spacing
+ useLargeArc: useLargeArcFunc()
+ }
+ }
+ }
+ Text {
+ id: textItem
+ anchors.centerIn: shapeItem
+ font.pixelSize: 32 * dp
+ color: "#d0d0d0"
+ text: showAnimationProgress < 1 ? qsTr("Reset to default settings?") : qsTr("Reseted!")
+ Behavior on text {
+ SequentialAnimation {
+ NumberAnimation {
+ target: textItem
+ properties: "scale, opacity"
+ to: 0
+ duration: 200
+ easing.type: Easing.InOutQuad
+ }
+ PropertyAction {
+ target: textItem
+ property: "text"
+ }
+ NumberAnimation {
+ target: textItem
+ properties: "scale, opacity"
+ to: 1.0
+ duration: 200
+ easing.type: Easing.InOutQuad
+ }
+ }
+ }
+ }
+}
diff --git a/examples/quick/multieffect/testbed/qml/Settings.qml b/examples/quick/multieffect/testbed/qml/Settings.qml
new file mode 100644
index 0000000000..05947c2ab4
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/Settings.qml
@@ -0,0 +1,92 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+QtObject {
+ id: rootItem
+
+ // Emitted when settings are reseted to default
+ signal reseted
+
+ // When adding settings here remember to add them also into reset()
+
+ // *** General settings - No UI for these ***
+ // Change to false to not show settings view at all
+ property bool showSettingsView: true
+ property real settingsViewWidth: 100 + 150 * dp
+ property bool animateMovement: true
+ property bool showShader: false
+ property bool showItemSize: false
+ property bool showCustomMultiEffect: false
+
+ property bool autoPaddingEnabled: true
+ property rect paddingRect: Qt.rect(0, 0, 0, 0)
+
+ property bool brightnessEnabled: true
+ property real brightness: 0.0
+ property bool contrastEnabled: true
+ property real contrast: 0.0
+ property bool saturationEnabled: true
+ property real saturation: 0.0
+ property bool colorizationEnabled: true
+ property color colorizationColor: Qt.rgba(1.0, 0.0, 0.0, 1.0)
+ property real colorization: 0.0
+
+ property bool blurEnabled: true
+ property real blur: 0.0
+ property int blurMax: 32
+ property real blurMultiplier: 0.0
+
+ property bool shadowEnabled: true
+ property real shadowOpacity: 1.0
+ property real shadowBlur: 1.0
+ property real shadowHorizontalOffset: 10
+ property real shadowVerticalOffset: 5
+ property color shadowColor: Qt.rgba(0.0, 0.0, 0.0, 1.0)
+ property real shadowScale: 1.0
+
+ property bool maskEnabled: true
+ property bool maskInverted: false
+ property real maskThresholdMin: 0.0
+ property real maskSpreadAtMin: 0.0
+ property real maskThresholdMax: 1.0
+ property real maskSpreadAtMax: 0.0
+
+ function reset() {
+ autoPaddingEnabled = defaultSettings.autoPaddingEnabled;
+ paddingRect = defaultSettings.paddingRect;
+
+ brightnessEnabled = defaultSettings.brightnessEnabled;
+ brightness = defaultSettings.brightness;
+ contrastEnabled = defaultSettings.contrastEnabled;
+ contrast = defaultSettings.contrast;
+ saturationEnabled = defaultSettings.saturationEnabled;
+ saturation = defaultSettings.saturation;
+ colorizationEnabled = defaultSettings.colorizationEnabled;
+ colorizationColor = defaultSettings.colorizationColor;
+ colorization = defaultSettings.colorization;
+
+ blurEnabled = defaultSettings.blurEnabled;
+ blur = defaultSettings.blur;
+ blurMax = defaultSettings.blurMax;
+ blurMultiplier = defaultSettings.blurMultiplier;
+
+ shadowEnabled = defaultSettings.shadowEnabled;
+ shadowOpacity = defaultSettings.shadowOpacity;
+ shadowBlur = defaultSettings.shadowBlur;
+ shadowHorizontalOffset = defaultSettings.shadowHorizontalOffset;
+ shadowVerticalOffset = defaultSettings.shadowVerticalOffset;
+ shadowColor = defaultSettings.shadowColor;
+ shadowScale = defaultSettings.shadowScale;
+
+ maskEnabled = defaultSettings.maskEnabled;
+ maskInverted = defaultSettings.maskInverted;
+ maskThresholdMin = defaultSettings.maskThresholdMin;
+ maskSpreadAtMin = defaultSettings.maskSpreadAtMin;
+ maskThresholdMax = defaultSettings.maskThresholdMax;
+ maskSpreadAtMax = defaultSettings.maskSpreadAtMax;
+
+ rootItem.reseted();
+ }
+}
diff --git a/examples/quick/multieffect/testbed/qml/SettingsComponentCheckBox.qml b/examples/quick/multieffect/testbed/qml/SettingsComponentCheckBox.qml
new file mode 100644
index 0000000000..ef1cb27d89
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/SettingsComponentCheckBox.qml
@@ -0,0 +1,35 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.Material
+
+Column {
+ id: rootItem
+
+ property alias text: textItem.text
+ property alias checked: checkBox.checked
+
+ signal toggled
+
+ Material.theme: Material.Dark
+ Material.accent: Material.LightGreen
+ spacing: -12
+
+ Row {
+ CheckBox {
+ id: checkBox
+ checked: true
+ onToggled: {
+ rootItem.toggled();
+ }
+ }
+ Text {
+ id: textItem
+ anchors.verticalCenter: parent.verticalCenter
+ color: "#f0f0f0"
+ font.pixelSize: 14 * dp
+ }
+ }
+}
diff --git a/examples/quick/multieffect/testbed/qml/SettingsComponentColorSelector.qml b/examples/quick/multieffect/testbed/qml/SettingsComponentColorSelector.qml
new file mode 100644
index 0000000000..c158f84a7d
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/SettingsComponentColorSelector.qml
@@ -0,0 +1,135 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.Material
+
+Column {
+ id: rootItem
+
+ property alias text: textItem.text
+ readonly property color value: Qt.rgba(colorRed, colorGreen, colorBlue, 1.0)
+ readonly property real colorRed: sliderRed.value
+ readonly property real colorGreen: sliderGreen.value
+ readonly property real colorBlue: sliderBlue.value
+ readonly property real itemWidth: (rootItem.width / 3) - itemMargin
+ readonly property real itemMargin: 4
+ readonly property real colorBarHeight: 4
+
+ // Use this to set the initial values
+ function setValues(r, g, b) {
+ sliderRed.value = r;
+ sliderGreen.value = g;
+ sliderBlue.value = b;
+ }
+
+ Material.theme: Material.Dark
+ Material.accent: Material.LightGreen
+ spacing: -12
+ width: 200
+
+ Text {
+ id: textItem
+ anchors.horizontalCenter: parent.horizontalCenter
+ color: "#f0f0f0"
+ font.pixelSize: 14 * dp
+ }
+ Item {
+ width: 1
+ height: 36
+ }
+
+ Row {
+ x: itemMargin / 2
+ spacing: itemMargin
+ opacity: rootItem.enabled ? 1.0 : 0.2
+ Column {
+ Rectangle {
+ width: rootItem.itemWidth
+ height: colorBarHeight
+ border.width: 1
+ border.color: "#202020"
+ gradient: Gradient {
+ orientation: Gradient.Horizontal
+ GradientStop { position: 0.0; color: Qt.rgba(0.0, colorGreen, colorBlue, 1.0) }
+ GradientStop { position: 1.0; color: Qt.rgba(1.0, colorGreen, colorBlue, 1.0) }
+ }
+ Text {
+ id: textItemRed
+ anchors.centerIn: parent
+ color: "#f0f0f0"
+ style: Text.Outline
+ styleColor: "#000000"
+ text: "R: " + Math.ceil(sliderRed.value * 255)
+ font.pixelSize: 14 * dp
+ }
+ }
+ Slider {
+ id: sliderRed
+ width: rootItem.itemWidth
+ value: 0
+ from: 0
+ to: 1
+ }
+ }
+ Column {
+ Rectangle {
+ width: rootItem.itemWidth
+ height: colorBarHeight
+ border.width: 1
+ border.color: "#202020"
+ gradient: Gradient {
+ orientation: Gradient.Horizontal
+ GradientStop { position: 0.0; color: Qt.rgba(colorRed, 0.0, colorBlue, 1.0) }
+ GradientStop { position: 1.0; color: Qt.rgba(colorRed, 1.0, colorBlue, 1.0) }
+ }
+ Text {
+ id: textItemGreen
+ anchors.centerIn: parent
+ color: "#f0f0f0"
+ style: Text.Outline
+ styleColor: "#000000"
+ text: "G: " + Math.ceil(sliderGreen.value * 255)
+ font.pixelSize: 14 * dp
+ }
+ }
+ Slider {
+ id: sliderGreen
+ width: rootItem.itemWidth
+ value: 0
+ from: 0
+ to: 1
+ }
+ }
+ Column {
+ Rectangle {
+ width: rootItem.itemWidth
+ height: colorBarHeight
+ border.width: 1
+ border.color: "#202020"
+ gradient: Gradient {
+ orientation: Gradient.Horizontal
+ GradientStop { position: 0.0; color: Qt.rgba(colorRed, colorGreen, 0.0, 1.0) }
+ GradientStop { position: 1.0; color: Qt.rgba(colorRed, colorGreen, 1.0, 1.0) }
+ }
+ Text {
+ id: textItemBlue
+ anchors.centerIn: parent
+ color: "#f0f0f0"
+ style: Text.Outline
+ styleColor: "#000000"
+ text: "B: " + Math.ceil(sliderBlue.value * 255)
+ font.pixelSize: 14 * dp
+ }
+ }
+ Slider {
+ id: sliderBlue
+ width: rootItem.itemWidth
+ value: 0
+ from: 0
+ to: 1
+ }
+ }
+ }
+}
diff --git a/examples/quick/multieffect/testbed/qml/SettingsComponentSlider.qml b/examples/quick/multieffect/testbed/qml/SettingsComponentSlider.qml
new file mode 100644
index 0000000000..ed04584e44
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/SettingsComponentSlider.qml
@@ -0,0 +1,54 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.Material
+
+Column {
+ id: rootItem
+
+ property alias text: textItem.text
+ property alias value: slider.value
+ property alias from: slider.from
+ property alias to: slider.to
+ property alias checked: checkBox.checked
+ property alias stepSize: slider.stepSize
+ property bool showCheckbox: false
+
+ signal toggled
+ signal moved
+
+ Material.theme: Material.Dark
+ Material.accent: Material.LightGreen
+ spacing: -12
+
+ Text {
+ id: textItem
+ anchors.horizontalCenter: parent.horizontalCenter
+ color: "#f0f0f0"
+ font.pixelSize: 14 * dp
+ }
+
+ Row {
+ CheckBox {
+ id: checkBox
+ visible: rootItem.showCheckbox
+ checked: true
+ onToggled: {
+ rootItem.toggled();
+ }
+ }
+ Slider {
+ id: slider
+ property real sliderWidth: settings.settingsViewWidth - 50
+ width: rootItem.showCheckbox ? sliderWidth : sliderWidth + checkBox.width
+ value: 50
+ from: 0
+ to: 800
+ onMoved: {
+ rootItem.moved();
+ }
+ }
+ }
+}
diff --git a/examples/quick/multieffect/testbed/qml/SettingsComponentView.qml b/examples/quick/multieffect/testbed/qml/SettingsComponentView.qml
new file mode 100644
index 0000000000..08eb0ad300
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/SettingsComponentView.qml
@@ -0,0 +1,147 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Column {
+ id: rootItem
+
+ property alias text: textItem.text
+ property bool show: true
+
+ default property alias contents: contentItem.children
+ property real showHideAnimationSpeed: 400
+
+ width: settings.settingsViewWidth
+
+ Component.onCompleted: {
+ // Set initial open state
+ contentItem.visible = rootItem.show;
+ contentItem.opacity = rootItem.show;
+ contentItemArea.height = rootItem.show ? contentItem.height : 0;
+ }
+
+ Item {
+ id: lightsSettings
+ width: parent.width
+ height: 30
+ Rectangle {
+ anchors.fill: parent
+ color: "#404040"
+ border.width: 1
+ border.color: "#808080"
+ opacity: 0.4
+ }
+ Image {
+ x: 8
+ source: "images/arrow.png"
+ anchors.verticalCenter: parent.verticalCenter
+ rotation: rootItem.show ? 90 : 0
+ Behavior on rotation {
+ NumberAnimation {
+ duration: showHideAnimationSpeed
+ easing.type: Easing.InOutQuad
+ }
+ }
+ }
+
+ Text {
+ id: textItem
+ x: 30
+ anchors.verticalCenter: parent.verticalCenter
+ color: "#f0f0f0"
+ font.bold: true
+ font.pixelSize: 16 * dp
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ rootItem.show = !rootItem.show;
+ if (rootItem.show) {
+ hideAnimation.stop();
+ showAnimation.start();
+ } else {
+ showAnimation.stop();
+ hideAnimation.start();
+ }
+
+ }
+ }
+ }
+
+ Item {
+ width: 1
+ height: 5
+ }
+
+ SequentialAnimation {
+ id: showAnimation
+ ScriptAction {
+ script: contentItem.visible = true;
+ }
+ ParallelAnimation {
+ NumberAnimation {
+ target: contentItemArea
+ property: "height"
+ to: contentItem.height
+ duration: showHideAnimationSpeed
+ easing.type: Easing.InOutQuad
+ }
+ SequentialAnimation {
+ PauseAnimation {
+ duration: showHideAnimationSpeed / 2
+ }
+ NumberAnimation {
+ target: contentItem
+ property: "opacity"
+ to: 1.0
+ duration: showHideAnimationSpeed / 2
+ easing.type: Easing.InOutQuad
+ }
+ }
+ }
+ }
+
+ SequentialAnimation {
+ id: hideAnimation
+ ParallelAnimation {
+ NumberAnimation {
+ target: contentItemArea
+ property: "height"
+ to: 0
+ duration: showHideAnimationSpeed
+ easing.type: Easing.InOutQuad
+ }
+ SequentialAnimation {
+ NumberAnimation {
+ target: contentItem
+ property: "opacity"
+ to: 0
+ duration: showHideAnimationSpeed / 2
+ easing.type: Easing.InOutQuad
+ }
+ PauseAnimation {
+ duration: showHideAnimationSpeed / 2
+ }
+ }
+ }
+ ScriptAction {
+ script: contentItem.visible = false;
+ }
+ }
+
+ Item {
+ id: contentItemArea
+ width: parent.width - 10
+ x: 5
+ Column {
+ id: contentItem
+ spacing: -10
+ }
+ }
+
+ Item {
+ width: 1
+ height: 5
+ }
+}
diff --git a/examples/quick/multieffect/testbed/qml/SettingsView.qml b/examples/quick/multieffect/testbed/qml/SettingsView.qml
new file mode 100644
index 0000000000..789f7685c2
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/SettingsView.qml
@@ -0,0 +1,407 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls.Material
+
+Item {
+ id: rootItem
+
+ property bool show: true
+ property real showAnimation: show ? 1 : 0
+
+ function resetSettings() {
+ colorizationColorSelector.setValues(defaultSettings.colorizationColor.r,
+ defaultSettings.colorizationColor.g,
+ defaultSettings.colorizationColor.b);
+ shadowColorSelector.setValues(defaultSettings.shadowColor.r,
+ defaultSettings.shadowColor.g,
+ defaultSettings.shadowColor.b);
+ }
+
+ Material.theme: Material.Dark
+ Material.accent: Material.LightGreen
+ width: settings.settingsViewWidth
+ x: -(width + 30) * (1 - showAnimation) + 20
+
+ Behavior on showAnimation {
+ NumberAnimation {
+ duration: 400
+ easing.type: Easing.InOutQuad
+ }
+ }
+
+ // Open/close button
+ Item {
+ width: 30 * dp
+ height: 30 * dp
+ anchors.left: parent.right
+ anchors.leftMargin: 20
+ anchors.top: parent.top
+ anchors.topMargin: -10
+ Rectangle {
+ anchors.fill: parent
+ color: "#404040"
+ opacity: 0.4
+ border.width: 1
+ border.color: "#808080"
+ }
+
+ Image {
+ anchors.centerIn: parent
+ source: "images/arrow.png"
+ rotation: rootItem.showAnimation * 180
+ }
+ MouseArea {
+ anchors.fill: parent
+ anchors.margins: -30 * dp
+ onClicked: {
+ rootItem.show = !rootItem.show;
+ }
+ }
+ }
+
+ // Background
+ Rectangle {
+ anchors.fill: scrollView
+ opacity: showAnimation ? 0.6 : 0
+ visible: opacity
+ anchors.margins: -10
+ color: "#202020"
+ border.color: "#808080"
+ border.width: 1
+ }
+
+ ScrollView {
+ id: scrollView
+ anchors.fill: parent
+ ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
+ ScrollBar.vertical.interactive: false
+ clip: true
+ Column {
+ id: settingsArea
+ anchors.fill: parent
+ opacity: showAnimation
+ visible: opacity
+
+ Item {
+ width: 1
+ height: 20 * dp
+ }
+ Image {
+ anchors.horizontalCenter: parent.horizontalCenter
+ fillMode: Image.PreserveAspectFit
+ width: parent.width * 0.8
+ height: width * 0.25
+ source: "images/Built_with_Qt_RGB_logo.png"
+ }
+ Item {
+ width: 1
+ height: 28 * dp
+ }
+
+ SettingsComponentView {
+ id: settingsViewGeneral
+ text: qsTr("General")
+ show: true
+ SettingsComponentCheckBox {
+ text: "Show Shaders"
+ checked: settings.showShader
+ onToggled: {
+ settings.showShader = checked;
+ }
+ }
+ SettingsComponentCheckBox {
+ text: "Show Item Size"
+ checked: settings.showItemSize
+ onToggled: {
+ settings.showItemSize = checked;
+ }
+ }
+ SettingsComponentCheckBox {
+ text: "AutoPadding Enabled"
+ checked: settings.autoPaddingEnabled
+ onToggled: {
+ settings.autoPaddingEnabled = checked;
+ }
+ }
+ SettingsComponentCheckBox {
+ text: "Show Custom MultiEffect"
+ checked: settings.showCustomMultiEffect
+ onToggled: {
+ settings.showCustomMultiEffect = checked;
+ }
+ }
+ Item {
+ width: 1
+ height: 20 * dp
+ }
+ SettingsComponentSlider {
+ text: qsTr("Padding Left") + ": " + value.toFixed(0)
+ value: settings.paddingRect.x
+ from: 0.0
+ to: 300
+ onMoved: {
+ settings.paddingRect.x = value;
+ }
+ }
+ SettingsComponentSlider {
+ text: qsTr("Padding Right") + ": " + value.toFixed(0)
+ value: settings.paddingRect.width
+ from: 0.0
+ to: 300
+ onMoved: {
+ settings.paddingRect.width = value;
+ }
+ }
+ SettingsComponentSlider {
+ text: qsTr("Padding Top") + ": " + value.toFixed(0)
+ value: settings.paddingRect.y
+ from: 0.0
+ to: 300
+ onMoved: {
+ settings.paddingRect.y = value;
+ }
+ }
+ SettingsComponentSlider {
+ text: qsTr("Padding Bottom") + ": " + value.toFixed(0)
+ value: settings.paddingRect.height
+ from: 0.0
+ to: 300
+ onMoved: {
+ settings.paddingRect.height = value;
+ }
+ }
+ }
+
+ SettingsComponentView {
+ text: qsTr("Color")
+ show: false
+ SettingsComponentSlider {
+ text: qsTr("Brightness") + ": " + value.toFixed(3)
+ showCheckbox: true
+ checked: settings.brightnessEnabled
+ onToggled: {
+ settings.brightnessEnabled = checked;
+ }
+ value: settings.brightness
+ from: -1
+ to: 1
+ onMoved: {
+ settings.brightness = value;
+ }
+ }
+ SettingsComponentSlider {
+ text: qsTr("Contrast") + ": " + value.toFixed(3)
+ showCheckbox: true
+ checked: settings.contrastEnabled
+ onToggled: {
+ settings.contrastEnabled = checked;
+ }
+ value: settings.contrast
+ from: -1
+ to: 1
+ onMoved: {
+ settings.contrast = value;
+ }
+ }
+ SettingsComponentSlider {
+ text: qsTr("Saturation") + ": " + value.toFixed(3)
+ showCheckbox: true
+ checked: settings.saturationEnabled
+ onToggled: {
+ settings.saturationEnabled = checked;
+ }
+ value: settings.saturation
+ from: -1
+ to: 1
+ onMoved: {
+ settings.saturation = value;
+ }
+ }
+ SettingsComponentSlider {
+ text: qsTr("Colorization") + ": " + value.toFixed(3)
+ showCheckbox: true
+ checked: settings.colorizationEnabled
+ onToggled: {
+ settings.colorizationEnabled = checked;
+ }
+ value: settings.colorization
+ from: 0
+ to: 1
+ onMoved: {
+ settings.colorization = value;
+ }
+ }
+ SettingsComponentColorSelector {
+ id: colorizationColorSelector
+ text: qsTr("Colorization Color")
+ width: settings.settingsViewWidth - 10
+ onValueChanged: {
+ settings.colorizationColor = value;
+ }
+ }
+ }
+ SettingsComponentView {
+ text: qsTr("Blur")
+ show: false
+
+ SettingsComponentSlider {
+ text: qsTr("Blur") + ": " + value.toFixed(3)
+ showCheckbox: true
+ checked: settings.blurEnabled
+ onToggled: {
+ settings.blurEnabled = checked;
+ }
+ value: settings.blur
+ from: 0
+ to: 1.0
+ onMoved: {
+ settings.blur = value;
+ }
+ }
+ SettingsComponentSlider {
+ text: qsTr("Blur Multiplier") + ": " + value.toFixed(3)
+ value: settings.blurMultiplier
+ from: 0.0
+ to: 2.0
+ onMoved: {
+ settings.blurMultiplier = value;
+ }
+ }
+ SettingsComponentSlider {
+ text: qsTr("Blur Max") + ": " + value.toFixed(0)
+ value: settings.blurMax
+ from: 0
+ to: 64
+ stepSize: 2
+ onMoved: {
+ settings.blurMax = value;
+ }
+ }
+
+ }
+ SettingsComponentView {
+ text: qsTr("Shadow")
+ show: false
+
+ SettingsComponentSlider {
+ text: qsTr("Shadow") + ": " + value.toFixed(3)
+ showCheckbox: true
+ checked: settings.shadowEnabled
+ onToggled: {
+ settings.shadowEnabled = checked;
+ }
+ value: settings.shadowOpacity
+ from: 0
+ to: 1.0
+ onMoved: {
+ settings.shadowOpacity = value;
+ }
+ }
+ SettingsComponentSlider {
+ text: qsTr("Shadow Blur") + ": " + value.toFixed(3)
+ value: settings.shadowBlur
+ from: 0.0
+ to: 1.0
+ onMoved: {
+ settings.shadowBlur = value;
+ }
+ }
+ SettingsComponentSlider {
+ text: qsTr("Shadow HorizontalOffset") + ": " + value.toFixed(1)
+ value: settings.shadowHorizontalOffset
+ from: -20.0
+ to: 20.0
+ onMoved: {
+ settings.shadowHorizontalOffset = value;
+ }
+ }
+ SettingsComponentSlider {
+ text: qsTr("Shadow VerticalOffset") + ": " + value.toFixed(1)
+ value: settings.shadowVerticalOffset
+ from: -20.0
+ to: 20.0
+ onMoved: {
+ settings.shadowVerticalOffset = value;
+ }
+ }
+ SettingsComponentSlider {
+ text: qsTr("Shadow Scale") + ": " + value.toFixed(3)
+ value: settings.shadowScale
+ from: 0.8
+ to: 1.2
+ onMoved: {
+ settings.shadowScale = value;
+ }
+ }
+ SettingsComponentColorSelector {
+ id: shadowColorSelector
+ text: qsTr("Shadow Color")
+ width: settings.settingsViewWidth - 10
+ onValueChanged: {
+ settings.shadowColor = value;
+ }
+ }
+ }
+ SettingsComponentView {
+ text: qsTr("Mask")
+ show: false
+ SettingsComponentCheckBox {
+ text: "Mask Enabled"
+ checked: settings.maskEnabled
+ onToggled: {
+ settings.maskEnabled = checked;
+ }
+ }
+ SettingsComponentCheckBox {
+ text: "Mask Inverted"
+ checked: settings.maskInverted
+ onToggled: {
+ settings.maskInverted = checked;
+ }
+ }
+ Item {
+ width: 1
+ height: 20 * dp
+ }
+ SettingsComponentSlider {
+ text: qsTr("Mask Threshold Min") + ": " + value.toFixed(3)
+ value: settings.maskThresholdMin
+ from: 0.0
+ to: 1.0
+ onMoved: {
+ settings.maskThresholdMin = value;
+ }
+ }
+ SettingsComponentSlider {
+ text: qsTr("Mask Spread At Min") + ": " + value.toFixed(3)
+ value: settings.maskSpreadAtMin
+ from: 0.0
+ to: 1.0
+ onMoved: {
+ settings.maskSpreadAtMin = value;
+ }
+ }
+ SettingsComponentSlider {
+ text: qsTr("Mask Threshold Max") + ": " + value.toFixed(3)
+ value: settings.maskThresholdMax
+ from: 0.0
+ to: 1.0
+ onMoved: {
+ settings.maskThresholdMax = value;
+ }
+ }
+ SettingsComponentSlider {
+ text: qsTr("Mask Spread At Max") + ": " + value.toFixed(3)
+ value: settings.maskSpreadAtMax
+ from: 0.0
+ to: 1.0
+ onMoved: {
+ settings.maskSpreadAtMax = value;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/examples/quick/multieffect/testbed/qml/ShaderView.qml b/examples/quick/multieffect/testbed/qml/ShaderView.qml
new file mode 100644
index 0000000000..fc89f5aec5
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/ShaderView.qml
@@ -0,0 +1,29 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Item {
+ id: rootItem
+
+ property string text
+
+ width: textItem.width
+ height: textItem.height
+
+ Rectangle {
+ anchors.fill: textItem
+ anchors.margins: -10
+ z: -1
+ color: "#000000"
+ opacity: 0.6
+ border.color: "#ffffff"
+ border.width: 2
+ }
+ Text {
+ id: textItem
+ text: rootItem.text
+ font.pixelSize: 16
+ color: "#ffffff"
+ }
+}
diff --git a/examples/quick/multieffect/testbed/qml/TestMaskItem.qml b/examples/quick/multieffect/testbed/qml/TestMaskItem.qml
new file mode 100644
index 0000000000..4ba5950b96
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/TestMaskItem.qml
@@ -0,0 +1,17 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Item {
+ id: rootItem
+ layer.enabled: true
+ visible: false
+ Rectangle {
+ anchors.fill: parent
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "#00000000" }
+ GradientStop { position: 1.0; color: "#ffffffff" }
+ }
+ }
+}
diff --git a/examples/quick/multieffect/testbed/qml/TestSourceItem.qml b/examples/quick/multieffect/testbed/qml/TestSourceItem.qml
new file mode 100644
index 0000000000..ca5ca387ec
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/TestSourceItem.qml
@@ -0,0 +1,113 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.Material
+
+Item {
+ id: rootItem
+
+ Material.theme: Material.Dark
+ Material.accent: Material.LightGreen
+
+ Image {
+ anchors.centerIn: parent
+ width: parent.width / 2
+ height: parent.height / 2
+ sourceSize.width: width
+ sourceSize.height: height
+ source: "images/Built_with_Qt.png"
+ fillMode: Image.PreserveAspectFit
+ SequentialAnimation on anchors.verticalCenterOffset {
+ loops: Animation.Infinite
+ paused: !settings.animateMovement
+ NumberAnimation {
+ to: 50
+ duration: 2000
+ easing.type: Easing.InOutQuad
+ }
+ NumberAnimation {
+ to: -50
+ duration: 2000
+ easing.type: Easing.InOutQuad
+ }
+ }
+ }
+ Text {
+ font.pixelSize: 50
+ font.bold: true
+ text: "TESTING"
+ color: "white"
+ }
+ Image {
+ source: "images/warning.png"
+ anchors.bottom: parent.bottom
+ anchors.left: parent.left
+ mipmap: true
+ SequentialAnimation on scale {
+ loops: Animation.Infinite
+ paused: !settings.animateMovement
+ NumberAnimation {
+ to: 0.4
+ duration: 3000
+ easing.type: Easing.InOutQuad
+ }
+ NumberAnimation {
+ to: 1.0
+ duration: 1000
+ easing.type: Easing.OutBack
+ }
+ }
+
+ }
+ Rectangle {
+ width: parent.width * 0.2
+ height: width
+ anchors.top: parent.top
+ anchors.topMargin: width * 0.2
+ anchors.right: parent.right
+ anchors.rightMargin: width * 0.2
+ color: "#808080"
+ border.color: "#f0f0f0"
+ border.width: 2
+ radius: width * 0.1
+ SequentialAnimation on opacity {
+ paused: !settings.animateMovement
+ loops: Animation.Infinite
+ NumberAnimation {
+ to: 0.0
+ duration: 2000
+ easing.type: Easing.InOutQuad
+ }
+ NumberAnimation {
+ to: 1.0
+ duration: 2000
+ easing.type: Easing.InOutQuad
+ }
+ }
+
+ NumberAnimation on rotation {
+ paused: !settings.animateMovement
+ loops: Animation.Infinite
+ from: 0
+ to: 360
+ duration: 10000
+ }
+ }
+
+ Column {
+ anchors.right: parent.right
+ anchors.rightMargin: width * 0.2
+ anchors.bottom: parent.bottom
+ Button {
+ id: button
+ text: "Controls Button"
+ Material.theme: Material.Light
+ }
+ Slider {
+ width: button.width
+ }
+ }
+}
+
diff --git a/examples/quick/multieffect/testbed/qml/WarningsItem.qml b/examples/quick/multieffect/testbed/qml/WarningsItem.qml
new file mode 100644
index 0000000000..201332c87b
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/WarningsItem.qml
@@ -0,0 +1,66 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Item {
+ id: rootItem
+
+ property string text
+
+ function show() {
+ showAnimation.restart();
+ }
+
+ height: 42
+ width: warningIcon.width + textItem.width + 40
+ opacity: 0
+
+ Rectangle {
+ anchors.fill: parent
+ color: "#000000"
+ opacity: 0.6
+ }
+
+ SequentialAnimation {
+ id: showAnimation
+ NumberAnimation {
+ target: rootItem
+ property: "opacity"
+ to: 1
+ duration: 400
+ easing.type: Easing.InOutQuad
+ }
+ PauseAnimation {
+ duration: 2000
+ }
+ NumberAnimation {
+ target: rootItem
+ property: "opacity"
+ to: 0
+ duration: 400
+ easing.type: Easing.InOutQuad
+ }
+ }
+
+ Image {
+ id: warningIcon
+ anchors.verticalCenter: parent.verticalCenter
+ x: 8
+ source: "images/warning.png"
+ mipmap: true
+ width: 24
+ height: width
+ }
+
+ Text {
+ id: textItem
+ anchors.left: warningIcon.right
+ anchors.leftMargin: 8
+ anchors.verticalCenter: parent.verticalCenter
+ color: "#ffffff"
+ font.pixelSize: 16
+ text: rootItem.text
+ }
+
+}
diff --git a/examples/quick/multieffect/testbed/qml/WarningsView.qml b/examples/quick/multieffect/testbed/qml/WarningsView.qml
new file mode 100644
index 0000000000..c25ad5fccd
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/WarningsView.qml
@@ -0,0 +1,38 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Item {
+ id: rootItem
+
+ function showShaderWarning() {
+ shaderWarning.show();
+ }
+ function showSizeWarning() {
+ sizeWarning.show();
+ }
+
+ height: 60
+
+ WarningsItem {
+ id: shaderWarning
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ text: qsTr("Shader changed!")
+ }
+ WarningsItem {
+ id: sizeWarning
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: shaderWarning.right
+ anchors.leftMargin: 16
+ text: qsTr("Item resized!")
+ }
+ WarningsItem {
+ id: customEffectWarning
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ text: qsTr("<b>Note:</b> Custom MultiEffect doesn't support all the MultiEffect features, like paddings and disabling effects.")
+ opacity: settings.showCustomMultiEffect
+ }
+}
diff --git a/examples/quick/multieffect/testbed/qml/images/Built_with_Qt.png b/examples/quick/multieffect/testbed/qml/images/Built_with_Qt.png
new file mode 100644
index 0000000000..e612481510
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/images/Built_with_Qt.png
Binary files differ
diff --git a/examples/quick/multieffect/testbed/qml/images/Built_with_Qt_RGB_logo.png b/examples/quick/multieffect/testbed/qml/images/Built_with_Qt_RGB_logo.png
new file mode 100644
index 0000000000..8d2dfc17ec
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/images/Built_with_Qt_RGB_logo.png
Binary files differ
diff --git a/examples/quick/multieffect/testbed/qml/images/arrow.png b/examples/quick/multieffect/testbed/qml/images/arrow.png
new file mode 100644
index 0000000000..067bec4509
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/images/arrow.png
Binary files differ
diff --git a/examples/quick/multieffect/testbed/qml/images/pause.png b/examples/quick/multieffect/testbed/qml/images/pause.png
new file mode 100644
index 0000000000..ef6e0ac26a
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/images/pause.png
Binary files differ
diff --git a/examples/quick/multieffect/testbed/qml/images/play.png b/examples/quick/multieffect/testbed/qml/images/play.png
new file mode 100644
index 0000000000..4cd0f78184
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/images/play.png
Binary files differ
diff --git a/examples/quick/multieffect/testbed/qml/images/spinner.png b/examples/quick/multieffect/testbed/qml/images/spinner.png
new file mode 100644
index 0000000000..3ff86d53ac
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/images/spinner.png
Binary files differ
diff --git a/examples/quick/multieffect/testbed/qml/images/warning.png b/examples/quick/multieffect/testbed/qml/images/warning.png
new file mode 100644
index 0000000000..08d74b8b83
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/images/warning.png
Binary files differ
diff --git a/examples/quick/multieffect/testbed/qml/main.qml b/examples/quick/multieffect/testbed/qml/main.qml
new file mode 100644
index 0000000000..8fc761169e
--- /dev/null
+++ b/examples/quick/multieffect/testbed/qml/main.qml
@@ -0,0 +1,186 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Window
+import QtQuick.Effects
+import "CustomMultiEffect"
+
+Rectangle {
+ id: mainWindow
+
+ // Multiplier for resolution independency
+ readonly property real dp: 0.2 + Math.min(width, height) / 1200
+
+ width: 1280
+ height: 720
+ color: "#404040"
+
+ Settings {
+ id: settings
+ onReseted: {
+ settingsView.resetSettings();
+ }
+ }
+
+ Settings {
+ id: defaultSettings
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ if (resetSettingsOverlay.showAnimationProgress == 0)
+ settings.animateMovement = !settings.animateMovement;
+ }
+ onPressed: {
+ resetSettingsOverlay.startShow();
+ }
+ onReleased: {
+ resetSettingsOverlay.stopShow();
+ }
+ }
+
+
+ Item {
+ id: mainArea
+ anchors.left: settingsView.right
+ anchors.right: parent.right
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+
+ TestSourceItem {
+ id: testSourceItem
+ anchors.centerIn: parent
+ width: parent.width / 2
+ height: parent.height / 2
+
+ layer.enabled: true
+ visible: false
+ }
+ TestMaskItem {
+ id: testMaskItem
+ anchors.fill: testSourceItem
+ }
+
+ Rectangle {
+ readonly property int margin: 2
+ x: quickMultiEffect.x + quickMultiEffect.itemRect.x - margin
+ y: quickMultiEffect.y + quickMultiEffect.itemRect.y - margin
+ width: quickMultiEffect.itemRect.width + margin * 2
+ height: quickMultiEffect.itemRect.height + margin * 2
+ visible: settings.showItemSize
+ color: "transparent"
+ border.color: "#ffffff"
+ border.width: 2
+ }
+
+ MultiEffect {
+ id: quickMultiEffect
+ anchors.fill: testSourceItem
+ visible: !settings.showCustomMultiEffect
+ source: testSourceItem
+ maskSource: testMaskItem
+ autoPaddingEnabled: settings.autoPaddingEnabled
+ paddingRect: settings.paddingRect
+ brightness: settings.brightnessEnabled ? settings.brightness : 0
+ contrast: settings.contrastEnabled ? settings.contrast : 0
+ saturation: settings.saturationEnabled ? settings.saturation : 0
+ colorizationColor: settings.colorizationColor
+ colorization: settings.colorizationEnabled ? settings.colorization : 0
+ blurEnabled: settings.blurEnabled
+ blur: settings.blur
+ blurMax: settings.blurMax
+ blurMultiplier: settings.blurMultiplier
+ shadowEnabled: settings.shadowEnabled
+ shadowOpacity: settings.shadowOpacity
+ shadowBlur: settings.shadowBlur
+ shadowHorizontalOffset: settings.shadowHorizontalOffset
+ shadowVerticalOffset: settings.shadowVerticalOffset
+ shadowColor: settings.shadowColor
+ shadowScale: settings.shadowScale
+ maskEnabled: settings.maskEnabled
+ maskInverted: settings.maskInverted
+ maskThresholdMin: settings.maskThresholdMin
+ maskSpreadAtMin: settings.maskSpreadAtMin
+ maskThresholdMax: settings.maskThresholdMax
+ maskSpreadAtMax: settings.maskSpreadAtMax
+
+ onItemSizeChanged: {
+ if (visible)
+ warningsView.showSizeWarning();
+ }
+ onShaderChanged: {
+ if (visible)
+ warningsView.showShaderWarning();
+ }
+ }
+
+ // For comparison, custom effect created with QQEM and the MultiEffect node.
+ CustomMultiEffect {
+ id: customMultiEffect
+ anchors.fill: testSourceItem
+ visible: settings.showCustomMultiEffect
+ source: testSourceItem
+ maskSource: testMaskItem
+ brightness: settings.brightnessEnabled ? settings.brightness : 0
+ contrast: settings.contrastEnabled ? settings.contrast : 0
+ saturation: settings.saturationEnabled ? settings.saturation : 0
+ colorizationColor: settings.colorizationColor
+ colorization: settings.colorizationEnabled ? settings.colorization : 0
+ blur: settings.blur
+ blurMax: settings.blurMax
+ blurMultiplier: settings.blurMultiplier
+ shadowOpacity: settings.shadowOpacity
+ shadowBlur: settings.shadowBlur
+ shadowHorizontalOffset: settings.shadowHorizontalOffset
+ shadowVerticalOffset: settings.shadowVerticalOffset
+ shadowColor: settings.shadowColor
+ shadowScale: settings.shadowScale
+ maskInverted: settings.maskInverted
+ maskThresholdMin: settings.maskThresholdMin
+ maskSpreadAtMin: settings.maskSpreadAtMin
+ maskThresholdMax: settings.maskThresholdMax
+ maskSpreadAtMax: settings.maskSpreadAtMax
+ }
+ }
+
+ SettingsView {
+ id: settingsView
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ anchors.margins: 20
+ visible: settings.showSettingsView
+ Component.onCompleted: {
+ settings.reset();
+ }
+ }
+
+ FpsItem {
+ anchors.right: parent.right
+ }
+
+ ShaderView {
+ id: shaderView
+ visible: settings.showShader
+ anchors.horizontalCenter: mainArea.horizontalCenter
+ anchors.top: mainArea.top
+ anchors.topMargin: 20
+ text: "Fragment shader: " + quickMultiEffect.fragmentShader + "\nVertex shader: " + quickMultiEffect.vertexShader
+ }
+
+ WarningsView {
+ id: warningsView
+ anchors.bottom: parent.bottom
+ anchors.left: settingsView.right
+ anchors.leftMargin: 40
+ anchors.right: parent.right
+ }
+
+ ResetSettingsOverlay {
+ id: resetSettingsOverlay
+ onAnimationFinished: {
+ settings.reset();
+ }
+ }
+}
diff --git a/examples/quick/multieffect/testbed/testbed.pro b/examples/quick/multieffect/testbed/testbed.pro
new file mode 100644
index 0000000000..e1ae55b118
--- /dev/null
+++ b/examples/quick/multieffect/testbed/testbed.pro
@@ -0,0 +1,10 @@
+TEMPLATE = app
+
+QT += quick qml
+QT += quickcontrols2
+SOURCES += main.cpp
+RESOURCES += \
+ qml.qrc
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/multieffect/testbed
+INSTALLS += target
diff --git a/examples/quick/particles/.prev_CMakeLists.txt b/examples/quick/particles/.prev_CMakeLists.txt
deleted file mode 100644
index 1dbf49be21..0000000000
--- a/examples/quick/particles/.prev_CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-# Generated from particles.pro.
-
-add_subdirectory(affectors)
-add_subdirectory(emitters)
-add_subdirectory(imageparticle)
-add_subdirectory(itemparticle)
-add_subdirectory(system)
diff --git a/examples/quick/particles/CMakeLists.txt b/examples/quick/particles/CMakeLists.txt
index 1dbf49be21..ce9658b74a 100644
--- a/examples/quick/particles/CMakeLists.txt
+++ b/examples/quick/particles/CMakeLists.txt
@@ -1,7 +1,7 @@
-# Generated from particles.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-add_subdirectory(affectors)
-add_subdirectory(emitters)
-add_subdirectory(imageparticle)
-add_subdirectory(itemparticle)
-add_subdirectory(system)
+qt_internal_add_example(affectors)
+qt_internal_add_example(emitters)
+qt_internal_add_example(imageparticle)
+qt_internal_add_example(system)
diff --git a/examples/quick/particles/affectors/CMakeLists.txt b/examples/quick/particles/affectors/CMakeLists.txt
index 1e65a15d2e..dc29e1787b 100644
--- a/examples/quick/particles/affectors/CMakeLists.txt
+++ b/examples/quick/particles/affectors/CMakeLists.txt
@@ -1,271 +1,73 @@
-# Generated from affectors.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(affectors LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup(REQUIRES 6.5)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
+add_subdirectory("../../shared" "shared")
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/particles/affectors")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(affectors
+qt_add_executable(affectorsexample WIN32 MACOSX_BUNDLE
main.cpp
)
-set_target_properties(affectors PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(affectors PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-# Resources:
-set(affectors_resource_files
- "affectors.qml"
- "content/GreyButton.qml"
- "content/age.qml"
- "content/attractor.qml"
- "content/customaffector.qml"
- "content/friction.qml"
- "content/gravity.qml"
- "content/groupgoal.qml"
- "content/move.qml"
- "content/spritegoal.qml"
- "content/turbulence.qml"
- "content/wander.qml"
+target_link_libraries(affectorsexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
-qt6_add_resources(affectors "affectors"
- PREFIX
- "/particles/affectors"
- FILES
- ${affectors_resource_files}
-)
-set_source_files_properties("../images/_explo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/_explo.png"
-)
-set_source_files_properties("../images/backgroundLeaves.jpg"
- PROPERTIES QT_RESOURCE_ALIAS "images/backgroundLeaves.jpg"
-)
-set_source_files_properties("../images/bear_tiles.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/bear_tiles.png"
-)
-set_source_files_properties("../images/candle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/candle.png"
-)
-set_source_files_properties("../images/colortable.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/colortable.png"
-)
-set_source_files_properties("../images/finalfrontier.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/finalfrontier.png"
-)
-set_source_files_properties("../images/flower.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/flower.png"
-)
-set_source_files_properties("../images/matchmask.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/matchmask.png"
-)
-set_source_files_properties("../images/meteor.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/meteor.png"
-)
-set_source_files_properties("../images/meteor_explo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/meteor_explo.png"
-)
-set_source_files_properties("../images/meteors.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/meteors.png"
-)
-set_source_files_properties("../images/nullRock.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/nullRock.png"
-)
-set_source_files_properties("../images/particle2.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/particle2.png"
-)
-set_source_files_properties("../images/particle3.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/particle3.png"
-)
-set_source_files_properties("../images/particleA.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/particleA.png"
-)
-set_source_files_properties("../images/portal_bg.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/portal_bg.png"
-)
-set_source_files_properties("../images/realLeaf1.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/realLeaf1.png"
-)
-set_source_files_properties("../images/realLeaf2.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/realLeaf2.png"
-)
-set_source_files_properties("../images/realLeaf3.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/realLeaf3.png"
-)
-set_source_files_properties("../images/realLeaf4.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/realLeaf4.png"
-)
-set_source_files_properties("../images/rocket.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/rocket.png"
-)
-set_source_files_properties("../images/rocket2.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/rocket2.png"
-)
-set_source_files_properties("../images/sizeInOut.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/sizeInOut.png"
-)
-set_source_files_properties("../images/snowflake.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/snowflake.png"
-)
-set_source_files_properties("../images/sparkleSize.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/sparkleSize.png"
-)
-set_source_files_properties("../images/starfish_0.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_0.png"
-)
-set_source_files_properties("../images/starfish_1.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_1.png"
-)
-set_source_files_properties("../images/starfish_2.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_2.png"
-)
-set_source_files_properties("../images/starfish_3.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_3.png"
-)
-set_source_files_properties("../images/starfish_4.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_4.png"
-)
-set_source_files_properties("../images/starfish_mask.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_mask.png"
-)
-set(images_resource_files
- "images/_explo.png"
- "images/backgroundLeaves.jpg"
- "images/bear_tiles.png"
- "images/candle.png"
- "images/colortable.png"
- "images/finalfrontier.png"
- "images/flower.png"
- "images/matchmask.png"
- "images/meteor.png"
- "images/meteor_explo.png"
- "images/meteors.png"
- "images/nullRock.png"
- "images/particle2.png"
- "images/particle3.png"
- "images/particleA.png"
- "images/portal_bg.png"
- "images/realLeaf1.png"
- "images/realLeaf2.png"
- "images/realLeaf3.png"
- "images/realLeaf4.png"
- "images/rocket.png"
- "images/rocket2.png"
- "images/sizeInOut.png"
- "images/snowflake.png"
- "images/sparkleSize.png"
- "images/starfish_0.png"
- "images/starfish_1.png"
- "images/starfish_2.png"
- "images/starfish_3.png"
- "images/starfish_4.png"
- "images/starfish_mask.png"
-)
+add_dependencies(affectorsexample affectors_shared)
-qt6_add_resources(affectors "images"
- PREFIX
- "/particles"
- BASE
- ".."
- FILES
- ${images_resource_files}
-)
-set_source_files_properties("../../shared/Button.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Button.qml"
-)
-set_source_files_properties("../../shared/CheckBox.qml"
- PROPERTIES QT_RESOURCE_ALIAS "CheckBox.qml"
-)
-set_source_files_properties("../../shared/FlickrRssModel.qml"
- PROPERTIES QT_RESOURCE_ALIAS "FlickrRssModel.qml"
-)
-set_source_files_properties("../../shared/Label.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Label.qml"
-)
-set_source_files_properties("../../shared/LauncherList.qml"
- PROPERTIES QT_RESOURCE_ALIAS "LauncherList.qml"
-)
-set_source_files_properties("../../shared/SimpleLauncherDelegate.qml"
- PROPERTIES QT_RESOURCE_ALIAS "SimpleLauncherDelegate.qml"
-)
-set_source_files_properties("../../shared/Slider.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Slider.qml"
-)
-set_source_files_properties("../../shared/TabSet.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TabSet.qml"
-)
-set_source_files_properties("../../shared/TextField.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TextField.qml"
-)
-set_source_files_properties("../../shared/images/back.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/back.png"
-)
-set_source_files_properties("../../shared/images/checkmark.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/checkmark.png"
-)
-set_source_files_properties("../../shared/images/next.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/next.png"
-)
-set_source_files_properties("../../shared/images/qt-logo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/qt-logo.png"
-)
-set_source_files_properties("../../shared/images/slider_handle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/slider_handle.png"
-)
-set_source_files_properties("../../shared/images/tab.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/tab.png"
-)
-set(shared_resource_files
- "Button.qml"
- "CheckBox.qml"
- "FlickrRssModel.qml"
- "Label.qml"
- "LauncherList.qml"
- "SimpleLauncherDelegate.qml"
- "Slider.qml"
- "TabSet.qml"
- "TextField.qml"
- "images/back.png"
- "images/checkmark.png"
- "images/next.png"
- "images/qt-logo.png"
- "images/slider_handle.png"
- "images/tab.png"
+# Resources:
+qt_add_qml_module(affectorsexample
+ URI affectors
+ QML_FILES
+ "affectors.qml"
+ "GreyButton.qml"
+ "age.qml"
+ "attractor.qml"
+ "customaffector.qml"
+ "friction.qml"
+ "gravity.qml"
+ "groupgoal.qml"
+ "move.qml"
+ "spritegoal.qml"
+ "turbulence.qml"
+ "wander.qml"
+ RESOURCES
+ "images/snowflake.png"
+ "images/finalfrontier.png"
+ "images/meteor.png"
+ "images/rocket.png"
+ "images/rocket2.png"
+ "images/backgroundLeaves.jpg"
+ "images/realLeaf1.png"
+ "images/realLeaf2.png"
+ "images/realLeaf3.png"
+ "images/realLeaf4.png"
+ "images/particleA.png"
+ "images/matchmask.png"
+ "images/nullRock.png"
+ "images/_explo.png"
+ "images/candle.png"
)
-qt6_add_resources(affectors "shared"
- PREFIX
- "/shared"
- BASE
- "../../shared"
- FILES
- ${shared_resource_files}
+install(TARGETS affectorsexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-install(TARGETS affectors
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
+qt_generate_deploy_qml_app_script(
+ TARGET affectorsexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/particles/affectors/GreyButton.qml b/examples/quick/particles/affectors/GreyButton.qml
new file mode 100644
index 0000000000..412a6dfa60
--- /dev/null
+++ b/examples/quick/particles/affectors/GreyButton.qml
@@ -0,0 +1,44 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Item {
+ id: container
+
+ required property string text
+ property string subText: ""
+ signal clicked
+
+ width: buttonLabel.width + 20; height: col.height + 12
+
+ MouseArea {
+ id: mouseArea;
+ anchors.fill: parent;
+ onClicked: container.clicked();
+ onPressed: background.color = Qt.darker("lightgrey");
+ onReleased: background.color="lightgrey";
+ }
+
+ Rectangle {
+ id: background
+ anchors.fill: parent
+ color: "lightgrey"
+ radius: 4
+ border.width: 1
+ border.color: Qt.darker(color)
+ }
+
+ Column {
+ spacing: 2
+ id: col
+ x: 10
+ y: 6
+ Text {
+ id: buttonLabel; text: container.text; color: "black"; font.pixelSize: 24
+ }
+ Text {
+ id: buttonLabel2; text: container.subText; color: "black"; font.pixelSize: 12
+ }
+ }
+}
diff --git a/examples/quick/particles/affectors/affectors.pro b/examples/quick/particles/affectors/affectors.pro
index 673ccfbb81..fc049c21b0 100644
--- a/examples/quick/particles/affectors/affectors.pro
+++ b/examples/quick/particles/affectors/affectors.pro
@@ -4,7 +4,6 @@ QT += quick qml
SOURCES += main.cpp
RESOURCES += \
affectors.qrc \
- ../images.qrc \
../../shared/shared.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/quick/particles/affectors
diff --git a/examples/quick/particles/affectors/affectors.qml b/examples/quick/particles/affectors/affectors.qml
index 81240fed9b..f4f746471a 100644
--- a/examples/quick/particles/affectors/affectors.qml
+++ b/examples/quick/particles/affectors/affectors.qml
@@ -1,73 +1,26 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import "../../shared" as Examples
+import QtQuick
+import shared
Item {
height: 480
width: 320
- Examples.LauncherList {
+ LauncherList {
id: ll
anchors.fill: parent
Component.onCompleted: {
- addExample("Age", "Kills off particles that enter the affector", Qt.resolvedUrl("content/age.qml"));
- addExample("Attractor", "Simulates a small black hole", Qt.resolvedUrl("content/attractor.qml"));
- addExample("Custom Affector", "Custom falling leaves", Qt.resolvedUrl("content/customaffector.qml"));
- addExample("Friction", "Leaves that slow down as they fall", Qt.resolvedUrl("content/friction.qml"));
- addExample("Gravity", "Leaves that fall towards the earth as you move it", Qt.resolvedUrl("content/gravity.qml"));
- addExample("GroupGoal", "Balls that can be set on fire various ways", Qt.resolvedUrl("content/groupgoal.qml"));
- addExample("Move", "Some effects you can get by altering trajectory midway", Qt.resolvedUrl("content/move.qml"));
- addExample("SpriteGoal", "A ship that makes asteroids explode", Qt.resolvedUrl("content/spritegoal.qml"));
- addExample("Turbulence", "A candle with faint wind", Qt.resolvedUrl("content/turbulence.qml"));
- addExample("Wander", "Drifting snow flakes", Qt.resolvedUrl("content/wander.qml"));
+ addExample("Age", "Kills off particles that enter the affector", Qt.resolvedUrl("age.qml"));
+ addExample("Attractor", "Simulates a small black hole", Qt.resolvedUrl("attractor.qml"));
+ addExample("Custom Affector", "Custom falling leaves", Qt.resolvedUrl("customaffector.qml"));
+ addExample("Friction", "Leaves that slow down as they fall", Qt.resolvedUrl("friction.qml"));
+ addExample("Gravity", "Leaves that fall towards the earth as you move it", Qt.resolvedUrl("gravity.qml"));
+ addExample("GroupGoal", "Balls that can be set on fire various ways", Qt.resolvedUrl("groupgoal.qml"));
+ addExample("Move", "Some effects you can get by altering trajectory midway", Qt.resolvedUrl("move.qml"));
+ addExample("SpriteGoal", "A ship that makes asteroids explode", Qt.resolvedUrl("spritegoal.qml"));
+ addExample("Turbulence", "A candle with faint wind", Qt.resolvedUrl("turbulence.qml"));
+ addExample("Wander", "Drifting snow flakes", Qt.resolvedUrl("wander.qml"));
}
}
}
diff --git a/examples/quick/particles/affectors/affectors.qrc b/examples/quick/particles/affectors/affectors.qrc
index c1d797e4d8..a826d351a8 100644
--- a/examples/quick/particles/affectors/affectors.qrc
+++ b/examples/quick/particles/affectors/affectors.qrc
@@ -1,16 +1,31 @@
<RCC>
- <qresource prefix="/particles/affectors">
+ <qresource prefix="/qt/qml/affectors">
<file>affectors.qml</file>
- <file>content/age.qml</file>
- <file>content/attractor.qml</file>
- <file>content/customaffector.qml</file>
- <file>content/friction.qml</file>
- <file>content/gravity.qml</file>
- <file>content/GreyButton.qml</file>
- <file>content/groupgoal.qml</file>
- <file>content/move.qml</file>
- <file>content/spritegoal.qml</file>
- <file>content/turbulence.qml</file>
- <file>content/wander.qml</file>
+ <file>age.qml</file>
+ <file>attractor.qml</file>
+ <file>customaffector.qml</file>
+ <file>friction.qml</file>
+ <file>gravity.qml</file>
+ <file>GreyButton.qml</file>
+ <file>groupgoal.qml</file>
+ <file>move.qml</file>
+ <file>spritegoal.qml</file>
+ <file>turbulence.qml</file>
+ <file>wander.qml</file>
+ <file>images/snowflake.png</file>
+ <file>images/finalfrontier.png</file>
+ <file>images/meteor.png</file>
+ <file>images/rocket.png</file>
+ <file>images/rocket2.png</file>
+ <file>images/backgroundLeaves.jpg</file>
+ <file>images/realLeaf1.png</file>
+ <file>images/realLeaf2.png</file>
+ <file>images/realLeaf3.png</file>
+ <file>images/realLeaf4.png</file>
+ <file>images/particleA.png</file>
+ <file>images/matchmask.png</file>
+ <file>images/nullRock.png</file>
+ <file>images/_explo.png</file>
+ <file>images/candle.png</file>
</qresource>
</RCC>
diff --git a/examples/quick/particles/affectors/age.qml b/examples/quick/particles/affectors/age.qml
new file mode 100644
index 0000000000..a43a9a08ef
--- /dev/null
+++ b/examples/quick/particles/affectors/age.qml
@@ -0,0 +1,62 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+Rectangle {
+ id: root
+ width: 360
+ height: 600
+ color: "white"
+
+ ParticleSystem { id: particles }
+
+ ImageParticle {
+ system: particles
+ sprites: Sprite {
+ name: "snow"
+ source: "images/snowflake.png"
+ frameCount: 51
+ frameDuration: 40
+ frameDurationVariation: 8
+ }
+ }
+
+ Emitter {
+ system: particles
+ emitRate: 20
+ lifeSpan: 8000
+ velocity: PointDirection { y:80; yVariation: 40; }
+ acceleration: PointDirection { y: 4 }
+ size: 36
+ endSize: 12
+ sizeVariation: 8
+ width: parent.width
+ height: 100
+ }
+
+ MouseArea {
+ id: ma
+ anchors.fill: parent
+ hoverEnabled: true
+ }
+
+ Rectangle {
+ color: "#803333AA"
+ border.color: "black"
+ x: ma.mouseX - 36
+ y: ma.mouseY - 36
+ width: 72
+ height: 72
+ //! [0]
+ Age {
+ anchors.fill: parent
+ system: particles
+ once: true
+ lifeLeft: 1200
+ advancePosition: false
+ }
+ //! [0]
+ }
+}
diff --git a/examples/quick/particles/affectors/content/attractor.qml b/examples/quick/particles/affectors/attractor.qml
index 7fbb6069b2..c5b95ee2a0 100644
--- a/examples/quick/particles/affectors/content/attractor.qml
+++ b/examples/quick/particles/affectors/attractor.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import QtQuick.Particles 2.0
+import QtQuick
+import QtQuick.Particles
Rectangle {
id: root
@@ -57,7 +10,7 @@ Rectangle {
height: 540
color: "black"
Image {
- source: "../../images/finalfrontier.png"
+ source: "images/finalfrontier.png"
anchors.centerIn:parent
}
ParticleSystem {
@@ -98,7 +51,7 @@ Rectangle {
sprites: Sprite {
id: spinState
name: "spinning"
- source: "../../images/meteor.png"
+ source: "images/meteor.png"
frameCount: 35
frameDuration: 60
}
@@ -116,7 +69,6 @@ Rectangle {
groups: ["engine"]
source: "qrc:///particleresources/fuzzydot.png"
- color: "orange"
SequentialAnimation on color {
loops: Animation.Infinite
ColorAnimation {
@@ -156,7 +108,7 @@ Rectangle {
}
Image {
- source:"../../images/rocket2.png"
+ source:"images/rocket2.png"
id: ship
width: 45
height: 22
diff --git a/examples/quick/particles/affectors/content/GreyButton.qml b/examples/quick/particles/affectors/content/GreyButton.qml
deleted file mode 100644
index d78d913cf0..0000000000
--- a/examples/quick/particles/affectors/content/GreyButton.qml
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Item {
- id: container
-
- property string text: "Button"
- property string subText: ""
- signal clicked
-
- width: buttonLabel.width + 20; height: col.height + 12
-
- MouseArea {
- id: mouseArea;
- anchors.fill: parent;
- onClicked: container.clicked();
- onPressed: background.color = Qt.darker("lightgrey");
- onReleased: background.color="lightgrey";
- }
-
- Rectangle {
- id: background
- anchors.fill: parent
- color: "lightgrey"
- radius: 4
- border.width: 1
- border.color: Qt.darker(color)
- }
-
- Column {
- spacing: 2
- id: col
- x: 10
- y: 6
- Text {
- id: buttonLabel; text: container.text; color: "black"; font.pixelSize: 24
- }
- Text {
- id: buttonLabel2; text: container.subText; color: "black"; font.pixelSize: 12
- }
- }
-}
diff --git a/examples/quick/particles/affectors/content/age.qml b/examples/quick/particles/affectors/content/age.qml
deleted file mode 100644
index ff5114a596..0000000000
--- a/examples/quick/particles/affectors/content/age.qml
+++ /dev/null
@@ -1,109 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Rectangle {
- id: root
- width: 360
- height: 600
- color: "white"
-
- ParticleSystem { id: particles }
-
- ImageParticle {
- system: particles
- sprites: Sprite {
- name: "snow"
- source: "../../images/snowflake.png"
- frameCount: 51
- frameDuration: 40
- frameDurationVariation: 8
- }
- }
-
- Emitter {
- system: particles
- emitRate: 20
- lifeSpan: 8000
- velocity: PointDirection { y:80; yVariation: 40; }
- acceleration: PointDirection { y: 4 }
- size: 36
- endSize: 12
- sizeVariation: 8
- width: parent.width
- height: 100
- }
-
- MouseArea {
- id: ma
- anchors.fill: parent
- hoverEnabled: true
- }
-
- Rectangle {
- color: "#803333AA"
- border.color: "black"
- x: ma.mouseX - 36
- y: ma.mouseY - 36
- width: 72
- height: 72
- //! [0]
- Age {
- anchors.fill: parent
- system: particles
- once: true
- lifeLeft: 1200
- advancePosition: false
- }
- //! [0]
- }
-}
diff --git a/examples/quick/particles/affectors/content/customaffector.qml b/examples/quick/particles/affectors/content/customaffector.qml
deleted file mode 100644
index 76fc4dc302..0000000000
--- a/examples/quick/particles/affectors/content/customaffector.qml
+++ /dev/null
@@ -1,156 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Item {
- width: 360
- height: 600
-
- Image {
- source: "../../images/backgroundLeaves.jpg"
- anchors.fill: parent
- }
- ParticleSystem {
- anchors.fill: parent
- Emitter {
- width: parent.width
- emitRate: 4
- lifeSpan: 14000
- size: 80
- velocity: PointDirection { y: 60 }
- }
- Wander {
- anchors.fill: parent
- anchors.bottomMargin: 100
- xVariance: 60
- pace: 60
- }
-
- //! [0]
- Affector {
- width: parent.width
- height: parent.height - 100
- onAffectParticles: (particles, dt) => {
- //Wobbly movement
- for (var i=0; i<particles.length; i++) {
- var particle = particles[i];
- particle.rotation += particle.vx * 0.15 * dt;
- particle.update = true;
- }
- }
- }
- //! [0]
-
- //! [1]
- Affector {//Custom Friction, adds some 'randomness'
- x: -60
- width: parent.width + 120
- height: 100
- anchors.bottom: parent.bottom
- onAffectParticles: (particles, dt) => {
- for (var i=0; i<particles.length; i++) {
- var particle = particles[i];
- var pseudoRand = (Math.floor(particle.t*1327) % 10) + 1;
- var yslow = dt * pseudoRand * 0.5 + 1;
- var xslow = dt * pseudoRand * 0.05 + 1;
- if (particle.vy < 1)
- particle.vy = 0;
- else
- particle.vy = (particle.vy / yslow);
- if (particle.vx < 1)
- particle.vx = 0;
- else
- particle.vx = (particle.vx / xslow);
- particle.update = true;
- }
- }
- }
- //! [1]
-
- ImageParticle {
- anchors.fill: parent
- id: particles
- sprites: [Sprite {
- source: "../../images/realLeaf1.png"
- frameCount: 1
- frameDuration: 1
- to: {"a":1, "b":1, "c":1, "d":1}
- }, Sprite {
- name: "a"
- source: "../../images/realLeaf1.png"
- frameCount: 1
- frameDuration: 10000
- },
- Sprite {
- name: "b"
- source: "../../images/realLeaf2.png"
- frameCount: 1
- frameDuration: 10000
- },
- Sprite {
- name: "c"
- source: "../../images/realLeaf3.png"
- frameCount: 1
- frameDuration: 10000
- },
- Sprite {
- name: "d"
- source: "../../images/realLeaf4.png"
- frameCount: 1
- frameDuration: 10000
- }
- ]
-
- z:4
- }
- }
-}
diff --git a/examples/quick/particles/affectors/content/friction.qml b/examples/quick/particles/affectors/content/friction.qml
deleted file mode 100644
index 1fa85ec2fe..0000000000
--- a/examples/quick/particles/affectors/content/friction.qml
+++ /dev/null
@@ -1,121 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Item {
- width: 360
- height: 600
-
- Image {
- source: "../../images/backgroundLeaves.jpg"
- anchors.fill: parent
- }
- ParticleSystem {
- anchors.fill: parent
- Emitter {
- width: parent.width
- emitRate: 4
- lifeSpan: 14000
- size: 80
- velocity: PointDirection { y: 160; yVariation: 80; xVariation: 20 }
- }
-
- ImageParticle {
- anchors.fill: parent
- id: particles
- sprites: [Sprite {
- source: "../../images/realLeaf1.png"
- frameCount: 1
- frameDuration: 1
- to: {"a":1, "b":1, "c":1, "d":1}
- }, Sprite {
- name: "a"
- source: "../../images/realLeaf1.png"
- frameCount: 1
- frameDuration: 10000
- },
- Sprite {
- name: "b"
- source: "../../images/realLeaf2.png"
- frameCount: 1
- frameDuration: 10000
- },
- Sprite {
- name: "c"
- source: "../../images/realLeaf3.png"
- frameCount: 1
- frameDuration: 10000
- },
- Sprite {
- name: "d"
- source: "../../images/realLeaf4.png"
- frameCount: 1
- frameDuration: 10000
- }
- ]
-
- width: 100
- height: 100
- x: 20
- y: 20
- z:4
- }
-
- //! [0]
- Friction {
- anchors.fill: parent
- anchors.margins: -40
- factor: 0.4
- }
- //! [0]
- }
-}
diff --git a/examples/quick/particles/affectors/content/gravity.qml b/examples/quick/particles/affectors/content/gravity.qml
deleted file mode 100644
index 99b14f3b1f..0000000000
--- a/examples/quick/particles/affectors/content/gravity.qml
+++ /dev/null
@@ -1,115 +0,0 @@
-/****************************************************************************
-*
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Item {
- id: window
- width: 320; height: 480
- Rectangle {
- id: sky
- anchors.fill: parent
- gradient: Gradient {
- GradientStop {
- position: 0.0
- color: "DeepSkyBlue"
- }
- GradientStop {
- position: 1.0
- color: "SkyBlue"
- }
- }
- }
-
- Rectangle {
- id: ground
- width: parent.height * 2
- height: parent.height
- y: parent.height/2
- x: parent.width/2 - parent.height
- transformOrigin: Item.Top
- rotation: 0
- gradient: Gradient {
- GradientStop { position: 0.0; color: "ForestGreen"; }
- GradientStop { position: 1.0; color: "DarkGreen"; }
- }
- }
-
- MouseArea {
- anchors.fill: parent
- onPositionChanged: {
- var rot = Math.atan2(mouseY - window.height/2,mouseX - window.width/2) * 180/Math.PI;
- ground.rotation = rot;
- }
- }
-
- ParticleSystem { id: sys }
- //! [0]
- Gravity {
- system: sys
- magnitude: 32
- angle: ground.rotation + 90
- }
- //! [0]
- Emitter {
- system: sys
- anchors.centerIn: parent
- emitRate: 1
- lifeSpan: 10000
- size: 64
- }
- ImageParticle {
- anchors.fill: parent
- system: sys
- source: "../../images/realLeaf1.png"
- }
-
-}
diff --git a/examples/quick/particles/affectors/content/move.qml b/examples/quick/particles/affectors/content/move.qml
deleted file mode 100644
index b33d7f4006..0000000000
--- a/examples/quick/particles/affectors/content/move.qml
+++ /dev/null
@@ -1,157 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Rectangle {
- width: 360
- height: 540
- color: "black"
- ParticleSystem {
- anchors.fill: parent
- ImageParticle {
- groups: ["A"]
- anchors.fill: parent
- source: "qrc:///particleresources/star.png"
- color:"#FF1010"
- redVariation: 0.8
- }
-
- Emitter {
- group: "A"
- emitRate: 100
- lifeSpan: 2800
- size: 32
- sizeVariation: 8
- velocity: PointDirection{ x: 66; xVariation: 20 }
- width: 80
- height: 80
- }
-
- //! [A]
- Affector {
- groups: ["A"]
- x: 120
- width: 80
- height: 80
- once: true
- position: PointDirection { x: 120; }
- }
- //! [A]
-
- ImageParticle {
- groups: ["B"]
- anchors.fill: parent
- source: "qrc:///particleresources/star.png"
- color:"#10FF10"
- greenVariation: 0.8
- }
-
- Emitter {
- group: "B"
- emitRate: 100
- lifeSpan: 2800
- size: 32
- sizeVariation: 8
- velocity: PointDirection{ x: 240; xVariation: 60 }
- y: 260
- width: 10
- height: 10
- }
-
- //! [B]
- Affector {
- groups: ["B"]
- x: 120
- y: 240
- width: 80
- height: 80
- once: true
- velocity: AngleDirection { angleVariation:360; magnitude: 72 }
- }
- //! [B]
-
- ImageParticle {
- groups: ["C"]
- anchors.fill: parent
- source: "qrc:///particleresources/star.png"
- color:"#1010FF"
- blueVariation: 0.8
- }
-
- Emitter {
- group: "C"
- y: 400
- emitRate: 100
- lifeSpan: 2800
- size: 32
- sizeVariation: 8
- velocity: PointDirection{ x: 80; xVariation: 10 }
- acceleration: PointDirection { y: 10; x: 20; }
- width: 80
- height: 80
- }
-
- //! [C]
- Affector {
- groups: ["C"]
- x: 120
- y: 400
- width: 80
- height: 120
- once: true
- relative: false
- acceleration: PointDirection { y: -80; }
- }
- //! [C]
-
- }
-}
diff --git a/examples/quick/particles/affectors/content/turbulence.qml b/examples/quick/particles/affectors/content/turbulence.qml
deleted file mode 100644
index e58b3ede7f..0000000000
--- a/examples/quick/particles/affectors/content/turbulence.qml
+++ /dev/null
@@ -1,142 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Rectangle {
- width: 320
- height: 480
- color: "#222222"
- id: root
- Image {
- source: "../../images/candle.png"
- anchors.bottom: parent.bottom
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.bottomMargin: -60
- anchors.horizontalCenterOffset: 2
- }
- ParticleSystem {
- anchors.fill: parent
- MouseArea {
- anchors.fill: parent
- onClicked: turb.enabled = !turb.enabled
- }
-
- //! [0]
- Turbulence {
- id: turb
- enabled: true
- height: (parent.height / 2) - 4
- width: parent.width
- x: parent. width / 4
- anchors.fill: parent
- strength: 32
- NumberAnimation on strength{from: 16; to: 64; easing.type: Easing.InOutBounce; duration: 1800; loops: -1}
- }
- //! [0]
-
- ImageParticle {
- groups: ["smoke"]
- source: "qrc:///particleresources/glowdot.png"
- color: "#11111111"
- colorVariation: 0
- }
- ImageParticle {
- groups: ["flame"]
- source: "qrc:///particleresources/glowdot.png"
- color: "#11ff400f"
- colorVariation: 0.1
- }
- Emitter {
- anchors.centerIn: parent
- group: "flame"
-
- emitRate: 120
- lifeSpan: 1200
- size: 20
- endSize: 10
- sizeVariation: 10
- acceleration: PointDirection { y: -40 }
- velocity: AngleDirection { angle: 270; magnitude: 20; angleVariation: 22; magnitudeVariation: 5 }
- }
- TrailEmitter {
- id: smoke1
- width: root.width
- height: root.height/2
- group: "smoke"
- follow: "flame"
-
- emitRatePerParticle: 1
- lifeSpan: 2400
- lifeSpanVariation: 400
- size: 16
- endSize: 8
- sizeVariation: 8
- acceleration: PointDirection { y: -40 }
- velocity: AngleDirection { angle: 270; magnitude: 40; angleVariation: 22; magnitudeVariation: 5 }
- }
- TrailEmitter {
- id: smoke2
- width: root.width
- height: root.height/2 - 20
- group: "smoke"
- follow: "flame"
-
- emitRatePerParticle: 4
- lifeSpan: 2400
- size: 36
- endSize: 24
- sizeVariation: 12
- acceleration: PointDirection { y: -40 }
- velocity: AngleDirection { angle: 270; magnitude: 40; angleVariation: 22; magnitudeVariation: 5 }
- }
- }
-}
diff --git a/examples/quick/particles/affectors/content/wander.qml b/examples/quick/particles/affectors/content/wander.qml
deleted file mode 100644
index 736fc1af76..0000000000
--- a/examples/quick/particles/affectors/content/wander.qml
+++ /dev/null
@@ -1,107 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Rectangle {
- width: 360
- height: 540
- ParticleSystem { id: particles }
- ImageParticle {
- system: particles
- sprites: Sprite {
- name: "snow"
- source: "../../images/snowflake.png"
- frameCount: 51
- frameDuration: 40
- frameDurationVariation: 8
- }
- }
-
- //! [0]
- Wander {
- id: wanderer
- system: particles
- anchors.fill: parent
- xVariance: 360/(wanderer.affectedParameter+1);
- pace: 100*(wanderer.affectedParameter+1);
- }
- //! [0]
-
- Emitter {
- system: particles
- emitRate: 20
- lifeSpan: 7000
- velocity: PointDirection { y:80; yVariation: 40; }
- acceleration: PointDirection { y: 4 }
- size: 20
- sizeVariation: 10
- width: parent.width
- height: 100
- }
- Row {
- anchors.bottom: parent.bottom
- anchors.horizontalCenter: parent.horizontalCenter
- spacing: 4
- GreyButton {
- text:"dx/dt"
- onClicked: wanderer.affectedParameter = Wander.Position;
- }
- GreyButton {
- text:"dv/dt"
- onClicked: wanderer.affectedParameter = Wander.Velocity;
- }
- GreyButton {
- text:"da/dt"
- onClicked: wanderer.affectedParameter = Wander.Acceleration;
- }
- }
-}
diff --git a/examples/quick/particles/affectors/customaffector.qml b/examples/quick/particles/affectors/customaffector.qml
new file mode 100644
index 0000000000..e85ea96ef6
--- /dev/null
+++ b/examples/quick/particles/affectors/customaffector.qml
@@ -0,0 +1,109 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+Item {
+ width: 360
+ height: 600
+
+ Image {
+ source: "images/backgroundLeaves.jpg"
+ anchors.fill: parent
+ }
+ ParticleSystem {
+ anchors.fill: parent
+ Emitter {
+ width: parent.width
+ emitRate: 4
+ lifeSpan: 14000
+ size: 80
+ velocity: PointDirection { y: 60 }
+ }
+ Wander {
+ anchors.fill: parent
+ anchors.bottomMargin: 100
+ xVariance: 60
+ pace: 60
+ }
+
+ //! [0]
+ Affector {
+ width: parent.width
+ height: parent.height - 100
+ onAffectParticles: (particles, dt) => {
+ //Wobbly movement
+ for (var i=0; i<particles.length; i++) {
+ var particle = particles[i];
+ particle.rotation += particle.vx * 0.15 * dt;
+ particle.update = true;
+ }
+ }
+ }
+ //! [0]
+
+ //! [1]
+ Affector {//Custom Friction, adds some 'randomness'
+ x: -60
+ width: parent.width + 120
+ height: 100
+ anchors.bottom: parent.bottom
+ onAffectParticles: (particles, dt) => {
+ for (var i=0; i<particles.length; i++) {
+ var particle = particles[i];
+ var pseudoRand = (Math.floor(particle.t*1327) % 10) + 1;
+ var yslow = dt * pseudoRand * 0.5 + 1;
+ var xslow = dt * pseudoRand * 0.05 + 1;
+ if (particle.vy < 1)
+ particle.vy = 0;
+ else
+ particle.vy = (particle.vy / yslow);
+ if (particle.vx < 1)
+ particle.vx = 0;
+ else
+ particle.vx = (particle.vx / xslow);
+ particle.update = true;
+ }
+ }
+ }
+ //! [1]
+
+ ImageParticle {
+ anchors.fill: parent
+ id: particles
+ sprites: [Sprite {
+ source: "images/realLeaf1.png"
+ frameCount: 1
+ frameDuration: 1
+ to: {"a":1, "b":1, "c":1, "d":1}
+ }, Sprite {
+ name: "a"
+ source: "images/realLeaf1.png"
+ frameCount: 1
+ frameDuration: 10000
+ },
+ Sprite {
+ name: "b"
+ source: "images/realLeaf2.png"
+ frameCount: 1
+ frameDuration: 10000
+ },
+ Sprite {
+ name: "c"
+ source: "images/realLeaf3.png"
+ frameCount: 1
+ frameDuration: 10000
+ },
+ Sprite {
+ name: "d"
+ source: "images/realLeaf4.png"
+ frameCount: 1
+ frameDuration: 10000
+ }
+ ]
+
+ z:4
+ }
+ }
+}
diff --git a/examples/quick/particles/affectors/doc/src/affectors.qdoc b/examples/quick/particles/affectors/doc/src/affectors.qdoc
index 9857a86241..73f99aabed 100644
--- a/examples/quick/particles/affectors/doc/src/affectors.qdoc
+++ b/examples/quick/particles/affectors/doc/src/affectors.qdoc
@@ -1,33 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Qt Quick Particles Examples - Affectors
\example particles/affectors
+ \examplecategory {Graphics}
\brief This is a collection of examples using Affectors in the QML particle system.
\image qml-affectors-example.png
@@ -35,7 +12,7 @@
Each example is a small QML file emphasizing a particular type or feature.
Age demonstrates using an Age affector to prematurely end the lives of particles.
- \snippet particles/affectors/content/age.qml 0
+ \snippet particles/affectors/age.qml 0
As you move the affector around the screen, the particles inside it
(which haven't already been affected) jump to a period near the end
@@ -44,7 +21,7 @@
the end of their life instantly.
Attractor demonstrates using an Attractor affector to simulate a black hole
- \snippet particles/affectors/content/attractor.qml 0
+ \snippet particles/affectors/attractor.qml 0
All particles in the scene, including the rocket ship's exhaust and pellets, are pulled
towards the black hole. This effect is stronger closer to the black hole, so the
@@ -55,58 +32,58 @@
Custom Affector manipulates the properties of the particles directly in javascript.
One Affector is used to make the leaves rock back and forth as they fall, looking more
leaf-like than just spinning in circles:
- \snippet particles/affectors/content/customaffector.qml 0
+ \snippet particles/affectors/customaffector.qml 0
Another is used to provide a slightly varying friction to the leaves as they 'land',
to look more natural:
- \snippet particles/affectors/content/customaffector.qml 1
+ \snippet particles/affectors/customaffector.qml 1
Friction is similar to the falling leaves in the custom affector, except that it uses a
flat friction the whole way down instead of custom affectors.
- \snippet particles/affectors/content/friction.qml 0
+ \snippet particles/affectors/friction.qml 0
Gravity is a convenience affector for applying a constant acceleration to particles inside it
- \snippet particles/affectors/content/gravity.qml 0
+ \snippet particles/affectors/gravity.qml 0
GroupGoal sets up two particle groups for flaming and non-flaming balls, and gives you various
ways to transition between them.
- \snippet particles/affectors/content/groupgoal.qml unlit
+ \snippet particles/affectors/groupgoal.qml unlit
The non-flaming balls have a one in a hundred chance of lighting on their own each second, but they also
have a GroupGoal set on the whole group. This affector affects all particles of the unlit group, when colliding
with particles in the lit group, and cause them to move to the lighting group.
- \snippet particles/affectors/content/groupgoal.qml lighting
+ \snippet particles/affectors/groupgoal.qml lighting
lighting is an intermediate group so that the glow builds up and the transition is less jarring. So it automatically
moves into the lit group after 100ms.
- \snippet particles/affectors/content/groupgoal.qml lit
+ \snippet particles/affectors/groupgoal.qml lit
The lit group also has TrailEmitters on it for additional fire and smoke, but does not transition anywhere.
There are two more GroupGoal objects that allow particles in the unlit group to transition to the lighting group
(and then to the lit group).
- \snippet particles/affectors/content/groupgoal.qml groupgoal-pilot
+ \snippet particles/affectors/groupgoal.qml groupgoal-pilot
The first is just an area bound to the location of an image of a pilot flame. When unlit balls pass through the flame,
they go straight to lit because the pilot flame is so hot.
- \snippet particles/affectors/content/groupgoal.qml groupgoal-ma
+ \snippet particles/affectors/groupgoal.qml groupgoal-ma
The second is bound to the location of the last pointer interaction, so that touching or clicking on unlit balls (which
is hard due to their constant movement) causes them to move to the lighting group.
Move shows some simple effects you can get by altering trajectory midway.
The red particles have an affector that affects their position, jumping them forwards by 120px.
- \snippet particles/affectors/content/move.qml A
+ \snippet particles/affectors/move.qml A
The green particles have an affector that affects their velocity, but with some angle variation. By adding some random direction
velocity to their existing forwards velocity, they begin to spray off in a cone.
- \snippet particles/affectors/content/move.qml B
+ \snippet particles/affectors/move.qml B
The blue particles have an affector that affects their acceleration, and because it sets relative to false this resets the acceleration instead of
adding to it. Once the blue particles reach the affector, their horizontal velocity stops increasing as their vertical velocity decreases.
- \snippet particles/affectors/content/move.qml C
+ \snippet particles/affectors/move.qml C
SpriteGoal has an affector which interacts with the sprite engine of particles, if they are being drawn as sprites by ImageParticle.
- \snippet particles/affectors/content/spritegoal.qml 0
+ \snippet particles/affectors/spritegoal.qml 0
The SpriteGoal follows the image of the rocket ship on screen, and when it interacts with particles drawn by ImageParticle as sprites,
it instructs them to move immediately to the "explode" state, which in this case is the animation of the asteroid breaking into many pieces.
Turbulence has a flame with smoke, and both sets of particles being affected by a Turbulence affector. This gives a faint wind effect.
- \snippet particles/affectors/content/turbulence.qml 0
+ \snippet particles/affectors/turbulence.qml 0
To make the wind change direction, subsitute a black and white noise image in the noiseSource parameter (it currently uses a default noise source).
Wander uses a Wander affector to add some horizontal drift to snowflakes as they fall down.
- \snippet particles/affectors/content/wander.qml 0
+ \snippet particles/affectors/wander.qml 0
There are different movements given by applying the Wander to different attributes of the trajectory, so the example makes it easy to play around and see the difference.
*/
diff --git a/examples/quick/particles/affectors/friction.qml b/examples/quick/particles/affectors/friction.qml
new file mode 100644
index 0000000000..ec2a421387
--- /dev/null
+++ b/examples/quick/particles/affectors/friction.qml
@@ -0,0 +1,74 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+Item {
+ width: 360
+ height: 600
+
+ Image {
+ source: "images/backgroundLeaves.jpg"
+ anchors.fill: parent
+ }
+ ParticleSystem {
+ anchors.fill: parent
+ Emitter {
+ width: parent.width
+ emitRate: 4
+ lifeSpan: 14000
+ size: 80
+ velocity: PointDirection { y: 160; yVariation: 80; xVariation: 20 }
+ }
+
+ ImageParticle {
+ anchors.fill: parent
+ id: particles
+ sprites: [Sprite {
+ source: "images/realLeaf1.png"
+ frameCount: 1
+ frameDuration: 1
+ to: {"a":1, "b":1, "c":1, "d":1}
+ }, Sprite {
+ name: "a"
+ source: "images/realLeaf1.png"
+ frameCount: 1
+ frameDuration: 10000
+ },
+ Sprite {
+ name: "b"
+ source: "images/realLeaf2.png"
+ frameCount: 1
+ frameDuration: 10000
+ },
+ Sprite {
+ name: "c"
+ source: "images/realLeaf3.png"
+ frameCount: 1
+ frameDuration: 10000
+ },
+ Sprite {
+ name: "d"
+ source: "images/realLeaf4.png"
+ frameCount: 1
+ frameDuration: 10000
+ }
+ ]
+
+ width: 100
+ height: 100
+ x: 20
+ y: 20
+ z:4
+ }
+
+ //! [0]
+ Friction {
+ anchors.fill: parent
+ anchors.margins: -40
+ factor: 0.4
+ }
+ //! [0]
+ }
+}
diff --git a/examples/quick/particles/affectors/gravity.qml b/examples/quick/particles/affectors/gravity.qml
new file mode 100644
index 0000000000..cf64d48689
--- /dev/null
+++ b/examples/quick/particles/affectors/gravity.qml
@@ -0,0 +1,68 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+Item {
+ id: window
+ width: 320; height: 480
+ Rectangle {
+ id: sky
+ anchors.fill: parent
+ gradient: Gradient {
+ GradientStop {
+ position: 0.0
+ color: "DeepSkyBlue"
+ }
+ GradientStop {
+ position: 1.0
+ color: "SkyBlue"
+ }
+ }
+ }
+
+ Rectangle {
+ id: ground
+ width: parent.height * 2
+ height: parent.height
+ y: parent.height/2
+ x: parent.width/2 - parent.height
+ transformOrigin: Item.Top
+ rotation: 0
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "ForestGreen"; }
+ GradientStop { position: 1.0; color: "DarkGreen"; }
+ }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onPositionChanged: {
+ var rot = Math.atan2(mouseY - window.height/2,mouseX - window.width/2) * 180/Math.PI;
+ ground.rotation = rot;
+ }
+ }
+
+ ParticleSystem { id: sys }
+ //! [0]
+ Gravity {
+ system: sys
+ magnitude: 32
+ angle: ground.rotation + 90
+ }
+ //! [0]
+ Emitter {
+ system: sys
+ anchors.centerIn: parent
+ emitRate: 1
+ lifeSpan: 10000
+ size: 64
+ }
+ ImageParticle {
+ anchors.fill: parent
+ system: sys
+ source: "images/realLeaf1.png"
+ }
+
+}
diff --git a/examples/quick/particles/affectors/content/groupgoal.qml b/examples/quick/particles/affectors/groupgoal.qml
index 9910531a98..a1a784e2ec 100644
--- a/examples/quick/particles/affectors/content/groupgoal.qml
+++ b/examples/quick/particles/affectors/groupgoal.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import QtQuick.Particles 2.0
+import QtQuick
+import QtQuick.Particles
Rectangle {
@@ -74,7 +27,7 @@ Rectangle {
duration: 1000
to: {"lighting":1, "unlit":99}
ImageParticle {
- source: "../../images/particleA.png"
+ source: "images/particleA.png"
colorVariation: 0.1
color: "#2060160f"
}
@@ -151,7 +104,7 @@ Rectangle {
id: flame
anchors.fill: parent
groups: ["flame", "lit", "lighting"]
- source: "../../images/particleA.png"
+ source: "images/particleA.png"
colorVariation: 0.1
color: "#00ff400f"
}
@@ -188,7 +141,7 @@ Rectangle {
y: -55
height: 75
width: 30
- shape: MaskShape {source: "../../images/matchmask.png"}
+ shape: MaskShape {source: "images/matchmask.png"}
}
// ![groupgoal-pilot]
}
diff --git a/examples/quick/particles/images/_explo.png b/examples/quick/particles/affectors/images/_explo.png
index 4297245d49..4297245d49 100644
--- a/examples/quick/particles/images/_explo.png
+++ b/examples/quick/particles/affectors/images/_explo.png
Binary files differ
diff --git a/examples/quick/particles/images/backgroundLeaves.jpg b/examples/quick/particles/affectors/images/backgroundLeaves.jpg
index 08be16751d..08be16751d 100644
--- a/examples/quick/particles/images/backgroundLeaves.jpg
+++ b/examples/quick/particles/affectors/images/backgroundLeaves.jpg
Binary files differ
diff --git a/examples/quick/particles/images/candle.png b/examples/quick/particles/affectors/images/candle.png
index 8fa3193719..8fa3193719 100644
--- a/examples/quick/particles/images/candle.png
+++ b/examples/quick/particles/affectors/images/candle.png
Binary files differ
diff --git a/examples/quick/particles/images/finalfrontier.png b/examples/quick/particles/affectors/images/finalfrontier.png
index 2ba1815230..2ba1815230 100644
--- a/examples/quick/particles/images/finalfrontier.png
+++ b/examples/quick/particles/affectors/images/finalfrontier.png
Binary files differ
diff --git a/examples/quick/particles/images/matchmask.png b/examples/quick/particles/affectors/images/matchmask.png
index e575875c55..e575875c55 100644
--- a/examples/quick/particles/images/matchmask.png
+++ b/examples/quick/particles/affectors/images/matchmask.png
Binary files differ
diff --git a/examples/quick/particles/images/meteor.png b/examples/quick/particles/affectors/images/meteor.png
index e8c368aea7..e8c368aea7 100644
--- a/examples/quick/particles/images/meteor.png
+++ b/examples/quick/particles/affectors/images/meteor.png
Binary files differ
diff --git a/examples/quick/particles/images/nullRock.png b/examples/quick/particles/affectors/images/nullRock.png
index 4076327a1a..4076327a1a 100644
--- a/examples/quick/particles/images/nullRock.png
+++ b/examples/quick/particles/affectors/images/nullRock.png
Binary files differ
diff --git a/examples/quick/particles/images/particleA.png b/examples/quick/particles/affectors/images/particleA.png
index d86fc9696b..d86fc9696b 100644
--- a/examples/quick/particles/images/particleA.png
+++ b/examples/quick/particles/affectors/images/particleA.png
Binary files differ
diff --git a/examples/quick/particles/images/realLeaf1.png b/examples/quick/particles/affectors/images/realLeaf1.png
index 6cabf29efd..6cabf29efd 100644
--- a/examples/quick/particles/images/realLeaf1.png
+++ b/examples/quick/particles/affectors/images/realLeaf1.png
Binary files differ
diff --git a/examples/quick/particles/images/realLeaf2.png b/examples/quick/particles/affectors/images/realLeaf2.png
index bfeca861d5..bfeca861d5 100644
--- a/examples/quick/particles/images/realLeaf2.png
+++ b/examples/quick/particles/affectors/images/realLeaf2.png
Binary files differ
diff --git a/examples/quick/particles/images/realLeaf3.png b/examples/quick/particles/affectors/images/realLeaf3.png
index b1071e862b..b1071e862b 100644
--- a/examples/quick/particles/images/realLeaf3.png
+++ b/examples/quick/particles/affectors/images/realLeaf3.png
Binary files differ
diff --git a/examples/quick/particles/images/realLeaf4.png b/examples/quick/particles/affectors/images/realLeaf4.png
index d61d53d10e..d61d53d10e 100644
--- a/examples/quick/particles/images/realLeaf4.png
+++ b/examples/quick/particles/affectors/images/realLeaf4.png
Binary files differ
diff --git a/examples/quick/particles/images/rocket.png b/examples/quick/particles/affectors/images/rocket.png
index a171610b03..a171610b03 100644
--- a/examples/quick/particles/images/rocket.png
+++ b/examples/quick/particles/affectors/images/rocket.png
Binary files differ
diff --git a/examples/quick/particles/images/rocket2.png b/examples/quick/particles/affectors/images/rocket2.png
index 7110f8fdc6..7110f8fdc6 100644
--- a/examples/quick/particles/images/rocket2.png
+++ b/examples/quick/particles/affectors/images/rocket2.png
Binary files differ
diff --git a/examples/quick/particles/images/snowflake.png b/examples/quick/particles/affectors/images/snowflake.png
index 490887a82f..490887a82f 100644
--- a/examples/quick/particles/images/snowflake.png
+++ b/examples/quick/particles/affectors/images/snowflake.png
Binary files differ
diff --git a/examples/quick/particles/affectors/main.cpp b/examples/quick/particles/affectors/main.cpp
index 9e90217000..46fbff5674 100644
--- a/examples/quick/particles/affectors/main.cpp
+++ b/examples/quick/particles/affectors/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(particles/affectors/affectors)
+DECLARATIVE_EXAMPLE_MAIN(affectors/affectors)
diff --git a/examples/quick/particles/affectors/move.qml b/examples/quick/particles/affectors/move.qml
new file mode 100644
index 0000000000..447f5b0d32
--- /dev/null
+++ b/examples/quick/particles/affectors/move.qml
@@ -0,0 +1,110 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+Rectangle {
+ width: 360
+ height: 540
+ color: "black"
+ ParticleSystem {
+ anchors.fill: parent
+ ImageParticle {
+ groups: ["A"]
+ anchors.fill: parent
+ source: "qrc:///particleresources/star.png"
+ color:"#FF1010"
+ redVariation: 0.8
+ }
+
+ Emitter {
+ group: "A"
+ emitRate: 100
+ lifeSpan: 2800
+ size: 32
+ sizeVariation: 8
+ velocity: PointDirection{ x: 66; xVariation: 20 }
+ width: 80
+ height: 80
+ }
+
+ //! [A]
+ Affector {
+ groups: ["A"]
+ x: 120
+ width: 80
+ height: 80
+ once: true
+ position: PointDirection { x: 120; }
+ }
+ //! [A]
+
+ ImageParticle {
+ groups: ["B"]
+ anchors.fill: parent
+ source: "qrc:///particleresources/star.png"
+ color:"#10FF10"
+ greenVariation: 0.8
+ }
+
+ Emitter {
+ group: "B"
+ emitRate: 100
+ lifeSpan: 2800
+ size: 32
+ sizeVariation: 8
+ velocity: PointDirection{ x: 240; xVariation: 60 }
+ y: 260
+ width: 10
+ height: 10
+ }
+
+ //! [B]
+ Affector {
+ groups: ["B"]
+ x: 120
+ y: 240
+ width: 80
+ height: 80
+ once: true
+ velocity: AngleDirection { angleVariation:360; magnitude: 72 }
+ }
+ //! [B]
+
+ ImageParticle {
+ groups: ["C"]
+ anchors.fill: parent
+ source: "qrc:///particleresources/star.png"
+ color:"#1010FF"
+ blueVariation: 0.8
+ }
+
+ Emitter {
+ group: "C"
+ y: 400
+ emitRate: 100
+ lifeSpan: 2800
+ size: 32
+ sizeVariation: 8
+ velocity: PointDirection{ x: 80; xVariation: 10 }
+ acceleration: PointDirection { y: 10; x: 20; }
+ width: 80
+ height: 80
+ }
+
+ //! [C]
+ Affector {
+ groups: ["C"]
+ x: 120
+ y: 400
+ width: 80
+ height: 120
+ once: true
+ relative: false
+ acceleration: PointDirection { y: -80; }
+ }
+ //! [C]
+
+ }
+}
diff --git a/examples/quick/particles/affectors/content/spritegoal.qml b/examples/quick/particles/affectors/spritegoal.qml
index 294f693221..98d793d304 100644
--- a/examples/quick/particles/affectors/content/spritegoal.qml
+++ b/examples/quick/particles/affectors/spritegoal.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
Item {
id: root
@@ -62,7 +15,7 @@ Item {
ParticleSystem { id: sys }
Image {
- source: "../../images/finalfrontier.png"
+ source: "images/finalfrontier.png"
transformOrigin: Item.Center
anchors.centerIn: parent
NumberAnimation on rotation {
@@ -113,20 +66,20 @@ Item {
sprites:[Sprite {
id: spinState
name: "spinning"
- source: "../../images/meteor.png"
+ source: "images/meteor.png"
frameCount: 35
frameDuration: 40
randomStart: true
to: {"explode":0, "spinning":1}
},Sprite {
name: "explode"
- source: "../../images/_explo.png"
+ source: "images/_explo.png"
frameCount: 22
frameDuration: 40
to: {"nullFrame":1}
},Sprite {//Not sure if this is needed, but seemed easiest
name: "nullFrame"
- source: "../../images/nullRock.png"
+ source: "images/nullRock.png"
frameCount: 1
frameDuration: 1000
}
@@ -145,7 +98,7 @@ Item {
//! [0]
Image {
id: rocketShip
- source: "../../images/rocket.png"
+ source: "images/rocket.png"
anchors.centerIn: holder
rotation: (circle.percent+0.25) * 360
z: 2
@@ -161,7 +114,7 @@ Item {
id: circle
x: root.width / 1.2
y: root.height / 1.7
- property real percent: 0
+ property real percent
SequentialAnimation on percent {
id: circleAnim1
@@ -182,7 +135,6 @@ Item {
groups: ["exhaust"]
source: "qrc:///particleresources/fuzzydot.png"
- color: "orange"
SequentialAnimation on color {
loops: Animation.Infinite
ColorAnimation {
diff --git a/examples/quick/particles/affectors/turbulence.qml b/examples/quick/particles/affectors/turbulence.qml
new file mode 100644
index 0000000000..049e1a584d
--- /dev/null
+++ b/examples/quick/particles/affectors/turbulence.qml
@@ -0,0 +1,94 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+Rectangle {
+ width: 320
+ height: 480
+ color: "#222222"
+ id: root
+ Image {
+ source: "images/candle.png"
+ anchors.bottom: parent.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.bottomMargin: -60
+ anchors.horizontalCenterOffset: 2
+ }
+ ParticleSystem {
+ anchors.fill: parent
+ MouseArea {
+ anchors.fill: parent
+ onClicked: turb.enabled = !turb.enabled
+ }
+
+ //! [0]
+ Turbulence {
+ id: turb
+ enabled: true
+ height: (parent.height / 2) - 4
+ width: parent.width
+ x: parent. width / 4
+ anchors.fill: parent
+ NumberAnimation on strength{from: 16; to: 64; easing.type: Easing.InOutBounce; duration: 1800; loops: -1}
+ }
+ //! [0]
+
+ ImageParticle {
+ groups: ["smoke"]
+ source: "qrc:///particleresources/glowdot.png"
+ color: "#11111111"
+ colorVariation: 0
+ }
+ ImageParticle {
+ groups: ["flame"]
+ source: "qrc:///particleresources/glowdot.png"
+ color: "#11ff400f"
+ colorVariation: 0.1
+ }
+ Emitter {
+ anchors.centerIn: parent
+ group: "flame"
+
+ emitRate: 120
+ lifeSpan: 1200
+ size: 20
+ endSize: 10
+ sizeVariation: 10
+ acceleration: PointDirection { y: -40 }
+ velocity: AngleDirection { angle: 270; magnitude: 20; angleVariation: 22; magnitudeVariation: 5 }
+ }
+ TrailEmitter {
+ id: smoke1
+ width: root.width
+ height: root.height/2
+ group: "smoke"
+ follow: "flame"
+
+ emitRatePerParticle: 1
+ lifeSpan: 2400
+ lifeSpanVariation: 400
+ size: 16
+ endSize: 8
+ sizeVariation: 8
+ acceleration: PointDirection { y: -40 }
+ velocity: AngleDirection { angle: 270; magnitude: 40; angleVariation: 22; magnitudeVariation: 5 }
+ }
+ TrailEmitter {
+ id: smoke2
+ width: root.width
+ height: root.height/2 - 20
+ group: "smoke"
+ follow: "flame"
+
+ emitRatePerParticle: 4
+ lifeSpan: 2400
+ size: 36
+ endSize: 24
+ sizeVariation: 12
+ acceleration: PointDirection { y: -40 }
+ velocity: AngleDirection { angle: 270; magnitude: 40; angleVariation: 22; magnitudeVariation: 5 }
+ }
+ }
+}
diff --git a/examples/quick/particles/affectors/wander.qml b/examples/quick/particles/affectors/wander.qml
new file mode 100644
index 0000000000..c4c2914d49
--- /dev/null
+++ b/examples/quick/particles/affectors/wander.qml
@@ -0,0 +1,60 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+Rectangle {
+ width: 360
+ height: 540
+ ParticleSystem { id: particles }
+ ImageParticle {
+ system: particles
+ sprites: Sprite {
+ name: "snow"
+ source: "images/snowflake.png"
+ frameCount: 51
+ frameDuration: 40
+ frameDurationVariation: 8
+ }
+ }
+
+ //! [0]
+ Wander {
+ id: wanderer
+ system: particles
+ anchors.fill: parent
+ xVariance: 360/(wanderer.affectedParameter+1);
+ pace: 100*(wanderer.affectedParameter+1);
+ }
+ //! [0]
+
+ Emitter {
+ system: particles
+ emitRate: 20
+ lifeSpan: 7000
+ velocity: PointDirection { y:80; yVariation: 40; }
+ acceleration: PointDirection { y: 4 }
+ size: 20
+ sizeVariation: 10
+ width: parent.width
+ height: 100
+ }
+ Row {
+ anchors.bottom: parent.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 4
+ GreyButton {
+ text: qsTr("dx/dt")
+ onClicked: wanderer.affectedParameter = Wander.Position;
+ }
+ GreyButton {
+ text: qsTr("dv/dt")
+ onClicked: wanderer.affectedParameter = Wander.Velocity;
+ }
+ GreyButton {
+ text: qsTr("da/dt")
+ onClicked: wanderer.affectedParameter = Wander.Acceleration;
+ }
+ }
+}
diff --git a/examples/quick/particles/emitters/CMakeLists.txt b/examples/quick/particles/emitters/CMakeLists.txt
index a6ca0875ce..772f45fa0a 100644
--- a/examples/quick/particles/emitters/CMakeLists.txt
+++ b/examples/quick/particles/emitters/CMakeLists.txt
@@ -1,267 +1,56 @@
-# Generated from emitters.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(emitters LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup(REQUIRES 6.5)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
+add_subdirectory("../../shared" "shared")
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/particles/emitters")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(emitters
+qt_add_executable(emittersexample WIN32 MACOSX_BUNDLE
main.cpp
)
-set_target_properties(emitters PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(emitters PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-# Resources:
-set(emitters_resource_files
- "content/burstandpulse.qml"
- "content/customemitter.qml"
- "content/emitmask.qml"
- "content/maximumemitted.qml"
- "content/shapeanddirection.qml"
- "content/trailemitter.qml"
- "content/velocityfrommotion.qml"
- "emitters.qml"
+target_link_libraries(emittersexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
-qt6_add_resources(emitters "emitters"
- PREFIX
- "/particles/emitters"
- FILES
- ${emitters_resource_files}
-)
-set_source_files_properties("../images/_explo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/_explo.png"
-)
-set_source_files_properties("../images/backgroundLeaves.jpg"
- PROPERTIES QT_RESOURCE_ALIAS "images/backgroundLeaves.jpg"
-)
-set_source_files_properties("../images/bear_tiles.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/bear_tiles.png"
-)
-set_source_files_properties("../images/candle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/candle.png"
-)
-set_source_files_properties("../images/colortable.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/colortable.png"
-)
-set_source_files_properties("../images/finalfrontier.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/finalfrontier.png"
-)
-set_source_files_properties("../images/flower.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/flower.png"
-)
-set_source_files_properties("../images/matchmask.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/matchmask.png"
-)
-set_source_files_properties("../images/meteor.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/meteor.png"
-)
-set_source_files_properties("../images/meteor_explo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/meteor_explo.png"
-)
-set_source_files_properties("../images/meteors.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/meteors.png"
-)
-set_source_files_properties("../images/nullRock.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/nullRock.png"
-)
-set_source_files_properties("../images/particle2.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/particle2.png"
-)
-set_source_files_properties("../images/particle3.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/particle3.png"
-)
-set_source_files_properties("../images/particleA.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/particleA.png"
-)
-set_source_files_properties("../images/portal_bg.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/portal_bg.png"
-)
-set_source_files_properties("../images/realLeaf1.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/realLeaf1.png"
-)
-set_source_files_properties("../images/realLeaf2.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/realLeaf2.png"
-)
-set_source_files_properties("../images/realLeaf3.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/realLeaf3.png"
-)
-set_source_files_properties("../images/realLeaf4.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/realLeaf4.png"
-)
-set_source_files_properties("../images/rocket.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/rocket.png"
-)
-set_source_files_properties("../images/rocket2.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/rocket2.png"
-)
-set_source_files_properties("../images/sizeInOut.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/sizeInOut.png"
-)
-set_source_files_properties("../images/snowflake.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/snowflake.png"
-)
-set_source_files_properties("../images/sparkleSize.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/sparkleSize.png"
-)
-set_source_files_properties("../images/starfish_0.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_0.png"
-)
-set_source_files_properties("../images/starfish_1.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_1.png"
-)
-set_source_files_properties("../images/starfish_2.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_2.png"
-)
-set_source_files_properties("../images/starfish_3.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_3.png"
-)
-set_source_files_properties("../images/starfish_4.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_4.png"
-)
-set_source_files_properties("../images/starfish_mask.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_mask.png"
-)
-set(images_resource_files
- "images/_explo.png"
- "images/backgroundLeaves.jpg"
- "images/bear_tiles.png"
- "images/candle.png"
- "images/colortable.png"
- "images/finalfrontier.png"
- "images/flower.png"
- "images/matchmask.png"
- "images/meteor.png"
- "images/meteor_explo.png"
- "images/meteors.png"
- "images/nullRock.png"
- "images/particle2.png"
- "images/particle3.png"
- "images/particleA.png"
- "images/portal_bg.png"
- "images/realLeaf1.png"
- "images/realLeaf2.png"
- "images/realLeaf3.png"
- "images/realLeaf4.png"
- "images/rocket.png"
- "images/rocket2.png"
- "images/sizeInOut.png"
- "images/snowflake.png"
- "images/sparkleSize.png"
- "images/starfish_0.png"
- "images/starfish_1.png"
- "images/starfish_2.png"
- "images/starfish_3.png"
- "images/starfish_4.png"
- "images/starfish_mask.png"
-)
-
-qt6_add_resources(emitters "images"
- PREFIX
- "/particles"
- BASE
- ".."
- FILES
- ${images_resource_files}
-)
-set_source_files_properties("../../shared/Button.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Button.qml"
-)
-set_source_files_properties("../../shared/CheckBox.qml"
- PROPERTIES QT_RESOURCE_ALIAS "CheckBox.qml"
-)
-set_source_files_properties("../../shared/FlickrRssModel.qml"
- PROPERTIES QT_RESOURCE_ALIAS "FlickrRssModel.qml"
-)
-set_source_files_properties("../../shared/Label.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Label.qml"
-)
-set_source_files_properties("../../shared/LauncherList.qml"
- PROPERTIES QT_RESOURCE_ALIAS "LauncherList.qml"
-)
-set_source_files_properties("../../shared/SimpleLauncherDelegate.qml"
- PROPERTIES QT_RESOURCE_ALIAS "SimpleLauncherDelegate.qml"
-)
-set_source_files_properties("../../shared/Slider.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Slider.qml"
-)
-set_source_files_properties("../../shared/TabSet.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TabSet.qml"
-)
-set_source_files_properties("../../shared/TextField.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TextField.qml"
-)
-set_source_files_properties("../../shared/images/back.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/back.png"
-)
-set_source_files_properties("../../shared/images/checkmark.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/checkmark.png"
-)
-set_source_files_properties("../../shared/images/next.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/next.png"
-)
-set_source_files_properties("../../shared/images/qt-logo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/qt-logo.png"
-)
-set_source_files_properties("../../shared/images/slider_handle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/slider_handle.png"
-)
-set_source_files_properties("../../shared/images/tab.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/tab.png"
-)
-set(shared_resource_files
- "Button.qml"
- "CheckBox.qml"
- "FlickrRssModel.qml"
- "Label.qml"
- "LauncherList.qml"
- "SimpleLauncherDelegate.qml"
- "Slider.qml"
- "TabSet.qml"
- "TextField.qml"
- "images/back.png"
- "images/checkmark.png"
- "images/next.png"
- "images/qt-logo.png"
- "images/slider_handle.png"
- "images/tab.png"
-)
+add_dependencies(emittersexample emitters_shared)
-qt6_add_resources(emitters "shared"
- PREFIX
- "/shared"
- BASE
- "../../shared"
- FILES
- ${shared_resource_files}
-)
-
-install(TARGETS emitters
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
+# Resources:
+qt_add_qml_module(emittersexample
+ URI emitters
+ QML_FILES
+ "burstandpulse.qml"
+ "customemitter.qml"
+ "emitmask.qml"
+ "maximumemitted.qml"
+ "shapeanddirection.qml"
+ "trailemitter.qml"
+ "velocityfrommotion.qml"
+ "emitters.qml"
+ RESOURCES
+ "images/portal_bg.png"
+ "images/starfish_mask.png"
+)
+
+install(TARGETS emittersexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET emittersexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/particles/emitters/burstandpulse.qml b/examples/quick/particles/emitters/burstandpulse.qml
new file mode 100644
index 0000000000..ffc620e41b
--- /dev/null
+++ b/examples/quick/particles/emitters/burstandpulse.qml
@@ -0,0 +1,75 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+Rectangle {
+ id: root
+
+ width: 320
+ height: 480
+ color: "black"
+ property bool lastWasPulse: false
+ Timer {
+ interval: 3500
+ triggeredOnStart: true
+ running: true
+ repeat: true
+ onTriggered: {
+ //! [0]
+ if (root.lastWasPulse) {
+ burstEmitter.burst(500);
+ root.lastWasPulse = false;
+ } else {
+ pulseEmitter.pulse(500);
+ root.lastWasPulse = true;
+ }
+ //! [0]
+ }
+ }
+ ParticleSystem {
+ id: particles
+ anchors.fill: parent
+ ImageParticle {
+ source: "qrc:///particleresources/star.png"
+ alpha: 0
+ colorVariation: 0.6
+ }
+
+ Emitter {
+ id: burstEmitter
+ x: parent.width/2
+ y: parent.height/3
+ emitRate: 1000
+ lifeSpan: 2000
+ enabled: false
+ velocity: AngleDirection{magnitude: 64; angleVariation: 360}
+ size: 24
+ sizeVariation: 8
+ Text {
+ anchors.centerIn: parent
+ color: "white"
+ font.pixelSize: 18
+ text: "Burst"
+ }
+ }
+ Emitter {
+ id: pulseEmitter
+ x: parent.width/2
+ y: 2*parent.height/3
+ emitRate: 1000
+ lifeSpan: 2000
+ enabled: false
+ velocity: AngleDirection{magnitude: 64; angleVariation: 360}
+ size: 24
+ sizeVariation: 8
+ Text {
+ anchors.centerIn: parent
+ color: "white"
+ font.pixelSize: 18
+ text: "Pulse"
+ }
+ }
+ }
+}
diff --git a/examples/quick/particles/emitters/content/burstandpulse.qml b/examples/quick/particles/emitters/content/burstandpulse.qml
deleted file mode 100644
index d3c38c2360..0000000000
--- a/examples/quick/particles/emitters/content/burstandpulse.qml
+++ /dev/null
@@ -1,122 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Rectangle {
- id: root
-
- width: 320
- height: 480
- color: "black"
- property bool lastWasPulse: false
- Timer {
- interval: 3500
- triggeredOnStart: true
- running: true
- repeat: true
- onTriggered: {
- //! [0]
- if (root.lastWasPulse) {
- burstEmitter.burst(500);
- root.lastWasPulse = false;
- } else {
- pulseEmitter.pulse(500);
- root.lastWasPulse = true;
- }
- //! [0]
- }
- }
- ParticleSystem {
- id: particles
- anchors.fill: parent
- ImageParticle {
- source: "qrc:///particleresources/star.png"
- alpha: 0
- colorVariation: 0.6
- }
-
- Emitter {
- id: burstEmitter
- x: parent.width/2
- y: parent.height/3
- emitRate: 1000
- lifeSpan: 2000
- enabled: false
- velocity: AngleDirection{magnitude: 64; angleVariation: 360}
- size: 24
- sizeVariation: 8
- Text {
- anchors.centerIn: parent
- color: "white"
- font.pixelSize: 18
- text: "Burst"
- }
- }
- Emitter {
- id: pulseEmitter
- x: parent.width/2
- y: 2*parent.height/3
- emitRate: 1000
- lifeSpan: 2000
- enabled: false
- velocity: AngleDirection{magnitude: 64; angleVariation: 360}
- size: 24
- sizeVariation: 8
- Text {
- anchors.centerIn: parent
- color: "white"
- font.pixelSize: 18
- text: "Pulse"
- }
- }
- }
-}
diff --git a/examples/quick/particles/emitters/content/customemitter.qml b/examples/quick/particles/emitters/content/customemitter.qml
deleted file mode 100644
index f6aea13d08..0000000000
--- a/examples/quick/particles/emitters/content/customemitter.qml
+++ /dev/null
@@ -1,106 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-ParticleSystem {
- id: sys
- width: 360
- height: 600
- running: true
- Rectangle {
- z: -1
- anchors.fill: parent
- color: "black"
- }
-
- property real petalLength: 180
- property real petalRotation: 0
- NumberAnimation on petalRotation {
- from: 0;
- to: 360;
- loops: -1;
- running: true
- duration: 24000
- }
-
- function convert(a) {return a*(Math.PI/180);}
- Emitter {
- lifeSpan: 4000
- emitRate: 120
- size: 12
- anchors.centerIn: parent
- //! [0]
- onEmitParticles: (particles) => {
- for (var i=0; i<particles.length; i++) {
- var particle = particles[i];
- particle.startSize = Math.max(02,Math.min(492,Math.tan(particle.t/2)*24));
- var theta = Math.floor(Math.random() * 6.0);
- particle.red = theta == 0 || theta == 1 || theta == 2 ? 0.2 : 1;
- particle.green = theta == 2 || theta == 3 || theta == 4 ? 0.2 : 1;
- particle.blue = theta == 4 || theta == 5 || theta == 0 ? 0.2 : 1;
- theta /= 6.0;
- theta *= 2.0*Math.PI;
- theta += sys.convert(sys.petalRotation);//Convert from degrees to radians
- particle.initialVX = sys.petalLength * Math.cos(theta);
- particle.initialVY = sys.petalLength * Math.sin(theta);
- particle.initialAX = particle.initialVX * -0.5;
- particle.initialAY = particle.initialVY * -0.5;
- }
- }
- //! [0]
- }
-
- ImageParticle {
- source: "qrc:///particleresources/fuzzydot.png"
- alpha: 0.0
- }
-}
diff --git a/examples/quick/particles/emitters/content/emitmask.qml b/examples/quick/particles/emitters/content/emitmask.qml
deleted file mode 100644
index db13480e29..0000000000
--- a/examples/quick/particles/emitters/content/emitmask.qml
+++ /dev/null
@@ -1,84 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Rectangle {
- color: "goldenrod"
- width: 400
- height: 400
- ParticleSystem {
- width: 300
- height: 300
- anchors.centerIn: parent
-
- ImageParticle {
- source: "qrc:///particleresources/glowdot.png"
- z: 2
- anchors.fill: parent
- color: "#336666CC"
- colorVariation: 0.0
- }
-
- Emitter {
- anchors.fill: parent
- emitRate: 6000
- lifeSpan: 720
- size: 10
- //! [0]
- shape: MaskShape {
- source: "../../images/starfish_mask.png"
- }
- //! [0]
- }
-
- }
-}
diff --git a/examples/quick/particles/emitters/content/maximumemitted.qml b/examples/quick/particles/emitters/content/maximumemitted.qml
deleted file mode 100644
index dd4dfdfbdd..0000000000
--- a/examples/quick/particles/emitters/content/maximumemitted.qml
+++ /dev/null
@@ -1,92 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Rectangle {
- color: "black"
- width: 360
- height: 540
- ParticleSystem {
- id: sys
- anchors.fill: parent
- onEmptyChanged: if (empty) sys.pause();
-
- ImageParticle {
- system: sys
- id: cp
- source: "qrc:///particleresources/glowdot.png"
- colorVariation: 0.4
- color: "#000000FF"
- }
-
- Emitter {
- //burst on click
- id: bursty
- system: sys
- enabled: ma.pressed
- x: ma.mouseX
- y: ma.mouseY
- emitRate: 16000
- maximumEmitted: 4000
- acceleration: AngleDirection {angleVariation: 360; magnitude: 360; }
- size: 8
- endSize: 16
- sizeVariation: 4
- }
-
- MouseArea {
- anchors.fill: parent
- onPressed: sys.resume()
- id: ma
- }
- }
-}
diff --git a/examples/quick/particles/emitters/content/shapeanddirection.qml b/examples/quick/particles/emitters/content/shapeanddirection.qml
deleted file mode 100644
index 8d1659b099..0000000000
--- a/examples/quick/particles/emitters/content/shapeanddirection.qml
+++ /dev/null
@@ -1,122 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Rectangle {
- id: root
- width: 360
- height: 540
- color: "black"
- Image {
- anchors.fill: parent
- source: "../../images/portal_bg.png"
- }
-
- ParticleSystem {
- id: particles
- anchors.fill: parent
-
- ImageParticle {
- groups: ["center","edge"]
- anchors.fill: parent
- source: "qrc:///particleresources/glowdot.png"
- colorVariation: 0.1
- color: "#009999FF"
- }
-
- Emitter {
- anchors.fill: parent
- group: "center"
- emitRate: 400
- lifeSpan: 2000
- size: 20
- sizeVariation: 2
- endSize: 0
- //! [0]
- shape: EllipseShape {fill: false}
- velocity: TargetDirection {
- targetX: root.width/2
- targetY: root.height/2
- proportionalMagnitude: true
- magnitude: 0.5
- }
- //! [0]
- }
-
- Emitter {
- anchors.fill: parent
- group: "edge"
- startTime: 2000
- emitRate: 2000
- lifeSpan: 2000
- size: 28
- sizeVariation: 2
- endSize: 16
- shape: EllipseShape {fill: false}
- velocity: TargetDirection {
- targetX: root.width/2
- targetY: root.height/2
- proportionalMagnitude: true
- magnitude: 0.1
- magnitudeVariation: 0.1
- }
- acceleration: TargetDirection {
- targetX: root.width/2
- targetY: root.height/2
- targetVariation: 200
- proportionalMagnitude: true
- magnitude: 0.1
- magnitudeVariation: 0.1
- }
- }
- }
-}
diff --git a/examples/quick/particles/emitters/customemitter.qml b/examples/quick/particles/emitters/customemitter.qml
new file mode 100644
index 0000000000..ed23d68720
--- /dev/null
+++ b/examples/quick/particles/emitters/customemitter.qml
@@ -0,0 +1,59 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+ParticleSystem {
+ id: sys
+ width: 360
+ height: 600
+ running: true
+ Rectangle {
+ z: -1
+ anchors.fill: parent
+ color: "black"
+ }
+
+ property real petalLength: 180
+ property real petalRotation
+ NumberAnimation on petalRotation {
+ from: 0;
+ to: 360;
+ loops: -1;
+ running: true
+ duration: 24000
+ }
+
+ function convert(a) {return a*(Math.PI/180);}
+ Emitter {
+ lifeSpan: 4000
+ emitRate: 120
+ size: 12
+ anchors.centerIn: parent
+ //! [0]
+ onEmitParticles: (particles) => {
+ for (var i=0; i<particles.length; i++) {
+ let particle = particles[i];
+ particle.startSize = Math.max(02,Math.min(492,Math.tan(particle.t/2)*24));
+ let theta = Math.floor(Math.random() * 6.0);
+ particle.red = theta == 0 || theta == 1 || theta == 2 ? 0.2 : 1;
+ particle.green = theta == 2 || theta == 3 || theta == 4 ? 0.2 : 1;
+ particle.blue = theta == 4 || theta == 5 || theta == 0 ? 0.2 : 1;
+ theta /= 6.0;
+ theta *= 2.0*Math.PI;
+ theta += sys.convert(sys.petalRotation);//Convert from degrees to radians
+ particle.initialVX = sys.petalLength * Math.cos(theta);
+ particle.initialVY = sys.petalLength * Math.sin(theta);
+ particle.initialAX = particle.initialVX * -0.5;
+ particle.initialAY = particle.initialVY * -0.5;
+ }
+ }
+ //! [0]
+ }
+
+ ImageParticle {
+ source: "qrc:///particleresources/fuzzydot.png"
+ alpha: 0.0
+ }
+}
diff --git a/examples/quick/particles/emitters/doc/src/emitters.qdoc b/examples/quick/particles/emitters/doc/src/emitters.qdoc
index 2ba7ceb0b9..51a1ac308a 100644
--- a/examples/quick/particles/emitters/doc/src/emitters.qdoc
+++ b/examples/quick/particles/emitters/doc/src/emitters.qdoc
@@ -1,32 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Qt Quick Particles Examples - Emitters
\example particles/emitters
+ \examplecategory {Graphics}
\brief This is a collection of examples using Emitters in the QML particle system.
\image qml-emitters-example.png
@@ -34,27 +11,27 @@
Each example is a small QML file emphasizing a particular type or feature.
Velocity from motion gives the effect of strong particle motion through primarily moving the emitters:
- \snippet particles/emitters/content/velocityfrommotion.qml 0
+ \snippet particles/emitters/velocityfrommotion.qml 0
Burst and pulse calls the burst and pulse methods on two idential emitters.
- \snippet particles/emitters/content/burstandpulse.qml 0
+ \snippet particles/emitters/burstandpulse.qml 0
Note how burst takes an argument of number of particles to emit, and pulse takes an argument of number of milliseconds to emit for.
This gives a slightly different behaviour, which is easy to see in this example.
Custom Emitter connects to the emitParticles signal to set arbitrary values on particle data as they're emitted;
- \snippet particles/emitters/content/customemitter.qml 0
+ \snippet particles/emitters/customemitter.qml 0
This is used to emit curving particles in six rotating spokes.
Emit mask sets an image mask on the Emitter, to emit out of an arbitrary shape.
- \snippet particles/emitters/content/emitmask.qml 0
+ \snippet particles/emitters/emitmask.qml 0
Maximum emitted emits no more than a certain number of particles at a time. This example makes it easy to see what happens when the limit is reached.
Shape and Direction emits particles out of an unfilled Ellipse shape, using a TargetDirection
- \snippet particles/emitters/content/shapeanddirection.qml 0
+ \snippet particles/emitters/shapeanddirection.qml 0
This sends the particles towards the center of the ellipse with proportional speed, keeping the ellipse outline as they move to the center.
TrailEmitter uses that type to add smoke particles to trail the fire particles in the scene.
- \snippet particles/emitters/content/customemitter.qml 0
+ \snippet particles/emitters/customemitter.qml 0
*/
diff --git a/examples/quick/particles/emitters/emitmask.qml b/examples/quick/particles/emitters/emitmask.qml
new file mode 100644
index 0000000000..8a3e97f1d9
--- /dev/null
+++ b/examples/quick/particles/emitters/emitmask.qml
@@ -0,0 +1,37 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+Rectangle {
+ color: "goldenrod"
+ width: 400
+ height: 400
+ ParticleSystem {
+ width: 300
+ height: 300
+ anchors.centerIn: parent
+
+ ImageParticle {
+ source: "qrc:///particleresources/glowdot.png"
+ z: 2
+ anchors.fill: parent
+ color: "#336666CC"
+ colorVariation: 0.0
+ }
+
+ Emitter {
+ anchors.fill: parent
+ emitRate: 6000
+ lifeSpan: 720
+ size: 10
+ //! [0]
+ shape: MaskShape {
+ source: "images/starfish_mask.png"
+ }
+ //! [0]
+ }
+
+ }
+}
diff --git a/examples/quick/particles/emitters/emitters.pro b/examples/quick/particles/emitters/emitters.pro
index c5d8b8b0c9..e493bc6a72 100644
--- a/examples/quick/particles/emitters/emitters.pro
+++ b/examples/quick/particles/emitters/emitters.pro
@@ -4,7 +4,6 @@ QT += quick qml
SOURCES += main.cpp
RESOURCES += \
emitters.qrc \
- ../images.qrc \
../../shared/shared.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/quick/particles/emitters
diff --git a/examples/quick/particles/emitters/emitters.qml b/examples/quick/particles/emitters/emitters.qml
index 83b9eacc7c..8c981f0662 100644
--- a/examples/quick/particles/emitters/emitters.qml
+++ b/examples/quick/particles/emitters/emitters.qml
@@ -1,70 +1,23 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import "../../shared" as Examples
+import QtQuick
+import shared
Item {
height: 480
width: 320
- Examples.LauncherList {
+ LauncherList {
id: ll
anchors.fill: parent
Component.onCompleted: {
- addExample("Velocity from Motion", "Particle motion just by moving emitters", Qt.resolvedUrl("content/velocityfrommotion.qml"));
- addExample("Burst and Pulse", "Emit imperatively", Qt.resolvedUrl("content/burstandpulse.qml"));
- addExample("Custom Emitter", "Custom starting state", Qt.resolvedUrl("content/customemitter.qml"));
- addExample("Emit Mask", "Emit arbitrary shapes", Qt.resolvedUrl("content/emitmask.qml"));
- addExample("Maximum Emitted", "Put a limit on emissions", Qt.resolvedUrl("content/maximumemitted.qml"));
- addExample("Shape and Direction", "Creates a portal effect", Qt.resolvedUrl("content/shapeanddirection.qml"));
- addExample("TrailEmitter", "Emit from other particles", Qt.resolvedUrl("content/trailemitter.qml"));
+ addExample("Velocity from Motion", "Particle motion just by moving emitters", Qt.resolvedUrl("velocityfrommotion.qml"));
+ addExample("Burst and Pulse", "Emit imperatively", Qt.resolvedUrl("burstandpulse.qml"));
+ addExample("Custom Emitter", "Custom starting state", Qt.resolvedUrl("customemitter.qml"));
+ addExample("Emit Mask", "Emit arbitrary shapes", Qt.resolvedUrl("emitmask.qml"));
+ addExample("Maximum Emitted", "Put a limit on emissions", Qt.resolvedUrl("maximumemitted.qml"));
+ addExample("Shape and Direction", "Creates a portal effect", Qt.resolvedUrl("shapeanddirection.qml"));
+ addExample("TrailEmitter", "Emit from other particles", Qt.resolvedUrl("trailemitter.qml"));
}
}
}
diff --git a/examples/quick/particles/emitters/emitters.qrc b/examples/quick/particles/emitters/emitters.qrc
index 708c8683f0..5f3217d8a5 100644
--- a/examples/quick/particles/emitters/emitters.qrc
+++ b/examples/quick/particles/emitters/emitters.qrc
@@ -1,12 +1,14 @@
<RCC>
- <qresource prefix="/particles/emitters">
+ <qresource prefix="/qt/qml/emitters">
<file>emitters.qml</file>
- <file>content/burstandpulse.qml</file>
- <file>content/customemitter.qml</file>
- <file>content/emitmask.qml</file>
- <file>content/maximumemitted.qml</file>
- <file>content/shapeanddirection.qml</file>
- <file>content/trailemitter.qml</file>
- <file>content/velocityfrommotion.qml</file>
+ <file>burstandpulse.qml</file>
+ <file>customemitter.qml</file>
+ <file>emitmask.qml</file>
+ <file>maximumemitted.qml</file>
+ <file>shapeanddirection.qml</file>
+ <file>trailemitter.qml</file>
+ <file>velocityfrommotion.qml</file>
+ <file>images/starfish_mask.png</file>
+ <file>images/portal_bg.png</file>
</qresource>
</RCC>
diff --git a/examples/quick/particles/images/portal_bg.png b/examples/quick/particles/emitters/images/portal_bg.png
index 3c59eeabb9..3c59eeabb9 100644
--- a/examples/quick/particles/images/portal_bg.png
+++ b/examples/quick/particles/emitters/images/portal_bg.png
Binary files differ
diff --git a/examples/quick/particles/images/starfish_mask.png b/examples/quick/particles/emitters/images/starfish_mask.png
index 7ae39b34c5..7ae39b34c5 100644
--- a/examples/quick/particles/images/starfish_mask.png
+++ b/examples/quick/particles/emitters/images/starfish_mask.png
Binary files differ
diff --git a/examples/quick/particles/emitters/main.cpp b/examples/quick/particles/emitters/main.cpp
index e2b3cf2026..eccb3c8459 100644
--- a/examples/quick/particles/emitters/main.cpp
+++ b/examples/quick/particles/emitters/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(particles/emitters/emitters)
+DECLARATIVE_EXAMPLE_MAIN(emitters/emitters)
diff --git a/examples/quick/particles/emitters/maximumemitted.qml b/examples/quick/particles/emitters/maximumemitted.qml
new file mode 100644
index 0000000000..c5d33a9541
--- /dev/null
+++ b/examples/quick/particles/emitters/maximumemitted.qml
@@ -0,0 +1,45 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+Rectangle {
+ color: "black"
+ width: 360
+ height: 540
+ ParticleSystem {
+ id: sys
+ anchors.fill: parent
+ onEmptyChanged: if (empty) sys.pause();
+
+ ImageParticle {
+ system: sys
+ id: cp
+ source: "qrc:///particleresources/glowdot.png"
+ colorVariation: 0.4
+ color: "#000000FF"
+ }
+
+ Emitter {
+ //burst on click
+ id: bursty
+ system: sys
+ enabled: ma.pressed
+ x: ma.mouseX
+ y: ma.mouseY
+ emitRate: 16000
+ maximumEmitted: 4000
+ acceleration: AngleDirection {angleVariation: 360; magnitude: 360; }
+ size: 8
+ endSize: 16
+ sizeVariation: 4
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onPressed: sys.resume()
+ id: ma
+ }
+ }
+}
diff --git a/examples/quick/particles/emitters/shapeanddirection.qml b/examples/quick/particles/emitters/shapeanddirection.qml
new file mode 100644
index 0000000000..190eb9cb60
--- /dev/null
+++ b/examples/quick/particles/emitters/shapeanddirection.qml
@@ -0,0 +1,75 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+Rectangle {
+ id: root
+ width: 360
+ height: 540
+ color: "black"
+ Image {
+ anchors.fill: parent
+ source: "images/portal_bg.png"
+ }
+
+ ParticleSystem {
+ id: particles
+ anchors.fill: parent
+
+ ImageParticle {
+ groups: ["center","edge"]
+ anchors.fill: parent
+ source: "qrc:///particleresources/glowdot.png"
+ colorVariation: 0.1
+ color: "#009999FF"
+ }
+
+ Emitter {
+ anchors.fill: parent
+ group: "center"
+ emitRate: 400
+ lifeSpan: 2000
+ size: 20
+ sizeVariation: 2
+ endSize: 0
+ //! [0]
+ shape: EllipseShape {fill: false}
+ velocity: TargetDirection {
+ targetX: root.width/2
+ targetY: root.height/2
+ proportionalMagnitude: true
+ magnitude: 0.5
+ }
+ //! [0]
+ }
+
+ Emitter {
+ anchors.fill: parent
+ group: "edge"
+ startTime: 2000
+ emitRate: 2000
+ lifeSpan: 2000
+ size: 28
+ sizeVariation: 2
+ endSize: 16
+ shape: EllipseShape {fill: false}
+ velocity: TargetDirection {
+ targetX: root.width/2
+ targetY: root.height/2
+ proportionalMagnitude: true
+ magnitude: 0.1
+ magnitudeVariation: 0.1
+ }
+ acceleration: TargetDirection {
+ targetX: root.width/2
+ targetY: root.height/2
+ targetVariation: 200
+ proportionalMagnitude: true
+ magnitude: 0.1
+ magnitudeVariation: 0.1
+ }
+ }
+ }
+}
diff --git a/examples/quick/particles/emitters/content/trailemitter.qml b/examples/quick/particles/emitters/trailemitter.qml
index fdb6180eb6..eb8f03ab3c 100644
--- a/examples/quick/particles/emitters/content/trailemitter.qml
+++ b/examples/quick/particles/emitters/trailemitter.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
Rectangle {
id: root
diff --git a/examples/quick/particles/emitters/content/velocityfrommotion.qml b/examples/quick/particles/emitters/velocityfrommotion.qml
index eee533a2fe..aa65ac7d9e 100644
--- a/examples/quick/particles/emitters/content/velocityfrommotion.qml
+++ b/examples/quick/particles/emitters/velocityfrommotion.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
Rectangle {
@@ -72,7 +25,6 @@ Rectangle {
ImageParticle {
system: sys1
source: "qrc:///particleresources/glowdot.png"
- color: "cyan"
alpha: 0
SequentialAnimation on color {
loops: Animation.Infinite
@@ -120,7 +72,6 @@ Rectangle {
//! [0]
ParticleSystem { id: sys2 }
ImageParticle {
- color: "cyan"
system: sys2
alpha: 0
SequentialAnimation on color {
@@ -161,7 +112,6 @@ Rectangle {
ImageParticle {
source: "qrc:///particleresources/glowdot.png"
system: sys3
- color: "orange"
alpha: 0
SequentialAnimation on color {
loops: Animation.Infinite
@@ -202,7 +152,6 @@ Rectangle {
ImageParticle {
system: sys4
source: "qrc:///particleresources/star.png"
- color: "green"
alpha: 0
SequentialAnimation on color {
loops: Animation.Infinite
@@ -246,12 +195,12 @@ Rectangle {
Item {
id: circle
//anchors.fill: parent
- property real radius: 0
+ property real radius
property real dx: root.width / 2
property real dy: root.height / 2
property real cx: radius * Math.sin(percent*6.283185307179) + dx
property real cy: radius * Math.cos(percent*6.283185307179) + dy
- property real percent: 0
+ property real percent
SequentialAnimation on percent {
loops: Animation.Infinite
@@ -294,7 +243,7 @@ Rectangle {
property real dy: root.height / 2
property real cx: radius * Math.sin(percent*6.283185307179) + dx
property real cy: radius * Math.cos(percent*6.283185307179) + dy
- property real percent: 0
+ property real percent
SequentialAnimation on percent {
loops: Animation.Infinite
@@ -310,7 +259,7 @@ Rectangle {
property real dy: circle3.cy
property real cx: radius * Math.sin(percent*6.283185307179) + dx
property real cy: radius * Math.cos(percent*6.283185307179) + dy
- property real percent: 0
+ property real percent
SequentialAnimation on percent {
loops: Animation.Infinite
diff --git a/examples/quick/particles/imageparticle/CMakeLists.txt b/examples/quick/particles/imageparticle/CMakeLists.txt
index 29bddbb0db..c587d9bcc3 100644
--- a/examples/quick/particles/imageparticle/CMakeLists.txt
+++ b/examples/quick/particles/imageparticle/CMakeLists.txt
@@ -1,267 +1,62 @@
-# Generated from imageparticle.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(imageparticle LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup(REQUIRES 6.5)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
+add_subdirectory("../../shared" "shared")
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/particles/imageparticle")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(imageparticle
+qt_add_executable(imageparticleexample WIN32 MACOSX_BUNDLE
main.cpp
)
-set_target_properties(imageparticle PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(imageparticle PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-# Resources:
-set(imageparticle_resource_files
- "content/allatonce.qml"
- "content/colored.qml"
- "content/colortable.qml"
- "content/deformation.qml"
- "content/rotation.qml"
- "content/sharing.qml"
- "content/sprites.qml"
- "imageparticle.qml"
+target_link_libraries(imageparticleexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
-qt6_add_resources(imageparticle "imageparticle"
- PREFIX
- "/particles/imageparticle"
- FILES
- ${imageparticle_resource_files}
-)
-set_source_files_properties("../images/_explo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/_explo.png"
-)
-set_source_files_properties("../images/backgroundLeaves.jpg"
- PROPERTIES QT_RESOURCE_ALIAS "images/backgroundLeaves.jpg"
-)
-set_source_files_properties("../images/bear_tiles.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/bear_tiles.png"
-)
-set_source_files_properties("../images/candle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/candle.png"
-)
-set_source_files_properties("../images/colortable.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/colortable.png"
-)
-set_source_files_properties("../images/finalfrontier.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/finalfrontier.png"
-)
-set_source_files_properties("../images/flower.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/flower.png"
-)
-set_source_files_properties("../images/matchmask.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/matchmask.png"
-)
-set_source_files_properties("../images/meteor.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/meteor.png"
-)
-set_source_files_properties("../images/meteor_explo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/meteor_explo.png"
-)
-set_source_files_properties("../images/meteors.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/meteors.png"
-)
-set_source_files_properties("../images/nullRock.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/nullRock.png"
-)
-set_source_files_properties("../images/particle2.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/particle2.png"
-)
-set_source_files_properties("../images/particle3.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/particle3.png"
-)
-set_source_files_properties("../images/particleA.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/particleA.png"
-)
-set_source_files_properties("../images/portal_bg.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/portal_bg.png"
-)
-set_source_files_properties("../images/realLeaf1.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/realLeaf1.png"
-)
-set_source_files_properties("../images/realLeaf2.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/realLeaf2.png"
-)
-set_source_files_properties("../images/realLeaf3.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/realLeaf3.png"
-)
-set_source_files_properties("../images/realLeaf4.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/realLeaf4.png"
-)
-set_source_files_properties("../images/rocket.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/rocket.png"
-)
-set_source_files_properties("../images/rocket2.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/rocket2.png"
-)
-set_source_files_properties("../images/sizeInOut.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/sizeInOut.png"
-)
-set_source_files_properties("../images/snowflake.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/snowflake.png"
-)
-set_source_files_properties("../images/sparkleSize.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/sparkleSize.png"
-)
-set_source_files_properties("../images/starfish_0.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_0.png"
-)
-set_source_files_properties("../images/starfish_1.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_1.png"
-)
-set_source_files_properties("../images/starfish_2.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_2.png"
-)
-set_source_files_properties("../images/starfish_3.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_3.png"
-)
-set_source_files_properties("../images/starfish_4.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_4.png"
-)
-set_source_files_properties("../images/starfish_mask.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_mask.png"
-)
-set(images_resource_files
- "images/_explo.png"
- "images/backgroundLeaves.jpg"
- "images/bear_tiles.png"
- "images/candle.png"
- "images/colortable.png"
- "images/finalfrontier.png"
- "images/flower.png"
- "images/matchmask.png"
- "images/meteor.png"
- "images/meteor_explo.png"
- "images/meteors.png"
- "images/nullRock.png"
- "images/particle2.png"
- "images/particle3.png"
- "images/particleA.png"
- "images/portal_bg.png"
- "images/realLeaf1.png"
- "images/realLeaf2.png"
- "images/realLeaf3.png"
- "images/realLeaf4.png"
- "images/rocket.png"
- "images/rocket2.png"
- "images/sizeInOut.png"
- "images/snowflake.png"
- "images/sparkleSize.png"
- "images/starfish_0.png"
- "images/starfish_1.png"
- "images/starfish_2.png"
- "images/starfish_3.png"
- "images/starfish_4.png"
- "images/starfish_mask.png"
-)
-
-qt6_add_resources(imageparticle "images"
- PREFIX
- "/particles"
- BASE
- ".."
- FILES
- ${images_resource_files}
-)
-set_source_files_properties("../../shared/Button.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Button.qml"
-)
-set_source_files_properties("../../shared/CheckBox.qml"
- PROPERTIES QT_RESOURCE_ALIAS "CheckBox.qml"
-)
-set_source_files_properties("../../shared/FlickrRssModel.qml"
- PROPERTIES QT_RESOURCE_ALIAS "FlickrRssModel.qml"
-)
-set_source_files_properties("../../shared/Label.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Label.qml"
-)
-set_source_files_properties("../../shared/LauncherList.qml"
- PROPERTIES QT_RESOURCE_ALIAS "LauncherList.qml"
-)
-set_source_files_properties("../../shared/SimpleLauncherDelegate.qml"
- PROPERTIES QT_RESOURCE_ALIAS "SimpleLauncherDelegate.qml"
-)
-set_source_files_properties("../../shared/Slider.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Slider.qml"
-)
-set_source_files_properties("../../shared/TabSet.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TabSet.qml"
-)
-set_source_files_properties("../../shared/TextField.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TextField.qml"
-)
-set_source_files_properties("../../shared/images/back.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/back.png"
-)
-set_source_files_properties("../../shared/images/checkmark.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/checkmark.png"
-)
-set_source_files_properties("../../shared/images/next.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/next.png"
-)
-set_source_files_properties("../../shared/images/qt-logo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/qt-logo.png"
-)
-set_source_files_properties("../../shared/images/slider_handle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/slider_handle.png"
-)
-set_source_files_properties("../../shared/images/tab.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/tab.png"
-)
-set(shared_resource_files
- "Button.qml"
- "CheckBox.qml"
- "FlickrRssModel.qml"
- "Label.qml"
- "LauncherList.qml"
- "SimpleLauncherDelegate.qml"
- "Slider.qml"
- "TabSet.qml"
- "TextField.qml"
- "images/back.png"
- "images/checkmark.png"
- "images/next.png"
- "images/qt-logo.png"
- "images/slider_handle.png"
- "images/tab.png"
-)
+add_dependencies(imageparticleexample imageparticle_shared)
-qt6_add_resources(imageparticle "shared"
- PREFIX
- "/shared"
- BASE
- "../../shared"
- FILES
- ${shared_resource_files}
-)
-
-install(TARGETS imageparticle
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
+# Resources:
+qt_add_qml_module(imageparticleexample
+ URI imageparticle
+ QML_FILES
+ "allatonce.qml"
+ "colored.qml"
+ "colortable.qml"
+ "deformation.qml"
+ "imageparticle.qml"
+ "rotation.qml"
+ "sharing.qml"
+ "sprites.qml"
+ RESOURCES
+ "images/bear_tiles.png"
+ "images/colortable.png"
+ "images/starfish_0.png"
+ "images/starfish_1.png"
+ "images/starfish_2.png"
+ "images/starfish_3.png"
+ "images/starfish_4.png"
+ "images/flower.png"
+)
+
+install(TARGETS imageparticleexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET imageparticleexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/particles/imageparticle/allatonce.qml b/examples/quick/particles/imageparticle/allatonce.qml
new file mode 100644
index 0000000000..62a8d6c448
--- /dev/null
+++ b/examples/quick/particles/imageparticle/allatonce.qml
@@ -0,0 +1,63 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+Rectangle {
+ color: "white"
+ width: 640
+ height: 480
+ ParticleSystem {
+ id: sys
+ }
+
+ ImageParticle {
+ // ![0]
+ sprites: [
+ Sprite {
+ name: "bear"
+ source: "images/bear_tiles.png"
+ frameCount: 13
+ frameDuration: 120
+ }
+ ]
+ colorVariation: 0.5
+ rotationVelocityVariation: 360
+ colorTable: "images/colortable.png"
+ // ![0]
+ system: sys
+ }
+
+ Friction {
+ factor: 0.1
+ system: sys
+ }
+
+ Emitter {
+ system: sys
+ anchors.centerIn: parent
+ id: particles
+ emitRate: 200
+ lifeSpan: 6000
+ velocity: AngleDirection {angleVariation: 360; magnitude: 80; magnitudeVariation: 40}
+ size: 60
+ endSize: 120
+ }
+
+ Text {
+ x: 16
+ y: 16
+ text: "QML..."
+ style: Text.Outline; styleColor: "#AAAAAA"
+ font.pixelSize: 32
+ }
+ Text {
+ anchors.bottom: parent.bottom
+ anchors.right: parent.right
+ anchors.margins: 16
+ text: "... can you be trusted with the power?"
+ style: Text.Outline; styleColor: "#AAAAAA"
+ font.pixelSize: width > 400 ? 32 : 16
+ }
+}
diff --git a/examples/quick/particles/imageparticle/colored.qml b/examples/quick/particles/imageparticle/colored.qml
new file mode 100644
index 0000000000..8d4be46873
--- /dev/null
+++ b/examples/quick/particles/imageparticle/colored.qml
@@ -0,0 +1,51 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+Rectangle {
+ width: 360
+ height: 540
+ color: "black"
+ ParticleSystem {
+ anchors.fill: parent
+ ImageParticle {
+ groups: ["stars"]
+ anchors.fill: parent
+ source: "qrc:///particleresources/star.png"
+ }
+ Emitter {
+ group: "stars"
+ emitRate: 800
+ lifeSpan: 2400
+ size: 24
+ sizeVariation: 8
+ anchors.fill: parent
+ }
+
+ // ![0]
+ ImageParticle {
+ anchors.fill: parent
+ source: "qrc:///particleresources/star.png"
+ alpha: 0
+ alphaVariation: 0.2
+ colorVariation: 1.0
+ }
+ // ![0]
+
+ Emitter {
+ anchors.centerIn: parent
+ emitRate: 400
+ lifeSpan: 2400
+ size: 48
+ sizeVariation: 8
+ velocity: AngleDirection {angleVariation: 180; magnitude: 60}
+ }
+
+ Turbulence {
+ anchors.fill: parent
+ strength: 2
+ }
+ }
+}
diff --git a/examples/quick/particles/imageparticle/colortable.qml b/examples/quick/particles/imageparticle/colortable.qml
new file mode 100644
index 0000000000..f571f98b56
--- /dev/null
+++ b/examples/quick/particles/imageparticle/colortable.qml
@@ -0,0 +1,49 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick.Particles
+import QtQuick
+
+Rectangle {
+ id: root
+ width: 360
+ height: 540
+ color: "black"
+
+ ParticleSystem { id: particles }
+
+ ImageParticle {
+ system: particles
+ colorVariation: 0.5
+ alpha: 0
+
+ //! [0]
+ source: "qrc:///particleresources/glowdot.png"
+ colorTable: "images/colortable.png"
+ sizeTable: "images/colortable.png"
+ //! [0]
+ }
+
+ Emitter {
+ system: particles
+ emitRate: 500
+ lifeSpan: 2000
+
+ y: root.height / 2 + Math.sin(t * 2) * root.height * 0.3
+ x: root.width / 2 + Math.cos(t) * root.width * 0.3
+ property real t;
+
+ NumberAnimation on t {
+ from: 0; to: Math.PI * 2; duration: 10000; loops: Animation.Infinite
+ }
+
+ velocityFromMovement: 20
+
+ velocity: PointDirection { xVariation: 5; yVariation: 5;}
+ acceleration: PointDirection { xVariation: 5; yVariation: 5;}
+
+ size: 16
+ //endSize: 8
+ //sizeVariation: 8
+ }
+}
diff --git a/examples/quick/particles/imageparticle/content/allatonce.qml b/examples/quick/particles/imageparticle/content/allatonce.qml
deleted file mode 100644
index 4b6c9b35cc..0000000000
--- a/examples/quick/particles/imageparticle/content/allatonce.qml
+++ /dev/null
@@ -1,110 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Rectangle {
- color: "white"
- width: 640
- height: 480
- ParticleSystem {
- id: sys
- }
-
- ImageParticle {
- // ![0]
- sprites: [
- Sprite {
- name: "bear"
- source: "../../images/bear_tiles.png"
- frameCount: 13
- frameDuration: 120
- }
- ]
- colorVariation: 0.5
- rotationVelocityVariation: 360
- colorTable: "../../images/colortable.png"
- // ![0]
- system: sys
- }
-
- Friction {
- factor: 0.1
- system: sys
- }
-
- Emitter {
- system: sys
- anchors.centerIn: parent
- id: particles
- emitRate: 200
- lifeSpan: 6000
- velocity: AngleDirection {angleVariation: 360; magnitude: 80; magnitudeVariation: 40}
- size: 60
- endSize: 120
- }
-
- Text {
- x: 16
- y: 16
- text: "QML..."
- style: Text.Outline; styleColor: "#AAAAAA"
- font.pixelSize: 32
- }
- Text {
- anchors.bottom: parent.bottom
- anchors.right: parent.right
- anchors.margins: 16
- text: "... can you be trusted with the power?"
- style: Text.Outline; styleColor: "#AAAAAA"
- font.pixelSize: width > 400 ? 32 : 16
- }
-}
diff --git a/examples/quick/particles/imageparticle/content/colored.qml b/examples/quick/particles/imageparticle/content/colored.qml
deleted file mode 100644
index 3452cad805..0000000000
--- a/examples/quick/particles/imageparticle/content/colored.qml
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Rectangle {
- width: 360
- height: 540
- color: "black"
- ParticleSystem {
- anchors.fill: parent
- ImageParticle {
- groups: ["stars"]
- anchors.fill: parent
- source: "qrc:///particleresources/star.png"
- }
- Emitter {
- group: "stars"
- emitRate: 800
- lifeSpan: 2400
- size: 24
- sizeVariation: 8
- anchors.fill: parent
- }
-
- // ![0]
- ImageParticle {
- anchors.fill: parent
- source: "qrc:///particleresources/star.png"
- alpha: 0
- alphaVariation: 0.2
- colorVariation: 1.0
- }
- // ![0]
-
- Emitter {
- anchors.centerIn: parent
- emitRate: 400
- lifeSpan: 2400
- size: 48
- sizeVariation: 8
- velocity: AngleDirection {angleVariation: 180; magnitude: 60}
- }
-
- Turbulence {
- anchors.fill: parent
- strength: 2
- }
- }
-}
diff --git a/examples/quick/particles/imageparticle/content/colortable.qml b/examples/quick/particles/imageparticle/content/colortable.qml
deleted file mode 100644
index 5f88c1a8b3..0000000000
--- a/examples/quick/particles/imageparticle/content/colortable.qml
+++ /dev/null
@@ -1,96 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick.Particles 2.0
-import QtQuick 2.0
-
-Rectangle {
- id: root
- width: 360
- height: 540
- color: "black"
-
- ParticleSystem { id: particles }
-
- ImageParticle {
- system: particles
- colorVariation: 0.5
- alpha: 0
-
- //! [0]
- source: "qrc:///particleresources/glowdot.png"
- colorTable: "../../images/colortable.png"
- sizeTable: "../../images/colortable.png"
- //! [0]
- }
-
- Emitter {
- system: particles
- emitRate: 500
- lifeSpan: 2000
-
- y: root.height / 2 + Math.sin(t * 2) * root.height * 0.3
- x: root.width / 2 + Math.cos(t) * root.width * 0.3
- property real t;
-
- NumberAnimation on t {
- from: 0; to: Math.PI * 2; duration: 10000; loops: Animation.Infinite
- }
-
- velocityFromMovement: 20
-
- velocity: PointDirection { xVariation: 5; yVariation: 5;}
- acceleration: PointDirection { xVariation: 5; yVariation: 5;}
-
- size: 16
- //endSize: 8
- //sizeVariation: 8
- }
-}
diff --git a/examples/quick/particles/imageparticle/content/deformation.qml b/examples/quick/particles/imageparticle/content/deformation.qml
deleted file mode 100644
index ce672c8fa3..0000000000
--- a/examples/quick/particles/imageparticle/content/deformation.qml
+++ /dev/null
@@ -1,135 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Rectangle {
- color: "goldenrod"
- width: 400
- height: 400
- ParticleSystem {id:sys}
-
- //! [spin]
- ImageParticle {
- system: sys
- groups: ["goingLeft", "goingRight"]
- source: "../../images/starfish_4.png"
- rotation: 90
- rotationVelocity: 90
- autoRotation: true
- }
- //! [spin]
- //! [deform]
- ImageParticle {
- system: sys
- groups: ["goingDown"]
- source: "../../images/starfish_0.png"
- rotation: 180
- yVector: PointDirection { y: 0.5; yVariation: 0.25; xVariation: 0.25; }
- }
- //! [deform]
-
- Timer {
- running: true
- repeat: false
- interval: 100
- onTriggered: emitA.enabled = true;
- }
- Timer {
- running: true
- repeat: false
- interval: 4200
- onTriggered: emitB.enabled = true;
- }
- Timer {
- running: true
- repeat: false
- interval: 8400
- onTriggered: emitC.enabled = true;
- }
-
- Emitter {
- id: emitA
- x: 0
- y: 120
- system: sys
- enabled: false
- group: "goingRight"
- velocity: PointDirection { x: 100 }
- lifeSpan: 4000
- emitRate: 1
- size: 128
- }
- Emitter {
- id: emitB
- x: 400
- y: 240
- system: sys
- enabled: false
- group: "goingLeft"
- velocity: PointDirection { x: -100 }
- lifeSpan: 4000
- emitRate: 1
- size: 128
- }
- Emitter {
- id: emitC
- x: 0
- y: 360
- system: sys
- enabled: false
- group: "goingDown"
- velocity: PointDirection { x: 100 }
- lifeSpan: 4000
- emitRate: 1
- size: 128
- }
-}
diff --git a/examples/quick/particles/imageparticle/content/rotation.qml b/examples/quick/particles/imageparticle/content/rotation.qml
deleted file mode 100644
index d118bb1d97..0000000000
--- a/examples/quick/particles/imageparticle/content/rotation.qml
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Rectangle {
- color: "goldenrod"
- width: 2000
- height: 2000
- ParticleSystem {id: sys}
- ImageParticle {
- id: up
- system: sys
- source: "../../images/starfish_2.png"
- autoRotation: true //leaving these two settings at default allows you to test going up performance levels
- rotation: -90
- }
-
- Emitter {
- anchors.centerIn: parent
- system: sys
- emitRate: 10
- size: 200
- lifeSpan: 10000
- velocity: AngleDirection {angleVariation: 360; magnitudeVariation: 100;}
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: {
- up.autoRotation = !up.autoRotation
- up.rotation = up.autoRotation ? -90 : 0
- }
- }
-}
diff --git a/examples/quick/particles/imageparticle/content/sprites.qml b/examples/quick/particles/imageparticle/content/sprites.qml
deleted file mode 100644
index c8ffe6c0e5..0000000000
--- a/examples/quick/particles/imageparticle/content/sprites.qml
+++ /dev/null
@@ -1,126 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Rectangle {
- color: "lightsteelblue"
- width: 800
- height: 800
- id: root
-
- SpriteSequence {
- sprites: Sprite {
- name: "bear"
- source: "../../images/bear_tiles.png"
- frameCount: 13
- frameDuration: 120
- }
- width: 250
- height: 250
- x: 20
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 20
- z:4
- }
-
- ParticleSystem { id: sys }
-
- ImageParticle {
- anchors.fill: parent
- id: particles
- system: sys
- sprites: [Sprite {
- name: "happy"
- source: "../../images/starfish_1.png"
- frameCount: 1
- frameDuration: 260
- to: {"happy": 1, "silly": 1, "angry": 1}
- }, Sprite {
- name: "angry"
- source: "../../images/starfish_0.png"
- frameCount: 1
- frameDuration: 260
- to: {"happy": 1, "silly": 1, "angry": 1}
- }, Sprite {
- name: "silly"
- source: "../../images/starfish_2.png"
- frameCount: 1
- frameDuration: 260
- to: {"happy": 1, "silly": 1, "noticedbear": 0}
- }, Sprite {
- name: "noticedbear"
- source: "../../images/starfish_3.png"
- frameCount: 1
- frameDuration: 2600
- }]
- }
-
- Emitter {
- system: sys
- emitRate: 2
- lifeSpan: 10000
- velocity: AngleDirection {angle: 90; magnitude: 60; angleVariation: 5}
- acceleration: PointDirection { y: 10 }
- size: 160
- sizeVariation: 40
- width: parent.width
- height: 100
- }
-
- SpriteGoal {
- system: sys
- width: root.width;
- height: root.height/2;
- y: root.height/2;
- goalState:"noticedbear"
- }
-}
diff --git a/examples/quick/particles/imageparticle/deformation.qml b/examples/quick/particles/imageparticle/deformation.qml
new file mode 100644
index 0000000000..f853798b05
--- /dev/null
+++ b/examples/quick/particles/imageparticle/deformation.qml
@@ -0,0 +1,88 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+Rectangle {
+ color: "goldenrod"
+ width: 400
+ height: 400
+ ParticleSystem {id:sys}
+
+ //! [spin]
+ ImageParticle {
+ system: sys
+ groups: ["goingLeft", "goingRight"]
+ source: "images/starfish_4.png"
+ rotation: 90
+ rotationVelocity: 90
+ autoRotation: true
+ }
+ //! [spin]
+ //! [deform]
+ ImageParticle {
+ system: sys
+ groups: ["goingDown"]
+ source: "images/starfish_0.png"
+ rotation: 180
+ yVector: PointDirection { y: 0.5; yVariation: 0.25; xVariation: 0.25; }
+ }
+ //! [deform]
+
+ Timer {
+ running: true
+ repeat: false
+ interval: 100
+ onTriggered: emitA.enabled = true;
+ }
+ Timer {
+ running: true
+ repeat: false
+ interval: 4200
+ onTriggered: emitB.enabled = true;
+ }
+ Timer {
+ running: true
+ repeat: false
+ interval: 8400
+ onTriggered: emitC.enabled = true;
+ }
+
+ Emitter {
+ id: emitA
+ x: 0
+ y: 120
+ system: sys
+ enabled: false
+ group: "goingRight"
+ velocity: PointDirection { x: 100 }
+ lifeSpan: 4000
+ emitRate: 1
+ size: 128
+ }
+ Emitter {
+ id: emitB
+ x: 400
+ y: 240
+ system: sys
+ enabled: false
+ group: "goingLeft"
+ velocity: PointDirection { x: -100 }
+ lifeSpan: 4000
+ emitRate: 1
+ size: 128
+ }
+ Emitter {
+ id: emitC
+ x: 0
+ y: 360
+ system: sys
+ enabled: false
+ group: "goingDown"
+ velocity: PointDirection { x: 100 }
+ lifeSpan: 4000
+ emitRate: 1
+ size: 128
+ }
+}
diff --git a/examples/quick/particles/imageparticle/doc/src/imageparticle.qdoc b/examples/quick/particles/imageparticle/doc/src/imageparticle.qdoc
index 6a71e1f5fd..4bbbc6a430 100644
--- a/examples/quick/particles/imageparticle/doc/src/imageparticle.qdoc
+++ b/examples/quick/particles/imageparticle/doc/src/imageparticle.qdoc
@@ -1,33 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Qt Quick Particles Examples - Image Particles
\example particles/imageparticle
+ \examplecategory {Graphics}
\brief This is a collection of examples using Affectors in the QML particle system.
\image qml-imageparticle-example.png
@@ -35,25 +12,25 @@
Each example is a small QML file emphasizing a particular type or feature.
All at once shows off several of the features of ImageParticle at the same time.
- \snippet particles/imageparticle/content/allatonce.qml 0
+ \snippet particles/imageparticle/allatonce.qml 0
Colored shows a simple ImageParticle with some color variation.
- \snippet particles/imageparticle/content/colored.qml 0
+ \snippet particles/imageparticle/colored.qml 0
Color Table sets the color over life on the particles to provide a fixed rainbow effect.
- \snippet particles/imageparticle/content/colortable.qml 0
+ \snippet particles/imageparticle/colortable.qml 0
Deformation spins and squishes a starfish particle.
- \snippet particles/imageparticle/content/deformation.qml spin
- \snippet particles/imageparticle/content/deformation.qml deform
+ \snippet particles/imageparticle/deformation.qml spin
+ \snippet particles/imageparticle/deformation.qml deform
Rotation demonstrates the autoRotate property, so that particles rotate in the direction that they travel.
Sharing demonstrates what happens when multiple ImageParticles try to render the same particle.
The following ImageParticle renders the particles inside the ListView:
- \snippet particles/imageparticle/content/sharing.qml 0
+ \snippet particles/imageparticle/sharing.qml 0
The following ImageParticle is placed inside the list highlight, and renders the particles above the other ImageParticle.
- \snippet particles/imageparticle/content/sharing.qml 1
+ \snippet particles/imageparticle/sharing.qml 1
Note that because it sets the color and alpha in this ImageParticle, it renders the particles in a different color.
Since it doesn't specify anything about the rotation, it shares the rotation with the other ImageParticle so that the flowers are rotated the same way in both.
Note that you can undo rotation in another ImageParticle, you just need to explicitly set rotationVariation to 0.
diff --git a/examples/quick/particles/imageparticle/imageparticle.pro b/examples/quick/particles/imageparticle/imageparticle.pro
index e639c7423a..c9c5e59eb0 100644
--- a/examples/quick/particles/imageparticle/imageparticle.pro
+++ b/examples/quick/particles/imageparticle/imageparticle.pro
@@ -4,7 +4,6 @@ QT += quick qml
SOURCES += main.cpp
RESOURCES += \
imageparticle.qrc \
- ../images.qrc \
../../shared/shared.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/quick/particles/imageparticle
diff --git a/examples/quick/particles/imageparticle/imageparticle.qml b/examples/quick/particles/imageparticle/imageparticle.qml
index a8dfa6a0c9..2fb97cd568 100644
--- a/examples/quick/particles/imageparticle/imageparticle.qml
+++ b/examples/quick/particles/imageparticle/imageparticle.qml
@@ -1,70 +1,23 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import "../../shared" as Examples
+import QtQuick
+import shared
Item {
height: 480
width: 320
- Examples.LauncherList {
+ LauncherList {
id: ll
anchors.fill: parent
Component.onCompleted: {
- addExample("All at once", "Uses all ImageParticle features", Qt.resolvedUrl("content/allatonce.qml"));
- addExample("Colored", "Colorized image particles", Qt.resolvedUrl("content/colored.qml"));
- addExample("Color Table", "Color-over-life rainbow particles", Qt.resolvedUrl("content/colortable.qml"));
- addExample("Deformation", "Deformed particles", Qt.resolvedUrl("content/deformation.qml"));
- addExample("Rotation", "Rotated particles", Qt.resolvedUrl("content/rotation.qml"));
- addExample("Sharing", "Multiple ImageParticles on the same particles", Qt.resolvedUrl("content/sharing.qml"));
- addExample("Sprites", "Particles rendered with sprites", Qt.resolvedUrl("content/sprites.qml"));
+ addExample("All at once", "Uses all ImageParticle features", Qt.resolvedUrl("allatonce.qml"));
+ addExample("Colored", "Colorized image particles", Qt.resolvedUrl("colored.qml"));
+ addExample("Color Table", "Color-over-life rainbow particles", Qt.resolvedUrl("colortable.qml"));
+ addExample("Deformation", "Deformed particles", Qt.resolvedUrl("deformation.qml"));
+ addExample("Rotation", "Rotated particles", Qt.resolvedUrl("rotation.qml"));
+ addExample("Sharing", "Multiple ImageParticles on the same particles", Qt.resolvedUrl("sharing.qml"));
+ addExample("Sprites", "Particles rendered with sprites", Qt.resolvedUrl("sprites.qml"));
}
}
}
diff --git a/examples/quick/particles/imageparticle/imageparticle.qrc b/examples/quick/particles/imageparticle/imageparticle.qrc
index d9e4115e3e..f77a5ac411 100644
--- a/examples/quick/particles/imageparticle/imageparticle.qrc
+++ b/examples/quick/particles/imageparticle/imageparticle.qrc
@@ -1,12 +1,20 @@
<RCC>
- <qresource prefix="/particles/imageparticle">
+ <qresource prefix="/qt/qml/imageparticle">
<file>imageparticle.qml</file>
- <file>content/allatonce.qml</file>
- <file>content/colored.qml</file>
- <file>content/colortable.qml</file>
- <file>content/deformation.qml</file>
- <file>content/rotation.qml</file>
- <file>content/sharing.qml</file>
- <file>content/sprites.qml</file>
+ <file>allatonce.qml</file>
+ <file>colored.qml</file>
+ <file>colortable.qml</file>
+ <file>deformation.qml</file>
+ <file>rotation.qml</file>
+ <file>sharing.qml</file>
+ <file>sprites.qml</file>
+ <file>images/bear_tiles.png</file>
+ <file>images/colortable.png</file>
+ <file>images/starfish_0.png</file>
+ <file>images/starfish_1.png</file>
+ <file>images/starfish_2.png</file>
+ <file>images/starfish_3.png</file>
+ <file>images/starfish_4.png</file>
+ <file>images/flower.png</file>
</qresource>
</RCC>
diff --git a/examples/quick/particles/images/bear_tiles.png b/examples/quick/particles/imageparticle/images/bear_tiles.png
index 6bbb2a9b6d..6bbb2a9b6d 100644
--- a/examples/quick/particles/images/bear_tiles.png
+++ b/examples/quick/particles/imageparticle/images/bear_tiles.png
Binary files differ
diff --git a/examples/quick/particles/images/colortable.png b/examples/quick/particles/imageparticle/images/colortable.png
index 15509ab5b7..15509ab5b7 100644
--- a/examples/quick/particles/images/colortable.png
+++ b/examples/quick/particles/imageparticle/images/colortable.png
Binary files differ
diff --git a/examples/quick/particles/images/flower.png b/examples/quick/particles/imageparticle/images/flower.png
index b5c606210e..b5c606210e 100644
--- a/examples/quick/particles/images/flower.png
+++ b/examples/quick/particles/imageparticle/images/flower.png
Binary files differ
diff --git a/examples/quick/particles/images/starfish_0.png b/examples/quick/particles/imageparticle/images/starfish_0.png
index 8747f0236e..8747f0236e 100644
--- a/examples/quick/particles/images/starfish_0.png
+++ b/examples/quick/particles/imageparticle/images/starfish_0.png
Binary files differ
diff --git a/examples/quick/particles/images/starfish_1.png b/examples/quick/particles/imageparticle/images/starfish_1.png
index 1f3f159d5e..1f3f159d5e 100644
--- a/examples/quick/particles/images/starfish_1.png
+++ b/examples/quick/particles/imageparticle/images/starfish_1.png
Binary files differ
diff --git a/examples/quick/particles/images/starfish_2.png b/examples/quick/particles/imageparticle/images/starfish_2.png
index c6c7e5a676..c6c7e5a676 100644
--- a/examples/quick/particles/images/starfish_2.png
+++ b/examples/quick/particles/imageparticle/images/starfish_2.png
Binary files differ
diff --git a/examples/quick/particles/images/starfish_3.png b/examples/quick/particles/imageparticle/images/starfish_3.png
index 307a89f815..307a89f815 100644
--- a/examples/quick/particles/images/starfish_3.png
+++ b/examples/quick/particles/imageparticle/images/starfish_3.png
Binary files differ
diff --git a/examples/quick/particles/images/starfish_4.png b/examples/quick/particles/imageparticle/images/starfish_4.png
index d61c26545a..d61c26545a 100644
--- a/examples/quick/particles/images/starfish_4.png
+++ b/examples/quick/particles/imageparticle/images/starfish_4.png
Binary files differ
diff --git a/examples/quick/particles/imageparticle/main.cpp b/examples/quick/particles/imageparticle/main.cpp
index ff0764a730..43bd43a1b6 100644
--- a/examples/quick/particles/imageparticle/main.cpp
+++ b/examples/quick/particles/imageparticle/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(particles/imageparticle/imageparticle)
+DECLARATIVE_EXAMPLE_MAIN(imageparticle/imageparticle)
diff --git a/examples/quick/particles/imageparticle/rotation.qml b/examples/quick/particles/imageparticle/rotation.qml
new file mode 100644
index 0000000000..df1a40d786
--- /dev/null
+++ b/examples/quick/particles/imageparticle/rotation.qml
@@ -0,0 +1,36 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+Rectangle {
+ color: "goldenrod"
+ width: 2000
+ height: 2000
+ ParticleSystem {id: sys}
+ ImageParticle {
+ id: up
+ system: sys
+ source: "images/starfish_2.png"
+ autoRotation: true //leaving these two settings at default allows you to test going up performance levels
+ rotation: -90
+ }
+
+ Emitter {
+ anchors.centerIn: parent
+ system: sys
+ emitRate: 10
+ size: 200
+ lifeSpan: 10000
+ velocity: AngleDirection {angleVariation: 360; magnitudeVariation: 100;}
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ up.autoRotation = !up.autoRotation
+ up.rotation = up.autoRotation ? -90 : 0
+ }
+ }
+}
diff --git a/examples/quick/particles/imageparticle/content/sharing.qml b/examples/quick/particles/imageparticle/sharing.qml
index 13b0dadf85..3519072b70 100644
--- a/examples/quick/particles/imageparticle/content/sharing.qml
+++ b/examples/quick/particles/imageparticle/sharing.qml
@@ -1,59 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
// This example shows how to create your own highlight delegate for a ListView
// that uses a SpringAnimation to provide custom movement when the
// highlight bar is moved between items.
-import QtQuick 2.0
-import QtQuick.Particles 2.0
+import QtQuick
+import QtQuick.Particles
Rectangle {
id: root
@@ -87,7 +40,7 @@ Rectangle {
states: State {
name: "Current"
when: pet.ListView.isCurrentItem
- PropertyChanges { target: pet; x: 20 }
+ PropertyChanges { pet.x: 20 }
}
transitions: Transition {
NumberAnimation { properties: "x"; duration: 200 }
@@ -108,7 +61,7 @@ Rectangle {
ImageParticle {
anchors.fill: parent
system: particles
- source: "../../images/flower.png"
+ source: "images/flower.png"
color: "red"
clip: true
alpha: 1.0
@@ -147,7 +100,7 @@ Rectangle {
ImageParticle {
anchors.fill: parent
system: particles
- source: "../../images/flower.png"
+ source: "images/flower.png"
alpha: 0.1
color: "white"
rotationVariation: 180
diff --git a/examples/quick/particles/imageparticle/sprites.qml b/examples/quick/particles/imageparticle/sprites.qml
new file mode 100644
index 0000000000..d4887feab6
--- /dev/null
+++ b/examples/quick/particles/imageparticle/sprites.qml
@@ -0,0 +1,79 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+Rectangle {
+ color: "lightsteelblue"
+ width: 800
+ height: 800
+ id: root
+
+ SpriteSequence {
+ sprites: Sprite {
+ name: "bear"
+ source: "images/bear_tiles.png"
+ frameCount: 13
+ frameDuration: 120
+ }
+ width: 250
+ height: 250
+ x: 20
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 20
+ z:4
+ }
+
+ ParticleSystem { id: sys }
+
+ ImageParticle {
+ anchors.fill: parent
+ id: particles
+ system: sys
+ sprites: [Sprite {
+ name: "happy"
+ source: "images/starfish_1.png"
+ frameCount: 1
+ frameDuration: 260
+ to: {"happy": 1, "silly": 1, "angry": 1}
+ }, Sprite {
+ name: "angry"
+ source: "images/starfish_0.png"
+ frameCount: 1
+ frameDuration: 260
+ to: {"happy": 1, "silly": 1, "angry": 1}
+ }, Sprite {
+ name: "silly"
+ source: "images/starfish_2.png"
+ frameCount: 1
+ frameDuration: 260
+ to: {"happy": 1, "silly": 1, "noticedbear": 0}
+ }, Sprite {
+ name: "noticedbear"
+ source: "images/starfish_3.png"
+ frameCount: 1
+ frameDuration: 2600
+ }]
+ }
+
+ Emitter {
+ system: sys
+ emitRate: 2
+ lifeSpan: 10000
+ velocity: AngleDirection {angle: 90; magnitude: 60; angleVariation: 5}
+ acceleration: PointDirection { y: 10 }
+ size: 160
+ sizeVariation: 40
+ width: parent.width
+ height: 100
+ }
+
+ SpriteGoal {
+ system: sys
+ width: root.width;
+ height: root.height/2;
+ y: root.height/2;
+ goalState:"noticedbear"
+ }
+}
diff --git a/examples/quick/particles/images.qrc b/examples/quick/particles/images.qrc
deleted file mode 100644
index 1f754838a8..0000000000
--- a/examples/quick/particles/images.qrc
+++ /dev/null
@@ -1,35 +0,0 @@
-<RCC>
- <qresource prefix="/particles">
- <file>images/_explo.png</file>
- <file>images/backgroundLeaves.jpg</file>
- <file>images/bear_tiles.png</file>
- <file>images/candle.png</file>
- <file>images/colortable.png</file>
- <file>images/finalfrontier.png</file>
- <file>images/flower.png</file>
- <file>images/matchmask.png</file>
- <file>images/meteor_explo.png</file>
- <file>images/meteor.png</file>
- <file>images/meteors.png</file>
- <file>images/nullRock.png</file>
- <file>images/particle2.png</file>
- <file>images/particle3.png</file>
- <file>images/particleA.png</file>
- <file>images/portal_bg.png</file>
- <file>images/realLeaf1.png</file>
- <file>images/realLeaf2.png</file>
- <file>images/realLeaf3.png</file>
- <file>images/realLeaf4.png</file>
- <file>images/rocket.png</file>
- <file>images/rocket2.png</file>
- <file>images/sizeInOut.png</file>
- <file>images/snowflake.png</file>
- <file>images/sparkleSize.png</file>
- <file>images/starfish_0.png</file>
- <file>images/starfish_1.png</file>
- <file>images/starfish_2.png</file>
- <file>images/starfish_3.png</file>
- <file>images/starfish_4.png</file>
- <file>images/starfish_mask.png</file>
- </qresource>
-</RCC>
diff --git a/examples/quick/particles/images/meteor_explo.png b/examples/quick/particles/images/meteor_explo.png
deleted file mode 100644
index e659bfe2cf..0000000000
--- a/examples/quick/particles/images/meteor_explo.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/particles/images/meteors.png b/examples/quick/particles/images/meteors.png
deleted file mode 100644
index bada8a1407..0000000000
--- a/examples/quick/particles/images/meteors.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/particles/images/sizeInOut.png b/examples/quick/particles/images/sizeInOut.png
deleted file mode 100644
index 43d8862dbe..0000000000
--- a/examples/quick/particles/images/sizeInOut.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/particles/itemparticle/CMakeLists.txt b/examples/quick/particles/itemparticle/CMakeLists.txt
deleted file mode 100644
index bb88ffb633..0000000000
--- a/examples/quick/particles/itemparticle/CMakeLists.txt
+++ /dev/null
@@ -1,271 +0,0 @@
-# Generated from itemparticle.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(itemparticle LANGUAGES CXX)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/particles/itemparticle")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(itemparticle
- main.cpp
-)
-set_target_properties(itemparticle PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(itemparticle PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-
-file(GLOB resource_glob_0 RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "content/*")
-foreach(file IN LISTS resource_glob_0)
- set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/${file}" PROPERTIES QT_RESOURCE_ALIAS "${file}")
-endforeach()
-
-file(GLOB resource_glob_1 RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*qml")
-foreach(file IN LISTS resource_glob_1)
- set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/${file}" PROPERTIES QT_RESOURCE_ALIAS "${file}")
-endforeach()
-
-# Resources:
-set_source_files_properties("../images/_explo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/_explo.png"
-)
-set_source_files_properties("../images/backgroundLeaves.jpg"
- PROPERTIES QT_RESOURCE_ALIAS "images/backgroundLeaves.jpg"
-)
-set_source_files_properties("../images/bear_tiles.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/bear_tiles.png"
-)
-set_source_files_properties("../images/candle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/candle.png"
-)
-set_source_files_properties("../images/colortable.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/colortable.png"
-)
-set_source_files_properties("../images/finalfrontier.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/finalfrontier.png"
-)
-set_source_files_properties("../images/flower.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/flower.png"
-)
-set_source_files_properties("../images/matchmask.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/matchmask.png"
-)
-set_source_files_properties("../images/meteor.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/meteor.png"
-)
-set_source_files_properties("../images/meteor_explo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/meteor_explo.png"
-)
-set_source_files_properties("../images/meteors.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/meteors.png"
-)
-set_source_files_properties("../images/nullRock.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/nullRock.png"
-)
-set_source_files_properties("../images/particle2.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/particle2.png"
-)
-set_source_files_properties("../images/particle3.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/particle3.png"
-)
-set_source_files_properties("../images/particleA.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/particleA.png"
-)
-set_source_files_properties("../images/portal_bg.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/portal_bg.png"
-)
-set_source_files_properties("../images/realLeaf1.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/realLeaf1.png"
-)
-set_source_files_properties("../images/realLeaf2.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/realLeaf2.png"
-)
-set_source_files_properties("../images/realLeaf3.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/realLeaf3.png"
-)
-set_source_files_properties("../images/realLeaf4.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/realLeaf4.png"
-)
-set_source_files_properties("../images/rocket.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/rocket.png"
-)
-set_source_files_properties("../images/rocket2.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/rocket2.png"
-)
-set_source_files_properties("../images/sizeInOut.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/sizeInOut.png"
-)
-set_source_files_properties("../images/snowflake.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/snowflake.png"
-)
-set_source_files_properties("../images/sparkleSize.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/sparkleSize.png"
-)
-set_source_files_properties("../images/starfish_0.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_0.png"
-)
-set_source_files_properties("../images/starfish_1.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_1.png"
-)
-set_source_files_properties("../images/starfish_2.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_2.png"
-)
-set_source_files_properties("../images/starfish_3.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_3.png"
-)
-set_source_files_properties("../images/starfish_4.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_4.png"
-)
-set_source_files_properties("../images/starfish_mask.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_mask.png"
-)
-set(images_resource_files
- "images/_explo.png"
- "images/backgroundLeaves.jpg"
- "images/bear_tiles.png"
- "images/candle.png"
- "images/colortable.png"
- "images/finalfrontier.png"
- "images/flower.png"
- "images/matchmask.png"
- "images/meteor.png"
- "images/meteor_explo.png"
- "images/meteors.png"
- "images/nullRock.png"
- "images/particle2.png"
- "images/particle3.png"
- "images/particleA.png"
- "images/portal_bg.png"
- "images/realLeaf1.png"
- "images/realLeaf2.png"
- "images/realLeaf3.png"
- "images/realLeaf4.png"
- "images/rocket.png"
- "images/rocket2.png"
- "images/sizeInOut.png"
- "images/snowflake.png"
- "images/sparkleSize.png"
- "images/starfish_0.png"
- "images/starfish_1.png"
- "images/starfish_2.png"
- "images/starfish_3.png"
- "images/starfish_4.png"
- "images/starfish_mask.png"
-)
-
-qt6_add_resources(itemparticle "images"
- PREFIX
- "/particles"
- BASE
- ".."
- FILES
- ${images_resource_files}
-)
-set_source_files_properties("../../shared/Button.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Button.qml"
-)
-set_source_files_properties("../../shared/CheckBox.qml"
- PROPERTIES QT_RESOURCE_ALIAS "CheckBox.qml"
-)
-set_source_files_properties("../../shared/FlickrRssModel.qml"
- PROPERTIES QT_RESOURCE_ALIAS "FlickrRssModel.qml"
-)
-set_source_files_properties("../../shared/Label.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Label.qml"
-)
-set_source_files_properties("../../shared/LauncherList.qml"
- PROPERTIES QT_RESOURCE_ALIAS "LauncherList.qml"
-)
-set_source_files_properties("../../shared/SimpleLauncherDelegate.qml"
- PROPERTIES QT_RESOURCE_ALIAS "SimpleLauncherDelegate.qml"
-)
-set_source_files_properties("../../shared/Slider.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Slider.qml"
-)
-set_source_files_properties("../../shared/TabSet.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TabSet.qml"
-)
-set_source_files_properties("../../shared/TextField.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TextField.qml"
-)
-set_source_files_properties("../../shared/images/back.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/back.png"
-)
-set_source_files_properties("../../shared/images/checkmark.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/checkmark.png"
-)
-set_source_files_properties("../../shared/images/next.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/next.png"
-)
-set_source_files_properties("../../shared/images/qt-logo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/qt-logo.png"
-)
-set_source_files_properties("../../shared/images/slider_handle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/slider_handle.png"
-)
-set_source_files_properties("../../shared/images/tab.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/tab.png"
-)
-set(shared_resource_files
- "Button.qml"
- "CheckBox.qml"
- "FlickrRssModel.qml"
- "Label.qml"
- "LauncherList.qml"
- "SimpleLauncherDelegate.qml"
- "Slider.qml"
- "TabSet.qml"
- "TextField.qml"
- "images/back.png"
- "images/checkmark.png"
- "images/next.png"
- "images/qt-logo.png"
- "images/slider_handle.png"
- "images/tab.png"
-)
-
-qt6_add_resources(itemparticle "shared"
- PREFIX
- "/shared"
- BASE
- "../../shared"
- FILES
- ${shared_resource_files}
-)
-set(qmake_immediate_resource_files
- ${resource_glob_0}
- ${resource_glob_1}
-)
-
-qt6_add_resources(itemparticle "qmake_immediate"
- PREFIX
- "/"
- FILES
- ${qmake_immediate_resource_files}
-)
-
-install(TARGETS itemparticle
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
diff --git a/examples/quick/particles/itemparticle/content/Delegate.qml b/examples/quick/particles/itemparticle/content/Delegate.qml
deleted file mode 100644
index 946b7b8748..0000000000
--- a/examples/quick/particles/itemparticle/content/Delegate.qml
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-//![0]
-Package {
- Text { id: listDelegate; width: 200; height: 25; text: 'Empty'; Package.name: 'list' }
- Text { id: gridDelegate; width: 100; height: 50; text: 'Empty'; Package.name: 'grid' }
-
- Rectangle {
- id: wrapper
- width: 200; height: 25
- color: 'lightsteelblue'
-
- Text { text: display; anchors.centerIn: parent }
- MouseArea {
- anchors.fill: parent
- onClicked: {
- if (wrapper.state == 'inList')
- wrapper.state = 'inGrid';
- else
- wrapper.state = 'inList';
- }
- }
-
- state: 'inList'
- states: [
- State {
- name: 'inList'
- ParentChange { target: wrapper; parent: listDelegate }
- },
- State {
- name: 'inGrid'
- ParentChange {
- target: wrapper; parent: gridDelegate
- x: 0; y: 0; width: gridDelegate.width; height: gridDelegate.height
- }
- }
- ]
-
- transitions: [
- Transition {
- ParentAnimation {
- NumberAnimation { properties: 'x,y,width,height'; duration: 300 }
- }
- }
- ]
- }
-}
-//![0]
diff --git a/examples/quick/particles/itemparticle/content/Delegate2.qml b/examples/quick/particles/itemparticle/content/Delegate2.qml
deleted file mode 100644
index 03465609d9..0000000000
--- a/examples/quick/particles/itemparticle/content/Delegate2.qml
+++ /dev/null
@@ -1,89 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-//![0]
-Package {
- Item { id: gridDelegate; width: w; height: h; Package.name: 'grid' }
- Item { id: particleDelegate; width: w; height: h; Package.name: 'particles'
-
- Rectangle {
- id: wrapper
- width: w; height: h;
- color: col
- rotation: Math.random()*360
- Behavior on rotation {RotationAnimation {}}
-
- states: State {
- name: "gridded"
- when: root.inGrid
- PropertyChanges {
- target: wrapper
- rotation: 0
- }
- ParentChange {
- target: wrapper
- parent: gridDelegate
- x:0
- y:0
- }
- }
- transitions: [
- Transition {
- ParentAnimation {
- NumberAnimation { properties: 'x,y,width,height'; duration: 300 }
- }
- }
- ]
- }
- }
-}
-//![0]
diff --git a/examples/quick/particles/itemparticle/content/ExpandingDelegate.qml b/examples/quick/particles/itemparticle/content/ExpandingDelegate.qml
deleted file mode 100644
index 9ffbc7f350..0000000000
--- a/examples/quick/particles/itemparticle/content/ExpandingDelegate.qml
+++ /dev/null
@@ -1,215 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import "../../../modelviews/listview/content"
-
-// This example illustrates expanding a list item to show a more detailed view.
-
- // Delegate for the recipes. This delegate has two modes:
- // 1. List mode (default), which just shows the picture and title of the recipe.
- // 2. Details mode, which also shows the ingredients and method.
- Component {
- id: recipeDelegate
-
- Item {
- id: recipe
-
- // Create a property to contain the visibility of the details.
- // We can bind multiple element's opacity to this one property,
- // rather than having a "PropertyChanges" line for each element we
- // want to fade.
- property real detailsOpacity : 0
-
- //this bit changed for aesthetics
- width: 70
- height: 70
- // A simple rounded rectangle for the background
- Rectangle {
- id: background
- x: 2; y: 2; width: parent.width - x*2; height: parent.height - y*2
- color: "ivory"
- border.color: "orange"
- radius: 5
- antialiasing: true
- }
- Image {
- anchors.fill:parent
- anchors.margins: -32
- source: "bubble.png"
- }
-
-
- // This mouse region covers the entire delegate.
- // When clicked it changes mode to 'Details'. If we are already
- // in Details mode, then no change will happen.
- MouseArea {
- anchors.fill: parent
- onClicked: recipe.state = 'Details';
- }
-
- // Lay out the page: picture, title and ingredients at the top, and method at the
- // bottom. Note that elements that should not be visible in the list
- // mode have their opacity set to recipe.detailsOpacity.
- Row {
- id: topLayout
- x: 10; y: 10; height: recipeImage.height; width: parent.width
- spacing: 10
-
- Image {
- id: recipeImage
- width: 50; height: 50
- source: "../../modelviews/listview/" + picture
- }
-
- Column {
- width: background.width - recipeImage.width - 20; height: recipeImage.height
- spacing: 5
-
- Text {
- text: title
- font.bold: true; font.pointSize: 16
- }
-
- Text {
- text: "Ingredients"
- font.pointSize: 12; font.bold: true
- opacity: recipe.detailsOpacity
- }
-
- Text {
- text: ingredients
- wrapMode: Text.WordWrap
- width: parent.width
- opacity: recipe.detailsOpacity
- }
- }
- }
-
- Item {
- id: details
- x: 10; width: parent.width - 20
- anchors { top: topLayout.bottom; topMargin: 10; bottom: parent.bottom; bottomMargin: 10 }
- opacity: recipe.detailsOpacity
-
- Text {
- id: methodTitle
- anchors.top: parent.top
- text: "Method"
- font.pointSize: 12; font.bold: true
- }
-
- Flickable {
- id: flick
- width: parent.width
- anchors { top: methodTitle.bottom; bottom: parent.bottom }
- contentHeight: methodText.height
- clip: true
-
- Text { id: methodText; text: method; wrapMode: Text.WordWrap; width: details.width }
- }
-
- Image {
- anchors { right: flick.right; top: flick.top }
- source: "../../modelviews/listview/" + "content/pics/moreUp.png"
- opacity: flick.atYBeginning ? 0 : 1
- }
-
- Image {
- anchors { right: flick.right; bottom: flick.bottom }
- source: "../../modelviews/listview/" + "content/pics/moreDown.png"
- opacity: flick.atYEnd ? 0 : 1
- }
- }
-
- // A button to close the detailed view, i.e. set the state back to default ('').
- TextButton {
- y: 10
- anchors { right: background.right; rightMargin: 10 }
- opacity: recipe.detailsOpacity
- text: "Close"
-
- onClicked: recipe.state = '';
- }
-
- states: State {
- name: "Details"
-
- PropertyChanges { target: background; color: "white" }
- PropertyChanges { target: recipeImage; width: 130; height: 130 } // Make picture bigger
- PropertyChanges { target: recipe; detailsOpacity: 1; x: 0; opacity: 1 } // Make details visible
- PropertyChanges { target: recipe; height: root.height; width: root.height; x:0; y:0; z:100} // Fill the entire list area with the detailed view
-
- // Move the list so that this item is at the top.
- //PropertyChanges { target: recipe.ListView.view; explicit: true; contentY: recipe.y }
-
- // Disallow flicking while we're in detailed view
- //PropertyChanges { target: recipe.ListView.view; interactive: false }
- }
-
- transitions: Transition {
- //The only strictly necessary particle specific lines
- to: "Details"
- reversible: true
- ScriptAction {script: {
- if(state == "Details")
- mp.freeze(index);
- else
- mp.unfreeze(index);
- }
- }
- // Make the state changes smooth
- ParallelAnimation {
- ColorAnimation { property: "color"; duration: 500 }
- NumberAnimation { duration: 300; properties: "detailsOpacity,opacity,x,y,height,width" }
- }
- }
- }
- }
diff --git a/examples/quick/particles/itemparticle/content/bubble.png b/examples/quick/particles/itemparticle/content/bubble.png
deleted file mode 100644
index f26ed1d3f2..0000000000
--- a/examples/quick/particles/itemparticle/content/bubble.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/particles/itemparticle/content/script.js b/examples/quick/particles/itemparticle/content/script.js
deleted file mode 100644
index e8ef93a847..0000000000
--- a/examples/quick/particles/itemparticle/content/script.js
+++ /dev/null
@@ -1,27 +0,0 @@
-.pragma library
-
-function getWidth(string) {
- return (string.match(/width=\"([0-9]+)\"/))[1]
-}
-
-function getHeight(string) {
- return (string.match(/height=\"([0-9]+)\"/))[1]
-}
-
-function getImagePath(string) {
- var pattern = /src=\"http:\/\/(\S+)\"/
- return (string.match(pattern))[1]
-}
-
-function calculateScale(width, height, cellSize) {
- var widthScale = (cellSize * 1.0) / width
- var heightScale = (cellSize * 1.0) / height
- var scale = 0
-
- if (widthScale <= heightScale) {
- scale = widthScale;
- } else if (heightScale < widthScale) {
- scale = heightScale;
- }
- return scale;
-}
diff --git a/examples/quick/particles/itemparticle/delegates.qml b/examples/quick/particles/itemparticle/delegates.qml
deleted file mode 100644
index 0e9267214f..0000000000
--- a/examples/quick/particles/itemparticle/delegates.qml
+++ /dev/null
@@ -1,105 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Rectangle {
- id: root;
- width: 360
- height: 600
- color: "black"
-
- function newPithySaying() {
- switch (Math.floor(Math.random()*16)) {
- case 0: return "Hello World";
- case 1: return "G'day Mate";
- case 2: return "Code Less";
- case 3: return "Create More";
- case 4: return "Deploy Everywhere";
- case 5: return "Qt Meta-object Language";
- case 6: return "Qt Magic Language";
- case 7: return "Fluid UIs";
- case 8: return "Touchable";
- case 9: return "How's it going?";
- case 10: return "Do you like text?";
- case 11: return "Enjoy!";
- case 12: return "ERROR: Out of pith";
- case 13: return "Punctuation Failure";
- case 14: return "I can go faster";
- case 15: return "I can go slower";
- default: return "OMGWTFBBQ";
- }
- }
-
- ParticleSystem {
- anchors.fill: parent
- id: syssy
- MouseArea {
- anchors.fill: parent
- onClicked: syssy.running = !syssy.running
- }
- Emitter {
- anchors.centerIn: parent
- emitRate: 1
- lifeSpan: 4800
- lifeSpanVariation: 1600
- velocity: AngleDirection {angleVariation: 360; magnitude: 40; magnitudeVariation: 20}
- }
- ItemParticle {
- delegate: Text {
- text: root.newPithySaying();
- color: "white"
- font.pixelSize: 18
- font.bold: true
- }
- }
- }
-}
diff --git a/examples/quick/particles/itemparticle/itemparticle.pro b/examples/quick/particles/itemparticle/itemparticle.pro
deleted file mode 100644
index f5c0576b4a..0000000000
--- a/examples/quick/particles/itemparticle/itemparticle.pro
+++ /dev/null
@@ -1,12 +0,0 @@
-TEMPLATE = app
-
-QT += quick qml
-SOURCES += main.cpp
-RESOURCES += \
- ../images.qrc \
- ../../shared/shared.qrc \
- $$files("content/*") \
- $$files("*qml")
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/particles/itemparticle
-INSTALLS += target
diff --git a/examples/quick/particles/itemparticle/main.cpp b/examples/quick/particles/itemparticle/main.cpp
deleted file mode 100644
index da21f15be3..0000000000
--- a/examples/quick/particles/itemparticle/main.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(particleview)
diff --git a/examples/quick/particles/itemparticle/particleview.qml b/examples/quick/particles/itemparticle/particleview.qml
deleted file mode 100644
index 8eb18dc283..0000000000
--- a/examples/quick/particles/itemparticle/particleview.qml
+++ /dev/null
@@ -1,309 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtQuick.Particles 2.12
-import "shared" as Shared
-import "content/script.js" as Script
-import "content"
-
-Item {
- id: root
- width: 640
- height: 480
- Rectangle {
- anchors.fill: parent
- color: "black"
- z: -1
- }
- Item {
- id: loading
- Behavior on opacity {NumberAnimation {}}
- anchors.fill: parent
- Text {
- anchors.centerIn: parent
- text: "Loading"
- color: "white"
- }
- }
- ParticleSystem {
- id: sys;
- running: true
- }
- Emitter {
- id: emitter
- system: sys
- height: parent.height - 132/2
- x: -132/2
- y: 132/2
- velocity: PointDirection { x: 32; xVariation: 8 }
- emitRate: 0.5
- lifeSpan: Emitter.InfiniteLife
- group: "photos"
- }
- Age {
- system: sys
- x: parent.width + 132/2
- height: parent.height
- width: 1000
- }
- ImageParticle {
- system: sys
- groups: ["fireworks"]
- source: "qrc:///particleresources/star.png"
- color: "lightsteelblue"
- alpha: 0
- colorVariation: 0
- z: 1000
- }
- ItemParticle {
- id: mp
- z: 0
- system: sys
- fade: false
- groups: ["photos"]
- }
- Component {
- id: alertDelegate
- Rectangle {
- color: "DarkSlateGray"
- border.width: 1
- border.color: "LightSteelBlue"
- width: 144
- height: 132
- antialiasing: true
- radius: 3
- NumberAnimation on scale {
- running: true
- loops: 1
- from: 0.2
- to: 1
- }
- Image {
- source: "qrc:///particles/images/rocket.png"
- anchors.centerIn: parent
- }
- Text {
- anchors.bottom: parent.bottom
- anchors.horizontalCenter: parent.horizontalCenter
- text: "A new ship has arrived!"
- color: "LightSteelBlue"
- }
- }
- }
- property Item alertItem;
- function alert() {
- force.enabled = true;
- alertItem = alertDelegate.createObject(root);
- alertItem.x = root.width/2 - alertItem.width/2
- alertItem.y = root.height/2 - alertItem.height/2
- spawnFireworks.pulse(200);
- stopAlert.start();
- }
- focus: true
- Keys.onSpacePressed: alert();
- Timer {
- id: stopAlert
- running: false
- repeat: false
- interval: 800
- onTriggered: {
- force.enabled = false;
- mp.take(root.alertItem, true);
- centerEmitter.burst(1);
- }
- }
- Attractor {
- id: force
- system: sys
- pointX: root.width/2
- pointY: root.height/2
- strength: -10000
- enabled: false
- anchors.centerIn: parent
- width: parent.width/2
- height: parent.height/2
- groups:["photos"]
- affectedParameter: Attractor.Position
- }
- Emitter {
- id: centerEmitter
- velocity: PointDirection { x: 32; xVariation: 8;}
- emitRate: 0.5
- lifeSpan: 12000 //TODO: A -1 or something which does 'infinite'? (but need disable fade first)
- maximumEmitted: 20
- group: "photos"
- system: sys
- anchors.centerIn: parent
- enabled: false
-
- //TODO: Zoom in effect
- }
- Emitter {
- id: spawnFireworks
- group: "fireworks"
- system: sys
- maximumEmitted: 400
- emitRate: 400
- lifeSpan: 2800
- x: parent.width/2
- y: parent.height/2 - 64
- width: 8
- height: 8
- enabled: false
- size: 32
- endSize: 8
- velocity: AngleDirection { magnitude: 160; magnitudeVariation: 120; angleVariation: 90; angle: 270 }
- acceleration: PointDirection { y: 160 }
- }
- Item { x: -1000; y: -1000 //offscreen
- Repeater {//Load them here, add to system on completed
- model: flickrModel
- delegate: theDelegate
- }
- }
- Shared.FlickrRssModel {
- id: flickrModel
- tags: "particle,particles"
- }
- Component {
- id: theDelegate
- Image {
- required property int index
- required property string title
- required property string media
- required property string thumbnail
-
- id: image
- antialiasing: true;
- source: thumbnail
- cache: true
- property real depth: Math.random()
- property real darken: 0.75
- z: Math.floor(depth * 100)
- scale: (depth + 1) / 2
- sourceSize {
- width: root.width
- height: root.height
- }
- width: 132
- height: 132
- fillMode: Image.PreserveAspectFit
- Rectangle {
- // Darken based on depth
- anchors.centerIn: parent
- width: parent.paintedWidth + 1
- height: parent.paintedHeight + 1
- color: "black"
- opacity: image.darken * (1 - image.depth)
- antialiasing: true;
- }
- Text {
- anchors.bottom: parent.bottom
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.bottomMargin: Math.max(parent.paintedWidth, parent.paintedHeight) - Math.min(parent.width, parent.height)
- width: parent.paintedWidth - 4
- horizontalAlignment: Text.AlignHCenter
- elide: Text.ElideRight
- text: image.title
- color: "black"
- }
- ItemParticle.onDetached: mp.take(image); // respawns
- onStatusChanged: if (image.status == Image.Ready) {
- loading.opacity = 0;
- mp.take(image);
- }
- function manage()
- {
- if (state == "selected") {
- console.log("Taking " + index);
- mp.freeze(image);
- } else {
- console.log("Returning " +index);
- mp.unfreeze(image);
- }
- }
- TapHandler {
- gesturePolicy: TapHandler.ReleaseWithinBounds
- onTapped: image.state = (image.state == "" ? "selected" : "")
- }
- states: State {
- name: "selected"
- ParentChange {
- target: image
- parent: root
- }
- PropertyChanges {
- target: image
- source: image.media
- x: 0
- y: 0
- width: root.width
- height: root.height
- z: 101
- opacity: 1
- rotation: 0
- darken: 0
- }
- }
- transitions: Transition {
- to: "selected"
- reversible: true
- SequentialAnimation {
- ScriptAction { script: image.manage() }
- ParallelAnimation {
- ParentAnimation {NumberAnimation { properties: "x,y" }}
- PropertyAnimation { properties: "width, height, z, rotation, darken"; easing.type: Easing.InOutQuad }
- }
- }
- }
- }
- }
-}
diff --git a/examples/quick/particles/particles.pro b/examples/quick/particles/particles.pro
index 5343fa00f1..62f7f35807 100644
--- a/examples/quick/particles/particles.pro
+++ b/examples/quick/particles/particles.pro
@@ -2,12 +2,8 @@ TEMPLATE = subdirs
SUBDIRS += affectors \
emitters \
imageparticle \
- itemparticle \
system
-EXAMPLE_FILES = \
- images.qrc
-
#Install shared images too
qml.files = images
qml.path = $$[QT_INSTALL_EXAMPLES]/quick/particles
diff --git a/examples/quick/particles/system/CMakeLists.txt b/examples/quick/particles/system/CMakeLists.txt
index 737dc5f90b..0c8f8852f9 100644
--- a/examples/quick/particles/system/CMakeLists.txt
+++ b/examples/quick/particles/system/CMakeLists.txt
@@ -1,265 +1,55 @@
-# Generated from system.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(system LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup(REQUIRES 6.5)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
+add_subdirectory("../../shared" "shared")
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/particles/system")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(system
+qt_add_executable(systemexample WIN32 MACOSX_BUNDLE
main.cpp
)
-set_target_properties(system PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(system PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-# Resources:
-set(system_resource_files
- "content/dynamiccomparison.qml"
- "content/dynamicemitters.qml"
- "content/multiplepainters.qml"
- "content/startstop.qml"
- "content/timedgroupchanges.qml"
- "system.qml"
+target_link_libraries(systemexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
-qt6_add_resources(system "system"
- PREFIX
- "/particles/system"
- FILES
- ${system_resource_files}
-)
-set_source_files_properties("../images/_explo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/_explo.png"
-)
-set_source_files_properties("../images/backgroundLeaves.jpg"
- PROPERTIES QT_RESOURCE_ALIAS "images/backgroundLeaves.jpg"
-)
-set_source_files_properties("../images/bear_tiles.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/bear_tiles.png"
-)
-set_source_files_properties("../images/candle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/candle.png"
-)
-set_source_files_properties("../images/colortable.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/colortable.png"
-)
-set_source_files_properties("../images/finalfrontier.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/finalfrontier.png"
-)
-set_source_files_properties("../images/flower.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/flower.png"
-)
-set_source_files_properties("../images/matchmask.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/matchmask.png"
-)
-set_source_files_properties("../images/meteor.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/meteor.png"
-)
-set_source_files_properties("../images/meteor_explo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/meteor_explo.png"
-)
-set_source_files_properties("../images/meteors.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/meteors.png"
-)
-set_source_files_properties("../images/nullRock.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/nullRock.png"
-)
-set_source_files_properties("../images/particle2.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/particle2.png"
-)
-set_source_files_properties("../images/particle3.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/particle3.png"
-)
-set_source_files_properties("../images/particleA.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/particleA.png"
-)
-set_source_files_properties("../images/portal_bg.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/portal_bg.png"
-)
-set_source_files_properties("../images/realLeaf1.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/realLeaf1.png"
-)
-set_source_files_properties("../images/realLeaf2.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/realLeaf2.png"
-)
-set_source_files_properties("../images/realLeaf3.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/realLeaf3.png"
-)
-set_source_files_properties("../images/realLeaf4.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/realLeaf4.png"
-)
-set_source_files_properties("../images/rocket.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/rocket.png"
-)
-set_source_files_properties("../images/rocket2.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/rocket2.png"
-)
-set_source_files_properties("../images/sizeInOut.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/sizeInOut.png"
-)
-set_source_files_properties("../images/snowflake.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/snowflake.png"
-)
-set_source_files_properties("../images/sparkleSize.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/sparkleSize.png"
-)
-set_source_files_properties("../images/starfish_0.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_0.png"
-)
-set_source_files_properties("../images/starfish_1.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_1.png"
-)
-set_source_files_properties("../images/starfish_2.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_2.png"
-)
-set_source_files_properties("../images/starfish_3.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_3.png"
-)
-set_source_files_properties("../images/starfish_4.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_4.png"
-)
-set_source_files_properties("../images/starfish_mask.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/starfish_mask.png"
-)
-set(images_resource_files
- "images/_explo.png"
- "images/backgroundLeaves.jpg"
- "images/bear_tiles.png"
- "images/candle.png"
- "images/colortable.png"
- "images/finalfrontier.png"
- "images/flower.png"
- "images/matchmask.png"
- "images/meteor.png"
- "images/meteor_explo.png"
- "images/meteors.png"
- "images/nullRock.png"
- "images/particle2.png"
- "images/particle3.png"
- "images/particleA.png"
- "images/portal_bg.png"
- "images/realLeaf1.png"
- "images/realLeaf2.png"
- "images/realLeaf3.png"
- "images/realLeaf4.png"
- "images/rocket.png"
- "images/rocket2.png"
- "images/sizeInOut.png"
- "images/snowflake.png"
- "images/sparkleSize.png"
- "images/starfish_0.png"
- "images/starfish_1.png"
- "images/starfish_2.png"
- "images/starfish_3.png"
- "images/starfish_4.png"
- "images/starfish_mask.png"
-)
-
-qt6_add_resources(system "images"
- PREFIX
- "/particles"
- BASE
- ".."
- FILES
- ${images_resource_files}
-)
-set_source_files_properties("../../shared/Button.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Button.qml"
-)
-set_source_files_properties("../../shared/CheckBox.qml"
- PROPERTIES QT_RESOURCE_ALIAS "CheckBox.qml"
-)
-set_source_files_properties("../../shared/FlickrRssModel.qml"
- PROPERTIES QT_RESOURCE_ALIAS "FlickrRssModel.qml"
-)
-set_source_files_properties("../../shared/Label.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Label.qml"
-)
-set_source_files_properties("../../shared/LauncherList.qml"
- PROPERTIES QT_RESOURCE_ALIAS "LauncherList.qml"
-)
-set_source_files_properties("../../shared/SimpleLauncherDelegate.qml"
- PROPERTIES QT_RESOURCE_ALIAS "SimpleLauncherDelegate.qml"
-)
-set_source_files_properties("../../shared/Slider.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Slider.qml"
-)
-set_source_files_properties("../../shared/TabSet.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TabSet.qml"
-)
-set_source_files_properties("../../shared/TextField.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TextField.qml"
-)
-set_source_files_properties("../../shared/images/back.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/back.png"
-)
-set_source_files_properties("../../shared/images/checkmark.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/checkmark.png"
-)
-set_source_files_properties("../../shared/images/next.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/next.png"
-)
-set_source_files_properties("../../shared/images/qt-logo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/qt-logo.png"
-)
-set_source_files_properties("../../shared/images/slider_handle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/slider_handle.png"
-)
-set_source_files_properties("../../shared/images/tab.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/tab.png"
-)
-set(shared_resource_files
- "Button.qml"
- "CheckBox.qml"
- "FlickrRssModel.qml"
- "Label.qml"
- "LauncherList.qml"
- "SimpleLauncherDelegate.qml"
- "Slider.qml"
- "TabSet.qml"
- "TextField.qml"
- "images/back.png"
- "images/checkmark.png"
- "images/next.png"
- "images/qt-logo.png"
- "images/slider_handle.png"
- "images/tab.png"
-)
+add_dependencies(systemexample system_shared)
-qt6_add_resources(system "shared"
- PREFIX
- "/shared"
- BASE
- "../../shared"
- FILES
- ${shared_resource_files}
-)
-
-install(TARGETS system
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
+# Resources:
+qt_add_qml_module(systemexample
+ URI system
+ QML_FILES
+ "dynamiccomparison.qml"
+ "dynamicemitters.qml"
+ "multiplepainters.qml"
+ "timedgroupchanges.qml"
+ "startstop.qml"
+ "system.qml"
+ RESOURCES
+ "images/sparkleSize.png"
+ "images/particle2.png"
+ "images/particle3.png"
+)
+
+install(TARGETS systemexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET systemexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/particles/system/content/dynamiccomparison.qml b/examples/quick/particles/system/content/dynamiccomparison.qml
deleted file mode 100644
index c1d42863ee..0000000000
--- a/examples/quick/particles/system/content/dynamiccomparison.qml
+++ /dev/null
@@ -1,149 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Rectangle {
- id: root
- color: "black"
- width: 640
- height: 480
- ParticleSystem {
- id: sys
- }
-
- ImageParticle {
- system: sys
- source: "qrc:///particleresources/glowdot.png"
- color: "white"
- colorVariation: 1.0
- alpha: 0.1
- entryEffect: ImageParticle.None
- }
-
- Emitter {
- id: emitter
- system: sys
- width: parent.width/2
- velocity: PointDirection {y: 72; yVariation: 24}
- lifeSpan: 10000
- emitRate: 1000
- enabled: false
- size: 32
- }
-
- //! [fake]
- Item {
- id: fakeEmitter
- function burst(number) {
- while (number > 0) {
- var item = fakeParticle.createObject(root);
- item.lifeSpan = Math.random() * 5000 + 5000;
- item.x = Math.random() * (root.width/2) + (root.width/2);
- item.y = 0;
- number--;
- }
- }
-
- Component {
- id: fakeParticle
- Image {
- id: container
- property int lifeSpan: 10000
- width: 32
- height: 32
- source: "qrc:///particleresources/glowdot.png"
- y: 0
- PropertyAnimation on y {from: -16; to: root.height-16; duration: container.lifeSpan; running: true}
- SequentialAnimation on opacity {
- running: true
- NumberAnimation { from:0; to: 1; duration: 500}
- PauseAnimation { duration: container.lifeSpan - 1000}
- NumberAnimation { from:1; to: 0; duration: 500}
- ScriptAction { script: container.destroy(); }
- }
- }
- }
- }
- //! [fake]
-
- //Hooked to a timer, but click for extra bursts that really stress performance
- Timer {
- interval: 10000
- triggeredOnStart: true
- repeat: true
- running: true
- onTriggered: {
- emitter.burst(1000);
- fakeEmitter.burst(1000);
- }
- }
- Text {
- anchors.left: parent.left
- anchors.bottom: parent.bottom
- text: "1000 particles"
- color: "white"
- MouseArea {
- anchors.fill: parent
- onClicked: emitter.burst(1000);
- }
- }
- Text {
- anchors.right: parent.right
- anchors.bottom: parent.bottom
- text: "1000 items"
- color: "white"
- MouseArea {
- anchors.fill: parent
- onClicked: fakeEmitter.burst(1000);
- }
- }
-}
diff --git a/examples/quick/particles/system/content/dynamicemitters.qml b/examples/quick/particles/system/content/dynamicemitters.qml
deleted file mode 100644
index 8eb87d2baa..0000000000
--- a/examples/quick/particles/system/content/dynamicemitters.qml
+++ /dev/null
@@ -1,150 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Rectangle {
- id: root
- color: "black"
- width: 640
- height: 480
- ParticleSystem {
- id: sys
- }
- ImageParticle {
- system: sys
- source: "qrc:///particleresources/glowdot.png"
- color: "white"
- colorVariation: 1.0
- alpha: 0.1
- }
-
- Component {
- id: emitterComp
- Emitter {
- id: container
- Emitter {
- id: emitMore
- system: sys
- emitRate: 128
- lifeSpan: 600
- size: 16
- endSize: 8
- velocity: AngleDirection {angleVariation:360; magnitude: 60}
- }
-
- property int life: 2600
- property real targetX: 0
- property real targetY: 0
- function go() {
- xAnim.start();
- yAnim.start();
- container.enabled = true
- }
- system: sys
- emitRate: 32
- lifeSpan: 600
- size: 24
- endSize: 8
- NumberAnimation on x {
- id: xAnim;
- to: targetX
- duration: life
- running: false
- }
- NumberAnimation on y {
- id: yAnim;
- to: targetY
- duration: life
- running: false
- }
- Timer {
- interval: life
- running: true
- onTriggered: container.destroy();
- }
- }
- }
-
- function customEmit(x,y) {
- //! [0]
- for (var i=0; i<8; i++) {
- var obj = emitterComp.createObject(root);
- obj.x = x
- obj.y = y
- obj.targetX = Math.random() * 240 - 120 + obj.x
- obj.targetY = Math.random() * 240 - 120 + obj.y
- obj.life = Math.round(Math.random() * 2400) + 200
- obj.emitRate = Math.round(Math.random() * 32) + 32
- obj.go();
- }
- //! [0]
- }
-
- Timer {
- interval: 10000
- triggeredOnStart: true
- running: true
- repeat: true
- onTriggered: customEmit(Math.random() * 320, Math.random() * 480)
- }
- MouseArea {
- anchors.fill: parent
- onClicked: (mouse)=> customEmit(mouse.x, mouse.y);
- }
-
- Text {
- anchors.horizontalCenter: parent.horizontalCenter
- text: "Click Somewhere"
- color: "white"
- font.pixelSize: 24
- }
-}
diff --git a/examples/quick/particles/system/content/multiplepainters.qml b/examples/quick/particles/system/content/multiplepainters.qml
deleted file mode 100644
index 1f2dcb6214..0000000000
--- a/examples/quick/particles/system/content/multiplepainters.qml
+++ /dev/null
@@ -1,106 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Rectangle {
- id: root
- width: 360
- height: 600
- color: "darkblue"
- property bool cloneMode: false
- ParticleSystem {
- id: sys
- }
- MouseArea {
- anchors.fill: parent
- onClicked: cloneMode = !cloneMode;
- }
- Text {
- anchors.horizontalCenter: parent.horizontalCenter
- text: "Click to Toggle"
- color: "white"
- font.pixelSize: 24
- }
- Emitter {
- system: sys
- y:root.height + 20
- width: root.width
- emitRate: 200
- lifeSpan: 4000
- startTime: 4000
- velocity: PointDirection { y: -120; }
- }
-
- ImageParticle {
- system: sys
- visible: !cloneMode
- source: "../../images/particle2.png"
- }
-
- ImageParticle {
- system: sys
- visible: cloneMode
- z: 0
- source: "../../images/particle3.png"
- }
-
- ImageParticle {
- system: sys
- clip: true
- visible: cloneMode
- y: 120
- height: 240
- width: root.width
- z: 1
- source: "qrc:///particleresources/glowdot.png"
- }
-}
diff --git a/examples/quick/particles/system/content/startstop.qml b/examples/quick/particles/system/content/startstop.qml
deleted file mode 100644
index a9ef7285aa..0000000000
--- a/examples/quick/particles/system/content/startstop.qml
+++ /dev/null
@@ -1,96 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Rectangle {
- width: 360
- height: 540
- color: "black"
- Text {
- text: "Left click to start/stop\nRight click to pause/unpause"
- color: "white"
- font.pixelSize: 24
- }
- MouseArea {
- anchors.fill: parent
- acceptedButtons: Qt.LeftButton | Qt.RightButton
- onClicked: (mouse) => {
- if (mouse.button == Qt.LeftButton)
- particles.running = !particles.running
- else
- particles.paused = !particles.paused;
- }
- }
-
- ParticleSystem {
- id: particles
- running: false
- }
-
- ImageParticle {
- anchors.fill: parent
- system: particles
- source: "qrc:///particleresources/star.png"
- sizeTable: "../../images/sparkleSize.png"
- alpha: 0
- colorVariation: 0.6
- }
-
- Emitter {
- anchors.fill: parent
- system: particles
- emitRate: 2000
- lifeSpan: 2000
- size: 30
- sizeVariation: 10
- }
-}
diff --git a/examples/quick/particles/system/content/timedgroupchanges.qml b/examples/quick/particles/system/content/timedgroupchanges.qml
deleted file mode 100644
index cab992f898..0000000000
--- a/examples/quick/particles/system/content/timedgroupchanges.qml
+++ /dev/null
@@ -1,137 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Rectangle {
- width: 360
- height: 600
- color: "black"
- ParticleSystem {
- anchors.fill: parent
- id: syssy
- //! [0]
- ParticleGroup {
- name: "fire"
- duration: 2000
- durationVariation: 2000
- to: {"splode":1}
- }
- //! [0]
- //! [1]
- ParticleGroup {
- name: "splode"
- duration: 400
- to: {"dead":1}
- TrailEmitter {
- group: "works"
- emitRatePerParticle: 100
- lifeSpan: 1000
- maximumEmitted: 1200
- size: 8
- velocity: AngleDirection {angle: 270; angleVariation: 45; magnitude: 20; magnitudeVariation: 20;}
- acceleration: PointDirection {y:100; yVariation: 20}
- }
- }
- //! [1]
- //! [2]
- ParticleGroup {
- name: "dead"
- duration: 1000
- Affector {
- once: true
- onAffected: (x, y)=> worksEmitter.burst(400,x,y)
- }
- }
- //! [2]
-
- Timer {
- interval: 6000
- running: true
- triggeredOnStart: true
- repeat: true
- onTriggered:startingEmitter.pulse(100);
- }
- Emitter {
- id: startingEmitter
- group: "fire"
- width: parent.width
- y: parent.height
- enabled: false
- emitRate: 80
- lifeSpan: 6000
- velocity: PointDirection {y:-100;}
- size: 32
- }
-
- Emitter {
- id: worksEmitter
- group: "works"
- enabled: false
- emitRate: 100
- lifeSpan: 1600
- maximumEmitted: 6400
- size: 8
- velocity: CumulativeDirection {
- PointDirection {y:-100}
- AngleDirection {angleVariation: 360; magnitudeVariation: 80;}
- }
- acceleration: PointDirection {y:100; yVariation: 20}
- }
-
- ImageParticle {
- groups: ["works", "fire", "splode"]
- source: "qrc:///particleresources/glowdot.png"
- entryEffect: ImageParticle.Scale
- }
- }
-}
-
diff --git a/examples/quick/particles/system/doc/src/system.qdoc b/examples/quick/particles/system/doc/src/system.qdoc
index 22382190d3..b936bd8976 100644
--- a/examples/quick/particles/system/doc/src/system.qdoc
+++ b/examples/quick/particles/system/doc/src/system.qdoc
@@ -1,33 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Qt Quick Particles Examples - System
\example particles/system
+ \examplecategory {Graphics}
\brief This is a collection of examples using Affectors in the QML particle system.
\image qml-system-example.png
@@ -35,7 +12,7 @@
Each example is a small QML file emphasizing a particular type or feature.
Dynamic comparison compares using the particle system to getting a similar effect with the following code that dynamically instantiates Image types.
- \snippet particles/system/content/dynamiccomparison.qml fake
+ \snippet particles/system/dynamiccomparison.qml fake
Note how the Image objects are not able to be randomly colorized.
Start and Stop simply sets the running and paused states of a ParticleSystem. While the system does not perform any simulation when stopped or paused, a restart restarts the simulation from the beginning, while unpausing resumes the simulation from where it was.
@@ -43,14 +20,14 @@
Timed group changes is an example that highlights the ParticleGroup type. While normally referring to groups with a string name is sufficient, additional effects can be
done by setting properties on groups.
The first group has a variable duration on it, but always transitions to the second group.
- \snippet particles/system/content/timedgroupchanges.qml 0
+ \snippet particles/system/timedgroupchanges.qml 0
The second group has a TrailEmitter on it, and a fixed duration for emitting into the third group. By placing the TrailEmitter as a direct child of the ParticleGroup, it automatically selects that group to follow.
- \snippet particles/system/content/timedgroupchanges.qml 1
+ \snippet particles/system/timedgroupchanges.qml 1
The third group has an Affector as a direct child, which makes the affector automatically target this group. The affector means that as soon as particles enter this group, a burst function can be called on another emitter, using the x,y positions of this particle.
- \snippet particles/system/content/timedgroupchanges.qml 2
+ \snippet particles/system/timedgroupchanges.qml 2
If TrailEmitter does not suit your needs for multiple emitters, you can also dynamically create Emitters while still using the same ParticleSystem and image particle
- \snippet particles/system/content/dynamicemitters.qml 0
+ \snippet particles/system/dynamicemitters.qml 0
Note that this effect, a flurry of flying rainbow spears, would be better served with TrailEmitter. It is only done with dynamic emitters in this example to show the concept more simply.
Multiple Painters shows how to control paint ordering of individual particles. While the paint ordering of particles within one ImagePainter is not strictly defined, ImageParticle objects follow the normal Z-ordering rules for \l {Qt Quick} items. This example allow you to paint the inside of the particles above the black borders using a pair of ImageParticles each painting different parts of the same logical particle.
diff --git a/examples/quick/particles/system/dynamiccomparison.qml b/examples/quick/particles/system/dynamiccomparison.qml
new file mode 100644
index 0000000000..d29b72f998
--- /dev/null
+++ b/examples/quick/particles/system/dynamiccomparison.qml
@@ -0,0 +1,103 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+pragma ComponentBehavior: Bound
+
+Rectangle {
+ id: root
+ color: "black"
+ width: 640
+ height: 480
+ ParticleSystem {
+ id: sys
+ }
+
+ ImageParticle {
+ system: sys
+ source: "qrc:///particleresources/glowdot.png"
+ color: "white"
+ colorVariation: 1.0
+ alpha: 0.1
+ entryEffect: ImageParticle.None
+ }
+
+ Emitter {
+ id: emitter
+ system: sys
+ width: parent.width/2
+ velocity: PointDirection {y: 72; yVariation: 24}
+ lifeSpan: 10000
+ emitRate: 1000
+ enabled: false
+ size: 32
+ }
+
+ //! [fake]
+ Item {
+ id: fakeEmitter
+ function burst(number) {
+ while (number > 0) {
+ let item = fakeParticle.createObject(root)
+ item.lifeSpan = Math.random() * 5000 + 5000
+ item.x = Math.random() * (root.width / 2) + (root.width / 2)
+ item.y = 0
+ number--
+ }
+ }
+
+ Component {
+ id: fakeParticle
+ Image {
+ id: container
+ property int lifeSpan: 10000
+ width: 32
+ height: 32
+ source: "qrc:///particleresources/glowdot.png"
+ PropertyAnimation on y { from: -16; to: root.height - 16; duration: container.lifeSpan; running: true }
+ SequentialAnimation on opacity {
+ running: true
+ NumberAnimation { from: 0; to: 1; duration: 500 }
+ PauseAnimation { duration: container.lifeSpan - 1000 }
+ NumberAnimation { from: 1; to: 0; duration: 500 }
+ ScriptAction { script: container.destroy(); }
+ }
+ }
+ }
+ }
+ //! [fake]
+
+ //Hooked to a timer, but click for extra bursts that really stress performance
+ Timer {
+ interval: 10000
+ triggeredOnStart: true
+ repeat: true
+ running: true
+ onTriggered: {
+ emitter.burst(1000);
+ fakeEmitter.burst(1000);
+ }
+ }
+ Text {
+ anchors.left: parent.left
+ anchors.bottom: parent.bottom
+ text: qsTr("1000 particles")
+ color: "white"
+ MouseArea {
+ anchors.fill: parent
+ onClicked: emitter.burst(1000);
+ }
+ }
+ Text {
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ text: qsTr("1000 items")
+ color: "white"
+ MouseArea {
+ anchors.fill: parent
+ onClicked: fakeEmitter.burst(1000);
+ }
+ }
+}
diff --git a/examples/quick/particles/system/dynamicemitters.qml b/examples/quick/particles/system/dynamicemitters.qml
new file mode 100644
index 0000000000..31c70b2a6c
--- /dev/null
+++ b/examples/quick/particles/system/dynamicemitters.qml
@@ -0,0 +1,107 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+pragma ComponentBehavior: Bound
+
+Rectangle {
+ id: root
+ color: "black"
+ width: 640
+ height: 480
+ ParticleSystem {
+ id: sys
+ }
+ ImageParticle {
+ system: sys
+ source: "qrc:///particleresources/glowdot.png"
+ color: "white"
+ colorVariation: 1.0
+ alpha: 0.1
+ }
+
+ Component {
+ id: emitterComp
+ Emitter {
+ id: container
+ Emitter {
+ id: emitMore
+ system: sys
+ emitRate: 128
+ lifeSpan: 600
+ size: 16
+ endSize: 8
+ velocity: AngleDirection {
+ angleVariation: 360
+ magnitude: 60
+ }
+ }
+
+ property int life: 2600
+ property real targetX: 0
+ property real targetY: 0
+ function go() {
+ xAnim.start()
+ yAnim.start()
+ container.enabled = true
+ }
+ system: sys
+ emitRate: 32
+ lifeSpan: 600
+ size: 24
+ endSize: 8
+ NumberAnimation on x {
+ id: xAnim;
+ to: container.targetX
+ duration: container.life
+ running: false
+ }
+ NumberAnimation on y {
+ id: yAnim;
+ to: container.targetY
+ duration: container.life
+ running: false
+ }
+ Timer {
+ interval: container.life
+ running: true
+ onTriggered: container.destroy()
+ }
+ }
+ }
+
+ function customEmit(x, y) {
+ //! [0]
+ for (var i = 0; i < 8; i++) {
+ let obj = emitterComp.createObject(root)
+ obj.x = x
+ obj.y = y
+ obj.targetX = Math.random() * 240 - 120 + obj.x
+ obj.targetY = Math.random() * 240 - 120 + obj.y
+ obj.life = Math.round(Math.random() * 2400) + 200
+ obj.emitRate = Math.round(Math.random() * 32) + 32
+ obj.go()
+ }
+ //! [0]
+ }
+
+ Timer {
+ interval: 10000
+ triggeredOnStart: true
+ running: true
+ repeat: true
+ onTriggered: root.customEmit(Math.random() * 320, Math.random() * 480)
+ }
+ TapHandler {
+ onTapped: function(event) { root.customEmit(event.pressPosition.x, event.pressPosition.y) }
+ }
+
+ Text {
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: qsTr("Click Somewhere")
+ color: "white"
+ font.pixelSize: 24
+ }
+}
diff --git a/examples/quick/particles/images/particle2.png b/examples/quick/particles/system/images/particle2.png
index 4f3372cd07..4f3372cd07 100644
--- a/examples/quick/particles/images/particle2.png
+++ b/examples/quick/particles/system/images/particle2.png
Binary files differ
diff --git a/examples/quick/particles/images/particle3.png b/examples/quick/particles/system/images/particle3.png
index 2b04601403..2b04601403 100644
--- a/examples/quick/particles/images/particle3.png
+++ b/examples/quick/particles/system/images/particle3.png
Binary files differ
diff --git a/examples/quick/particles/images/sparkleSize.png b/examples/quick/particles/system/images/sparkleSize.png
index 752056541b..752056541b 100644
--- a/examples/quick/particles/images/sparkleSize.png
+++ b/examples/quick/particles/system/images/sparkleSize.png
Binary files differ
diff --git a/examples/quick/particles/system/main.cpp b/examples/quick/particles/system/main.cpp
index 63a88412f5..b18019f663 100644
--- a/examples/quick/particles/system/main.cpp
+++ b/examples/quick/particles/system/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(particles/system/system)
+DECLARATIVE_EXAMPLE_MAIN(system/system)
diff --git a/examples/quick/particles/system/multiplepainters.qml b/examples/quick/particles/system/multiplepainters.qml
new file mode 100644
index 0000000000..5356f5fe8a
--- /dev/null
+++ b/examples/quick/particles/system/multiplepainters.qml
@@ -0,0 +1,58 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+Rectangle {
+ id: root
+ width: 360
+ height: 600
+ color: "darkblue"
+ property bool cloneMode: false
+ ParticleSystem {
+ id: sys
+ }
+ TapHandler {
+ onTapped: root.cloneMode = !root.cloneMode
+ }
+ Text {
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: qsTr("Click to Toggle")
+ color: "white"
+ font.pixelSize: 24
+ }
+ Emitter {
+ system: sys
+ y:root.height + 20
+ width: root.width
+ emitRate: 200
+ lifeSpan: 4000
+ startTime: 4000
+ velocity: PointDirection { y: -120 }
+ }
+
+ ImageParticle {
+ system: sys
+ visible: !root.cloneMode
+ source: "images/particle2.png"
+ }
+
+ ImageParticle {
+ system: sys
+ visible: root.cloneMode
+ z: 0
+ source: "images/particle3.png"
+ }
+
+ ImageParticle {
+ system: sys
+ clip: true
+ visible: root.cloneMode
+ y: 120
+ height: 240
+ width: root.width
+ z: 1
+ source: "qrc:///particleresources/glowdot.png"
+ }
+}
diff --git a/examples/quick/particles/system/startstop.qml b/examples/quick/particles/system/startstop.qml
new file mode 100644
index 0000000000..e89c1f40f0
--- /dev/null
+++ b/examples/quick/particles/system/startstop.qml
@@ -0,0 +1,50 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+Rectangle {
+ width: 360
+ height: 540
+ color: "black"
+ Text {
+ text: qsTr("Left click to start/stop\nRight click to pause/unpause")
+ color: "white"
+ font.pixelSize: 24
+ }
+
+ TapHandler {
+ acceptedButtons: Qt.LeftButton | Qt.RightButton
+ onTapped: function (event, mouseButton)
+ {
+ if (mouseButton === Qt.LeftButton)
+ particles.running = !particles.running
+ else
+ particles.paused = !particles.paused;
+ }
+ }
+
+ ParticleSystem {
+ id: particles
+ running: false
+ }
+
+ ImageParticle {
+ anchors.fill: parent
+ system: particles
+ source: "qrc:///particleresources/star.png"
+ sizeTable: "images/sparkleSize.png"
+ alpha: 0
+ colorVariation: 0.6
+ }
+
+ Emitter {
+ anchors.fill: parent
+ system: particles
+ emitRate: 2000
+ lifeSpan: 2000
+ size: 30
+ sizeVariation: 10
+ }
+}
diff --git a/examples/quick/particles/system/system.pro b/examples/quick/particles/system/system.pro
index df143f10a3..ea620f687a 100644
--- a/examples/quick/particles/system/system.pro
+++ b/examples/quick/particles/system/system.pro
@@ -4,7 +4,6 @@ QT += quick qml
SOURCES += main.cpp
RESOURCES += \
system.qrc \
- ../images.qrc \
../../shared/shared.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/quick/particles/system
diff --git a/examples/quick/particles/system/system.qml b/examples/quick/particles/system/system.qml
index 569676d424..021438944a 100644
--- a/examples/quick/particles/system/system.qml
+++ b/examples/quick/particles/system/system.qml
@@ -1,68 +1,21 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import "../../shared" as Examples
+import QtQuick
+import shared
Item {
height: 480
width: 320
- Examples.LauncherList {
+ LauncherList {
id: ll
anchors.fill: parent
Component.onCompleted: {
- addExample("Dynamic Comparison", "Compares with dynamically created elements", Qt.resolvedUrl("content/dynamiccomparison.qml"));
- addExample("StartStop", "Start and stop the simulation", Qt.resolvedUrl("content/startstop.qml"));
- addExample("Timed group changes", "Emit into managed groups", Qt.resolvedUrl("content/timedgroupchanges.qml"));
- addExample("Dynamic Emitters", "Dynamically instantiated emitters with a single system", Qt.resolvedUrl("content/dynamicemitters.qml"));
- addExample("Multiple Painters", "Several ParticlePainters on the same logical particles", Qt.resolvedUrl("content/multiplepainters.qml"));
+ addExample("Dynamic Comparison", "Compares with dynamically created elements", Qt.resolvedUrl("dynamiccomparison.qml"));
+ addExample("StartStop", "Start and stop the simulation", Qt.resolvedUrl("startstop.qml"));
+ addExample("Timed group changes", "Emit into managed groups", Qt.resolvedUrl("timedgroupchanges.qml"));
+ addExample("Dynamic Emitters", "Dynamically instantiated emitters with a single system", Qt.resolvedUrl("dynamicemitters.qml"));
+ addExample("Multiple Painters", "Several ParticlePainters on the same logical particles", Qt.resolvedUrl("multiplepainters.qml"));
}
}
}
diff --git a/examples/quick/particles/system/system.qrc b/examples/quick/particles/system/system.qrc
index 3fb8221fb1..806f11e818 100644
--- a/examples/quick/particles/system/system.qrc
+++ b/examples/quick/particles/system/system.qrc
@@ -1,10 +1,13 @@
<RCC>
- <qresource prefix="/particles/system">
+ <qresource prefix="/qt/qml/system">
<file>system.qml</file>
- <file>content/dynamiccomparison.qml</file>
- <file>content/dynamicemitters.qml</file>
- <file>content/multiplepainters.qml</file>
- <file>content/startstop.qml</file>
- <file>content/timedgroupchanges.qml</file>
+ <file>dynamiccomparison.qml</file>
+ <file>dynamicemitters.qml</file>
+ <file>multiplepainters.qml</file>
+ <file>startstop.qml</file>
+ <file>timedgroupchanges.qml</file>
+ <file>images/sparkleSize.png</file>
+ <file>images/particle2.png</file>
+ <file>images/particle3.png</file>
</qresource>
</RCC>
diff --git a/examples/quick/particles/system/timedgroupchanges.qml b/examples/quick/particles/system/timedgroupchanges.qml
new file mode 100644
index 0000000000..b60269ba13
--- /dev/null
+++ b/examples/quick/particles/system/timedgroupchanges.qml
@@ -0,0 +1,90 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+Rectangle {
+ width: 360
+ height: 600
+ color: "black"
+ ParticleSystem {
+ anchors.fill: parent
+ id: syssy
+ //! [0]
+ ParticleGroup {
+ name: "fire"
+ duration: 2000
+ durationVariation: 2000
+ to: {"splode":1}
+ }
+ //! [0]
+ //! [1]
+ ParticleGroup {
+ name: "splode"
+ duration: 400
+ to: {"dead":1}
+ TrailEmitter {
+ group: "works"
+ emitRatePerParticle: 100
+ lifeSpan: 1000
+ maximumEmitted: 1200
+ size: 8
+ velocity: AngleDirection {angle: 270; angleVariation: 45; magnitude: 20; magnitudeVariation: 20;}
+ acceleration: PointDirection {y:100; yVariation: 20}
+ }
+ }
+ //! [1]
+ //! [2]
+ ParticleGroup {
+ name: "dead"
+ duration: 1000
+ Affector {
+ once: true
+ onAffected: (x, y)=> worksEmitter.burst(400,x,y)
+ }
+ }
+ //! [2]
+
+ Timer {
+ interval: 6000
+ running: true
+ triggeredOnStart: true
+ repeat: true
+ onTriggered:startingEmitter.pulse(100);
+ }
+ Emitter {
+ id: startingEmitter
+ group: "fire"
+ width: parent.width
+ y: parent.height
+ enabled: false
+ emitRate: 80
+ lifeSpan: 6000
+ velocity: PointDirection {y:-100;}
+ size: 32
+ }
+
+ Emitter {
+ id: worksEmitter
+ group: "works"
+ enabled: false
+ emitRate: 100
+ lifeSpan: 1600
+ maximumEmitted: 6400
+ size: 8
+ velocity: CumulativeDirection {
+ PointDirection {y:-100}
+ AngleDirection {angleVariation: 360; magnitudeVariation: 80;}
+ }
+ acceleration: PointDirection {y:100; yVariation: 20}
+ }
+
+ ImageParticle {
+ groups: ["works", "fire", "splode"]
+ source: "qrc:///particleresources/glowdot.png"
+ entryEffect: ImageParticle.Scale
+ }
+ }
+}
+
diff --git a/examples/quick/pointerhandlers/CMakeLists.txt b/examples/quick/pointerhandlers/CMakeLists.txt
new file mode 100644
index 0000000000..a8b3cbe3d0
--- /dev/null
+++ b/examples/quick/pointerhandlers/CMakeLists.txt
@@ -0,0 +1,95 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(pointerhandlers LANGUAGES CXX)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick Svg)
+
+qt_standard_project_setup(REQUIRES 6.5)
+
+add_subdirectory("../shared" "shared")
+
+qt_add_executable(pointerhandlersexample WIN32 MACOSX_BUNDLE main.cpp)
+
+target_link_libraries(pointerhandlersexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+ Qt6::Svg
+)
+
+add_dependencies(pointerhandlersexample pointerhandlers_shared)
+
+qt_add_qml_module(pointerhandlersexample
+ URI pointerhandlers
+ QML_FILES
+ "components/Button.qml"
+ "components/CheckBox.qml"
+ "components/CorkPanel.qml"
+ "components/FakeFlickable.qml"
+ "components/FlashAnimation.qml"
+ "components/LeftDrawer.qml"
+ "components/MomentumAnimation.qml"
+ "components/MouseFeedbackSprite.qml"
+ "components/QuadPieMenu.qml"
+ "components/ScrollBar.qml"
+ "components/Slider.qml"
+ "components/TouchpointFeedbackSprite.qml"
+ "corkboards.qml"
+ "fakeFlickable.qml"
+ "flingAnimation.qml"
+ "joystick.qml"
+ "map.qml"
+ "mixer.qml"
+ "multibuttons.qml"
+ "multiflame.qml"
+ "pieMenu.qml"
+ "pinchHandler.qml"
+ "pointerhandlers.qml"
+ "sidebar.qml"
+ "singlePointHandlerProperties.qml"
+ "tabletCanvasDrawing.qml"
+ "tapHandler.qml"
+ RESOURCES
+ "components/images/checkmark.png"
+ "components/images/cork.jpg"
+ "components/images/fingersprite.png"
+ "components/images/mixer-knob.png"
+ "components/images/mouse.png"
+ "components/images/mouse_left.png"
+ "components/images/mouse_middle.png"
+ "components/images/mouse_right.png"
+ "components/images/mouse_wheel_ridges.png"
+ "components/images/note-yellow.png"
+ "components/images/tack.png"
+ "images/arrowhead.png"
+ "images/balloon.png"
+ "images/blur-circle.png"
+ "images/cursor-airbrush.png"
+ "images/cursor-eraser.png"
+ "images/cursor-felt-marker.png"
+ "images/cursor-pencil.png"
+ "images/fighter.png"
+ "images/grabbing-location.svg"
+ "images/joystick-outer-case-pov.jpg"
+ "images/map.svgz"
+ "images/missile.png"
+ "images/redball.png"
+)
+
+install(TARGETS pointerhandlersexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET pointerhandlersexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/pointerhandlers/components/Button.qml b/examples/quick/pointerhandlers/components/Button.qml
new file mode 100644
index 0000000000..4943f9cb94
--- /dev/null
+++ b/examples/quick/pointerhandlers/components/Button.qml
@@ -0,0 +1,59 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Rectangle {
+ id: root
+ property alias label: label
+ property alias text: label.text
+ property alias pressed: tap.pressed
+ property alias hovered: hoverHandler.hovered
+ property alias gesturePolicy: tap.gesturePolicy
+ property alias margin: tap.margin
+ property alias exclusiveSignals: tap.exclusiveSignals
+ signal tapped
+
+ implicitHeight: Math.max(Screen.pixelDensity * 7, label.implicitHeight * 2)
+ implicitWidth: Math.max(Screen.pixelDensity * 11, label.implicitWidth * 1.3)
+ height: implicitHeight
+ width: implicitWidth
+ radius: height / 6
+
+ border { color: Qt.darker(palette.button, 1.5); width: 1 }
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: tap.pressed ? Qt.darker(palette.button, 1.3) : palette.button }
+ GradientStop { position: 1.0; color: Qt.darker(palette.button, 1.3) }
+ }
+
+ TapHandler {
+ id: tap
+ margin: 10 // the user can tap a little beyond the edges
+ objectName: label.text + " Tap"
+ onSingleTapped: {
+ tapFlash.start()
+ root.tapped()
+ }
+ }
+ HoverHandler {
+ id: hoverHandler
+ }
+
+ Text {
+ id: label
+ font.pointSize: 14
+ color: palette.buttonText
+ text: "Button"
+ anchors.centerIn: parent
+ }
+
+ Rectangle {
+ anchors.fill: parent
+ color: "transparent"
+ border.width: 2; radius: root.radius; antialiasing: true
+ opacity: tapFlash.running ? 1 : 0
+ FlashAnimation on visible {
+ id: tapFlash
+ }
+ }
+}
diff --git a/examples/quick/pointerhandlers/components/CheckBox.qml b/examples/quick/pointerhandlers/components/CheckBox.qml
new file mode 100644
index 0000000000..481a411c06
--- /dev/null
+++ b/examples/quick/pointerhandlers/components/CheckBox.qml
@@ -0,0 +1,58 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Item {
+ id: root
+ implicitHeight: frame.height
+ implicitWidth: row.implicitWidth
+ width: implicitWidth
+ height: implicitHeight
+ property alias text: label.text
+ property bool checked
+
+ property alias pressed: tapHandler.pressed
+ property alias row: row
+ signal clicked
+
+ Row {
+ id: row
+ anchors.verticalCenter: parent.verticalCenter
+ spacing: 6
+ Rectangle {
+ id: frame
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: tapHandler.pressed ? Qt.darker(palette.button, 1.3) : palette.button }
+ GradientStop { position: 1.0; color: Qt.darker(palette.button, 1.3) }
+ }
+ height: label.implicitHeight * 1.5
+ width: height
+ anchors.margins: 1
+ radius: 3
+ antialiasing: true
+ border.color: Qt.darker(palette.button, 1.5)
+ Image {
+ id: theX
+ source: "images/checkmark.png"
+ anchors.fill: frame
+ anchors.margins: frame.width / 5
+ fillMode: Image.PreserveAspectFit
+ smooth: true
+ visible: root.checked
+ }
+ }
+ Text {
+ id: label
+ color: palette.text
+ anchors.verticalCenter: frame.verticalCenter
+ }
+ }
+ TapHandler {
+ id: tapHandler
+ onTapped: {
+ parent.checked = !parent.checked
+ parent.clicked()
+ }
+ }
+}
diff --git a/examples/quick/pointerhandlers/components/CorkPanel.qml b/examples/quick/pointerhandlers/components/CorkPanel.qml
new file mode 100644
index 0000000000..4aec2b5c7c
--- /dev/null
+++ b/examples/quick/pointerhandlers/components/CorkPanel.qml
@@ -0,0 +1,118 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Image {
+ id: corkPanel
+ source: Qt.resolvedUrl("images/cork.jpg")
+ width: ListView.view.width
+ height: ListView.view.height
+ fillMode: Image.PreserveAspectCrop
+
+ required property string name
+ required property var notes
+
+ TapHandler {
+ objectName: corkPanel.name
+ onTapped: corkPanel.Window.activeFocusItem.focus = false
+ }
+
+ Text {
+ text: corkPanel.name
+ x: 15
+ y: 8
+ height: 40
+ width: 370
+ font.pixelSize: 18
+ font.bold: true
+ color: "white"
+ style: Text.Outline
+ styleColor: "black"
+ wrapMode: Text.Wrap
+ }
+
+ Repeater {
+ model: corkPanel.notes
+ Item {
+ id: fulcrum
+
+ x: 100 + Math.random() * (corkPanel.width - 0.5 * paper.width)
+ y: 50 + Math.random() * (corkPanel.height - 0.5 * paper.height)
+
+ Item {
+ id: note
+ scale: 0.7
+
+ Image {
+ id: paper
+ x: 8 + -width * 0.6 / 2
+ y: -20
+ source: "images/note-yellow.png"
+ scale: 0.6
+ transformOrigin: Item.TopLeft
+ antialiasing: true
+
+ DragHandler {
+ target: fulcrum
+ xAxis.minimum: 100
+ xAxis.maximum: corkPanel.width - 80
+ yAxis.minimum: 0
+ yAxis.maximum: corkPanel.height - 80
+ }
+ }
+
+ TextEdit {
+ id: text
+ x: -104
+ y: 36
+ width: 215
+ height: 24
+ font.pixelSize: 24
+ readOnly: false
+ selectByMouse: activeFocus
+ rotation: -8
+ text: noteText
+ wrapMode: Text.Wrap
+ }
+
+ rotation: -flickable.horizontalVelocity / 100
+ Behavior on rotation {
+ SpringAnimation {
+ spring: 2.0
+ damping: 0.15
+ }
+ }
+ }
+
+ Image {
+ x: -width / 2
+ y: -height * 0.5 / 2
+ source: "images/tack.png"
+ scale: 0.7
+ transformOrigin: Item.TopLeft
+ }
+
+ states: State {
+ name: "pressed"
+ when: text.activeFocus
+ PropertyChanges {
+ target: note
+ rotation: 8
+ scale: 1
+ }
+ PropertyChanges {
+ target: fulcrum
+ z: 8
+ }
+ }
+
+ transitions: Transition {
+ NumberAnimation {
+ properties: "rotation,scale"
+ duration: 200
+ }
+ }
+ }
+ }
+}
diff --git a/examples/quick/pointerhandlers/components/FakeFlickable.qml b/examples/quick/pointerhandlers/components/FakeFlickable.qml
new file mode 100644
index 0000000000..d3e8583d58
--- /dev/null
+++ b/examples/quick/pointerhandlers/components/FakeFlickable.qml
@@ -0,0 +1,102 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import Qt.labs.animation
+
+Item {
+ id: root
+ objectName: "viewport"
+ default property alias data: __contentItem.data
+ property alias velocity: anim.velocity
+ property alias contentX: __contentItem.x // sign is reversed compared to Flickable.contentX
+ property alias contentY: __contentItem.y // sign is reversed compared to Flickable.contentY
+ property alias contentWidth: __contentItem.width
+ property alias contentHeight: __contentItem.height
+ signal flickStarted
+ signal flickEnded
+
+ Item {
+ id: __contentItem
+ objectName: "__contentItem"
+ width: childrenRect.width
+ height: childrenRect.height
+
+ BoundaryRule on x {
+ id: xbr
+ minimum: root.width - __contentItem.width
+ maximum: 0
+ minimumOvershoot: 100
+ maximumOvershoot: 100
+ overshootFilter: BoundaryRule.Peak
+ }
+
+ BoundaryRule on y {
+ id: ybr
+ minimum: root.height - __contentItem.height
+ maximum: 0
+ minimumOvershoot: 100
+ maximumOvershoot: 100
+ overshootFilter: BoundaryRule.Peak
+ }
+
+ DragHandler {
+ id: dragHandler
+ onActiveChanged:
+ if (active) {
+ anim.stop()
+ root.flickStarted()
+ } else {
+ var vel = centroid.velocity
+ if (xbr.returnToBounds())
+ vel.x = 0
+ if (ybr.returnToBounds())
+ vel.y = 0
+ if (vel.x !== 0 || vel.y !== 0)
+ anim.restart(vel)
+ else
+ root.flickEnded()
+ }
+ }
+ WheelHandler {
+ rotationScale: 15
+ property: "x"
+ orientation: Qt.Horizontal
+ acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad
+ onActiveChanged:
+ // emitting signals in both instances is redundant but hard to avoid
+ // when the touchpad is flicking along both axes
+ if (active) {
+ anim.stop()
+ root.flickStarted()
+ } else {
+ xbr.returnToBounds()
+ root.flickEnded()
+ }
+ }
+ WheelHandler {
+ rotationScale: 15
+ property: "y"
+ orientation: Qt.Vertical
+ acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad
+ onActiveChanged:
+ if (active) {
+ anim.stop()
+ root.flickStarted()
+ } else {
+ ybr.returnToBounds()
+ root.flickEnded()
+ }
+ }
+ MomentumAnimation {
+ id: anim
+ target: __contentItem
+ onStarted: root.flickStarted()
+ onStopped: {
+ xbr.returnToBounds()
+ ybr.returnToBounds()
+ root.flickEnded()
+ }
+ }
+ }
+}
diff --git a/examples/quick/pointerhandlers/components/FlashAnimation.qml b/examples/quick/pointerhandlers/components/FlashAnimation.qml
new file mode 100644
index 0000000000..bdbcaecdfa
--- /dev/null
+++ b/examples/quick/pointerhandlers/components/FlashAnimation.qml
@@ -0,0 +1,14 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+SequentialAnimation {
+ id: tapFlash
+ running: false
+ loops: 3
+ PropertyAction { value: false }
+ PauseAnimation { duration: 100 }
+ PropertyAction { value: true }
+ PauseAnimation { duration: 100 }
+}
diff --git a/examples/quick/pointerhandlers/components/LeftDrawer.qml b/examples/quick/pointerhandlers/components/LeftDrawer.qml
new file mode 100644
index 0000000000..8d09ce6c2e
--- /dev/null
+++ b/examples/quick/pointerhandlers/components/LeftDrawer.qml
@@ -0,0 +1,76 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+import QtQuick
+import Qt.labs.animation
+
+Item {
+ id: root
+ objectName: "LeftHandlerDrawer"
+ width: 100
+ height: 400
+ property real stickout: 4
+ property real xOpen: rect.radius * -2
+ property real xClosed: stickout - width
+ x: xClosed
+ y: 10
+
+ function close() {
+ openCloseAnimation.to = xClosed
+ openCloseAnimation.start()
+ }
+ function open() {
+ openCloseAnimation.to = xOpen
+ openCloseAnimation.start()
+ }
+
+ DragHandler {
+ id: dragHandler
+ yAxis.enabled: false
+ xAxis.minimum: -1000
+ margin: 20
+ onActiveChanged:
+ if (!active) {
+ if (xbr.returnToBounds())
+ return;
+ if (activeTranslation.x > 0)
+ open()
+ if (activeTranslation.x < 0)
+ close()
+ }
+ }
+
+ BoundaryRule on x {
+ id: xbr
+ minimum: xClosed
+ maximum: xOpen
+ minimumOvershoot: rect.radius
+ maximumOvershoot: rect.radius
+ }
+
+ NumberAnimation on x {
+ id: openCloseAnimation
+ duration: 300
+ easing { type: Easing.OutBounce; overshoot: 5 }
+ }
+
+ // TODO this was supposed to be RectangularGlow but we lost QtGraphicalEffects in Qt 6
+ Rectangle {
+ id: effect
+ anchors.fill: parent
+ border.width: dragHandler.margin
+ border.color: "cyan"
+ opacity: 0.2
+ radius: rect.radius + dragHandler.margin
+ }
+
+ Rectangle {
+ id: rect
+ anchors.fill: parent
+ anchors.margins: 3
+ color: "#333"
+ border.color: "cyan"
+ border.width: 2
+ radius: 10
+ antialiasing: true
+ }
+}
diff --git a/examples/quick/pointerhandlers/components/MomentumAnimation.qml b/examples/quick/pointerhandlers/components/MomentumAnimation.qml
new file mode 100644
index 0000000000..9577980e8e
--- /dev/null
+++ b/examples/quick/pointerhandlers/components/MomentumAnimation.qml
@@ -0,0 +1,34 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+ParallelAnimation {
+ id: root
+ property Item target: null
+ property int duration: 500
+ property vector2d velocity: Qt.vector2d(0,0)
+
+ function restart(vel) {
+ stop()
+ velocity = vel
+ start()
+ }
+
+ NumberAnimation {
+ id: xAnim
+ target: root.target
+ property: "x"
+ to: target.x + velocity.x / duration * 100
+ duration: root.duration
+ easing.type: Easing.OutQuad
+ }
+ NumberAnimation {
+ id: yAnim
+ target: root.target
+ property: "y"
+ to: target.y + velocity.y / duration * 100
+ duration: root.duration
+ easing.type: Easing.OutQuad
+ }
+}
diff --git a/examples/quick/pointerhandlers/components/MouseFeedbackSprite.qml b/examples/quick/pointerhandlers/components/MouseFeedbackSprite.qml
new file mode 100644
index 0000000000..57c58d826f
--- /dev/null
+++ b/examples/quick/pointerhandlers/components/MouseFeedbackSprite.qml
@@ -0,0 +1,58 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+HoverHandler {
+ id: handler
+ objectName: "mouse point"
+ acceptedDevices: PointerDevice.Mouse
+ target: Image {
+ objectName: "mouse sprite"
+ source: "images/mouse.png"
+ opacity: (phandler.point.pressedButtons || wheelAnimationTimer.running) ? 1 : 0
+ x: handler.point.position.x - width / 2
+ y: handler.point.position.y - height / 2
+ parent: handler.parent
+ Image {
+ source: "images/mouse_left.png"
+ visible: phandler.point.pressedButtons & Qt.LeftButton
+ }
+ Image {
+ source: "images/mouse_middle.png"
+ visible: phandler.point.pressedButtons & Qt.MiddleButton
+ }
+ Image {
+ source: "images/mouse_right.png"
+ visible: phandler.point.pressedButtons & Qt.RightButton
+ }
+ PointHandler {
+ id: phandler
+ acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton
+ }
+
+ WheelHandler {
+ blocking: false
+ onWheel: (event)=> {
+ wheelSprite.reverse = (event.angleDelta.y < 0)
+ wheelAnimationTimer.start()
+ }
+ }
+ AnimatedSprite {
+ id: wheelSprite
+ x: 19
+ y: 7
+ source: "images/mouse_wheel_ridges.png"
+ frameWidth: 5
+ frameHeight: 15
+ frameCount: 3
+ frameDuration: 50
+ running: wheelAnimationTimer.running
+ visible: running
+ Timer {
+ id: wheelAnimationTimer
+ interval: 500
+ }
+ }
+ }
+}
diff --git a/examples/quick/pointerhandlers/components/QuadPieMenu.qml b/examples/quick/pointerhandlers/components/QuadPieMenu.qml
new file mode 100644
index 0000000000..eae268eccb
--- /dev/null
+++ b/examples/quick/pointerhandlers/components/QuadPieMenu.qml
@@ -0,0 +1,116 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+
+TapHandler {
+ property var labels: [ "upperLeft", "upperRight", "lowerRight", "lowerLeft" ]
+ signal triggered(string text)
+
+ id: menuTap
+ acceptedButtons: Qt.RightButton
+ gesturePolicy: TapHandler.DragWithinBounds
+ onPressedChanged: if (pressed) {
+ impl.x = point.position.x - impl.width / 2
+ impl.y = point.position.y - impl.width / 2
+ } else {
+ if (impl.highlightedShape)
+ menuTap.triggered(impl.highlightedShape.text)
+ }
+
+ property Item impl: Item {
+ parent: menuTap.parent
+ width: 100
+ height: 100
+ // with touchscreen or stylus, long-press slowly expands the menu to size
+ // with mouse or touchpad right-click, it opens instantly
+ scale: menuTap.point.device.pointerType === PointerDevice.Generic ?
+ 1 : Math.min(1, Math.max(0, menuTap.timeHeld * 4))
+ opacity: scale * 2
+ visible: menuTap.pressed
+ property Shape highlightedShape: null
+
+ component PieSegment : Shape {
+ id: shape
+ property int orientation: Qt.TopRightCorner
+ property alias text: text.text
+
+ width: 100
+ height: 100
+ containsMode: Shape.FillContains
+ preferredRendererType: Shape.CurveRenderer
+
+ property bool highlighted: menuTap.pressed &&
+ shape.contains(shape.mapFromItem(menuTap.parent, menuTap.point.position))
+ onHighlightedChanged: {
+ if (highlighted)
+ impl.highlightedShape = shape
+ else if (impl.highlightedShape === shape)
+ impl.highlightedShape = null
+ }
+
+ ShapePath {
+ fillColor: highlighted ? "darkturquoise" : "aliceblue"
+ PathSvg {
+ id: svgPath
+ path: switch (orientation) {
+ case Qt.TopRightCorner:
+ return "M75,50 l 25,0 a50,50 0 0,0 -50,-50 l 0,25 a25,25 0 0,1 25,25";
+ case Qt.BottomRightCorner:
+ return "M75,50 l 25,0 a50,50 0 0,1 -50,50 l 0,-25 a25,25 0 0,0 25,-25";
+ case Qt.TopLeftCorner:
+ return "M50,25 l 0,-25 a50,50 0 0,0 -50,50 l 25,0 a25,25 0 0,1 25,-25";
+ case Qt.BottomLeftCorner:
+ return "M50,75 l 0,25 a50,50 0 0,1 -50,-50 l 25,0 a25,25 0 0,0 25,25";
+ }
+ }
+ }
+ Text {
+ id: text
+ anchors {
+ centerIn: parent
+ horizontalCenterOffset: switch (orientation) {
+ case Qt.TopRightCorner:
+ case Qt.BottomRightCorner:
+ return 25;
+ default:
+ return -25;
+ }
+ verticalCenterOffset: switch (orientation) {
+ case Qt.BottomLeftCorner:
+ case Qt.BottomRightCorner:
+ return 25;
+ default:
+ return -25;
+ }
+ }
+ horizontalAlignment: Text.AlignHCenter
+ rotation: switch (orientation) {
+ case Qt.TopRightCorner:
+ case Qt.BottomLeftCorner:
+ return 45;
+ default:
+ return -45;
+ }
+ }
+ }
+
+ PieSegment {
+ orientation: Qt.TopLeftCorner
+ text: labels[0]
+ }
+ PieSegment {
+ orientation: Qt.TopRightCorner
+ text: labels[1]
+ }
+ PieSegment {
+ orientation: Qt.BottomRightCorner
+ text: labels[2]
+ }
+ PieSegment {
+ orientation: Qt.BottomLeftCorner
+ text: labels[3]
+ }
+ }
+}
diff --git a/examples/quick/pointerhandlers/components/ScrollBar.qml b/examples/quick/pointerhandlers/components/ScrollBar.qml
new file mode 100644
index 0000000000..6b13c03305
--- /dev/null
+++ b/examples/quick/pointerhandlers/components/ScrollBar.qml
@@ -0,0 +1,114 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Rectangle {
+ id: root
+ property real contentHeight: 100
+ property FakeFlickable flick: null
+ property real position
+
+ onPositionChanged: if (flick && (drag.active || tap.active)) {
+ if (knob.state === "horizontal")
+ flick.contentX = position * knob.scrollDistance
+ else if (knob.state === "vertical")
+ flick.contentY = position * knob.scrollDistance
+ }
+
+ color: palette.button
+ border.color: Qt.darker(palette.button, 1.5)
+ gradient: Gradient {
+ GradientStop { position: 0; color: Qt.darker(palette.button, 1.3) }
+ GradientStop { position: 1; color: palette.button }
+ }
+ antialiasing: true
+ radius: Math.min(width, height) / 6
+ width: 20
+ height: 20
+
+ TapHandler {
+ id: tap
+ onTapped: {
+ if (knob.state === "horizontal")
+ knob.x = position.x - knob.width / 2
+ else if (knob.state === "vertical")
+ knob.y = position.y - knob.height / 2
+ }
+ }
+
+ Rectangle {
+ id: knob
+ border.color: "black"
+ border.width: 1
+ gradient: Gradient {
+ GradientStop { position: 0; color: palette.button }
+ GradientStop { position: 1; color: Qt.darker(palette.button, 1.3) }
+ }
+ radius: 2
+ antialiasing: true
+ state: root.height > root.width ? "vertical" : root.height < root.width ? "horizontal" : ""
+ property real scrollDistance: 0
+ property real scrolledX: 0
+ property real scrolledY: 0
+ property real max: 0
+
+ Binding on x {
+ value: knob.scrolledX
+ when: !drag.active
+ }
+
+ Binding on y {
+ value: knob.scrolledY
+ when: !drag.active
+ }
+
+ states: [
+ // We will control the horizontal. We will control the vertical.
+ State {
+ name: "horizontal"
+ PropertyChanges {
+ knob {
+ max: root.width - knob.width
+ scrolledX: Math.min(knob.max, Math.max(0, knob.max * flick.contentX / (flick.width - flick.contentWidth)))
+ scrolledY: 1
+ scrollDistance: flick.width - flick.contentWidth
+ width: flick.width * (flick.width / flick.contentWidth) - (height - anchors.margins) * 2
+ height: root.height - 2
+ }
+ drag {
+ xAxis.minimum: 0
+ xAxis.maximum: knob.max
+ yAxis.minimum: 1
+ yAxis.maximum: 1
+ }
+ root.position: knob.x / drag.xAxis.maximum
+ }
+ },
+ State {
+ name: "vertical"
+ PropertyChanges {
+ knob {
+ max: root.height - knob.height
+ scrolledX: 1
+ scrolledY: Math.min(knob.max, Math.max(0, knob.max * flick.contentY / (flick.height - flick.contentHeight)))
+ scrollDistance: flick.height - flick.contentHeight
+ width: root.width - 2
+ height: root.width - 2
+ }
+ drag {
+ xAxis.minimum: 1
+ xAxis.maximum: 1
+ yAxis.minimum: 0
+ yAxis.maximum: knob.max
+ }
+ root.position: knob.y / drag.yAxis.maximum
+ }
+ }
+ ]
+
+ DragHandler {
+ id: drag
+ }
+ }
+}
diff --git a/examples/quick/pointerhandlers/components/Slider.qml b/examples/quick/pointerhandlers/components/Slider.qml
new file mode 100644
index 0000000000..b3b0d7ffc9
--- /dev/null
+++ b/examples/quick/pointerhandlers/components/Slider.qml
@@ -0,0 +1,112 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import Qt.labs.animation
+
+Item {
+ id: root
+ property int value: 50
+ property int maximumValue: 99
+ property alias label: label.text
+ property alias tapEnabled: tap.enabled
+ property alias pressed: tap.pressed
+ signal tapped
+
+ DragHandler {
+ id: dragHandler
+ objectName: label.text + " DragHandler"
+ target: knob
+ xAxis.enabled: false
+ }
+
+ WheelHandler {
+ id: wheelHandler
+ objectName: label.text + " WheelHandler"
+ acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad
+ invertible: false // Don't let the system "natural scrolling" setting affect this
+ rotationScale: -0.5 // But make it go consistently in the same direction as the fingers or wheel, a bit slow
+ target: knob
+ property: "y"
+ }
+
+ Rectangle {
+ id: slot
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ anchors.margins: 10
+ anchors.topMargin: label.height + 6
+ anchors.bottomMargin: valueLabel.height + 4
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: 10
+ color: "black"
+ radius: width / 2
+ smooth: true
+ }
+
+ Rectangle {
+ // RectangularGlow is better, but that's a different module
+ id: glow
+ anchors.fill: knob
+ anchors.margins: -5
+ anchors.leftMargin: -2
+ anchors.horizontalCenterOffset: 1
+ radius: 5
+ color: "#4400FFFF"
+ opacity: tap.pressed || tapFlash.running ? 1 : 0
+ FlashAnimation on visible {
+ id: tapFlash
+ }
+ }
+ Image {
+ id: knob
+ source: "images/mixer-knob.png"
+ antialiasing: true
+ x: slot.x - width / 2 + slot.width / 2
+ height: root.width / 2
+ width: implicitWidth / implicitHeight * height
+ property bool programmatic: false
+ property real multiplier: root.maximumValue / (ybr.maximum - ybr.minimum)
+ onYChanged: if (!programmatic) root.value = root.maximumValue - (knob.y - ybr.minimum) * multiplier
+ transformOrigin: Item.Center
+ function setValue(value) { knob.y = ybr.maximum - value / knob.multiplier }
+ TapHandler {
+ id: tap
+ objectName: label.text + " TapHandler"
+ gesturePolicy: TapHandler.DragThreshold
+ onTapped: {
+ tapFlash.start()
+ root.tapped
+ }
+ }
+ BoundaryRule on y {
+ id: ybr
+ minimum: slot.y
+ maximum: slot.height + slot.y - knob.height
+ }
+ }
+
+ Text {
+ id: valueLabel
+ font.pointSize: 16
+ color: "red"
+ anchors.bottom: parent.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: root.value
+ }
+
+ Text {
+ id: label
+ font.pointSize: 12
+ color: "red"
+ anchors.top: parent.top
+ anchors.topMargin: 5
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+
+ onHeightChanged: {
+ knob.programmatic = true
+ knob.setValue(root.value)
+ knob.programmatic = false
+ }
+}
diff --git a/examples/quick/pointerhandlers/components/TouchpointFeedbackSprite.qml b/examples/quick/pointerhandlers/components/TouchpointFeedbackSprite.qml
new file mode 100644
index 0000000000..3bbd6a0c36
--- /dev/null
+++ b/examples/quick/pointerhandlers/components/TouchpointFeedbackSprite.qml
@@ -0,0 +1,25 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+PointHandler {
+ id: handler
+ objectName: "point " + handler.point.id.toString(16)
+ acceptedDevices: PointerDevice.TouchScreen | PointerDevice.TouchPad
+ target: AnimatedSprite {
+ objectName: "sprite " + handler.point.id.toString(16)
+ source: "images/fingersprite.png"
+ visible: handler.active
+ running: visible // QTBUG-64544: running defaults to true, but we don't see it animating if we don't toggle it like this
+ x: handler.point.position.x - 20
+ y: handler.point.position.y - 13
+ width: frameWidth
+ height: frameHeight
+ frameWidth: 43
+ frameHeight: 64
+ frameCount: 3
+ frameRate: 5
+ parent: handler.parent
+ }
+}
diff --git a/examples/quick/pointerhandlers/components/images/checkmark.png b/examples/quick/pointerhandlers/components/images/checkmark.png
new file mode 100644
index 0000000000..821aafccdd
--- /dev/null
+++ b/examples/quick/pointerhandlers/components/images/checkmark.png
Binary files differ
diff --git a/examples/quick/touchinteraction/flickable/content/cork.jpg b/examples/quick/pointerhandlers/components/images/cork.jpg
index 160bc002bf..160bc002bf 100644
--- a/examples/quick/touchinteraction/flickable/content/cork.jpg
+++ b/examples/quick/pointerhandlers/components/images/cork.jpg
Binary files differ
diff --git a/examples/quick/pointerhandlers/components/images/fingersprite.png b/examples/quick/pointerhandlers/components/images/fingersprite.png
new file mode 100644
index 0000000000..423d115fdf
--- /dev/null
+++ b/examples/quick/pointerhandlers/components/images/fingersprite.png
Binary files differ
diff --git a/examples/quick/pointerhandlers/components/images/mixer-knob.png b/examples/quick/pointerhandlers/components/images/mixer-knob.png
new file mode 100644
index 0000000000..b7d42ee3bd
--- /dev/null
+++ b/examples/quick/pointerhandlers/components/images/mixer-knob.png
Binary files differ
diff --git a/examples/quick/pointerhandlers/components/images/mouse.png b/examples/quick/pointerhandlers/components/images/mouse.png
new file mode 100644
index 0000000000..268946df0a
--- /dev/null
+++ b/examples/quick/pointerhandlers/components/images/mouse.png
Binary files differ
diff --git a/examples/quick/pointerhandlers/components/images/mouse_left.png b/examples/quick/pointerhandlers/components/images/mouse_left.png
new file mode 100644
index 0000000000..9292301b47
--- /dev/null
+++ b/examples/quick/pointerhandlers/components/images/mouse_left.png
Binary files differ
diff --git a/examples/quick/pointerhandlers/components/images/mouse_middle.png b/examples/quick/pointerhandlers/components/images/mouse_middle.png
new file mode 100644
index 0000000000..064e8b9c16
--- /dev/null
+++ b/examples/quick/pointerhandlers/components/images/mouse_middle.png
Binary files differ
diff --git a/examples/quick/pointerhandlers/components/images/mouse_right.png b/examples/quick/pointerhandlers/components/images/mouse_right.png
new file mode 100644
index 0000000000..cab1a36ba6
--- /dev/null
+++ b/examples/quick/pointerhandlers/components/images/mouse_right.png
Binary files differ
diff --git a/examples/quick/pointerhandlers/components/images/mouse_wheel_ridges.png b/examples/quick/pointerhandlers/components/images/mouse_wheel_ridges.png
new file mode 100644
index 0000000000..755cfdc4de
--- /dev/null
+++ b/examples/quick/pointerhandlers/components/images/mouse_wheel_ridges.png
Binary files differ
diff --git a/examples/quick/touchinteraction/flickable/content/note-yellow.png b/examples/quick/pointerhandlers/components/images/note-yellow.png
index 3195952ad2..3195952ad2 100644
--- a/examples/quick/touchinteraction/flickable/content/note-yellow.png
+++ b/examples/quick/pointerhandlers/components/images/note-yellow.png
Binary files differ
diff --git a/examples/quick/touchinteraction/flickable/content/tack.png b/examples/quick/pointerhandlers/components/images/tack.png
index cef2d1cd23..cef2d1cd23 100644
--- a/examples/quick/touchinteraction/flickable/content/tack.png
+++ b/examples/quick/pointerhandlers/components/images/tack.png
Binary files differ
diff --git a/examples/quick/pointerhandlers/corkboards.qml b/examples/quick/pointerhandlers/corkboards.qml
new file mode 100644
index 0000000000..76928f1b8c
--- /dev/null
+++ b/examples/quick/pointerhandlers/corkboards.qml
@@ -0,0 +1,51 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import "components"
+
+Rectangle {
+ width: 320; height: 480
+ color: "#464646"
+
+ ListModel {
+ id: list
+
+ ListElement {
+ name: "Panel One"
+ notes: [
+ ListElement { noteText: "Tap to edit" },
+ ListElement { noteText: "Drag to move" },
+ ListElement { noteText: "Flick to scroll" }
+ ]
+ }
+
+ ListElement {
+ name: "Panel Two"
+ notes: [
+ ListElement { noteText: "Note One" },
+ ListElement { noteText: "Note Two" }
+ ]
+ }
+
+ ListElement {
+ name: "Panel Three"
+ notes: [
+ ListElement { noteText: "Note Three" }
+ ]
+ }
+ }
+
+ ListView {
+ id: flickable
+
+ anchors.fill: parent
+ focus: true
+ highlightRangeMode: ListView.StrictlyEnforceRange
+ orientation: ListView.Horizontal
+ snapMode: ListView.SnapOneItem
+ model: list
+ delegate: CorkPanel { objectName: name }
+ }
+}
+
diff --git a/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-fakeflickable.jpg b/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-fakeflickable.jpg
new file mode 100644
index 0000000000..5149665a07
--- /dev/null
+++ b/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-fakeflickable.jpg
Binary files differ
diff --git a/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-fling.webp b/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-fling.webp
new file mode 100644
index 0000000000..4b8794971e
--- /dev/null
+++ b/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-fling.webp
Binary files differ
diff --git a/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-joystick.jpg b/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-joystick.jpg
new file mode 100644
index 0000000000..c9d167b1e7
--- /dev/null
+++ b/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-joystick.jpg
Binary files differ
diff --git a/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-map.webp b/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-map.webp
new file mode 100644
index 0000000000..b96b0cf90a
--- /dev/null
+++ b/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-map.webp
Binary files differ
diff --git a/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-mixer.webp b/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-mixer.webp
new file mode 100644
index 0000000000..f263458d12
--- /dev/null
+++ b/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-mixer.webp
Binary files differ
diff --git a/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-multibutton.webp b/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-multibutton.webp
new file mode 100644
index 0000000000..1d13805c64
--- /dev/null
+++ b/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-multibutton.webp
Binary files differ
diff --git a/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-piemenu.webp b/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-piemenu.webp
new file mode 100644
index 0000000000..cc5ca5d394
--- /dev/null
+++ b/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-piemenu.webp
Binary files differ
diff --git a/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-pinchhandler.webp b/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-pinchhandler.webp
new file mode 100644
index 0000000000..89f61251ab
--- /dev/null
+++ b/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-pinchhandler.webp
Binary files differ
diff --git a/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-pointhandler.webp b/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-pointhandler.webp
new file mode 100644
index 0000000000..1a0ac33d0c
--- /dev/null
+++ b/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-pointhandler.webp
Binary files differ
diff --git a/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-taphandler.webp b/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-taphandler.webp
new file mode 100644
index 0000000000..162e97ea15
--- /dev/null
+++ b/examples/quick/pointerhandlers/doc/images/pointerhandlers-example-taphandler.webp
Binary files differ
diff --git a/examples/quick/pointerhandlers/doc/src/pointerhandlers.qdoc b/examples/quick/pointerhandlers/doc/src/pointerhandlers.qdoc
new file mode 100644
index 0000000000..d9f2e5f1cc
--- /dev/null
+++ b/examples/quick/pointerhandlers/doc/src/pointerhandlers.qdoc
@@ -0,0 +1,171 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+
+/*!
+ \example pointerhandlers
+ \title Qt Quick Examples - Pointer Handlers
+ \ingroup qtquickexamples
+ \examplecategory {User Interface Components}
+ \meta tags {quick, input handlers}
+ \brief Shows how to use \l {Qt Quick Input Handlers} in interactive components.
+
+ \l {Qt Quick Controls} contains pre-built components that are sufficient
+ for many kinds of user interfaces; but you may sometimes find a need to
+ write such components "from scratch". In that case, you will need to make
+ substantial use of Pointer Handlers. This is a collection of small examples
+ that show how to implement some common and less-common interaction patterns.
+
+ If you build the example as an executable, you can choose pages from a
+ top-level ListView. The \c TouchpointFeedbackSprite and \c MouseFeedbackSprite
+ components show how to use PointHandler to provide feedback about what the
+ user is doing with the pointing devices: these components are always
+ visible throughout the example, and do not interfere with interaction
+ anywhere else. These components are handy for reuse if you ever need to do
+ a video or live demonstration of a user interface.
+
+ Alternatively, some of the individual QML files can be run on the command
+ line with the \l {QML Runtime Tool}{qml tool}, as a quick reminder to see
+ how a particular kind of component can be built.
+
+ \section1 TapHandler
+
+ \image pointerhandlers-example-taphandler.webp
+
+ The "tap" page shows how to detect touchscreen taps, long-presses, and
+ mouse clicks with different buttons. You can also try out the different
+ \l {TapHandler::}{gesturePolicy} values.
+
+ \section2 Multi-tap Buttons
+
+ On this page are three custom \c Button components, with different
+ \l {TapHandler::}{gesturePolicy} values: one button requires you
+ to keep your finger or mouse within the button during the whole time
+ from press to release; one will execute even if you drag outside
+ the button and then drag back in before releasing; and one will
+ exit its pressed state if you drag a little past the
+ \l {QStyleHints::startDragDistance}{system-wide drag threshold}.
+ If you try this example on a touchscreen, you should be able to interact
+ with all three buttons at the same time with different fingers.
+
+ \image pointerhandlers-example-multibutton.webp
+
+ \section2 Pie Menu
+
+ This page shows how to write a touchscreen-friendly pie menu that animates
+ into view when activated by a long-press. You can select a menu item by
+ dragging from the center position onto one of the sectors and releasing. If
+ you drag outside the menu, or release in the middle of the menu, nothing is
+ selected. If you drag outside the grey viewport, the menu is cancelled.
+
+ \image pointerhandlers-example-piemenu.webp
+
+ \section1 PointHandler
+
+ On the "single point handler" page, PointHandler provides feedback from
+ some of the properties that can be found in \l SinglePointHandler::point
+ and \l handlerPoint::device. If you have built the example as
+ an executable, you will see this feedback at the same time as the feedback
+ from the PointHandlers in the main pointerhandlers.qml file.
+
+ \image pointerhandlers-example-pointhandler.webp
+
+ The "tablet canvas" page uses PointHandler to uniquely detect different
+ \l {QPointingDevice::PointerType}{types of pointing devices}, so that if
+ you have a drawing tablet connected to your computer, you can draw on the
+ Canvas item with different types of stylus: pen, airbrush or marker. You
+ can "erase" strokes with the stylus eraser (done here by drawing on top
+ with the background color). Several \l {HoverHandler}{HoverHandlers}
+ provide feedback about which type of stylus or eraser is detected.
+
+ \section1 HoverHandler
+
+ The "hover sidebar" page shows how to detect when the mouse is hovering a
+ button component and its container at the same time. The propagation can be
+ disabled by setting the \l HoverHandler::blocking property. You can try out
+ all combinations of HoverHandler and MouseArea here, to compare how they
+ handle hover detection. And one more HoverHandler is used to show the
+ current mouse position in scene coordinates.
+
+ You can also verify that the HoverHandler on the animated "platform"
+ is hovered whenever it slides under the mouse cursor.
+
+ \section1 DragHandler
+
+ The "joystick" page simply has a \l DragHandler dragging an \l Image.
+ A \l State with \l AnchorChanges unlocks the \l anchors so that dragging is
+ possible; and an \l AnchorAnimation animates the knob's return to the
+ center position when released.
+
+ \image pointerhandlers-example-joystick.jpg
+
+ The "fling animation" page demonstrates one use of the
+ DragHandler::centroid::velocity property, which simply makes the value from
+ QEventPoint::velocity() available in QML. The \c MomentumAnimation component
+ that is used in this example shows one way to simulate phyics (momentum and
+ friction) without resorting to heavier solutions.
+
+ \image pointerhandlers-example-fling.webp
+
+ \section1 PinchHandler
+
+ The "pinch" page demonstrates multiple PinchHandlers: some require two
+ fingers and some require three, to perform the usual scaling, rotation and
+ translation, with constraints managed via PinchHandler's axis min and max
+ properties. One of the PinchHandler instances is used to manipulate
+ different \l Rectangle properties rather than position, scale and rotation.
+ Various PinchHandler properties are bound in various ways. You should be
+ able to manipulate each instance uniquely. Some items also have
+ DragHandlers and TapHandlers.
+
+ \image pointerhandlers-example-pinchhandler.webp
+
+ \section1 Interoperability
+
+ \section2 Sliders
+
+ The "mixer" page demonstrates the use of multiple handlers inside a
+ ListView delegate. You can interact with multiple \c Slider components
+ simultaneously, and you can flick the ListView sideways.
+
+ \list
+ \li A DragHandler allows you to start dragging anywhere along the "track"
+ where the slider knob can slide. Because the default \l{DragHandler::}{snapMode}
+ is \c DragHandler.SnapAuto, the knob will \e snap into a position centered
+ under the mouse or touchpoint after you have dragged past the
+ \l {QStyleHints::startDragDistance}{system-wide drag threshold}.
+
+ \li A WheelHandler directly adjusts the \c y property of the knob \l Image.
+
+ \li A BoundaryRule prevents either the DragHandler or the WheelHandler from
+ dragging the knob too far.
+
+ \li A TapHandler provides one more gesture than a typical \c Slider component
+ would have: you can tap on the knob.
+ \endlist
+
+ \image pointerhandlers-example-mixer.webp
+
+ \section2 Map
+
+ The "map" page demonstrates dragging, transformation and re-scaling an
+ \l {Qt SVG}{SVG} \l Image. You should be able to zoom into a particular
+ location on the map; and if the zoom level is changed substantially,
+ \l Image::sourceSize is changed to request the SVG to be re-rendered at a
+ different resolution. Dragging vertically with two fingers activates a
+ DragHandler that manipulates a \l Rotation transform to tilt the map.
+
+ \image pointerhandlers-example-map.webp
+
+ \section2 Fake Flickable
+
+ The "fake Flickable" page contains an attempt to reproduce much of the
+ functionality of \l Flickable using discrete pointer handlers and
+ animations. Flickable is a complex component, but here you can see one way
+ of separating the individual behaviors that it provides, in case you would
+ like to have only part of the functionality without the complexity.
+
+ There's also a slide-out "drawer" component holding a few more
+ pointer-handler-powered controls.
+
+ \image pointerhandlers-example-fakeflickable.jpg
+*/
diff --git a/examples/quick/pointerhandlers/fakeFlickable.qml b/examples/quick/pointerhandlers/fakeFlickable.qml
new file mode 100644
index 0000000000..ac8e8f699e
--- /dev/null
+++ b/examples/quick/pointerhandlers/fakeFlickable.qml
@@ -0,0 +1,103 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import "components"
+
+Rectangle {
+ id: root
+ color: "#444"
+ width: 480
+ height: 640
+
+ FakeFlickable {
+ id: ff
+ anchors.fill: parent
+ anchors.leftMargin: 20
+ anchors.rightMargin: rightSB.width
+
+ Text {
+ id: text
+ color: "beige"
+ font.family: "mono"
+ font.pointSize: slider.value
+ onTextChanged: console.log("text geom " + width + "x" + height +
+ ", parent " + parent + " geom " + parent.width + "x" + parent.height)
+ }
+
+ onFlickStarted: {
+ root.border.color = "green"
+ console.log("flick started with velocity " + velocity)
+ }
+ onFlickEnded: {
+ root.border.color = "transparent"
+ console.log("flick ended with velocity " + velocity)
+ }
+
+ Component.onCompleted: {
+ var request = new XMLHttpRequest()
+ request.open('GET', 'components/FakeFlickable.qml')
+ request.onreadystatechange = function(event) {
+ if (request.readyState === XMLHttpRequest.DONE)
+ text.text = request.responseText
+ }
+ request.send()
+ }
+ }
+
+ ScrollBar {
+ id: rightSB
+ objectName: "rightSB"
+ flick: ff
+ height: parent.height - width
+ anchors.right: parent.right
+ }
+
+ ScrollBar {
+ id: bottomSB
+ objectName: "bottomSB"
+ flick: ff
+ width: parent.width - height
+ anchors.bottom: parent.bottom
+ }
+
+ Rectangle {
+ id: cornerCover
+ color: "lightgray"
+ width: rightSB.width
+ height: bottomSB.height
+ anchors {
+ right: parent.right
+ bottom: parent.bottom
+ }
+ }
+
+ LeftDrawer {
+ width: buttonRow.implicitWidth + 20
+ anchors.verticalCenter: parent.verticalCenter
+ Column {
+ anchors.fill: parent
+ anchors.margins: 10
+ Slider {
+ id: slider
+ width: parent.width
+ height: parent.height - buttonRow.implicitHeight
+ label: "font\nsize"
+ maximumValue: 36
+ value: 14
+ }
+ Row {
+ id: buttonRow
+ spacing: 4
+ Button {
+ text: "⭯"
+ onTapped: ff.rotation -= 45
+ }
+ Button {
+ text: "⭮"
+ onTapped: ff.rotation += 45
+ }
+ }
+ }
+ }
+}
diff --git a/examples/quick/pointerhandlers/flingAnimation.qml b/examples/quick/pointerhandlers/flingAnimation.qml
new file mode 100644
index 0000000000..f4a72e5b5b
--- /dev/null
+++ b/examples/quick/pointerhandlers/flingAnimation.qml
@@ -0,0 +1,101 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import "components"
+
+Rectangle {
+ id: root
+ width: 640
+ height: 480
+ color: "black"
+
+ Repeater {
+ model: 2
+
+ Image {
+ id: ball
+ objectName: "ball" + index
+ source: "images/redball.png"
+ property real homeX: 200 + index * 200
+ property real homeY: 200
+ width: 80; height: 80; x: homeX; y: 200
+
+ Text {
+ anchors.centerIn: parent
+ color: "white"
+ text: momentum.velocity.x.toFixed(2) + "," + momentum.velocity.y.toFixed(2)
+ }
+
+ SequentialAnimation {
+ id: anim
+
+ function restart(vel) {
+ stop()
+ momentum.velocity = vel
+ start()
+ }
+
+ MomentumAnimation { id: momentum; target: ball }
+
+ PauseAnimation { duration: 500 }
+
+ ParallelAnimation {
+ id: ballReturn
+ NumberAnimation {
+ target: ball
+ property: "x"
+ to: homeX
+ duration: 1000
+ easing.period: 50
+ easing.type: Easing.OutElastic
+ }
+ NumberAnimation {
+ target: ball
+ property: "y"
+ to: homeY
+ duration: 1000
+ easing.type: Easing.OutElastic
+ }
+ }
+ }
+
+ DragHandler {
+ id: dragHandler
+ objectName: "dragHandler" + index
+ onActiveChanged: {
+ if (!active)
+ anim.restart(centroid.velocity)
+ }
+ }
+ Rectangle {
+ visible: dragHandler.active
+ anchors.fill: parent
+ anchors.margins: -5
+ radius: width / 2
+ opacity: 0.25
+ }
+
+ Rectangle {
+ visible: width > 0
+ width: dragHandler.centroid.velocity.length() / 10
+ height: 2
+ x: ball.width / 2
+ y: ball.height / 2
+ z: -1
+ rotation: Math.atan2(dragHandler.centroid.velocity.y, dragHandler.centroid.velocity.x) * 180 / Math.PI
+ transformOrigin: Item.BottomLeft
+ antialiasing: true
+
+ Image {
+ source: "images/arrowhead.png"
+ anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+ width: 16
+ height: 12
+ antialiasing: true
+ }
+ }
+ }
+ }
+}
diff --git a/examples/quick/pointerhandlers/images/arrowhead.png b/examples/quick/pointerhandlers/images/arrowhead.png
new file mode 100644
index 0000000000..7719bc6d6a
--- /dev/null
+++ b/examples/quick/pointerhandlers/images/arrowhead.png
Binary files differ
diff --git a/examples/quick/pointerhandlers/images/balloon.png b/examples/quick/pointerhandlers/images/balloon.png
new file mode 100644
index 0000000000..6476facc49
--- /dev/null
+++ b/examples/quick/pointerhandlers/images/balloon.png
Binary files differ
diff --git a/examples/quick/touchinteraction/multipointtouch/content/blur-circle.png b/examples/quick/pointerhandlers/images/blur-circle.png
index 1b03cd0b2c..1b03cd0b2c 100644
--- a/examples/quick/touchinteraction/multipointtouch/content/blur-circle.png
+++ b/examples/quick/pointerhandlers/images/blur-circle.png
Binary files differ
diff --git a/examples/quick/pointerhandlers/images/cursor-airbrush.png b/examples/quick/pointerhandlers/images/cursor-airbrush.png
new file mode 100644
index 0000000000..bea756ed6f
--- /dev/null
+++ b/examples/quick/pointerhandlers/images/cursor-airbrush.png
Binary files differ
diff --git a/examples/quick/pointerhandlers/images/cursor-eraser.png b/examples/quick/pointerhandlers/images/cursor-eraser.png
new file mode 100644
index 0000000000..e5488a89f2
--- /dev/null
+++ b/examples/quick/pointerhandlers/images/cursor-eraser.png
Binary files differ
diff --git a/examples/quick/pointerhandlers/images/cursor-felt-marker.png b/examples/quick/pointerhandlers/images/cursor-felt-marker.png
new file mode 100644
index 0000000000..132f09aa39
--- /dev/null
+++ b/examples/quick/pointerhandlers/images/cursor-felt-marker.png
Binary files differ
diff --git a/examples/quick/pointerhandlers/images/cursor-pencil.png b/examples/quick/pointerhandlers/images/cursor-pencil.png
new file mode 100644
index 0000000000..cc2f447d02
--- /dev/null
+++ b/examples/quick/pointerhandlers/images/cursor-pencil.png
Binary files differ
diff --git a/examples/quick/pointerhandlers/images/fighter.png b/examples/quick/pointerhandlers/images/fighter.png
new file mode 100644
index 0000000000..2acee43cba
--- /dev/null
+++ b/examples/quick/pointerhandlers/images/fighter.png
Binary files differ
diff --git a/examples/quick/pointerhandlers/images/grabbing-location.svg b/examples/quick/pointerhandlers/images/grabbing-location.svg
new file mode 100644
index 0000000000..c26881e9ba
--- /dev/null
+++ b/examples/quick/pointerhandlers/images/grabbing-location.svg
@@ -0,0 +1 @@
+<svg width="3408" height="3124"><path d="M1517 1562c0-126-93-229-208-229s-208 102-208 229c0 126 93 229 208 229s208-102 208-229zm123-172c-58-206-221-365-424-412l-270 531H380l203-223 219-241 346-380c42 14 82 32 121 54 232 128 402 375 449 671h-77zm-551-933c448 123 782 546 802 1055h1517C3386 673 2787 0 2050 0H696L0 1367h120l826-938 146 25c-1 1-2 2-3 4zm551 1277c-58 206-221 365-424 412l-270-531H380l203 223 219 241 346 380c42-14 82-32 121-54 232-128 402-375 449-671h-77zm-548 936l-146 25-826-938H0l696 1367h1354c737 0 1337-673 1358-1512H1891c-19 509-354 933-802 1055 1 1 2 2 3 4z" fill="#ee832b"/></svg>
diff --git a/examples/quick/pointerhandlers/images/joystick-outer-case-pov.jpg b/examples/quick/pointerhandlers/images/joystick-outer-case-pov.jpg
new file mode 100644
index 0000000000..01cd78fdcf
--- /dev/null
+++ b/examples/quick/pointerhandlers/images/joystick-outer-case-pov.jpg
Binary files differ
diff --git a/examples/quick/pointerhandlers/images/map.svgz b/examples/quick/pointerhandlers/images/map.svgz
new file mode 100644
index 0000000000..64d509c106
--- /dev/null
+++ b/examples/quick/pointerhandlers/images/map.svgz
Binary files differ
diff --git a/examples/quick/pointerhandlers/images/missile.png b/examples/quick/pointerhandlers/images/missile.png
new file mode 100644
index 0000000000..72c02d1fb9
--- /dev/null
+++ b/examples/quick/pointerhandlers/images/missile.png
Binary files differ
diff --git a/examples/quick/pointerhandlers/images/redball.png b/examples/quick/pointerhandlers/images/redball.png
new file mode 100644
index 0000000000..68d2e1d638
--- /dev/null
+++ b/examples/quick/pointerhandlers/images/redball.png
Binary files differ
diff --git a/examples/quick/pointerhandlers/joystick.qml b/examples/quick/pointerhandlers/joystick.qml
new file mode 100644
index 0000000000..ca939f3cdc
--- /dev/null
+++ b/examples/quick/pointerhandlers/joystick.qml
@@ -0,0 +1,50 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Item {
+ width: image.implicitWidth; height: image.implicitHeight
+ Image {
+ id: image
+ anchors.centerIn: parent
+ source: "images/joystick-outer-case-pov.jpg"
+ property real margin: 50
+
+ Image {
+ id: knob
+ source: "images/redball.png"
+ DragHandler {
+ id: dragHandler
+ xAxis {
+ minimum: image.margin
+ maximum: image.width - image.margin - knob.width
+ }
+ yAxis {
+ minimum: image.margin
+ maximum: image.height - image.margin - knob.height
+ }
+ }
+
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ verticalCenter: parent.verticalCenter
+ }
+ states: [
+ State {
+ when: dragHandler.active
+ AnchorChanges {
+ target: knob
+ anchors.horizontalCenter: undefined
+ anchors.verticalCenter: undefined
+ }
+ }
+ ]
+ transitions: [
+ Transition {
+ AnchorAnimation { easing.type: Easing.OutElastic }
+ }
+ ]
+ }
+ }
+}
diff --git a/examples/quick/pointerhandlers/main.cpp b/examples/quick/pointerhandlers/main.cpp
new file mode 100644
index 0000000000..eda5480eba
--- /dev/null
+++ b/examples/quick/pointerhandlers/main.cpp
@@ -0,0 +1,4 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+#include "../shared/shared.h"
+DECLARATIVE_EXAMPLE_MAIN(pointerhandlers/pointerhandlers)
diff --git a/examples/quick/pointerhandlers/map.qml b/examples/quick/pointerhandlers/map.qml
new file mode 100644
index 0000000000..082d9d26c3
--- /dev/null
+++ b/examples/quick/pointerhandlers/map.qml
@@ -0,0 +1,86 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Item {
+ width: 640
+ height: 480
+
+ Rectangle {
+ id: map
+ color: "aqua"
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ width: image.width
+ height: image.height
+ transform: Rotation {
+ id: tilt
+ origin.x: width / 2
+ origin.y: height / 2
+ axis { x: 1; y: 0; z: 0 }
+ angle: tiltHandler.persistentTranslation.y / -2
+ }
+
+ WheelHandler {
+ id: wheelHandler
+ objectName: "vertical mouse wheel for scaling"
+ property: "scale"
+ onWheel: function(event) {
+ console.log("rotation " + event.angleDelta + " scaled " + rotation + " @ " + point.position + " => " + map.scale)
+ }
+ }
+
+ WheelHandler {
+ id: horizontalWheelHandler
+ objectName: "horizontal mouse wheel for side-scrolling"
+ property: "x"
+ orientation: Qt.Horizontal
+ }
+
+ Image {
+ id: image
+ anchors.centerIn: parent
+ fillMode: Image.PreserveAspectFit
+ source: "images/map.svgz"
+ Component.onCompleted: { width = implicitWidth; height = implicitHeight }
+ }
+
+ Text {
+ anchors.centerIn: parent
+ text: image.sourceSize.width + " x " + image.sourceSize.height +
+ " scale " + map.scale.toFixed(2) + " active scale " + pinch.activeScale.toFixed(2)
+ }
+ }
+
+ DragHandler {
+ objectName: "single-point drag"
+ target: map
+ }
+
+ DragHandler {
+ id: tiltHandler
+ objectName: "two-point tilt"
+ minimumPointCount: 2
+ maximumPointCount: 2
+ xAxis.enabled: false
+ target: null
+ }
+
+ PinchHandler {
+ id: pinch
+ objectName: "two-point pinch"
+ target: map
+ minimumScale: 0.1
+ maximumScale: 10
+ onActiveChanged: if (!active) reRenderIfNecessary()
+ grabPermissions: PinchHandler.TakeOverForbidden // don't allow takeover if pinch has started
+ }
+
+ function reRenderIfNecessary() {
+ var newSourceWidth = image.sourceSize.width * pinch.scale
+ var ratio = newSourceWidth / image.sourceSize.width
+ if (ratio > 1.1 || ratio < 0.9)
+ image.sourceSize.width = newSourceWidth
+ }
+}
diff --git a/examples/quick/pointerhandlers/mixer.qml b/examples/quick/pointerhandlers/mixer.qml
new file mode 100644
index 0000000000..f88a1d50b9
--- /dev/null
+++ b/examples/quick/pointerhandlers/mixer.qml
@@ -0,0 +1,34 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import "components"
+
+Rectangle {
+ id: root
+ width: 1280
+ height: 960
+ objectName: "root"
+ color: "#222222"
+
+ ListView {
+ id: list
+ objectName: "listView"
+ anchors.fill: parent
+ anchors.margins: 10
+ orientation: Qt.Horizontal
+
+ model: 20
+
+ delegate: Item {
+ objectName: "delegateItem" + index
+ width: 154
+ height: list.height
+
+ Slider {
+ anchors.fill: parent
+ label: "Channel " + (index + 1)
+ }
+ }
+ }
+}
diff --git a/examples/quick/pointerhandlers/multibuttons.qml b/examples/quick/pointerhandlers/multibuttons.qml
new file mode 100644
index 0000000000..29657f10ea
--- /dev/null
+++ b/examples/quick/pointerhandlers/multibuttons.qml
@@ -0,0 +1,72 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+import QtQuick.Layouts
+import "components"
+
+Item {
+ width: 800
+ height: 800
+ ColumnLayout {
+ anchors.right: parent.right
+ anchors.margins: 20
+ spacing: 20
+ Text { text: "protagonist"; font.pointSize: 12; font.weight: Font.Bold; bottomPadding: -10 }
+ Button {
+ id: balloonsButton
+ text: "Launch Balloons"
+ Layout.fillWidth: true
+ gesturePolicy: TapHandler.WithinBounds
+ Text {
+ anchors { top: parent.bottom; horizontalCenter: parent.horizontalCenter }
+ text: "gesturePolicy: WithinBounds"
+ }
+ }
+ Text { text: "the goons"; font.pointSize: 12; font.weight: Font.Bold; bottomPadding: -10 }
+ Button {
+ id: missilesButton
+ text: "Launch Missile"
+ Layout.fillWidth: true
+ gesturePolicy: TapHandler.ReleaseWithinBounds
+ exclusiveSignals: TapHandler.SingleTap
+ onTapped: missileEmitter.burst(1)
+ Text {
+ anchors { top: parent.bottom; horizontalCenter: parent.horizontalCenter }
+ text: "gesturePolicy: ReleaseWithinBounds"
+ }
+ }
+ Button {
+ id: fightersButton
+ text: "Launch Fighters"
+ Layout.fillWidth: true
+ gesturePolicy: TapHandler.DragThreshold
+ Text {
+ anchors { top: parent.bottom; horizontalCenter: parent.horizontalCenter }
+ text: "gesturePolicy: DragThreshold"
+ }
+ }
+ }
+ ParticleSystem {
+ anchors.bottom: parent.bottom
+ anchors.left: parent.left
+ anchors.leftMargin: 150
+ ImageParticle { source: "images/balloon.png" }
+ Emitter { anchors.bottom: parent.bottom; enabled: balloonsButton.pressed; lifeSpan: 5000; size: 64
+ maximumEmitted: 99
+ emitRate: 50; velocity: PointDirection { x: 10; y: -150; yVariation: 30; xVariation: 50 } } }
+ ParticleSystem {
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.right: parent.right
+ ImageParticle { source: "images/fighter.png" }
+ Emitter { anchors.bottom: parent.bottom; enabled: fightersButton.pressed; lifeSpan: 15000; size: 204
+ emitRate: 3; velocity: PointDirection { x: -1000; y: -250; yVariation: 150; xVariation: 50 } } }
+ ParticleSystem {
+ anchors.bottom: parent.bottom
+ anchors.right: parent.right
+ anchors.rightMargin: 100
+ ImageParticle { source: "images/missile.png"; autoRotation: true; rotation: 90 }
+ Emitter { id: missileEmitter; anchors.bottom: parent.bottom; lifeSpan: 5000; size: 128;
+ emitRate: 0; velocity: PointDirection { x: -200; y: -350; yVariation: 200; xVariation: 100 } } }
+}
diff --git a/examples/quick/pointerhandlers/multiflame.qml b/examples/quick/pointerhandlers/multiflame.qml
new file mode 100644
index 0000000000..7793e52ad6
--- /dev/null
+++ b/examples/quick/pointerhandlers/multiflame.qml
@@ -0,0 +1,69 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+Rectangle {
+ id: root
+ width: 360
+ height: 480
+ color: "black"
+
+ component ColoredEmitter: Emitter {
+ id: emitter
+ property string color
+ group: color
+ velocityFromMovement: 10
+ emitRate: 80
+ lifeSpan: 1500
+ velocity: PointDirection {
+ y: -90
+ yVariation: 50
+ }
+ acceleration: PointDirection {
+ xVariation: 100
+ yVariation: 90
+ }
+ size: 51
+ sizeVariation: 53
+ endSize: 64
+ enabled: handler.active
+ x: handler.point.position.x
+ y: handler.point.position.y
+
+ PointHandler {
+ id: handler
+ parent: root
+ }
+
+ ImageParticle {
+ id: img
+ groups: [emitter.color]
+ source: "images/blur-circle.png"
+ colorVariation: 0.1
+ color: emitter.color
+ alpha: 0
+ system: sys
+ }
+ }
+
+ ParticleSystem {
+ id: sys
+ ColoredEmitter {
+ color: "indianred"
+ }
+ ColoredEmitter {
+ color: "greenyellow"
+ }
+ ColoredEmitter {
+ color: "yellow"
+ }
+ ColoredEmitter {
+ color: "darkorange"
+ }
+ ColoredEmitter {
+ color: "violet"
+ }
+ }
+}
diff --git a/examples/quick/pointerhandlers/pieMenu.qml b/examples/quick/pointerhandlers/pieMenu.qml
new file mode 100644
index 0000000000..d0feb2e825
--- /dev/null
+++ b/examples/quick/pointerhandlers/pieMenu.qml
@@ -0,0 +1,30 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import "components"
+
+Item {
+ width: 800
+ height: 480
+
+ Rectangle {
+ id: rect
+ anchors.fill: parent; anchors.margins: 40
+ color: pieMenu.active ? "lightgrey" : "darkgrey"
+
+ QuadPieMenu {
+ id: pieMenu
+ labels: [ "whiz", "bang", "fizz", "buzz" ]
+ onTriggered: (text)=> feedback.text = "selected **" + text + "**"
+ onCanceled: feedback.text = "canceled"
+ }
+
+ Text {
+ id: feedback
+ x: 6; y: 6
+ textFormat: Text.MarkdownText
+ text: "hold for context menu"
+ }
+ }
+}
diff --git a/examples/quick/pointerhandlers/pinchHandler.qml b/examples/quick/pointerhandlers/pinchHandler.qml
new file mode 100644
index 0000000000..016bb0c00c
--- /dev/null
+++ b/examples/quick/pointerhandlers/pinchHandler.qml
@@ -0,0 +1,194 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import "components"
+
+Rectangle {
+ width: 1024; height: 600
+ color: "#eee"
+
+ function getTransformationDetails(item, pinchhandler) {
+ return "\n\npinch.scale:" + pinchhandler.scale.toFixed(2)
+ + "\npinch.rotation:" + pinchhandler.rotation.toFixed(2)
+ + "\npinch.translation:" + "(" + pinchhandler.translation.x.toFixed(2) + "," + pinchhandler.translation.y.toFixed(2) + ")"
+ + "\nrect.scale: " + item.scale.toFixed(2)
+ + "\nrect.rotation: " + item.rotation.toFixed(2)
+ + "\nrect.position: " + "(" + item.x.toFixed(2) + "," + item.y.toFixed(2) + ")"
+ }
+
+ function activePincher() {
+ if (grandparentPinch.active)
+ return grandparentPinch
+ else if (parentPinch.active)
+ return parentPinch
+ else if (pinch2.active)
+ return pinch2
+ return pinch3 // always return a pinch handler, even when its inactive. The indicator will be invisble anyway.
+ }
+
+ Rectangle {
+ width: parent.width - 100; height: parent.height - 100; x: 50; y: 50
+ color: "beige"
+ border.width: grandparentPinch.active ? 2 : 0
+ border.color: border.width > 0 ? "red" : "transparent"
+ antialiasing: true
+
+ PinchHandler {
+ id: grandparentPinch
+ objectName: "grandparent pinch"
+ minimumScale: 0.5
+ maximumScale: 3
+ minimumPointCount: 3
+ maximumPointCount: 6 // mutants are allowed; using both hands is not normal for a pinch gesture, but we can't tell
+ }
+
+ Text {
+ text: "Pinch with 3 or more fingers to scale, rotate and translate"
+ + getTransformationDetails(parent, grandparentPinch)
+ }
+
+ Rectangle {
+ width: parent.width - 100; height: parent.height - 100; x: 50; y: 50
+ color: "#ffe0e0e0"
+ antialiasing: true
+
+ PinchHandler {
+ id: parentPinch
+ objectName: "parent pinch"
+ minimumScale: 0.5
+ maximumScale: 3
+ }
+
+ Text {
+ text: "Pinch with 2 fingers to scale, rotate and translate"
+ + getTransformationDetails(parent, parentPinch)
+ }
+
+ Rectangle {
+ id: rect2
+ width: 400
+ height: 300
+ color: "lightsteelblue"
+ antialiasing: true
+ x: 100
+ y: 200
+ rotation: 30
+ transformOrigin: Item.TopRight
+ border.width: (lsbDragHandler.active || pinch2.active) ? 2 : 0
+ border.color: border.width > 0 ? "red" : "transparent"
+
+ Text {
+ anchors.centerIn: parent
+ text: "Pinch with 2 fingers to scale, rotate and translate\nDrag with 1 finger"
+ + getTransformationDetails(rect2, pinch2) + "\nz " + rect2.z
+ }
+ DragHandler {
+ id: lsbDragHandler
+ objectName: "lightsteelblue drag"
+ }
+ PinchHandler {
+ id: pinch2
+ objectName: "lightsteelblue pinch"
+ minimumRotation: -45
+ maximumRotation: 45
+ minimumScale: 0.5
+ maximumScale: 3
+ xAxis.minimum: 0
+ xAxis.maximum: 600
+ // acceptedModifiers: Qt.ControlModifier
+ }
+ TapHandler { gesturePolicy: TapHandler.DragThreshold; onTapped: rect2.z = rect3.z + 1 }
+ }
+
+ Rectangle {
+ id: rect3
+ x: 500
+ width: 400
+ height: 300
+ color: "wheat"
+ antialiasing: true
+ border.width: (wheatDragHandler.active || pinch3.active) ? 2 : 0
+ border.color: border.width > 0 ? "red" : "transparent"
+
+ Text {
+ anchors.centerIn: parent
+ text: "Pinch with 3 fingers to scale, rotate and translate\nDrag with 1 finger"
+ + getTransformationDetails(rect3, pinch3) + "\nz " + rect3.z
+ }
+ DragHandler {
+ id: wheatDragHandler
+ objectName: "wheat drag"
+ }
+ PinchHandler {
+ id: pinch3
+ objectName: "wheat 3-finger pinch"
+ minimumPointCount: 3
+ minimumScale: 0.1
+ maximumScale: 10
+ onActiveChanged: {
+ if (!active)
+ anim.restart(centroid.velocity)
+ }
+ onGrabChanged: function (transition, point) {
+ if (transition === 0x10) { // GrabExclusive
+ console.log(point.id, "grabbed @", point.position)
+ Qt.createQmlObject("import QtQuick; Rectangle { opacity: 0.5; border.color: 'red'; radius: 8; width: radius * 2; height: radius * 2; " +
+ "x: " + (point.position.x - 8) + "; y: " + (point.position.y - 8) + "}",
+ rect3, "touchpoint" + point.id);
+ }
+ }
+ }
+ TapHandler { gesturePolicy: TapHandler.DragThreshold; onTapped: rect3.z = rect2.z + 1 }
+ MomentumAnimation { id: anim; target: rect3 }
+ }
+
+ Rectangle {
+ id: rect4
+ x: 400
+ y: 250
+ width: 300
+ height: 220
+ color: "#609cbc3d"
+ radius: 10
+ antialiasing: true
+ border {
+ width: 5
+ color: "maroon"
+ }
+ PinchHandler {
+ id: pinch4
+ target: null
+ xAxis.onActiveValueChanged: (delta) => rect4.width = Math.min(500, Math.max(120, 15 * Math.round((rect4.width + delta) / 15)))
+ yAxis.onActiveValueChanged: (delta) => rect4.opacity = Math.max(0.1, Math.min(0.9, rect4.opacity - delta / 200))
+ rotationAxis.onActiveValueChanged: (delta) => rect4.radius = Math.max(0, Math.min(60, rect4.radius + delta))
+ scaleAxis.onActiveValueChanged: (delta) => rect4.border.width *= delta
+ }
+ Text {
+ anchors.fill: parent
+ anchors.margins: rect4.radius / Math.PI + rect4.border.width
+ text: "Pinch with 2 fingers to tweak various properties"
+ wrapMode: Text.WordWrap
+ }
+ Text {
+ anchors.top: rect4.bottom
+ anchors.left: rect4.left
+ text: "opacity " + rect4.opacity.toFixed(3) + " width " + rect4.width +
+ " border " + rect4.border.width.toFixed(1) + " radius " + rect4.radius.toFixed(1)
+ }
+ }
+ }
+ }
+ Rectangle {
+ id: centroidIndicator
+ property QtObject pincher: activePincher()
+ x: pincher.centroid.scenePosition.x - radius
+ y: pincher.centroid.scenePosition.y - radius
+ z: 1
+ visible: pincher.active
+ radius: width / 2
+ width: 10
+ height: width
+ color: "red"
+ }
+}
diff --git a/examples/quick/threading/threading.pro b/examples/quick/pointerhandlers/pointerhandlers.pro
index cd9ed25e0c..ae557f778a 100644
--- a/examples/quick/threading/threading.pro
+++ b/examples/quick/pointerhandlers/pointerhandlers.pro
@@ -3,8 +3,8 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
RESOURCES += \
- threading.qrc \
+ qml.qrc \
../shared/shared.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/threading
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/pointerhandlers
INSTALLS += target
diff --git a/examples/quick/pointerhandlers/pointerhandlers.qml b/examples/quick/pointerhandlers/pointerhandlers.qml
new file mode 100644
index 0000000000..049182fa8a
--- /dev/null
+++ b/examples/quick/pointerhandlers/pointerhandlers.qml
@@ -0,0 +1,48 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Layouts
+import shared as Examples
+import "components"
+
+Rectangle {
+ id: window
+ width: 800
+ height: 800
+ visible: true
+ Examples.LauncherList {
+ id: ll
+ objectName: "LauncherList"
+ anchors.fill: parent
+ Component.onCompleted: {
+ addExample("tap", "TapHandler: device-agnostic tap/click detection for buttons", Qt.resolvedUrl("tapHandler.qml"))
+ addExample("multibuttons", "TapHandler: gesturePolicy (99 red balloons)", Qt.resolvedUrl("multibuttons.qml"))
+ addExample("pieMenu", "TapHandler: pie menu", Qt.resolvedUrl("pieMenu.qml"))
+ addExample("single point handler", "PointHandler: properties such as seat, device, modifiers, velocity, pressure", Qt.resolvedUrl("singlePointHandlerProperties.qml"))
+ addExample("multiflame", "PointHandler: particle flames around touchpoints", Qt.resolvedUrl("multiflame.qml"))
+ addExample("hover sidebar", "HoverHandler: a hierarchy of items sharing the hover state", Qt.resolvedUrl("sidebar.qml"))
+ addExample("joystick", "DragHandler: move one item inside another with any pointing device", Qt.resolvedUrl("joystick.qml"))
+ addExample("mixer", "DragHandler: drag multiple sliders with multiple fingers", Qt.resolvedUrl("mixer.qml"))
+ addExample("fling animation", "DragHandler: after dragging, use an animation to simulate momentum", Qt.resolvedUrl("flingAnimation.qml"))
+ addExample("pinch", "PinchHandler: scale, rotate and drag", Qt.resolvedUrl("pinchHandler.qml"))
+ addExample("map", "scale, pan, re-render at different resolutions", Qt.resolvedUrl("map.qml"))
+ addExample("corkboards", "editable, movable sticky notes in a ListView", Qt.resolvedUrl("corkboards.qml"))
+ addExample("fake Flickable", "implementation of a simplified Flickable using only Items, DragHandler and MomentumAnimation", Qt.resolvedUrl("fakeFlickable.qml"))
+ addExample("tablet canvas", "PointHandler and HoverHandler with a tablet: detect the stylus, and draw", Qt.resolvedUrl("tabletCanvasDrawing.qml"))
+ }
+ }
+ Item {
+ id: glassPane
+ objectName: "glassPane"
+ z: 10000
+ anchors.fill: parent
+
+ Instantiator {
+ model: 10
+ delegate: TouchpointFeedbackSprite { parent: glassPane }
+ }
+ }
+
+ MouseFeedbackSprite { }
+}
diff --git a/examples/quick/pointerhandlers/qml.qrc b/examples/quick/pointerhandlers/qml.qrc
new file mode 100644
index 0000000000..237eb8eae0
--- /dev/null
+++ b/examples/quick/pointerhandlers/qml.qrc
@@ -0,0 +1,55 @@
+<RCC>
+ <qresource prefix="/qt/qml/pointerhandlers">
+ <file>corkboards.qml</file>
+ <file>flingAnimation.qml</file>
+ <file>fakeFlickable.qml</file>
+ <file>joystick.qml</file>
+ <file>map.qml</file>
+ <file>mixer.qml</file>
+ <file>multibuttons.qml</file>
+ <file>multiflame.qml</file>
+ <file>pieMenu.qml</file>
+ <file>pinchHandler.qml</file>
+ <file>pointerhandlers.qml</file>
+ <file>singlePointHandlerProperties.qml</file>
+ <file>sidebar.qml</file>
+ <file>tabletCanvasDrawing.qml</file>
+ <file>tapHandler.qml</file>
+ <file>components/Button.qml</file>
+ <file>components/CheckBox.qml</file>
+ <file>components/CorkPanel.qml</file>
+ <file>components/FakeFlickable.qml</file>
+ <file>components/FlashAnimation.qml</file>
+ <file>components/LeftDrawer.qml</file>
+ <file>components/MomentumAnimation.qml</file>
+ <file>components/MouseFeedbackSprite.qml</file>
+ <file>components/QuadPieMenu.qml</file>
+ <file>components/ScrollBar.qml</file>
+ <file>components/Slider.qml</file>
+ <file>components/TouchpointFeedbackSprite.qml</file>
+ <file>images/arrowhead.png</file>
+ <file>images/balloon.png</file>
+ <file>components/images/checkmark.png</file>
+ <file>components/images/cork.jpg</file>
+ <file>components/images/note-yellow.png</file>
+ <file>components/images/tack.png</file>
+ <file>images/blur-circle.png</file>
+ <file>images/cursor-airbrush.png</file>
+ <file>images/cursor-eraser.png</file>
+ <file>images/cursor-felt-marker.png</file>
+ <file>images/cursor-pencil.png</file>
+ <file>images/fighter.png</file>
+ <file>components/images/fingersprite.png</file>
+ <file>images/grabbing-location.svg</file>
+ <file>images/joystick-outer-case-pov.jpg</file>
+ <file>images/map.svgz</file>
+ <file>images/missile.png</file>
+ <file>components/images/mixer-knob.png</file>
+ <file>components/images/mouse.png</file>
+ <file>components/images/mouse_left.png</file>
+ <file>components/images/mouse_middle.png</file>
+ <file>components/images/mouse_right.png</file>
+ <file>components/images/mouse_wheel_ridges.png</file>
+ <file>images/redball.png</file>
+ </qresource>
+</RCC>
diff --git a/examples/quick/pointerhandlers/sidebar.qml b/examples/quick/pointerhandlers/sidebar.qml
new file mode 100644
index 0000000000..55857cf733
--- /dev/null
+++ b/examples/quick/pointerhandlers/sidebar.qml
@@ -0,0 +1,184 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import "components"
+
+Rectangle {
+ id: root
+ width: 640
+ height: 480
+ color: rootHover.hovered ? "#555" : "#444"
+
+ component ButtonsAndStuff: Column {
+ anchors.fill: parent
+ anchors.margins: 8
+ spacing: 8
+
+ CheckBox {
+ id: hoverBlockingCB
+ text: "Button hover is blocking"
+ }
+
+ Rectangle {
+ objectName: "buttonWithMA"
+ width: parent.width
+ height: 30
+ color: buttonMA.pressed ? "lightsteelblue" : "#999"
+ border.color: buttonMA.containsMouse ? "cyan" : "transparent"
+
+ MouseArea {
+ id: buttonMA
+ objectName: "buttonMA"
+ hoverEnabled: true
+ cursorShape: Qt.UpArrowCursor
+ anchors.fill: parent
+ onClicked: console.log("clicked MA")
+ }
+
+ Text {
+ anchors.centerIn: parent
+ text: "MouseArea"
+ }
+ }
+
+ Rectangle {
+ objectName: "buttonWithHH"
+ width: parent.width
+ height: 30
+ color: flash ? "#999" : "white"
+ border.color: buttonHH.hovered ? "cyan" : "transparent"
+ property bool flash: true
+
+ HoverHandler {
+ id: buttonHH
+ objectName: "buttonHH"
+ acceptedDevices: PointerDevice.AllDevices
+ blocking: hoverBlockingCB.checked
+ cursorShape: tapHandler.pressed ? Qt.BusyCursor : Qt.PointingHandCursor
+ }
+
+ TapHandler {
+ id: tapHandler
+ onTapped: tapFlash.start()
+ }
+
+ Text {
+ anchors.centerIn: parent
+ text: "HoverHandler"
+ }
+
+ FlashAnimation on flash {
+ id: tapFlash
+ }
+ }
+ }
+
+ Rectangle {
+ id: paddle
+ width: 100
+ height: 40
+ color: paddleHH.hovered ? "indianred" : "#888"
+ y: parent.height - 100
+ radius: 10
+
+ HoverHandler {
+ id: paddleHH
+ objectName: "paddleHH"
+ }
+
+ SequentialAnimation on x {
+ NumberAnimation {
+ to: root.width - paddle.width
+ duration: 2000
+ easing { type: Easing.InOutQuad }
+ }
+ PauseAnimation { duration: 100 }
+ NumberAnimation {
+ to: 0
+ duration: 2000
+ easing { type: Easing.InOutQuad }
+ }
+ PauseAnimation { duration: 100 }
+ loops: Animation.Infinite
+ }
+ }
+
+ Rectangle {
+ objectName: "topSidebar"
+ radius: 5
+ antialiasing: true
+ x: -10
+ y: -radius
+ width: 200
+ height: 200
+ border.color: topSidebarHH.hovered ? "cyan" : "black"
+ color: "#777"
+
+ Rectangle {
+ color: "cyan"
+ width: 10
+ height: width
+ radius: width / 2
+ visible: topSidebarHH.hovered
+ x: topSidebarHH.point.position.x - width / 2
+ y: topSidebarHH.point.position.y - height / 2
+ z: 100
+ }
+
+ HoverHandler {
+ id: topSidebarHH
+ objectName: "topSidebarHH"
+ cursorShape: Qt.OpenHandCursor
+ }
+
+ ButtonsAndStuff {
+ anchors.fill: parent
+ }
+
+ Text {
+ anchors { left: parent.left; bottom: parent.bottom; margins: 12 }
+ text: "Hover Handler"
+ }
+ }
+
+ Rectangle {
+ objectName: "bottomSidebar"
+ radius: 5
+ antialiasing: true
+ x: -10
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: -radius
+ width: 200
+ height: 200
+ border.color: bottomSidebarMA.containsMouse ? "cyan" : "black"
+ color: "#777"
+
+ MouseArea {
+ id: bottomSidebarMA
+ objectName: "bottomSidebarMA"
+ hoverEnabled: true
+ cursorShape: Qt.ClosedHandCursor
+ anchors.fill: parent
+
+ ButtonsAndStuff {
+ anchors.fill: parent
+ }
+ }
+
+ Text {
+ anchors { left: parent.left; bottom: parent.bottom; margins: 12 }
+ text: "MouseArea"
+ }
+ }
+
+ HoverHandler {
+ id: rootHover
+ }
+
+ Text {
+ anchors.right: parent.right
+ color: "cyan"
+ text: "scene " + rootHover.point.scenePosition.x.toFixed(1) + ", " + rootHover.point.scenePosition.y.toFixed(1)
+ }
+}
diff --git a/examples/quick/pointerhandlers/singlePointHandlerProperties.qml b/examples/quick/pointerhandlers/singlePointHandlerProperties.qml
new file mode 100644
index 0000000000..74dbac4b98
--- /dev/null
+++ b/examples/quick/pointerhandlers/singlePointHandlerProperties.qml
@@ -0,0 +1,139 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Rectangle {
+ id: root
+ width: 480
+ height: 480
+ color: "black"
+
+ Item {
+ id: crosshairs
+ x: pointHandler.point.position.x - width / 2
+ y: pointHandler.point.position.y - height / 2
+ width: parent.width / 2; height: parent.height / 2
+ visible: pointHandler.active
+ rotation: pointHandler.point.rotation
+
+ Rectangle {
+ color: "goldenrod"
+ anchors.centerIn: parent
+ width: 2; height: parent.height
+ antialiasing: true
+ }
+ Rectangle {
+ color: "goldenrod"
+ anchors.centerIn: parent
+ width: parent.width; height: 2
+ antialiasing: true
+ }
+ Rectangle {
+ color: "goldenrod"
+ width: Math.max(2, 50 * pointHandler.point.pressure)
+ height: width
+ radius: width / 2
+ anchors.centerIn: parent
+ antialiasing: true
+ Rectangle {
+ y: -56
+ anchors.horizontalCenter: parent.horizontalCenter
+ color: "lightsteelblue"
+ implicitWidth: label.implicitWidth
+ implicitHeight: label.implicitHeight
+ Text {
+ id: label
+ text: 'seat: ' + pointHandler.point.device.seatName + '\ndevice: ' + pointHandler.point.device.name +
+ '\nid: ' + pointHandler.point.id.toString(16) + " uid: " + pointHandler.point.uniqueId.numericId +
+ '\npos: (' + pointHandler.point.position.x.toFixed(2) + ', ' + pointHandler.point.position.y.toFixed(2) + ')' +
+ '\nmodifiers: ' + pointHandler.point.modifiers.toString(16)
+ }
+ }
+ }
+ Rectangle {
+ color: "transparent"
+ border.color: "white"
+ antialiasing: true
+ width: pointHandler.point.ellipseDiameters.width
+ height: pointHandler.point.ellipseDiameters.height
+ radius: Math.min(width / 2, height / 2)
+ anchors.centerIn: parent
+ }
+ }
+ Rectangle {
+ id: velocityVector
+ visible: width > 0
+ width: pointHandler.point.velocity.length() / 10
+ height: 2
+ x: pointHandler.point.position.x
+ y: pointHandler.point.position.y
+ rotation: Math.atan2(pointHandler.point.velocity.y, pointHandler.point.velocity.x) * 180 / Math.PI
+ transformOrigin: Item.BottomLeft
+ antialiasing: true
+
+ Image {
+ source: "images/arrowhead.png"
+ anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+ width: 16
+ height: 12
+ antialiasing: true
+ }
+ }
+
+ Component {
+ id: grabbingLocationIndicator
+ Image {
+ source: "components/images/grabbing-location.svg"
+ sourceSize.width: 32
+ sourceSize.height: 32
+ }
+ }
+
+ Component {
+ id: mouseButtonIndicator
+ Image {
+ property int buttons
+ source: "components/images/mouse.png"
+ Image {
+ source: "components/images/mouse_left.png"
+ visible: buttons & Qt.LeftButton
+ }
+ Image {
+ source: "components/images/mouse_middle.png"
+ visible: buttons & Qt.MiddleButton
+ }
+ Image {
+ source: "components/images/mouse_right.png"
+ visible: buttons & Qt.RightButton
+ }
+ }
+ }
+
+ PointHandler {
+ id: pointHandler
+ target: null
+ acceptedButtons: Qt.AllButtons
+ onGrabChanged: function(transition, point) {
+ if (active) {
+ console.log("grabbed " + point.pointId + " @ " + point.sceneGrabPos)
+ grabbingLocationIndicator.createObject(root, {"x": point.sceneGrabPosition.x, "y": point.sceneGrabPosition.y - 16})
+ }
+ }
+ onPointChanged: {
+ if (point.pressedButtons)
+ mouseButtonIndicator.createObject(root, {"x": point.pressPosition.x - 44, "y": point.pressPosition.y - 64, "buttons": point.pressedButtons})
+ }
+ }
+
+ Text {
+ color: "white"
+ text: "drag to see feedback"
+ anchors {
+ bottom: parent.bottom
+ horizontalCenter: parent.horizontalCenter
+ margins: 6
+ }
+ }
+}
diff --git a/examples/quick/pointerhandlers/tabletCanvasDrawing.qml b/examples/quick/pointerhandlers/tabletCanvasDrawing.qml
new file mode 100644
index 0000000000..10435b0c1d
--- /dev/null
+++ b/examples/quick/pointerhandlers/tabletCanvasDrawing.qml
@@ -0,0 +1,204 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Layouts
+import "components"
+
+Rectangle {
+ width: 1024
+ height: 1024
+ color: "#444"
+
+ ColumnLayout {
+ x: -15; width: 80
+ height: parent.height
+ Slider {
+ id: hueSlider
+ width: 80; height: 200
+ Layout.fillHeight: true
+ label: "hue"
+ Rectangle {
+ color: "beige"
+ width: 30
+ height: 25
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 2
+ anchors.horizontalCenter: parent.horizontalCenter
+ Rectangle {
+ border.color: "white"
+ color: canvas.drawingColor
+ anchors.fill: parent
+ }
+ }
+ }
+ Slider {
+ id: saturationSlider
+ width: 80; height: 200
+ Layout.fillHeight: true
+ label: "sat"
+ }
+ Slider {
+ id: lightnessSlider
+ width: 80; height: 200
+ Layout.fillHeight: true
+ label: "light"
+ }
+ }
+
+ ColumnLayout {
+ x: parent.width - 65; width: 80
+ height: parent.height
+ Slider {
+ id: widthSlider
+ width: 80; height: 200
+ Layout.fillHeight: true
+ label: "width"
+ }
+ Slider {
+ id: alphaSlider
+ width: 80; height: 200
+ Layout.fillHeight: true
+ label: "alpha"
+ }
+ }
+
+ Rectangle {
+ id: rect
+ width: 640
+ height: 480
+ color: "beige"
+ anchors {
+ fill: parent
+ margins: 10
+ leftMargin: 50
+ rightMargin: 50
+ }
+
+ Canvas {
+ id: canvas
+ anchors.fill: parent
+ antialiasing: true
+ renderTarget: Canvas.FramebufferObject
+ property color drawingColor: Qt.hsla(hueSlider.value / 100.0,
+ saturationSlider.value / 100.0,
+ lightnessSlider.value / 100.0,
+ alphaSlider.value / 100.0)
+ property var points: []
+ property var pressures: []
+ property var pointerType: PointerDevice.Pen
+ onPaint: {
+ if (points.length < 2)
+ return
+ var ctx = canvas.getContext('2d');
+ ctx.save()
+ ctx.strokeStyle = pointerType === PointerDevice.Pen ? drawingColor : "beige"
+ ctx.lineCap = "round"
+ if (pressures.length === points.length) {
+ for (var i = 1; i < points.length; i++) {
+ ctx.lineWidth = pressures[i] * widthSlider.value
+ ctx.beginPath()
+ ctx.moveTo(points[i - 1].x, points[i - 1].y)
+ ctx.lineTo(points[i].x, points[i].y)
+ ctx.stroke()
+ }
+ points = points.slice(points.length - 2, 1)
+ pressures = pressures.slice(pressures.length - 2, 1)
+ } else {
+ ctx.beginPath()
+ ctx.moveTo(points[0].x, points[0].y)
+ for (var i = 1; i < points.length; i++)
+ ctx.lineTo(points[i].x, points[i].y)
+ ctx.lineWidth = widthSlider
+ ctx.stroke()
+ points = points.slice(points.length - 2, 1)
+ pressures = []
+ }
+ ctx.restore()
+ }
+ }
+
+ Text {
+ text: "draw with a drawing-tablet stylus"
+ anchors {
+ bottom: parent.bottom
+ horizontalCenter: parent.horizontalCenter
+ margins: 6
+ }
+ }
+
+ PointHandler {
+ acceptedPointerTypes: PointerDevice.Pen
+ onActiveChanged:
+ if (active) {
+ canvas.pointerType = PointerDevice.Pen
+ } else {
+ canvas.points = []
+ canvas.pressures = []
+ }
+ onPointChanged:
+ if (active) {
+ canvas.points.push(point.position)
+ canvas.pressures.push(point.pressure)
+ canvas.requestPaint()
+ }
+ }
+
+ PointHandler {
+ acceptedPointerTypes: PointerDevice.Eraser
+ onActiveChanged:
+ if (active) {
+ canvas.pointerType = PointerDevice.Eraser
+ } else {
+ canvas.points = []
+ canvas.pressures = []
+ }
+ onPointChanged:
+ if (active) {
+ canvas.points.push(point.position)
+ canvas.pressures.push(point.pressure)
+ canvas.requestPaint()
+ }
+ }
+
+ HoverHandler {
+ id: stylusHandler
+ acceptedDevices: PointerDevice.Stylus
+ acceptedPointerTypes: PointerDevice.Pen
+ target: Image {
+ parent: rect
+ source: stylusHandler.point.rotation === 0 ?
+ "images/cursor-pencil.png" : "images/cursor-felt-marker.png"
+ visible: stylusHandler.hovered
+ rotation: stylusHandler.point.rotation
+ x: stylusHandler.point.position.x
+ y: stylusHandler.point.position.y
+ }
+ }
+
+ HoverHandler {
+ id: airbrushHandler
+ acceptedDevices: PointerDevice.Airbrush
+ acceptedPointerTypes: PointerDevice.Pen
+ target: Image {
+ parent: rect
+ source: "images/cursor-airbrush.png"
+ visible: airbrushHandler.hovered
+ x: airbrushHandler.point.position.x
+ y: airbrushHandler.point.position.y
+ }
+ }
+
+ HoverHandler {
+ id: eraserHandler
+ acceptedPointerTypes: PointerDevice.Eraser
+ target: Image {
+ parent: rect
+ source: "images/cursor-eraser.png"
+ visible: eraserHandler.hovered
+ x: eraserHandler.point.position.x
+ y: eraserHandler.point.position.y - 32
+ }
+ }
+ }
+}
diff --git a/examples/quick/pointerhandlers/tapHandler.qml b/examples/quick/pointerhandlers/tapHandler.qml
new file mode 100644
index 0000000000..5891491695
--- /dev/null
+++ b/examples/quick/pointerhandlers/tapHandler.qml
@@ -0,0 +1,213 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Layouts
+import "components"
+
+Item {
+ width: 1024
+ height: 480
+
+ Rectangle {
+ id: rect
+ anchors.fill: parent; anchors.margins: 40; anchors.topMargin: 60
+ border.width: 4; border.color: "transparent"
+ color: handler.pressed ? "lightsteelblue" : "aliceblue"
+
+ TapHandler {
+ id: handler
+ acceptedButtons: (leftAllowedCB.checked ? Qt.LeftButton : Qt.NoButton) |
+ (middleAllowedCB.checked ? Qt.MiddleButton : Qt.NoButton) |
+ (rightAllowedCB.checked ? Qt.RightButton : Qt.NoButton)
+ exclusiveSignals: (singleExclusiveCB.checked ? TapHandler.SingleTap : TapHandler.NotExclusive) |
+ (doubleExclusiveCB.checked ? TapHandler.DoubleTap : TapHandler.NotExclusive)
+ gesturePolicy: (policyDragThresholdCB.checked ? TapHandler.DragThreshold :
+ policyWithinBoundsCB.checked ? TapHandler.WithinBounds :
+ policyDragWithinBoundsCB.checked ? TapHandler.DragWithinBounds :
+ TapHandler.ReleaseWithinBounds)
+
+ onCanceled: function(point) {
+ console.log("canceled @ " + point.position)
+ borderBlink.blinkColor = "red"
+ borderBlink.start()
+ }
+ onSingleTapped: function(point, button) {
+ console.log("single-tapped button " + button + " @ " + point.scenePosition)
+ rect.border.width = 4
+ borderBlink.tapFeedback(button)
+ }
+ onDoubleTapped: function(point, button) {
+ console.log("double-tapped button " + button + " @ " + point.scenePosition)
+ rect.border.width = 12
+ borderBlink.tapFeedback(button)
+ }
+ onTapped: function(point, button) {
+ console.log("tapped button " + button + " @ " + point.scenePosition +
+ " on device '" + point.device.name + "' with modifiers " + handler.point.modifiers +
+ " " + (tapCount > 1 ? (tapCount + " times") : "for the first time"))
+ if (tapCount > 1) {
+ tapCountLabel.text = tapCount
+ flashAnimation.start()
+ }
+ }
+ onLongPressed: longPressFeedback.createObject(rect,
+ {"x": point.position.x, "y": point.position.y,
+ "text": "long press after\n" + handler.timeHeld.toFixed(3) + " sec",
+ "color": buttonToBlinkColor(point.pressedButtons)})
+ }
+
+ Text {
+ id: tapCountLabel
+ anchors.centerIn: parent
+ font.pixelSize: 72
+ font.weight: Font.Black
+ SequentialAnimation {
+ id: flashAnimation
+ PropertyAction { target: tapCountLabel; property: "visible"; value: true }
+ PropertyAction { target: tapCountLabel; property: "opacity"; value: 1.0 }
+ PropertyAction { target: tapCountLabel; property: "scale"; value: 1.0 }
+ ParallelAnimation {
+ NumberAnimation {
+ target: tapCountLabel
+ property: "opacity"
+ to: 0
+ duration: 500
+ }
+ NumberAnimation {
+ target: tapCountLabel
+ property: "scale"
+ to: 1.5
+ duration: 500
+ }
+ }
+ }
+ }
+
+ Rectangle {
+ id: expandingCircle
+ radius: handler.timeHeld * 100
+ visible: radius > 0 && handler.pressed
+ border.width: 3
+ border.color: buttonToBlinkColor(handler.point.pressedButtons)
+ color: "transparent"
+ width: radius * 2
+ height: radius * 2
+ x: handler.point.pressPosition.x - radius
+ y: handler.point.pressPosition.y - radius
+ opacity: 0.25
+ }
+
+ Component {
+ id: longPressFeedback
+ Text { }
+ }
+
+ SequentialAnimation {
+ id: borderBlink
+ property color blinkColor: "red"
+ function tapFeedback(button) {
+ stop();
+ blinkColor = buttonToBlinkColor(button);
+ start();
+ }
+ ScriptAction { script: rect.border.color = borderBlink.blinkColor }
+ PauseAnimation { duration: 100 }
+ ScriptAction { script: rect.border.color = "transparent" }
+ PauseAnimation { duration: 100 }
+ }
+
+ Text {
+ text: "tap, click with different buttons, double-click, long press in this area"
+ anchors {
+ bottom: parent.bottom
+ horizontalCenter: parent.horizontalCenter
+ margins: 6
+ }
+ }
+ }
+
+ function buttonToBlinkColor(button) {
+ switch (button) {
+ case Qt.MiddleButton: return "orange";
+ case Qt.RightButton: return "magenta";
+ default: return "green";
+ }
+ }
+
+ GridLayout {
+ columnSpacing: 6; rowSpacing: 6
+ Text {
+ text: "accepted mouse clicks:"
+ }
+ CheckBox {
+ id: leftAllowedCB
+ checked: true
+ text: "left"
+ }
+ CheckBox {
+ id: middleAllowedCB
+ text: "middle"
+ }
+ CheckBox {
+ id: rightAllowedCB
+ text: "right"
+ }
+
+ Text {
+ text: "exclusive signals:"
+ }
+ CheckBox {
+ id: singleExclusiveCB
+ text: "single"
+ }
+ CheckBox {
+ id: doubleExclusiveCB
+ text: "double"
+ }
+
+ Text {
+ text: "gesture policy:"
+ horizontalAlignment: Text.AlignRight
+ Layout.row: 1
+ Layout.fillWidth: true
+ }
+ CheckBox {
+ id: policyDragThresholdCB
+ text: "drag threshold"
+ onCheckedChanged: if (checked) {
+ policyWithinBoundsCB.checked = false;
+ policyReleaseWithinBoundsCB.checked = false;
+ policyDragWithinBoundsCB.checked = false;
+ }
+ }
+ CheckBox {
+ id: policyWithinBoundsCB
+ text: "within bounds"
+ onCheckedChanged: if (checked) {
+ policyDragThresholdCB.checked = false;
+ policyReleaseWithinBoundsCB.checked = false;
+ policyDragWithinBoundsCB.checked = false;
+ }
+ }
+ CheckBox {
+ id: policyReleaseWithinBoundsCB
+ checked: true
+ text: "release within bounds"
+ onCheckedChanged: if (checked) {
+ policyDragThresholdCB.checked = false;
+ policyWithinBoundsCB.checked = false;
+ policyDragWithinBoundsCB.checked = false;
+ }
+ }
+ CheckBox {
+ id: policyDragWithinBoundsCB
+ text: "drag within bounds"
+ onCheckedChanged: if (checked) {
+ policyDragThresholdCB.checked = false;
+ policyWithinBoundsCB.checked = false;
+ policyReleaseWithinBoundsCB.checked = false;
+ }
+ }
+ }
+}
diff --git a/examples/quick/pointerhandlers/tapWithModifiers.qml b/examples/quick/pointerhandlers/tapWithModifiers.qml
new file mode 100644
index 0000000000..a129f2f0fd
--- /dev/null
+++ b/examples/quick/pointerhandlers/tapWithModifiers.qml
@@ -0,0 +1,30 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Item {
+ width: 200
+ height: 200
+ TapHandler {
+ acceptedModifiers: Qt.ControlModifier
+ onTapped: console.log("control-tapped")
+ }
+ TapHandler {
+ acceptedModifiers: Qt.NoModifier
+ onTapped: console.log("tapped with no modifiers")
+ }
+ TapHandler {
+ onTapped:
+ switch (point.modifiers) {
+ case Qt.ControlModifier | Qt.AltModifier:
+ console.log("CTRL+ALT");
+ break;
+ case Qt.ControlModifier | Qt.AltModifier | Qt.MetaModifier:
+ console.log("CTRL+META+ALT");
+ break;
+ default:
+ console.log("other modifiers", point.modifiers)
+ }
+ }
+}
diff --git a/examples/quick/positioners/CMakeLists.txt b/examples/quick/positioners/CMakeLists.txt
index 07205cbfa5..64f5cae495 100644
--- a/examples/quick/positioners/CMakeLists.txt
+++ b/examples/quick/positioners/CMakeLists.txt
@@ -1,127 +1,47 @@
-# Generated from positioners.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(positioners LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup(REQUIRES 6.5)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
+add_subdirectory("../shared" "shared")
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/positioners")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(positioners
+qt_add_executable(positionersexample
+ WIN32
+ MACOSX_BUNDLE
main.cpp
)
-set_target_properties(positioners PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(positioners PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-# Resources:
-set(positioners_resource_files
- "positioners-attachedproperties.qml"
- "positioners-transitions.qml"
- "positioners.qml"
+qt_add_qml_module(positionersexample
+ URI positioners
+ QML_FILES
+ "positioners-attachedproperties.qml"
+ "positioners-transitions.qml"
+ "positioners.qml"
)
-qt6_add_resources(positioners "positioners"
- PREFIX
- "/positioners"
- FILES
- ${positioners_resource_files}
-)
-set_source_files_properties("../shared/Button.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Button.qml"
-)
-set_source_files_properties("../shared/CheckBox.qml"
- PROPERTIES QT_RESOURCE_ALIAS "CheckBox.qml"
-)
-set_source_files_properties("../shared/FlickrRssModel.qml"
- PROPERTIES QT_RESOURCE_ALIAS "FlickrRssModel.qml"
-)
-set_source_files_properties("../shared/Label.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Label.qml"
-)
-set_source_files_properties("../shared/LauncherList.qml"
- PROPERTIES QT_RESOURCE_ALIAS "LauncherList.qml"
-)
-set_source_files_properties("../shared/SimpleLauncherDelegate.qml"
- PROPERTIES QT_RESOURCE_ALIAS "SimpleLauncherDelegate.qml"
-)
-set_source_files_properties("../shared/Slider.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Slider.qml"
-)
-set_source_files_properties("../shared/TabSet.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TabSet.qml"
-)
-set_source_files_properties("../shared/TextField.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TextField.qml"
-)
-set_source_files_properties("../shared/images/back.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/back.png"
-)
-set_source_files_properties("../shared/images/checkmark.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/checkmark.png"
-)
-set_source_files_properties("../shared/images/next.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/next.png"
-)
-set_source_files_properties("../shared/images/qt-logo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/qt-logo.png"
-)
-set_source_files_properties("../shared/images/slider_handle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/slider_handle.png"
-)
-set_source_files_properties("../shared/images/tab.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/tab.png"
-)
-set(shared_resource_files
- "Button.qml"
- "CheckBox.qml"
- "FlickrRssModel.qml"
- "Label.qml"
- "LauncherList.qml"
- "SimpleLauncherDelegate.qml"
- "Slider.qml"
- "TabSet.qml"
- "TextField.qml"
- "images/back.png"
- "images/checkmark.png"
- "images/next.png"
- "images/qt-logo.png"
- "images/slider_handle.png"
- "images/tab.png"
+target_link_libraries(positionersexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
-qt6_add_resources(positioners "shared"
- PREFIX
- "/shared"
- BASE
- "../shared"
- FILES
- ${shared_resource_files}
+install(TARGETS positionersexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-install(TARGETS positioners
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+qt_generate_deploy_qml_app_script(
+ TARGET positionersexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/positioners/doc/src/positioners.qdoc b/examples/quick/positioners/doc/src/positioners.qdoc
index 8200a14fb8..2b1af4d496 100644
--- a/examples/quick/positioners/doc/src/positioners.qdoc
+++ b/examples/quick/positioners/doc/src/positioners.qdoc
@@ -1,35 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Qt Quick Examples - Positioners
\example positioners
\brief This is a collection of QML Positioner examples.
\image qml-positioners-example.png
\ingroup qtquickexamples
+ \examplecategory {User Interface Components}
\e Positioners is a collection of small QML examples relating to
positioners. Each example is a small QML file emphasizing a particular type
diff --git a/examples/quick/positioners/main.cpp b/examples/quick/positioners/main.cpp
index 4233c4025c..fa5966d410 100644
--- a/examples/quick/positioners/main.cpp
+++ b/examples/quick/positioners/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(positioners/positioners)
diff --git a/examples/quick/positioners/positioners-attachedproperties.qml b/examples/quick/positioners/positioners-attachedproperties.qml
index af89543289..18cf7d866d 100644
--- a/examples/quick/positioners/positioners-attachedproperties.qml
+++ b/examples/quick/positioners/positioners-attachedproperties.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Controls 1.1
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
Rectangle {
id: page
@@ -64,7 +17,7 @@ Rectangle {
anchors.top: parent.top
anchors.right: parent.right
anchors.margins: 10
- text: hidingRect.visible ? "Hide" : "Show"
+ text: hidingRect.visible ? qsTr("Hide") : qsTr("Show")
onClicked: hidingRect.visible = !hidingRect.visible
}
@@ -89,15 +42,15 @@ Rectangle {
anchors.left: parent.right
anchors.leftMargin: 20
anchors.verticalCenter: parent.verticalCenter
- text: "Index: " + parent.Positioner.index
- + (parent.Positioner.isFirstItem ? " (First)" : "")
- + (parent.Positioner.isLastItem ? " (Last)" : "")
+ text: qsTr("Index: %1%2%3").arg(parent.Positioner.index)
+ .arg(parent.Positioner.isFirstItem ? qsTr(" (First)") : "")
+ .arg(parent.Positioner.isLastItem ? qsTr(" (Last)") : "")
}
// When mouse is clicked, display the values of the positioner
MouseArea {
- anchors.fill: parent
- onClicked: column.showInfo(green.Positioner)
+ anchors.fill: parent
+ onClicked: column.showInfo(green.Positioner)
}
}
//! [0]
@@ -112,15 +65,15 @@ Rectangle {
anchors.left: parent.right
anchors.leftMargin: 20
anchors.verticalCenter: parent.verticalCenter
- text: "Index: " + parent.Positioner.index
- + (parent.Positioner.isFirstItem ? " (First)" : "")
- + (parent.Positioner.isLastItem ? " (Last)" : "")
+ text: qsTr("Index: %1%2%3").arg(parent.Positioner.index)
+ .arg(parent.Positioner.isFirstItem ? qsTr(" (First)") : "")
+ .arg(parent.Positioner.isLastItem ? qsTr(" (Last)") : "")
}
// When mouse is clicked, display the values of the positioner
MouseArea {
- anchors.fill: parent
- onClicked: column.showInfo(blue.Positioner)
+ anchors.fill: parent
+ onClicked: column.showInfo(blue.Positioner)
}
}
@@ -134,15 +87,15 @@ Rectangle {
anchors.left: parent.right
anchors.leftMargin: 20
anchors.verticalCenter: parent.verticalCenter
- text: "Index: " + parent.Positioner.index
- + (parent.Positioner.isFirstItem ? " (First)" : "")
- + (parent.Positioner.isLastItem ? " (Last)" : "")
+ text: qsTr("Index: %1%2%3").arg(parent.Positioner.index)
+ .arg(parent.Positioner.isFirstItem ? qsTr(" (First)") : "")
+ .arg(parent.Positioner.isLastItem ? qsTr(" (Last)") : "")
}
// When mouse is clicked, display the values of the positioner
MouseArea {
- anchors.fill: parent
- onClicked: column.showInfo(purple.Positioner)
+ anchors.fill: parent
+ onClicked: column.showInfo(purple.Positioner)
}
}
@@ -158,18 +111,18 @@ Rectangle {
anchors.left: parent.right
anchors.leftMargin: 20
anchors.verticalCenter: parent.verticalCenter
- text: "Index: " + parent.Positioner.index
- + (parent.Positioner.isFirstItem ? " (First)" : "")
- + (parent.Positioner.isLastItem ? " (Last)" : "")
+ text: qsTr("Index: %1%2%3").arg(parent.Positioner.index)
+ .arg(parent.Positioner.isFirstItem ? qsTr(" (First)") : "")
+ .arg(parent.Positioner.isLastItem ? qsTr(" (Last)") : "")
}
}
// Print the index of the child item in the positioner and convenience
// properties showing if it's the first or last item.
function showInfo(positioner) {
- console.log("Item Index = " + positioner.index)
- console.log(" isFirstItem = " + positioner.isFirstItem)
- console.log(" isLastItem = " + positioner.isLastItem)
+ console.log(qsTr("Item Index = ") + positioner.index)
+ console.log(qsTr(" isFirstItem = ") + positioner.isFirstItem)
+ console.log(qsTr(" isLastItem = ") + positioner.isLastItem)
}
}
}
diff --git a/examples/quick/positioners/positioners-transitions.qml b/examples/quick/positioners/positioners-transitions.qml
index d4f3772c4e..44eb2ea625 100644
--- a/examples/quick/positioners/positioners-transitions.qml
+++ b/examples/quick/positioners/positioners-transitions.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQml 2.0
-import QtQuick 2.0
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQml
+import QtQuick
Item {
id: page
@@ -66,7 +19,7 @@ Item {
interval: 2000
running: true
repeat: true
- onTriggered: page.effectiveOpacity = (page.effectiveOpacity == 1.0 ? 0.0 : 1.0);
+ onTriggered: page.effectiveOpacity = (page.effectiveOpacity == 1.0 ? 0.0 : 1.0)
}
Column {
@@ -79,41 +32,73 @@ Item {
spacing: page.elementSpacing
populate: Transition {
- NumberAnimation { properties: "x,y"; from: 200; duration: 100; easing.type: Easing.OutBounce }
+ NumberAnimation {
+ properties: "x,y"
+ from: 200
+ duration: 100
+ easing.type: Easing.OutBounce
+ }
}
add: Transition {
- NumberAnimation { properties: "y"; easing.type: Easing.OutQuad }
+ NumberAnimation {
+ properties: "y"
+ easing.type: Easing.OutQuad
+ }
}
move: Transition {
- NumberAnimation { properties: "y"; easing.type: Easing.OutBounce }
+ NumberAnimation {
+ properties: "y"
+ easing.type: Easing.OutBounce
+ }
}
- Rectangle { color: "#80c342"; width: page.bigSize; height: page.smallSize }
+ Rectangle {
+ color: "#80c342"
+ width: page.bigSize
+ height: page.smallSize
+ }
Rectangle {
id: greenV1
+
visible: opacity != 0
- width: page.bigSize; height: page.smallSize
+ width: page.bigSize
+ height: page.smallSize
color: "#006325"
border.color: "transparent"
Behavior on opacity { NumberAnimation {} }
opacity: page.effectiveOpacity
}
- Rectangle { color: "#14aaff"; width: page.bigSize; height: page.smallSize }
+ Rectangle {
+ color: "#14aaff"
+ width: page.bigSize
+ height: page.smallSize
+ }
Rectangle {
id: greenV2
+
visible: opacity != 0
- width: page.bigSize; height: page.smallSize
+ width: page.bigSize
+ height: page.smallSize
color: "#006325"
border.color: "transparent"
Behavior on opacity { NumberAnimation {} }
opacity: page.effectiveOpacity
}
- Rectangle { color: "#6400aa"; width: page.bigSize; height: page.smallSize }
- Rectangle { color: "#80c342"; width: page.bigSize; height: page.smallSize }
+ Rectangle {
+ color: "#6400aa"
+ width: page.bigSize
+ height: page.smallSize
+ }
+
+ Rectangle {
+ color: "#80c342"
+ width: page.bigSize
+ height: page.smallSize
+ }
}
Row {
@@ -126,41 +111,73 @@ Item {
spacing: page.elementSpacing
populate: Transition {
- NumberAnimation { properties: "x,y"; from: 200; duration: 100; easing.type: Easing.OutBounce }
+ NumberAnimation {
+ properties: "x,y"
+ from: 200
+ duration: 100
+ easing.type: Easing.OutBounce
+ }
}
add: Transition {
- NumberAnimation { properties: "x"; easing.type: Easing.OutQuad }
+ NumberAnimation {
+ properties: "x"
+ easing.type: Easing.OutQuad
+ }
}
move: Transition {
- NumberAnimation { properties: "x"; easing.type: Easing.OutBounce }
+ NumberAnimation {
+ properties: "x"
+ easing.type: Easing.OutBounce
+ }
}
- Rectangle { color: "#80c342"; width: page.smallSize; height: page.bigSize }
+ Rectangle {
+ color: "#80c342"
+ width: page.smallSize
+ height: page.bigSize
+ }
Rectangle {
id: blueH1
+
visible: opacity != 0
- width: page.smallSize; height: page.bigSize
+ width: page.smallSize
+ height: page.bigSize
color: "#006325"
border.color: "transparent"
Behavior on opacity { NumberAnimation {} }
opacity: page.effectiveOpacity
}
- Rectangle { color: "#14aaff"; width: page.smallSize; height: page.bigSize }
+ Rectangle {
+ color: "#14aaff"
+ width: page.smallSize
+ height: page.bigSize
+ }
Rectangle {
id: greenH2
+
visible: opacity != 0
- width: page.smallSize; height: page.bigSize
+ width: page.smallSize
+ height: page.bigSize
color: "#006325"
border.color: "transparent"
Behavior on opacity { NumberAnimation {} }
opacity: page.effectiveOpacity
}
- Rectangle { color: "#6400aa"; width: page.smallSize; height: page.bigSize }
- Rectangle { color: "#80c342"; width: page.smallSize; height: page.bigSize }
+ Rectangle {
+ color: "#6400aa"
+ width: page.smallSize
+ height: page.bigSize
+ }
+
+ Rectangle {
+ color: "#80c342"
+ width: page.smallSize
+ height: page.bigSize
+ }
}
Grid {
@@ -171,54 +188,97 @@ Item {
spacing: page.elementSpacing
populate: Transition {
- NumberAnimation { properties: "x,y"; from: 200; duration: 100; easing.type: Easing.OutBounce }
+ NumberAnimation {
+ properties: "x,y"
+ from: 200
+ duration: 100
+ easing.type: Easing.OutBounce
+ }
}
add: Transition {
- NumberAnimation { properties: "x,y"; easing.type: Easing.OutBounce }
+ NumberAnimation {
+ properties: "x,y"
+ easing.type: Easing.OutBounce
+ }
}
move: Transition {
- NumberAnimation { properties: "x,y"; easing.type: Easing.OutBounce }
+ NumberAnimation {
+ properties: "x,y"
+ easing.type: Easing.OutBounce
+ }
}
- Rectangle { color: "#80c342"; width: page.smallSize; height: page.smallSize }
+ Rectangle {
+ color: "#80c342"
+ width: page.smallSize
+ height: page.smallSize
+ }
Rectangle {
id: greenG1
+
visible: opacity != 0
- width: page.smallSize; height: page.smallSize
+ width: page.smallSize
+ height: page.smallSize
color: "#006325"
border.color: "transparent"
Behavior on opacity { NumberAnimation {} }
opacity: page.effectiveOpacity
}
- Rectangle { color: "#14aaff"; width: page.smallSize; height: page.smallSize }
+ Rectangle {
+ color: "#14aaff"
+ width: page.smallSize
+ height: page.smallSize
+ }
Rectangle {
id: greenG2
+
visible: opacity != 0
- width: page.smallSize; height:page. smallSize
+ width: page.smallSize
+ height:page. smallSize
color: "#006325"
border.color: "transparent"
Behavior on opacity { NumberAnimation {} }
opacity: page.effectiveOpacity
}
- Rectangle { color: "#6400aa"; width: page.smallSize; height: page.smallSize }
+ Rectangle {
+ color: "#6400aa"
+ width: page.smallSize
+ height: page.smallSize
+ }
Rectangle {
id: greenG3
+
visible: opacity != 0
- width: page.smallSize; height: page.smallSize
+ width: page.smallSize
+ height: page.smallSize
color: "#006325"
border.color: "transparent"
Behavior on opacity { NumberAnimation {} }
opacity: page.effectiveOpacity
}
- Rectangle { color: "#80c342"; width: page.smallSize; height: page.smallSize }
- Rectangle { color: "#14aaff"; width: page.smallSize; height: page.smallSize }
- Rectangle { color: "#6400aa"; width: page.smallSize; height: page.smallSize }
+ Rectangle {
+ color: "#80c342"
+ width: page.smallSize
+ height: page.smallSize
+ }
+
+ Rectangle {
+ color: "#14aaff"
+ width: page.smallSize
+ height: page.smallSize
+ }
+
+ Rectangle {
+ color: "#6400aa"
+ width: page.smallSize
+ height: page.smallSize
+ }
}
Flow {
@@ -232,58 +292,91 @@ Item {
//! [move]
move: Transition {
- NumberAnimation { properties: "x,y"; easing.type: Easing.OutBounce }
+ NumberAnimation {
+ properties: "x,y"
+ easing.type: Easing.OutBounce
+ }
}
//! [move]
//! [add]
add: Transition {
- NumberAnimation { properties: "x,y"; easing.type: Easing.OutBounce }
+ NumberAnimation {
+ properties: "x,y"
+ easing.type: Easing.OutBounce
+ }
}
//! [add]
//! [populate]
populate: Transition {
- NumberAnimation { properties: "x,y"; from: 200; duration: 100; easing.type: Easing.OutBounce }
+ NumberAnimation {
+ properties: "x,y"
+ from: 200
+ duration: 100
+ easing.type: Easing.OutBounce
+ }
}
//! [populate]
- Rectangle { color: "#80c342"; width: page.smallSize; height: page.smallSize }
+ Rectangle {
+ color: "#80c342"
+ width: page.smallSize
+ height: page.smallSize
+ }
Rectangle {
id: greenF1
+
visible: opacity != 0
- width: 0.6 * page.bigSize; height: page.smallSize
+ width: 0.6 * page.bigSize
+ height: page.smallSize
color: "#006325"
border.color: "transparent"
Behavior on opacity { NumberAnimation {} }
opacity: page.effectiveOpacity
}
- Rectangle { color: "#14aaff"; width: 0.3 * page.bigSize; height: page.smallSize }
+ Rectangle {
+ color: "#14aaff"
+ width: 0.3 * page.bigSize
+ height: page.smallSize
+ }
Rectangle {
id: greenF2
+
visible: opacity != 0
- width: 0.6 * page.bigSize; height: page.smallSize
+ width: 0.6 * page.bigSize
+ height: page.smallSize
color: "#006325"
border.color: "transparent"
Behavior on opacity { NumberAnimation {} }
opacity: page.effectiveOpacity
}
- Rectangle { color: "#6400aa"; width: page.smallSize; height: page.smallSize }
+ Rectangle {
+ color: "#6400aa"
+ width: page.smallSize
+ height: page.smallSize
+ }
Rectangle {
id: greenF3
+
visible: opacity != 0
- width: 0.4 * page.bigSize; height: page.smallSize
+ width: 0.4 * page.bigSize
+ height: page.smallSize
color: "#006325"
border.color: "transparent"
Behavior on opacity { NumberAnimation {} }
opacity: page.effectiveOpacity
}
- Rectangle { color: "#80c342"; width: 0.8 * page.bigSize; height: page.smallSize }
+ Rectangle {
+ color: "#80c342"
+ width: 0.8 * page.bigSize
+ height: page.smallSize
+ }
}
}
diff --git a/examples/quick/positioners/positioners.qml b/examples/quick/positioners/positioners.qml
index b16df6858b..d166135441 100644
--- a/examples/quick/positioners/positioners.qml
+++ b/examples/quick/positioners/positioners.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import "../shared" as Examples
+import QtQuick
+import shared as Examples
Item {
height: 480
@@ -58,8 +11,8 @@ Item {
id: ll
anchors.fill: parent
Component.onCompleted: {
- addExample("Transitions", "Fluidly shows and hides elements", Qt.resolvedUrl("positioners-transitions.qml"));
- addExample("Attached Properties", "Knows where it is in the positioner", Qt.resolvedUrl("positioners-attachedproperties.qml"));
+ addExample(qsTr("Transitions"), qsTr("Fluidly shows and hides elements"), Qt.resolvedUrl("positioners-transitions.qml"))
+ addExample(qsTr("Attached Properties"), qsTr("Knows where it is in the positioner"), Qt.resolvedUrl("positioners-attachedproperties.qml"))
}
}
}
diff --git a/examples/quick/positioners/positioners.qrc b/examples/quick/positioners/positioners.qrc
index 7025a6f8d8..22b29868e5 100644
--- a/examples/quick/positioners/positioners.qrc
+++ b/examples/quick/positioners/positioners.qrc
@@ -1,5 +1,5 @@
<RCC>
- <qresource prefix="/positioners">
+ <qresource prefix="/qt/qml/positioners">
<file>positioners.qml</file>
<file>positioners-attachedproperties.qml</file>
<file>positioners-transitions.qml</file>
diff --git a/examples/quick/quick-accessibility/Button.qml b/examples/quick/quick-accessibility/Button.qml
new file mode 100644
index 0000000000..bd23307e97
--- /dev/null
+++ b/examples/quick/quick-accessibility/Button.qml
@@ -0,0 +1,49 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Rectangle {
+ id: button
+
+ property bool checked: false
+ property alias text : buttonText.text
+ //! [button]
+ Accessible.name: text
+ Accessible.description: "This button does " + text
+ Accessible.role: Accessible.Button
+ Accessible.onPressAction: {
+ button.clicked()
+ }
+ //! [button]
+
+ signal clicked
+
+ width: buttonText.width + 20
+ height: 30
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "lightsteelblue" }
+ GradientStop { position: 1.0;
+ color: button.focus ? "red" : "blue" }
+ }
+
+ radius: 5
+ antialiasing: true
+
+ Text {
+ id: buttonText
+ anchors.centerIn: parent
+ font.pixelSize: parent.height * .5
+ style: Text.Sunken
+ color: "white"
+ styleColor: "black"
+ }
+
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+ onClicked: parent.clicked()
+ }
+
+ Keys.onSpacePressed: clicked()
+}
diff --git a/examples/quick/quick-accessibility/CMakeLists.txt b/examples/quick/quick-accessibility/CMakeLists.txt
index ae216735a2..1501537b7b 100644
--- a/examples/quick/quick-accessibility/CMakeLists.txt
+++ b/examples/quick/quick-accessibility/CMakeLists.txt
@@ -1,57 +1,48 @@
-# Generated from quick-accessibility.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(quick-accessibility LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/quick-accessibility")
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
+qt_standard_project_setup(REQUIRES 6.5)
qt_add_executable(quick-accessibility
+ WIN32
+ MACOSX_BUNDLE
main.cpp
)
-set_target_properties(quick-accessibility PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(quick-accessibility PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-# Resources:
-set(accessibility_resource_files
- "accessibility.qml"
- "content/Button.qml"
- "content/Checkbox.qml"
- "content/Slider.qml"
+target_link_libraries(quick-accessibility PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
-qt6_add_resources(quick-accessibility "accessibility"
- PREFIX
- "/accessibility"
- FILES
- ${accessibility_resource_files}
+qt_add_qml_module(quick-accessibility
+ URI accessibility
+ QML_FILES
+ "accessibility.qml"
+ "Button.qml"
+ "Checkbox.qml"
+ "Slider.qml"
)
install(TARGETS quick-accessibility
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET quick-accessibility
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/quick-accessibility/Checkbox.qml b/examples/quick/quick-accessibility/Checkbox.qml
new file mode 100644
index 0000000000..a3a0f286f1
--- /dev/null
+++ b/examples/quick/quick-accessibility/Checkbox.qml
@@ -0,0 +1,44 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+FocusScope {
+ id: checkbox
+
+ Accessible.role: Accessible.CheckBox
+
+ property string text: "CheckBox"
+ property bool checked // required variable
+
+ width: 100
+ height: 30
+
+ Row {
+ spacing: 2
+
+ Rectangle {
+ width: 12
+ height: 12
+ border.width: checkbox.focus ? 2 : 1
+ border.color: "black"
+
+ Text {
+ id: checkboxText
+ text: checkbox.checked ? "x" : ""
+ anchors.centerIn: parent
+ }
+ }
+
+ Text {
+ text: checkbox.text
+ }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: checkbox.checked = !checkbox.checked
+ }
+
+ Keys.onSpacePressed: checkbox.checked = !checkbox.checked
+}
diff --git a/examples/quick/quick-accessibility/Slider.qml b/examples/quick/quick-accessibility/Slider.qml
new file mode 100644
index 0000000000..5dedec4915
--- /dev/null
+++ b/examples/quick/quick-accessibility/Slider.qml
@@ -0,0 +1,53 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+// Minimal slider implementation
+Rectangle {
+ id: slider
+
+ property alias text: buttonText.text
+ Accessible.role: Accessible.Slider
+
+ property int value: 5 // required
+ property int minimumValue: 0 // optional (default INT_MIN)
+ property int maximumValue: 20 // optional (default INT_MAX)
+ property int stepSize: 1 // optional (default 1)
+
+ width: 100
+ height: 30
+ border.color: "black"
+ border.width: 1
+
+ Rectangle {
+ id: indicator
+ x: 1
+ y: 1
+ height: parent.height - 2
+ width: ((parent.width - 2) / slider.maximumValue) * slider.value
+ color: "lightgrey"
+ Behavior on width {
+ NumberAnimation { duration: 50 }
+ }
+ }
+
+ Text {
+ id: buttonText
+ text: parent.value
+ anchors.centerIn: parent
+ font.pixelSize: parent.height * .5
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: (mouse) => {
+ var pos = mouse.x / slider.width * (slider.maximumValue - slider.minimumValue)
+ + slider.minimumValue
+ slider.value = pos
+ }
+ }
+
+ Keys.onLeftPressed: value > minimumValue ? value = value - stepSize : minimumValue
+ Keys.onRightPressed: value < maximumValue ? value = value + stepSize : maximumValue
+}
diff --git a/examples/quick/quick-accessibility/accessibility.qml b/examples/quick/quick-accessibility/accessibility.qml
index d3365cdd12..0de54de4a6 100644
--- a/examples/quick/quick-accessibility/accessibility.qml
+++ b/examples/quick/quick-accessibility/accessibility.qml
@@ -1,55 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQml module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import "content"
+import QtQuick
Rectangle {
id: window
diff --git a/examples/quick/quick-accessibility/accessibility.qrc b/examples/quick/quick-accessibility/accessibility.qrc
index 462a9a590c..a1d86bd1bc 100644
--- a/examples/quick/quick-accessibility/accessibility.qrc
+++ b/examples/quick/quick-accessibility/accessibility.qrc
@@ -1,8 +1,8 @@
<RCC>
- <qresource prefix="/accessibility">
+ <qresource prefix="/qt/qml/accessibility">
<file>accessibility.qml</file>
- <file>content/Button.qml</file>
- <file>content/Checkbox.qml</file>
- <file>content/Slider.qml</file>
+ <file>Button.qml</file>
+ <file>Checkbox.qml</file>
+ <file>Slider.qml</file>
</qresource>
</RCC>
diff --git a/examples/quick/quick-accessibility/content/Button.qml b/examples/quick/quick-accessibility/content/Button.qml
deleted file mode 100644
index 7a86e31588..0000000000
--- a/examples/quick/quick-accessibility/content/Button.qml
+++ /dev/null
@@ -1,96 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQml module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Rectangle {
- id: button
-
- property bool checked: false
- property alias text : buttonText.text
- //! [button]
- Accessible.name: text
- Accessible.description: "This button does " + text
- Accessible.role: Accessible.Button
- Accessible.onPressAction: {
- button.clicked()
- }
- //! [button]
-
- signal clicked
-
- width: buttonText.width + 20
- height: 30
- gradient: Gradient {
- GradientStop { position: 0.0; color: "lightsteelblue" }
- GradientStop { position: 1.0;
- color: button.focus ? "red" : "blue" }
- }
-
- radius: 5
- antialiasing: true
-
- Text {
- id: buttonText
- anchors.centerIn: parent
- font.pixelSize: parent.height * .5
- style: Text.Sunken
- color: "white"
- styleColor: "black"
- }
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- onClicked: parent.clicked()
- }
-
- Keys.onSpacePressed: clicked()
-}
diff --git a/examples/quick/quick-accessibility/content/Checkbox.qml b/examples/quick/quick-accessibility/content/Checkbox.qml
deleted file mode 100644
index ba222bfb3d..0000000000
--- a/examples/quick/quick-accessibility/content/Checkbox.qml
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Quick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-FocusScope {
- id: checkbox
-
- Accessible.role: Accessible.CheckBox
-
- property string text: "CheckBox"
- property bool checked // required variable
-
- width: 100
- height: 30
-
- Row {
- spacing: 2
-
- Rectangle {
- width: 12
- height: 12
- border.width: checkbox.focus ? 2 : 1
- border.color: "black"
-
- Text {
- id: checkboxText
- text: checkbox.checked ? "x" : ""
- anchors.centerIn: parent
- }
- }
-
- Text {
- text: checkbox.text
- }
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: checkbox.checked = !checkbox.checked
- }
-
- Keys.onSpacePressed: checkbox.checked = !checkbox.checked
-}
diff --git a/examples/quick/quick-accessibility/content/Slider.qml b/examples/quick/quick-accessibility/content/Slider.qml
deleted file mode 100644
index 241e5d804e..0000000000
--- a/examples/quick/quick-accessibility/content/Slider.qml
+++ /dev/null
@@ -1,100 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Quick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-// Minimal slider implementation
-Rectangle {
- id: slider
-
- property alias text: buttonText.text
- Accessible.role: Accessible.Slider
-
- property int value: 5 // required
- property int minimumValue: 0 // optional (default INT_MIN)
- property int maximumValue: 20 // optional (default INT_MAX)
- property int stepSize: 1 // optional (default 1)
-
- width: 100
- height: 30
- border.color: "black"
- border.width: 1
-
- Rectangle {
- id: indicator
- x: 1
- y: 1
- height: parent.height - 2
- width: ((parent.width - 2) / slider.maximumValue) * slider.value
- color: "lightgrey"
- Behavior on width {
- NumberAnimation { duration: 50 }
- }
- }
-
- Text {
- id: buttonText
- text: parent.value
- anchors.centerIn: parent
- font.pixelSize: parent.height * .5
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: (mouse) => {
- var pos = mouse.x / slider.width * (slider.maximumValue - slider.minimumValue)
- + slider.minimumValue
- slider.value = pos
- }
- }
-
- Keys.onLeftPressed: value > minimumValue ? value = value - stepSize : minimumValue
- Keys.onRightPressed: value < maximumValue ? value = value + stepSize : maximumValue
-}
diff --git a/examples/quick/quick-accessibility/doc/src/accessibility.qdoc b/examples/quick/quick-accessibility/doc/src/accessibility.qdoc
index b31db0d313..c6951cedd1 100644
--- a/examples/quick/quick-accessibility/doc/src/accessibility.qdoc
+++ b/examples/quick/quick-accessibility/doc/src/accessibility.qdoc
@@ -1,34 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Qt Quick Examples - Accessibility
\example quick-accessibility
\brief This example demonstrates the implementation of accessible buttons.
\ingroup qtquickexamples
+ \examplecategory {Graphics}
\e Accessibility demonstrates QML types that are augmented with meta-data
for accessibility systems. For more information, visit the
@@ -40,7 +17,7 @@
The button identifies itself and its functionality to the
accessibility system:
- \snippet quick-accessibility/content/Button.qml button
+ \snippet quick-accessibility/Button.qml button
Similarly, \l Text types inside the example also identify themselves:
\snippet quick-accessibility/accessibility.qml text
diff --git a/examples/quick/quick-accessibility/main.cpp b/examples/quick/quick-accessibility/main.cpp
index 46695ae066..e224110134 100644
--- a/examples/quick/quick-accessibility/main.cpp
+++ b/examples/quick/quick-accessibility/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(accessibility/accessibility)
diff --git a/examples/quick/quick.pro b/examples/quick/quick.pro
index df65ea8e17..b9fb3b48d1 100644
--- a/examples/quick/quick.pro
+++ b/examples/quick/quick.pro
@@ -2,31 +2,30 @@ TEMPLATE = subdirs
SUBDIRS = quick-accessibility \
animation \
draganddrop \
- externaldraganddrop \
canvas \
imageelements \
keyinteraction \
layouts \
+ responsivelayouts \
localstorage \
models \
views \
tableview \
mousearea \
+ pointerhandlers \
positioners \
- righttoleft \
scenegraph \
shadereffects \
text \
- threading \
- touchinteraction \
tutorials \
customitems \
imageprovider \
imageresponseprovider \
window \
particles \
- delegatechooser \
- shapes
+ itemvariablerefreshrate \
+ multieffect \
+ quickshapes
#OpenGL Support Required
qtConfig(opengl(es1|es2)?) {
diff --git a/examples/quick/quickshapes/CMakeLists.txt b/examples/quick/quickshapes/CMakeLists.txt
new file mode 100644
index 0000000000..e739c3dc89
--- /dev/null
+++ b/examples/quick/quickshapes/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Copyright (C) 2024 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+qt_internal_add_example(shapes)
+qt_internal_add_example(weatherforecast)
+
+# qt_examples_build_end() misses at least some of these due to some
+# source subdirectories being added multiple times. See QTBUG-96159.
+set(reused_dir_targets shapes_shared weatherforecast_shared)
+
+foreach(target IN LISTS reused_dir_targets)
+ if(TARGET ${target})
+ qt_autogen_tools(${target} ENABLE_AUTOGEN_TOOLS moc rcc)
+ if(TARGET Qt6::Widgets)
+ qt_autogen_tools(${target} ENABLE_AUTOGEN_TOOLS uic)
+ endif()
+ endif()
+endforeach()
diff --git a/examples/quick/quickshapes/quickshapes.pro b/examples/quick/quickshapes/quickshapes.pro
new file mode 100644
index 0000000000..80465eb81d
--- /dev/null
+++ b/examples/quick/quickshapes/quickshapes.pro
@@ -0,0 +1,2 @@
+TEMPLATE = subdirs
+SUBDIRS = shapes weatherforecast
diff --git a/examples/quick/quickshapes/shapes/CMakeLists.txt b/examples/quick/quickshapes/shapes/CMakeLists.txt
new file mode 100644
index 0000000000..5036f1a37e
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/CMakeLists.txt
@@ -0,0 +1,70 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(shapes LANGUAGES CXX)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
+
+qt_standard_project_setup(REQUIRES 6.5)
+
+add_subdirectory("../../shared" "shared")
+
+qt_add_executable(shapesexample
+ WIN32
+ MACOSX_BUNDLE
+ main.cpp
+)
+
+target_link_libraries(shapesexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
+
+add_dependencies(shapesexample shapes_shared)
+
+qt_add_qml_module(shapesexample
+ URI shapes
+ QML_FILES
+ "clippedtigers.qml"
+ "interactive.qml"
+ "cubicCurve.qml"
+ "ellipticalArcs.qml"
+ "gradientSpreadModes.qml"
+ "arcDirection.qml"
+ "largeOrSmallArc.qml"
+ "arcRotation.qml"
+ "tigerLoader.qml"
+ "text.qml"
+ "strokeOrFill.qml"
+ "dashPattern.qml"
+ "linearGradient.qml"
+ "radialGradient.qml"
+ "fillRules.qml"
+ "joinStyles.qml"
+ "capStyles.qml"
+ "quadraticCurve.qml"
+ "main.qml"
+ "sampling.qml"
+ "shapegallery.qml"
+ "tapableTriangle.qml"
+ "tiger.qml"
+ "zoomtiger.qml"
+)
+
+install(TARGETS shapesexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET shapesexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/quickshapes/shapes/arcDirection.qml b/examples/quick/quickshapes/shapes/arcDirection.qml
new file mode 100644
index 0000000000..60ec181380
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/arcDirection.qml
@@ -0,0 +1,59 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+
+Rectangle {
+ color: "lightGray"
+ width: 256
+ height: 256
+
+ Rectangle {
+ width: 100
+ height: 100
+ anchors.centerIn: parent
+ border.color: "gray"
+
+ Repeater {
+ model: 2
+ delegate: Shape {
+ id: delegate
+
+ required property int index
+
+ anchors.fill: parent
+
+ ShapePath {
+ fillColor: "transparent"
+ strokeColor: delegate.index === 0 ? "red" : "blue"
+ strokeStyle: ShapePath.DashLine
+ strokeWidth: 4
+
+ startX: 4
+ startY: 4
+ PathArc {
+ id: arc
+ x: 96
+ y: 96
+ radiusX: 100
+ radiusY: 100
+ direction: delegate.index === 0 ? PathArc.Clockwise : PathArc.Counterclockwise
+ }
+ }
+ }
+ }
+ }
+
+ Column {
+ anchors.right: parent.right
+ Text {
+ text: qsTr("Clockwise (sweep 1)")
+ color: "red"
+ }
+ Text {
+ text: qsTr("Counter clockwise (sweep 0)")
+ color: "blue"
+ }
+ }
+}
diff --git a/examples/quick/quickshapes/shapes/arcRotation.qml b/examples/quick/quickshapes/shapes/arcRotation.qml
new file mode 100644
index 0000000000..2433280698
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/arcRotation.qml
@@ -0,0 +1,82 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+
+Rectangle {
+ color: "lightGray"
+ width: 256
+ height: 256
+
+ Repeater {
+ model: 2
+ delegate: Shape {
+ id: delegate1
+
+ required property int index
+
+ width: 200
+ height: 200
+ anchors.centerIn: parent
+
+ ShapePath {
+ fillColor: "transparent"
+ strokeColor: delegate1.index === 0 ? "red" : "blue"
+ strokeStyle: ShapePath.DashLine
+ strokeWidth: 4
+
+ startX: 50
+ startY: 100
+ PathArc {
+ x: 150
+ y: 100
+ radiusX: 50
+ radiusY: 20
+ xAxisRotation: delegate1.index === 0 ? 0 : 45
+ }
+ }
+ }
+ }
+
+ Repeater {
+ model: 2
+ delegate: Shape {
+ id: delegate2
+
+ required property int index
+
+ width: 200
+ height: 200
+ anchors.centerIn: parent
+
+ ShapePath {
+ fillColor: "transparent"
+ strokeColor: delegate2.index === 0 ? "red" : "blue"
+
+ startX: 50
+ startY: 100
+ PathArc {
+ x: 150
+ y: 100
+ radiusX: 50
+ radiusY: 20
+ xAxisRotation: delegate2.index === 0 ? 0 : 45
+ direction: PathArc.Counterclockwise
+ }
+ }
+ }
+ }
+
+ Column {
+ anchors.right: parent.right
+ Text {
+ text: qsTr("0 degrees")
+ color: "red"
+ }
+ Text {
+ text: qsTr("45 degrees")
+ color: "blue"
+ }
+ }
+}
diff --git a/examples/quick/quickshapes/shapes/capStyles.qml b/examples/quick/quickshapes/shapes/capStyles.qml
new file mode 100644
index 0000000000..7fc7a4e2b9
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/capStyles.qml
@@ -0,0 +1,62 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+
+Rectangle {
+ color: "lightGray"
+ width: 256
+ height: 256
+
+ Shape {
+ anchors.centerIn: parent
+ width: 200
+ height: 100
+
+ ShapePath {
+ id: capTest
+ strokeColor: "green"
+ strokeWidth: 20
+ fillColor: "transparent"
+
+ property int capStyleIdx: 0
+ readonly property variant styles: [ ShapePath.FlatCap, ShapePath.SquareCap, ShapePath.RoundCap ]
+ readonly property variant styleTexts: [ qsTr("FlatCap"), qsTr("SquareCap"), qsTr("RoundCap") ]
+
+ capStyle: styles[capStyleIdx]
+
+ startX: 40
+ startY: 30
+ PathQuad {
+ x: 50
+ y: 80
+ controlX: 0
+ controlY: 80
+ }
+ PathLine {
+ x: 150
+ y: 80
+ }
+ PathQuad {
+ x: 160
+ y: 30
+ controlX: 200
+ controlY: 80
+ }
+ }
+ }
+
+ Timer {
+ interval: 1000
+ repeat: true
+ running: true
+ onTriggered: capTest.capStyleIdx = (capTest.capStyleIdx + 1) % capTest.styles.length
+ }
+
+ Text {
+ id: txt
+ anchors.right: parent.right
+ text: capTest.styleTexts[capTest.capStyleIdx]
+ }
+}
diff --git a/examples/quick/quickshapes/shapes/clippedtigers.qml b/examples/quick/quickshapes/shapes/clippedtigers.qml
new file mode 100644
index 0000000000..8885f60dd7
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/clippedtigers.qml
@@ -0,0 +1,110 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+
+Rectangle {
+ id: root
+ width: 1024
+ height: 768
+
+ readonly property color col: "lightsteelblue"
+ gradient: Gradient {
+ GradientStop {
+ position: 0.0
+ color: Qt.tint(root.col, "#20FFFFFF")
+ }
+ GradientStop {
+ position: 0.1
+ color: Qt.tint(root.col, "#20AAAAAA")
+ }
+ GradientStop {
+ position: 0.9
+ color: Qt.tint(root.col, "#20666666")
+ }
+ GradientStop {
+ position: 1.0
+ color: Qt.tint(root.col, "#20000000")
+ }
+ }
+
+ Rectangle {
+ id: scissorRect
+ width: 200
+ height: 200
+ x: 150
+ readonly property real centerY: parent.height / 2 - height / 2
+ property real dy: 0
+ y: centerY + dy
+ clip: true
+
+ Loader {
+ id: loader1
+ width: parent.width
+ height: parent.height
+ y: 25 - scissorRect.dy
+ source: "tiger.qml"
+ asynchronous: true
+ visible: status === Loader.Ready
+ }
+
+ SequentialAnimation {
+ loops: Animation.Infinite
+ running: loader1.status === Loader.Ready && (loader1.item as Shape)?.status === Shape.Ready
+ NumberAnimation {
+ target: scissorRect
+ property: "dy"
+ from: 0
+ to: -scissorRect.centerY
+ duration: 2000
+ }
+ NumberAnimation {
+ target: scissorRect
+ property: "dy"
+ from: -scissorRect.centerY
+ to: scissorRect.centerY
+ duration: 4000
+ }
+ NumberAnimation {
+ target: scissorRect
+ property: "dy"
+ from: scissorRect.centerY
+ to: 0
+ duration: 2000
+ }
+ }
+ }
+
+ // With a more complex transformation (like rotation), stenciling is used
+ // instead of scissoring, this is more expensive. It may also trigger a
+ // slower code path for Shapes, depending on the path rendering backend
+ // in use, and may affect rendering quality as well.
+ Rectangle {
+ id: stencilRect
+ width: 300
+ height: 200
+ anchors {
+ right: parent.right
+ rightMargin: 100
+ verticalCenter: parent.verticalCenter
+ }
+ clip: true // NB! still clips to bounding rect (not shape)
+
+ Loader {
+ id: loader2
+ width: parent.width
+ height: parent.height
+ source: "tiger.qml"
+ asynchronous: true
+ visible: status === Loader.Ready
+ }
+
+ NumberAnimation on rotation {
+ from: 0
+ to: 360
+ duration: 5000
+ loops: Animation.Infinite
+ }
+ }
+}
diff --git a/examples/quick/quickshapes/shapes/cubicCurve.qml b/examples/quick/quickshapes/shapes/cubicCurve.qml
new file mode 100644
index 0000000000..3fa4ed6f4b
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/cubicCurve.qml
@@ -0,0 +1,164 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+
+Rectangle {
+ color: "lightGray"
+ width: 256
+ height: 256
+
+ Item {
+ width: 200
+ height: 200
+ anchors.centerIn: parent
+
+ Shape {
+ id: shape
+ anchors.fill: parent
+
+ ShapePath {
+ strokeWidth: 4
+ strokeColor: "black"
+ fillGradient: ConicalGradient {
+ id: conGrad
+ centerX: 100
+ centerY: 75
+ NumberAnimation on angle {
+ from: 0
+ to: 360
+ duration: 10000
+ loops: Animation.Infinite
+ }
+ GradientStop {
+ position: 0
+ color: "#00000000"
+ }
+ GradientStop {
+ position: 0.10
+ color: "#ffe0cc73"
+ }
+ GradientStop {
+ position: 0.17
+ color: "#ffc6a006"
+ }
+ GradientStop {
+ position: 0.46
+ color: "#ff600659"
+ }
+ GradientStop {
+ position: 0.72
+ color: "#ff0680ac"
+ }
+ GradientStop {
+ position: 0.92
+ color: "#ffb9d9e6"
+ }
+ GradientStop {
+ position: 1.00
+ color: "#00000000"
+ }
+ }
+
+ startX: 50
+ startY: 100
+ PathCubic {
+ x: 150
+ y: 100
+ control1X: cp1.x
+ control1Y: cp1.y
+ control2X: cp2.x
+ control2Y: cp2.y
+ }
+ }
+ }
+
+ Rectangle {
+ id: cp1
+ color: "red"
+ width: 10
+ height: 10
+ SequentialAnimation {
+ loops: Animation.Infinite
+ running: true
+ NumberAnimation {
+ target: cp1
+ property: "x"
+ from: 0
+ to: shape.width - cp1.width
+ duration: 5000
+ }
+ NumberAnimation {
+ target: cp1
+ property: "x"
+ from: shape.width - cp1.width
+ to: 0
+ duration: 5000
+ }
+ NumberAnimation {
+ target: cp1
+ property: "y"
+ from: 0
+ to: shape.height - cp1.height
+ duration: 5000
+ }
+ NumberAnimation {
+ target: cp1
+ property: "y"
+ from: shape.height - cp1.height
+ to: 0
+ duration: 5000
+ }
+ }
+ }
+
+ Rectangle {
+ id: cp2
+ color: "blue"
+ width: 10
+ height: 10
+ x: shape.width - width
+ SequentialAnimation {
+ loops: Animation.Infinite
+ running: true
+ NumberAnimation {
+ target: cp2
+ property: "y"
+ from: 0
+ to: shape.height - cp2.height
+ duration: 5000
+ }
+ NumberAnimation {
+ target: cp2
+ property: "y"
+ from: shape.height - cp2.height
+ to: 0
+ duration: 5000
+ }
+ NumberAnimation {
+ target: cp2
+ property: "x"
+ from: shape.width - cp2.width
+ to: 0
+ duration: 5000
+ }
+ NumberAnimation {
+ target: cp2
+ property: "x"
+ from: 0
+ to: shape.width - cp2.width
+ duration: 5000
+ }
+ }
+ }
+ }
+
+ Text {
+ anchors {
+ right: parent.right
+ top: parent.top
+ }
+ text: qsTr("Conical gradient angle: ") + Math.round(conGrad.angle)
+ }
+}
diff --git a/examples/quick/quickshapes/shapes/dashPattern.qml b/examples/quick/quickshapes/shapes/dashPattern.qml
new file mode 100644
index 0000000000..742f8622e9
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/dashPattern.qml
@@ -0,0 +1,43 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+
+Rectangle {
+ color: "lightGray"
+ width: 256
+ height: 256
+ Shape {
+ id: shape
+ anchors.fill: parent
+
+ ShapePath {
+ id: p
+ strokeWidth: 5
+ strokeColor: "blue"
+ strokeStyle: ShapePath.DashLine
+ dashPattern: [ 1, 4, 4, 4 ]
+ fillColor: "lightBlue"
+
+ property real xr: 70
+ property real yr: 30
+ startX: shape.width / 2 - xr
+ startY: shape.height / 2 - yr
+ PathArc {
+ x: shape.width / 2 + p.xr
+ y: shape.height / 2 + p.yr
+ radiusX: p.xr
+ radiusY: p.yr
+ useLargeArc: true
+ }
+ PathArc {
+ x: shape.width / 2 - p.xr
+ y: shape.height / 2 - p.yr
+ radiusX: p.xr
+ radiusY: p.yr
+ useLargeArc: true
+ }
+ }
+ }
+}
diff --git a/examples/quick/shapes/doc/images/qml-shapes-example.png b/examples/quick/quickshapes/shapes/doc/images/qml-shapes-example.png
index 055fc244ea..055fc244ea 100644
--- a/examples/quick/shapes/doc/images/qml-shapes-example.png
+++ b/examples/quick/quickshapes/shapes/doc/images/qml-shapes-example.png
Binary files differ
diff --git a/examples/quick/quickshapes/shapes/doc/src/shapes.qdoc b/examples/quick/quickshapes/shapes/doc/src/shapes.qdoc
new file mode 100644
index 0000000000..eb9f5da52d
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/doc/src/shapes.qdoc
@@ -0,0 +1,16 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+/*!
+ \title Qt Quick Examples - Shapes
+ \example quickshapes/shapes
+ \image qml-shapes-example.png
+ \brief A Qt Quick example demonstrating the use of shape items.
+ \ingroup qtquickexamples
+ \examplecategory {Graphics}
+
+ This example demonstrates the usage of the \l Shape type in Qt Quick. Shapes
+ allow efficiently rendering stroked and filled lines, curves, and arcs in Qt
+ Quick scenes.
+
+ \include examples-run.qdocinc
+*/
diff --git a/examples/quick/quickshapes/shapes/ellipticalArcs.qml b/examples/quick/quickshapes/shapes/ellipticalArcs.qml
new file mode 100644
index 0000000000..d2b65cb4c1
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/ellipticalArcs.qml
@@ -0,0 +1,93 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+
+Rectangle {
+ color: "lightGray"
+ width: 256
+ height: 256
+ Shape {
+ id: shape
+ width: 220
+ height: 200
+ anchors.centerIn: parent
+
+ ShapePath {
+ fillGradient: LinearGradient {
+ y2: shape.height
+ GradientStop {
+ position: 0
+ color: "yellow"
+ }
+ GradientStop {
+ position: 1
+ color: "green"
+ }
+ }
+
+ startX: 10
+ startY: 100
+ PathArc {
+ relativeX: 50
+ y: 100
+ radiusX: 25
+ radiusY: 25
+ }
+ PathArc {
+ relativeX: 50
+ y: 100
+ radiusX: 25
+ radiusY: 35
+ }
+ PathArc {
+ relativeX: 50
+ y: 100
+ radiusX: 25
+ radiusY: 60
+ }
+ PathArc {
+ relativeX: 50
+ y: 100
+ radiusX: 50
+ radiusY: 120
+ }
+ }
+ }
+
+ Shape {
+ width: 120
+ height: 130
+ anchors.bottom: parent.bottom
+ anchors.right: parent.right
+
+ scale: 0.5
+
+ ShapePath {
+ fillColor: "transparent"
+ strokeColor: "darkBlue"
+ strokeWidth: 20
+ capStyle: ShapePath.RoundCap
+
+ PathAngleArc {
+ centerX: 65
+ centerY: 95
+ radiusX: 45
+ radiusY: 45
+ startAngle: -180
+ SequentialAnimation on sweepAngle {
+ loops: Animation.Infinite
+ NumberAnimation {
+ to: 360
+ duration: 2000
+ }
+ NumberAnimation {
+ to: 0
+ duration: 2000
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/examples/quick/quickshapes/shapes/fillRules.qml b/examples/quick/quickshapes/shapes/fillRules.qml
new file mode 100644
index 0000000000..1e96af94e7
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/fillRules.qml
@@ -0,0 +1,62 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+
+Rectangle {
+ color: "lightGray"
+ width: 256
+ height: 256
+ Shape {
+ width: 100
+ height: 100
+ anchors.centerIn: parent
+ ShapePath {
+ id: star
+ strokeColor: "blue"
+ fillColor: "magenta"
+ strokeWidth: 2
+ PathMove {
+ x: 90
+ y: 50
+ }
+ PathLine {
+ x: 50 + 40 * Math.cos(0.8 * 1 * Math.PI)
+ y: 50 + 40 * Math.sin(0.8 * 1 * Math.PI)
+ }
+ PathLine {
+ x: 50 + 40 * Math.cos(0.8 * 2 * Math.PI)
+ y: 50 + 40 * Math.sin(0.8 * 2 * Math.PI)
+ }
+ PathLine {
+ x: 50 + 40 * Math.cos(0.8 * 3 * Math.PI)
+ y: 50 + 40 * Math.sin(0.8 * 3 * Math.PI)
+ }
+ PathLine {
+ x: 50 + 40 * Math.cos(0.8 * 4 * Math.PI)
+ y: 50 + 40 * Math.sin(0.8 * 4 * Math.PI)
+ }
+ PathLine {
+ x: 90
+ y: 50
+ }
+ }
+ NumberAnimation on rotation {
+ from: 0
+ to: 360
+ duration: 5000
+ loops: Animation.Infinite
+ }
+ }
+ Timer {
+ interval: 2000
+ onTriggered: star.fillRule = (star.fillRule === ShapePath.OddEvenFill ? ShapePath.WindingFill : ShapePath.OddEvenFill)
+ repeat: true
+ running: true
+ }
+ Text {
+ anchors.right: parent.right
+ text: star.fillRule === ShapePath.OddEvenFill ? qsTr("OddEvenFill") : qsTr("WindingFill")
+ }
+}
diff --git a/examples/quick/quickshapes/shapes/gradientSpreadModes.qml b/examples/quick/quickshapes/shapes/gradientSpreadModes.qml
new file mode 100644
index 0000000000..ba2dc2b734
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/gradientSpreadModes.qml
@@ -0,0 +1,102 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+
+Rectangle {
+ color: "lightGray"
+ width: 256
+ height: 256
+ Rectangle {
+ anchors.centerIn: parent
+ width: 200
+ height: 200
+ border.color: "black"
+
+ Shape {
+ anchors.fill: parent
+
+ ShapePath {
+ strokeColor: "transparent"
+
+ fillGradient: LinearGradient {
+ id: grad
+ y1: 50
+ y2: 150
+ GradientStop {
+ position: 0
+ color: "black"
+ }
+ GradientStop {
+ position: 1
+ color: "red"
+ }
+ }
+
+ startX: 10
+ startY: 10
+ PathLine {
+ relativeX: 180
+ relativeY: 0
+ }
+ PathLine {
+ relativeX: 0
+ relativeY: 180
+ }
+ PathLine {
+ relativeX: -180
+ relativeY: 0
+ }
+ PathLine {
+ relativeX: 0
+ relativeY: -180
+ }
+ }
+ }
+
+ Timer {
+ id: spreadTimer
+ interval: 3000
+ running: true
+ repeat: true
+ readonly property variant spreads: [ ShapeGradient.PadSpread, ShapeGradient.RepeatSpread, ShapeGradient.ReflectSpread ]
+ readonly property variant spreadTexts: [ qsTr("PadSpread"), qsTr("RepeatSpread"), qsTr("ReflectSpread") ]
+ property int spreadIdx: 0
+ onTriggered: function() {
+ spreadIdx = (spreadIdx + 1) % spreads.length
+ grad.spread = spreads[spreadIdx]
+ }
+ }
+
+ Shape {
+ anchors.fill: parent
+ ShapePath {
+ strokeColor: "gray"
+ strokeWidth: 2
+ fillColor: "transparent"
+ PathMove {
+ x: 0
+ y: 50
+ }
+ PathLine {
+ relativeX: 200
+ relativeY: 0
+ }
+ PathMove {
+ x: 0
+ y: 150
+ }
+ PathLine {
+ relativeX: 200
+ relativeY: 0
+ }
+ }
+ }
+ }
+
+ Text {
+ anchors.right: parent.right
+ text: spreadTimer.spreadTexts[spreadTimer.spreadIdx]
+ }
+}
diff --git a/examples/quick/quickshapes/shapes/interactive.qml b/examples/quick/quickshapes/shapes/interactive.qml
new file mode 100644
index 0000000000..0525f4eed3
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/interactive.qml
@@ -0,0 +1,247 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
+import QtQuick.Shapes
+
+pragma ComponentBehavior: Bound
+
+Rectangle {
+ id: root
+ width: 1024
+ height: 768
+ color: palette.window
+
+ RowLayout {
+ id: topRow
+ x: 20
+ y: 10
+ spacing: 20
+
+ ButtonGroup {
+ id: toolButtons
+ buttons: drawingTools.children
+ }
+
+ RowLayout {
+ id: drawingTools
+ ToolButton {
+ text: qsTr("Line")
+ checkable: true
+ checked: true
+
+ property Component shapeType: Component {
+ ShapePath {
+ id: lineShapePath
+ strokeColor: root.palette.windowText
+ strokeWidth: widthSlider.value
+ fillColor: "transparent"
+ PathLine {
+ id: pathSegment
+ x: lineShapePath.startX + 1
+ y: lineShapePath.startY + 1
+ }
+ function finishCreation() {
+ createStartEndHandles(this, pathSegment);
+ }
+ }
+ }
+ }
+ ToolButton {
+ text: qsTr("Quadratic")
+ checkable: true
+
+ property Component shapeType: Component {
+ ShapePath {
+ id: quadShapePath
+ strokeColor: strokeSwitch.checked ? root.palette.windowText : "transparent"
+ strokeWidth: widthSlider.value
+ fillColor: fillSwitch.checked ? "green" : "transparent"
+ PathQuad {
+ id: pathSegment
+ x: quadShapePath.startX + 1
+ y: quadShapePath.startY + 1
+ controlX: quadShapePath.startX + 50
+ controlY: quadShapePath.startY + 50
+ }
+ function finishCreation() {
+ createStartEndHandles(this, pathSegment);
+ pointDragHandle.createObject(canvas, {
+ idleColor: "blue",
+ target: pathSegment, xprop: "controlX", yprop: "controlY"
+ });
+ }
+ }
+ }
+ }
+ ToolButton {
+ text: qsTr("Cubic")
+ checkable: true
+
+ property Component shapeType: Component {
+ ShapePath {
+ id: cubicShapePath
+ strokeColor: strokeSwitch.checked ? root.palette.windowText : "transparent"
+ strokeWidth: widthSlider.value
+ fillColor: fillSwitch.checked ? "green" : "transparent"
+ PathCubic {
+ id: pathSegment
+ x: cubicShapePath.startX + 1
+ y: cubicShapePath.startY + 1
+ control1X: cubicShapePath.startX + 50;
+ control1Y: cubicShapePath.startY + 50;
+ control2X: cubicShapePath.startX + 150;
+ control2Y: cubicShapePath.startY + 50;
+ }
+ function finishCreation() {
+ createStartEndHandles(this, pathSegment);
+ pointDragHandle.createObject(canvas, {
+ idleColor: "blue",
+ target: pathSegment, xprop: "control1X", yprop: "control1Y"
+ });
+ pointDragHandle.createObject(canvas, {
+ idleColor: "lightBlue",
+ target: pathSegment, xprop: "control2X", yprop: "control2Y"
+ });
+ }
+ }
+ }
+ }
+ ToolButton {
+ id: modifyButton
+ text: qsTr("Modify")
+ checkable: true
+ onCheckedChanged: {
+ if (checked)
+ showHandlesSwitch.checked = true;
+ }
+ }
+ }
+
+ Label {
+ text: qsTr("Width")
+ }
+ Slider {
+ id: widthSlider
+ from: 1
+ to: 60
+ value: 4
+ }
+
+ Switch {
+ id: showHandlesSwitch
+ text: qsTr("Handles")
+ }
+
+ Switch {
+ id: fillSwitch
+ text: qsTr("Fill")
+ }
+
+ Switch {
+ id: strokeSwitch
+ text: qsTr("Stroke")
+ checked: true
+ }
+ }
+
+ Component {
+ id: pointDragHandle
+
+ Rectangle {
+ id: rect
+ property variant target
+ property string xprop
+ property string yprop
+ property color idleColor: "red"
+
+ width: 20
+ height: width
+ radius: halfWidth
+ visible: showHandlesSwitch.checked
+ color: hh.hovered ? "yellow" : idleColor
+ border.color: "grey"
+ opacity: 0.75
+
+ property real halfWidth: width / 2
+ property bool complete: false
+ Binding {
+ target: rect.target
+ property: rect.xprop
+ value: rect.x + rect.halfWidth
+ when: rect.complete
+ }
+ Binding {
+ target: rect.target
+ property: rect.yprop
+ value: rect.y + rect.halfWidth
+ when: rect.complete
+ }
+
+ DragHandler { }
+
+ HoverHandler {
+ id: hh
+ }
+
+ Component.onCompleted: {
+ x = target[xprop] - halfWidth;
+ y = target[yprop] - halfWidth;
+ complete = true;
+ }
+ }
+ }
+
+ function createStartEndHandles(shapePath, pathSegment) {
+ pointDragHandle.createObject(canvas, {
+ idleColor: "red",
+ target: shapePath, xprop: "startX", yprop: "startY"
+ });
+ pointDragHandle.createObject(canvas, {
+ idleColor: "red",
+ target: pathSegment, xprop: "x", yprop: "y"
+ });
+ }
+
+ Rectangle {
+ id: canvas
+ color: palette.base
+ width: root.width - 40
+ height: root.height - y - 20
+ x: 20
+ anchors.top: topRow.bottom
+ anchors.topMargin: 20
+
+ DragHandler {
+ target: null
+ grabPermissions: DragHandler.TakeOverForbidden
+ property ShapePath activePath: null
+ onActiveChanged: {
+ const tool = toolButtons.checkedButton;
+ if (tool != modifyButton) {
+ if (active) {
+ activePath = tool.shapeType.createObject(root, {
+ startX: centroid.position.x, startY: centroid.position.y
+ });
+ shape.data.push(activePath);
+ } else {
+ activePath.finishCreation();
+ activePath = null;
+ }
+ }
+ }
+ onCentroidChanged: if (activePath) {
+ var pathObj = activePath.pathElements[0];
+ pathObj.x = centroid.position.x;
+ pathObj.y = centroid.position.y;
+ }
+ }
+
+ Shape {
+ id: shape
+ anchors.fill: parent
+ }
+ }
+}
diff --git a/examples/quick/quickshapes/shapes/joinStyles.qml b/examples/quick/quickshapes/shapes/joinStyles.qml
new file mode 100644
index 0000000000..127cb50fbe
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/joinStyles.qml
@@ -0,0 +1,56 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+
+Rectangle {
+ color: "lightGray"
+ width: 256
+ height: 256
+
+ Shape {
+ width: 120
+ height: 120
+ anchors.centerIn: parent
+
+ ShapePath {
+ id: joinTest
+
+ strokeColor: "black"
+ strokeWidth: 16
+ fillColor: "transparent"
+ capStyle: ShapePath.RoundCap
+
+ property int joinStyleIdx: 0
+ readonly property variant styles: [ ShapePath.BevelJoin, ShapePath.MiterJoin, ShapePath.RoundJoin ]
+ readonly property variant styleTexts: [ qsTr("BevelJoin"), qsTr("MiterJoin"), qsTr("RoundJoin") ]
+
+ joinStyle: styles[joinStyleIdx]
+
+ startX: 30
+ startY: 30
+ PathLine {
+ x: 100
+ y: 100
+ }
+ PathLine {
+ x: 30
+ y: 100
+ }
+ }
+ }
+
+ Timer {
+ interval: 1000
+ repeat: true
+ running: true
+ onTriggered: joinTest.joinStyleIdx = (joinTest.joinStyleIdx + 1) % joinTest.styles.length
+ }
+
+ Text {
+ id: txt
+ anchors.right: parent.right
+ text: joinTest.styleTexts[joinTest.joinStyleIdx]
+ }
+}
diff --git a/examples/quick/quickshapes/shapes/largeOrSmallArc.qml b/examples/quick/quickshapes/shapes/largeOrSmallArc.qml
new file mode 100644
index 0000000000..0d887d162d
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/largeOrSmallArc.qml
@@ -0,0 +1,52 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+
+Rectangle {
+ color: "lightGray"
+ width: 256
+ height: 256
+
+ Repeater {
+ model: 2
+ delegate: Shape {
+ id: delegate
+ required property int index
+
+ anchors.centerIn: parent
+ width: 200
+ height: 200
+
+ ShapePath {
+ fillColor: "transparent"
+ strokeColor: delegate.index === 0 ? "red" : "blue"
+ strokeStyle: ShapePath.DashLine
+ strokeWidth: 4
+
+ startX: 50
+ startY: 100
+ PathArc {
+ x: 100
+ y: 150
+ radiusX: 50
+ radiusY: 50
+ useLargeArc: delegate.index === 1
+ }
+ }
+ }
+ }
+
+ Column {
+ anchors.right: parent.right
+ Text {
+ text: qsTr("Small")
+ color: "red"
+ }
+ Text {
+ text: qsTr("Large")
+ color: "blue"
+ }
+ }
+}
diff --git a/examples/quick/quickshapes/shapes/linearGradient.qml b/examples/quick/quickshapes/shapes/linearGradient.qml
new file mode 100644
index 0000000000..cb89be7e6b
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/linearGradient.qml
@@ -0,0 +1,90 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+
+Rectangle {
+ color: "lightGray"
+ width: 256
+ height: 256
+ Shape {
+ width: 200
+ height: 150
+ anchors.centerIn: parent
+ ShapePath {
+ strokeWidth: 4
+ strokeColor: "red"
+ fillGradient: LinearGradient {
+ x1: 20
+ y1: 20
+ x2: 180
+ y2: 130
+ GradientStop {
+ position: 0
+ color: "blue"
+ }
+ GradientStop {
+ position: 0.2
+ color: "green"
+ }
+ GradientStop {
+ position: 0.4
+ color: "red"
+ }
+ GradientStop {
+ position: 0.6
+ color: "yellow"
+ }
+ GradientStop {
+ position: 1
+ color: "cyan"
+ }
+ }
+ fillColor: "blue" // ignored with the gradient set
+ strokeStyle: ShapePath.DashLine
+ dashPattern: [ 1, 4 ]
+ startX: 20
+ startY: 20
+ PathLine {
+ x: 180
+ y: 130
+ }
+ PathLine {
+ x: 20
+ y: 130
+ }
+ PathLine {
+ x: 20
+ y: 20
+ }
+ }
+ transform: Rotation {
+ origin.x: 100
+ origin.y: 50
+ axis {
+ x: 0
+ y: 1
+ z: 0
+ }
+ SequentialAnimation on angle {
+ NumberAnimation {
+ from: 0
+ to: 75
+ duration: 2000
+ }
+ NumberAnimation {
+ from: 75
+ to: -75
+ duration: 4000
+ }
+ NumberAnimation {
+ from: -75
+ to: 0
+ duration: 2000
+ }
+ loops: Animation.Infinite
+ }
+ }
+ }
+}
diff --git a/examples/quick/quickshapes/shapes/main.cpp b/examples/quick/quickshapes/shapes/main.cpp
new file mode 100644
index 0000000000..f8a895da83
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/main.cpp
@@ -0,0 +1,4 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+#include "../../shared/shared.h"
+DECLARATIVE_EXAMPLE_MAIN(shapes/main)
diff --git a/examples/quick/quickshapes/shapes/main.qml b/examples/quick/quickshapes/shapes/main.qml
new file mode 100644
index 0000000000..ddd6e4edf0
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/main.qml
@@ -0,0 +1,20 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import shared
+
+Item {
+ width: 1280
+ height: 720
+ LauncherList {
+ anchors.fill: parent
+ Component.onCompleted: {
+ addExample(qsTr("Shape Gallery"), qsTr("Simple path rendering examples"), Qt.resolvedUrl("shapegallery.qml"))
+ addExample(qsTr("Interactive Shape"), qsTr("Dynamic, interactive path rendering examples"), Qt.resolvedUrl("interactive.qml"))
+ addExample(qsTr("Anti-aliasing"), qsTr("Improving quality"), Qt.resolvedUrl("sampling.qml"))
+ addExample(qsTr("Magnify My Tiger!"), qsTr("Path zooming example"), Qt.resolvedUrl("zoomtiger.qml"))
+ addExample(qsTr("Clip My Tiger!"), qsTr("Clip examples, a.k.a. What Not To Do"), Qt.resolvedUrl("clippedtigers.qml"))
+ }
+ }
+}
diff --git a/examples/quick/quickshapes/shapes/quadraticCurve.qml b/examples/quick/quickshapes/shapes/quadraticCurve.qml
new file mode 100644
index 0000000000..d626d2693a
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/quadraticCurve.qml
@@ -0,0 +1,57 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+
+Rectangle {
+ color: "lightGray"
+ width: 256
+ height: 256
+
+ Item {
+ width: 200
+ height: 100
+ anchors.centerIn: parent
+
+ Shape {
+ id: shape
+ anchors.fill: parent
+
+ ShapePath {
+ strokeWidth: 4
+ strokeColor: "black"
+ fillColor: "transparent"
+
+ startX: 50
+ startY: 50
+ PathQuad {
+ x: 150
+ y: 50
+ controlX: cp.x
+ controlY: cp.y
+ }
+ }
+ }
+
+ Rectangle {
+ id: cp
+ color: "red"
+ width: 10
+ height: 10
+ SequentialAnimation on x {
+ loops: Animation.Infinite
+ NumberAnimation {
+ from: 0
+ to: shape.width - cp.width
+ duration: 5000
+ }
+ NumberAnimation {
+ from: shape.width - cp.width
+ to: 0
+ duration: 5000
+ }
+ }
+ }
+ }
+}
diff --git a/examples/quick/quickshapes/shapes/radialGradient.qml b/examples/quick/quickshapes/shapes/radialGradient.qml
new file mode 100644
index 0000000000..87db319c9a
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/radialGradient.qml
@@ -0,0 +1,113 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+
+Rectangle {
+ color: "lightGray"
+ width: 256
+ height: 256
+ Shape {
+ width: 200
+ height: 150
+ anchors.centerIn: parent
+ ShapePath {
+ strokeWidth: 4
+ strokeColor: "red"
+ fillGradient: RadialGradient {
+ centerX: 100
+ centerY: 100
+ centerRadius: 100
+ SequentialAnimation on focalRadius {
+ loops: Animation.Infinite
+ NumberAnimation {
+ from: 1
+ to: 20
+ duration: 2000
+ }
+ NumberAnimation {
+ from: 20
+ to: 1
+ duration: 2000
+ }
+ }
+ SequentialAnimation on focalX {
+ loops: Animation.Infinite
+ NumberAnimation {
+ from: 50
+ to: 150
+ duration: 3000
+ }
+ NumberAnimation {
+ from: 150
+ to: 50
+ duration: 3000
+ }
+ }
+ SequentialAnimation on focalY {
+ loops: Animation.Infinite
+ NumberAnimation {
+ from: 50
+ to: 150
+ duration: 1000
+ }
+ NumberAnimation {
+ from: 150
+ to: 50
+ duration: 1000
+ }
+ }
+ GradientStop {
+ position: 0
+ color: "#ffffff"
+ }
+ GradientStop {
+ position: 0.11
+ color: "#f9ffa0"
+ }
+ GradientStop {
+ position: 0.13
+ color: "#f9ff99"
+ }
+ GradientStop {
+ position: 0.14
+ color: "#f3ff86"
+ }
+ GradientStop {
+ position: 0.49
+ color: "#93b353"
+ }
+ GradientStop {
+ position: 0.87
+ color: "#264619"
+ }
+ GradientStop {
+ position: 0.96
+ color: "#0c1306"
+ }
+ GradientStop {
+ position: 1
+ color: "#000000"
+ }
+ }
+ fillColor: "blue" // ignored with the gradient set
+ strokeStyle: ShapePath.DashLine
+ dashPattern: [ 1, 4 ]
+ startX: 20
+ startY: 20
+ PathLine {
+ x: 180
+ y: 130
+ }
+ PathLine {
+ x: 20
+ y: 130
+ }
+ PathLine {
+ x: 20
+ y: 20
+ }
+ }
+ }
+}
diff --git a/examples/quick/quickshapes/shapes/sampling.qml b/examples/quick/quickshapes/shapes/sampling.qml
new file mode 100644
index 0000000000..27515b6722
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/sampling.qml
@@ -0,0 +1,257 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+
+Rectangle {
+ id: root
+ width: 1024
+ height: 768
+
+ readonly property color col: "lightsteelblue"
+ gradient: Gradient {
+ GradientStop {
+ position: 0.0
+ color: Qt.tint(root.col, "#20FFFFFF")
+ }
+ GradientStop {
+ position: 0.1
+ color: Qt.tint(root.col, "#20AAAAAA")
+ }
+ GradientStop {
+ position: 0.9
+ color: Qt.tint(root.col, "#20666666")
+ }
+ GradientStop {
+ position: 1.0
+ color: Qt.tint(root.col, "#20000000")
+ }
+ }
+
+ Row {
+ anchors {
+ fill: parent
+ margins: 20
+ }
+ spacing: 40
+
+ Column {
+ spacing: 40
+
+ Text {
+ text: qsTr("Original")
+ }
+
+ // A simple Shape without anything special.
+ Rectangle {
+ color: "lightGray"
+ width: 400
+ height: 200
+
+ Shape {
+ x: 30
+ y: 20
+ width: 50
+ height: 50
+ scale: 2
+
+ ShapePath {
+ strokeColor: "green"
+ NumberAnimation on strokeWidth {
+ from: 1
+ to: 20
+ duration: 5000
+ }
+ fillColor: "transparent"
+ capStyle: ShapePath.RoundCap
+
+ startX: 40
+ startY: 30
+ PathQuad {
+ x: 50
+ y: 80
+ controlX: 0
+ controlY: 80
+ }
+ PathLine {
+ x: 150
+ y: 80
+ }
+ PathQuad {
+ x: 160
+ y: 30
+ controlX: 200
+ controlY: 80
+ }
+ }
+ }
+ }
+
+ Text {
+ text: qsTr("Supersampling (2x)")
+ }
+
+ // Now let's use 2x supersampling via layers. This way the entire subtree
+ // is rendered into an FBO twice the size and then drawn with linear
+ // filtering. This allows having some level of AA even when there is no
+ // support for multisample framebuffers.
+ Rectangle {
+ id: supersampledItem
+ color: "lightGray"
+ width: 400
+ height: 200
+
+ layer.enabled: true
+ layer.smooth: true
+ layer.textureSize: Qt.size(supersampledItem.width * 2, supersampledItem.height * 2)
+
+ Shape {
+ x: 30
+ y: 20
+ width: 50
+ height: 50
+ scale: 2
+
+ ShapePath {
+ strokeColor: "green"
+ NumberAnimation on strokeWidth {
+ from: 1
+ to: 20
+ duration: 5000
+ }
+ fillColor: "transparent"
+ capStyle: ShapePath.RoundCap
+
+ startX: 40
+ startY: 30
+ PathQuad {
+ x: 50
+ y: 80
+ controlX: 0
+ controlY: 80
+ }
+ PathLine {
+ x: 150
+ y: 80
+ }
+ PathQuad {
+ x: 160
+ y: 30
+ controlX: 200
+ controlY: 80
+ }
+ }
+ }
+ }
+ }
+
+ Column {
+ spacing: 40
+
+ Text {
+ text: qsTr("Multisampling (4x)")
+ }
+
+ // Now let's use 4x MSAA, again via layers. This needs support for
+ // multisample renderbuffers and framebuffer blits.
+ Rectangle {
+ color: "lightGray"
+ width: 400
+ height: 200
+
+ layer.enabled: true
+ layer.smooth: true
+ layer.samples: 4
+
+ Shape {
+ x: 30
+ y: 20
+ width: 50
+ height: 50
+ scale: 2
+
+ ShapePath {
+ strokeColor: "green"
+ NumberAnimation on strokeWidth {
+ from: 1
+ to: 20
+ duration: 5000
+ }
+ fillColor: "transparent"
+ capStyle: ShapePath.RoundCap
+
+ startX: 40
+ startY: 30
+ PathQuad {
+ x: 50
+ y: 80
+ controlX: 0
+ controlY: 80
+ }
+ PathLine {
+ x: 150
+ y: 80
+ }
+ PathQuad {
+ x: 160
+ y: 30
+ controlX: 200
+ controlY: 80
+ }
+ }
+ }
+ }
+ Text {
+ text: qsTr("CurveRenderer")
+ }
+
+ // Now let's use CurveRenderer with built-in antialiasing support.
+ Rectangle {
+ color: "lightGray"
+ width: 400
+ height: 200
+
+ Shape {
+ x: 30
+ y: 20
+ width: 50
+ height: 50
+ scale: 2
+ preferredRendererType: Shape.CurveRenderer
+ antialiasing: true
+
+ ShapePath {
+ strokeColor: "green"
+ NumberAnimation on strokeWidth {
+ from: 1
+ to: 20
+ duration: 5000
+ }
+ fillColor: "transparent"
+ capStyle: ShapePath.RoundCap
+
+ startX: 40
+ startY: 30
+ PathQuad {
+ x: 50
+ y: 80
+ controlX: 0
+ controlY: 80
+ }
+ PathLine {
+ x: 150
+ y: 80
+ }
+ PathQuad {
+ x: 160
+ y: 30
+ controlX: 200
+ controlY: 80
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/examples/quick/quickshapes/shapes/shapegallery.qml b/examples/quick/quickshapes/shapes/shapegallery.qml
new file mode 100644
index 0000000000..74059b8208
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/shapegallery.qml
@@ -0,0 +1,184 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+
+pragma ComponentBehavior: Bound
+
+Rectangle {
+ id: root
+ width: 1024
+ height: 768
+
+ readonly property color col: "lightsteelblue"
+ gradient: Gradient {
+ GradientStop {
+ position: 0.0
+ color: Qt.tint(root.col, "#20FFFFFF")
+ }
+ GradientStop {
+ position: 0.1
+ color: Qt.tint(root.col, "#20AAAAAA")
+ }
+ GradientStop {
+ position: 0.9
+ color: Qt.tint(root.col, "#20666666")
+ }
+ GradientStop {
+ position: 1.0
+ color: Qt.tint(root.col, "#20000000")
+ }
+ }
+
+ readonly property int gridSpacing: 10
+
+ Rectangle {
+ anchors {
+ fill: parent
+ margins: 10
+ }
+ color: "lightBlue"
+ clip: true
+
+ GridView {
+ id: grid
+ anchors {
+ fill: parent
+ margins: root.gridSpacing
+ }
+ cellWidth: 300
+ cellHeight: 300
+ delegate: Rectangle {
+ id: gridDelegate
+
+ required property string name
+ required property string shapeUrl
+
+ border.color: "purple"
+ width: grid.cellWidth - root.gridSpacing
+ height: grid.cellHeight - root.gridSpacing
+ Column {
+ anchors.fill: parent
+ anchors.margins: 4
+ Item {
+ width: parent.width
+ height: parent.height - delegText.height
+ Loader {
+ source: Qt.resolvedUrl(gridDelegate.shapeUrl)
+ anchors.fill: parent
+ }
+ }
+ Text {
+ id: delegText
+ text: gridDelegate.name
+ font.pointSize: 16
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+ }
+ }
+ model: ListModel {
+ ListElement {
+ name: qsTr("Stroke and fill")
+ shapeUrl: "tapableTriangle.qml"
+ }
+ ListElement {
+ name: qsTr("Stroke or fill only")
+ shapeUrl: "strokeOrFill.qml"
+ }
+ ListElement {
+ name: qsTr("Dash pattern")
+ shapeUrl: "dashPattern.qml"
+ }
+ ListElement {
+ name: qsTr("Linear gradient")
+ shapeUrl: "linearGradient.qml"
+ }
+ ListElement {
+ name: qsTr("Radial gradient")
+ shapeUrl: "radialGradient.qml"
+ }
+ ListElement {
+ name: qsTr("Fill rules")
+ shapeUrl: "fillRules.qml"
+ }
+ ListElement {
+ name: qsTr("Join styles")
+ shapeUrl: "joinStyles.qml"
+ }
+ ListElement {
+ name: qsTr("Cap styles")
+ shapeUrl: "capStyles.qml"
+ }
+ ListElement {
+ name: qsTr("Quadratic curve")
+ shapeUrl: "quadraticCurve.qml"
+ }
+ ListElement {
+ name: qsTr("Cubic curve")
+ shapeUrl: "cubicCurve.qml"
+ }
+ ListElement {
+ name: qsTr("Elliptical arc")
+ shapeUrl: "ellipticalArcs.qml"
+ }
+ ListElement {
+ name: qsTr("Gradient spread modes")
+ shapeUrl: "gradientSpreadModes.qml"
+ }
+ ListElement {
+ name: qsTr("Arc direction")
+ shapeUrl: "arcDirection.qml"
+ }
+ ListElement {
+ name: qsTr("Large/small arc")
+ shapeUrl: "largeOrSmallArc.qml"
+ }
+ ListElement {
+ name: qsTr("Arc rotation")
+ shapeUrl: "arcRotation.qml"
+ }
+ ListElement {
+ name: qsTr("Tiger")
+ shapeUrl: "tigerLoader.qml"
+ }
+ ListElement {
+ name: qsTr("Text")
+ shapeUrl: "text.qml"
+ }
+ }
+ }
+ }
+
+ Text {
+ anchors.right: parent.right
+ // used only to get the renderer type
+ Shape {
+ id: dummyShape
+ ShapePath { }
+ }
+ color: "darkBlue"
+ font.pointSize: 12
+ readonly property variant rendererStrings: [ qsTr("Unknown"), qsTr("Generic (QtGui triangulator)"), qsTr("GL_NV_path_rendering"), qsTr("Software (QPainter)"), qsTr("Curve Renderer") ]
+ text: "Active Shape backend: " + rendererStrings[dummyShape.rendererType]
+ SequentialAnimation on opacity {
+ NumberAnimation {
+ from: 1
+ to: 0
+ duration: 5000
+ }
+ PauseAnimation {
+ duration: 5000
+ }
+ NumberAnimation {
+ from: 0
+ to: 1
+ duration: 1000
+ }
+ PauseAnimation {
+ duration: 5000
+ }
+ loops: Animation.Infinite
+ }
+ }
+}
diff --git a/examples/quick/quickshapes/shapes/shapes.pro b/examples/quick/quickshapes/shapes/shapes.pro
new file mode 100644
index 0000000000..f14a02a23c
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/shapes.pro
@@ -0,0 +1,10 @@
+TEMPLATE = app
+
+QT += quick qml
+SOURCES += main.cpp
+RESOURCES += \
+ shapes.qrc \
+ ../../shared/shared.qrc
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/quickshapes/shapes
+INSTALLS += target
diff --git a/examples/quick/quickshapes/shapes/shapes.qrc b/examples/quick/quickshapes/shapes/shapes.qrc
new file mode 100644
index 0000000000..413816dba2
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/shapes.qrc
@@ -0,0 +1,28 @@
+<RCC>
+ <qresource prefix="/qt/qml/shapes">
+ <file>main.qml</file>
+ <file>shapegallery.qml</file>
+ <file>interactive.qml</file>
+ <file>sampling.qml</file>
+ <file>clippedtigers.qml</file>
+ <file>tiger.qml</file>
+ <file>tapableTriangle.qml</file>
+ <file>strokeOrFill.qml</file>
+ <file>dashPattern.qml</file>
+ <file>linearGradient.qml</file>
+ <file>radialGradient.qml</file>
+ <file>fillRules.qml</file>
+ <file>joinStyles.qml</file>
+ <file>capStyles.qml</file>
+ <file>quadraticCurve.qml</file>
+ <file>cubicCurve.qml</file>
+ <file>ellipticalArcs.qml</file>
+ <file>gradientSpreadModes.qml</file>
+ <file>arcDirection.qml</file>
+ <file>largeOrSmallArc.qml</file>
+ <file>arcRotation.qml</file>
+ <file>tigerLoader.qml</file>
+ <file>text.qml</file>
+ <file>zoomtiger.qml</file>
+ </qresource>
+</RCC>
diff --git a/examples/quick/quickshapes/shapes/strokeOrFill.qml b/examples/quick/quickshapes/shapes/strokeOrFill.qml
new file mode 100644
index 0000000000..c939ed067d
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/strokeOrFill.qml
@@ -0,0 +1,120 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+
+Rectangle {
+ color: "lightGray"
+ width: 256
+ height: 256
+
+ Shape {
+ id: circ1
+ anchors.fill: parent
+
+ ShapePath {
+ id: p1
+ fillColor: "transparent" // stroke only
+ strokeWidth: 4
+
+ SequentialAnimation on strokeColor {
+ loops: Animation.Infinite
+ ColorAnimation {
+ from: "black"
+ to: "yellow"
+ duration: 5000
+ }
+ ColorAnimation {
+ from: "yellow"
+ to: "green"
+ duration: 5000
+ }
+ ColorAnimation {
+ from: "green"
+ to: "black"
+ duration: 5000
+ }
+ }
+
+ readonly property real r: 60
+ startX: circ1.width / 2 - r
+ startY: circ1.height / 2 - r
+ PathArc {
+ x: circ1.width / 2 + p1.r
+ y: circ1.height / 2 + p1.r
+ radiusX: p1.r
+ radiusY: p1.r
+ useLargeArc: true
+ }
+ PathArc {
+ x: circ1.width / 2 - p1.r
+ y: circ1.height / 2 - p1.r
+ radiusX: p1.r
+ radiusY: p1.r
+ useLargeArc: true
+ }
+ }
+ }
+
+ Shape {
+ id: circ2
+ anchors.fill: parent
+
+ SequentialAnimation on opacity {
+ loops: Animation.Infinite
+ NumberAnimation {
+ from: 1.0
+ to: 0.0
+ duration: 5000
+ }
+ NumberAnimation {
+ from: 0.0
+ to: 1.0
+ duration: 5000
+ }
+ }
+
+ ShapePath {
+ id: p2
+ strokeWidth: -1 // or strokeColor: "transparent"
+
+ SequentialAnimation on fillColor {
+ loops: Animation.Infinite
+ ColorAnimation {
+ from: "gray"
+ to: "purple"
+ duration: 3000
+ }
+ ColorAnimation {
+ from: "purple"
+ to: "red"
+ duration: 3000
+ }
+ ColorAnimation {
+ from: "red"
+ to: "gray"
+ duration: 3000
+ }
+ }
+
+ readonly property real r: 40
+ startX: circ2.width / 2 - r
+ startY: circ2.height / 2 - r
+ PathArc {
+ x: circ2.width / 2 + p2.r
+ y: circ2.height / 2 + p2.r
+ radiusX: p2.r
+ radiusY: p2.r
+ useLargeArc: true
+ }
+ PathArc {
+ x: circ2.width / 2 - p2.r
+ y: circ2.height / 2 - p2.r
+ radiusX: p2.r
+ radiusY: p2.r
+ useLargeArc: true
+ }
+ }
+ }
+}
diff --git a/examples/quick/quickshapes/shapes/tapableTriangle.qml b/examples/quick/quickshapes/shapes/tapableTriangle.qml
new file mode 100644
index 0000000000..c76821e898
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/tapableTriangle.qml
@@ -0,0 +1,76 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+
+Rectangle {
+ width: 256
+ height: 256
+ color: th.pressed ? "steelBlue" : "lightGray"
+ containmentMask: ctr
+
+ TapHandler {
+ id: th
+ }
+
+ Shape {
+ id: ctr
+ anchors.fill: parent
+ containsMode: Shape.FillContains
+
+ ShapePath {
+ strokeColor: "red"
+ fillColor: "blue"
+
+ SequentialAnimation on strokeWidth {
+ loops: Animation.Infinite
+ NumberAnimation {
+ from: 1
+ to: 30
+ duration: 5000
+ }
+ NumberAnimation {
+ from: 30
+ to: 1
+ duration: 5000
+ }
+ PauseAnimation {
+ duration: 2000
+ }
+ }
+
+ startX: 30
+ startY: 30
+ PathLine {
+ x: ctr.width - 30
+ y: ctr.height - 30
+ }
+ PathLine {
+ x: 30
+ y: ctr.height - 30
+ }
+ PathLine {
+ x: 30
+ y: 30
+ }
+ }
+
+ // Besides ShapePath, Shape supports visual and non-visual objects too, allowing
+ // free mixing without going through extra hoops:
+ Rectangle {
+ id: testRect
+ color: "green"
+ opacity: 0.3
+ width: 20
+ height: 20
+ anchors.right: parent.right
+ }
+ Timer {
+ interval: 100
+ repeat: true
+ onTriggered: testRect.width = testRect.width > 1 ? testRect.width - 1 : 20
+ running: true
+ }
+ }
+}
diff --git a/examples/quick/quickshapes/shapes/text.qml b/examples/quick/quickshapes/shapes/text.qml
new file mode 100644
index 0000000000..8a105fb254
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/text.qml
@@ -0,0 +1,32 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+
+Rectangle {
+ color: "lightGray"
+ width: 256
+ height: 256
+
+ Shape {
+ anchors.centerIn: parent
+ width: 200
+ height: 100
+
+ ShapePath {
+ id: capTest
+ strokeColor: "black"
+ strokeWidth: 1
+ fillColor: "black"
+
+ PathText {
+ x: 0
+ y: 0
+ text: qsTr("Qt!")
+ font.family: "Arial"
+ font.pixelSize: 150
+ }
+ }
+ }
+}
diff --git a/examples/quick/shapes/content/tiger.qml b/examples/quick/quickshapes/shapes/tiger.qml
index 317ec88b31..40fcaf7fc2 100644
--- a/examples/quick/shapes/content/tiger.qml
+++ b/examples/quick/quickshapes/shapes/tiger.qml
@@ -1,60 +1,13 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtQuick.Shapes 1.12
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
Shape {
asynchronous: true
width: 494; height: 510
-
+ property bool highlightOnTap: true
ShapePath {
fillColor: "#ffffff"
strokeColor: "#000000"
@@ -3621,13 +3574,16 @@ Shape {
opacity: tapHandler.pressed ? 1 : 0
containsMode: Shape.FillContains
- TapHandler { id: tapHandler }
+ TapHandler {
+ id: tapHandler
+ enabled: highlightOnTap
+ }
ShapePath {
strokeColor: "red"
strokeWidth: 4
fillColor: "transparent"
- PathSvg { path: "m 325.03711,0.5
+ PathSvg { path: `m 325.03711,0.5
c -26.61408,6.4494547 -49.95197,2.1018066 -76.21132,1.0771669
-22.26577,7.6817151 -47.96405,9.3627181 -65.67832,25.8497861
-15.74718,12.80008 -41.1564,19.605644 -45.74903,40.600391
@@ -3706,7 +3662,7 @@ Shape {
450.82861,4.7342783 435.04883,22.626367 409.5188,28.206712
386.3569,24.131269 365.63904,8.0954152 352.788,2.8857182
338.88892,0.40735091 325.03711,0.5 Z m -219.0625,357.04297
- -0.97656,0.88476 z"
+ -0.97656,0.88476 z`
}
}
}
diff --git a/examples/quick/quickshapes/shapes/tigerLoader.qml b/examples/quick/quickshapes/shapes/tigerLoader.qml
new file mode 100644
index 0000000000..e49d33a828
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/tigerLoader.qml
@@ -0,0 +1,32 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+
+Rectangle {
+ color: "lightGray"
+ width: 256
+ height: 256
+
+ Item {
+ anchors.fill: parent
+
+ Text {
+ anchors.centerIn: parent
+ text: qsTr("Loading")
+ // Phase #1: Loader loads tiger.qml. After this we have our item.
+ // Phase #2: With some backends (generic) the item will start async processing. Wait for this too.
+ visible: shapeLoader.status != Loader.Ready || (shapeLoader.item as Shape)?.status === Shape.Processing
+ }
+
+ Loader {
+ id: shapeLoader
+ anchors.fill: parent
+ source: "tiger.qml"
+ asynchronous: true
+ visible: status == Loader.Ready
+ scale: 0.4
+ }
+ }
+}
diff --git a/examples/quick/quickshapes/shapes/zoomtiger.qml b/examples/quick/quickshapes/shapes/zoomtiger.qml
new file mode 100644
index 0000000000..f23df0ca62
--- /dev/null
+++ b/examples/quick/quickshapes/shapes/zoomtiger.qml
@@ -0,0 +1,152 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+import QtQuick.Controls
+
+Rectangle {
+ id: root
+ width: 1024
+ height: 768
+
+ readonly property color col: "lightsteelblue"
+ gradient: Gradient {
+ GradientStop {
+ position: 0.0
+ color: Qt.tint(root.col, "#20FFFFFF")
+ }
+ GradientStop {
+ position: 0.1
+ color: Qt.tint(root.col, "#20AAAAAA")
+ }
+ GradientStop {
+ position: 0.9
+ color: Qt.tint(root.col, "#20666666")
+ }
+ GradientStop {
+ position: 1.0
+ color: Qt.tint(root.col, "#20000000")
+ }
+ }
+
+ layer.enabled: msaaCheckBox.checked
+ layer.samples: 4
+
+ Item {
+ id: zoomView
+ anchors.fill: parent
+ anchors.margins: 10
+ anchors.leftMargin: 100
+ property bool zoomedIn: false
+ property rect zoomTarget: "0, 0, 100x100"
+ property rect zoomRect: zoomTarget
+ Behavior on zoomRect {
+ id: zoomBehavior
+ PropertyAnimation { id: zoomAnimation; duration: 800 }
+ }
+ property real zoomScale: Math.min(width / zoomRect.width, height / zoomRect.height)
+
+ Item {
+ width: loader1.width
+ height: loader1.height
+ scale: zoomView.zoomScale
+ transformOrigin: Item.TopLeft
+ Loader {
+ id: loader1
+ x: -zoomView.zoomRect.x
+ y: -zoomView.zoomRect.y
+ property rect br: item ? item.boundingRect : "0,0,100x100"
+ source: "tiger.qml"
+ asynchronous: true
+ visible: status === Loader.Ready
+ onLoaded: {
+ item.highlightOnTap = false
+ zoomView.zoomTarget = br
+ width = br
+ height = br
+ }
+ }
+ }
+ }
+ MouseArea {
+ anchors.fill: parent
+
+ property vector2d clickPoint
+ property vector2d zoomPoint
+ property bool dragged: false
+ property real targetSize: 30
+ enabled: !zoomAnimation.running
+ onPressed: (event) => {
+ clickPoint = Qt.vector2d(event.x, event.y)
+ zoomPoint = Qt.vector2d(zoomView.zoomRect.x, zoomView.zoomRect.y)
+ dragged = false
+ zoomBehavior.enabled = false
+ }
+ onReleased: (event) => {
+ if (!dragged)
+ doTap(Qt.point(event.x, event.y))
+ }
+ onPositionChanged: (event) => {
+ if (!dragged) {
+ let delta = Qt.vector2d(event.x, event.y).minus(clickPoint)
+ if (delta.length() < drag.threshold)
+ return
+ }
+ dragged = true
+ if (zoomView.zoomedIn) {
+ doDrag(Qt.point(event.x, event.y))
+ }
+ }
+ function doDrag(pos) {
+ let r = zoomView.zoomTarget
+ let xx = zoomPoint.x - (pos.x - clickPoint.x) / zoomView.zoomScale
+ let yy = zoomPoint.y - (pos.y - clickPoint.y) / zoomView.zoomScale
+ zoomView.zoomTarget = Qt.rect(xx, yy, r.width, r.height)
+ }
+ function doTap(pos) {
+ if (zoomView.zoomedIn) {
+ zoomBehavior.enabled = true
+ zoomView.zoomTarget = loader1.item.boundingRect
+ zoomView.zoomedIn = false
+ } else {
+ let localPos = loader1.mapFromItem(root, pos)
+ let xx = localPos.x - loader1.br.left
+ let yy = localPos.y - loader1.br.top
+ if (loader1.item.contains(Qt.point(xx,yy))) {
+ zoomBehavior.enabled = true
+ zoomView.zoomTarget = Qt.rect(xx - 184 - targetSize/2, yy - 144 - targetSize/2, targetSize, targetSize)
+ zoomView.zoomedIn = true
+ }
+ }
+ }
+ }
+
+ Rectangle {
+ opacity: 0.5
+ color: "white"
+ x: settings.childrenRect.x
+ y: settings.childrenRect.y
+ width: settings.childrenRect.width
+ height: settings.childrenRect.height
+ }
+ Column {
+ id: settings
+ RadioButton {
+ id: curveRendererCheckBox
+ text: "Curve Renderer"
+ onCheckedChanged: {
+ loader1.item.preferredRendererType = checked ? Shape.CurveRenderer : Shape.GeometryRenderer
+ }
+ }
+ RadioButton {
+ id: geometryRendererCheckBox
+ text: "Geometry Renderer"
+ checked: true
+ }
+ RadioButton {
+ id: msaaCheckBox
+ text: "Geometry Renderer 4x MSAA"
+ }
+ }
+}
diff --git a/examples/quick/quickshapes/weatherforecast/BouncyShape.qml b/examples/quick/quickshapes/weatherforecast/BouncyShape.qml
new file mode 100644
index 0000000000..6b2de82d1b
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/BouncyShape.qml
@@ -0,0 +1,33 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+Item {
+ id: root
+ default property Item child
+ property real amount: 2
+ children: [child, hoverArea]
+ width: child.width
+ height: child.height
+ property real bounceScale: hoverArea.containsMouse ? amount : 1
+ property alias hoverEnabled: hoverArea.enabled
+ Binding {
+ target: child
+ property: "scale"
+ value: root.bounceScale
+ }
+
+ Behavior on bounceScale {
+ NumberAnimation {
+ duration: 300
+ easing.type: Easing.InOutQuad
+ }
+ }
+ z: hoverArea.containsMouse ? 1 : 0
+
+ MouseArea {
+ id: hoverArea
+ anchors.fill: parent
+ hoverEnabled: true
+ }
+}
diff --git a/examples/quick/quickshapes/weatherforecast/CMakeLists.txt b/examples/quick/quickshapes/weatherforecast/CMakeLists.txt
new file mode 100644
index 0000000000..f890b22a0c
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/CMakeLists.txt
@@ -0,0 +1,84 @@
+# Copyright (C) 2024 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(weatherforecast LANGUAGES CXX)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
+
+qt_standard_project_setup(REQUIRES 6.5)
+
+add_subdirectory("../../shared" "shared")
+
+qt_add_executable(weatherforecastexample
+ WIN32
+ MACOSX_BUNDLE
+ main.cpp
+)
+
+target_link_libraries(weatherforecastexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
+
+add_dependencies(weatherforecastexample weatherforecast_shared)
+
+qt_add_qml_module(weatherforecastexample
+ URI weatherforecast
+ QML_FILES
+ "main.qml"
+ "Europe.qml"
+ "Europe_generated.qml"
+ "BouncyShape.qml"
+ "Cloud.qml"
+ "Cloud_generated.qml"
+ "CloudWithLightning.qml"
+ "CloudWithLightning_generated.qml"
+ "CloudWithRain.qml"
+ "CloudWithRain_generated.qml"
+ "CloudWithSnow.qml"
+ "CloudWithSnow_generated.qml"
+ "Gear.qml"
+ "Gear_generated.qml"
+ "MapLabel.qml"
+ "SettingsDrawer.qml"
+ "Sun.qml"
+ "Sun_generated.qml"
+ "SunBehindCloud.qml"
+ "SunBehindCloud_generated.qml"
+ "SunBehindRainCloud.qml"
+ "SunBehindRainCloud_generated.qml"
+ "SunBehindSmallCloud.qml"
+ "SunBehindSmallCloud_generated.qml"
+ "DemoShape.qml"
+ RESOURCES
+ "assets/WorkSans-Regular.ttf"
+)
+
+set(resource_files
+ "qtquickcontrols2.conf"
+)
+
+qt_add_resources(weatherforecastexample "res"
+ PREFIX
+ "/"
+ FILES
+ ${resource_files}
+)
+
+install(TARGETS weatherforecastexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET weatherforecastexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/quickshapes/weatherforecast/Cloud.qml b/examples/quick/quickshapes/weatherforecast/Cloud.qml
new file mode 100644
index 0000000000..64a06d4c72
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/Cloud.qml
@@ -0,0 +1,5 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+Cloud_generated {
+}
diff --git a/examples/quick/quickshapes/weatherforecast/CloudWithLightning.qml b/examples/quick/quickshapes/weatherforecast/CloudWithLightning.qml
new file mode 100644
index 0000000000..da91eb2838
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/CloudWithLightning.qml
@@ -0,0 +1,5 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+CloudWithLightning_generated {
+}
diff --git a/examples/quick/quickshapes/weatherforecast/CloudWithLightningAndRain_generated.qml b/examples/quick/quickshapes/weatherforecast/CloudWithLightningAndRain_generated.qml
new file mode 100644
index 0000000000..6b54874636
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/CloudWithLightningAndRain_generated.qml
@@ -0,0 +1,140 @@
+// Copyright (C) 2023 Googlefonts
+// SPDX-License-Identifier: Apache-2.0
+// Generated from: assets/cloud-with-lightning-and-rain-svgrepo-com.svg
+import QtQuick
+import QtQuick.Shapes
+
+Item {
+ // viewBox 0, 0 128x128
+ // size 800x800
+ implicitWidth: 800
+ implicitHeight: 800
+ // START type: DOC 0
+ DemoShape { //combined path container
+ transform: [
+ Scale { xScale: width / 128; yScale: height / 128 }
+ ]
+ // PATH visit count: 27
+ ShapePath {
+ // boundingRect: 46.8504, 67.82 37.9392x46.8238
+ strokeColor: "transparent"
+ fillColor: "#fffeca18"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 78 67.82 L 55.17 71.79 C 55.17 71.79 47.57 91.15 47.1 92.46 C 46.63 93.77 46.65 95.84 48.72 95.84 C 51.35 95.84 64.7 95.77 64.7 95.77 C 64.7 95.77 61.46 111.4 61.27 112.8 C 61.08 114.2 62.58 115.43 63.9 114.02 C 65.22 112.61 83.41 89.23 84.2 88.09 C 85.61 86.05 84.25 84.17 82.65 84.08 C 81.05 83.99 70.33 84.22 70.33 84.22 L 78 67.82 " }
+ }
+ // PATH visit count: 11
+ ShapePath {
+ // boundingRect: 66.5578, 69.49 9.44218x14.9005
+ strokeColor: "transparent"
+ fillColor: "#fffdb900"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 71.92 70.54 C 71.92 70.54 66.83 81.8 66.64 82.44 C 66.08 84.34 68.54 85.11 69.24 83.57 C 69.94 82.02 76 69.49 76 69.49 L 71.92 70.54 " }
+ }
+ // PATH visit count: 13
+ ShapePath {
+ // boundingRect: 48.3858, 92.0244 17.1635x2.46762
+ strokeColor: "transparent"
+ fillColor: "#fffdb900"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 49.99 92.17 C 51.33 92.13 63.09 92.1 64.07 92.03 C 65.9 91.89 66.18 94.42 64.07 94.42 C 61.88 94.42 50.34 94.46 49.64 94.49 C 48.02 94.57 47.8 92.24 49.99 92.17 " }
+ }
+ // PATH visit count: 13
+ ShapePath {
+ // boundingRect: 52.8347, 68.3555 12.6443x20.6092
+ strokeColor: "transparent"
+ fillColor: "#ffffe36a"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 59.42 69.01 C 59.42 69.01 53.42 84.07 53.08 85.2 C 51.67 89.92 56.74 89.78 58.08 87.1 C 58.74 85.77 65.19 72.11 65.47 69.64 C 65.75 67.18 59.42 69.01 59.42 69.01 " }
+ }
+ // PATH visit count: 13
+ ShapePath {
+ // boundingRect: 57.598, 86.3211 4.2165x4.82538
+ strokeColor: "transparent"
+ fillColor: "#ffffe36a"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 61.01 86.57 C 60.15 85.98 59.11 86.5 58.48 87.49 C 57.85 88.48 56.93 90.09 58.34 90.94 C 59.61 91.7 60.73 90.17 61.23 89.46 C 61.72 88.75 62.35 87.48 61.01 86.57 " }
+ }
+ // PATH visit count: 16
+ ShapePath {
+ // boundingRect: 65.0829, 89.7223 7.8611x17.1865
+ strokeColor: "transparent"
+ fillColor: "#ffffe36a"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 71.34 89.8 C 69.05 89.31 68.31 91.21 67.82 93.46 C 67.33 95.71 65.49 102.99 65.15 104.79 C 64.66 107.32 66.98 107.68 67.97 105.35 C 68.71 103.61 71.92 95.76 72.33 94.51 C 72.96 92.62 73.66 90.3 71.34 89.8 " }
+ }
+ // PATH visit count: 26
+ ShapePath {
+ // boundingRect: 4.48158, 6.41669 120.262x63.9578
+ strokeColor: "transparent"
+ fillColor: "#ffe4eaee"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 107.92 46.26 C 107.92 46.26 110.52 11.28 80.61 6.84 C 53.72 2.85 48.44 28.38 48.44 28.38 C 48.44 28.38 38.28 26.01 30.98 32.53 C 23.73 39.01 24.29 46.68 24.29 46.68 C 24.29 46.68 6.41 43.86 4.58 59.21 C 2.87 73.55 24.01 69.98 24.01 69.98 L 124.39 62.59 C 124.39 62.59 126.77 55.05 119.18 49.36 C 114.67 45.97 107.92 46.26 107.92 46.26 " }
+ }
+ // PATH visit count: 49
+ ShapePath {
+ // boundingRect: 4.42853, 47.15 120.397x26.7991
+ strokeColor: "transparent"
+ fillGradient: RadialGradient {
+ centerX: 65.811
+ centerY: 75.277
+ centerRadius: 29.434
+ focalX: centerX; focalY: centerY
+ GradientStop { position: 0.193; color: "#ffffe366" }
+ GradientStop { position: 0.331; color: "#ffeddd82" }
+ GradientStop { position: 0.571; color: "#ffd0d4ad" }
+ GradientStop { position: 0.759; color: "#ffbfcfc7" }
+ GradientStop { position: 0.87; color: "#ffb8cdd1" }
+ }
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 53.81 54.19 C 54.65 53.91 59.44 58 73.24 58.13 C 92.2 58.32 106.56 47.15 106.56 47.15 C 106.56 47.15 107.04 50.55 105.53 52.97 C 103.65 55.97 100.74 56.54 100.74 56.54 C 100.74 56.54 106 60.2 113.22 59.64 C 119.73 59.13 124.44 56.92 124.44 56.92 C 124.44 56.92 125.07 60.13 124.72 63.26 C 124.02 69.5 120.36 72.04 116.32 72.5 C 113.35 72.84 87.98 72.96 77.56 73.06 C 68.17 73.15 20.32 74.35 15.43 73.81 C 10.36 73.25 6.51 70.2 5.11 65.83 C 4.04 62.52 4.55 60.39 4.55 60.39 C 4.55 60.39 13.87 62.86 19.1 62.27 C 25.67 61.52 30.08 57.39 30.08 57.39 C 30.08 57.39 34.02 59.64 42.75 58.89 C 50.26 58.23 53.81 54.19 53.81 54.19 " }
+ }
+ // PATH visit count: 16
+ ShapePath {
+ // boundingRect: 91.3033, 74.1363 13.4678x20.2873
+ strokeColor: "transparent"
+ fillColor: "#ff52c0ee"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 103.9 74.2 C 102.88 73.63 99.25 77.02 97.21 79.06 C 95.96 80.31 91.98 83.58 91.44 86.73 C 90.1 94.47 98.97 96.23 102.49 92.64 C 105.15 89.93 104.67 84.64 104.67 82.86 C 104.68 80.39 105.17 74.9 103.9 74.2 " }
+ }
+ // PATH visit count: 16
+ ShapePath {
+ // boundingRect: 18.9213, 78.2966 12.9004x19.7846
+ strokeColor: "transparent"
+ fillColor: "#ff52c0ee"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 31.02 78.36 C 30.05 77.8 26.57 81.08 24.61 83.07 C 23.41 84.28 19.6 87.45 19.06 90.53 C 17.74 98.08 26.19 99.85 29.57 96.37 C 32.12 93.74 31.7 88.57 31.71 86.83 C 31.72 84.42 32.22 79.06 31.02 78.36 " }
+ }
+ // PATH visit count: 16
+ ShapePath {
+ // boundingRect: 34.7194, 100.706 13.1416x20.3505
+ strokeColor: "transparent"
+ fillColor: "#ff52c0ee"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 47.15 100.74 C 46.06 100.33 42.39 103.67 40.35 105.71 C 39.1 106.96 35.4 110.16 34.86 113.31 C 33.52 121.05 42.11 122.88 45.63 119.29 C 48.29 116.58 47.85 111.29 47.81 109.51 C 47.71 104.87 47.9 101.02 47.15 100.74 " }
+ }
+ // PATH visit count: 13
+ ShapePath {
+ // boundingRect: 93.1117, 83.8677 5.96569x6.96478
+ strokeColor: "transparent"
+ fillColor: "#ffb2e6fe"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 97.78 84.22 C 96.38 83.49 94.68 83.8 93.6 86.05 C 92.52 88.3 93.41 90.09 94.54 90.6 C 95.84 91.2 97.45 90.65 98.53 88.82 C 99.61 86.99 98.95 84.83 97.78 84.22 " }
+ }
+ // PATH visit count: 13
+ ShapePath {
+ // boundingRect: 36.0415, 110.757 5.61809x6.84249
+ strokeColor: "transparent"
+ fillColor: "#ffb2e6fe"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 40.01 110.93 C 38.57 110.43 36.99 110.96 36.27 113.27 C 35.55 115.58 36.66 117.16 37.81 117.5 C 39.14 117.89 40.6 117.14 41.38 115.23 C 42.15 113.32 41.21 111.35 40.01 110.93 " }
+ }
+ // PATH visit count: 13
+ ShapePath {
+ // boundingRect: 20.2228, 87.8513 5.75099x7.08989
+ strokeColor: "transparent"
+ fillColor: "#ffb2e6fe"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 24.07 87.97 C 22.55 87.55 20.95 88.2 20.37 90.63 C 19.79 93.06 21.03 94.62 22.24 94.88 C 23.64 95.19 25.09 94.32 25.77 92.3 C 26.44 90.3 25.35 88.32 24.07 87.97 " }
+ }
+ } // END type: DOC 0
+}
diff --git a/examples/quick/quickshapes/weatherforecast/CloudWithLightning_generated.qml b/examples/quick/quickshapes/weatherforecast/CloudWithLightning_generated.qml
new file mode 100644
index 0000000000..5be18dc851
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/CloudWithLightning_generated.qml
@@ -0,0 +1,142 @@
+// Copyright (C) 2023 Googlefonts
+// SPDX-License-Identifier: Apache-2.0
+// Generated from: assets/cloud-with-lightning-svgrepo-com.svg
+import QtQuick
+import QtQuick.Shapes
+
+Item {
+ // viewBox 0, 0 128x128
+ // size 800x800
+ implicitWidth: 800
+ implicitHeight: 800
+ // START svg1314 type: DOC 0
+ Item { // structure node
+ transform: [
+ Scale { xScale: width / 128; yScale: height / 128 }
+ ]
+ objectName: "svg1314"
+ // skipping DEFS "defs1318"
+ // PATH visit path1287 count: 27
+ DemoShape {
+ objectName: "path1287"
+ ShapePath {
+ objectName: "svg_path:path1287"
+ // boundingRect: 48.6804, 71.24 37.9392x46.8238
+ strokeColor: "#b0ab9d"
+ strokeWidth: 1
+ fillColor: "#fffeca18"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 79.83 71.24 L 57 75.21 C 57 75.21 49.4 94.57 48.93 95.88 C 48.46 97.19 48.48 99.26 50.55 99.26 C 53.18 99.26 66.53 99.19 66.53 99.19 C 66.53 99.19 63.29 114.82 63.1 116.22 C 62.91 117.62 64.41 118.85 65.73 117.44 C 67.04 116.03 85.24 92.65 86.03 91.51 C 87.44 89.47 86.08 87.59 84.48 87.5 C 82.88 87.41 72.16 87.64 72.16 87.64 L 79.83 71.24 " }
+ }
+ }
+ // PATH visit path1289 count: 11
+ DemoShape {
+ objectName: "path1289"
+ ShapePath {
+ objectName: "svg_path:path1289"
+ // boundingRect: 68.3478, 73.99 9.44218x14.9005
+ strokeColor: "transparent"
+ fillColor: "#fffdb900"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 73.71 75.04 C 73.71 75.04 68.62 86.3 68.43 86.94 C 67.87 88.84 70.33 89.61 71.03 88.07 C 71.73 86.52 77.79 73.99 77.79 73.99 L 73.71 75.04 " }
+ }
+ }
+ // PATH visit path1291 count: 13
+ DemoShape {
+ objectName: "path1291"
+ ShapePath {
+ objectName: "svg_path:path1291"
+ // boundingRect: 49.2295, 96.1544 17.1598x2.46762
+ strokeColor: "transparent"
+ fillColor: "#fffdb900"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 50.83 96.3 C 52.17 96.26 63.93 96.23 64.91 96.16 C 66.74 96.02 67.02 98.55 64.91 98.55 C 62.72 98.55 51.18 98.59 50.48 98.62 C 48.86 98.7 48.65 96.37 50.83 96.3 " }
+ }
+ }
+ // PATH visit path1293 count: 13
+ DemoShape {
+ objectName: "path1293"
+ ShapePath {
+ objectName: "svg_path:path1293"
+ // boundingRect: 53.3947, 75.3055 12.645x20.6092
+ strokeColor: "transparent"
+ fillColor: "#ffffe36a"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 59.98 75.96 C 59.98 75.96 53.98 91.02 53.64 92.15 C 52.23 96.87 57.3 96.73 58.64 94.05 C 59.3 92.72 65.75 79.06 66.03 76.59 C 66.32 74.13 59.98 75.96 59.98 75.96 " }
+ }
+ }
+ // PATH visit path1295 count: 13
+ DemoShape {
+ objectName: "path1295"
+ ShapePath {
+ objectName: "svg_path:path1295"
+ // boundingRect: 59.108, 90.9111 4.20909x4.82538
+ strokeColor: "transparent"
+ fillColor: "#ffffe36a"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 62.52 91.16 C 61.66 90.57 60.62 91.09 59.99 92.08 C 59.36 93.07 58.44 94.68 59.85 95.53 C 61.12 96.29 62.24 94.76 62.74 94.05 C 63.22 93.35 63.85 92.08 62.52 91.16 " }
+ }
+ }
+ // PATH visit path1297 count: 16
+ DemoShape {
+ objectName: "path1297"
+ ShapePath {
+ objectName: "svg_path:path1297"
+ // boundingRect: 65.8329, 94.3223 7.8611x17.1865
+ strokeColor: "transparent"
+ fillColor: "#ffffe36a"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 72.09 94.4 C 69.8 93.91 69.06 95.81 68.57 98.06 C 68.08 100.31 66.24 107.59 65.9 109.39 C 65.41 111.92 67.73 112.28 68.72 109.95 C 69.46 108.21 72.67 100.36 73.08 99.11 C 73.71 97.22 74.41 94.89 72.09 94.4 " }
+ }
+ }
+ // PATH visit path1299 count: 26
+ DemoShape {
+ objectName: "path1299"
+ ShapePath {
+ objectName: "svg_path:path1299"
+ // boundingRect: 4.45246, 10.7839 119.361x62.1608
+ strokeColor: "transparent"
+ fillColor: "#ffe4eaee"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 107.35 50.2 C 107.35 50.2 108.64 15.42 79.9 11.2 C 53.01 7.26 48.23 32.6 48.23 32.6 C 48.23 32.6 36.55 29.93 30.21 37.39 C 23.87 44.85 23.73 50.62 23.73 50.62 C 23.73 50.62 6.13 48.93 4.58 63.29 C 3.03 77.65 16.12 71.74 16.12 71.74 L 123.25 67.02 C 123.25 67.02 126.2 58.99 118.6 53.29 C 114.11 49.92 107.35 50.2 107.35 50.2 " }
+ }
+ }
+ // PATH visit path1312 count: 49
+ DemoShape {
+ objectName: "path1312"
+ ShapePath {
+ objectName: "svg_path:path1312"
+ // boundingRect: 4.32853, 52.17 119.834x25.6097
+ strokeColor: "transparent"
+ fillGradient: RadialGradient {
+ centerX: 65.427
+ centerY: 79.054
+ centerRadius: 29.294
+ focalX: centerX; focalY: centerY
+ GradientStop { position: 0.193; color: "#ffffe366" }
+ GradientStop { position: 0.331; color: "#ffeddd82" }
+ GradientStop { position: 0.571; color: "#ffd0d4ad" }
+ GradientStop { position: 0.759; color: "#ffbfcfc7" }
+ GradientStop { position: 0.87; color: "#ffb8cdd1" }
+ }
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 58.78 55.69 C 59.62 55.41 64.83 59.91 78.63 59.49 C 92.43 59.07 105.24 52.17 105.24 52.17 C 105.24 52.17 104.54 57.1 102.99 59.49 C 101.44 61.88 98.77 64.7 98.77 64.7 C 98.77 64.7 105.95 66.39 112.43 65.54 C 118.91 64.7 123.69 61.6 123.69 61.6 C 123.69 61.6 124.53 64.84 123.97 67.94 C 123.25 71.91 119.75 74.84 116.79 75.26 C 113.83 75.68 87.23 77.02 76.81 77.37 C 68.36 77.66 20.18 78.05 15.29 77.51 C 10.22 76.95 6.42 74.69 5.01 70.33 C 3.94 67.02 4.45 64.98 4.45 64.98 C 4.45 64.98 10.81 67.71 15.99 66.81 C 22.47 65.68 25.99 60.62 25.99 60.62 C 25.99 60.62 32.33 63.86 41.48 62.73 C 50.62 61.6 58.78 55.69 58.78 55.69 " }
+ }
+ }
+ // PATH visit path1377 count: 49
+ DemoShape {
+ objectName: "path1377"
+ // Scale 0.16, 0.16 Translate 0, 0
+ transform: Scale { xScale: 0.16; yScale: 0.16 }
+ ShapePath {
+ objectName: "svg_path:path1377"
+ // boundingRect: 27.0533, 67.399 748.971x418.724
+ strokeColor: "#b0ab9d"
+ strokeWidth: 6.25
+ fillColor: "transparent"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 462.465 67.416 C 326.828 69.1539 301.438 203.75 301.438 203.75 C 301.438 203.75 228.438 187.063 188.813 233.688 C 149.188 280.313 148.313 316.375 148.313 316.375 C 148.313 316.375 38.3125 305.813 28.625 395.563 C 28.2196 399.318 27.9883 402.832 27.8906 406.156 C 27.8882 406.155 27.8125 406.125 27.8125 406.125 C 27.8125 406.125 24.625 418.875 31.3125 439.563 C 40.125 466.813 63.875 480.938 95.5625 484.438 C 126.125 487.813 427.25 485.375 480.063 483.563 C 545.188 481.375 711.438 473 729.938 470.375 C 748.438 467.75 770.313 449.438 774.813 424.625 C 778.042 406.75 773.87 388.338 773.197 385.563 C 771.117 369.235 763.281 349.585 741.25 333.063 C 713.188 312 670.938 313.75 670.938 313.75 C 670.938 313.75 679 96.375 499.375 70 C 486.245 68.0762 473.96 67.2687 462.465 67.416 " }
+ }
+ }
+ } // END svg1314 type: DOC 0
+}
diff --git a/examples/quick/quickshapes/weatherforecast/CloudWithRain.qml b/examples/quick/quickshapes/weatherforecast/CloudWithRain.qml
new file mode 100644
index 0000000000..e332d90a67
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/CloudWithRain.qml
@@ -0,0 +1,5 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+CloudWithRain_generated {
+}
diff --git a/examples/quick/quickshapes/weatherforecast/CloudWithRain_generated.qml b/examples/quick/quickshapes/weatherforecast/CloudWithRain_generated.qml
new file mode 100644
index 0000000000..5ee4aaef1d
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/CloudWithRain_generated.qml
@@ -0,0 +1,114 @@
+// Copyright (C) 2023 Googlefonts
+// SPDX-License-Identifier: Apache-2.0
+// Generated from: assets/cloud-with-rain-svgrepo-com.svg
+import QtQuick
+import QtQuick.Shapes
+
+Item {
+ // viewBox 0, 0 128x128
+ // size 800x800
+ implicitWidth: 800
+ implicitHeight: 800
+ // START type: DOC 0
+ DemoShape { //combined path container
+ transform: [
+ Scale { xScale: width / 128; yScale: height / 128 }
+ ]
+ // PATH visit count: 32
+ ShapePath {
+ // boundingRect: 4.51974, 6.33677 119.18x62.539
+ strokeColor: "transparent"
+ fillColor: "#ffe2ebee"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 107.62 46.29 C 107.62 46.29 109.34 13.97 83.73 7.57 C 54.12 0.17 48.29 28.49 48.29 28.49 C 48.29 28.49 36.74 26.3 29.55 34.11 C 23.52 40.66 24.09 47.07 24.09 47.07 C 24.09 47.07 16.13 45.35 9.88 50.82 C 3.63 56.29 4.57 61.43 4.57 61.43 L 23.15 68.61 C 23.15 68.61 116.98 69.08 117.45 68.77 C 117.92 68.46 123.7 59.4 123.7 59.4 C 123.7 59.4 122.76 51.59 117.3 48.47 C 111.83 45.35 107.62 46.29 107.62 46.29 " }
+ }
+ // PATH visit count: 49
+ ShapePath {
+ // boundingRect: 4.46833, 47.5237 119.634x26.5724
+ strokeColor: "transparent"
+ fillColor: "#ffb9ced2"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 14.25 73.45 C 18.93 73.61 49.54 74.23 68.11 74.07 C 86.68 73.91 114.92 74.21 118.84 72.36 C 121.91 70.91 123.74 68.51 124.03 65.15 C 124.31 61.94 123.69 59.4 123.69 59.4 C 123.69 59.4 119.32 62.56 111.04 62.68 C 105.89 62.75 95.43 61.9 97.46 60.03 C 98.03 59.5 106.12 53.37 105.73 47.7 C 105.64 46.36 98.39 53.01 91.52 55.82 C 84.65 58.63 78.13 60.8 69.05 60.22 C 61.4 59.72 58.08 56.61 58.08 56.61 C 58.08 56.61 54.39 60.94 43.3 61.87 C 32.21 62.81 29.82 58.64 29.82 58.64 C 29.82 58.64 24.45 62.7 15.43 62.58 C 6.43 62.44 4.66 59.2 4.66 59.2 C 4.66 59.2 3.81 64.97 5.69 68.34 C 7.61 71.77 11.1 73.35 14.25 73.45 " }
+ }
+ // PATH visit count: 13
+ ShapePath {
+ // boundingRect: 58.0616, 81.5193 13.614x19.5023
+ strokeColor: "transparent"
+ fillColor: "#ff4fc4f8"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 69.99 81.57 C 68.28 80.97 62.18 85.8 59.43 90.57 C 56.67 95.36 58.47 98.86 61.42 100.3 C 64.74 101.92 69.52 100.92 70.88 96.2 C 72.22 91.53 71.83 82.22 69.99 81.57 " }
+ }
+ // PATH visit count: 13
+ ShapePath {
+ // boundingRect: 25.6777, 79.1454 13.4492x19.7249
+ strokeColor: "transparent"
+ fillColor: "#ff4fc4f8"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 37.66 79.19 C 36.11 78.64 31.08 83.31 28.82 85.83 C 25.79 89.22 23.45 95.54 29.2 98.1 C 34.99 100.67 38.75 96.46 39.04 90.64 C 39.32 85.22 38.94 79.65 37.66 79.19 " }
+ }
+ // PATH visit count: 13
+ ShapePath {
+ // boundingRect: 37.6925, 101.563 13.5018x19.9666
+ strokeColor: "transparent"
+ fillColor: "#ff4fc4f8"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 49.87 101.65 C 48.22 100.76 41.29 106.91 39.08 110.58 C 36.88 114.25 37.02 118.96 41.52 120.89 C 46.02 122.82 49.99 120.35 50.82 113.92 C 51.4 109.36 51.46 102.51 49.87 101.65 " }
+ }
+ // PATH visit count: 10
+ ShapePath {
+ // boundingRect: 71.433, 102.131 13.3742x19.7696
+ strokeColor: "transparent"
+ fillColor: "#ff4fc4f8"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 83.38 102.18 C 82.19 101.51 73.95 107.87 72.1 112.5 C 68.43 121.69 80.97 125.79 83.82 117.15 C 85.48 112.11 84.85 103.01 83.38 102.18 " }
+ }
+ // PATH visit count: 13
+ ShapePath {
+ // boundingRect: 91.7795, 82.2534 13.8268x20.1662
+ strokeColor: "transparent"
+ fillColor: "#ff4fc4f8"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 103.87 82.37 C 102.24 81.37 95.39 87.01 93.11 91.25 C 90.23 96.61 92.47 100.65 95.61 101.93 C 98.87 103.25 103.06 101.98 104.48 97.15 C 106.53 90.19 105.45 83.35 103.87 82.37 " }
+ }
+ // PATH visit count: 13
+ ShapePath {
+ // boundingRect: 93.752, 91.0753 4.98803x7.77652
+ strokeColor: "transparent"
+ fillColor: "#ffaee6fd"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 96.4 91.09 C 95.32 91.22 93.98 92.76 93.77 95.39 C 93.56 98.02 95.22 99.35 96.9 98.68 C 98.48 98.05 98.74 95.8 98.74 94.38 C 98.74 92.96 98.07 90.88 96.4 91.09 " }
+ }
+ // PATH visit count: 13
+ ShapePath {
+ // boundingRect: 59.3141, 90.2226 5.39921x7.99531
+ strokeColor: "transparent"
+ fillColor: "#ffaee6fd"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 63 90.26 C 61.86 89.94 59.74 91.7 59.37 94.55 C 59.08 96.75 59.93 98.08 61.64 98.21 C 64.02 98.39 64.77 95.46 64.71 93.67 C 64.67 92.65 64.49 90.68 63 90.26 " }
+ }
+ // PATH visit count: 13
+ ShapePath {
+ // boundingRect: 39.61, 109.787 5.08875x8.13799
+ strokeColor: "transparent"
+ fillColor: "#ffaee6fd"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 42.45 109.79 C 41.39 109.71 39.61 111.49 39.61 114.26 C 39.61 117.03 41.05 118.23 42.75 117.86 C 44.45 117.48 44.79 114.23 44.68 112.94 C 44.57 111.65 44.02 109.91 42.45 109.79 " }
+ }
+ // PATH visit count: 13
+ ShapePath {
+ // boundingRect: 27.3958, 88.3815 5.24188x7.26814
+ strokeColor: "transparent"
+ fillColor: "#ffaee6fd"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 30.91 88.44 C 29.48 88.03 27.65 89.84 27.43 91.88 C 27.2 93.92 28.15 95.4 29.66 95.63 C 31.17 95.86 32.46 94.04 32.61 91.92 C 32.77 89.8 32.24 88.81 30.91 88.44 " }
+ }
+ // PATH visit count: 13
+ ShapePath {
+ // boundingRect: 73.239, 110.966 5.19528x8.30781
+ strokeColor: "transparent"
+ fillColor: "#ffaee6fd"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 76.4 110.97 C 75.08 110.86 73.19 112.81 73.24 115.76 C 73.29 118.71 74.82 119.21 75.83 119.27 C 77.28 119.36 78.29 117.65 78.42 114.97 C 78.53 112.72 78.02 111.1 76.4 110.97 " }
+ }
+ } // END type: DOC 0
+}
diff --git a/examples/quick/quickshapes/weatherforecast/CloudWithSnow.qml b/examples/quick/quickshapes/weatherforecast/CloudWithSnow.qml
new file mode 100644
index 0000000000..d74648898f
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/CloudWithSnow.qml
@@ -0,0 +1,5 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+CloudWithSnow_generated {
+}
diff --git a/examples/quick/quickshapes/weatherforecast/CloudWithSnow_generated.qml b/examples/quick/quickshapes/weatherforecast/CloudWithSnow_generated.qml
new file mode 100644
index 0000000000..314defa445
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/CloudWithSnow_generated.qml
@@ -0,0 +1,74 @@
+// Copyright (C) 2023 Googlefonts
+// SPDX-License-Identifier: Apache-2.0
+// Generated from: assets/cloud-with-snow-svgrepo-com.svg
+import QtQuick
+import QtQuick.Shapes
+
+Item {
+ // viewBox 0, 0 128x128
+ // size 800x800
+ implicitWidth: 800
+ implicitHeight: 800
+ // START type: DOC 0
+ DemoShape { //combined path container
+ transform: [
+ Scale { xScale: width / 128; yScale: height / 128 }
+ ]
+ // PATH visit count: 26
+ ShapePath {
+ // boundingRect: 4.90965, 6.40871 119.834x64.0813
+ strokeColor: "transparent"
+ fillColor: "#ffe4eaee"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 108.55 45.69 C 108.55 45.69 110.52 11.27 80.61 6.83 C 53.72 2.85 48.44 28.38 48.44 28.38 C 48.44 28.38 38.92 25.94 31.62 32.46 C 24.36 38.93 25 46.11 25 46.11 C 25 46.11 6.84 44.28 5.01 59.63 C 3.3 73.97 24.01 69.98 24.01 69.98 L 124.39 62.59 C 124.39 62.59 126.77 55.05 119.18 49.36 C 114.67 45.97 108.55 45.69 108.55 45.69 " }
+ }
+ // PATH visit count: 49
+ ShapePath {
+ // boundingRect: 4.80443, 46.68 120.011x26.4483
+ strokeColor: "transparent"
+ fillColor: "#ffb9ced2"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 56.95 55.83 C 57.79 55.55 60.32 58.79 74.13 58.79 C 88.49 58.79 106.23 46.68 106.23 46.68 C 106.23 46.68 106.16 51.42 104.68 53.86 C 102.71 57.1 98.2 58.93 98.2 58.93 C 98.2 58.93 104.68 61.6 113.26 60.9 C 119.77 60.37 124.43 56.91 124.43 56.91 C 124.43 56.91 125.06 60.12 124.71 63.25 C 124.01 69.49 120.39 71.27 116.36 71.74 C 113.39 72.08 87.97 72.95 77.55 73.05 C 68.16 73.14 20.59 73.26 15.7 72.72 C 10.63 72.16 6.83 69.48 5.42 65.12 C 4.35 61.81 5 58.64 5 58.64 C 5 58.64 10.77 60.89 17.67 60.89 C 24.28 60.89 29.21 57.79 29.21 57.79 C 29.21 57.79 34.42 61.36 43.15 60.61 C 50.69 59.97 56.95 55.83 56.95 55.83 " }
+ }
+ // PATH visit count: 71
+ ShapePath {
+ // boundingRect: 92.5268, 76.076 22.6332x20.233
+ strokeColor: "transparent"
+ fillColor: "#ff92c9f4"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 104.07 81.59 C 104.07 81.59 106.32 77.93 106.92 77.19 C 107.52 76.45 108.54 75.64 109.81 76.35 C 111.08 77.05 110.65 78.5 110.3 79.13 C 109.95 79.76 107.84 83.85 107.84 83.85 C 107.84 83.85 111.82 83.89 112.7 83.89 C 113.58 83.89 115.16 84.59 115.16 86.14 C 115.16 87.48 114.53 88.32 113.01 88.39 C 111.49 88.46 107.7 88.46 107.7 88.46 C 107.7 88.46 109.74 91.8 110.34 92.82 C 110.94 93.84 111.01 95.07 110.13 95.81 C 109 96.76 107.53 96.23 106.65 94.86 C 105.99 93.82 103.94 90.85 103.94 90.85 C 103.94 90.85 101.51 94.37 100.88 95.14 C 100.25 95.91 99.09 96.83 97.92 95.95 C 96.48 94.86 97.31 93.63 97.92 92.68 L 100.52 88.6 C 100.52 88.6 96.09 88.49 94.82 88.49 C 93.55 88.49 92.46 87.79 92.53 86.34 C 92.6 84.86 93.52 84.26 95.03 84.23 C 96.54 84.19 100.56 84.19 100.56 84.19 C 100.56 84.19 98.1 80.67 97.46 79.65 C 96.83 78.63 96.76 77.33 97.74 76.59 C 98.73 75.85 99.89 76.27 100.63 77.22 C 101.37 78.17 104.07 81.59 104.07 81.59 " }
+ }
+ // PATH visit count: 71
+ ShapePath {
+ // boundingRect: 53.6668, 79.706 22.6332x20.233
+ strokeColor: "transparent"
+ fillColor: "#ff92c9f4"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 65.21 85.22 C 65.21 85.22 67.46 81.56 68.06 80.82 C 68.66 80.08 69.68 79.27 70.95 79.98 C 72.22 80.68 71.79 82.13 71.44 82.76 C 71.09 83.39 68.98 87.48 68.98 87.48 C 68.98 87.48 72.96 87.52 73.84 87.52 C 74.72 87.52 76.3 88.22 76.3 89.77 C 76.3 91.11 75.67 91.95 74.15 92.02 C 72.64 92.09 68.84 92.09 68.84 92.09 C 68.84 92.09 70.88 95.43 71.48 96.45 C 72.08 97.47 72.15 98.7 71.27 99.44 C 70.14 100.39 68.67 99.86 67.79 98.49 C 67.13 97.45 65.08 94.48 65.08 94.48 C 65.08 94.48 62.65 98 62.02 98.77 C 61.39 99.54 60.23 100.46 59.06 99.58 C 57.62 98.49 58.45 97.26 59.06 96.31 L 61.66 92.23 C 61.66 92.23 57.23 92.12 55.96 92.12 C 54.69 92.12 53.6 91.42 53.67 89.97 C 53.74 88.49 54.66 87.89 56.17 87.86 C 57.68 87.82 61.7 87.82 61.7 87.82 C 61.7 87.82 59.24 84.3 58.6 83.28 C 57.97 82.26 57.9 80.96 58.88 80.22 C 59.87 79.48 61.03 79.9 61.77 80.85 C 62.51 81.8 65.21 85.22 65.21 85.22 " }
+ }
+ // PATH visit count: 71
+ ShapePath {
+ // boundingRect: 32.6468, 99.916 22.6332x20.233
+ strokeColor: "transparent"
+ fillColor: "#ff92c9f4"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 44.19 105.43 C 44.19 105.43 46.44 101.77 47.04 101.03 C 47.64 100.29 48.66 99.48 49.93 100.19 C 51.2 100.89 50.77 102.34 50.42 102.97 C 50.07 103.6 47.96 107.69 47.96 107.69 C 47.96 107.69 51.94 107.73 52.82 107.73 C 53.7 107.73 55.28 108.43 55.28 109.98 C 55.28 111.32 54.65 112.16 53.13 112.23 C 51.62 112.3 47.82 112.3 47.82 112.3 C 47.82 112.3 49.86 115.64 50.46 116.66 C 51.06 117.68 51.13 118.91 50.25 119.65 C 49.12 120.6 47.65 120.07 46.77 118.7 C 46.11 117.66 44.06 114.69 44.06 114.69 C 44.06 114.69 41.63 118.21 41 118.98 C 40.37 119.75 39.21 120.67 38.04 119.79 C 36.6 118.7 37.43 117.47 38.04 116.52 L 40.64 112.44 C 40.64 112.44 36.21 112.33 34.94 112.33 C 33.67 112.33 32.58 111.63 32.65 110.18 C 32.72 108.7 33.64 108.1 35.15 108.07 C 36.66 108.03 40.68 108.03 40.68 108.03 C 40.68 108.03 38.22 104.51 37.58 103.49 C 36.95 102.47 36.88 101.17 37.86 100.43 C 38.85 99.69 40.01 100.11 40.75 101.06 C 41.49 102.01 44.19 105.43 44.19 105.43 " }
+ }
+ // PATH visit count: 71
+ ShapePath {
+ // boundingRect: 15.2836, 76.7159 22.6366x20.215
+ strokeColor: "transparent"
+ fillColor: "#ff92c9f4"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 26.9 82.16 C 26.9 82.16 29.21 78.53 29.82 77.8 C 30.43 77.07 31.47 76.28 32.72 77 C 33.98 77.72 33.53 79.16 33.17 79.79 C 32.81 80.42 30.63 84.47 30.63 84.47 C 30.63 84.47 34.61 84.57 35.49 84.58 C 36.37 84.59 37.94 85.32 37.92 86.87 C 37.9 88.21 37.25 89.04 35.74 89.09 C 34.23 89.14 30.43 89.08 30.43 89.08 C 30.43 89.08 32.42 92.45 33 93.48 C 33.58 94.51 33.64 95.74 32.74 96.47 C 31.6 97.4 30.13 96.85 29.27 95.47 C 28.62 94.42 26.62 91.42 26.62 91.42 C 26.62 91.42 24.14 94.9 23.49 95.67 C 22.84 96.43 21.68 97.34 20.52 96.43 C 19.09 95.32 19.95 94.1 20.57 93.16 L 23.24 89.12 C 23.24 89.12 18.81 88.95 17.54 88.93 C 16.27 88.91 15.19 88.19 15.29 86.75 C 15.38 85.27 16.31 84.69 17.82 84.68 C 19.33 84.67 23.35 84.73 23.35 84.73 C 23.35 84.73 20.94 81.17 20.32 80.14 C 19.7 79.11 19.65 77.81 20.65 77.08 C 21.65 76.36 22.8 76.8 23.53 77.76 C 24.24 78.7 26.9 82.16 26.9 82.16 " }
+ }
+ // PATH visit count: 71
+ ShapePath {
+ // boundingRect: 75.5368, 99.636 22.6332x20.233
+ strokeColor: "transparent"
+ fillColor: "#ff92c9f4"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 87.08 105.15 C 87.08 105.15 89.33 101.49 89.93 100.75 C 90.53 100.01 91.55 99.2 92.82 99.91 C 94.09 100.61 93.66 102.06 93.31 102.69 C 92.96 103.32 90.85 107.41 90.85 107.41 C 90.85 107.41 94.83 107.45 95.71 107.45 C 96.59 107.45 98.17 108.15 98.17 109.7 C 98.17 111.04 97.54 111.88 96.02 111.95 C 94.5 112.02 90.71 112.02 90.71 112.02 C 90.71 112.02 92.75 115.36 93.35 116.38 C 93.95 117.4 94.02 118.63 93.14 119.37 C 92.01 120.32 90.54 119.79 89.66 118.42 C 89 117.38 86.95 114.41 86.95 114.41 C 86.95 114.41 84.52 117.93 83.89 118.7 C 83.26 119.47 82.1 120.39 80.93 119.51 C 79.49 118.42 80.32 117.19 80.93 116.24 L 83.53 112.16 C 83.53 112.16 79.1 112.05 77.83 112.05 C 76.56 112.05 75.47 111.35 75.54 109.9 C 75.61 108.42 76.53 107.82 78.04 107.79 C 79.55 107.76 83.57 107.75 83.57 107.75 C 83.57 107.75 81.11 104.23 80.47 103.21 C 79.84 102.19 79.77 100.89 80.75 100.15 C 81.74 99.41 82.9 99.83 83.64 100.78 C 84.38 101.73 87.08 105.15 87.08 105.15 " }
+ }
+ } // END type: DOC 0
+}
diff --git a/examples/quick/quickshapes/weatherforecast/Cloud_generated.qml b/examples/quick/quickshapes/weatherforecast/Cloud_generated.qml
new file mode 100644
index 0000000000..6c097d5b76
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/Cloud_generated.qml
@@ -0,0 +1,59 @@
+// Copyright (C) 2023 Googlefonts
+// SPDX-License-Identifier: Apache-2.0
+// Generated from: assets/cloud-svgrepo-com.svg
+import QtQuick
+import QtQuick.Shapes
+
+Item {
+ // viewBox 0, 0 128x128
+ // size 800x800
+ implicitWidth: 800
+ implicitHeight: 800
+ // START svg1047 type: DOC 0
+ Item { // structure node
+ transform: [
+ Scale { xScale: width / 128; yScale: height / 128 }
+ ]
+ objectName: "svg1047"
+ // skipping DEFS "defs1051"
+ // PATH visit path1043 count: 33
+ DemoShape {
+ objectName: "path1043"
+ ShapePath {
+ objectName: "svg_path:path1043"
+ // boundingRect: 4.51543, 20.1148 119.331x70.3352
+ strokeColor: "transparent"
+ fillColor: "#ffe4eaee"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 23.45 62.3 C 24.17 61.58 22.18 53.01 31.05 46.39 C 39.92 39.77 45.97 43.72 46.82 43.43 C 47.66 43.15 51.61 25.83 68.22 21.33 C 84.83 16.83 102.15 25.27 106.23 39.35 C 109.96 52.22 107.07 60.89 107.5 61.45 C 107.92 62.01 115.95 61.73 120.59 69.19 C 125.23 76.65 123.55 81.3 123.55 81.3 L 93.99 90.45 L 46.69 90.45 C 46.69 90.45 5.02 79.47 4.6 77.5 C 4.18 75.53 5.13 69.13 11.92 65.25 C 17.82 61.88 22.18 63.57 23.45 62.3 " }
+ }
+ }
+ // PATH visit path1045 count: 52
+ DemoShape {
+ objectName: "path1045"
+ ShapePath {
+ objectName: "svg_path:path1045"
+ // boundingRect: 4.21403, 74.83 119.62x29.9249
+ strokeColor: "transparent"
+ fillColor: "#ffbacdd2"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 35.16 92.84 C 35.16 92.84 19.38 96.14 8.71 87.88 C 2.29 82.9 4.63 74.83 4.63 74.83 C 4.63 74.83 9.23 79.48 18.52 80.74 C 27.81 82.01 38.23 81.58 38.23 81.58 C 38.23 81.58 40.83 86.02 50.62 88.06 C 62.89 90.61 69.36 84.33 69.36 84.33 C 69.36 84.33 72.72 88.35 84.55 88.63 C 96.38 88.91 103.01 80.65 104.12 80.46 C 104.68 80.37 107.94 83.33 114.4 82.29 C 120.55 81.3 123.79 78.63 123.79 78.63 C 123.79 78.63 124.68 85.25 118.49 89.33 C 113.66 92.51 105.26 92.85 105.26 92.85 C 105.26 92.85 103.98 97.76 98.21 101.33 C 92.85 104.66 83.61 105.77 76.77 103.73 C 68.18 101.17 66.05 97.26 66.05 97.26 C 66.05 97.26 59.65 101.01 49.65 99.74 C 40.2 98.56 35.16 92.84 35.16 92.84 " }
+ }
+ }
+ // PATH visit path1183 count: 61
+ DemoShape {
+ objectName: "path1183"
+ // Scale 0.16, 0.16 Translate 0, 0
+ transform: Scale { xScale: 0.16; yScale: 0.16 }
+ ShapePath {
+ objectName: "svg_path:path1183"
+ // boundingRect: 26.3377, 125.717 747.693x529.001
+ strokeColor: "#000000"
+ strokeWidth: 6.25
+ fillColor: "transparent"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 484.662 125.721 C 465.46 125.608 445.84 128.039 426.375 133.313 C 322.563 161.438 297.875 269.688 292.625 271.438 C 287.313 273.25 249.5 248.563 194.063 289.938 C 138.625 331.313 151.063 384.875 146.563 389.375 C 138.625 397.313 111.375 386.75 74.5 407.813 C 44.2186 425.116 32.5285 450.433 29.2656 467.994 C 29.2126 467.942 28.9375 467.688 28.9375 467.688 C 28.9375 467.688 14.3125 518.125 54.4375 549.25 C 121.125 600.875 219.75 580.25 219.75 580.25 C 219.75 580.25 251.25 616 310.313 623.375 C 372.813 631.313 412.813 607.875 412.813 607.875 C 412.813 607.875 426.125 632.313 479.813 648.313 C 522.563 661.063 580.313 654.125 613.813 633.313 C 649.875 611 657.875 580.313 657.875 580.313 C 657.875 580.313 710.375 578.188 740.563 558.313 C 770.74 538.421 773.978 508.955 773.949 496.918 C 774.565 484.395 772.045 461.952 753.688 432.438 C 724.688 385.813 674.5 387.563 671.875 384.063 C 669.188 380.563 687.25 326.375 663.938 245.938 C 643.219 174.438 567.871 126.207 484.662 125.721 " }
+ }
+ }
+ } // END svg1047 type: DOC 0
+}
diff --git a/examples/quick/quickshapes/weatherforecast/DemoShape.qml b/examples/quick/quickshapes/weatherforecast/DemoShape.qml
new file mode 100644
index 0000000000..e0719d39f9
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/DemoShape.qml
@@ -0,0 +1,12 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+
+Shape {
+ id: item
+ preferredRendererType: mainWindow.preferredRendererType
+ property string svg_id
+ containsMode: Shape.FillContains
+}
diff --git a/examples/quick/quickshapes/weatherforecast/Europe.qml b/examples/quick/quickshapes/weatherforecast/Europe.qml
new file mode 100644
index 0000000000..20a804c28b
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/Europe.qml
@@ -0,0 +1,176 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+Europe_generated {
+ id: map
+ property int containsMode: Shape.FillContains
+
+ property bool zoomedIn: false
+ signal zoomTo(Item child, string name, var childRect, var textRect)
+
+
+property var lookupTable: {
+ "fi" : "Finland"
+ ,"se" : "Sweden"
+ ,"dk" : "Denmark"
+ ,"gb-nir" : "Northern Ireland"
+ ,"gb-main" : "Great Britain"
+ ,"ie" : "Ireland"
+ ,"nl" : "The Netherlands"
+ ,"be" : "Belgium"
+ ,"lu" : "Luxembourg"
+ ,"de" : "Germany"
+ ,"fr" : "France"
+ ,"es" : "Spain"
+ ,"pt" : "Portugal"
+ ,"at" : "Austria"
+ ,"it" : "Italy"
+ ,"gr" : "Greece"
+ ,"ee" : "Estonia"
+ ,"lv" : "Latvia"
+ ,"lt" : "Lithuania"
+ ,"pl" : "Poland"
+ ,"cz" : "Czechia"
+ ,"sk" : "Slovakia"
+ ,"si" : "Slovenia"
+ ,"hu" : "Hungary"
+ ,"ro" : "Romania"
+ ,"bg" : "Bulgaria"
+ ,"cy" : "Cyprus"
+ ,"mt" : "Malta"
+ ,"hr" : "Croatia"
+ ,"ba" : "Bosnia and Herzegovina"
+ ,"me" : "Montenegro"
+ ,"rs" : "Serbia"
+ ,"rs-km" : "Kosovo"
+ ,"mk" : "North Makedonia"
+ ,"al" : "Albania"
+ ,"is" : "Iceland"
+ ,"by" : "Belarus"
+ ,"no" : "Norway"
+ ,"ua" : "Ukraine"
+ ,"ch" : "Switzerland"
+ ,"md" : "Moldova"
+ ,"ad" : "Andorra"
+ ,"mc" : "Monaco"
+ ,"li" : "Liechtenstein"
+ ,"ru-kgd" : "Kaliningrad"
+ ,"im" : "Isle of Man"
+ ,"fo" : "Faroe Islands"
+ }
+
+ property var overrideRects: {
+ "fi": {x: 6616, y: 1996, width: 1920, height: 800, rotation: 65},
+ "no": {x: 4794, y: 1967, width: 3360, height: 680, rotation: -65},
+ "se": {x: 5739, y: 2560, width: 1920, height: 800, rotation: -80},
+ "it": {x: 5734, y: 6483, width: 1680, height: 440, rotation: 45},
+ "pt": {x: 3105, y: 6783, width: 960, height: 320, rotation: -70},
+ "md": {x: 8294, y: 5472, width: 480, height: 200, rotation: 45},
+ "rs": {x: 7233, y: 6168, width: 840, height: 320, rotation: 45},
+ "gb-main": {x: 3943, y: 3998, width: 1800, height: 800, rotation: 75},
+ "ba": {x: 6570, y: 6289, width: 1440, height: 200, rotation: 0},
+ "al": {x: 7312, y: 6830, width: 600, height: 200, rotation: 75},
+ "be": {x: 5237, y: 5126, width: 600, height: 200, rotation: 40},
+ "hr": {x: 6705, y: 6053, width: 840, height: 200, rotation: 0},
+ "at": {x: 6191, y: 5556, width: 1080, height: 440, rotation: -25},
+ "cy": {x: 9509, y: 7497, width: 480, height: 200, rotation: -35},
+ }
+
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+
+ property Item currentChild: null
+ property color prevColor
+ property color selectedColor: "#dbd6c8"
+
+ acceptedButtons: Qt.LeftButton
+
+ function traverseChildren(item, x, y) {
+ let p = item.mapFromItem(mouseArea, x, y)
+ if (item.objectName) {
+ if (item.contains(p))
+ return item;
+ }
+ for (var i = 0; i < item.children.length; i++) {
+ let r = traverseChildren(item.children[i], x, y)
+ if (r)
+ return r;
+ }
+ return null;
+ }
+
+ function findChild(x, y) {
+ return traverseChildren(map, x, y)
+ }
+
+ function findMatchingPath(node) {
+ if (!node)
+ return null
+ let pathName = "svg_path:" + node.objectName
+ for (var i = 0; i < node.data.length; i++) {
+ let child = node.data[i]
+ if (child.objectName === pathName)
+ return child
+ }
+ return null
+ }
+
+ onPressed: (mouse)=> {
+ if (!map.zoomedIn) {
+ currentChild = findChild(mouse.x, mouse.y)
+ let path = findMatchingPath(currentChild)
+ if (path) {
+ prevColor = path.fillColor
+ path.fillColor = selectedColor
+ currentChild.z = 1
+ }
+ }
+ }
+
+ onPositionChanged: (mouse)=> {
+ if (currentChild) {
+ let localPos = currentChild.mapFromItem(mouseArea, mouse.x, mouse.y)
+ let path = findMatchingPath(currentChild)
+ if (path) {
+ if (currentChild.contains(localPos)) {
+ path.fillColor = selectedColor
+ } else {
+ path.fillColor = prevColor
+ }
+ }
+ }
+ }
+
+ onReleased: (mouse) => {
+ if (map.zoomedIn) {
+ zoomTo(null, null, null, null)
+ zoomedIn = false
+ if (currentChild) {
+ let path = findMatchingPath(currentChild)
+ if (path)
+ path.fillColor = prevColor
+ currentChild.z = 0
+ currentChild = null
+ }
+ } else if (currentChild) {
+ let localPos = currentChild.mapFromItem(mouseArea, mouse.x, mouse.y)
+ if (currentChild.contains(localPos)) {
+ let br = currentChild.boundingRect
+ let rot = 0
+ let or = overrideRects[currentChild.objectName]
+ if (or) {
+ rot = or.rotation
+ let r = currentChild.mapToItem(map, or.x, or.y, or.width, or.height)
+ or = {x: r.x, y: r.y, width: r.width, height: r.height, rotation: rot}
+ }
+ let rect = currentChild.mapToItem(map, br)
+ zoomTo(currentChild, lookupTable[currentChild.objectName], rect, or )
+ zoomedIn = true
+ }
+ }
+ }
+ }
+}
diff --git a/examples/quick/quickshapes/weatherforecast/Europe_generated.qml b/examples/quick/quickshapes/weatherforecast/Europe_generated.qml
new file mode 100644
index 0000000000..4f03b87e37
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/Europe_generated.qml
@@ -0,0 +1,647 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// Copyright (C) 2010 Kolja21
+// SPDX-License-Identifier: CC-BY-3.0
+// Generated from: assets/Europe.svg
+import QtQuick
+import QtQuick.Shapes
+
+Item {
+ // viewBox 1754, 161 6480.48x6957.59
+ // size 443x455
+ implicitWidth: 443
+ implicitHeight: 455
+ // START Europakarte type: DOC 0
+ Item { // structure node
+ transform: [
+ Translate { x: -1754; y: -161 },
+ Scale { xScale: width / 6480.48; yScale: height / 6957.59 }
+ ]
+ objectName: "Europakarte"
+ // skipping DEFS "defs"
+ // START countries type: G 1
+ Item { // structure node
+ objectName: "countries"
+ // Translate -1630.41, -991.638
+ x: -1630.41
+ y: -991.638
+ // PATH visit fi count: 485
+ DemoShape {
+ objectName: "fi"
+ ShapePath {
+ objectName: "svg_path:fi"
+ // boundingRect: 6920, 1421.37 1086.48x1971.11
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 7814.3 3152.63 C 7822.9 3119.67 7850.13 3085.28 7867.33 3056.61 C 7911.75 2977.79 7938.98 2887.5 7969.08 2802.94 C 7992.01 2741.32 7999.18 2725.55 8002.04 2659.63 C 8003.48 2649.59 8009.21 2638.13 8004.91 2628.1 C 7993.44 2595.13 7865.89 2547.84 7832.93 2524.91 C 7828.63 2522.04 7880.22 2443.22 7844.39 2415.99 C 7831.5 2405.96 7804.27 2415.99 7795.67 2401.66 C 7758.4 2337.16 7804.27 2367.26 7792.8 2348.63 C 7775.6 2322.83 7756.97 2342.9 7735.47 2317.1 C 7716.84 2295.6 7729.74 2294.17 7739.77 2274.1 C 7745.51 2261.21 7711.11 2261.21 7711.11 2255.47 C 7712.54 2245.44 7712.54 2193.85 7712.54 2192.41 C 7682.45 2166.62 7718.28 2182.38 7726.88 2172.35 C 7732.61 2163.75 7696.78 2112.16 7692.48 2106.42 C 7668.12 2073.46 7640.89 2034.77 7612.22 2006.1 C 7607.92 2001.8 7584.99 1984.6 7580.69 1976.01 C 7559.19 1935.88 7627.99 1834.12 7600.76 1809.76 C 7593.59 1801.16 7580.69 1801.16 7572.09 1795.43 C 7556.33 1783.96 7549.16 1763.9 7533.4 1753.86 C 7531.96 1753.86 7483.24 1746.7 7481.8 1746.7 C 7473.2 1739.53 7470.34 1728.07 7464.61 1718.04 C 7433.08 1666.44 7470.34 1670.74 7454.57 1633.48 C 7447.41 1616.28 7420.18 1632.05 7425.91 1622.01 C 7433.08 1609.12 7443.11 1600.52 7451.71 1589.05 C 7405.85 1567.55 7466.04 1533.16 7447.41 1501.63 C 7418.74 1451.47 7374.32 1470.1 7337.05 1429.97 L 7335.62 1422.8 C 7334.19 1422.8 7332.75 1422.8 7331.32 1424.24 C 7331.32 1422.8 7329.89 1422.8 7329.89 1421.37 L 7329.89 1424.24 C 7301.22 1429.97 7306.96 1462.93 7282.59 1470.1 C 7261.1 1475.83 7269.7 1445.73 7245.33 1472.96 C 7242.47 1477.26 7245.33 1484.43 7243.9 1490.16 C 7242.47 1491.6 7226.7 1521.69 7226.7 1523.13 C 7222.4 1534.59 7231 1571.85 7232.43 1581.89 C 7232.43 1586.18 7229.57 1589.05 7229.57 1593.35 C 7229.57 1601.95 7231 1609.12 7232.43 1617.71 C 7236.73 1629.18 7246.76 1637.78 7248.2 1649.24 C 7255.36 1699.4 7242.47 1665.01 7225.27 1680.77 C 7205.2 1700.84 7223.83 1706.57 7218.1 1730.93 C 7216.67 1736.67 7210.94 1739.53 7209.5 1745.27 C 7209.5 1746.7 7190.87 1729.5 7188 1728.07 C 7183.71 1725.2 7130.68 1706.57 7126.38 1712.3 C 7120.65 1718.04 7124.95 1729.5 7120.65 1735.23 C 7103.45 1765.33 7080.52 1746.7 7056.15 1751 C 7048.99 1751 7041.82 1755.3 7036.09 1753.86 L 7030.36 1749.57 C 7027.49 1743.83 7027.49 1735.23 7024.62 1729.5 C 7014.59 1712.3 6981.63 1667.87 6964.43 1657.84 C 6927.17 1636.35 6925.74 1666.44 6928.6 1689.37 L 6920 1719.47 C 6920 1719.47 6921.44 1719.47 6921.44 1719.47 L 6920 1720.9 L 6925.74 1728.07 C 6924.3 1730.93 6918.57 1732.37 6925.74 1736.67 C 6950.1 1755.3 6991.66 1789.69 7017.46 1801.16 C 7047.55 1814.06 7071.92 1802.59 7099.15 1829.82 C 7104.88 1834.12 7100.58 1847.02 7106.31 1849.89 C 7110.61 1851.32 7113.48 1844.15 7116.35 1845.59 C 7127.81 1849.89 7132.11 1864.22 7140.71 1872.82 C 7143.58 1875.68 7152.18 1875.68 7150.74 1879.98 C 7134.98 1910.08 7152.18 1911.51 7156.48 1945.91 C 7157.91 1951.64 7152.18 1957.37 7152.18 1963.11 C 7150.74 1964.54 7150.74 1964.54 7150.74 1964.54 C 7150.74 1978.87 7172.24 1967.41 7177.97 1973.14 C 7196.6 1987.47 7166.51 2007.54 7175.11 2021.87 C 7183.71 2041.93 7218.1 2060.56 7220.97 2083.49 C 7222.4 2100.69 7209.5 2155.15 7210.94 2162.32 C 7223.83 2208.18 7255.36 2223.94 7272.56 2261.21 C 7278.29 2251.17 7285.46 2242.57 7305.52 2254.04 C 7315.56 2259.77 7309.82 2279.84 7319.86 2285.57 C 7328.45 2291.3 7339.92 2279.84 7349.95 2282.7 C 7354.25 2282.7 7354.25 2291.3 7357.12 2294.17 C 7365.72 2298.47 7365.72 2281.27 7374.32 2295.6 C 7390.08 2328.56 7378.62 2357.23 7384.35 2371.56 C 7388.65 2384.46 7427.34 2355.79 7410.15 2397.36 C 7405.85 2407.39 7391.51 2404.52 7382.92 2410.25 C 7374.32 2415.99 7364.28 2420.29 7358.55 2428.89 C 7355.69 2431.75 7359.98 2438.92 7357.12 2441.78 C 7354.25 2444.65 7347.09 2437.49 7345.65 2440.35 C 7341.35 2450.38 7339.92 2463.28 7339.92 2474.75 C 7339.92 2481.91 7344.22 2489.08 7341.35 2496.24 C 7339.92 2509.14 7322.72 2514.88 7319.86 2526.34 C 7316.99 2534.94 7324.16 2544.97 7321.29 2552.14 C 7314.12 2567.9 7298.36 2565.04 7296.93 2586.53 C 7295.49 2590.83 7304.09 2595.13 7304.09 2600.87 C 7299.79 2628.1 7261.1 2623.8 7259.66 2648.16 C 7258.23 2658.19 7251.06 2683.99 7249.63 2685.42 C 7243.9 2685.42 7236.73 2671.09 7231 2675.39 C 7218.1 2686.86 7238.17 2715.52 7225.27 2724.12 C 7220.97 2726.98 7212.37 2708.35 7213.8 2714.09 C 7213.8 2721.25 7223.83 2724.12 7226.7 2731.28 C 7239.6 2778.58 7222.4 2747.05 7202.34 2769.98 C 7198.04 2775.71 7206.64 2790.04 7200.9 2790.04 C 7192.3 2788.61 7196.6 2771.41 7189.44 2769.98 C 7177.97 2767.11 7163.64 2771.41 7157.91 2781.44 C 7134.98 2820.14 7183.71 2792.91 7180.84 2815.84 C 7177.97 2830.17 7140.71 2854.54 7139.28 2870.3 C 7132.11 2964.89 7140.71 2867.43 7155.04 2903.26 C 7156.48 2904.7 7142.14 2930.49 7153.61 2937.66 C 7155.04 2939.09 7157.91 2931.93 7159.34 2933.36 C 7162.21 2937.66 7157.91 2947.69 7163.64 2949.13 C 7166.51 2950.56 7160.77 2936.23 7165.07 2936.23 C 7169.37 2934.79 7170.81 2940.53 7172.24 2944.83 C 7180.84 2967.76 7170.81 3005.02 7175.11 3013.62 C 7177.97 3019.35 7186.57 3016.48 7190.87 3020.78 C 7196.6 3027.95 7199.47 3036.55 7203.77 3043.71 C 7205.2 3046.58 7202.34 3050.88 7203.77 3053.75 C 7206.64 3058.05 7212.37 3058.05 7215.23 3060.91 C 7216.67 3062.35 7209.5 3060.91 7209.5 3062.35 C 7208.07 3065.21 7210.94 3068.08 7212.37 3070.94 C 7219.53 3079.54 7235.3 3083.84 7233.87 3093.87 C 7232.43 3102.47 7209.5 3095.31 7208.07 3103.91 C 7205.2 3115.37 7222.4 3122.54 7225.27 3132.57 C 7226.7 3136.87 7219.53 3141.17 7220.97 3146.9 C 7222.4 3149.77 7231 3149.77 7231 3154.07 C 7229.57 3172.7 7215.23 3152.63 7220.97 3168.4 C 7222.4 3174.13 7229.57 3178.43 7228.13 3182.73 C 7226.7 3188.46 7212.37 3181.3 7210.94 3185.6 C 7209.5 3222.86 7225.27 3227.16 7236.73 3242.92 C 7239.6 3245.79 7225.27 3248.66 7228.13 3252.96 C 7229.57 3260.12 7232.43 3265.85 7236.73 3271.59 C 7268.26 3313.15 7243.9 3270.15 7273.99 3264.42 C 7279.73 3264.42 7268.26 3280.19 7273.99 3284.49 C 7282.59 3288.79 7292.63 3281.62 7302.66 3281.62 C 7311.26 3283.05 7315.56 3297.38 7322.72 3297.38 C 7329.89 3297.38 7332.75 3288.79 7338.49 3288.79 C 7341.35 3287.35 7338.49 3293.08 7339.92 3294.52 C 7344.22 3295.95 7347.09 3294.52 7351.39 3293.08 C 7352.82 3291.65 7352.82 3283.05 7354.25 3285.92 C 7368.58 3317.45 7345.65 3323.18 7351.39 3324.61 C 7354.25 3324.61 7387.21 3300.25 7391.51 3297.38 C 7392.95 3295.95 7395.81 3288.79 7397.25 3287.35 C 7390.08 3308.85 7371.45 3333.21 7405.85 3346.11 C 7411.58 3348.98 7423.04 3336.08 7425.91 3341.81 C 7428.78 3350.41 7405.85 3363.31 7414.44 3366.18 C 7423.04 3370.48 7421.61 3346.11 7430.21 3344.68 C 7437.38 3343.25 7431.64 3359.01 7428.78 3364.74 C 7424.48 3371.91 7415.88 3374.78 7408.71 3380.51 C 7405.85 3384.81 7394.38 3394.84 7398.68 3391.97 C 7443.11 3374.78 7425.91 3346.11 7448.84 3331.78 C 7456.01 3327.48 7437.38 3350.41 7444.54 3354.71 C 7454.57 3360.44 7467.47 3353.28 7477.5 3347.55 C 7484.67 3344.68 7487.54 3333.21 7493.27 3328.91 C 7501.87 3321.75 7540.56 3317.45 7544.86 3311.72 C 7549.16 3307.42 7534.83 3300.25 7539.13 3295.95 C 7546.3 3290.22 7557.76 3294.52 7567.79 3293.08 C 7570.66 3293.08 7576.39 3294.52 7577.83 3291.65 C 7580.69 3287.35 7574.96 3281.62 7576.39 3278.75 C 7577.83 3275.89 7577.83 3285.92 7580.69 3287.35 C 7582.13 3288.79 7619.39 3265.85 7622.25 3261.56 C 7623.69 3260.12 7616.52 3231.46 7630.85 3234.33 C 7633.72 3234.33 7686.75 3283.05 7673.85 3230.03 C 7670.98 3219.99 7645.18 3218.56 7649.48 3207.1 C 7652.35 3197.06 7670.98 3202.8 7681.01 3205.66 C 7686.75 3207.1 7686.75 3222.86 7692.48 3219.99 C 7706.81 3209.96 7685.31 3161.23 7702.51 3171.27 C 7716.84 3181.3 7678.15 3217.13 7722.58 3202.8 C 7791.37 3179.86 7732.61 3194.2 7746.94 3172.7 C 7748.37 3171.27 7749.81 3175.57 7752.67 3175.57 C 7755.54 3175.57 7759.84 3175.57 7761.27 3172.7 C 7762.7 3169.83 7756.97 3159.8 7761.27 3159.8 C 7762.7 3159.8 7785.63 3179.86 7792.8 3177 C 7802.83 3174.13 7810 3165.53 7815.73 3158.37 C 7817.16 3158.37 7817.16 3156.93 7817.16 3155.5 L 7814.3 3152.63 " }
+ }
+ }
+ // PATH visit se count: 926
+ DemoShape {
+ objectName: "se"
+ ShapePath {
+ objectName: "svg_path:se"
+ // boundingRect: 6292.28, 1712.3 980.285x2639.89
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 6447.06 4352.19 C 6449.92 4343.6 6444.19 4339.3 6435.59 4335 L 6429.86 4320.66 C 6441.33 4327.83 6459.96 4332.13 6454.22 4345.03 C 6454.22 4347.89 6451.36 4350.76 6447.06 4352.19 M 6452.79 4286.27 C 6472.86 4263.34 6449.92 4264.77 6448.49 4236.11 C 6448.49 4227.51 6457.09 4221.78 6458.52 4213.18 C 6458.52 4210.31 6452.79 4207.44 6451.36 4204.58 C 6432.73 4201.71 6408.36 4195.98 6392.6 4207.44 C 6408.36 4187.38 6435.59 4193.11 6457.09 4197.41 C 6445.63 4178.78 6438.46 4164.45 6441.33 4161.58 C 6447.06 4148.68 6467.12 4177.35 6480.02 4171.62 C 6491.49 4167.32 6451.36 4150.12 6457.09 4138.65 C 6461.39 4128.62 6481.45 4140.09 6485.75 4131.49 C 6492.92 4121.45 6488.62 4107.12 6482.89 4097.09 C 6480.02 4091.36 6471.42 4095.66 6465.69 4094.22 C 6454.22 4089.93 6457.09 4069.86 6448.49 4059.83 C 6442.76 4052.66 6431.29 4052.66 6425.56 4045.5 C 6422.69 4039.76 6426.99 4032.6 6424.13 4026.87 C 6421.26 4019.7 6404.06 3996.77 6404.06 3995.34 C 6404.06 3992.47 6409.8 3991.04 6408.36 3989.6 C 6406.93 3986.74 6401.2 3988.17 6398.33 3986.74 C 6391.16 3981 6385.43 3972.41 6381.13 3965.24 C 6373.97 3952.34 6382.57 3917.95 6372.53 3902.18 C 6369.67 3897.88 6359.63 3903.61 6355.34 3899.31 C 6351.04 3893.58 6352.47 3883.55 6352.47 3874.95 C 6349.6 3853.45 6389.73 3803.29 6371.1 3780.36 C 6345.3 3747.4 6359.63 3836.25 6305.17 3781.79 C 6296.58 3773.2 6310.91 3747.4 6310.91 3737.37 C 6309.47 3720.17 6292.28 3655.68 6292.28 3655.68 C 6298.01 3648.51 6312.34 3661.41 6320.94 3659.98 C 6325.24 3674.31 6330.97 3688.64 6343.87 3670.01 C 6375.4 3625.58 6335.27 3568.25 6343.87 3542.46 C 6346.74 3532.42 6361.07 3530.99 6365.37 3522.39 C 6368.23 3516.66 6365.37 3509.49 6362.5 3503.76 C 6362.5 3499.46 6355.34 3498.03 6356.77 3495.16 C 6359.63 3485.13 6405.5 3482.26 6418.39 3449.3 L 6416.96 3407.74 C 6432.73 3326.05 6395.46 3341.81 6388.3 3280.19 C 6386.87 3265.85 6415.53 3273.02 6426.99 3262.99 L 6442.76 3205.66 C 6437.03 3169.83 6382.57 3172.7 6373.97 3139.74 C 6366.8 3109.64 6389.73 3069.51 6386.87 3037.98 C 6384 3016.48 6361.07 2997.85 6359.63 2976.36 C 6358.2 2967.76 6365.37 2957.72 6365.37 2949.13 C 6363.93 2939.09 6358.2 2930.49 6359.63 2920.46 C 6359.63 2911.86 6369.67 2906.13 6369.67 2897.53 C 6369.67 2724.12 6348.17 3025.08 6348.17 2851.67 C 6348.17 2835.91 6368.23 2825.87 6369.67 2810.11 C 6371.1 2804.38 6362.5 2798.64 6363.93 2791.48 C 6368.23 2768.55 6399.76 2719.82 6418.39 2708.35 C 6477.15 2671.09 6515.85 2738.45 6525.88 2671.09 C 6535.91 2600.87 6475.72 2615.2 6484.32 2589.4 C 6497.22 2549.27 6517.28 2509.14 6530.18 2470.45 C 6531.61 2464.72 6538.78 2463.28 6540.21 2457.55 L 6535.91 2404.52 C 6535.91 2403.09 6543.08 2360.09 6543.08 2360.09 L 6528.75 2304.2 C 6534.48 2291.3 6557.41 2304.2 6568.88 2298.47 L 6600.41 2271.24 C 6604.71 2258.34 6586.08 2246.87 6588.94 2233.98 C 6597.54 2208.18 6644.83 2152.29 6653.43 2127.92 C 6669.2 2089.23 6631.94 2086.36 6626.2 2054.83 C 6621.9 2029.03 6637.67 2044.8 6646.27 2034.77 C 6657.73 2020.43 6657.73 2000.37 6660.6 1984.6 C 6662.03 1973.14 6689.26 1922.98 6697.86 1922.98 L 6743.72 1943.04 C 6772.39 1931.58 6736.56 1849.89 6745.16 1838.42 C 6765.22 1812.62 6864.11 1861.35 6877.01 1852.75 C 6924.3 1822.66 6874.14 1825.52 6872.71 1812.62 C 6868.41 1795.43 6892.77 1782.53 6892.77 1765.33 C 6892.77 1755.3 6889.91 1745.27 6885.61 1736.67 C 6881.31 1729.5 6862.68 1725.2 6866.98 1718.04 C 6872.71 1708 6888.47 1715.17 6899.94 1712.3 L 6902.8 1712.3 C 6907.1 1715.17 6914.27 1715.17 6920 1719.47 C 6937.2 1730.93 6914.27 1729.5 6925.74 1736.67 C 6950.1 1755.3 6991.66 1789.69 7017.46 1801.16 C 7047.55 1814.06 7071.92 1802.59 7099.15 1829.82 C 7104.88 1834.12 7100.58 1847.02 7106.31 1849.89 C 7110.61 1851.32 7113.48 1844.15 7116.35 1845.59 C 7127.81 1849.89 7132.11 1864.22 7140.71 1872.82 C 7143.58 1875.68 7152.18 1875.68 7150.74 1879.98 C 7134.98 1910.08 7152.18 1911.51 7156.48 1945.91 C 7157.91 1951.64 7152.18 1957.37 7152.18 1963.11 C 7149.31 1980.31 7170.81 1967.41 7177.97 1973.14 C 7196.6 1987.47 7166.51 2007.54 7175.11 2021.87 C 7183.71 2041.93 7218.1 2060.56 7220.97 2083.49 C 7222.4 2100.69 7209.5 2155.15 7210.94 2162.32 C 7223.83 2208.18 7255.36 2223.94 7272.56 2261.21 C 7268.26 2266.94 7263.96 2274.1 7258.23 2276.97 C 7252.5 2279.84 7248.2 2265.51 7241.03 2266.94 C 7238.17 2268.37 7236.73 2275.54 7233.87 2275.54 C 7222.4 2276.97 7209.5 2266.94 7199.47 2272.67 C 7192.3 2276.97 7203.77 2294.17 7196.6 2298.47 C 7166.51 2317.1 7156.48 2282.7 7134.98 2278.4 C 7132.11 2278.4 7137.84 2287 7137.84 2291.3 C 7137.84 2294.17 7139.28 2297.03 7137.84 2299.9 C 7136.41 2309.93 7127.81 2318.53 7130.68 2327.13 C 7130.68 2328.56 7131.71 2330.54 7130.1 2330.49 C 7123.87 2330.33 7113.48 2327.13 7104.88 2322.83 C 7100.58 2321.4 7096.28 2309.93 7094.85 2314.23 C 7091.98 2330 7130.68 2324.26 7133.54 2340.03 C 7136.41 2348.63 7116.35 2342.9 7107.75 2347.2 C 7106.31 2348.63 7112.05 2348.63 7114.91 2348.63 C 7116.35 2350.06 7132.11 2360.09 7123.51 2367.26 C 7122.08 2368.69 7120.65 2360.09 7117.78 2361.53 C 7116.35 2362.96 7122.08 2368.69 7119.21 2370.13 C 7107.75 2377.29 7074.78 2370.13 7069.05 2391.62 C 7069.05 2395.92 7077.65 2391.62 7080.52 2393.06 C 7090.55 2400.22 7099.15 2410.25 7103.45 2421.72 C 7112.05 2447.52 7069.05 2458.98 7067.62 2487.65 C 7066.19 2522.04 7113.48 2524.91 7124.95 2550.71 C 7126.38 2552.14 7096.28 2589.4 7090.55 2602.3 C 7081.95 2619.5 7079.08 2689.72 7061.89 2692.59 C 7059.02 2692.59 7059.02 2682.56 7056.15 2683.99 C 7046.12 2685.42 7060.45 2708.35 7050.42 2712.65 C 7046.12 2715.52 7047.55 2695.45 7043.25 2698.32 C 7041.82 2698.32 7041.82 2699.75 7041.82 2701.19 L 7040.39 2701.19 C 7037.52 2705.49 7043.25 2714.09 7038.96 2716.95 C 7034.66 2722.69 7017.46 2719.82 7013.16 2728.42 C 7008.86 2734.15 7010.29 2745.62 7003.13 2748.48 C 6994.53 2751.35 6981.63 2735.58 6975.9 2742.75 C 6970.16 2751.35 6991.66 2762.81 6987.36 2772.85 C 6983.06 2780.01 6973.03 2758.51 6967.3 2762.81 C 6960.13 2768.55 6968.73 2780.01 6967.3 2788.61 C 6965.86 2798.64 6964.43 2812.97 6954.4 2818.71 C 6945.8 2823.01 6935.77 2808.67 6925.74 2810.11 C 6920 2810.11 6938.63 2814.41 6940.07 2820.14 C 6941.5 2823.01 6934.33 2824.44 6931.47 2824.44 C 6928.6 2824.44 6935.77 2817.27 6932.9 2814.41 C 6930.03 2812.97 6924.3 2812.97 6922.87 2815.84 C 6921.44 2820.14 6931.47 2824.44 6928.6 2828.74 C 6925.74 2831.61 6917.14 2823.01 6912.84 2827.31 C 6909.97 2830.17 6920 2831.61 6921.44 2835.91 C 6921.44 2837.34 6915.7 2834.47 6914.27 2835.91 C 6911.4 2841.64 6914.27 2851.67 6909.97 2855.97 C 6904.24 2861.7 6882.74 2857.4 6888.47 2861.7 C 6897.07 2868.87 6922.87 2857.4 6920 2867.43 C 6915.7 2878.9 6902.8 2886.07 6895.64 2896.1 C 6892.77 2898.96 6889.91 2904.7 6885.61 2906.13 C 6881.31 2907.56 6872.71 2906.13 6872.71 2901.83 C 6874.14 2897.53 6884.17 2900.4 6885.61 2896.1 C 6889.91 2887.5 6874.14 2898.96 6868.41 2900.4 C 6869.84 2904.7 6872.71 2909 6875.57 2913.3 C 6879.87 2923.33 6887.04 2950.56 6875.57 2947.69 C 6872.71 2947.69 6874.14 2933.36 6871.28 2936.23 C 6866.98 2943.39 6872.71 2954.86 6866.98 2962.02 C 6865.54 2966.32 6858.38 2960.59 6854.08 2960.59 C 6844.04 2962.02 6831.15 2960.59 6822.55 2966.32 C 6799.62 2983.52 6838.31 2990.69 6855.51 3010.75 C 6856.94 3012.18 6849.78 3013.62 6848.34 3012.18 C 6848.34 3010.75 6844.04 3010.75 6844.04 3012.18 C 6842.61 3023.65 6845.48 3035.12 6844.04 3046.58 C 6842.61 3053.75 6836.88 3059.48 6835.45 3066.64 C 6834.01 3075.24 6834.01 3083.84 6836.88 3092.44 C 6836.88 3093.87 6841.18 3089.58 6842.61 3091.01 C 6848.34 3101.04 6864.11 3115.37 6855.51 3123.97 C 6846.91 3132.57 6834.01 3108.21 6822.55 3112.51 C 6789.58 3123.97 6845.48 3154.07 6841.18 3185.6 C 6841.18 3191.33 6826.85 3182.73 6826.85 3187.03 C 6825.41 3194.2 6836.88 3195.63 6838.31 3201.36 C 6839.75 3204.23 6832.58 3202.8 6832.58 3205.66 C 6832.58 3211.39 6832.58 3218.56 6835.45 3224.29 C 6836.88 3230.03 6835.45 3237.19 6838.31 3242.92 C 6839.75 3245.79 6845.48 3240.06 6845.48 3242.92 C 6846.91 3244.36 6839.75 3244.36 6838.31 3245.79 C 6836.88 3248.66 6836.88 3252.96 6838.31 3255.82 C 6841.18 3262.99 6851.21 3267.29 6852.64 3275.89 C 6854.08 3284.49 6845.48 3293.08 6846.91 3301.68 C 6846.91 3304.55 6851.21 3300.25 6854.08 3301.68 C 6858.38 3303.12 6855.51 3313.15 6859.81 3313.15 C 6875.57 3313.15 6905.67 3304.55 6920 3313.15 C 6925.74 3316.02 6920 3326.05 6922.87 3331.78 C 6927.17 3340.38 6935.77 3346.11 6944.37 3351.84 C 6945.8 3353.28 6951.53 3347.55 6952.97 3350.41 C 6955.83 3353.28 6948.67 3359.01 6951.53 3360.44 C 6952.97 3360.44 7026.06 3331.78 6987.36 3374.78 C 6981.63 3381.94 6968.73 3361.88 6960.13 3364.74 C 6952.97 3367.61 6970.16 3373.34 6974.46 3379.07 C 6980.2 3387.67 6981.63 3400.57 6990.23 3406.3 C 6994.53 3407.74 6997.39 3391.97 7003.13 3394.84 C 7010.29 3397.71 7005.99 3410.6 7011.73 3414.9 C 7033.22 3439.27 7048.99 3423.5 7044.69 3462.2 C 7043.25 3476.53 7030.36 3460.77 7028.92 3460.77 C 7021.76 3462.2 7020.32 3470.8 7014.59 3475.1 C 7001.69 3489.43 7014.59 3502.33 6974.46 3520.96 C 6973.03 3522.39 6981.63 3535.29 6981.63 3536.72 C 6978.76 3541.02 6971.6 3533.86 6965.86 3535.29 C 6955.83 3536.72 6945.8 3545.32 6934.33 3545.32 C 6922.87 3545.32 6932.9 3523.82 6932.9 3513.79 C 6934.33 3503.76 6925.74 3505.19 6921.44 3499.46 C 6921.44 3498.03 6922.87 3495.16 6921.44 3492.29 C 6915.7 3483.7 6914.27 3470.8 6904.24 3466.5 C 6897.07 3463.63 6887.04 3470.8 6882.74 3477.96 C 6881.31 3482.26 6894.21 3476.53 6895.64 3479.4 C 6901.37 3489.43 6897.07 3502.33 6902.8 3510.93 C 6907.1 3518.09 6928.6 3516.66 6924.3 3523.82 C 6907.1 3556.79 6865.54 3506.63 6856.94 3509.49 C 6845.48 3512.36 6839.75 3528.12 6826.85 3528.12 C 6818.25 3528.12 6816.81 3509.49 6808.22 3510.93 C 6801.05 3512.36 6808.22 3526.69 6803.92 3533.86 C 6802.48 3536.72 6798.18 3530.99 6793.88 3530.99 C 6782.42 3532.42 6769.52 3532.42 6759.49 3538.16 C 6756.62 3539.59 6763.79 3543.89 6766.65 3546.76 C 6778.12 3553.92 6792.45 3542.46 6801.05 3539.59 C 6815.38 3538.16 6829.71 3556.79 6842.61 3552.49 C 6848.34 3549.62 6831.15 3532.42 6838.31 3533.86 C 6846.91 3533.86 6849.78 3549.62 6858.38 3553.92 C 6866.98 3556.79 6879.87 3546.76 6887.04 3553.92 C 6891.34 3558.22 6875.57 3566.82 6878.44 3573.99 C 6881.31 3578.28 6892.77 3575.42 6897.07 3571.12 C 6899.94 3568.25 6888.47 3561.09 6891.34 3559.65 C 6898.51 3556.79 6904.24 3565.39 6909.97 3566.82 C 6921.44 3569.69 6931.47 3576.85 6941.5 3572.55 C 6948.67 3569.69 6942.93 3553.92 6948.67 3549.62 C 6955.83 3545.32 6965.86 3553.92 6973.03 3549.62 C 6983.06 3545.32 6984.5 3526.69 6995.96 3525.26 C 7004.56 3523.82 7018.89 3538.16 7014.59 3545.32 C 7007.43 3555.35 6990.23 3545.32 6978.76 3549.62 C 6977.33 3549.62 6981.63 3553.92 6983.06 3555.35 C 6987.36 3563.95 6995.96 3572.55 6995.96 3582.58 C 6997.39 3585.45 6988.79 3581.15 6985.93 3584.02 C 6975.9 3589.75 6964.43 3595.48 6958.7 3605.52 C 6952.97 3615.55 6957.26 3628.45 6952.97 3638.48 C 6950.1 3644.21 6945.8 3616.98 6938.63 3619.85 C 6934.33 3622.71 6945.8 3638.48 6941.5 3635.61 C 6927.17 3629.88 6947.23 3581.15 6924.3 3584.02 C 6924.3 3584.02 6928.6 3647.08 6902.8 3665.71 C 6894.21 3671.44 6881.31 3667.14 6871.28 3668.57 C 6866.98 3670.01 6882.74 3672.87 6882.74 3677.17 C 6888.47 3694.37 6866.98 3682.91 6864.11 3685.77 C 6861.24 3687.21 6872.71 3687.21 6872.71 3691.51 C 6874.14 3692.94 6868.41 3690.07 6865.54 3691.51 C 6864.11 3692.94 6862.68 3695.8 6861.24 3695.8 C 6858.38 3695.8 6785.29 3685.77 6791.02 3698.67 C 6792.45 3701.54 6796.75 3701.54 6801.05 3701.54 C 6802.48 3701.54 6803.92 3697.24 6805.35 3697.24 C 6808.22 3698.67 6808.22 3707.27 6812.52 3705.84 C 6815.38 3705.84 6811.08 3697.24 6815.38 3697.24 C 6838.31 3691.51 6856.94 3697.24 6866.98 3720.17 C 6866.98 3723.03 6859.81 3718.74 6858.38 3720.17 C 6852.64 3725.9 6865.54 3734.5 6849.78 3734.5 C 6838.31 3734.5 6823.98 3718.74 6816.81 3727.33 C 6809.65 3735.93 6838.31 3731.63 6846.91 3737.37 C 6852.64 3741.67 6864.11 3767.46 6859.81 3774.63 C 6856.94 3780.36 6842.61 3770.33 6841.18 3776.06 C 6839.75 3783.23 6871.28 3821.92 6861.24 3834.82 C 6854.08 3843.42 6836.88 3830.52 6826.85 3834.82 C 6822.55 3834.82 6828.28 3840.55 6831.15 3843.42 C 6836.88 3850.59 6859.81 3857.75 6859.81 3869.22 C 6859.81 3879.25 6841.18 3884.98 6842.61 3896.45 C 6842.61 3905.05 6856.94 3905.05 6862.68 3912.21 C 6864.11 3915.08 6856.94 3915.08 6855.51 3916.51 C 6849.78 3926.54 6844.04 3938.01 6842.61 3949.47 C 6839.75 3958.07 6859.81 3989.6 6858.38 3992.47 C 6855.51 3995.34 6848.34 3989.6 6844.04 3993.9 C 6832.58 4005.37 6856.94 4028.3 6852.64 4046.93 C 6852.64 4051.23 6841.18 4046.93 6839.75 4051.23 C 6836.88 4055.53 6846.91 4061.26 6844.04 4065.56 C 6828.28 4112.86 6835.45 4031.17 6828.28 4079.89 C 6823.98 4109.99 6822.55 4157.28 6798.18 4180.21 C 6796.75 4181.65 6792.45 4180.21 6791.02 4177.35 C 6791.02 4174.48 6795.32 4171.62 6793.88 4168.75 C 6793.88 4164.45 6769.52 4167.32 6769.52 4167.32 C 6768.09 4165.88 6772.39 4160.15 6770.95 4160.15 C 6756.62 4161.58 6755.19 4168.75 6748.02 4175.91 C 6735.12 4185.95 6743.72 4164.45 6739.42 4165.88 C 6729.39 4171.62 6716.49 4174.48 6713.63 4174.48 C 6706.46 4175.91 6700.73 4173.05 6693.56 4173.05 C 6687.83 4173.05 6679.23 4168.75 6677.8 4174.48 C 6674.93 4183.08 6690.7 4191.68 6686.4 4198.85 C 6679.23 4206.01 6666.33 4197.41 6656.3 4200.28 C 6647.7 4203.15 6646.27 4213.18 6641.97 4220.34 C 6604.71 4274.8 6652 4257.61 6650.57 4294.87 C 6649.13 4306.33 6641.97 4316.37 6633.37 4324.96 C 6626.2 4332.13 6603.27 4317.8 6598.97 4317.8 C 6564.58 4314.93 6574.61 4339.3 6538.78 4339.3 C 6527.32 4339.3 6517.28 4332.13 6507.25 4330.7 C 6501.52 4330.7 6492.92 4335 6487.19 4332.13 C 6477.15 4326.4 6502.95 4322.1 6502.95 4322.1 C 6502.95 4313.5 6494.35 4306.33 6495.79 4297.73 C 6495.79 4289.14 6507.25 4284.84 6510.12 4277.67 C 6510.12 4277.67 6484.32 4241.84 6464.26 4210.31 C 6462.82 4216.04 6455.66 4221.78 6455.66 4228.94 C 6457.09 4259.04 6485.75 4256.17 6454.22 4284.84 C 6454.22 4286.27 6454.22 4286.27 6452.79 4286.27 M 6901.37 3930.84 C 6904.24 3926.54 6909.97 3927.98 6914.27 3926.54 C 6904.24 3949.47 6884.17 4048.36 6879.87 4078.46 C 6878.44 4085.63 6884.17 4141.52 6865.54 4142.95 C 6862.68 4142.95 6856.94 4078.46 6856.94 4074.16 C 6859.81 4032.6 6888.47 4011.1 6895.64 3972.41 C 6898.51 3955.21 6888.47 3948.04 6901.37 3930.84 M 7094.85 3892.15 C 7094.85 3900.75 7083.38 3902.18 7077.65 3907.91 C 7059.02 3929.41 7091.98 3913.65 7064.75 3935.14 C 7043.25 3950.91 7056.15 3950.91 7044.69 3972.41 C 7040.39 3979.57 7030.36 4001.07 7026.06 3992.47 C 7021.76 3983.87 7033.22 3972.41 7037.52 3962.37 C 7036.09 3963.81 7034.66 3966.67 7033.22 3966.67 C 7031.79 3966.67 7031.79 3962.37 7031.79 3960.94 C 7030.36 3950.91 7016.02 3933.71 7016.02 3930.84 C 7016.02 3922.24 7021.76 3913.65 7021.76 3905.05 C 7020.32 3895.01 7011.73 3887.85 7011.73 3877.82 C 7010.29 3870.65 7053.29 3801.86 7059.02 3798.99 C 7069.05 3794.69 7080.52 3798.99 7090.55 3797.56 C 7106.31 3820.49 7087.68 3823.36 7074.78 3853.45 C 7059.02 3890.72 7094.85 3879.25 7094.85 3892.15 M 7044.69 2716.95 C 7044.69 2719.82 7044.69 2715.52 7043.25 2711.22 C 7044.69 2712.65 7044.69 2715.52 7044.69 2716.95 M 6404.06 4257.61 L 6402.63 4253.31 C 6402.63 4244.71 6399.76 4238.97 6395.46 4236.11 L 6394.03 4230.38 C 6396.9 4230.38 6399.76 4231.81 6401.2 4234.67 C 6402.63 4240.41 6404.06 4249.01 6404.06 4257.61 " }
+ }
+ }
+ // PATH visit dk count: 398
+ DemoShape {
+ objectName: "dk"
+ ShapePath {
+ objectName: "svg_path:dk"
+ // boundingRect: 5979.04, 3895.01 481.94x581.976
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 6123.16 4443.92 C 6104.53 4441.05 6085.9 4431.02 6067.27 4428.15 C 6062.97 4428.15 6045.77 4429.59 6035.74 4428.15 C 6035.74 4420.99 6035.74 4413.82 6037.17 4405.22 C 6037.17 4398.06 6048.64 4389.46 6042.91 4383.72 C 6048.64 4376.56 6040.04 4365.09 6040.04 4355.06 C 6038.61 4346.46 6042.91 4333.56 6037.17 4327.83 C 6024.27 4314.93 5987.01 4329.26 5979.85 4303.47 C 5975.55 4287.7 5989.88 4270.5 5989.88 4251.87 L 5992.74 4254.74 C 6037.17 4276.24 6008.51 4218.91 6005.64 4213.18 C 6004.21 4210.31 6002.78 4201.71 5998.48 4204.58 C 5991.31 4207.44 5992.74 4220.34 5985.58 4221.78 C 5981.28 4223.21 5984.15 4211.74 5984.15 4207.44 C 5985.58 4197.41 5988.45 4187.38 5988.45 4178.78 C 5989.88 4170.18 5981.28 4158.72 5988.45 4152.98 C 5989.88 4151.55 5992.74 4150.12 5994.18 4150.12 C 5992.74 4147.25 5987.01 4085.63 6001.34 4091.36 C 6009.94 4094.22 6004.21 4108.56 6008.51 4115.72 C 6021.41 4145.82 6083.03 4071.29 6085.9 4071.29 C 6116 4062.69 6081.6 4109.99 6087.33 4117.16 C 6093.07 4124.32 6104.53 4118.59 6114.56 4115.72 C 6111.7 4115.72 6110.26 4115.72 6110.26 4114.29 C 6107.4 4107.12 6116 4098.52 6111.7 4092.79 C 6108.83 4088.49 6100.23 4099.96 6098.8 4095.66 C 6095.93 4089.93 6107.4 4085.63 6107.4 4079.89 C 6108.83 4046.93 6087.33 4056.96 6114.56 4036.9 C 6120.3 4031.17 6137.49 4032.6 6141.79 4036.9 C 6144.66 4039.76 6137.49 4052.66 6140.36 4049.8 C 6146.09 4044.06 6146.09 4031.17 6153.26 4026.87 C 6158.99 4024 6166.16 4026.87 6171.89 4026.87 C 6179.06 4031.17 6213.45 4039.76 6213.45 4039.76 C 6216.32 4048.36 6209.15 4058.4 6210.59 4068.43 C 6210.59 4075.59 6222.05 4082.76 6219.18 4089.93 C 6216.32 4095.66 6206.29 4088.49 6200.55 4089.93 C 6191.95 4091.36 6222.05 4097.09 6220.62 4105.69 C 6220.62 4108.56 6219.18 4109.99 6219.18 4111.42 C 6224.92 4112.86 6226.35 4125.75 6233.52 4127.19 C 6250.71 4131.49 6276.51 4107.12 6283.68 4140.09 C 6286.54 4151.55 6252.15 4208.88 6240.68 4203.15 C 6230.65 4197.41 6230.65 4178.78 6219.18 4174.48 C 6206.29 4170.18 6207.72 4244.71 6203.42 4253.31 C 6196.25 4271.94 6184.79 4284.84 6164.72 4284.84 C 6154.69 4284.84 6133.19 4269.07 6136.06 4279.1 C 6140.36 4289.13 6163.29 4283.4 6169.02 4294.87 L 6169.02 4299.17 L 6171.89 4299.17 C 6177.62 4299.17 6179.06 4309.2 6183.36 4309.2 C 6199.12 4304.9 6210.59 4280.54 6226.35 4286.27 C 6234.95 4290.57 6239.25 4303.47 6249.28 4304.9 C 6255.01 4306.33 6256.45 4296.3 6260.75 4293.43 C 6286.54 4346.46 6255.01 4300.6 6265.05 4320.66 C 6273.64 4336.43 6300.88 4402.36 6247.85 4396.62 C 6236.38 4395.19 6226.35 4386.59 6214.89 4383.72 C 6210.59 4383.72 6203.42 4390.89 6199.12 4386.59 C 6187.65 4377.99 6227.78 4380.86 6204.85 4367.96 C 6169.02 4349.33 6204.85 4380.86 6193.39 4380.86 C 6189.09 4380.86 6179.06 4337.86 6179.06 4336.43 C 6174.76 4326.4 6160.42 4320.66 6157.56 4309.2 C 6157.56 4307.77 6158.99 4307.77 6158.99 4307.77 C 6147.53 4312.07 6131.76 4314.93 6131.76 4316.37 C 6128.9 4322.1 6146.09 4316.37 6148.96 4322.1 C 6150.39 4326.4 6140.36 4327.83 6140.36 4332.13 C 6138.93 4340.73 6140.36 4349.33 6143.23 4356.49 C 6144.66 4360.79 6151.83 4362.23 6151.83 4366.53 C 6151.83 4382.29 6126.03 4388.02 6123.16 4403.79 C 6123.16 4409.52 6134.63 4400.92 6138.93 4403.79 C 6148.96 4410.95 6157.56 4420.99 6158.99 4432.45 C 6160.42 4438.18 6148.96 4420.99 6143.23 4422.42 C 6136.06 4425.29 6127.46 4438.18 6123.16 4443.92 M 6394.03 4206.01 L 6394.03 4207.44 C 6409.8 4195.98 6434.16 4201.71 6451.36 4204.58 C 6452.79 4207.44 6458.52 4210.31 6458.52 4213.18 C 6457.09 4221.78 6448.49 4227.51 6448.49 4236.11 C 6449.92 4264.77 6472.86 4263.34 6452.79 4286.27 C 6445.63 4293.43 6434.16 4294.87 6426.99 4302.03 C 6414.1 4316.37 6429.86 4320.66 6442.76 4327.83 L 6451.36 4349.33 C 6439.89 4359.36 6408.36 4355.06 6408.36 4367.96 C 6409.8 4383.72 6444.19 4405.22 6408.36 4406.65 C 6395.46 4406.65 6385.43 4398.06 6373.97 4392.32 C 6379.7 4395.19 6386.87 4398.06 6388.3 4393.76 C 6391.16 4383.72 6382.57 4372.26 6375.4 4363.66 C 6372.53 4360.79 6371.1 4369.39 6368.23 4369.39 C 6359.64 4369.39 6353.9 4362.23 6346.74 4360.79 C 6339.57 4359.36 6332.4 4365.09 6326.67 4363.66 C 6323.81 4363.66 6323.81 4359.36 6323.81 4357.93 C 6332.4 4335 6306.61 4340.73 6308.04 4336.43 C 6309.47 4330.7 6319.51 4332.13 6320.94 4326.4 C 6326.67 4284.84 6313.77 4296.3 6290.84 4276.24 C 6287.98 4273.37 6279.38 4266.2 6283.68 4264.77 C 6296.58 4257.61 6365.37 4273.37 6352.47 4228.94 C 6349.6 4218.91 6333.84 4221.78 6325.24 4216.04 C 6320.94 4213.18 6335.27 4218.91 6339.57 4218.91 C 6346.74 4221.78 6353.9 4224.64 6361.07 4224.64 C 6382.57 4224.64 6416.96 4214.61 6409.8 4259.04 C 6408.36 4266.2 6389.73 4273.37 6395.46 4277.67 C 6421.26 4299.17 6412.66 4247.57 6408.36 4227.51 C 6406.93 4218.91 6384 4226.08 6386.87 4218.91 C 6388.3 4213.18 6391.16 4210.31 6394.03 4206.01 M 6422.69 4435.32 L 6415.53 4435.32 L 6415.53 4438.18 C 6416.96 4441.05 6415.53 4442.48 6415.53 4443.92 C 6411.23 4446.78 6405.5 4451.08 6404.06 4453.95 C 6399.76 4456.82 6396.9 4459.68 6395.46 4463.98 L 6394.03 4465.41 L 6394.03 4466.85 L 6394.03 4463.98 C 6385.43 4463.98 6375.4 4462.55 6371.1 4463.98 C 6363.93 4465.41 6358.2 4478.31 6349.6 4476.88 C 6338.14 4475.45 6332.4 4461.12 6322.37 4455.38 C 6315.21 4451.08 6305.17 4448.22 6299.44 4442.48 C 6295.14 4439.62 6310.91 4436.75 6325.24 4410.95 C 6345.3 4428.15 6375.4 4432.45 6392.6 4446.78 L 6394.03 4448.22 C 6385.43 4435.32 6366.8 4425.29 6373.97 4413.82 C 6376.83 4408.09 6385.43 4410.95 6389.73 4409.52 C 6399.76 4419.55 6421.26 4418.12 6424.13 4431.02 C 6424.13 4432.45 6424.13 4433.88 6422.69 4435.32 M 5989.88 4226.08 L 5989.88 4237.54 C 5988.45 4228.94 5988.45 4220.34 5989.88 4226.08 M 6240.68 3952.34 C 6244.98 3968.11 6230.65 4045.5 6204.85 4036.9 C 6196.25 4034.03 6189.09 4024 6179.06 4024 C 6189.09 4011.1 6146.09 4021.13 6134.63 4024 C 6124.6 4026.87 6116 4035.46 6105.96 4036.9 C 6101.67 4036.9 6098.8 4029.73 6094.5 4029.73 C 6083.03 4028.3 6071.57 4029.73 6061.54 4032.6 C 6057.24 4034.03 6060.1 4042.63 6055.8 4045.5 C 6035.74 4054.1 6057.24 3996.77 6028.57 4072.73 C 6027.14 4074.16 6035.74 4114.29 6034.31 4114.29 C 5987.01 4112.86 6012.81 4024 6040.04 4013.97 C 6064.4 4002.5 6098.8 4015.4 6123.16 4005.37 C 6156.13 3989.6 6148.96 3943.74 6179.06 3926.54 C 6189.09 3922.24 6201.99 3925.11 6212.02 3920.81 C 6222.05 3915.08 6227.78 3895.01 6239.25 3895.01 C 6260.75 3895.01 6227.78 3910.78 6226.35 3923.68 C 6223.48 3943.74 6233.52 3930.84 6240.68 3952.34 M 6372.53 4439.62 L 6359.64 4441.05 C 6369.67 4443.92 6378.27 4448.22 6385.43 4455.38 L 6386.87 4455.38 C 6382.57 4449.65 6376.83 4445.35 6372.53 4439.62 " }
+ }
+ }
+ // START gb type: G 1
+ Item { // structure node
+ objectName: "gb"
+ // PATH visit gb-nir count: 74
+ DemoShape {
+ objectName: "gb-nir"
+ // Translate -2.36538e-05, 0
+ x: -2.36538e-05
+ y: 0
+ ShapePath {
+ objectName: "svg_path:gb-nir"
+ // boundingRect: 4213.87, 4152.48 293.249x235.614
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 4338.97 4169.72 C 4343.27 4175.45 4349 4179.75 4354.73 4176.88 C 4363.33 4172.58 4366.2 4158.25 4374.8 4153.95 C 4383.4 4148.22 4393.43 4161.12 4402.03 4159.69 C 4412.06 4159.69 4419.23 4152.52 4427.82 4153.95 C 4437.86 4155.39 4443.59 4165.42 4452.19 4168.29 C 4456.49 4171.15 4465.09 4165.42 4466.52 4169.72 C 4472.25 4179.75 4475.12 4194.08 4472.25 4205.55 C 4472.25 4209.85 4466.52 4211.28 4466.52 4214.15 C 4482.28 4275.77 4475.12 4195.52 4492.32 4249.98 C 4498.05 4265.74 4460.79 4287.24 4460.79 4287.24 C 4485.15 4281.51 4510.95 4262.87 4506.65 4320.2 C 4500.92 4376.09 4460.79 4346 4449.32 4358.9 C 4439.29 4368.93 4446.46 4391.86 4420.66 4387.56 C 4414.93 4387.56 4410.63 4381.83 4406.33 4377.53 L 4400.59 4370.36 C 4379.1 4357.46 4409.19 4390.43 4360.47 4373.23 C 4353.3 4371.8 4363.33 4358.9 4366.2 4351.73 C 4367.63 4341.7 4353.3 4344.56 4350.43 4338.83 C 4343.27 4324.5 4350.43 4290.1 4334.67 4292.97 C 4273.04 4301.57 4351.87 4330.23 4285.94 4335.97 C 4264.44 4337.4 4208.55 4262.87 4214.28 4255.71 C 4215.72 4255.71 4271.61 4241.38 4271.61 4241.38 C 4274.48 4232.78 4255.84 4228.48 4254.41 4219.88 C 4251.54 4211.28 4288.81 4222.75 4293.11 4219.88 C 4316.04 4205.55 4307.44 4169.72 4338.97 4169.72 " }
+ }
+ }
+ // PATH visit gb-main count: 901
+ DemoShape {
+ objectName: "gb-main"
+ ShapePath {
+ objectName: "svg_path:gb-main"
+ // boundingRect: 4309.6, 3292.84 941.871x1863.96
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 4586.2 4531.94 C 4611.99 4552.01 4633.49 4563.47 4606.26 4576.37 M 4590.5 4583.54 C 4586.2 4586.4 4581.9 4587.84 4577.6 4587.84 C 4573.3 4587.84 4581.9 4582.1 4580.46 4579.24 C 4571.87 4549.14 4550.37 4543.41 4586.2 4531.94 M 4733.81 3558.82 C 4742.41 3563.12 4761.04 3571.72 4762.48 3581.75 C 4762.48 3588.92 4742.41 3601.82 4748.14 3597.52 C 4756.74 3591.79 4759.61 3574.59 4769.64 3576.02 C 4778.24 3578.89 4768.21 3597.52 4775.38 3603.25 C 4781.11 3607.55 4783.97 3591.79 4789.71 3590.35 C 4811.2 3584.62 4859.93 3593.22 4888.6 3597.52 C 4900.06 3598.95 4915.83 3588.92 4922.99 3597.52 C 4930.16 3604.69 4911.53 3611.85 4907.23 3620.45 C 4904.36 3629.05 4907.23 3637.65 4904.36 3646.25 C 4901.49 3653.41 4811.2 3707.87 4794.01 3720.77 C 4765.34 3742.27 4806.9 3717.91 4821.24 3729.37 C 4826.97 3732.24 4814.07 3737.97 4808.34 3742.27 C 4804.04 3746.57 4801.17 3753.73 4794.01 3755.17 C 4791.14 3755.17 4794.01 3745.14 4791.14 3745.14 C 4785.41 3743.7 4781.11 3749.44 4776.81 3750.87 C 4766.78 3755.17 4765.34 3743.7 4761.04 3753.73 C 4749.58 3779.53 4776.81 3788.13 4783.97 3779.53 C 4785.41 3776.67 4778.24 3772.37 4781.11 3772.37 C 4788.27 3770.93 4795.44 3776.67 4804.04 3776.67 C 4819.8 3775.23 4839.87 3758.03 4859.93 3762.33 C 4869.96 3763.77 4878.56 3773.8 4888.6 3776.67 C 4912.96 3783.83 4993.22 3782.4 5006.11 3811.06 C 5008.98 3819.66 5010.41 3828.26 5007.55 3836.86 L 4974.58 3869.82 C 4970.29 3875.55 4967.42 3882.72 4965.99 3889.89 C 4964.55 3892.75 4967.42 3895.62 4965.99 3897.05 C 4954.52 3918.55 4894.33 4003.11 4875.7 4004.54 C 4847.03 4007.41 4837 3993.07 4812.64 4011.7 C 4808.34 4014.57 4821.24 4016 4825.54 4014.57 C 4837 4013.14 4847.03 4005.97 4857.07 4004.54 C 4877.13 4003.11 4861.37 4017.44 4862.8 4021.74 C 4867.1 4031.77 4885.73 4034.64 4884.3 4044.67 C 4880 4076.2 4849.9 4048.97 4841.3 4050.4 C 4796.87 4057.57 4877.13 4076.2 4783.97 4069.03 C 4782.54 4069.03 4782.54 4084.8 4783.97 4084.8 C 4794.01 4089.1 4782.54 4080.5 4792.57 4081.93 C 4804.04 4084.8 4828.4 4103.43 4841.3 4094.83 C 4847.03 4090.53 4848.47 4080.5 4854.2 4077.63 C 4857.07 4076.2 4911.53 4116.33 4917.26 4122.06 C 4927.29 4129.22 4931.59 4165.05 4941.62 4176.52 C 4947.35 4182.25 4955.95 4183.68 4960.25 4189.42 C 4961.69 4192.28 4958.82 4195.15 4958.82 4199.45 C 4957.39 4208.05 4957.39 4218.08 4957.39 4226.68 C 4958.82 4252.48 4968.85 4358.53 4977.45 4380.03 C 4978.88 4382.89 4981.75 4374.3 4984.62 4375.73 C 4990.35 4377.16 4994.65 4384.33 5000.38 4387.19 C 5026.18 4402.96 5020.45 4390.06 5044.81 4420.16 C 5053.41 4430.19 5049.11 4447.39 5056.28 4458.85 C 5063.44 4474.62 5083.51 4460.29 5083.51 4488.95 C 5083.51 4497.55 5067.74 4497.55 5066.31 4506.15 C 5060.57 4529.08 5087.81 4562.04 5093.54 4582.1 C 5100.7 4609.33 5077.77 4569.21 5076.34 4599.3 C 5076.34 4606.47 5127.93 4660.93 5102.14 4688.16 C 5082.07 4708.22 5073.47 4685.29 5059.14 4721.12 C 5057.71 4725.42 5069.17 4719.69 5072.04 4722.55 C 5077.77 4726.85 5079.21 4735.45 5083.51 4739.75 C 5087.81 4744.05 5094.97 4751.22 5099.27 4748.35 C 5127.93 4729.72 5106.44 4711.09 5136.53 4715.39 C 5185.26 4722.55 5264.08 4744.05 5249.75 4821.44 C 5245.45 4845.81 5212.49 4910.3 5188.13 4918.9 C 5179.53 4921.76 5166.63 4904.57 5163.76 4911.73 C 5150.86 4937.53 5218.22 4930.36 5160.9 4946.13 C 5156.6 4947.56 5153.73 4944.7 5149.43 4941.83 C 5148 4941.83 5148 4938.96 5146.56 4938.96 C 5135.1 4940.4 5117.9 4937.53 5112.17 4946.13 C 5107.87 4954.73 5133.67 4943.26 5139.4 4950.43 C 5145.13 4956.16 5140.83 4967.63 5136.53 4974.79 C 5125.07 4993.42 5093.54 4980.52 5077.77 4986.26 C 5073.47 4987.69 5062.01 4991.99 5066.31 4994.86 C 5067.74 4994.86 5109.3 4981.96 5107.87 5000.59 C 5106.44 5007.75 5090.67 4999.16 5084.94 5003.46 C 5080.64 5007.75 5096.4 5014.92 5102.14 5012.05 C 5105 5009.19 5105 5000.59 5109.3 5000.59 C 5115.04 4999.16 5120.77 5004.89 5126.5 5009.19 C 5146.56 5027.82 5084.94 5017.79 5126.5 5024.95 C 5146.56 5027.82 5168.06 5012.05 5189.56 5020.65 C 5195.29 5022.09 5180.96 5029.25 5179.53 5034.98 C 5176.66 5045.02 5178.09 5055.05 5176.66 5066.51 C 5172.36 5080.85 5146.56 5075.11 5132.23 5082.28 C 5126.5 5086.58 5130.8 5100.91 5123.63 5103.78 C 5097.84 5112.38 5110.74 5089.45 5094.97 5099.48 C 5079.21 5109.51 5064.87 5105.21 5049.11 5112.38 C 5041.94 5115.24 5039.08 5126.71 5030.48 5126.71 C 5017.58 5126.71 4994.65 5102.34 4981.75 5099.48 C 4971.72 5098.04 4900.06 5115.24 4895.76 5099.48 C 4894.33 5092.31 4914.39 5098.04 4900.06 5088.01 C 4891.46 5082.28 4895.76 5095.18 4892.89 5099.48 C 4890.03 5100.91 4885.73 5098.04 4884.3 5095.18 C 4884.3 5090.88 4894.33 5086.58 4890.03 5086.58 C 4885.73 5085.15 4881.43 5095.18 4877.13 5093.74 C 4872.83 5092.31 4881.43 5085.15 4878.56 5080.85 C 4868.53 5067.95 4874.26 5093.74 4869.96 5092.31 C 4852.77 5086.58 4839.87 5057.92 4835.57 5062.21 C 4829.84 5069.38 4847.03 5079.41 4845.6 5088.01 C 4844.17 5102.34 4763.91 5083.71 4761.04 5088.01 C 4756.74 5095.18 4771.08 5105.21 4769.64 5113.81 C 4768.21 5118.11 4761.04 5112.38 4756.74 5112.38 L 4755.31 5112.38 C 4748.14 5108.08 4725.21 5092.31 4718.05 5095.18 C 4709.45 5099.48 4712.32 5112.38 4708.02 5119.54 C 4705.15 5122.41 4710.88 5110.94 4709.45 5106.64 C 4706.58 5099.48 4699.42 5093.74 4692.25 5088.01 C 4673.62 5069.38 4619.16 5056.48 4593.36 5066.51 C 4593.36 5066.51 4577.6 5135.31 4556.1 5145.34 C 4538.9 5152.5 4508.81 5110.94 4497.34 5105.21 C 4490.17 5100.91 4511.67 5118.11 4493.04 5113.81 C 4475.84 5109.51 4451.48 5092.31 4431.42 5098.04 C 4424.25 5099.48 4427.12 5112.38 4421.38 5115.24 C 4412.78 5118.11 4402.75 5112.38 4392.72 5112.38 C 4391.29 5112.38 4389.85 5112.38 4388.42 5113.81 C 4385.55 5120.97 4368.36 5156.8 4362.62 5156.8 C 4354.02 5155.37 4358.32 5136.74 4352.59 5129.57 C 4343.99 5115.24 4309.6 5125.27 4309.6 5109.51 C 4309.6 5099.48 4366.92 5096.61 4368.36 5096.61 C 4374.09 5095.18 4379.82 5089.45 4384.12 5083.71 C 4386.99 5082.28 4384.12 5076.55 4386.99 5075.11 C 4389.85 5072.25 4395.59 5076.55 4398.45 5075.11 C 4408.48 5066.51 4411.35 5053.62 4421.38 5046.45 C 4425.68 5043.58 4432.85 5049.32 4437.15 5047.88 C 4441.45 5045.02 4440.01 5039.28 4444.31 5036.42 C 4451.48 5029.25 4464.38 5027.82 4471.54 5019.22 C 4475.84 5013.49 4474.41 4980.52 4484.44 4976.22 C 4490.17 4974.79 4495.91 4986.26 4501.64 4987.69 C 4534.6 4990.56 4495.91 4940.4 4576.16 4954.73 C 4603.4 4959.03 4639.22 4996.29 4666.45 4974.79 C 4675.05 4967.63 4672.19 4953.29 4676.49 4944.7 C 4677.92 4941.83 4746.71 4898.83 4755.31 4888.8 C 4763.91 4878.77 4718.05 4908.87 4712.32 4913.17 C 4705.15 4916.03 4697.98 4917.47 4690.82 4918.9 C 4686.52 4918.9 4683.65 4911.73 4679.35 4913.17 C 4643.52 4923.2 4652.12 4953.29 4609.13 4928.93 C 4594.8 4918.9 4597.66 4894.53 4584.76 4881.64 C 4573.3 4870.17 4551.8 4895.97 4537.47 4888.8 C 4534.6 4887.37 4531.74 4842.94 4530.3 4838.64 C 4528.87 4835.77 4527.44 4844.37 4524.57 4844.37 C 4514.54 4845.81 4527.44 4834.34 4493.04 4844.37 C 4488.74 4844.37 4490.17 4852.97 4487.31 4855.84 C 4478.71 4858.71 4467.24 4861.57 4458.65 4858.71 C 4451.48 4857.27 4438.58 4848.67 4441.45 4842.94 C 4445.75 4834.34 4460.08 4840.07 4468.68 4838.64 C 4472.98 4837.21 4432.85 4835.77 4428.55 4830.04 C 4422.82 4821.44 4425.68 4809.98 4425.68 4799.95 C 4425.68 4771.28 4478.71 4787.05 4485.88 4784.18 C 4494.47 4781.31 4495.91 4766.98 4505.94 4765.55 C 4513.11 4765.55 4520.27 4772.72 4527.44 4771.28 C 4550.37 4765.55 4596.23 4726.85 4604.83 4706.79 C 4607.69 4701.06 4601.96 4645.16 4593.36 4636.56 C 4569 4606.47 4541.77 4692.46 4531.74 4633.7 C 4528.87 4623.67 4558.97 4622.23 4577.6 4607.9 C 4580.46 4603.6 4579.03 4596.44 4581.9 4592.14 C 4584.76 4587.84 4587.63 4584.97 4590.5 4583.54 C 4596.23 4579.24 4601.96 4577.8 4606.26 4576.37 C 4616.29 4576.37 4624.89 4580.67 4644.96 4573.51 C 4647.82 4572.07 4639.22 4562.04 4643.52 4563.47 C 4653.56 4564.91 4659.29 4576.37 4669.32 4577.8 C 4689.39 4580.67 4693.68 4562.04 4708.02 4574.94 C 4715.18 4582.1 4718.05 4603.6 4726.65 4597.87 C 4735.25 4592.14 4719.48 4576.37 4722.35 4566.34 C 4723.78 4560.61 4749.58 4563.47 4768.21 4586.4 C 4772.51 4590.7 4756.74 4586.4 4751.01 4583.54 C 4738.11 4576.37 4732.38 4554.87 4735.25 4539.11 C 4736.68 4530.51 4745.28 4523.34 4752.44 4517.61 C 4758.18 4513.31 4772.51 4517.61 4771.08 4510.45 C 4768.21 4501.85 4751.01 4501.85 4748.14 4493.25 C 4729.51 4453.12 4778.24 4484.65 4778.24 4467.45 C 4779.67 4458.85 4768.21 4463.15 4772.51 4453.12 C 4776.81 4443.09 4789.71 4435.92 4788.27 4424.46 C 4786.84 4402.96 4769.64 4441.65 4749.58 4443.09 C 4736.68 4443.09 4753.88 4415.86 4749.58 4404.39 C 4746.71 4398.66 4739.55 4415.86 4733.81 4414.42 C 4716.62 4408.69 4730.95 4392.93 4729.51 4384.33 L 4712.32 4348.5 C 4710.88 4331.3 4758.18 4284.01 4759.61 4284.01 C 4762.48 4285.44 4761.04 4292.6 4763.91 4291.17 C 4775.38 4288.31 4791.14 4285.44 4794.01 4275.41 C 4796.87 4266.81 4776.81 4275.41 4768.21 4273.97 C 4762.48 4272.54 4756.74 4265.37 4749.58 4266.81 C 4740.98 4269.67 4736.68 4281.14 4728.08 4284.01 C 4720.91 4286.87 4712.32 4281.14 4705.15 4282.57 C 4696.55 4285.44 4692.25 4292.6 4685.09 4295.47 C 4682.22 4296.9 4677.92 4296.9 4676.49 4294.04 C 4675.05 4289.74 4683.65 4282.57 4679.35 4281.14 C 4675.05 4279.71 4676.49 4289.74 4673.62 4292.6 C 4672.19 4294.04 4669.32 4292.6 4667.89 4291.17 C 4660.72 4282.57 4660.72 4261.08 4644.96 4258.21 C 4624.89 4253.91 4652.12 4278.27 4637.79 4301.2 C 4632.06 4309.8 4624.89 4286.87 4619.16 4278.27 C 4577.6 4223.81 4620.59 4286.87 4564.7 4253.91 C 4550.37 4245.31 4584.76 4252.48 4583.33 4245.31 C 4581.9 4212.35 4587.63 4215.21 4607.69 4192.28 C 4644.96 4150.72 4581.9 4199.45 4627.76 4157.89 C 4632.06 4153.59 4642.09 4153.59 4644.96 4147.86 C 4650.69 4137.82 4623.46 4104.86 4622.03 4101.99 C 4620.59 4097.69 4629.19 4097.69 4630.63 4093.39 C 4634.92 4083.36 4630.63 4070.46 4634.92 4059 C 4640.66 4046.1 4652.12 4060.43 4665.02 4066.16 C 4712.32 4087.66 4640.66 4053.27 4640.66 4050.4 C 4636.36 4041.8 4640.66 4030.34 4642.09 4018.87 C 4642.09 4011.7 4647.82 4003.11 4643.52 3997.37 C 4642.09 3995.94 4584.76 4027.47 4580.46 4031.77 C 4569 4041.8 4587.63 4061.87 4584.76 4077.63 C 4583.33 4083.36 4571.87 4081.93 4567.57 4086.23 C 4564.7 4089.1 4561.83 4093.39 4561.83 4097.69 C 4560.4 4101.99 4563.27 4107.73 4561.83 4110.59 C 4557.53 4122.06 4546.07 4127.79 4541.77 4139.26 C 4540.34 4142.12 4548.93 4147.86 4546.07 4149.29 C 4536.04 4155.02 4523.14 4159.32 4511.67 4155.02 C 4503.07 4150.72 4523.14 4139.26 4527.44 4132.09 C 4536.04 4120.62 4533.17 4101.99 4541.77 4090.53 L 4571.87 4064.73 C 4569 4057.57 4553.23 4067.6 4550.37 4060.43 C 4547.5 4054.7 4589.06 4030.34 4569 4026.04 C 4560.4 4023.17 4556.1 4044.67 4548.93 4040.37 C 4540.34 4033.2 4569 4027.47 4574.73 4017.44 C 4580.46 4005.97 4576.16 3980.17 4580.46 3970.14 C 4583.33 3961.54 4590.5 3952.94 4597.66 3951.51 C 4604.83 3950.08 4617.73 3965.84 4617.73 3958.68 C 4617.73 3951.51 4601.96 3951.51 4597.66 3944.35 C 4587.63 3924.28 4646.39 3914.25 4647.82 3914.25 C 4652.12 3909.95 4629.19 3915.68 4629.19 3909.95 C 4629.19 3901.35 4643.52 3899.92 4646.39 3891.32 C 4649.26 3887.02 4637.79 3894.18 4633.49 3898.48 C 4623.46 3905.65 4624.89 3908.52 4616.29 3912.82 C 4597.66 3922.85 4580.46 3938.61 4567.57 3932.88 C 4569 3935.75 4570.43 3937.18 4573.3 3938.61 C 4574.73 3941.48 4580.46 3944.35 4577.6 3947.21 C 4566.13 3957.24 4508.81 3977.31 4498.77 3957.24 C 4497.34 3955.81 4498.77 3951.51 4500.21 3951.51 C 4528.87 3940.05 4505.94 3983.04 4541.77 3934.31 C 4564.7 3904.22 4474.41 3919.98 4538.9 3898.48 C 4541.77 3904.22 4544.64 3909.95 4548.93 3914.25 C 4550.37 3917.12 4553.23 3919.98 4556.1 3921.41 C 4553.23 3917.12 4550.37 3911.38 4548.93 3904.22 C 4547.5 3899.92 4558.97 3904.22 4563.27 3904.22 C 4574.73 3904.22 4586.2 3909.95 4596.23 3905.65 C 4609.13 3899.92 4518.84 3901.35 4530.3 3884.15 C 4538.9 3872.69 4576.16 3888.45 4579.03 3882.72 C 4584.76 3868.39 4543.2 3851.19 4583.33 3841.16 C 4593.36 3838.29 4603.4 3851.19 4614.86 3848.32 C 4653.56 3839.72 4604.83 3813.93 4604.83 3813.93 C 4609.13 3803.9 4630.63 3816.79 4637.79 3808.19 C 4644.96 3799.6 4639.22 3785.26 4639.22 3773.8 C 4639.22 3765.2 4640.66 3756.6 4637.79 3750.87 C 4636.36 3748 4589.06 3697.84 4620.59 3684.94 C 4627.76 3680.64 4629.19 3707.87 4637.79 3705.01 C 4649.26 3702.14 4633.49 3669.18 4650.69 3679.21 C 4673.62 3692.11 4675.05 3693.54 4675.05 3692.11 C 4679.35 3673.48 4663.59 3672.04 4665.02 3653.41 C 4665.02 3646.25 4683.65 3662.01 4686.52 3654.85 C 4692.25 3644.81 4679.35 3631.92 4680.79 3621.88 C 4680.79 3617.58 4685.09 3629.05 4689.39 3629.05 C 4699.42 3633.35 4715.18 3641.95 4722.35 3633.35 C 4728.08 3626.18 4708.02 3619.02 4705.15 3610.42 C 4697.98 3586.05 4719.48 3604.69 4719.48 3604.69 C 4722.35 3601.82 4715.18 3596.09 4716.62 3593.22 C 4719.48 3591.79 4726.65 3598.95 4726.65 3596.09 C 4726.65 3591.79 4716.62 3588.92 4718.05 3584.62 C 4719.48 3574.59 4728.08 3567.42 4733.81 3558.82 M 5155.5 3296.15 C 5158.49 3298.25 5158.23 3295.42 5159.46 3297.99 C 5160.85 3300.88 5162.19 3300.6 5162 3295.34 C 5161.79 3292.55 5163.76 3292.26 5170.93 3293.69 C 5175.23 3295.12 5163.76 3300.85 5160.9 3305.15 C 5160.9 3306.59 5166.63 3310.89 5165.2 3312.32 C 5162.33 3313.75 5156.6 3306.59 5155.16 3310.89 C 5155.16 3313.75 5163.76 3313.75 5163.76 3318.05 C 5165.2 3330.95 5146.56 3326.65 5148 3330.95 C 5149.43 3349.58 5163.65 3347.35 5134.99 3377.45 C 5133.55 3380.32 5128.43 3376.13 5129.87 3373.27 C 5138.46 3354.63 5149.43 3335.25 5142.27 3330.95 C 5136.53 3325.22 5133.82 3338.96 5126.66 3334.66 C 5116.63 3330.36 5121.66 3330.43 5118.8 3320.39 C 5117.36 3317.53 5123.41 3314.24 5126.27 3312.8 C 5137.74 3311.37 5135.46 3314.11 5145.5 3309.81 C 5152.66 3305.51 5151.2 3303.32 5155.5 3296.15 M 4967.42 3545.93 C 4948.79 3583.19 4862.8 3502.93 4922.99 3498.63 C 4931.59 3498.63 4940.19 3508.66 4940.19 3518.7 C 4941.62 3524.43 4922.99 3522.99 4925.86 3527.29 C 4930.16 3535.89 4943.06 3535.89 4951.65 3538.76 C 4955.95 3541.63 4961.69 3543.06 4967.42 3545.93 M 4611.99 3576.02 C 4604.83 3587.49 4584.76 3598.95 4581.9 3607.55 C 4580.46 3614.72 4579.03 3654.85 4560.4 3654.85 C 4550.37 3653.41 4551.8 3637.65 4544.64 3630.48 C 4536.04 3624.75 4547.5 3654.85 4538.9 3659.15 C 4534.6 3660.58 4528.87 3653.41 4526 3656.28 C 4515.97 3662.01 4514.54 3682.08 4503.07 3682.08 C 4493.04 3682.08 4484.44 3664.88 4490.17 3656.28 C 4495.91 3646.25 4520.27 3663.45 4524.57 3651.98 C 4528.87 3641.95 4504.51 3640.51 4500.21 3629.05 C 4498.77 3624.75 4510.24 3626.18 4513.11 3623.32 C 4514.54 3621.88 4508.81 3623.32 4508.81 3621.88 C 4505.94 3616.15 4504.51 3610.42 4505.94 3604.69 C 4518.84 3568.86 4528.87 3601.82 4548.93 3606.12 C 4550.37 3606.12 4541.77 3584.62 4546.07 3580.32 C 4560.4 3563.12 4560.4 3578.89 4574.73 3577.46 C 4576.16 3576.02 4576.16 3571.72 4577.6 3571.72 C 4586.2 3564.56 4594.8 3553.09 4604.83 3554.52 C 4611.99 3555.96 4609.13 3568.86 4611.99 3576.02 " }
+ }
+ }
+ } // END gb type: G 1
+ // PATH visit ie count: 395
+ DemoShape {
+ objectName: "ie"
+ ShapePath {
+ objectName: "svg_path:ie"
+ // boundingRect: 3847.16, 4125.47 570.555x643.865
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 4406.23 4375.13 C 4409.1 4382.29 4421.99 4389.46 4416.26 4395.19 C 4410.53 4403.79 4393.33 4396.62 4384.73 4402.36 C 4380.43 4406.65 4396.2 4409.52 4396.2 4415.25 C 4397.63 4426.72 4390.47 4438.18 4390.47 4449.65 C 4391.9 4459.68 4401.93 4465.41 4401.93 4475.45 C 4401.93 4482.61 4390.47 4486.91 4390.47 4495.51 C 4389.03 4501.24 4400.5 4506.98 4397.63 4512.71 C 4393.33 4518.44 4381.87 4505.54 4379 4511.28 C 4374.7 4517.01 4386.17 4522.74 4387.6 4529.91 C 4387.6 4532.77 4384.73 4535.64 4384.73 4538.51 C 4386.17 4557.14 4391.9 4568.6 4386.17 4587.23 C 4381.87 4600.13 4331.71 4673.22 4323.11 4680.39 C 4320.24 4683.26 4313.07 4684.69 4311.64 4690.42 C 4308.77 4700.45 4313.07 4711.92 4311.64 4721.95 C 4311.64 4723.38 4308.77 4723.38 4308.77 4721.95 C 4304.48 4711.92 4301.61 4724.82 4287.28 4719.08 C 4281.54 4717.65 4281.54 4709.05 4275.81 4707.62 C 4265.78 4704.75 4234.25 4720.52 4227.08 4711.92 C 4225.65 4709.05 4232.82 4709.05 4232.82 4706.19 C 4234.25 4701.89 4222.78 4710.49 4218.49 4709.05 C 4196.99 4707.62 4189.82 4696.15 4169.76 4703.32 C 4166.89 4704.75 4175.49 4710.49 4175.49 4714.79 C 4174.06 4721.95 4148.26 4727.68 4148.26 4727.68 C 4142.53 4727.68 4139.66 4719.08 4133.93 4720.52 C 4123.9 4724.82 4119.6 4737.72 4111 4743.45 C 4080.9 4759.21 4099.53 4716.22 4072.3 4720.52 C 4063.7 4721.95 4079.47 4737.72 4076.6 4744.88 C 4072.3 4750.61 4062.27 4750.61 4055.1 4754.91 C 4050.81 4757.78 4047.94 4766.38 4042.21 4767.81 C 4039.34 4767.81 4040.77 4762.08 4037.91 4760.65 C 4035.04 4757.78 4030.74 4754.91 4026.44 4756.35 C 4023.57 4759.21 4026.44 4767.81 4022.14 4769.25 C 4007.81 4770.68 3982.01 4753.48 3973.41 4754.91 C 3961.95 4756.35 3953.35 4764.95 3943.32 4766.38 C 3914.65 4769.25 3959.08 4746.31 3936.15 4750.61 C 3927.55 4753.48 3893.16 4757.78 3890.29 4754.91 C 3884.56 4746.31 3939.02 4730.55 3944.75 4717.65 C 3946.18 4714.79 3940.45 4714.79 3937.59 4713.35 C 3936.15 4710.49 3903.19 4717.65 3861.63 4713.35 C 3860.19 4713.35 3864.49 4711.92 3883.12 4706.19 C 3885.99 4706.19 3888.86 4704.75 3888.86 4701.89 C 3888.86 4700.45 3884.56 4699.02 3885.99 4697.59 C 3898.89 4686.12 3893.16 4704.75 3910.35 4697.59 C 3918.95 4694.72 3943.32 4693.29 3937.59 4686.12 C 3936.15 4684.69 3871.66 4693.29 3868.79 4693.29 C 3855.89 4690.42 3845.86 4670.36 3847.3 4656.03 C 3848.73 4650.29 3860.19 4661.76 3864.49 4658.89 C 3868.79 4656.03 3861.63 4651.73 3861.63 4647.43 C 3864.49 4634.53 3887.42 4641.69 3900.32 4638.83 C 3910.35 4637.39 3923.25 4638.83 3930.42 4631.66 C 3936.15 4627.36 3916.09 4617.33 3908.92 4621.63 C 3907.49 4624.5 3911.79 4630.23 3908.92 4631.66 C 3907.49 4633.09 3864.49 4611.6 3855.89 4600.13 C 3854.46 4597.27 3864.49 4604.43 3867.36 4603 C 3870.23 4601.57 3867.36 4595.83 3870.23 4594.4 C 3877.39 4590.1 3897.46 4591.53 3907.49 4592.97 C 3920.39 4592.97 3928.99 4605.86 3940.45 4611.6 C 3951.92 4617.33 3918.95 4588.67 3924.69 4577.2 C 3928.99 4567.17 3946.18 4574.34 3956.22 4570.04 C 3961.95 4567.17 3961.95 4558.57 3967.68 4557.14 C 3969.11 4557.14 4060.84 4572.9 4070.87 4567.17 C 4078.04 4562.87 4052.24 4564.3 4047.94 4557.14 C 4046.51 4552.84 4052.24 4545.67 4050.8 4541.37 C 4049.37 4538.51 4020.71 4567.17 4006.38 4565.74 C 4003.51 4564.3 4014.98 4557.14 4010.68 4555.7 C 4006.38 4554.27 4000.64 4560 3994.91 4558.57 C 3989.18 4557.14 3984.88 4552.84 3982.01 4548.54 C 3980.58 4545.67 3983.45 4542.81 3982.01 4541.37 C 3982.01 4541.37 3940.45 4549.97 3934.72 4547.1 C 3930.42 4545.67 3944.75 4547.1 3949.05 4545.67 C 3960.52 4539.94 3969.11 4532.77 3980.58 4528.47 C 3983.45 4525.61 3989.18 4529.91 3992.05 4528.47 C 3997.78 4522.74 3999.21 4512.71 4006.38 4505.54 C 4009.24 4502.68 4013.54 4501.24 4017.84 4499.81 C 4020.71 4496.94 4007.81 4499.81 4004.94 4495.51 C 3999.21 4488.35 4017.84 4482.61 4023.57 4476.88 C 4027.87 4471.15 4030.74 4463.98 4037.91 4462.55 C 4042.21 4461.12 4043.64 4472.58 4047.94 4471.15 C 4059.4 4471.15 4070.87 4466.85 4080.9 4461.12 C 4083.77 4459.68 4069.44 4462.55 4069.44 4458.25 C 4069.44 4453.95 4079.47 4455.38 4079.47 4451.08 C 4078.04 4446.78 4049.37 4452.52 4017.84 4443.92 C 3987.75 4435.32 4017.84 4436.75 4010.68 4412.39 C 4003.51 4386.59 3963.38 4405.22 3951.92 4388.02 C 3920.39 4346.46 3979.15 4363.66 3980.58 4363.66 C 3982.01 4362.23 3974.85 4357.93 3976.28 4356.49 C 3982.01 4346.46 3989.18 4336.43 4000.64 4333.56 C 4010.68 4330.7 4022.14 4339.3 4033.61 4339.3 C 4036.47 4339.3 4039.34 4337.86 4040.77 4335 C 4059.4 4290.57 4006.38 4323.53 4003.51 4310.63 C 4000.64 4304.9 4016.41 4310.63 4020.71 4306.33 C 4029.31 4300.6 4014.98 4286.27 4013.54 4284.84 C 4013.54 4274.8 4026.44 4261.9 4019.28 4253.31 C 4013.54 4247.57 4002.08 4269.07 3996.34 4263.34 C 3990.61 4257.61 4004.94 4250.44 4007.81 4243.27 C 4009.24 4237.54 3994.91 4238.97 4007.81 4236.11 C 4020.71 4233.24 4088.07 4233.24 4095.23 4251.87 C 4099.53 4261.9 4093.8 4277.67 4102.4 4280.54 C 4111 4283.4 4111 4266.2 4118.16 4261.9 C 4131.06 4254.74 4168.32 4297.73 4169.76 4293.43 C 4174.06 4283.4 4159.73 4271.94 4161.16 4260.47 C 4164.03 4247.57 4207.02 4251.87 4207.02 4250.44 C 4218.49 4246.14 4227.08 4237.54 4234.25 4228.94 C 4238.55 4223.21 4212.75 4228.94 4212.75 4226.08 C 4208.45 4210.31 4212.75 4231.81 4194.12 4230.38 C 4191.26 4230.38 4195.55 4224.64 4195.55 4221.78 C 4195.55 4220.34 4195.55 4217.48 4194.12 4217.48 C 4188.39 4214.61 4159.73 4213.18 4164.03 4195.98 C 4172.62 4167.32 4201.29 4198.85 4209.89 4195.98 C 4215.62 4193.11 4192.69 4184.51 4196.99 4178.78 C 4202.72 4173.05 4214.19 4184.51 4221.35 4183.08 C 4228.52 4181.65 4215.62 4171.62 4211.32 4167.32 C 4208.45 4164.45 4221.35 4164.45 4222.78 4160.15 C 4228.52 4135.79 4166.89 4160.15 4241.42 4125.75 C 4245.72 4124.32 4251.45 4128.62 4257.18 4130.05 C 4277.25 4135.79 4300.18 4134.35 4317.37 4145.82 C 4327.41 4152.98 4291.58 4167.32 4297.31 4177.35 C 4303.04 4183.08 4314.51 4173.05 4321.67 4165.88 C 4324.54 4163.02 4317.37 4150.12 4323.11 4150.12 C 4331.71 4152.98 4337.44 4164.45 4343.17 4171.62 C 4311.64 4171.62 4320.24 4207.44 4297.31 4221.78 C 4293.01 4224.64 4255.75 4213.18 4258.61 4221.78 C 4260.05 4230.38 4278.68 4234.67 4275.81 4243.27 C 4275.81 4243.27 4219.92 4257.61 4218.49 4257.61 C 4212.75 4264.77 4268.65 4339.3 4290.14 4337.86 C 4356.07 4332.13 4277.25 4303.47 4338.87 4294.87 C 4354.64 4292 4347.47 4326.4 4354.64 4340.73 C 4357.5 4346.46 4371.83 4343.6 4370.4 4353.63 C 4367.53 4360.79 4357.5 4373.69 4364.67 4375.13 C 4413.4 4392.32 4383.3 4359.36 4404.8 4372.26 L 4410.53 4379.42 C 4409.1 4377.99 4407.66 4376.56 4406.23 4375.13 " }
+ }
+ }
+ // PATH visit nl count: 240
+ DemoShape {
+ objectName: "nl"
+ ShapePath {
+ objectName: "svg_path:nl"
+ // boundingRect: 5402.28, 4689.92 473.179x508.107
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 5655.95 4754.91 L 5630.15 4774.69 C 5615.82 4824.85 5678.88 4800.78 5655.95 4817.97 C 5645.92 4825.14 5630.15 4822.27 5624.42 4832.3 C 5617.26 4842.34 5639.95 4851.49 5631.35 4860.08 C 5628.48 4864.38 5610.09 4873.87 5612.96 4878.17 C 5612.96 4878.17 5630.92 4885 5630.92 4885 C 5639.52 4885 5671.19 4827.02 5694.55 4840.9 C 5703.26 4846.08 5691.78 4836.6 5688.91 4826.57 C 5686.05 4816.54 5708.98 4806.51 5704.68 4796.48 C 5698.95 4783.58 5664.55 4800.78 5664.55 4787.88 C 5665.98 4777.84 5671.72 4769.25 5673.15 4759.21 C 5673.15 4756.35 5670.28 4753.48 5668.85 4750.61 C 5667.42 4747.75 5651.37 4763.46 5657.1 4756.29 L 5628.72 4773.55 C 5618.69 4776.41 5607.22 4772.11 5597.19 4772.11 C 5592.89 4772.11 5588.59 4769.25 5587.16 4770.68 C 5568.53 4793.61 5574.26 4839.47 5565.66 4863.83 C 5557.06 4885.33 5539.86 4909.7 5524.1 4926.89 C 5518.37 4934.06 5514.07 4942.66 5506.9 4946.96 C 5502.6 4949.82 5492.57 4944.09 5491.14 4949.82 C 5488.27 4958.42 5501.17 4969.89 5496.87 4978.49 C 5482.54 5001.42 5438.11 4989.95 5448.14 4995.69 C 5459.61 5002.85 5468.21 5012.88 5481.1 5018.62 C 5486.84 5020.05 5492.57 5011.45 5496.87 5012.88 C 5502.6 5014.32 5512.63 5022.92 5508.33 5027.22 C 5501.17 5031.51 5482.54 5015.75 5482.54 5024.35 C 5483.97 5037.25 5521.23 5035.81 5514.07 5045.85 C 5492.57 5074.51 5472.51 5021.48 5463.91 5020.05 C 5436.68 5012.88 5410.88 5017.18 5415.18 5027.22 C 5415.18 5028.65 5459.61 5058.75 5468.21 5057.31 C 5471.07 5057.31 5469.64 5051.58 5472.51 5048.71 C 5478.24 5044.41 5483.97 5054.45 5489.7 5055.88 C 5495.44 5058.74 5504.04 5053.01 5509.77 5058.74 C 5512.63 5061.61 5515.5 5065.91 5516.93 5070.21 C 5521.23 5071.64 5524.1 5073.08 5528.4 5071.64 C 5538.43 5071.64 5511.2 5038.68 5545.6 5048.71 C 5548.46 5048.71 5542.73 5055.88 5544.16 5057.31 C 5561.36 5071.64 5565.66 5037.25 5578.56 5047.28 C 5582.86 5051.58 5567.09 5060.18 5571.39 5063.04 C 5604.36 5080.24 5575.69 5058.75 5601.49 5053.01 C 5605.79 5051.58 5612.96 5093.14 5622.99 5094.57 C 5645.92 5098.87 5676.01 5097.44 5694.65 5121.8 C 5696.08 5124.67 5688.91 5127.54 5687.48 5130.4 C 5684.61 5139 5677.45 5146.17 5676.01 5154.77 C 5676.01 5157.63 5683.18 5156.2 5681.75 5159.07 C 5680.31 5163.37 5673.15 5164.8 5671.72 5170.53 C 5661.68 5206.36 5686.05 5196.33 5708.98 5197.76 L 5710.41 5197.76 C 5707.54 5193.46 5706.11 5189.16 5706.11 5187.73 C 5707.54 5182 5717.58 5182 5719.01 5176.26 C 5723.31 5151.9 5681.75 5143.3 5694.65 5140.44 C 5698.95 5139 5701.81 5144.73 5704.68 5144.73 C 5704.68 5144.73 5731.91 5120.37 5731.91 5120.37 C 5733.34 5113.21 5714.71 5121.8 5720.44 5110.34 C 5724.74 5100.31 5734.77 5093.14 5739.07 5083.11 C 5751.97 5051.58 5720.44 5028.65 5711.84 5012.88 C 5710.41 5010.02 5713.28 5005.72 5714.71 5002.85 C 5714.71 4999.99 5711.84 4995.69 5714.71 4994.25 C 5721.88 4989.95 5730.48 4994.25 5739.07 4991.39 C 5741.94 4989.95 5736.21 4981.35 5739.07 4982.79 C 5747.67 4985.65 5753.41 4995.69 5763.44 4995.69 C 5773.47 4997.12 5812.17 4984.22 5816.47 4974.19 C 5820.76 4964.16 5789.24 4962.72 5802.13 4954.12 C 5825.06 4938.36 5852.29 4932.63 5846.56 4896.8 C 5845.13 4876.73 5792.1 4885.33 5805 4863.83 C 5806.43 4859.54 5813.6 4863.83 5813.6 4860.97 C 5815.03 4856.67 5807.87 4852.37 5809.3 4848.07 C 5809.3 4845.2 5813.6 4845.2 5816.47 4845.2 C 5826.5 4845.2 5835.1 4849.5 5845.13 4849.5 C 5856.59 4849.5 5846.56 4826.57 5850.86 4815.11 C 5853.73 4805.07 5878.09 4759.21 5875.23 4734.85 C 5846.56 4749.18 5843.7 4696.15 5819.33 4690.42 C 5797.83 4686.12 5684.61 4710.49 5671.72 4730.55 C 5664.55 4739.15 5661.68 4747.75 5655.95 4754.91 M 5405.15 5058.74 C 5402.28 5096.01 5432.38 5071.64 5453.87 5081.68 C 5456.74 5083.11 5451.01 5088.84 5453.87 5091.71 C 5471.07 5103.17 5485.4 5083.11 5496.87 5073.08 C 5489.7 5065.91 5481.1 5060.18 5478.24 5058.74 C 5471.07 5057.31 5469.64 5070.21 5462.47 5070.21 C 5438.11 5070.21 5453.87 5055.88 5425.21 5051.58 C 5418.05 5050.15 5410.88 5050.15 5402.28 5053.01 L 5405.15 5058.74 " }
+ }
+ }
+ // PATH visit be count: 157
+ DemoShape {
+ objectName: "be"
+ ShapePath {
+ objectName: "svg_path:be"
+ // boundingRect: 5301.96, 5045.41 450.877x384.166
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 5671.72 5427.07 C 5667.42 5425.64 5663.12 5424.2 5658.82 5424.2 C 5648.78 5422.77 5638.75 5432.8 5630.15 5428.5 C 5622.99 5425.64 5628.72 5412.74 5624.42 5407 C 5621.55 5402.7 5614.39 5405.57 5610.09 5402.7 C 5608.66 5401.27 5615.82 5398.41 5615.82 5396.97 C 5614.39 5394.11 5612.96 5391.24 5610.09 5389.81 C 5607.22 5388.37 5602.92 5394.11 5601.49 5392.67 C 5595.76 5388.37 5594.32 5379.77 5588.59 5375.47 C 5578.56 5371.18 5564.23 5375.47 5558.5 5366.88 C 5552.76 5361.14 5564.23 5352.54 5564.23 5345.38 C 5562.79 5339.65 5554.2 5338.21 5554.2 5332.48 C 5554.2 5325.31 5559.93 5319.58 5561.36 5313.85 C 5562.79 5309.55 5569.96 5305.25 5567.09 5302.38 C 5557.06 5293.78 5548.46 5319.58 5538.43 5328.18 C 5518.37 5346.81 5471.07 5335.35 5475.37 5326.75 C 5479.67 5319.58 5486.84 5315.28 5486.84 5308.12 C 5486.84 5303.82 5475.37 5303.82 5476.8 5298.08 C 5476.8 5289.48 5488.27 5282.32 5488.27 5273.72 C 5485.4 5249.36 5426.64 5263.69 5423.78 5252.22 C 5422.34 5246.49 5426.64 5239.32 5425.21 5233.59 C 5420.91 5210.66 5389.38 5233.59 5380.78 5213.53 C 5375.05 5202.06 5383.65 5169.1 5365.02 5161.93 C 5356.42 5157.63 5349.25 5177.7 5337.79 5177.7 C 5306.26 5177.7 5304.82 5123.24 5301.96 5103.17 C 5303.39 5101.74 5303.39 5101.74 5303.39 5101.74 C 5329.19 5094.57 5369.32 5063.04 5402.28 5053.01 L 5405.15 5058.74 C 5402.28 5096.01 5432.38 5071.64 5453.87 5081.68 C 5456.74 5083.11 5451.01 5088.84 5453.87 5091.71 C 5471.07 5103.17 5485.4 5083.11 5496.87 5073.08 C 5505.47 5080.24 5514.07 5085.98 5516.93 5084.54 C 5521.23 5081.68 5519.8 5075.94 5516.93 5070.21 C 5521.23 5071.64 5524.1 5073.08 5528.4 5071.64 C 5538.43 5071.64 5511.2 5038.68 5545.6 5048.71 C 5548.46 5048.71 5542.73 5055.88 5544.16 5057.31 C 5561.36 5071.64 5565.66 5037.25 5578.56 5047.28 C 5582.86 5051.58 5567.09 5060.18 5571.39 5063.04 C 5604.36 5080.24 5575.69 5058.74 5601.49 5053.01 C 5605.79 5051.58 5612.96 5093.14 5622.99 5094.57 C 5645.92 5098.87 5676.01 5097.44 5694.65 5121.8 C 5696.08 5124.67 5688.91 5127.54 5687.48 5130.4 C 5684.61 5139 5677.45 5146.17 5676.01 5154.77 C 5676.01 5157.63 5683.18 5156.2 5681.75 5159.07 C 5680.31 5163.37 5673.15 5164.8 5671.72 5170.53 C 5661.68 5206.36 5686.05 5196.33 5708.98 5197.76 L 5710.41 5197.76 C 5716.14 5207.79 5724.74 5223.56 5726.18 5223.56 C 5729.04 5226.43 5737.64 5220.69 5737.64 5224.99 C 5739.07 5230.72 5727.61 5236.46 5729.04 5242.19 C 5731.91 5250.79 5744.81 5249.36 5749.11 5256.52 C 5764.87 5282.32 5726.18 5286.62 5716.14 5313.85 C 5700.38 5286.62 5671.72 5339.65 5665.98 5355.41 C 5661.68 5368.31 5704.68 5424.2 5673.15 5421.34 L 5671.72 5427.07 " }
+ }
+ }
+ // PATH visit lu count: 29
+ DemoShape {
+ objectName: "lu"
+ ShapePath {
+ objectName: "svg_path:lu"
+ // boundingRect: 5665.68, 5306.2 99.2084x135.428
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 5739.07 5441.4 C 5731.91 5438.53 5723.31 5434.23 5714.71 5434.23 C 5707.54 5434.23 5700.38 5441.4 5691.78 5441.4 C 5690.35 5442.83 5691.78 5437.1 5690.35 5435.67 C 5684.61 5432.8 5678.88 5429.93 5671.72 5427.07 L 5673.15 5421.34 C 5704.68 5424.2 5661.68 5368.31 5665.98 5355.41 C 5671.72 5339.65 5700.38 5286.62 5716.14 5313.85 C 5714.71 5321.01 5713.28 5328.18 5716.14 5339.65 C 5723.31 5369.74 5757.71 5372.61 5760.57 5376.91 C 5780.64 5401.27 5723.31 5412.74 5739.07 5441.4 " }
+ }
+ }
+ // PATH visit de count: 584
+ DemoShape {
+ objectName: "de"
+ ShapePath {
+ objectName: "svg_path:de"
+ // boundingRect: 5692.15, 4428.15 1080.38x1437.92
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 6657.73 4638.83 C 6660.6 4661.76 6683.53 4706.19 6686.4 4720.52 C 6690.7 4754.91 6644.83 4777.84 6654.87 4805.07 C 6660.6 4822.27 6715.06 4829.44 6715.06 4850.94 C 6715.06 4872.43 6697.86 4879.6 6710.76 4895.36 C 6715.06 4902.53 6725.09 4905.4 6727.96 4914 C 6732.26 4921.16 6726.53 4931.19 6727.96 4938.36 C 6729.39 4942.66 6735.12 4941.23 6736.56 4944.09 C 6743.72 4954.12 6726.53 4978.49 6722.23 4987.09 C 6713.63 4999.99 6735.12 5007.15 6739.42 5020.05 C 6742.29 5027.22 6732.26 5035.81 6736.56 5041.55 C 6742.29 5050.15 6755.19 5047.28 6760.92 5053.01 C 6780.99 5071.64 6772.39 5176.26 6755.19 5179.13 C 6736.56 5183.43 6706.46 5104.61 6690.7 5149.03 C 6687.83 5156.2 6713.63 5161.93 6707.89 5166.23 C 6690.7 5180.56 6666.33 5182 6649.13 5192.03 C 6646.27 5193.46 6649.13 5200.63 6646.27 5202.06 C 6634.8 5207.79 6619.04 5199.2 6610.44 5206.36 C 6603.27 5212.09 6606.14 5223.56 6598.97 5229.29 C 6596.11 5232.16 6593.24 5222.13 6588.94 5223.56 C 6576.04 5226.43 6574.61 5243.62 6566.01 5249.36 C 6561.71 5253.66 6553.11 5246.49 6548.81 5250.79 C 6544.51 5253.66 6548.81 5262.25 6544.51 5266.55 C 6538.78 5273.72 6523.02 5260.82 6518.72 5260.82 C 6482.89 5266.55 6477.15 5293.78 6465.69 5316.71 C 6462.82 5322.45 6462.82 5302.38 6457.09 5298.08 C 6452.79 5292.35 6444.19 5290.92 6437.03 5289.48 C 6424.13 5286.62 6451.36 5332.48 6480.02 5351.11 C 6482.89 5352.54 6492.92 5353.98 6494.35 5362.58 C 6498.65 5382.64 6480.02 5375.47 6477.15 5391.24 C 6475.72 5395.54 6507.25 5448.57 6511.55 5452.87 C 6535.91 5477.23 6541.65 5460.03 6557.41 5475.8 C 6567.44 5485.83 6568.88 5501.59 6578.91 5510.19 C 6601.84 5525.96 6663.47 5547.45 6662.03 5584.72 C 6660.6 5623.41 6652 5614.81 6621.9 5607.65 C 6619.04 5607.65 6616.17 5609.08 6614.74 5611.95 C 6611.87 5626.28 6620.47 5642.04 6606.14 5653.51 C 6593.24 5663.54 6533.05 5677.87 6531.61 5700.8 C 6531.61 5700.8 6566.01 5748.1 6566.01 5749.53 C 6567.44 5750.96 6547.38 5768.16 6554.55 5773.89 C 6570.31 5788.23 6586.08 5766.73 6573.18 5814.02 C 6573.18 5816.89 6570.31 5821.19 6567.44 5821.19 C 6521.58 5808.29 6557.41 5785.36 6535.91 5783.93 C 6524.45 5783.93 6514.42 5793.96 6502.95 5792.53 C 6497.22 5791.09 6498.65 5781.06 6494.35 5779.63 C 6485.75 5776.76 6477.15 5783.93 6469.99 5781.06 C 6467.12 5779.63 6472.86 5771.03 6469.99 5771.03 C 6452.79 5772.46 6468.56 5795.39 6464.26 5796.83 C 6444.19 5802.56 6411.23 5793.96 6392.6 5801.12 C 6386.87 5803.99 6389.73 5814.02 6384 5816.89 C 6378.27 5821.19 6371.1 5814.02 6365.37 5818.32 C 6361.07 5819.76 6366.8 5826.92 6363.93 5829.79 C 6362.5 5831.22 6313.77 5844.12 6308.04 5841.25 C 6305.17 5838.39 6308.04 5831.22 6305.17 5828.35 C 6303.74 5825.49 6296.58 5825.49 6295.14 5822.62 C 6293.71 5819.76 6302.31 5821.19 6300.88 5818.32 C 6295.14 5799.69 6255.01 5822.62 6243.55 5809.72 C 6243.55 5809.72 6246.41 5808.29 6246.41 5806.86 C 6237.82 5801.12 6246.41 5825.49 6243.55 5835.52 C 6243.55 5841.25 6216.32 5874.22 6206.29 5864.18 C 6200.55 5858.45 6216.32 5849.85 6212.02 5844.12 C 6210.59 5842.69 6206.29 5848.42 6203.42 5848.42 C 6200.55 5848.42 6196.25 5846.99 6194.82 5844.12 C 6191.95 5839.82 6201.99 5834.09 6194.82 5828.35 C 6189.09 5824.06 6186.22 5816.89 6180.49 5814.02 C 6176.19 5811.16 6170.46 5818.32 6164.72 5816.89 C 6161.86 5814.02 6164.72 5806.86 6161.86 5803.99 C 6154.69 5798.26 6156.13 5824.06 6133.19 5816.89 C 6117.43 5811.16 6107.4 5795.39 6091.63 5791.09 C 6090.2 5791.09 6042.91 5793.96 6042.91 5793.96 C 6037.17 5791.09 6037.17 5781.06 6031.44 5778.19 C 6030.01 5775.33 6034.31 5785.36 6031.44 5786.79 C 6028.57 5788.23 6022.84 5786.79 6021.41 5783.93 C 6019.97 5779.63 6027.14 5773.89 6024.27 5771.03 C 6002.78 5749.53 5978.41 5788.23 5982.71 5789.66 C 5991.31 5791.09 5999.91 5788.23 6008.51 5789.66 C 6014.24 5791.09 5998.48 5792.53 5994.18 5795.39 C 5991.31 5796.83 5995.61 5803.99 5994.18 5805.42 C 5958.35 5824.06 5984.15 5796.83 5955.48 5798.26 C 5951.18 5798.26 5885.26 5814.02 5880.96 5805.42 C 5879.52 5802.56 5889.56 5801.12 5888.12 5799.69 C 5875.22 5789.66 5869.49 5832.65 5869.49 5782.49 C 5868.06 5762.43 5882.39 5743.8 5883.82 5723.73 C 5883.82 5720.87 5878.09 5720.87 5878.09 5716.57 C 5876.66 5709.4 5879.52 5702.24 5882.39 5695.07 C 5882.39 5695.07 5902.46 5662.11 5902.46 5662.11 C 5903.89 5653.51 5905.32 5621.98 5909.62 5611.95 C 5921.09 5589.02 5949.75 5571.82 5965.51 5544.59 C 5971.25 5534.56 5885.26 5524.52 5879.52 5520.22 C 5875.22 5515.92 5878.09 5507.33 5873.79 5503.03 C 5866.63 5497.29 5820.76 5515.92 5817.9 5511.63 C 5816.47 5507.33 5822.2 5501.59 5819.33 5498.73 C 5776.34 5460.03 5805 5518.79 5787.8 5500.16 C 5773.47 5485.83 5766.3 5452.87 5754.84 5445.7 C 5750.54 5441.4 5741.94 5445.7 5739.07 5441.4 C 5723.31 5412.74 5780.64 5401.27 5760.57 5376.91 C 5757.71 5372.61 5723.31 5369.74 5716.14 5339.65 C 5703.24 5286.62 5769.17 5289.48 5749.11 5256.52 C 5744.81 5249.36 5731.91 5250.79 5729.04 5242.19 C 5727.61 5236.46 5739.07 5230.72 5737.64 5224.99 C 5737.64 5220.69 5729.04 5226.43 5726.18 5223.56 C 5724.74 5222.13 5704.68 5192.03 5706.11 5187.73 C 5707.54 5182 5717.58 5182 5719.01 5176.26 C 5723.31 5151.9 5681.75 5143.3 5694.65 5140.44 C 5698.95 5139 5701.81 5144.73 5704.68 5144.73 C 5704.68 5144.73 5731.91 5120.37 5731.91 5120.37 C 5733.34 5113.21 5714.71 5121.8 5720.44 5110.34 C 5724.74 5100.31 5734.77 5093.14 5739.07 5083.11 C 5751.97 5051.58 5720.44 5028.65 5711.84 5012.88 C 5710.41 5010.02 5713.28 5005.72 5714.71 5002.85 C 5714.71 4999.99 5711.84 4995.69 5714.71 4994.25 C 5721.88 4989.95 5730.48 4994.25 5739.07 4991.39 C 5741.94 4989.95 5736.21 4981.35 5739.07 4982.79 C 5747.67 4985.65 5753.41 4995.69 5763.44 4995.69 C 5773.47 4997.12 5812.17 4984.22 5816.47 4974.19 C 5820.76 4964.16 5789.24 4962.72 5802.13 4954.12 C 5825.06 4938.36 5852.29 4932.63 5846.56 4896.8 C 5845.13 4876.73 5792.1 4885.33 5805 4863.83 C 5806.43 4859.54 5813.6 4863.83 5813.6 4860.97 C 5815.03 4856.67 5807.87 4852.37 5809.3 4848.07 C 5809.3 4845.2 5813.6 4845.2 5816.47 4845.2 C 5826.5 4845.2 5835.1 4849.5 5845.13 4849.5 C 5856.59 4849.5 5846.56 4826.57 5850.86 4815.11 C 5853.73 4805.07 5878.09 4759.21 5875.23 4734.85 C 5879.52 4733.42 5883.82 4730.55 5888.12 4724.82 C 5893.86 4719.08 5880.96 4721.95 5868.06 4721.95 C 5865.19 4719.08 5860.89 4720.52 5858.03 4720.52 C 5855.16 4720.52 5853.73 4719.08 5852.29 4717.65 C 5840.83 4703.32 5872.36 4658.89 5883.82 4653.16 C 5890.99 4648.86 5899.59 4657.46 5906.75 4657.46 C 6014.24 4653.16 5794.97 4644.56 5958.35 4648.86 C 5959.78 4648.86 5964.08 4650.29 5965.51 4651.73 C 5974.11 4667.49 5979.85 4733.42 6015.68 4719.08 C 6027.14 4714.79 6004.21 4615.9 6037.17 4615.9 C 6040.04 4615.9 6040.04 4624.5 6044.34 4625.93 C 6048.64 4628.8 6055.8 4628.8 6061.54 4628.8 C 6075.87 4631.66 6091.63 4617.33 6104.53 4623.06 C 6114.56 4627.36 6114.56 4641.69 6120.3 4650.29 C 6127.46 4661.76 6166.16 4734.85 6166.16 4686.12 C 6166.16 4676.09 6144.66 4678.96 6136.06 4670.36 C 6121.73 4657.46 6124.6 4624.5 6097.37 4620.2 C 6093.07 4620.2 6060.1 4627.36 6062.97 4607.3 C 6064.4 4594.4 6084.47 4554.27 6071.57 4538.51 C 6067.27 4534.21 6035.74 4549.97 6031.44 4534.21 C 6030.01 4531.34 6040.04 4534.21 6041.47 4531.34 C 6044.34 4528.47 6031.44 4522.74 6034.31 4522.74 C 6048.64 4518.44 6073 4532.77 6077.3 4504.11 C 6077.3 4501.24 6044.34 4465.41 6041.47 4459.68 C 6037.17 4449.65 6035.74 4438.18 6035.74 4428.15 C 6045.77 4429.59 6062.97 4428.15 6067.27 4428.15 C 6085.9 4431.02 6104.53 4441.05 6123.16 4443.92 C 6121.73 4448.22 6121.73 4449.65 6124.6 4448.22 C 6130.33 4443.92 6133.19 4436.75 6138.93 4435.32 C 6141.79 4435.32 6137.49 4442.48 6138.93 4445.35 C 6143.23 4448.22 6148.96 4446.78 6153.26 4448.22 C 6163.29 4449.65 6173.32 4449.65 6180.49 4453.95 C 6184.79 4456.82 6186.22 4462.55 6186.22 4466.85 C 6186.22 4468.28 6183.36 4466.85 6183.36 4466.85 C 6180.49 4468.28 6174.76 4471.15 6177.62 4472.58 C 6179.06 4475.45 6186.22 4469.71 6187.66 4472.58 C 6191.95 4479.75 6190.52 4488.35 6187.66 4495.51 C 6184.79 4502.68 6164.72 4506.98 6170.46 4514.14 C 6177.62 4524.17 6204.85 4498.38 6206.29 4511.28 C 6207.72 4519.87 6191.95 4535.64 6200.55 4538.51 C 6210.59 4542.81 6210.59 4518.44 6220.62 4517.01 C 6229.22 4515.58 6262.18 4544.24 6269.35 4541.37 C 6270.78 4541.37 6299.44 4508.41 6309.47 4525.61 C 6329.54 4562.87 6229.22 4601.57 6283.68 4607.3 C 6295.14 4608.73 6303.74 4594.4 6315.21 4594.4 C 6329.54 4595.83 6313.77 4637.39 6345.3 4615.9 C 6352.47 4611.6 6356.77 4575.77 6369.67 4568.6 C 6388.3 4558.57 6408.36 4554.27 6416.96 4574.34 C 6415.53 4570.04 6414.1 4562.87 6415.53 4561.44 C 6424.13 4551.4 6435.59 4547.1 6442.76 4538.51 C 6451.36 4528.47 6452.79 4512.71 6461.39 4502.68 C 6464.26 4499.81 6482.89 4506.98 6500.09 4512.71 C 6507.25 4511.28 6514.42 4509.84 6517.28 4509.84 C 6527.32 4509.84 6521.58 4529.91 6527.32 4538.51 C 6531.61 4544.24 6541.65 4541.37 6545.95 4547.1 C 6554.55 4554.27 6558.84 4574.34 6571.74 4572.9 C 6581.78 4572.9 6593.24 4565.74 6604.71 4568.6 C 6609.01 4570.04 6598.97 4577.2 6598.97 4581.5 C 6600.41 4592.97 6604.71 4604.43 6609.01 4615.9 C 6613.31 4627.36 6627.64 4631.66 6639.1 4635.96 C 6647.7 4638.83 6653.43 4640.26 6657.73 4638.83 M 6527.32 4528.47 C 6530.18 4515.58 6524.45 4499.81 6528.75 4486.91 C 6533.05 4474.01 6576.04 4511.28 6567.44 4498.38 C 6561.71 4489.78 6543.08 4494.08 6538.78 4484.05 C 6537.35 4475.45 6550.25 4468.28 6555.98 4461.12 C 6561.71 4456.82 6551.68 4478.31 6557.41 4479.75 C 6567.44 4482.61 6577.48 4478.31 6586.08 4481.18 C 6594.67 4484.05 6574.61 4495.51 6577.48 4504.11 C 6580.34 4514.14 6593.24 4515.58 6597.54 4525.61 C 6600.41 4528.47 6581.78 4542.81 6558.84 4548.54 C 6547.38 4552.84 6537.35 4535.64 6527.32 4528.47 " }
+ }
+ }
+ // PATH visit fr count: 891
+ DemoShape {
+ objectName: "fr"
+ ShapePath {
+ objectName: "svg_path:fr"
+ // boundingRect: 4338.59, 5103.17 1784.64x1875.74
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 5301.96 5103.17 C 5304.82 5123.24 5306.26 5177.7 5337.79 5177.7 C 5349.25 5177.7 5356.42 5157.63 5365.02 5161.93 C 5383.65 5169.1 5375.05 5202.06 5380.78 5213.53 C 5389.38 5233.59 5420.91 5210.66 5425.21 5233.59 C 5426.64 5239.32 5422.34 5246.49 5423.78 5252.22 C 5426.64 5263.69 5485.4 5249.36 5488.27 5273.72 C 5488.27 5282.32 5476.8 5289.48 5476.8 5298.08 C 5475.37 5303.82 5486.84 5303.82 5486.84 5308.12 C 5486.84 5315.28 5479.67 5319.58 5475.37 5326.75 C 5471.07 5335.35 5518.37 5346.81 5538.43 5328.18 C 5548.46 5319.58 5557.06 5293.78 5567.09 5302.38 C 5569.96 5305.25 5562.79 5309.55 5561.36 5313.85 C 5559.93 5319.58 5554.2 5325.31 5554.2 5332.48 C 5554.2 5338.21 5562.79 5339.65 5564.23 5345.38 C 5564.23 5352.54 5552.76 5361.14 5558.5 5366.88 C 5564.23 5375.47 5578.56 5371.18 5588.59 5375.47 C 5594.32 5379.77 5595.76 5388.37 5601.49 5392.67 C 5602.92 5394.11 5607.22 5388.37 5610.09 5389.81 C 5612.96 5391.24 5614.39 5394.11 5615.82 5396.97 C 5615.82 5398.41 5608.66 5401.27 5610.09 5402.7 C 5614.39 5405.57 5621.55 5402.7 5624.42 5407 C 5628.72 5412.74 5622.99 5425.64 5630.15 5428.5 C 5638.75 5432.8 5648.78 5422.77 5658.82 5424.2 C 5663.12 5424.2 5667.42 5425.64 5671.72 5427.07 C 5678.88 5429.93 5684.61 5432.8 5690.35 5435.67 C 5691.78 5437.1 5690.35 5442.83 5691.78 5441.4 C 5700.38 5441.4 5707.54 5434.23 5714.71 5434.23 C 5723.31 5434.23 5731.91 5438.53 5739.07 5441.4 C 5741.94 5445.7 5750.54 5441.4 5754.84 5445.7 C 5766.3 5452.87 5773.47 5485.83 5787.8 5500.16 C 5805 5518.79 5776.34 5460.03 5819.33 5498.73 C 5822.2 5501.59 5816.47 5507.33 5817.9 5511.63 C 5820.76 5515.92 5866.63 5497.29 5873.79 5503.03 C 5878.09 5507.33 5875.23 5515.92 5879.52 5520.22 C 5885.26 5524.52 5971.25 5534.56 5965.51 5544.59 C 5949.75 5571.82 5921.09 5589.02 5909.62 5611.95 C 5905.32 5621.98 5903.89 5653.51 5902.46 5662.11 L 5882.39 5695.07 C 5879.52 5702.24 5876.66 5709.4 5878.09 5716.57 C 5878.09 5720.87 5883.82 5720.87 5883.82 5723.73 C 5882.39 5743.8 5868.06 5762.43 5869.49 5782.49 C 5869.49 5801.12 5869.49 5806.86 5870.93 5806.86 C 5822.2 5857.02 5839.4 5802.56 5799.27 5814.02 C 5796.4 5815.46 5802.13 5821.19 5802.13 5824.06 C 5802.13 5825.49 5799.27 5824.06 5799.27 5824.06 C 5794.97 5829.79 5783.5 5835.52 5786.37 5842.69 C 5787.8 5849.85 5809.3 5835.52 5809.3 5842.69 C 5807.87 5862.75 5800.7 5846.99 5793.53 5852.72 C 5780.64 5862.75 5769.17 5891.41 5759.14 5900.01 C 5750.54 5910.05 5730.48 5905.75 5724.74 5917.21 C 5720.44 5927.24 5729.04 5940.14 5724.74 5948.74 C 5719.01 5964.51 5693.21 5964.51 5683.18 5978.84 C 5665.98 6000.33 5684.61 6020.4 5677.45 6043.33 C 5676.01 6047.63 5661.68 6040.46 5661.68 6059.09 C 5661.68 6061.96 5654.52 6064.83 5655.95 6064.83 C 5673.15 6069.13 5693.21 6061.96 5701.81 6044.76 C 5703.24 6041.9 5696.08 6039.03 5694.65 6036.16 C 5694.65 6031.86 5693.21 6029 5696.08 6026.13 C 5708.98 6006.07 5749.11 6006.07 5767.74 6014.67 C 5773.47 6016.1 5762 6024.7 5763.44 6029 C 5763.44 6036.16 5772.04 6039.03 5773.47 6046.2 C 5774.9 6054.8 5754.84 6053.36 5763.44 6067.69 C 5766.3 6070.56 5774.9 6066.26 5776.34 6070.56 C 5779.2 6074.86 5772.04 6082.03 5773.47 6086.32 C 5774.9 6089.19 5780.64 6080.59 5782.07 6083.46 C 5789.23 6090.62 5789.23 6100.66 5794.97 6109.26 C 5729.04 6147.95 5766.3 6130.75 5786.37 6165.15 C 5789.23 6170.88 5783.5 6180.91 5787.8 6186.65 C 5792.1 6196.68 5806.43 6198.11 5810.73 6206.71 C 5817.9 6219.61 5772.04 6256.87 5764.87 6258.3 C 5760.57 6259.74 5757.71 6251.14 5753.41 6251.14 C 5746.24 6252.57 5733.34 6252.57 5733.34 6259.74 C 5730.48 6282.67 5777.77 6301.3 5784.94 6312.77 C 5789.23 6321.36 5790.67 6332.83 5790.67 6344.29 C 5789.23 6348.59 5776.34 6341.43 5774.9 6345.73 C 5773.47 6348.59 5777.77 6351.46 5776.34 6352.89 C 5772.04 6360.06 5764.87 6364.36 5759.14 6370.09 C 5754.84 6378.69 5769.17 6382.99 5770.6 6387.29 C 5770.6 6390.16 5763.44 6390.16 5763.44 6393.02 C 5762 6413.09 5799.27 6440.32 5815.03 6444.62 C 5823.63 6447.48 5833.66 6443.18 5842.26 6443.18 C 5850.86 6441.75 5860.89 6436.02 5868.06 6440.32 C 5889.56 6456.08 5840.83 6489.04 5847.99 6514.84 C 5846.56 6514.84 5822.2 6523.44 5819.33 6526.31 C 5817.9 6527.74 5822.2 6533.47 5819.33 6533.47 C 5817.9 6532.04 5819.33 6526.31 5817.9 6526.31 C 5809.3 6527.74 5799.27 6529.17 5793.53 6534.91 C 5789.23 6539.21 5796.4 6549.24 5790.67 6553.54 C 5784.94 6557.84 5774.9 6552.1 5767.74 6556.4 C 5762 6560.7 5763.44 6572.17 5756.27 6577.9 C 5750.54 6580.77 5743.37 6573.6 5737.64 6576.47 C 5733.34 6577.9 5736.21 6585.07 5731.91 6589.37 C 5727.61 6595.1 5716.14 6596.53 5713.28 6603.7 C 5711.84 6609.43 5724.74 6618.03 5719.01 6622.33 C 5711.84 6629.49 5697.51 6622.33 5687.48 6623.76 C 5674.58 6626.63 5665.98 6639.53 5654.52 6643.83 C 5641.62 6648.13 5651.65 6628.06 5622.99 6626.63 C 5604.36 6625.2 5624.42 6633.79 5621.55 6636.66 C 5618.69 6639.53 5612.96 6639.53 5608.66 6638.09 C 5604.36 6638.09 5600.06 6638.09 5598.62 6635.23 C 5598.62 6632.36 5608.66 6625.2 5588.59 6615.16 C 5584.29 6613.73 5579.99 6615.16 5574.26 6615.16 C 5564.23 6612.3 5552.76 6613.73 5545.6 6606.56 C 5538.43 6599.4 5545.6 6585.07 5539.86 6577.9 C 5537 6573.6 5531.27 6583.63 5525.53 6583.63 C 5516.93 6583.63 5499.74 6586.5 5501.17 6577.9 C 5502.6 6566.44 5528.4 6570.73 5529.83 6559.27 C 5529.83 6547.8 5514.07 6539.21 5504.04 6540.64 C 5495.44 6542.07 5511.2 6557.84 5506.9 6563.57 C 5499.74 6570.73 5488.27 6575.03 5478.24 6573.6 C 5455.31 6572.17 5462.47 6532.04 5458.17 6537.77 C 5438.11 6560.7 5482.54 6570.73 5469.64 6576.47 C 5423.78 6595.1 5443.84 6565 5442.41 6559.27 C 5440.98 6553.54 5390.81 6547.8 5386.52 6544.94 C 5375.05 6539.21 5360.72 6520.57 5346.39 6529.17 C 5330.62 6537.77 5307.69 6566.44 5291.93 6575.03 C 5277.59 6582.2 5248.93 6576.47 5231.73 6600.83 C 5228.87 6603.7 5236.03 6609.43 5236.03 6613.73 C 5233.17 6628.06 5214.54 6636.66 5213.1 6652.43 C 5213.1 6656.72 5223.13 6655.29 5224.57 6659.59 C 5231.73 6685.39 5213.1 6678.22 5223.13 6706.89 C 5226 6715.48 5234.6 6722.65 5243.2 6729.82 L 5237.47 6729.82 C 5214.54 6724.08 5188.74 6711.19 5167.24 6725.52 C 5162.94 6728.38 5168.67 6739.85 5162.94 6741.28 C 5148.61 6745.58 5124.25 6716.92 5109.91 6716.92 C 5097.02 6716.92 5086.98 6724.08 5075.52 6725.52 C 5066.92 6726.95 5065.49 6711.19 5062.62 6708.32 C 5055.45 6702.59 5043.99 6699.72 5033.96 6695.42 C 5048.29 6676.79 5045.42 6658.16 5008.16 6661.02 C 5006.73 6661.02 5002.43 6666.76 4999.56 6673.92 L 4999.56 6672.49 C 4992.39 6668.19 4996.69 6655.29 4989.53 6649.56 C 4985.23 6645.26 4976.63 6645.26 4969.46 6643.83 C 4966.6 6643.83 4962.3 6645.26 4960.87 6643.83 C 4945.1 6629.49 4930.77 6612.3 4906.4 6608 C 4889.21 6605.13 4896.37 6638.09 4896.37 6638.09 C 4880.61 6636.66 4867.71 6625.2 4853.38 6626.63 C 4849.08 6626.63 4849.08 6635.23 4844.78 6635.23 C 4836.18 6633.79 4831.88 6623.76 4823.28 6622.33 C 4814.68 6620.9 4808.95 6629.49 4800.35 6628.06 C 4781.72 6628.06 4788.89 6609.43 4778.85 6600.83 C 4758.79 6583.63 4740.16 6609.43 4721.53 6595.1 C 4720.09 6595.1 4705.76 6562.14 4704.33 6560.7 C 4685.7 6546.37 4654.17 6553.54 4634.1 6534.91 C 4631.24 6532.04 4635.54 6524.87 4634.1 6522.01 C 4631.24 6519.14 4622.64 6534.91 4614.04 6532.04 C 4595.41 6523.44 4636.97 6506.24 4624.07 6491.91 C 4619.77 6486.18 4611.17 6483.31 4604.01 6481.88 C 4602.57 6481.88 4604.01 6489.04 4601.14 6487.61 C 4601.14 6487.61 4585.38 6473.28 4576.78 6464.68 C 4585.38 6463.25 4591.11 6461.81 4596.84 6458.95 C 4638.4 6438.88 4655.6 6301.3 4671.37 6258.3 C 4674.23 6251.14 4677.1 6241.11 4684.26 6238.24 C 4690 6235.37 4702.9 6248.27 4705.76 6241.11 C 4710.06 6233.94 4700.03 6222.48 4691.43 6221.04 C 4684.26 6219.61 4682.83 6239.67 4675.67 6236.81 C 4661.33 6232.51 4682.83 6209.58 4685.7 6195.25 C 4691.43 6172.31 4707.19 6087.76 4722.96 6076.29 C 4728.69 6073.43 4748.76 6104.96 4754.49 6119.29 C 4774.55 6162.28 4747.32 6122.15 4761.66 6168.02 C 4764.52 6176.61 4773.12 6183.78 4775.99 6192.38 C 4777.42 6196.68 4771.69 6209.58 4775.99 6208.14 C 4783.15 6206.71 4787.45 6196.68 4786.02 6190.95 C 4783.15 6182.35 4773.12 6179.48 4767.39 6172.31 C 4755.92 6153.68 4771.69 6119.29 4760.22 6097.79 C 4754.49 6086.32 4744.46 6076.29 4735.86 6066.26 C 4730.13 6059.09 4722.96 6051.93 4714.36 6046.2 C 4722.96 6049.06 4732.99 6051.93 4741.59 6047.63 C 4751.62 6041.9 4720.09 6027.57 4722.96 6016.1 C 4725.83 6004.63 4738.72 5998.9 4740.16 5987.44 C 4741.59 5978.84 4731.56 5971.67 4731.56 5963.07 C 4731.56 5953.04 4740.16 5943.01 4740.16 5932.98 C 4740.16 5930.11 4732.99 5930.11 4728.69 5931.54 C 4725.83 5932.98 4728.69 5941.58 4725.83 5940.14 C 4718.66 5937.28 4717.23 5925.81 4711.49 5921.51 C 4707.19 5920.08 4701.46 5925.81 4697.16 5922.94 C 4692.86 5920.08 4697.16 5910.05 4692.86 5907.18 C 4667.07 5882.82 4681.4 5935.84 4657.03 5888.55 C 4655.6 5884.25 4654.17 5852.72 4648.44 5845.55 C 4647 5844.12 4642.7 5845.55 4641.27 5844.12 C 4635.54 5835.52 4628.37 5825.49 4624.07 5815.46 C 4618.34 5801.12 4647 5786.79 4649.87 5781.06 C 4655.6 5768.16 4621.2 5759.56 4621.2 5758.13 C 4618.34 5748.1 4618.34 5742.37 4619.77 5738.07 L 4618.34 5738.07 C 4559.58 5732.33 4614.04 5718 4615.47 5686.47 C 4616.91 5667.84 4556.71 5683.61 4555.28 5676.44 C 4552.41 5664.97 4569.61 5660.67 4578.21 5654.94 C 4579.64 5653.51 4571.04 5657.81 4569.61 5656.38 C 4568.18 5654.94 4569.61 5650.64 4568.18 5649.21 C 4563.88 5649.21 4562.45 5653.51 4558.15 5654.94 C 4546.68 5654.94 4535.21 5646.34 4525.18 5650.64 C 4523.75 5652.08 4522.32 5653.51 4522.32 5654.94 L 4522.32 5653.51 C 4525.18 5634.88 4539.51 5616.25 4509.42 5613.38 C 4493.65 5611.95 4497.95 5632.01 4486.49 5624.85 C 4477.89 5619.11 4466.42 5600.48 4457.82 5596.18 C 4452.09 5594.75 4444.93 5600.48 4440.63 5596.18 C 4421.99 5581.85 4444.93 5564.65 4409.1 5567.52 C 4406.23 5568.95 4411.96 5576.12 4409.1 5577.55 C 4399.06 5581.85 4384.73 5590.45 4376.13 5583.28 C 4367.53 5577.55 4376.13 5561.79 4373.27 5551.75 C 4368.97 5534.56 4350.34 5538.86 4338.87 5531.69 C 4337.44 5530.26 4341.74 5525.96 4344.6 5525.96 C 4358.94 5523.09 4373.27 5524.52 4387.6 5524.52 C 4390.47 5524.52 4397.63 5530.26 4397.63 5527.39 C 4397.63 5524.52 4384.73 5504.46 4376.13 5490.13 L 4377.57 5491.56 C 4384.73 5494.43 4393.33 5491.56 4401.93 5492.99 C 4407.66 5492.99 4420.56 5498.73 4416.26 5495.86 C 4406.23 5490.13 4389.03 5492.99 4384.73 5482.96 C 4381.87 5474.36 4404.8 5477.23 4406.23 5468.63 C 4410.53 5451.43 4320.24 5517.36 4350.34 5439.97 C 4351.77 5439.97 4399.06 5421.34 4411.96 5421.34 C 4427.73 5421.34 4391.9 5439.97 4426.29 5429.93 C 4436.33 5428.5 4446.36 5417.04 4456.39 5419.9 C 4464.99 5422.77 4460.69 5439.97 4469.29 5442.83 C 4475.02 5442.83 4470.72 5425.64 4476.46 5424.2 C 4486.49 5424.2 4493.65 5442.83 4503.69 5439.97 C 4512.28 5437.1 4506.55 5418.47 4515.15 5412.74 C 4518.02 5409.87 4523.75 5418.47 4528.05 5418.47 C 4536.65 5418.47 4546.68 5409.87 4553.85 5414.17 C 4561.01 5418.47 4555.28 5432.8 4562.45 5437.1 C 4566.74 5439.97 4566.74 5429.93 4571.04 5427.07 C 4578.21 5421.34 4601.14 5482.96 4606.87 5494.43 C 4608.31 5495.86 4608.31 5488.69 4611.17 5488.69 C 4619.77 5482.96 4628.37 5481.53 4638.4 5477.23 C 4645.57 5472.93 4651.3 5461.46 4658.47 5464.33 C 4671.37 5470.06 4659.9 5520.22 4694.3 5505.89 C 4704.33 5501.59 4698.6 5482.96 4705.76 5472.93 C 4712.93 5462.9 4714.36 5492.99 4722.96 5494.43 C 4731.56 5495.86 4738.72 5491.56 4747.32 5492.99 C 4755.92 5492.99 4773.12 5505.89 4775.99 5497.29 C 4778.85 5481.53 4745.89 5470.06 4750.19 5454.3 C 4753.06 5444.27 4755.92 5434.23 4760.22 5424.2 C 4757.36 5424.2 4754.49 5422.77 4755.92 5417.04 C 4758.79 5407 4767.39 5395.54 4767.39 5384.07 C 4767.39 5381.21 4758.79 5385.51 4757.36 5382.64 C 4754.49 5375.47 4757.36 5364.01 4753.06 5356.84 C 4751.62 5352.54 4743.02 5352.54 4740.16 5348.24 C 4737.29 5339.65 4735.86 5328.18 4737.29 5319.58 C 4737.29 5315.28 4744.46 5313.85 4744.46 5310.98 C 4744.46 5300.95 4738.72 5290.92 4737.29 5280.89 C 4737.29 5278.02 4740.16 5286.62 4741.59 5288.05 C 4753.06 5293.78 4763.09 5299.52 4774.55 5302.38 C 4777.42 5303.82 4781.72 5300.95 4784.59 5300.95 C 4796.05 5300.95 4807.52 5295.22 4817.55 5300.95 C 4823.28 5302.38 4820.41 5310.98 4817.55 5316.71 C 4816.12 5319.58 4811.82 5318.15 4808.95 5321.01 C 4804.65 5325.31 4820.41 5371.18 4821.85 5371.18 C 4880.61 5379.77 4796.05 5343.95 4841.91 5361.14 C 4863.41 5369.74 4890.64 5374.04 4910.7 5384.07 C 4917.87 5388.37 4922.17 5398.41 4929.34 5399.84 C 4962.3 5404.14 4955.13 5385.51 4979.5 5378.34 C 4985.23 5376.91 4990.96 5376.91 4998.13 5376.91 C 4982.36 5374.04 4968.03 5364.01 4988.1 5329.61 C 5002.43 5306.68 5098.45 5303.82 5124.25 5289.48 C 5134.28 5285.19 5141.44 5276.59 5151.48 5270.85 C 5160.08 5266.55 5175.84 5267.99 5180.14 5259.39 C 5184.44 5250.79 5168.67 5246.49 5167.24 5237.89 C 5165.81 5233.59 5167.24 5226.43 5170.11 5223.56 C 5172.97 5220.69 5178.71 5226.43 5178.71 5223.56 C 5178.71 5220.69 5171.54 5220.69 5171.54 5216.39 C 5171.54 5206.36 5183.01 5137.57 5185.87 5130.4 C 5191.6 5113.21 5238.9 5110.34 5251.8 5108.91 C 5269 5107.47 5286.19 5106.04 5301.96 5103.17 M 6105.96 6666.76 C 6126.03 6681.09 6106.97 6713.83 6106.97 6729.59 C 6113.9 6739.57 6115.28 6745.68 6118.86 6754.18 C 6123.16 6764.21 6123.16 6795.74 6123.16 6804.34 C 6124.6 6828.7 6100.23 6847.34 6100.23 6864.53 C 6100.23 6883.16 6107.4 6908.96 6091.63 6926.16 C 6090.2 6929.03 6083.03 6926.16 6083.03 6929.03 C 6083.03 6933.33 6093.07 6929.03 6091.63 6931.89 C 6091.63 6937.63 6083.03 6937.63 6080.17 6941.92 C 6075.87 6951.96 6080.17 6964.86 6073 6973.45 C 6052.94 6993.52 6058.67 6951.96 6054.37 6950.52 C 6035.74 6944.79 6024.27 6959.12 6011.38 6937.63 C 6008.51 6933.33 6017.11 6927.59 6014.24 6921.86 C 6009.94 6913.26 5992.74 6910.4 5994.18 6900.36 C 5994.18 6888.9 6017.11 6883.16 6015.68 6871.7 C 6014.24 6863.1 5991.31 6880.3 5989.88 6871.7 C 5987.01 6860.23 6009.94 6854.5 6008.51 6844.47 C 6007.08 6833 5985.58 6835.87 5982.71 6824.41 C 5981.28 6815.81 5999.91 6812.94 5999.91 6802.91 C 5999.91 6794.31 5985.58 6790.01 5981.28 6781.41 C 5979.85 6775.68 5995.61 6779.98 5998.48 6775.68 C 6001.34 6765.65 5999.91 6752.75 6005.64 6744.15 C 6007.08 6741.28 6009.94 6751.31 6012.81 6749.88 C 6019.97 6748.45 6021.41 6738.42 6028.57 6735.55 C 6034.31 6732.68 6041.47 6738.42 6047.2 6735.55 C 6054.37 6731.25 6054.37 6718.35 6061.54 6716.92 C 6070.14 6715.48 6077.3 6726.95 6087.33 6726.95 C 6095.93 6726.95 6085.9 6708.32 6087.33 6698.29 C 6088.77 6686.82 6100.23 6678.22 6105.96 6666.76 M 5774.9 6543.5 C 5786.37 6543.5 5796.4 6533.47 5796.4 6523.44 C 5796.4 6513.41 5786.37 6504.81 5774.9 6504.81 C 5763.44 6504.81 5753.41 6513.41 5753.41 6523.44 C 5753.41 6533.47 5763.44 6543.5 5774.9 6543.5 C 5786.37 6543.5 5763.44 6543.5 5774.9 6543.5 " }
+ }
+ }
+ // PATH visit es count: 617
+ DemoShape {
+ objectName: "es"
+ ShapePath {
+ objectName: "svg_path:es"
+ // boundingRect: 3543.69, 6217.38 1812.65x1726.33
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 5033.96 6695.42 C 5043.99 6699.72 5055.45 6702.59 5062.62 6708.32 C 5065.49 6711.18 5066.92 6726.95 5075.52 6725.52 C 5086.98 6724.08 5097.02 6716.92 5109.91 6716.92 C 5124.25 6716.92 5148.61 6745.58 5162.94 6741.28 C 5168.67 6739.85 5162.94 6728.38 5167.24 6725.52 C 5188.74 6711.19 5214.54 6724.08 5237.47 6729.82 L 5243.2 6729.82 C 5250.36 6736.98 5256.1 6744.15 5253.23 6752.75 C 5250.36 6764.21 5231.73 6761.35 5224.57 6768.51 C 5218.84 6774.24 5241.77 6807.21 5227.43 6831.57 C 5220.27 6847.34 5158.64 6871.7 5141.44 6878.87 C 5125.68 6884.6 5101.32 6890.33 5089.85 6900.36 C 5081.25 6906.1 5068.35 6927.59 5055.45 6930.46 C 5006.73 6944.79 4919.3 6934.76 4880.61 6966.29 C 4870.58 6974.89 4850.51 6982.05 4853.38 6994.95 C 4857.68 7004.98 4879.17 7003.55 4877.74 7013.58 C 4877.74 7017.88 4833.31 7027.91 4830.45 7029.35 C 4813.25 7042.25 4807.52 7066.61 4793.18 7080.94 C 4753.06 7122.5 4700.03 7162.63 4674.23 7215.66 C 4662.77 7237.16 4678.53 7305.95 4691.43 7324.58 C 4695.73 7330.31 4748.76 7360.41 4735.86 7369.01 C 4725.83 7377.61 4701.46 7380.47 4691.43 7387.64 C 4688.56 7390.51 4688.56 7397.67 4685.7 7399.1 C 4682.83 7401.97 4678.53 7397.67 4675.67 7397.67 C 4664.2 7400.54 4651.3 7401.97 4641.27 7409.14 C 4636.97 7413.44 4639.84 7423.47 4634.1 7427.77 C 4629.8 7430.63 4622.64 7424.9 4619.77 7427.77 C 4614.04 7434.93 4618.34 7446.4 4614.04 7452.13 C 4608.31 7457.86 4596.84 7452.13 4592.54 7459.3 C 4586.81 7467.9 4595.41 7480.79 4591.11 7489.39 C 4579.64 7518.06 4553.85 7485.09 4552.41 7530.96 C 4552.41 7542.42 4575.34 7546.72 4572.48 7556.75 C 4568.18 7566.78 4552.41 7565.35 4540.95 7563.92 C 4533.78 7563.92 4526.62 7556.75 4519.45 7555.32 C 4489.35 7546.72 4453.52 7561.05 4427.73 7578.25 C 4383.3 7606.91 4383.3 7662.81 4337.44 7685.74 C 4320.24 7695.77 4314.51 7648.48 4271.51 7659.94 C 4262.91 7662.81 4258.61 7674.27 4248.58 7677.14 C 4235.68 7681.44 4205.59 7657.07 4192.69 7655.64 C 4175.49 7651.34 4156.86 7661.37 4138.23 7658.51 C 4128.2 7655.64 4122.46 7647.04 4112.43 7644.18 C 4093.8 7637.01 4009.24 7624.11 3993.48 7626.98 C 3976.28 7631.28 3967.68 7652.77 3951.92 7659.94 C 3928.99 7668.54 3900.32 7642.74 3868.79 7658.51 C 3843 7671.41 3845.86 7682.87 3832.96 7701.5 C 3831.53 7702.94 3822.93 7694.34 3817.2 7698.64 C 3808.6 7705.8 3801.43 7717.27 3789.97 7721.57 C 3785.67 7723 3785.67 7712.97 3781.37 7710.1 C 3775.64 7705.8 3767.04 7704.37 3762.74 7700.07 C 3757.01 7692.9 3755.57 7682.87 3748.41 7677.14 C 3744.11 7672.84 3735.51 7677.14 3731.21 7672.84 C 3721.18 7662.81 3706.85 7615.51 3703.98 7601.18 C 3703.98 7599.75 3725.48 7621.25 3722.61 7608.35 C 3722.61 7604.05 3714.01 7608.35 3712.58 7605.48 C 3711.14 7602.61 3718.31 7599.75 3716.88 7596.88 C 3712.58 7572.52 3691.08 7601.18 3692.51 7559.62 C 3692.51 7559.62 3748.41 7533.82 3735.51 7530.96 C 3724.04 7528.09 3716.88 7552.45 3705.41 7549.59 C 3695.38 7548.15 3699.68 7530.96 3695.38 7522.36 C 3691.08 7513.76 3685.35 7506.59 3679.62 7499.43 C 3679.62 7499.43 3640.92 7462.16 3640.92 7462.16 C 3640.92 7460.73 3640.92 7460.73 3640.92 7459.3 C 3639.49 7462.16 3638.05 7463.6 3635.19 7463.6 C 3626.59 7465.03 3622.29 7453.56 3615.12 7449.27 C 3609.39 7446.4 3583.59 7442.1 3564.96 7442.1 C 3567.83 7381.91 3553.5 7371.87 3600.79 7330.31 C 3609.39 7323.15 3607.96 7307.38 3616.56 7303.08 C 3619.42 7301.65 3689.65 7300.22 3672.45 7271.55 C 3668.15 7264.39 3653.82 7275.85 3646.65 7271.55 C 3639.49 7265.82 3640.92 7254.35 3638.05 7245.76 C 3635.19 7237.16 3635.19 7227.12 3629.45 7219.96 C 3628.02 7217.09 3619.42 7219.96 3619.42 7217.09 C 3623.72 7207.06 3633.75 7199.89 3638.05 7189.86 C 3646.65 7172.66 3622.29 7185.56 3646.65 7165.5 C 3668.15 7148.3 3696.81 7151.17 3699.68 7113.9 C 3699.68 7111.04 3672.45 7092.41 3666.72 7080.94 C 3658.12 7062.31 3668.15 7032.21 3668.15 7029.35 C 3666.72 7027.91 3643.79 6983.49 3643.79 6982.05 C 3642.35 6979.19 3648.09 6983.49 3650.95 6983.49 C 3663.85 6987.79 3672.45 6989.22 3685.35 6992.09 C 3718.31 7000.68 3725.48 7003.55 3742.67 6970.59 C 3762.74 6930.46 3741.24 6944.79 3736.94 6914.69 C 3732.64 6887.46 3777.07 6900.36 3778.5 6880.3 C 3779.94 6865.97 3764.17 6878.87 3772.77 6861.67 C 3774.2 6858.8 3779.94 6858.8 3781.37 6854.5 C 3785.67 6844.47 3785.67 6834.44 3787.1 6824.41 C 3788.54 6812.94 3797.13 6801.47 3795.7 6790.01 C 3795.7 6790.01 3782.8 6755.61 3782.8 6755.61 C 3787.1 6751.31 3797.13 6759.91 3802.87 6757.05 C 3802.87 6757.05 3832.96 6725.52 3832.96 6725.52 C 3854.46 6714.05 3894.59 6712.62 3906.06 6681.09 C 3914.65 6652.43 3877.39 6655.29 3867.36 6653.86 C 3860.19 6652.43 3873.09 6597.97 3867.36 6595.1 C 3840.13 6580.77 3834.4 6593.67 3801.43 6580.77 C 3795.7 6577.9 3797.13 6563.57 3784.24 6572.17 C 3781.37 6575.03 3787.1 6582.2 3784.24 6585.07 C 3764.17 6602.26 3742.67 6582.2 3736.94 6580.77 C 3731.21 6577.9 3724.04 6585.07 3719.74 6582.2 C 3716.88 6580.77 3728.34 6577.9 3725.48 6575.03 C 3724.04 6569.3 3716.88 6567.87 3711.14 6567.87 C 3702.55 6566.44 3692.51 6569.3 3683.91 6567.87 C 3682.48 6566.44 3685.35 6563.57 3685.35 6560.7 C 3685.35 6559.27 3686.78 6553.54 3685.35 6554.97 C 3678.18 6556.4 3660.98 6576.47 3648.09 6567.87 C 3613.69 6543.5 3681.05 6537.77 3663.85 6520.57 C 3660.98 6517.71 3655.25 6520.57 3652.38 6517.71 C 3650.95 6514.84 3658.12 6509.11 3655.25 6507.68 C 3629.45 6501.94 3593.63 6510.54 3572.13 6522.01 C 3574.99 6510.54 3559.23 6500.51 3559.23 6489.04 C 3557.8 6484.74 3566.4 6494.78 3569.26 6491.91 C 3572.13 6490.48 3566.4 6484.74 3567.83 6481.88 C 3570.69 6468.98 3592.19 6473.28 3602.22 6464.68 C 3605.09 6463.25 3610.82 6456.08 3606.52 6457.51 C 3597.92 6458.95 3589.33 6467.55 3580.73 6468.98 C 3573.56 6470.41 3570.69 6457.51 3576.43 6451.78 C 3585.03 6446.05 3603.66 6450.35 3606.52 6440.32 C 3607.96 6431.72 3587.89 6443.18 3580.73 6440.32 C 3574.99 6437.45 3570.69 6430.28 3569.26 6424.55 C 3567.83 6410.22 3582.16 6428.85 3583.59 6427.42 C 3586.46 6421.69 3583.59 6414.52 3587.89 6408.79 C 3592.19 6401.62 3605.09 6400.19 3606.52 6391.59 C 3613.69 6321.36 3556.36 6401.62 3544.9 6332.83 C 3536.3 6285.53 3576.43 6299.87 3577.86 6292.7 C 3579.29 6288.4 3566.4 6292.7 3562.1 6289.83 C 3560.66 6286.97 3566.4 6284.1 3567.83 6284.1 C 3583.59 6281.24 3592.19 6285.53 3603.66 6284.1 C 3640.92 6281.24 3691.08 6249.71 3725.48 6235.37 C 3738.37 6229.64 3752.71 6211.01 3765.61 6219.61 C 3771.34 6223.91 3757.01 6241.11 3764.17 6242.54 C 3775.64 6243.97 3782.8 6223.91 3794.27 6223.91 C 3832.96 6223.91 3830.1 6291.27 3865.93 6299.87 C 3873.09 6301.3 3875.96 6285.53 3883.12 6286.97 C 3923.25 6297 3901.76 6298.43 3941.88 6304.17 C 3951.92 6305.6 3970.55 6301.3 3979.15 6302.73 C 3987.75 6305.6 3992.05 6314.2 4000.64 6314.2 C 4012.11 6314.2 4022.14 6299.87 4033.61 6302.73 C 4043.64 6305.6 4045.07 6322.8 4053.67 6329.96 C 4062.27 6337.13 4079.47 6328.53 4088.07 6337.13 C 4090.93 6340 4082.33 6344.29 4085.2 6345.73 C 4088.07 6350.03 4096.67 6340 4100.97 6342.86 C 4136.8 6367.23 4229.95 6413.09 4277.25 6398.75 C 4280.11 6397.32 4280.11 6391.59 4282.98 6390.16 C 4288.71 6388.72 4294.44 6390.16 4300.18 6390.16 C 4311.64 6391.59 4341.74 6388.72 4350.34 6405.92 C 4350.34 6407.35 4348.9 6410.22 4347.47 6411.65 C 4358.94 6414.52 4390.47 6444.62 4401.93 6444.62 C 4406.23 6444.62 4399.06 6434.58 4401.93 6431.72 C 4404.8 6427.42 4410.53 6425.99 4416.26 6424.55 C 4457.82 6418.82 4430.59 6423.12 4447.79 6443.18 C 4453.52 6448.92 4464.99 6440.32 4470.72 6444.62 C 4479.32 6448.92 4483.62 6458.95 4490.79 6463.25 C 4509.42 6473.28 4549.55 6471.85 4576.78 6464.68 C 4585.38 6473.28 4601.14 6487.61 4601.14 6487.61 C 4604.01 6489.04 4602.57 6481.88 4604.01 6481.88 C 4611.17 6483.31 4619.77 6486.18 4624.07 6491.91 C 4636.97 6506.24 4595.41 6523.44 4614.04 6532.04 C 4622.64 6534.91 4631.24 6519.14 4634.1 6522.01 C 4635.54 6524.87 4631.24 6532.04 4634.1 6534.91 C 4654.17 6553.54 4685.7 6546.37 4704.33 6560.7 C 4705.76 6562.14 4720.09 6595.1 4721.53 6595.1 C 4740.16 6609.43 4758.79 6583.63 4778.85 6600.83 C 4788.89 6609.43 4781.72 6628.06 4800.35 6628.06 C 4808.95 6629.49 4814.68 6620.9 4823.28 6622.33 C 4831.88 6623.76 4836.18 6633.79 4844.78 6635.23 C 4849.08 6635.23 4849.08 6626.63 4853.38 6626.63 C 4867.71 6625.19 4880.61 6636.66 4896.37 6638.09 C 4896.37 6638.09 4889.21 6605.13 4906.4 6608 C 4930.77 6612.3 4945.1 6629.49 4960.87 6643.83 C 4962.3 6645.26 4966.6 6643.83 4969.46 6643.83 C 4976.63 6645.26 4985.23 6645.26 4989.53 6649.56 C 4996.69 6655.29 4992.39 6668.19 4999.56 6672.49 L 4999.56 6673.92 C 4992.39 6688.25 4989.53 6708.32 5033.96 6695.42 M 3785.67 7755.96 L 3795.7 7797.52 L 3827.23 7797.52 C 3827.23 7793.23 3825.8 7790.36 3825.8 7786.06 C 3824.36 7777.46 3821.5 7768.86 3824.36 7760.26 C 3825.8 7755.96 3838.7 7754.53 3837.26 7750.23 C 3828.66 7730.17 3788.54 7754.53 3785.67 7755.96 M 4155.43 7929.38 L 4176.92 7943.71 C 4176.92 7930.81 4179.79 7916.48 4178.36 7905.01 C 4175.49 7893.55 4164.03 7922.21 4155.43 7929.38 M 4182.66 7940.84 L 4185.52 7936.54 C 4184.09 7936.54 4182.66 7936.54 4182.66 7939.41 C 4182.66 7940.84 4182.66 7940.84 4182.66 7940.84 M 5193.04 7188.43 C 5171.54 7261.52 5197.34 7209.93 5233.17 7240.02 C 5243.2 7248.62 5170.11 7318.85 5164.37 7317.41 C 5157.21 7317.41 5158.64 7301.65 5151.48 7297.35 C 5129.98 7284.45 5128.55 7307.38 5121.38 7285.88 C 5118.51 7275.85 5121.38 7262.95 5114.21 7257.22 C 5108.48 7251.49 5099.88 7261.52 5094.15 7260.09 C 5084.12 7258.65 5074.09 7254.35 5065.49 7248.62 C 5064.05 7247.19 5066.92 7244.32 5068.35 7242.89 C 5104.18 7215.66 5148.61 7197.03 5193.04 7188.43 M 5343.52 7189.86 C 5376.48 7272.99 5337.79 7215.66 5317.72 7205.63 C 5309.12 7202.76 5297.66 7209.93 5289.06 7204.19 C 5253.23 7179.83 5300.53 7169.8 5343.52 7189.86 M 5088.42 7324.58 C 5079.82 7333.18 5066.92 7333.18 5066.92 7340.34 C 5066.92 7346.08 5072.65 7357.54 5079.82 7357.54 C 5088.42 7357.54 5094.15 7357.54 5105.61 7347.51 C 5117.08 7337.48 5105.61 7330.31 5105.61 7330.31 L 5089.85 7324.58 L 5088.42 7324.58 M 5054.02 7281.59 C 5042.56 7284.45 5039.69 7291.62 5033.96 7298.78 C 5028.22 7307.38 5019.63 7320.28 5032.52 7326.01 C 5039.69 7330.31 5061.19 7318.85 5065.49 7310.25 C 5068.35 7303.08 5076.95 7301.65 5076.95 7293.05 C 5076.95 7285.88 5066.92 7280.15 5066.92 7280.15 L 5054.02 7281.59 " }
+ }
+ }
+ // PATH visit pt count: 265
+ DemoShape {
+ objectName: "pt"
+ ShapePath {
+ objectName: "svg_path:pt"
+ // boundingRect: 3325.32, 6505.85 582.011x959.21
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 3564.96 7442.1 C 3567.83 7381.91 3553.5 7371.87 3600.79 7330.31 C 3609.39 7323.15 3607.96 7307.38 3616.56 7303.08 C 3619.42 7301.65 3689.65 7300.22 3672.45 7271.55 C 3668.15 7264.39 3653.82 7275.85 3646.65 7271.55 C 3639.49 7265.82 3640.92 7254.35 3638.05 7245.76 C 3635.19 7237.16 3635.19 7227.12 3629.45 7219.96 C 3628.02 7217.09 3619.42 7219.96 3619.42 7217.09 C 3623.72 7207.06 3633.75 7199.89 3638.05 7189.86 C 3646.65 7172.66 3622.29 7185.56 3646.65 7165.5 C 3668.15 7148.3 3696.81 7151.17 3699.68 7113.9 C 3699.68 7111.04 3672.45 7092.41 3666.72 7080.94 C 3658.12 7062.31 3668.15 7032.21 3668.15 7029.35 C 3666.72 7027.91 3643.79 6983.49 3643.79 6982.05 C 3642.35 6979.19 3648.09 6983.49 3650.95 6983.49 C 3663.85 6987.79 3672.45 6989.22 3685.35 6992.09 C 3718.31 7000.68 3725.48 7003.55 3742.67 6970.59 C 3762.74 6930.46 3741.24 6944.79 3736.94 6914.69 C 3732.64 6887.46 3777.07 6900.36 3778.5 6880.3 C 3779.94 6865.97 3764.17 6878.87 3772.77 6861.67 C 3774.2 6858.8 3779.94 6858.8 3781.37 6854.5 C 3785.67 6844.47 3785.67 6834.44 3787.1 6824.41 C 3788.54 6812.94 3797.13 6801.47 3795.7 6790.01 C 3795.7 6790.01 3782.8 6755.61 3782.8 6755.61 C 3787.1 6751.31 3797.13 6759.91 3802.87 6757.05 C 3802.87 6757.05 3832.96 6725.52 3832.96 6725.52 C 3854.46 6714.05 3894.59 6712.62 3906.06 6681.09 C 3914.65 6652.43 3877.39 6655.29 3867.36 6653.86 C 3860.19 6652.43 3873.09 6597.97 3867.36 6595.1 C 3840.13 6580.77 3834.4 6593.67 3801.43 6580.77 C 3795.7 6577.9 3797.13 6563.57 3784.24 6572.17 C 3781.37 6575.03 3787.1 6582.2 3784.24 6585.07 C 3764.17 6602.26 3742.67 6582.2 3736.94 6580.77 C 3731.21 6577.9 3724.04 6585.07 3719.74 6582.2 C 3716.88 6580.77 3728.34 6577.9 3725.48 6575.03 C 3724.04 6569.3 3716.88 6567.87 3711.14 6567.87 C 3702.55 6566.44 3692.51 6569.3 3683.91 6567.87 C 3682.48 6566.44 3685.35 6563.57 3685.35 6560.7 C 3685.35 6559.27 3686.78 6553.54 3685.35 6554.97 C 3678.18 6556.4 3660.98 6576.47 3648.09 6567.87 C 3613.69 6543.5 3681.05 6537.77 3663.85 6520.57 C 3660.98 6517.71 3655.25 6520.57 3652.38 6517.71 C 3650.95 6514.84 3658.12 6509.11 3655.25 6507.68 C 3629.45 6501.94 3593.63 6510.54 3572.13 6522.01 C 3569.26 6536.34 3533.43 6543.5 3542.03 6556.4 C 3547.76 6563.57 3564.96 6560.7 3567.83 6569.3 C 3570.69 6576.47 3552.06 6567.87 3547.76 6573.6 C 3539.17 6586.5 3540.6 6648.13 3543.46 6663.89 C 3543.46 6668.19 3550.63 6669.62 3550.63 6675.36 C 3549.2 6699.72 3539.17 6714.05 3529.13 6734.12 C 3524.83 6742.71 3506.2 6761.35 3516.23 6759.91 C 3526.27 6757.05 3526.27 6735.55 3536.3 6732.68 C 3543.46 6731.25 3547.76 6745.58 3544.9 6751.31 C 3537.73 6761.35 3517.67 6757.05 3510.5 6768.51 C 3500.47 6785.71 3494.74 6805.77 3483.27 6822.97 C 3478.97 6830.14 3470.37 6834.44 3471.81 6841.6 C 3471.81 6848.77 3484.7 6851.64 3487.57 6858.8 C 3489 6861.67 3480.41 6850.2 3476.11 6853.07 C 3468.94 6857.37 3466.07 6868.83 3460.34 6877.43 C 3446.01 6900.36 3430.24 6929.03 3413.05 6949.09 C 3408.75 6954.82 3400.15 6956.26 3394.42 6963.42 C 3392.98 6964.86 3401.58 6969.15 3398.71 6970.59 C 3387.25 6973.45 3372.92 6963.42 3365.75 6970.59 C 3358.59 6977.75 3371.48 6989.22 3368.62 6997.82 C 3364.32 7012.15 3321.32 7072.34 3325.62 7086.67 C 3328.49 7096.71 3335.66 7105.31 3341.39 7115.34 C 3355.72 7139.7 3349.99 7151.17 3349.99 7151.17 C 3361.45 7154.03 3374.35 7152.6 3385.82 7151.17 C 3391.55 7151.17 3394.42 7144 3400.15 7145.43 C 3405.88 7145.43 3408.75 7154.03 3415.91 7155.47 C 3420.21 7156.9 3420.21 7136.84 3423.08 7141.13 C 3427.38 7148.3 3420.21 7158.33 3423.08 7164.07 C 3427.38 7169.8 3447.44 7172.66 3441.71 7175.53 C 3403.01 7194.16 3425.94 7145.43 3394.42 7149.73 C 3385.82 7151.17 3404.45 7162.63 3407.31 7169.8 C 3408.75 7178.4 3407.31 7188.43 3405.88 7198.46 C 3403.01 7217.09 3378.65 7234.29 3378.65 7248.62 C 3378.65 7254.35 3387.25 7258.65 3387.25 7264.39 C 3388.68 7274.42 3372.92 7293.05 3382.95 7295.92 C 3385.82 7295.92 3395.85 7291.62 3392.98 7294.48 C 3390.12 7298.78 3381.52 7295.92 3378.65 7300.22 C 3371.48 7314.55 3375.78 7331.75 3368.62 7346.08 C 3362.89 7357.54 3328.49 7404.84 3331.36 7420.6 C 3332.79 7426.33 3342.82 7414.87 3348.55 7414.87 C 3357.15 7413.44 3365.75 7416.3 3374.35 7414.87 C 3378.65 7414.87 3382.95 7410.57 3387.25 7412 C 3410.18 7417.74 3484.7 7466.46 3494.74 7465.03 C 3499.04 7465.03 3543.46 7443.53 3546.33 7442.1 C 3550.63 7442.1 3557.8 7442.1 3564.96 7442.1 " }
+ }
+ }
+ // PATH visit at count: 269
+ DemoShape {
+ objectName: "at"
+ ShapePath {
+ objectName: "svg_path:at"
+ // boundingRect: 6123.16, 5513.73 961.654x499.661
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 6128.9 5816.89 C 6128.9 5826.92 6147.53 5829.79 6141.79 5844.12 C 6140.36 5846.99 6134.63 5845.55 6133.19 5846.99 C 6131.76 5851.29 6127.46 5862.75 6123.16 5875.65 L 6130.33 5891.41 L 6130.33 5908.61 C 6144.66 5910.05 6167.59 5912.91 6169.02 5912.91 C 6171.89 5915.78 6164.72 5920.08 6167.59 5922.94 C 6174.76 5931.54 6183.36 5937.28 6193.39 5941.58 C 6216.32 5953.04 6220.62 5914.34 6236.38 5917.21 C 6266.48 5921.51 6234.95 5937.28 6244.98 5941.58 C 6267.91 5953.04 6247.85 5938.71 6270.78 5941.58 C 6282.24 5943.01 6293.71 5973.1 6316.64 5960.21 C 6316.64 5960.21 6335.27 5921.51 6335.27 5921.51 C 6346.74 5912.91 6396.9 5918.64 6409.8 5917.21 C 6431.29 5915.78 6448.49 5897.15 6469.99 5897.15 C 6475.72 5897.15 6459.96 5904.31 6458.52 5910.05 C 6451.36 5940.14 6469.99 5920.08 6481.45 5937.28 C 6484.32 5941.58 6477.15 5947.31 6480.02 5953.04 C 6481.45 5955.91 6485.75 5950.17 6488.62 5953.04 C 6515.85 5973.1 6523.02 5975.97 6560.28 5981.7 C 6603.27 5987.44 6647.7 5988.87 6692.13 5996.04 C 6703.59 5997.47 6715.06 6006.07 6726.53 6007.5 C 6737.99 6008.93 6749.46 6000.33 6760.92 6001.77 C 6768.09 6003.2 6772.39 6013.23 6779.55 6013.23 C 6782.42 6014.67 6780.99 6006.07 6783.85 6004.63 C 6791.02 5997.47 6802.48 5994.6 6809.65 5986 C 6815.38 5981.7 6811.08 5971.67 6815.38 5967.37 C 6842.61 5945.87 6871.28 5973.1 6897.07 5961.64 C 6905.67 5957.34 6907.1 5944.44 6915.7 5941.58 C 6917.14 5940.14 6964.43 5947.31 6965.86 5945.87 C 6970.16 5944.44 6961.56 5938.71 6960.13 5934.41 C 6957.26 5920.08 6963 5911.48 6973.03 5908.61 C 6998.83 5879.95 7010.29 5875.65 7023.19 5854.15 C 7026.06 5848.42 7000.26 5818.32 7007.43 5803.99 C 7017.46 5783.93 7041.82 5805.42 7038.96 5776.76 C 7037.52 5752.4 6994.53 5755.26 7003.13 5748.1 C 7023.19 5730.9 7074.78 5753.83 7083.38 5738.07 C 7084.82 5732.33 7064.75 5686.47 7084.82 5677.87 C 7067.62 5659.24 7053.29 5640.61 7040.39 5619.11 C 7028.92 5600.48 7070.49 5570.39 7040.39 5548.89 C 7036.09 5546.02 7030.36 5554.62 7026.06 5554.62 C 7018.89 5553.19 7004.56 5534.56 6994.53 5537.42 C 6987.36 5540.29 6984.5 5551.75 6975.9 5556.05 C 6970.16 5557.49 6963 5554.62 6957.26 5554.62 C 6918.57 5550.32 6885.61 5518.79 6844.04 5518.79 C 6836.88 5518.79 6831.15 5527.39 6823.98 5527.39 C 6821.11 5525.96 6823.98 5518.79 6821.11 5517.36 C 6815.38 5514.49 6806.78 5511.63 6802.48 5515.92 C 6801.05 5518.79 6803.92 5560.35 6801.05 5563.22 C 6798.18 5567.52 6788.15 5557.49 6782.42 5561.79 C 6782.42 5561.79 6770.95 5599.05 6770.95 5599.05 C 6760.92 5601.91 6750.89 5589.02 6740.86 5589.02 C 6735.12 5589.02 6736.56 5600.48 6730.82 5601.91 C 6700.73 5613.38 6683.53 5583.28 6660.6 5571.82 L 6659.17 5571.82 C 6660.6 5576.12 6662.03 5580.42 6662.03 5584.72 C 6660.6 5623.41 6652 5614.81 6621.9 5607.65 C 6619.04 5607.65 6616.17 5609.08 6614.74 5611.95 C 6611.87 5626.28 6620.47 5642.04 6606.14 5653.51 C 6593.24 5663.54 6533.05 5677.87 6531.61 5700.8 C 6531.61 5700.8 6566.01 5748.1 6566.01 5749.53 C 6567.44 5750.96 6547.38 5768.16 6554.55 5773.89 C 6570.31 5788.23 6586.08 5766.73 6573.18 5814.02 C 6573.18 5816.89 6570.31 5821.19 6567.44 5821.19 C 6521.58 5808.29 6557.41 5785.36 6535.91 5783.93 C 6524.45 5783.93 6514.42 5793.96 6502.95 5792.53 C 6497.22 5791.09 6498.65 5781.06 6494.35 5779.63 C 6485.75 5776.76 6477.15 5783.93 6469.99 5781.06 C 6467.12 5779.63 6472.86 5771.03 6469.99 5771.03 C 6452.79 5772.46 6468.56 5795.39 6464.26 5796.83 C 6444.19 5802.56 6411.23 5793.96 6392.6 5801.12 C 6386.87 5803.99 6389.73 5814.02 6384 5816.89 C 6378.27 5821.19 6371.1 5814.02 6365.37 5818.32 C 6361.07 5819.76 6366.8 5826.92 6363.93 5829.79 C 6362.5 5831.22 6313.77 5844.12 6308.04 5841.25 C 6305.17 5838.39 6308.04 5831.22 6305.17 5828.35 C 6303.74 5825.49 6296.58 5825.49 6295.14 5822.62 C 6293.71 5819.76 6302.31 5821.19 6300.88 5818.32 C 6295.14 5799.69 6255.01 5822.62 6243.55 5809.72 C 6243.55 5809.72 6246.41 5808.29 6246.41 5806.86 C 6237.82 5801.12 6246.41 5825.49 6243.55 5835.52 C 6243.55 5841.25 6216.32 5874.22 6206.29 5864.18 C 6200.55 5858.45 6216.32 5849.85 6212.02 5844.12 C 6210.59 5842.69 6206.29 5848.42 6203.42 5848.42 C 6200.55 5848.42 6196.25 5846.99 6194.82 5844.12 C 6191.95 5839.82 6201.99 5834.09 6194.82 5828.35 C 6189.09 5824.06 6186.22 5816.89 6180.49 5814.02 C 6176.19 5811.16 6170.46 5818.32 6164.72 5816.89 C 6161.86 5814.02 6164.72 5806.86 6161.86 5803.99 C 6154.69 5798.26 6156.13 5824.06 6133.19 5816.89 C 6131.76 5815.46 6130.33 5815.46 6128.9 5815.46 L 6128.9 5816.89 " }
+ }
+ }
+ // PATH visit it count: 711
+ DemoShape {
+ objectName: "it"
+ ShapePath {
+ objectName: "svg_path:it"
+ // boundingRect: 5733.22, 5897.15 1686.97x1929.69
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 7023.19 7523.79 C 7004.56 7533.82 6942.93 7682.87 6957.27 7702.94 C 6963 7711.53 6991.66 7711.53 6983.06 7717.27 C 6975.9 7721.57 6977.33 7707.24 6973.03 7717.27 C 6973.03 7720.13 6970.16 7723 6971.6 7727.3 C 6974.46 7738.76 6991.66 7744.5 6995.96 7755.96 C 6997.39 7758.83 6991.66 7757.4 6988.79 7760.26 C 6981.63 7764.56 6974.46 7768.86 6970.16 7776.03 C 6965.86 7783.19 6964.43 7791.79 6963 7798.96 C 6961.56 7807.56 6967.3 7819.02 6963 7826.19 C 6960.13 7830.49 6955.83 7811.86 6928.6 7813.29 C 6898.51 7816.16 6911.4 7826.19 6871.28 7807.56 C 6854.08 7800.39 6849.78 7768.86 6831.15 7757.4 C 6805.35 7741.63 6782.42 7757.4 6753.76 7745.93 C 6749.46 7744.5 6745.16 7743.06 6740.86 7740.2 C 6735.12 7735.9 6732.26 7725.87 6725.09 7723 C 6719.36 7718.7 6712.19 7723 6705.03 7720.13 C 6676.36 7710.1 6656.3 7682.87 6624.77 7674.27 C 6611.87 7671.41 6597.54 7684.3 6584.64 7678.57 C 6581.78 7677.14 6547.38 7639.88 6548.81 7634.14 C 6548.81 7628.41 6557.41 7625.54 6557.41 7621.25 C 6558.84 7616.95 6553.11 7615.51 6553.11 7611.21 C 6553.11 7605.48 6555.98 7598.31 6560.28 7592.58 C 6564.58 7586.85 6573.18 7585.42 6578.91 7579.68 C 6586.08 7573.95 6593.24 7552.45 6598.97 7559.62 C 6601.84 7563.92 6606.14 7592.58 6619.04 7591.15 C 6667.77 7583.98 6619.04 7548.15 6680.66 7551.02 C 6696.43 7551.02 6683.53 7568.22 6692.13 7572.52 C 6697.86 7575.38 6706.46 7568.22 6713.63 7571.08 C 6717.93 7572.52 6716.49 7581.12 6719.36 7582.55 C 6727.96 7588.28 6739.42 7594.02 6749.46 7594.02 C 6750.89 7594.02 6786.72 7576.82 6786.72 7576.82 C 6798.18 7575.38 6822.55 7583.98 6839.75 7579.68 C 6875.57 7572.52 6874.14 7558.19 6892.77 7548.15 C 6935.77 7525.22 6904.24 7556.75 6945.8 7553.89 C 6974.46 7552.45 6954.4 7536.69 6965.86 7525.22 C 6970.16 7520.92 6970.16 7538.12 6974.46 7536.69 C 7000.26 7530.96 7000.26 7508.03 7023.19 7523.79 M 6077.3 6994.95 C 6081.6 7015.02 6144.66 7010.72 6136.06 7042.25 C 6134.63 7050.85 6110.26 7047.98 6113.13 7058.01 C 6116 7068.04 6136.06 7065.18 6143.23 7073.78 C 6146.09 7076.64 6136.06 7078.08 6136.06 7082.37 C 6144.66 7133.97 6157.56 7060.88 6160.42 7129.67 C 6161.86 7154.03 6136.06 7162.63 6128.9 7182.7 C 6121.73 7201.33 6143.23 7201.33 6146.09 7217.09 C 6146.09 7222.83 6138.93 7228.56 6138.93 7235.72 C 6134.63 7283.02 6140.36 7348.94 6113.13 7396.24 C 6111.7 7399.1 6113.13 7391.94 6110.26 7390.51 C 6090.2 7383.34 6064.4 7363.28 6040.04 7364.71 C 6035.74 7364.71 6050.07 7370.44 6050.07 7374.74 C 6048.64 7380.47 6041.47 7383.34 6040.04 7390.51 C 6031.44 7423.47 6054.37 7417.74 6014.24 7436.37 C 5958.35 7462.16 5992.74 7409.14 5965.51 7397.67 C 5972.45 7414.82 5952.05 7381.82 5944.02 7373.31 C 5935.42 7344.64 5955.48 7326.01 5959.78 7301.65 C 5961.21 7291.62 5955.48 7283.02 5958.35 7272.99 C 5959.78 7264.39 5975.55 7260.09 5972.68 7251.49 C 5971.25 7244.32 5955.48 7251.49 5951.18 7245.76 C 5946.88 7238.59 5954.05 7229.99 5954.05 7222.83 C 5954.05 7221.39 5948.32 7221.39 5949.75 7219.96 C 5952.62 7215.66 5961.21 7217.09 5964.08 7211.36 C 5969.81 7197.03 5948.32 7126.8 5939.72 7116.77 C 5922.52 7098.14 5911.05 7159.77 5915.35 7088.11 C 5916.79 7078.08 5926.82 7070.91 5928.25 7060.88 C 5929.69 7055.14 5922.52 7049.41 5926.82 7045.11 C 5928.25 7043.68 5938.28 7073.78 5964.08 7073.78 C 5985.58 7075.21 6064.4 7010.72 6077.3 6994.95 M 6667.77 5991.74 C 6664.9 6020.4 6629.07 6014.67 6626.2 6037.6 C 6623.34 6054.8 6656.3 6051.93 6663.47 6057.66 C 6673.5 6066.26 6646.27 6077.73 6641.97 6090.62 C 6636.24 6109.26 6659.17 6089.19 6662.03 6096.36 C 6664.9 6103.52 6649.13 6122.15 6659.17 6127.89 C 6673.5 6136.49 6730.82 6170.88 6680.66 6168.02 C 6683.53 6160.85 6683.53 6155.12 6677.8 6147.95 C 6650.57 6122.15 6651.2 6140.92 6640.24 6150.79 C 6637.93 6153.84 6637.67 6150.82 6637.67 6150.82 C 6637.67 6136.49 6610.44 6133.62 6597.54 6139.35 C 6590.37 6143.65 6597.54 6159.42 6591.81 6165.15 C 6586.08 6170.88 6576.04 6166.58 6567.44 6169.45 C 6547.38 6178.05 6528.75 6200.98 6505.82 6205.28 C 6498.65 6206.71 6491.49 6199.55 6485.75 6203.84 C 6480.02 6205.28 6485.75 6213.88 6482.89 6219.61 C 6481.45 6223.91 6477.15 6229.64 6474.29 6233.94 C 6475.72 6232.51 6475.72 6231.07 6477.15 6231.07 C 6484.32 6231.07 6478.59 6246.84 6484.32 6249.71 C 6487.19 6251.14 6488.62 6241.11 6491.49 6243.97 C 6494.35 6249.71 6500.09 6261.17 6494.35 6265.47 C 6491.49 6266.9 6490.05 6269.77 6491.49 6272.64 C 6492.92 6274.07 6495.79 6271.2 6498.65 6271.2 C 6507.25 6278.37 6521.58 6282.67 6523.02 6292.7 C 6531.61 6332.83 6497.22 6317.06 6487.19 6341.43 C 6484.32 6348.59 6502.95 6425.99 6507.25 6434.58 C 6515.85 6448.92 6616.17 6520.57 6636.24 6532.04 C 6656.3 6543.5 6662.03 6536.34 6680.66 6552.1 C 6700.73 6569.3 6727.96 6682.52 6743.72 6711.19 C 6759.49 6741.28 6792.45 6768.51 6818.25 6788.58 C 6826.85 6794.31 6839.75 6795.74 6846.91 6802.91 C 6851.21 6805.77 6846.91 6814.37 6849.78 6817.24 C 6888.47 6857.37 6961.56 6844.47 7007.43 6837.3 C 7017.46 6835.87 7038.96 6820.11 7051.85 6834.44 C 7087.68 6874.57 6980.2 6888.9 7034.66 6926.16 C 7086.25 6960.56 7157.91 6957.69 7210.94 6984.92 C 7229.57 6994.95 7236.73 7010.72 7258.23 7017.88 C 7275.43 7025.05 7322.72 7032.21 7337.05 7043.68 C 7342.79 7047.98 7337.05 7058.01 7341.35 7062.31 C 7358.55 7086.67 7404.41 7082.37 7418.74 7132.54 C 7424.48 7151.17 7411.58 7145.43 7407.28 7158.33 C 7404.41 7165.5 7408.71 7194.16 7402.98 7197.03 C 7397.25 7201.33 7387.21 7197.03 7378.62 7192.73 C 7334.19 7175.53 7352.82 7149.73 7329.89 7119.64 C 7316.99 7102.44 7275.43 7119.64 7253.93 7112.47 C 7225.27 7102.44 7209.5 7069.48 7182.27 7098.14 C 7179.41 7102.44 7143.58 7174.1 7143.58 7176.96 C 7143.58 7181.26 7150.74 7185.56 7149.31 7191.3 C 7143.58 7218.53 7114.91 7217.09 7139.28 7248.62 C 7153.61 7265.82 7157.91 7250.06 7173.67 7254.35 C 7190.87 7260.09 7202.34 7277.29 7218.1 7284.45 C 7223.83 7287.32 7232.43 7284.45 7235.3 7290.18 C 7238.17 7294.48 7229.57 7300.22 7229.57 7305.95 C 7231 7346.08 7249.63 7308.82 7246.76 7360.41 C 7245.33 7390.51 7188 7379.04 7162.21 7409.14 C 7143.58 7430.63 7167.94 7452.13 7162.21 7477.93 C 7157.91 7499.43 7143.58 7493.69 7129.24 7505.16 C 7094.85 7535.26 7119.21 7604.05 7047.55 7583.98 C 7033.22 7579.68 7017.46 7542.42 7026.06 7526.66 C 7031.79 7518.06 7046.12 7519.49 7053.29 7512.32 C 7057.59 7506.59 7057.59 7497.99 7059.02 7490.83 C 7060.45 7483.66 7066.19 7477.93 7064.75 7470.76 C 7063.32 7462.16 7048.99 7457.86 7050.42 7449.27 C 7056.15 7423.47 7090.55 7437.8 7100.58 7423.47 C 7124.95 7394.81 7096.28 7390.51 7084.82 7374.74 C 7073.35 7357.54 7079.08 7333.18 7070.49 7314.55 C 7066.19 7303.08 7060.45 7293.05 7053.29 7284.45 C 7051.85 7281.59 7046.12 7281.59 7043.26 7278.72 C 7017.46 7240.02 7044.69 7262.95 7027.49 7219.96 C 7005.99 7165.5 6993.09 7192.73 6950.1 7195.6 C 6948.67 7195.6 6951.53 7191.3 6950.1 7188.43 C 6944.37 7182.7 6937.2 7175.53 6928.6 7171.23 C 6920 7166.93 6902.8 7171.23 6897.07 7161.2 C 6891.34 7151.17 6908.54 7141.13 6907.1 7129.67 C 6905.67 7118.2 6897.07 7108.17 6891.34 7099.57 C 6856.94 7052.28 6851.21 7118.2 6811.08 7103.87 C 6806.78 7102.44 6838.31 7079.51 6823.98 7069.48 C 6772.39 7032.21 6822.55 7070.91 6766.65 7063.74 C 6762.35 7062.31 6766.65 7055.14 6765.22 7050.85 C 6759.49 7033.65 6729.39 6987.79 6715.06 6982.05 C 6676.36 6967.72 6706.46 6994.95 6693.56 6992.09 C 6680.66 6989.22 6669.2 6973.45 6654.87 6974.89 C 6641.97 6977.75 6631.94 6994.95 6620.47 6992.09 C 6607.57 6989.22 6609.01 6970.59 6600.41 6961.99 C 6590.37 6953.39 6564.58 6956.26 6555.98 6950.52 L 6534.48 6920.43 C 6524.45 6911.83 6508.68 6910.4 6500.09 6900.36 C 6482.89 6874.57 6502.95 6878.87 6482.89 6863.1 C 6474.29 6855.93 6464.26 6850.2 6454.22 6844.47 C 6451.36 6843.04 6445.62 6847.34 6442.76 6845.9 C 6426.99 6833 6426.99 6808.64 6411.23 6795.74 C 6384 6772.81 6366.8 6790.01 6338.14 6778.54 C 6333.84 6777.11 6345.3 6772.81 6348.17 6769.94 C 6356.77 6758.48 6339.57 6739.85 6335.27 6735.55 C 6332.4 6732.68 6326.67 6735.55 6323.81 6732.68 C 6319.51 6726.95 6319.51 6718.35 6313.77 6714.05 C 6306.61 6708.32 6292.28 6712.62 6286.54 6704.02 C 6282.24 6698.29 6295.14 6686.82 6287.98 6682.52 C 6279.38 6675.36 6265.05 6683.95 6253.58 6679.66 C 6246.41 6676.79 6257.88 6663.89 6257.88 6655.29 C 6262.18 6626.63 6257.88 6616.6 6242.12 6592.23 C 6212.02 6549.24 6233.52 6510.54 6197.69 6477.58 C 6194.82 6473.28 6189.09 6471.85 6184.79 6470.41 C 6183.36 6470.41 6181.92 6474.71 6180.49 6473.28 C 6173.32 6470.41 6169.02 6461.81 6161.86 6461.81 C 6157.56 6461.81 6166.16 6474.71 6161.86 6473.28 C 6150.39 6470.41 6141.79 6461.81 6131.76 6454.65 C 6127.46 6451.78 6091.63 6414.52 6080.17 6414.52 C 6077.3 6414.52 6081.6 6421.69 6078.73 6423.12 C 6075.87 6424.55 6071.57 6423.12 6070.14 6420.25 C 6062.97 6411.65 6032.87 6397.32 6018.54 6397.32 C 6012.81 6397.32 5975.55 6418.82 5972.68 6424.55 C 5969.81 6430.28 5974.11 6438.88 5969.81 6443.18 C 5965.51 6448.92 5954.05 6447.48 5949.75 6451.78 C 5939.72 6461.81 5932.55 6484.74 5921.09 6494.78 C 5902.46 6513.41 5869.49 6511.98 5847.99 6514.84 C 5840.83 6489.04 5889.56 6456.08 5868.06 6440.32 C 5860.89 6436.02 5850.86 6441.75 5842.26 6443.18 C 5833.66 6443.18 5823.63 6447.48 5815.03 6444.62 C 5799.27 6440.32 5762 6413.09 5763.44 6393.02 C 5763.44 6390.16 5770.6 6390.16 5770.6 6387.29 C 5769.17 6382.99 5754.84 6378.69 5759.14 6370.09 C 5764.87 6364.36 5772.04 6360.06 5776.34 6352.89 C 5777.77 6351.46 5773.47 6348.59 5774.9 6345.73 C 5776.34 6341.43 5789.23 6348.59 5790.67 6344.29 C 5790.67 6332.83 5789.23 6321.36 5784.94 6312.77 C 5777.77 6301.3 5730.48 6282.67 5733.34 6259.74 C 5733.34 6252.57 5746.24 6252.57 5753.41 6251.14 C 5757.71 6251.14 5760.57 6259.74 5764.87 6258.3 C 5772.04 6256.87 5817.9 6219.61 5810.73 6206.71 C 5806.43 6198.11 5792.1 6196.68 5787.8 6186.65 C 5783.5 6180.91 5789.24 6170.88 5786.37 6165.15 C 5766.3 6130.75 5729.04 6147.95 5794.97 6109.26 C 5809.3 6135.05 5847.99 6106.39 5866.63 6102.09 C 5879.52 6099.22 5889.56 6116.42 5902.46 6116.42 C 5903.89 6116.42 5944.02 6074.86 5944.02 6067.69 C 5945.45 6060.53 5932.55 6057.66 5933.98 6051.93 C 5936.85 6043.33 5948.32 6040.46 5955.48 6034.73 C 5962.65 6029 5968.38 6023.27 5975.55 6017.53 C 5978.41 6016.1 5981.28 6013.23 5982.71 6014.67 C 5985.58 6023.27 5984.15 6031.86 5984.15 6040.46 C 5984.15 6044.76 5979.85 6050.5 5981.28 6056.23 C 5991.31 6074.86 6014.24 6079.16 6030.01 6084.89 C 6031.44 6084.89 6034.31 6087.76 6034.31 6090.62 C 6032.87 6096.36 6022.84 6100.66 6024.27 6106.39 C 6025.71 6112.12 6035.74 6109.26 6040.04 6113.56 C 6045.77 6120.72 6048.64 6145.08 6057.24 6137.92 C 6081.6 6119.29 6052.94 6125.02 6052.94 6110.69 C 6052.94 6079.16 6087.33 6070.56 6093.07 6044.76 C 6093.07 6041.9 6077.3 6003.2 6101.67 6007.5 C 6120.3 6010.37 6097.37 6039.03 6134.63 6047.63 C 6157.56 6054.8 6138.93 6026.13 6177.62 6033.3 C 6189.09 6034.73 6183.36 6057.66 6193.39 6063.39 C 6199.12 6066.26 6210.59 6060.53 6209.15 6054.8 C 6206.29 6050.5 6200.55 6047.63 6199.12 6041.9 C 6199.12 6036.16 6207.72 6031.86 6206.29 6026.13 C 6203.42 6018.97 6177.62 6003.2 6197.69 5988.87 C 6223.48 5970.24 6213.45 6011.8 6243.55 6004.63 C 6260.75 5998.9 6233.52 5978.84 6233.52 5975.97 C 6236.38 5970.24 6240.68 5965.94 6242.12 5960.21 C 6244.98 5954.47 6243.55 5947.31 6244.98 5941.58 C 6267.91 5953.04 6247.85 5938.71 6270.78 5941.58 C 6282.24 5943.01 6293.71 5973.1 6316.64 5960.21 L 6335.27 5921.51 C 6346.74 5912.91 6396.9 5918.64 6409.8 5917.21 C 6431.29 5915.78 6448.49 5897.15 6469.99 5897.15 C 6475.72 5897.15 6459.96 5904.31 6458.52 5910.05 C 6451.36 5940.14 6469.99 5920.08 6481.45 5937.28 C 6484.32 5941.58 6477.15 5947.31 6480.02 5953.04 C 6481.45 5955.91 6485.75 5950.17 6488.62 5953.04 C 6515.85 5973.1 6523.02 5975.97 6560.28 5981.7 C 6596.11 5986 6631.94 5988.87 6667.77 5991.74 L 6667.77 5991.74 " }
+ }
+ }
+ // PATH visit gr count: 707
+ DemoShape {
+ objectName: "gr"
+ ShapePath {
+ objectName: "svg_path:gr"
+ // boundingRect: 7642.32, 6646.69 1068.32x1299.36
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 8708.59 7823.32 C 8692.83 7853.42 8721.49 7833.35 8705.73 7877.78 C 8704.29 7882.08 8588.21 7907.88 8576.74 7912.18 C 8568.14 7915.04 8487.89 7952.31 8479.29 7945.14 C 8453.49 7916.48 8499.35 7919.34 8417.66 7909.31 C 8334.54 7899.28 8437.73 7919.34 8367.5 7919.34 C 8363.2 7919.34 8361.77 7912.18 8357.47 7912.18 C 8348.87 7910.74 8338.84 7912.18 8328.8 7913.61 C 8318.77 7916.48 8307.31 7922.21 8297.27 7923.64 C 8275.78 7923.64 8284.38 7896.41 8285.81 7887.81 C 8285.81 7876.35 8281.51 7863.45 8285.81 7853.42 C 8301.57 7808.99 8315.91 7859.15 8325.94 7863.45 C 8335.97 7867.75 8347.44 7862.02 8357.47 7857.72 C 8364.63 7854.85 8368.93 7836.22 8374.67 7841.95 C 8381.83 7847.69 8357.47 7853.42 8360.33 7860.58 C 8361.77 7867.75 8374.67 7863.45 8381.83 7866.32 C 8389 7869.18 8394.73 7879.22 8403.33 7880.65 C 8410.5 7882.08 8416.23 7876.35 8423.39 7873.48 C 8437.73 7869.18 8447.76 7857.72 8460.66 7853.42 C 8476.42 7849.12 8492.19 7850.55 8507.95 7847.69 C 8517.98 7844.82 8509.38 7856.28 8517.98 7857.72 C 8533.75 7862.02 8549.51 7849.12 8566.71 7850.55 C 8571.01 7850.55 8573.88 7859.15 8578.18 7857.72 C 8585.34 7856.28 8611.14 7834.79 8624.04 7837.65 C 8626.9 7839.09 8602.54 7869.18 8636.94 7879.22 C 8644.1 7882.08 8644.1 7866.32 8649.83 7862.02 C 8679.93 7831.92 8675.63 7870.62 8708.59 7823.32 M 8413.36 6738.42 L 8414.79 6736.98 L 8416.23 6736.98 C 8417.66 6736.98 8462.09 6722.65 8462.09 6722.65 C 8493.62 6698.29 8403.33 6658.16 8459.22 6646.69 L 8460.66 6646.69 L 8464.96 6646.69 L 8466.39 6646.69 L 8467.82 6646.69 C 8470.69 6646.69 8473.55 6646.69 8474.99 6648.13 L 8477.85 6648.13 C 8509.38 6655.29 8552.38 6685.39 8530.88 6711.19 C 8515.12 6728.38 8499.35 6719.78 8493.62 6748.45 L 8505.08 6790.01 C 8503.65 6800.04 8483.59 6833 8473.55 6838.74 L 8472.12 6854.5 C 8447.76 6841.6 8493.62 6840.17 8470.69 6820.11 C 8459.22 6811.51 8413.36 6831.57 8399.03 6830.14 C 8353.17 6827.27 8347.44 6797.18 8317.34 6834.44 C 8310.17 6843.04 8303.01 6850.2 8294.41 6855.93 C 8254.28 6877.43 8275.78 6827.27 8235.65 6851.64 C 8219.88 6861.67 8231.35 6886.03 8199.82 6900.36 C 8172.59 6911.83 8169.72 6877.43 8143.93 6910.4 C 8133.89 6923.29 8151.09 6921.86 8155.39 6924.73 C 8168.29 6931.89 8166.86 6953.39 8178.32 6964.86 C 8181.19 6967.72 8186.92 6966.29 8192.65 6964.86 C 8194.09 6964.86 8195.52 6963.42 8196.95 6960.56 C 8196.95 6957.69 8191.22 6951.96 8195.52 6951.96 C 8201.25 6950.52 8201.25 6963.42 8206.99 6964.86 C 8222.75 6969.15 8255.71 6974.89 8261.45 6996.39 C 8272.91 7037.95 8224.18 6977.75 8224.18 6977.75 C 8208.42 6969.15 8162.56 6963.42 8158.26 6990.65 C 8153.96 7007.85 8191.22 7002.12 8202.69 7013.58 C 8211.28 7022.18 8209.85 7050.85 8199.82 7046.55 C 8176.89 7037.95 8175.46 7012.15 8152.53 7000.68 C 8146.79 6999.25 8141.06 7002.12 8135.33 7000.68 C 8128.16 7000.68 8119.56 6993.52 8115.26 6999.25 C 8082.3 7035.08 8178.32 7045.11 8171.16 7058.01 C 8168.29 7062.31 8131.03 7060.88 8119.56 7058.01 C 8115.26 7056.58 8105.23 7010.72 8105.23 7010.72 C 8093.77 6996.39 8053.64 7004.98 8037.87 6993.52 C 8007.78 6970.59 8037.87 6974.89 8037.87 6946.22 C 8037.87 6940.49 8022.11 6956.26 8013.51 6963.42 C 8006.34 6970.59 7994.88 6976.32 7993.44 6986.35 C 7992.01 6993.52 8006.34 6994.95 8007.78 7002.12 L 7997.74 7045.11 C 8002.04 7072.34 8035.01 7085.24 8050.77 7102.44 L 8069.4 7139.7 C 8079.43 7149.73 8152.53 7185.56 8141.06 7202.76 C 8138.19 7207.06 8082.3 7178.4 8078 7179.83 C 8073.7 7179.83 8078 7188.43 8078 7192.73 C 8075.13 7202.76 8059.37 7224.26 8069.4 7222.83 C 8072.27 7221.39 8070.83 7214.23 8073.7 7215.66 C 8078 7217.09 8076.57 7224.26 8080.87 7227.12 C 8090.9 7234.29 8122.43 7234.29 8098.06 7255.79 C 8078 7272.99 8057.94 7274.42 8030.71 7285.88 C 8026.41 7287.32 8039.31 7291.62 8043.6 7290.18 C 8047.9 7288.75 8050.77 7281.59 8056.5 7281.59 C 8062.24 7281.59 8062.24 7290.18 8066.54 7293.05 C 8069.4 7294.48 8072.27 7291.62 8075.13 7290.18 C 8086.6 7290.18 8098.06 7287.32 8108.1 7291.62 C 8116.7 7294.48 8115.26 7308.82 8123.86 7310.25 C 8133.89 7313.11 8143.93 7297.35 8152.53 7301.65 C 8161.12 7305.95 8151.09 7324.58 8159.69 7328.88 C 8171.16 7336.05 8185.49 7315.98 8195.52 7323.15 C 8201.25 7326.01 8195.52 7348.94 8218.45 7350.38 C 8247.11 7351.81 8255.71 7341.78 8275.78 7364.71 C 8291.54 7381.91 8267.18 7374.74 8267.18 7384.77 C 8267.18 7391.94 8275.78 7396.24 8277.21 7401.97 C 8280.08 7409.14 8275.78 7417.74 8278.64 7423.47 C 8285.81 7436.37 8304.44 7442.1 8288.68 7466.46 C 8285.81 7470.76 8280.08 7467.9 8275.78 7466.46 C 8272.91 7463.6 8275.78 7459.3 8274.34 7456.43 C 8272.91 7453.56 8255.71 7442.1 8254.28 7442.1 C 8251.41 7440.67 8249.98 7447.83 8247.11 7446.4 C 8237.08 7439.23 8221.32 7410.57 8206.99 7406.27 C 8188.35 7400.54 8198.39 7422.04 8188.35 7424.9 C 8171.16 7430.63 8122.43 7444.97 8126.73 7452.13 C 8131.03 7462.16 8148.23 7457.86 8158.26 7462.16 C 8162.56 7463.6 8149.66 7466.46 8149.66 7470.76 C 8149.66 7475.06 8156.82 7475.06 8158.26 7477.93 C 8161.12 7483.66 8156.82 7492.26 8161.12 7496.56 C 8176.89 7512.32 8204.12 7503.73 8218.45 7520.92 C 8227.05 7530.96 8195.52 7533.82 8182.62 7533.82 C 8162.56 7535.26 8146.79 7533.82 8141.06 7532.39 C 8136.76 7530.96 8139.63 7523.79 8136.76 7519.49 C 8135.33 7518.06 8131.03 7518.06 8129.59 7518.06 C 8118.13 7518.06 8102.36 7509.46 8095.2 7518.06 C 8083.73 7533.82 8131.03 7569.65 8136.76 7579.68 C 8138.19 7585.42 8133.89 7591.15 8135.33 7595.45 C 8138.19 7599.75 8146.79 7595.45 8149.66 7599.75 C 8155.39 7609.78 8172.59 7641.31 8178.32 7654.21 C 8184.05 7667.11 8166.86 7658.51 8166.86 7662.81 C 8166.86 7667.11 8172.59 7668.54 8174.02 7671.41 C 8174.02 7674.27 8168.29 7678.57 8169.72 7681.44 C 8171.16 7684.3 8204.12 7702.94 8201.25 7714.4 C 8198.39 7718.7 8188.35 7718.7 8182.62 7717.27 C 8178.32 7714.4 8179.76 7705.8 8175.46 7702.94 C 8172.59 7700.07 8166.86 7707.24 8162.56 7704.37 C 8138.19 7685.74 8128.16 7628.41 8092.33 7678.57 C 8090.9 7681.44 8093.77 7711.53 8096.63 7728.73 C 8098.06 7733.03 8098.06 7743.06 8093.77 7741.63 C 8057.94 7737.33 8080.87 7701.5 8069.4 7685.74 C 8067.97 7684.3 8063.67 7685.74 8062.24 7684.3 C 8053.64 7675.71 8049.34 7665.67 8042.17 7655.64 C 8037.87 7648.48 8035.01 7635.58 8026.41 7634.14 C 7957.61 7618.38 8019.24 7684.3 7994.88 7695.77 C 7953.32 7714.4 7964.78 7667.11 7963.35 7657.07 C 7963.35 7654.21 7959.05 7654.21 7957.61 7654.21 C 7944.72 7655.64 7937.55 7638.44 7934.68 7622.68 C 7931.82 7601.18 7949.02 7625.54 7951.88 7592.58 C 7953.32 7569.65 7916.05 7540.99 7897.42 7535.26 C 7893.12 7533.82 7888.82 7543.85 7885.96 7539.55 C 7880.22 7532.39 7885.96 7519.49 7878.79 7512.32 C 7870.19 7503.73 7831.5 7515.19 7851.56 7487.96 C 7852.99 7486.53 7858.73 7489.39 7860.16 7486.53 C 7883.09 7470.76 7871.62 7457.86 7878.79 7430.63 C 7878.79 7427.77 7881.66 7436.37 7884.52 7436.37 C 7885.96 7436.37 7881.66 7430.63 7883.09 7430.63 C 7897.42 7430.63 7911.75 7444.97 7923.22 7433.5 C 7938.98 7417.74 7917.49 7416.3 7946.15 7397.67 C 7966.21 7384.77 7980.55 7406.27 7996.31 7412 C 8019.24 7420.6 8046.47 7417.74 8070.83 7424.9 C 8085.17 7427.77 8093.77 7444.97 8108.1 7446.4 C 8113.83 7447.83 8125.3 7440.67 8123.86 7433.5 C 8121 7427.77 8105.23 7434.93 8102.36 7427.77 C 8088.03 7394.81 8138.19 7443.53 8155.39 7396.24 C 8156.82 7391.94 8145.36 7399.1 8139.63 7396.24 C 8136.76 7394.81 8139.63 7387.64 8136.76 7387.64 C 8133.89 7387.64 8132.46 7404.84 8125.3 7396.24 C 8113.83 7381.91 8105.23 7401.97 8086.6 7393.37 C 8076.57 7387.64 8073.7 7370.44 8062.24 7369.01 C 8055.07 7367.58 8059.37 7390.51 8050.77 7390.51 C 8024.97 7389.07 8042.17 7330.31 8023.54 7363.28 C 8020.67 7369.01 8030.71 7380.47 8024.97 7384.77 C 8014.94 7394.81 7969.08 7376.17 7959.05 7380.47 C 7940.42 7387.64 7926.09 7404.84 7898.85 7412 C 7883.09 7416.3 7878.79 7391.94 7870.19 7387.64 C 7865.89 7386.21 7871.62 7397.67 7868.76 7400.54 C 7863.03 7409.14 7852.99 7416.3 7844.39 7420.6 C 7841.53 7422.04 7842.96 7414.87 7841.53 7414.87 C 7825.76 7407.7 7841.53 7394.81 7831.5 7379.04 C 7825.76 7370.44 7818.6 7361.84 7810 7356.11 C 7807.13 7354.68 7802.83 7360.41 7801.4 7357.54 C 7794.23 7351.81 7797.1 7338.91 7789.93 7334.61 C 7775.6 7324.58 7749.81 7363.28 7771.3 7310.25 C 7768.44 7308.82 7765.57 7307.38 7761.27 7304.52 C 7756.97 7300.22 7759.84 7293.05 7756.97 7288.75 C 7741.21 7268.69 7701.08 7250.06 7683.88 7235.72 C 7678.15 7232.86 7686.75 7218.53 7682.45 7214.23 C 7678.15 7209.93 7656.65 7225.69 7642.32 7191.3 C 7643.75 7189.86 7643.75 7189.86 7645.18 7188.43 C 7646.62 7187 7643.75 7185.56 7645.18 7185.56 C 7669.55 7181.26 7685.31 7201.33 7683.88 7164.07 C 7683.88 7155.47 7703.94 7168.36 7699.64 7155.47 L 7681.01 7126.8 C 7682.45 7116.77 7726.88 7102.44 7729.74 7098.14 C 7729.74 7096.71 7738.34 7039.38 7738.34 7039.38 C 7748.37 7000.68 7756.97 7047.98 7771.3 6993.52 C 7775.6 6976.32 7755.54 6970.59 7755.54 6951.96 C 7765.57 6953.39 7861.59 6923.29 7867.33 6918.99 C 7883.09 6901.8 7871.62 6878.87 7900.29 6868.83 C 7910.32 6864.53 7966.21 6871.7 7974.81 6865.97 C 7979.11 6863.1 7977.68 6854.5 7981.98 6851.64 C 7984.84 6850.2 7989.14 6858.8 7992.01 6855.93 C 8009.08 6842.57 8015.32 6824.48 8011.68 6807.71 C 8017.85 6823.69 8018.06 6796.74 8017.81 6794.31 C 8016.62 6813.43 8016.88 6812.94 8035.01 6812.94 C 8040.74 6812.94 8047.9 6817.24 8052.2 6812.94 C 8057.94 6810.07 8057.94 6798.61 8063.67 6795.74 C 8079.43 6785.71 8100.93 6791.44 8118.13 6785.71 C 8158.26 6771.38 8168.29 6754.18 8194.09 6738.42 C 8198.39 6735.55 8205.55 6747.01 8211.29 6744.15 C 8219.88 6742.71 8224.18 6728.38 8232.78 6731.25 C 8244.25 6732.68 8247.11 6748.45 8257.15 6754.18 C 8258.58 6757.05 8262.88 6751.31 8265.75 6752.75 C 8270.04 6754.18 8272.91 6764.21 8277.21 6762.78 C 8282.94 6761.35 8282.94 6749.88 8288.68 6748.45 C 8304.44 6744.15 8323.07 6752.75 8337.4 6759.91 C 8340.27 6761.35 8337.4 6768.51 8341.7 6768.51 C 8361.77 6769.94 8393.3 6745.58 8413.36 6738.42 M 7830.06 7293.05 C 7847.26 7261.52 7804.27 7295.92 7802.83 7294.48 C 7792.8 7290.18 7784.2 7271.55 7775.6 7277.29 C 7772.74 7277.29 7782.77 7298.78 7781.34 7307.38 C 7795.67 7307.38 7821.46 7307.38 7830.06 7293.05 M 7805.7 7463.6 C 7794.23 7473.63 7789.93 7459.3 7779.9 7457.86 C 7774.17 7457.86 7768.44 7465.03 7762.7 7463.6 C 7752.67 7460.73 7756.97 7427.77 7748.37 7434.93 C 7744.07 7437.8 7751.24 7447.83 7748.37 7453.56 C 7736.91 7477.93 7729.74 7436.37 7761.27 7394.81 C 7765.57 7401.97 7771.3 7409.14 7774.17 7417.74 C 7774.17 7419.17 7769.87 7432.07 7777.04 7433.5 C 7784.2 7434.93 7821.46 7450.7 7805.7 7463.6 M 8295.84 7341.78 C 8288.68 7333.18 8278.64 7326.01 8267.18 7321.71 C 8249.98 7315.98 8225.62 7343.21 8206.99 7324.58 C 8204.12 7320.28 8212.72 7314.55 8209.85 7310.25 C 8205.55 7297.35 8121 7257.22 8105.23 7260.09 C 8096.63 7262.95 8092.33 7272.99 8085.17 7277.29 C 8080.87 7278.72 8088.03 7268.69 8090.9 7265.82 C 8095.2 7261.52 8100.93 7257.22 8105.23 7252.92 C 8110.96 7247.19 8115.26 7242.89 8121 7238.59 C 8129.59 7232.86 8138.19 7228.56 8146.79 7224.26 C 8171.16 7237.16 8168.29 7250.06 8192.65 7262.95 C 8196.95 7265.82 8202.69 7267.25 8208.42 7267.25 C 8211.28 7267.25 8212.72 7261.52 8215.58 7262.95 C 8222.75 7265.82 8228.48 7274.42 8237.08 7277.29 C 8245.68 7278.72 8275.78 7261.52 8281.51 7271.55 C 8282.94 7272.99 8280.08 7274.42 8280.08 7275.85 C 8278.64 7277.29 8277.21 7280.15 8278.64 7281.59 C 8284.38 7287.32 8294.41 7287.32 8298.71 7294.48 C 8298.71 7295.92 8295.84 7338.91 8310.17 7348.94 C 8325.94 7360.41 8390.43 7338.91 8364.63 7381.91 C 8350.3 7404.84 8311.61 7376.17 8303.01 7366.14 C 8301.57 7363.28 8307.31 7361.84 8307.31 7358.98 C 8305.87 7354.68 8301.57 7350.38 8297.27 7347.51 C 8294.41 7347.51 8291.54 7354.68 8290.11 7351.81 C 8290.11 7348.94 8298.71 7344.64 8295.84 7341.78 " }
+ }
+ }
+ // PATH visit ee count: 241
+ DemoShape {
+ objectName: "ee"
+ ShapePath {
+ objectName: "svg_path:ee"
+ // boundingRect: 7343.68, 3343.25 605.443x415.507
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 7607.92 3723.03 C 7619.39 3720.17 7663.82 3678.61 7676.71 3668.57 C 7685.31 3662.84 7701.08 3690.07 7696.78 3671.44 C 7696.78 3670.01 7695.35 3670.01 7695.35 3668.57 C 7695.35 3665.71 7692.48 3661.41 7695.35 3661.41 C 7708.24 3661.41 7724.01 3682.91 7732.61 3685.77 C 7736.91 3687.21 7741.21 3678.61 7745.51 3678.61 C 7749.81 3680.04 7748.37 3688.64 7752.67 3690.07 C 7761.27 3692.94 7769.87 3684.34 7778.47 3687.21 C 7782.77 3688.64 7777.04 3697.24 7779.9 3700.1 C 7785.63 3708.7 7831.5 3738.8 7841.53 3737.37 C 7842.96 3737.37 7870.19 3707.27 7870.19 3707.27 C 7875.92 3705.84 7918.92 3721.6 7920.35 3714.44 C 7923.22 3707.27 7913.19 3687.21 7917.49 3682.91 C 7920.35 3680.04 7927.52 3680.04 7928.95 3675.74 C 7930.38 3672.87 7924.65 3671.44 7924.65 3667.14 C 7923.22 3664.27 7923.22 3659.98 7924.65 3657.11 C 7941.85 3642.78 7943.28 3658.54 7949.02 3641.34 C 7950.45 3637.04 7937.55 3639.91 7933.25 3635.61 C 7923.22 3625.58 7928.95 3618.41 7926.09 3608.38 C 7924.65 3604.08 7901.72 3591.18 7897.42 3586.88 C 7885.96 3566.82 7898.85 3575.42 7898.85 3556.79 C 7898.85 3530.99 7870.19 3503.76 7865.89 3477.96 C 7864.46 3462.2 7881.66 3450.73 7885.96 3439.27 C 7885.96 3439.27 7887.39 3403.44 7887.39 3403.44 C 7887.39 3396.27 7881.66 3387.67 7885.96 3381.94 C 7900.29 3351.84 7924.65 3364.74 7890.26 3343.25 C 7888.82 3348.98 7885.96 3354.71 7875.92 3360.44 C 7863.03 3369.04 7728.31 3370.48 7705.38 3367.61 C 7701.08 3367.61 7698.21 3360.44 7692.48 3361.88 C 7665.25 3367.61 7726.88 3383.37 7681.01 3377.64 C 7673.85 3376.21 7672.41 3360.44 7665.25 3361.88 C 7659.52 3363.31 7669.55 3374.78 7666.68 3380.51 C 7662.38 3389.11 7653.78 3397.71 7645.18 3402.01 C 7630.85 3409.17 7615.09 3412.04 7599.32 3409.17 C 7593.59 3407.74 7589.29 3396.27 7584.99 3399.14 C 7577.83 3403.44 7595.02 3419.2 7587.86 3420.64 C 7573.53 3424.94 7530.53 3426.37 7521.93 3447.87 C 7519.07 3455.03 7534.83 3462.2 7530.53 3467.93 C 7523.37 3479.4 7480.37 3476.53 7474.64 3489.43 C 7454.57 3543.89 7491.84 3509.49 7500.43 3532.42 C 7504.73 3545.32 7483.24 3561.09 7488.97 3573.99 C 7494.7 3589.75 7517.63 3605.51 7520.5 3611.25 C 7529.1 3624.15 7514.77 3638.48 7533.4 3648.51 C 7540.56 3651.38 7549.16 3644.21 7556.33 3647.08 C 7563.49 3648.51 7567.79 3662.84 7574.96 3658.54 C 7584.99 3652.81 7584.99 3598.35 7615.09 3634.18 C 7617.95 3638.48 7607.92 3642.78 7607.92 3648.51 C 7607.92 3659.98 7613.66 3671.44 7613.66 3682.91 C 7613.66 3711.57 7602.19 3695.8 7605.06 3721.6 L 7607.92 3723.03 M 7451.71 3612.68 C 7470.34 3625.58 7468.91 3627.01 7491.84 3637.04 C 7501.87 3642.78 7474.64 3624.15 7480.37 3635.61 C 7486.1 3648.51 7481.8 3629.88 7471.77 3631.31 C 7463.17 3632.75 7471.77 3651.38 7464.61 3658.54 C 7463.17 3659.98 7457.44 3651.38 7456.01 3654.24 C 7453.14 3657.11 7457.44 3664.27 7456.01 3670.01 C 7448.84 3688.64 7434.51 3682.91 7430.21 3684.34 C 7427.34 3684.34 7427.34 3690.07 7424.48 3691.51 C 7415.88 3695.8 7405.85 3698.67 7398.68 3702.97 C 7397.25 3702.97 7397.25 3704.4 7397.25 3705.84 C 7397.25 3717.3 7400.11 3730.2 7397.25 3741.67 C 7394.38 3748.83 7384.35 3763.16 7378.62 3757.43 C 7361.42 3737.37 7394.38 3725.9 7391.51 3710.14 C 7390.08 3705.84 7382.92 3711.57 7378.62 3708.7 C 7370.02 3704.4 7357.12 3701.54 7352.82 3691.51 C 7349.95 3685.77 7365.72 3682.91 7364.28 3677.17 C 7362.85 3665.71 7339.92 3661.41 7344.22 3651.38 C 7347.09 3642.78 7361.42 3662.84 7371.45 3662.84 C 7380.05 3662.84 7367.15 3639.91 7375.75 3635.61 C 7380.05 3634.18 7385.78 3648.51 7387.21 3644.21 C 7397.25 3609.81 7418.74 3622.71 7451.71 3612.68 M 7400.11 3529.56 C 7402.98 3529.56 7407.28 3528.12 7408.71 3530.99 C 7411.58 3533.86 7407.28 3541.02 7411.58 3543.89 C 7417.31 3546.76 7427.34 3539.59 7433.08 3542.46 C 7481.8 3571.12 7435.94 3565.39 7433.08 3571.12 C 7421.61 3598.35 7461.74 3575.42 7408.71 3605.51 C 7392.95 3614.11 7391.51 3579.72 7391.51 3579.72 C 7385.78 3563.95 7359.98 3569.69 7349.95 3566.82 C 7339.92 3565.39 7371.45 3561.09 7381.48 3558.22 C 7394.38 3555.35 7397.25 3538.16 7400.11 3529.56 " }
+ }
+ }
+ // PATH visit lv count: 185
+ DemoShape {
+ objectName: "lv"
+ ShapePath {
+ objectName: "svg_path:lv"
+ // boundingRect: 7317.75, 3661.41 750.748x453.11
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 7341.35 4114.29 C 7347.09 4114.29 7352.82 4115.72 7357.12 4111.42 C 7362.85 4102.82 7361.42 4089.93 7367.15 4081.33 C 7378.62 4066.99 7424.48 4038.33 7441.68 4034.03 C 7451.71 4031.17 7497.57 4034.03 7507.6 4031.17 C 7513.33 4029.73 7517.63 4018.27 7523.37 4018.27 C 7533.4 4019.7 7539.13 4044.06 7544.86 4036.9 C 7549.16 4034.03 7547.73 4026.87 7552.03 4022.57 C 7564.93 4009.67 7570.66 4024 7586.42 4022.57 C 7595.02 4021.13 7599.32 4012.53 7607.92 4012.53 C 7609.36 4011.1 7652.35 4022.57 7653.78 4021.13 C 7660.95 4019.7 7663.82 4009.67 7670.98 4008.23 C 7683.88 4005.37 7683.88 4026.87 7695.35 4009.67 C 7703.94 3999.64 7703.94 3975.27 7721.14 3972.41 C 7735.47 3969.54 7741.21 4015.4 7759.84 4015.4 C 7778.47 4015.4 7797.1 4003.94 7815.73 4009.67 C 7842.96 4016.83 7885.96 4069.86 7918.92 4075.59 C 7954.75 4081.33 7956.18 4026.87 7977.68 4028.3 C 7984.84 4028.3 7989.14 4036.9 7994.88 4036.9 C 7999.18 4036.9 7996.31 4026.87 7999.18 4025.43 C 8007.78 4022.57 8019.24 4031.17 8026.41 4025.43 C 8026.41 4025.43 8033.57 3982.44 8036.44 3978.14 C 8039.31 3969.54 8066.54 3948.04 8066.54 3946.61 C 8078 3905.05 8036.44 3866.35 8012.08 3846.29 C 8002.04 3839.12 8022.11 3826.22 8002.04 3823.36 C 7994.88 3821.92 7989.14 3833.39 7981.98 3831.96 C 7979.11 3831.96 7981.98 3827.66 7981.98 3824.79 C 7981.98 3823.36 7983.41 3820.49 7983.41 3819.06 C 7983.41 3809.02 7986.28 3798.99 7984.84 3788.96 C 7983.41 3784.66 7973.38 3786.09 7973.38 3781.79 C 7973.38 3763.16 8007.78 3751.7 7960.48 3734.5 C 7954.75 3733.07 7946.15 3733.07 7941.85 3728.77 C 7937.55 3723.03 7944.72 3713 7938.98 3710.14 C 7933.25 3705.84 7927.52 3713 7920.35 3714.44 C 7918.92 3721.6 7875.92 3705.84 7870.19 3707.27 C 7870.19 3707.27 7842.96 3737.37 7841.53 3737.37 C 7831.5 3738.8 7785.63 3708.7 7779.9 3700.1 C 7777.04 3697.24 7782.77 3688.64 7778.47 3687.21 C 7769.87 3684.34 7761.27 3692.94 7752.67 3690.07 C 7748.37 3688.64 7749.81 3680.04 7745.51 3678.61 C 7741.21 3678.61 7736.91 3687.21 7732.61 3685.77 C 7724.01 3682.91 7708.24 3661.41 7695.35 3661.41 C 7692.48 3661.41 7695.35 3665.71 7695.35 3668.57 C 7695.35 3670.01 7696.78 3670.01 7696.78 3671.44 C 7701.08 3690.07 7685.31 3662.84 7676.71 3668.57 C 7663.82 3678.61 7619.39 3720.17 7607.92 3723.03 L 7605.06 3721.6 C 7606.49 3724.47 7606.49 3728.77 7606.49 3733.07 C 7612.22 3763.16 7649.48 3804.73 7640.89 3837.69 C 7636.59 3857.75 7602.19 3899.31 7580.69 3902.18 C 7572.09 3903.61 7566.36 3895.01 7559.19 3893.58 C 7544.86 3889.28 7542 3899.31 7533.4 3884.98 C 7523.37 3870.65 7523.37 3850.59 7510.47 3839.12 C 7497.57 3826.22 7467.47 3820.49 7453.14 3807.59 C 7444.54 3800.43 7453.14 3781.79 7444.54 3777.49 C 7431.64 3771.76 7421.61 3791.83 7410.15 3798.99 C 7395.81 3810.46 7375.75 3813.32 7362.85 3827.66 C 7328.45 3863.48 7358.55 3905.05 7345.65 3940.88 C 7341.35 3955.21 7322.72 3960.94 7318.42 3975.27 C 7315.56 3983.87 7322.72 3992.47 7322.72 4002.5 C 7322.72 4012.53 7318.42 4022.57 7321.29 4031.17 C 7321.29 4032.6 7322.72 4034.03 7324.16 4034.03 C 7309.82 4051.23 7332.75 4094.22 7341.35 4114.29 " }
+ }
+ }
+ // PATH visit lt count: 204
+ DemoShape {
+ objectName: "lt"
+ ShapePath {
+ objectName: "svg_path:lt"
+ // boundingRect: 7341.35, 3972.28 628.209x494.871
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 7579.26 4400.92 C 7582.13 4398.06 7582.13 4392.32 7586.42 4390.89 C 7607.92 4383.72 7597.89 4402.36 7612.22 4408.09 C 7652.35 4425.29 7636.59 4393.76 7662.38 4431.02 C 7670.98 4442.48 7662.38 4458.25 7670.98 4463.98 C 7688.18 4475.45 7729.74 4452.52 7741.21 4446.78 C 7752.67 4442.48 7758.4 4468.28 7771.3 4456.82 C 7779.9 4451.08 7781.34 4436.75 7789.93 4431.02 C 7797.1 4426.72 7805.7 4431.02 7812.86 4429.59 C 7820.03 4426.72 7799.97 4410.95 7805.7 4405.22 C 7812.86 4396.62 7827.2 4399.49 7837.23 4395.19 C 7860.16 4382.29 7828.63 4383.72 7844.39 4367.96 C 7848.69 4362.23 7881.66 4346.46 7884.52 4365.09 C 7885.96 4369.39 7878.79 4372.26 7878.79 4376.56 C 7877.36 4389.46 7906.02 4379.42 7908.89 4372.26 C 7921.79 4340.73 7877.36 4349.33 7877.36 4343.6 C 7875.92 4337.86 7890.26 4297.73 7890.26 4296.3 C 7890.26 4296.3 7877.36 4256.17 7877.36 4256.17 C 7877.36 4254.74 7883.09 4254.74 7883.09 4251.87 C 7900.29 4198.85 7887.39 4254.74 7914.62 4211.74 C 7921.79 4203.15 7914.62 4188.81 7920.35 4178.78 C 7927.52 4168.75 7949.02 4183.08 7957.61 4173.05 C 7961.91 4167.32 7956.18 4158.72 7957.61 4152.98 C 7960.48 4148.68 7967.65 4148.68 7969.08 4144.39 C 7974.81 4124.32 7927.52 4150.12 7928.95 4137.22 C 7930.38 4115.72 7940.42 4097.09 7931.82 4075.59 L 7931.82 4074.16 C 7927.52 4075.59 7923.22 4075.59 7918.92 4075.59 C 7885.96 4069.86 7842.96 4016.83 7815.73 4009.67 C 7797.1 4003.94 7778.47 4015.4 7759.84 4015.4 C 7741.21 4015.4 7735.47 3969.54 7721.14 3972.41 C 7703.94 3975.27 7703.94 3999.64 7695.35 4009.67 C 7683.88 4026.87 7683.88 4005.37 7670.98 4008.23 C 7663.82 4009.67 7660.95 4019.7 7653.78 4021.13 C 7652.35 4022.57 7609.36 4011.1 7607.92 4012.53 C 7599.32 4012.53 7595.02 4021.13 7586.42 4022.57 C 7570.66 4024 7564.93 4009.67 7552.03 4022.57 C 7547.73 4026.87 7549.16 4034.03 7544.86 4036.9 C 7539.13 4044.06 7533.4 4019.7 7523.37 4018.27 C 7517.63 4018.27 7513.33 4029.73 7507.6 4031.17 C 7497.57 4034.03 7451.71 4031.17 7441.67 4034.03 C 7424.48 4038.33 7378.62 4066.99 7367.15 4081.33 C 7361.42 4089.93 7362.85 4102.82 7357.12 4111.42 C 7352.82 4115.72 7347.09 4114.29 7341.35 4114.29 C 7342.79 4117.16 7342.79 4118.59 7344.22 4120.02 C 7354.25 4157.28 7337.05 4134.35 7351.39 4170.18 C 7352.82 4173.05 7354.25 4175.91 7357.12 4178.78 C 7359.98 4184.51 7362.85 4188.81 7365.72 4193.11 C 7372.88 4203.15 7378.62 4214.61 7380.05 4226.08 C 7381.48 4234.67 7375.75 4243.27 7377.18 4251.87 C 7378.62 4254.74 7380.05 4244.71 7382.92 4244.71 C 7388.65 4243.27 7388.65 4254.74 7390.08 4259.04 C 7390.08 4261.9 7390.08 4263.34 7390.08 4264.77 C 7394.38 4263.34 7395.81 4257.61 7400.11 4257.61 C 7404.41 4259.04 7404.41 4266.2 7408.71 4269.07 C 7425.91 4279.1 7454.57 4277.67 7473.2 4283.4 C 7476.07 4284.84 7471.77 4289.13 7474.64 4289.13 C 7496.14 4289.13 7516.2 4270.5 7536.26 4276.24 C 7542 4277.67 7539.13 4289.13 7544.86 4293.43 C 7546.3 4294.87 7550.6 4290.57 7553.46 4292 C 7559.19 4294.87 7564.93 4299.17 7569.23 4304.9 C 7577.83 4319.23 7547.73 4357.93 7579.26 4400.92 M 7357.12 4178.78 C 7355.69 4180.21 7355.69 4181.65 7355.69 4181.65 C 7351.39 4193.11 7361.42 4204.58 7362.85 4216.04 C 7364.28 4230.38 7361.42 4246.14 7355.69 4263.34 C 7355.69 4263.34 7357.12 4263.34 7357.12 4263.34 C 7361.42 4254.74 7362.85 4246.14 7364.28 4234.67 C 7364.28 4228.94 7365.72 4208.88 7365.72 4193.11 C 7365.72 4174.48 7364.28 4161.58 7357.12 4178.78 " }
+ }
+ }
+ // PATH visit pl count: 369
+ DemoShape {
+ objectName: "pl"
+ ShapePath {
+ objectName: "svg_path:pl"
+ // boundingRect: 6620.47, 4386.96 1245.42x1032.41
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 6763.79 5169.1 C 6802.48 5163.37 6756.62 5131.84 6796.75 5139 C 6822.55 5141.87 6801.05 5153.33 6816.81 5164.8 C 6839.75 5183.43 6858.38 5170.53 6877.01 5182 C 6882.74 5186.3 6881.31 5193.46 6884.17 5197.76 C 6887.04 5199.2 6888.47 5194.9 6889.91 5194.9 C 6894.21 5193.46 6898.51 5190.6 6899.94 5193.46 C 6904.24 5197.76 6899.94 5204.93 6904.24 5209.23 C 6904.24 5209.23 6935.77 5192.03 6942.93 5196.33 C 6981.63 5214.96 6927.17 5222.13 6930.03 5240.76 C 6930.03 5240.76 6963 5260.82 6963 5260.82 C 6967.3 5266.55 6975.9 5303.82 6997.39 5295.22 C 7003.13 5292.35 7001.69 5282.32 7005.99 5278.02 C 7013.16 5272.29 7027.49 5275.15 7031.79 5266.55 C 7033.22 5263.69 7001.69 5232.16 7010.29 5230.72 C 7031.79 5227.86 7056.15 5249.36 7069.05 5253.66 C 7074.78 5255.09 7081.95 5252.22 7087.68 5252.22 C 7093.42 5252.22 7100.58 5255.09 7106.31 5252.22 C 7109.18 5250.79 7107.75 5245.06 7109.18 5242.19 C 7110.61 5240.76 7113.48 5240.76 7113.48 5242.19 C 7130.68 5276.59 7119.21 5255.09 7100.58 5272.29 C 7094.85 5276.59 7114.91 5278.02 7120.65 5282.32 C 7124.95 5286.62 7123.51 5293.78 7127.81 5298.08 C 7130.68 5300.95 7134.98 5302.38 7137.84 5302.38 C 7179.41 5298.08 7132.11 5295.22 7156.48 5285.19 C 7159.34 5283.75 7159.34 5289.48 7162.21 5290.92 C 7167.94 5295.22 7183.71 5299.52 7190.87 5300.95 C 7199.47 5303.82 7212.37 5299.52 7219.53 5305.25 C 7220.97 5306.68 7233.87 5341.08 7235.3 5342.51 C 7241.03 5346.81 7252.5 5342.51 7258.23 5348.24 C 7263.96 5355.41 7259.66 5368.31 7265.4 5375.47 C 7268.26 5379.77 7278.29 5372.61 7282.59 5376.91 C 7286.89 5381.21 7279.73 5391.24 7284.03 5395.54 C 7306.96 5414.17 7325.59 5341.08 7339.92 5351.11 C 7348.52 5356.84 7348.52 5369.74 7355.69 5376.91 C 7357.12 5378.34 7362.85 5374.04 7364.28 5375.47 C 7365.72 5378.34 7359.98 5384.07 7362.85 5385.51 C 7370.02 5386.94 7377.18 5379.77 7382.92 5382.64 C 7392.95 5386.94 7384.35 5414.17 7384.35 5417.04 C 7384.35 5424.2 7397.25 5412.74 7404.41 5411.3 C 7410.15 5409.87 7415.88 5421.34 7421.61 5418.47 C 7423.04 5417.04 7440.24 5372.61 7460.31 5368.31 C 7466.04 5366.88 7471.77 5372.61 7477.5 5372.61 C 7483.24 5371.18 7486.1 5362.58 7491.84 5364.01 C 7503.3 5365.44 7510.47 5381.21 7521.93 5381.21 C 7530.53 5381.21 7537.7 5372.61 7542 5365.44 C 7543.43 5362.58 7534.83 5362.58 7534.83 5359.71 C 7539.13 5339.65 7547.73 5359.71 7553.46 5356.84 C 7557.76 5355.41 7557.76 5346.81 7562.06 5346.81 C 7583.56 5341.08 7632.29 5342.51 7650.92 5356.84 C 7655.22 5361.14 7653.78 5371.18 7659.52 5374.04 C 7668.12 5379.77 7678.15 5379.77 7688.18 5382.64 C 7706.81 5388.37 7724.01 5389.81 7741.21 5392.67 C 7748.37 5392.67 7755.54 5389.81 7762.7 5391.24 C 7765.57 5392.67 7771.3 5399.84 7769.87 5396.97 C 7752.67 5342.51 7767 5399.84 7742.64 5369.74 C 7736.91 5364.01 7748.37 5353.98 7746.94 5346.81 C 7742.64 5332.48 7728.31 5321.01 7725.44 5305.25 C 7721.14 5293.78 7808.57 5131.84 7820.03 5121.8 C 7845.83 5100.31 7861.59 5131.84 7865.89 5080.24 C 7865.89 5068.78 7837.23 5042.98 7835.8 5041.55 C 7828.63 5027.22 7861.59 5028.65 7857.29 5024.35 C 7834.36 5007.15 7792.8 4979.92 7779.9 4952.69 C 7777.04 4945.52 7782.77 4935.49 7779.9 4926.89 C 7775.6 4916.86 7762.7 4909.7 7758.4 4899.66 C 7746.94 4873.87 7777.04 4825.14 7748.37 4802.21 C 7736.91 4793.61 7722.58 4789.31 7709.68 4787.88 C 7706.81 4786.44 7703.94 4793.61 7701.08 4792.18 C 7659.52 4776.41 7749.81 4700.45 7759.84 4690.42 C 7761.27 4688.99 7764.14 4686.12 7764.14 4683.26 C 7759.84 4604.43 7696.78 4537.07 7670.98 4463.98 C 7662.38 4458.25 7670.98 4442.48 7662.38 4431.02 C 7636.59 4393.76 7652.35 4425.29 7612.22 4408.09 C 7597.89 4402.36 7607.92 4383.72 7586.42 4390.89 C 7582.13 4392.32 7582.13 4399.49 7577.83 4402.36 C 7511.9 4441.05 7318.42 4448.22 7236.73 4436.75 C 7210.94 4463.98 7170.81 4479.75 7137.84 4466.85 C 7109.18 4455.38 7114.91 4428.15 7106.31 4410.95 C 7103.45 4406.65 7093.42 4395.19 7099.15 4396.62 C 7103.45 4396.62 7107.75 4396.62 7110.61 4398.06 C 7103.45 4393.76 7094.85 4389.46 7086.25 4388.02 C 7034.66 4379.42 6977.33 4425.29 6938.63 4448.22 C 6925.74 4455.38 6909.97 4452.52 6899.94 4461.12 C 6875.57 4482.61 6869.84 4517.01 6862.68 4518.44 C 6809.65 4531.34 6759.49 4554.27 6709.33 4574.34 C 6696.43 4580.07 6687.83 4595.83 6674.93 4598.7 C 6667.77 4601.57 6660.6 4594.4 6653.43 4597.27 C 6640.54 4604.43 6670.63 4635.96 6657.73 4638.83 C 6660.6 4661.76 6683.53 4706.19 6686.4 4720.52 C 6690.7 4754.91 6644.83 4777.84 6654.87 4805.07 C 6660.6 4822.27 6715.06 4829.44 6715.06 4850.94 C 6715.06 4872.43 6697.86 4879.6 6710.76 4895.36 C 6715.06 4902.53 6725.09 4905.4 6727.96 4914 C 6732.26 4921.16 6726.53 4931.19 6727.96 4938.36 C 6729.39 4942.66 6735.12 4941.23 6736.56 4944.09 C 6743.72 4954.12 6726.53 4978.49 6722.23 4987.09 C 6713.63 4999.99 6735.12 5007.15 6739.42 5020.05 C 6742.29 5027.22 6732.26 5035.81 6736.56 5041.55 C 6742.29 5050.15 6755.19 5047.28 6760.92 5053.01 C 6778.12 5068.78 6775.25 5141.87 6763.79 5169.1 M 6620.47 4628.8 C 6620.47 4628.8 6621.9 4628.8 6621.9 4628.8 M 6621.9 4628.8 C 6623.34 4630.23 6624.77 4630.23 6626.2 4631.66 C 6624.77 4630.23 6623.34 4630.23 6621.9 4628.8 M 6629.07 4631.66 C 6629.07 4633.09 6629.07 4633.09 6629.07 4633.09 C 6630.5 4633.09 6630.5 4633.09 6630.5 4633.09 M 6630.5 4633.09 C 6630.5 4633.09 6630.5 4633.09 6631.94 4633.09 C 6630.5 4633.09 6630.5 4633.09 6630.5 4633.09 M 6633.37 4633.09 C 6633.37 4633.09 6633.37 4634.53 6634.8 4634.53 C 6633.37 4634.53 6633.37 4633.09 6633.37 4633.09 M 6634.8 4634.53 C 6636.24 4634.53 6636.24 4634.53 6636.24 4634.53 M 6636.24 4634.53 C 6637.67 4634.53 6637.67 4634.53 6637.67 4635.96 C 6637.67 4634.53 6637.67 4634.53 6636.24 4634.53 M 6637.67 4635.96 C 6639.1 4635.96 6639.1 4635.96 6639.1 4635.96 M 6639.1 4635.96 C 6640.54 4635.96 6640.54 4635.96 6640.54 4635.96 C 6640.54 4635.96 6640.54 4635.96 6639.1 4635.96 M 6652 4638.83 C 6652 4638.83 6652 4638.83 6653.43 4638.83 C 6653.43 4638.83 6652 4638.83 6652 4638.83 M 7129.24 4408.09 C 7134.98 4410.95 7140.71 4413.82 7145.01 4419.55 C 7146.44 4420.99 7146.44 4426.72 7143.58 4425.29 C 7133.54 4418.12 7130.68 4412.39 7129.24 4408.09 " }
+ }
+ }
+ // PATH visit cz count: 218
+ DemoShape {
+ objectName: "cz"
+ ShapePath {
+ objectName: "svg_path:cz"
+ // boundingRect: 6433.73, 5135.41 831.662x469.065
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 7050.42 5566.09 C 7071.92 5481.53 7119.21 5553.19 7162.21 5498.73 C 7165.07 5494.43 7160.77 5487.26 7163.64 5482.96 C 7167.94 5477.23 7177.97 5480.1 7182.27 5474.36 C 7182.27 5474.36 7193.74 5429.93 7193.74 5428.5 C 7206.64 5405.57 7241.03 5386.94 7265.4 5375.47 C 7259.66 5368.31 7263.96 5355.41 7258.23 5348.24 C 7252.5 5342.51 7241.03 5346.81 7235.3 5342.51 C 7233.87 5341.08 7220.97 5306.68 7219.53 5305.25 C 7212.37 5299.52 7199.47 5303.82 7190.87 5300.95 C 7183.71 5299.52 7167.94 5295.22 7162.21 5290.92 C 7159.34 5289.48 7159.34 5283.75 7156.48 5285.19 C 7132.11 5295.22 7179.41 5298.08 7137.84 5302.38 C 7134.98 5302.38 7130.68 5300.95 7127.81 5298.08 C 7123.51 5293.78 7124.95 5286.62 7120.65 5282.32 C 7114.91 5278.02 7094.85 5276.59 7100.58 5272.29 C 7119.21 5255.09 7130.68 5276.59 7113.48 5242.19 C 7113.48 5240.76 7110.61 5240.76 7109.18 5242.19 C 7107.75 5245.06 7109.18 5250.79 7106.31 5252.22 C 7100.58 5255.09 7093.42 5252.22 7087.68 5252.22 C 7081.95 5252.22 7074.78 5255.09 7069.05 5253.66 C 7056.15 5249.36 7031.79 5227.86 7010.29 5230.72 C 7001.69 5232.16 7033.22 5263.69 7031.79 5266.55 C 7027.49 5275.15 7013.16 5272.29 7005.99 5278.02 C 7001.69 5282.32 7003.13 5292.35 6997.39 5295.22 C 6975.9 5303.82 6967.3 5266.55 6963 5260.82 C 6963 5260.82 6930.03 5240.76 6930.03 5240.76 C 6927.17 5222.13 6981.63 5214.96 6942.93 5196.33 C 6935.77 5192.03 6904.24 5209.23 6904.24 5209.23 C 6899.94 5204.93 6904.24 5197.76 6899.94 5193.46 C 6898.51 5190.6 6894.21 5193.46 6889.91 5194.9 C 6888.47 5194.9 6887.04 5199.2 6884.17 5197.76 C 6881.31 5193.46 6882.74 5186.3 6877.01 5182 C 6858.38 5170.53 6839.75 5183.43 6816.81 5164.8 C 6801.05 5153.33 6822.55 5141.87 6796.75 5139 C 6756.62 5131.84 6802.48 5163.37 6763.79 5169.1 C 6760.92 5174.83 6759.49 5179.13 6755.19 5179.13 C 6736.56 5183.43 6706.46 5104.61 6690.7 5149.03 C 6687.83 5156.2 6713.63 5161.93 6707.89 5166.23 C 6690.7 5180.56 6666.33 5182 6649.13 5192.03 C 6646.27 5193.46 6649.13 5200.63 6646.27 5202.06 C 6634.8 5207.79 6619.04 5199.2 6610.44 5206.36 C 6603.27 5212.09 6606.14 5223.56 6598.97 5229.29 C 6596.11 5232.16 6593.24 5222.13 6588.94 5223.56 C 6576.04 5226.43 6574.61 5243.62 6566.01 5249.36 C 6561.71 5253.66 6553.11 5246.49 6548.81 5250.79 C 6544.51 5253.66 6548.81 5262.25 6544.51 5266.55 C 6538.78 5273.72 6523.02 5260.82 6518.72 5260.82 C 6482.89 5266.55 6477.15 5293.78 6465.69 5316.71 C 6462.82 5322.45 6462.82 5302.38 6457.09 5298.08 C 6452.79 5292.35 6444.19 5290.92 6437.03 5289.48 C 6424.13 5286.62 6451.36 5332.48 6480.02 5351.11 C 6482.89 5352.54 6492.92 5353.98 6494.35 5362.58 C 6498.65 5382.64 6480.02 5375.47 6477.15 5391.24 C 6475.72 5395.54 6507.25 5448.57 6511.55 5452.87 C 6535.91 5477.23 6541.65 5460.03 6557.41 5475.8 C 6567.44 5485.83 6568.88 5501.59 6578.91 5510.19 C 6598.97 5524.52 6649.13 5543.16 6659.17 5571.82 L 6660.6 5571.82 C 6683.53 5583.28 6700.73 5613.38 6730.82 5601.91 C 6736.56 5600.48 6735.12 5589.02 6740.86 5589.02 C 6750.89 5589.02 6760.92 5601.91 6770.95 5599.05 C 6770.95 5599.05 6782.42 5561.79 6782.42 5561.79 C 6788.15 5557.49 6798.18 5567.52 6801.05 5563.22 C 6803.92 5560.35 6801.05 5518.79 6802.48 5515.92 C 6806.78 5511.63 6815.38 5514.49 6821.11 5517.36 C 6823.98 5518.79 6821.11 5525.96 6823.98 5527.39 C 6831.15 5527.39 6836.88 5518.79 6844.05 5518.79 C 6885.61 5518.79 6918.57 5550.32 6957.27 5554.62 C 6963 5554.62 6970.16 5557.49 6975.9 5556.05 C 6984.5 5551.75 6987.36 5540.29 6994.53 5537.42 C 7004.56 5534.56 7018.89 5553.19 7026.06 5554.62 C 7030.36 5554.62 7036.09 5546.02 7040.39 5548.89 C 7047.55 5554.62 7050.42 5560.35 7050.42 5566.09 " }
+ }
+ }
+ // PATH visit sk count: 145
+ DemoShape {
+ objectName: "sk"
+ ShapePath {
+ objectName: "svg_path:sk"
+ // boundingRect: 7038.35, 5343.67 688.663x378.89
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 7726.88 5389.81 C 7728.31 5404.14 7718.28 5424.2 7716.84 5438.53 C 7715.41 5448.57 7716.84 5458.6 7712.54 5467.2 C 7708.24 5477.23 7695.35 5480.1 7693.91 5490.13 C 7691.05 5500.16 7698.21 5510.19 7698.21 5521.66 C 7698.21 5533.12 7676.71 5533.12 7665.25 5535.99 C 7659.52 5537.42 7653.78 5544.59 7649.48 5541.72 C 7622.25 5533.12 7643.75 5505.89 7607.92 5504.46 C 7593.59 5504.46 7584.99 5524.52 7570.66 5525.96 C 7546.3 5530.26 7514.77 5504.46 7493.27 5531.69 C 7484.67 5543.15 7490.4 5581.85 7474.64 5589.02 C 7468.91 5590.45 7460.31 5584.72 7454.57 5587.58 C 7431.64 5601.91 7464.61 5611.95 7428.78 5617.68 C 7417.31 5619.11 7391.51 5587.58 7380.05 5607.65 C 7375.75 5614.81 7382.92 5627.71 7377.18 5633.44 C 7361.42 5649.21 7316.99 5639.18 7296.93 5653.51 C 7278.29 5664.97 7298.36 5685.04 7304.09 5693.64 C 7309.82 5703.67 7188 5725.17 7170.81 5722.3 C 7143.58 5716.57 7123.51 5679.31 7097.72 5676.44 C 7091.98 5675.01 7087.68 5676.44 7084.82 5677.87 C 7067.62 5659.24 7053.29 5640.61 7040.39 5619.11 C 7031.79 5604.78 7053.29 5584.72 7051.85 5566.09 C 7071.92 5481.53 7119.21 5551.75 7162.21 5498.73 C 7165.07 5494.43 7160.77 5487.26 7163.64 5482.96 C 7167.94 5477.23 7177.97 5480.1 7182.27 5474.36 C 7182.27 5474.36 7193.74 5429.93 7193.74 5428.5 C 7206.64 5405.57 7241.03 5386.94 7265.4 5375.47 C 7268.26 5379.77 7278.29 5372.61 7282.59 5376.91 C 7286.89 5381.21 7279.73 5391.24 7284.03 5395.54 C 7306.96 5414.17 7325.59 5341.08 7339.92 5351.11 C 7348.52 5356.84 7348.52 5369.74 7355.69 5376.91 C 7357.12 5378.34 7362.85 5374.04 7364.28 5375.47 C 7365.72 5378.34 7359.98 5384.07 7362.85 5385.51 C 7370.02 5386.94 7377.18 5379.77 7382.92 5382.64 C 7392.95 5386.94 7384.35 5414.17 7384.35 5417.04 C 7384.35 5424.2 7397.25 5412.74 7404.41 5411.3 C 7410.15 5409.87 7415.88 5421.34 7421.61 5418.47 C 7423.04 5417.04 7440.24 5372.61 7460.31 5368.31 C 7466.04 5366.88 7471.77 5372.61 7477.5 5372.61 C 7483.24 5371.18 7486.1 5362.58 7491.84 5364.01 C 7503.3 5365.44 7510.47 5381.21 7521.93 5381.21 C 7530.53 5381.21 7537.7 5372.61 7542 5365.44 C 7543.43 5362.58 7534.83 5362.58 7534.83 5359.71 C 7539.13 5339.65 7547.73 5359.71 7553.46 5356.84 C 7557.76 5355.41 7557.76 5346.81 7562.06 5346.81 C 7583.56 5341.08 7632.29 5342.51 7650.92 5356.84 C 7655.22 5361.14 7653.78 5371.18 7659.52 5374.04 C 7668.12 5379.77 7678.15 5379.77 7688.18 5382.64 C 7701.08 5386.94 7713.98 5388.37 7726.88 5389.81 " }
+ }
+ }
+ // PATH visit si count: 115
+ DemoShape {
+ objectName: "si"
+ ShapePath {
+ objectName: "svg_path:si"
+ // boundingRect: 6626.03, 5905.75 415.794x290.052
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 7041.82 5974.54 C 7031.79 5973.1 7007.43 5967.37 7001.69 5968.81 C 6985.93 5971.67 7007.43 5991.74 6998.83 5997.47 C 6991.66 6000.33 6983.06 5996.04 6975.9 5998.9 C 6973.03 6000.33 6977.33 6006.07 6974.46 6008.93 C 6960.13 6020.4 6937.2 6021.83 6922.87 6034.73 C 6905.67 6050.5 6954.4 6090.62 6932.9 6106.39 C 6882.74 6142.22 6914.27 6082.03 6881.31 6129.32 C 6877.01 6135.05 6894.21 6136.49 6897.07 6143.65 C 6899.94 6149.38 6882.74 6147.95 6882.74 6153.68 C 6882.74 6156.55 6897.07 6175.18 6891.34 6182.35 C 6875.57 6198.11 6852.64 6173.75 6838.31 6173.75 C 6816.81 6173.75 6858.38 6193.81 6822.55 6183.78 C 6812.52 6180.91 6799.62 6165.15 6795.32 6156.55 C 6792.45 6153.68 6789.58 6145.08 6788.15 6147.95 C 6782.42 6156.55 6783.85 6166.58 6778.12 6173.75 C 6759.49 6198.11 6733.69 6173.75 6712.19 6180.91 C 6709.33 6182.35 6715.06 6188.08 6712.19 6190.95 C 6699.3 6198.11 6673.5 6196.68 6660.6 6190.95 C 6660.6 6190.95 6660.6 6189.51 6662.03 6189.51 C 6669.2 6182.35 6677.8 6175.18 6680.66 6168.02 C 6730.82 6170.88 6673.5 6136.49 6659.17 6127.89 C 6649.13 6122.15 6664.9 6103.52 6662.03 6096.36 C 6659.17 6089.19 6636.24 6109.26 6641.97 6090.62 C 6646.27 6077.73 6673.5 6066.26 6663.47 6057.66 C 6656.3 6051.93 6623.34 6054.8 6626.2 6037.6 C 6642.26 6003.66 6667.17 5992.19 6692.13 5996.04 C 6703.59 5997.47 6715.06 6006.07 6726.53 6007.5 C 6737.99 6008.93 6749.46 6000.33 6760.92 6001.77 C 6768.09 6003.2 6772.39 6013.23 6779.55 6013.23 C 6782.42 6014.67 6780.99 6006.07 6783.85 6004.63 C 6791.02 5997.47 6802.48 5994.6 6809.65 5986 C 6815.38 5981.7 6811.08 5971.67 6815.38 5967.37 C 6842.61 5945.87 6871.28 5973.1 6897.07 5961.64 C 6905.67 5957.34 6907.1 5944.44 6915.7 5941.58 C 6917.14 5940.14 6964.43 5947.31 6965.86 5945.87 C 6970.16 5944.44 6961.56 5938.71 6960.13 5934.41 C 6955.83 5911.48 6973.03 5905.75 6994.53 5905.75 C 7000.26 5905.75 7011.73 5950.17 7041.82 5974.54 " }
+ }
+ }
+ // PATH visit hu count: 167
+ DemoShape {
+ objectName: "hu"
+ ShapePath {
+ objectName: "svg_path:hu"
+ // boundingRect: 6971.6, 5504.46 834.102x584.228
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 6994.53 5905.75 C 7000.26 5905.75 7011.73 5950.17 7041.82 5974.54 C 7080.52 6006.07 7113.48 6023.27 7143.58 6061.96 C 7147.88 6067.69 7176.54 6063.39 7179.41 6064.83 C 7190.87 6069.13 7199.47 6079.16 7209.5 6083.46 C 7229.57 6092.06 7292.63 6090.62 7311.26 6074.86 C 7314.12 6071.99 7315.56 6051.93 7325.59 6051.93 C 7352.82 6047.63 7348.52 6053.36 7372.88 6026.13 C 7377.18 6021.83 7382.92 6036.16 7395.81 6026.13 C 7408.71 6016.1 7417.31 5998.9 7433.08 5990.3 C 7466.04 5968.81 7438.81 5990.3 7463.17 5991.74 C 7464.61 5991.74 7501.87 5980.27 7503.3 5980.27 C 7510.47 5980.27 7517.63 5987.44 7524.8 5987.44 C 7527.66 5986 7529.1 5980.27 7531.96 5978.84 C 7540.56 5975.97 7583.56 5971.67 7586.42 5961.64 C 7589.29 5955.91 7567.79 5948.74 7593.59 5944.44 C 7603.62 5943.01 7613.65 5953.04 7622.25 5950.17 C 7649.48 5940.14 7640.89 5888.55 7648.05 5872.78 C 7650.92 5868.48 7658.08 5868.48 7660.95 5864.18 C 7660.95 5864.18 7676.71 5814.02 7676.71 5814.02 C 7679.58 5806.86 7683.88 5801.12 7683.88 5793.96 C 7683.88 5791.09 7676.71 5791.09 7676.71 5788.23 C 7678.15 5775.33 7693.91 5735.2 7701.08 5723.73 C 7703.94 5720.87 7711.11 5723.73 7711.11 5719.43 C 7718.28 5692.2 7708.24 5672.14 7739.77 5642.04 C 7749.81 5630.58 7761.27 5637.74 7777.04 5632.01 C 7792.8 5624.85 7794.23 5603.35 7805.7 5591.88 C 7788.5 5577.55 7811.43 5580.42 7792.8 5567.52 C 7789.93 5566.09 7785.63 5563.22 7781.34 5563.22 C 7775.6 5564.65 7771.3 5571.82 7765.57 5570.39 C 7756.97 5564.65 7755.54 5550.32 7746.94 5544.59 C 7742.64 5541.72 7736.91 5548.89 7732.61 5547.45 C 7709.68 5538.86 7731.17 5523.09 7698.21 5521.66 C 7698.21 5533.12 7676.71 5533.12 7665.25 5535.99 C 7659.52 5537.42 7653.78 5544.59 7649.48 5541.72 C 7622.25 5533.12 7643.75 5505.89 7607.92 5504.46 C 7593.59 5504.46 7584.99 5524.52 7570.66 5525.96 C 7546.3 5530.26 7514.77 5504.46 7493.27 5531.69 C 7484.67 5543.15 7490.4 5581.85 7474.64 5589.02 C 7468.91 5590.45 7460.31 5584.72 7454.57 5587.58 C 7431.64 5601.91 7464.61 5611.95 7428.78 5617.68 C 7417.31 5619.11 7391.51 5587.58 7380.05 5607.65 C 7375.75 5614.81 7382.92 5627.71 7377.18 5633.44 C 7361.42 5649.21 7316.99 5639.18 7296.93 5653.51 C 7278.29 5664.97 7298.36 5685.04 7304.09 5693.64 C 7309.82 5703.67 7188 5725.17 7170.81 5722.3 C 7143.58 5716.57 7123.51 5679.31 7097.72 5676.44 C 7091.98 5675.01 7087.68 5676.44 7084.82 5677.87 C 7064.75 5686.47 7084.82 5732.33 7083.38 5738.07 C 7074.78 5753.83 7023.19 5730.9 7003.13 5748.1 C 6994.53 5755.26 7037.52 5752.4 7038.96 5776.76 C 7041.82 5805.42 7017.46 5783.93 7007.43 5803.99 C 7000.26 5818.32 7026.06 5848.42 7023.19 5854.15 C 7010.29 5875.65 6998.83 5879.95 6973.03 5908.61 C 6973.03 5908.61 6973.03 5908.61 6971.6 5910.05 C 6974.46 5908.61 6975.9 5907.18 6978.76 5907.18 L 6994.53 5905.75 " }
+ }
+ }
+ // PATH visit ro count: 264
+ DemoShape {
+ objectName: "ro"
+ ShapePath {
+ objectName: "svg_path:ro"
+ // boundingRect: 7524.8, 5424.2 1255.45x932.997
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 8695.69 6202.41 C 8672.76 6206.71 8635.5 6219.61 8614 6200.98 C 8606.84 6195.25 8605.41 6175.18 8596.81 6179.48 C 8592.51 6180.91 8589.64 6186.65 8585.34 6188.08 C 8550.95 6206.71 8596.81 6178.05 8559.54 6179.48 C 8548.08 6179.48 8539.48 6192.38 8528.01 6193.81 C 8503.65 6196.68 8523.72 6162.28 8459.22 6186.65 C 8431.99 6198.11 8381.83 6221.04 8360.33 6242.54 C 8335.97 6266.9 8331.67 6297 8300.14 6317.06 C 8271.48 6334.26 8249.98 6322.8 8221.32 6321.36 C 8198.39 6319.93 8174.02 6318.5 8152.53 6325.66 C 8143.93 6328.53 8141.06 6340 8132.46 6342.86 C 8092.33 6357.19 8045.04 6334.26 8004.91 6338.56 C 7973.38 6341.43 7963.35 6367.23 7928.95 6352.89 C 7904.59 6342.86 7959.05 6311.33 7946.15 6305.6 C 7923.22 6295.57 7854.43 6281.24 7858.73 6243.97 C 7860.16 6231.07 7907.45 6229.64 7893.12 6222.48 C 7741.21 6146.52 7877.36 6215.31 7815.73 6251.14 C 7805.7 6258.3 7799.97 6232.51 7789.93 6228.21 C 7782.77 6223.91 7772.74 6228.21 7765.57 6228.21 C 7756.97 6228.21 7748.37 6232.51 7739.77 6229.64 C 7735.47 6226.77 7738.34 6219.61 7735.47 6213.88 C 7728.31 6199.54 7666.68 6222.48 7701.08 6198.11 C 7709.68 6192.38 7731.17 6186.65 7724.01 6180.91 C 7716.84 6176.61 7702.51 6180.91 7699.64 6172.31 C 7698.21 6163.72 7728.31 6147.95 7708.24 6136.49 C 7681.01 6120.72 7626.55 6127.89 7607.92 6094.92 C 7603.62 6087.76 7603.62 6053.36 7603.62 6044.76 L 7603.62 6041.9 C 7599.32 6043.33 7596.46 6051.93 7593.59 6049.06 C 7583.56 6043.33 7582.13 6027.56 7573.53 6020.4 C 7564.93 6014.67 7552.03 6016.1 7543.43 6008.93 C 7534.83 6004.63 7530.53 5994.6 7524.8 5987.44 C 7527.66 5986 7529.1 5980.27 7531.96 5978.84 C 7540.56 5975.97 7583.56 5971.67 7586.42 5961.64 C 7589.29 5955.91 7567.79 5948.74 7593.59 5944.44 C 7603.62 5943.01 7613.65 5953.04 7622.25 5950.17 C 7649.48 5940.14 7640.89 5888.55 7648.05 5872.78 C 7650.92 5868.48 7658.08 5868.48 7660.95 5864.18 L 7676.71 5814.02 C 7679.58 5806.86 7683.88 5801.12 7683.88 5793.96 C 7683.88 5791.09 7676.71 5791.09 7676.71 5788.23 C 7678.15 5775.33 7693.91 5735.2 7701.08 5723.73 C 7703.94 5720.87 7711.11 5723.73 7711.11 5719.43 C 7718.28 5692.2 7708.24 5672.14 7739.77 5642.04 C 7749.81 5630.58 7761.27 5637.74 7777.04 5632.01 C 7792.8 5624.85 7794.23 5603.35 7805.7 5591.88 C 7810 5594.75 7818.6 5589.02 7828.63 5561.79 C 7830.06 5558.92 7830.06 5554.62 7832.93 5554.62 C 7837.23 5554.62 7873.06 5571.82 7877.36 5571.82 C 7880.22 5571.82 7881.66 5564.65 7884.52 5563.22 C 7903.15 5556.05 7950.45 5574.68 7973.38 5568.95 C 7986.28 5564.65 7994.88 5553.19 8007.78 5551.75 C 8030.71 5550.32 8046.47 5580.42 8062.24 5584.72 C 8083.73 5591.88 8090.9 5551.75 8096.63 5546.02 C 8122.43 5518.79 8188.35 5521.66 8208.42 5501.59 C 8247.11 5464.33 8191.22 5495.86 8218.45 5460.03 C 8225.62 5451.43 8237.08 5444.27 8248.55 5441.4 L 8249.98 5437.1 L 8255.71 5424.2 C 8254.28 5427.07 8254.28 5432.8 8254.28 5435.67 C 8274.34 5425.64 8287.24 5434.23 8303.01 5447.13 C 8333.1 5468.63 8338.84 5504.46 8363.2 5528.82 C 8403.33 5567.52 8512.25 5636.31 8525.15 5692.2 C 8535.18 5728.03 8522.28 5768.16 8530.88 5803.99 C 8533.75 5819.76 8559.54 5855.59 8558.11 5871.35 C 8558.11 5877.08 8546.65 5878.52 8548.08 5884.25 C 8549.51 5889.98 8558.11 5887.11 8562.41 5889.98 C 8566.71 5892.85 8566.71 5902.88 8572.44 5902.88 C 8575.31 5904.31 8579.61 5901.45 8582.47 5904.31 C 8586.77 5908.61 8585.34 5917.21 8591.07 5921.51 C 8596.81 5927.24 8658.43 5930.11 8657 5922.94 C 8657 5921.51 8636.94 5917.21 8651.27 5908.61 C 8659.87 5904.31 8669.9 5905.75 8678.5 5901.45 C 8692.83 5894.28 8698.56 5874.22 8714.33 5868.48 C 8745.86 5857.02 8761.62 5868.48 8768.79 5895.71 C 8767.35 5897.15 8763.05 5895.71 8763.05 5897.15 C 8763.05 5901.45 8765.92 5904.31 8768.79 5905.75 C 8771.65 5907.18 8774.52 5901.45 8775.95 5904.31 C 8778.82 5910.05 8780.25 5958.77 8780.25 5964.51 C 8778.82 5983.14 8735.82 5984.57 8724.36 5993.17 C 8717.19 5998.9 8717.19 6018.97 8708.59 6017.53 C 8707.16 6016.1 8718.63 5968.81 8698.56 5957.34 C 8691.4 5954.47 8682.8 5965.94 8678.5 5973.1 C 8672.76 5983.14 8698.56 5991.74 8697.13 6003.2 C 8697.13 6014.67 8675.63 6021.83 8681.36 6030.43 C 8687.1 6039.03 8698.28 6018.2 8708.31 6018.2 C 8711.18 6016.77 8707.16 6024.7 8704.29 6027.56 C 8700.9 6029.41 8703.48 6030 8702.86 6031.86 C 8711.46 6039.03 8677.06 6094.92 8677.06 6096.36 C 8678.5 6106.39 8691.4 6156.55 8698.56 6202.41 L 8695.69 6202.41 " }
+ }
+ }
+ // PATH visit bg count: 211
+ DemoShape {
+ objectName: "bg"
+ ShapePath {
+ objectName: "svg_path:bg"
+ // boundingRect: 7863.73, 6177.87 840.036x636.981
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 8477.85 6648.13 C 8470.69 6646.69 8463.52 6646.69 8459.22 6646.69 C 8403.33 6658.16 8493.62 6698.29 8462.09 6722.65 C 8462.09 6722.65 8417.66 6736.98 8416.23 6736.98 C 8396.16 6744.15 8363.2 6769.94 8341.7 6768.51 C 8337.4 6768.51 8340.27 6761.35 8337.4 6759.91 C 8323.07 6752.75 8304.44 6744.15 8288.68 6748.45 C 8282.94 6749.88 8282.94 6761.35 8277.21 6762.78 C 8272.91 6764.21 8270.04 6754.18 8265.75 6752.75 C 8262.88 6751.31 8258.58 6757.05 8257.15 6754.18 C 8247.11 6748.45 8244.25 6732.68 8232.78 6731.25 C 8224.18 6728.38 8219.88 6742.71 8211.29 6744.15 C 8205.55 6747.01 8198.39 6735.55 8194.09 6738.42 C 8168.29 6754.18 8158.26 6771.38 8118.13 6785.71 C 8100.93 6791.44 8079.43 6785.71 8063.67 6795.74 C 8057.94 6798.61 8057.94 6810.07 8052.2 6812.94 C 8047.9 6817.24 8040.74 6812.94 8035.01 6812.94 C 8000.45 6809.98 8017.43 6764.43 8014.94 6734.12 C 8004.91 6724.08 7989.14 6695.42 7976.25 6686.82 C 7969.08 6682.52 7959.05 6686.82 7950.45 6682.52 C 7947.58 6681.09 7908.89 6650.99 7908.89 6648.13 C 7916.05 6635.23 7936.12 6632.36 7928.95 6613.73 C 7927.52 6608 7923.22 6605.13 7918.92 6602.26 C 7916.05 6600.83 7911.75 6603.7 7910.32 6600.83 C 7908.89 6593.67 7910.32 6586.5 7910.32 6579.33 C 7908.89 6570.73 7898.85 6562.14 7903.15 6554.97 C 7944.72 6486.18 7897.42 6570.73 7943.28 6534.91 C 7947.58 6530.61 7977.68 6477.58 7969.08 6468.98 C 7957.61 6460.38 7903.15 6434.58 7900.29 6431.72 C 7883.09 6417.39 7855.86 6357.19 7865.89 6335.7 C 7870.19 6325.66 7885.96 6327.1 7891.69 6318.5 C 7895.99 6308.47 7890.26 6295.57 7894.56 6285.53 C 7913.19 6294.13 7936.12 6299.87 7946.15 6305.6 C 7959.05 6311.33 7904.59 6342.86 7928.95 6352.89 C 7963.35 6367.23 7973.38 6341.43 8004.91 6338.56 C 8045.04 6334.26 8092.33 6357.19 8132.46 6342.86 C 8141.06 6340 8143.93 6328.53 8152.53 6325.66 C 8174.02 6318.5 8198.39 6319.93 8221.32 6321.36 C 8249.98 6322.8 8271.48 6334.26 8300.14 6317.06 C 8331.67 6297 8335.97 6266.9 8360.33 6242.54 C 8381.83 6221.04 8431.99 6198.11 8459.22 6186.65 C 8523.72 6162.28 8503.65 6196.68 8528.01 6193.81 C 8539.48 6192.38 8548.08 6179.48 8559.54 6179.48 C 8596.81 6178.05 8550.95 6206.71 8585.34 6188.08 C 8589.64 6186.65 8592.51 6180.91 8596.81 6179.48 C 8605.41 6175.18 8606.84 6195.25 8614 6200.98 C 8635.5 6219.61 8672.76 6206.71 8695.69 6202.41 L 8698.56 6202.41 C 8704.29 6238.24 8707.16 6271.2 8697.13 6276.94 C 8691.4 6279.8 8684.23 6269.77 8677.06 6271.2 C 8624.04 6285.53 8658.43 6284.1 8642.67 6315.63 C 8641.23 6321.36 8631.2 6321.36 8628.34 6325.66 C 8628.34 6328.53 8636.94 6327.1 8636.94 6329.96 C 8639.8 6352.89 8638.37 6367.23 8644.1 6390.16 C 8645.53 6398.75 8654.13 6410.22 8649.83 6417.39 C 8645.53 6424.55 8632.64 6420.25 8625.47 6424.55 C 8624.04 6424.55 8629.77 6427.42 8629.77 6428.85 C 8626.9 6434.58 8619.74 6436.02 8618.3 6441.75 C 8616.87 6446.05 8625.47 6450.35 8622.6 6453.22 C 8616.87 6461.81 8603.97 6464.68 8598.24 6473.28 C 8572.44 6507.68 8635.5 6456.08 8651.27 6494.78 C 8652.7 6497.64 8648.4 6501.94 8648.4 6504.81 C 8649.83 6506.24 8681.36 6524.87 8688.53 6530.61 C 8692.83 6536.34 8697.13 6540.64 8698.56 6544.94 L 8695.7 6544.94 C 8687.1 6546.37 8678.5 6544.94 8669.9 6547.8 C 8658.43 6552.1 8649.83 6562.14 8639.8 6569.3 C 8636.94 6570.73 8639.8 6576.47 8638.37 6575.03 C 8605.41 6567.87 8595.37 6542.07 8562.41 6559.27 L 8538.05 6586.5 C 8528.01 6590.8 8515.12 6583.63 8507.95 6590.8 C 8499.35 6597.96 8507.95 6612.3 8502.22 6620.9 C 8493.62 6630.93 8464.96 6626.63 8477.85 6648.13 " }
+ }
+ }
+ // PATH visit cy count: 64
+ DemoShape {
+ objectName: "cy"
+ ShapePath {
+ objectName: "svg_path:cy"
+ // boundingRect: 9613.09, 7409.12 313.697x281.029
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 9926.78 7409.14 C 9925.35 7432.07 9860.86 7487.96 9849.39 7513.76 C 9836.49 7545.29 9900.99 7549.59 9893.82 7561.05 C 9889.52 7566.78 9878.06 7559.62 9872.32 7562.49 C 9866.59 7563.92 9865.16 7572.52 9859.43 7575.38 C 9850.83 7581.12 9836.49 7575.38 9829.33 7582.55 C 9823.6 7589.72 9830.76 7602.61 9826.46 7609.78 C 9815 7629.84 9764.84 7644.18 9753.37 7659.94 C 9749.07 7665.67 9757.67 7675.71 9753.37 7682.87 C 9741.91 7704.37 9730.44 7671.41 9726.14 7671.41 C 9717.54 7671.41 9711.81 7682.87 9703.21 7685.74 C 9698.91 7687.17 9651.62 7680.01 9650.18 7680.01 C 9645.88 7677.14 9647.32 7669.97 9644.45 7665.67 C 9640.15 7661.37 9602.89 7621.25 9615.79 7622.68 C 9622.95 7622.68 9627.25 7629.84 9634.42 7629.84 C 9647.32 7628.41 9650.18 7602.61 9653.05 7598.31 C 9663.08 7582.55 9690.31 7594.02 9700.34 7585.42 C 9707.51 7581.12 9706.08 7569.65 9704.64 7561.05 C 9703.21 7553.89 9690.31 7545.29 9696.04 7538.12 C 9700.34 7532.39 9711.81 7540.99 9720.41 7539.55 C 9737.61 7538.12 9779.17 7528.09 9794.93 7519.49 C 9815 7508.03 9925.35 7407.7 9926.78 7409.14 " }
+ }
+ }
+ // PATH visit mt count: 16
+ DemoShape {
+ objectName: "mt"
+ ShapePath {
+ objectName: "svg_path:mt"
+ // boundingRect: 6811.81, 7968.28 95.416x55.3057
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 6829.95 7968.49 C 6819.72 7970.54 6811.81 7987.11 6811.81 7987.11 C 6830 7987.11 6837.23 7979.49 6829.95 8008.6 C 6822.67 8037.71 6917.26 8019.74 6906.35 7994.27 C 6895.43 7968.8 6855.01 7986.86 6840.46 7972.31 C 6836.82 7968.67 6833.36 7967.81 6829.95 7968.49 " }
+ }
+ }
+ // PATH visit hr count: 339
+ DemoShape {
+ objectName: "hr"
+ ShapePath {
+ objectName: "svg_path:hr"
+ // boundingRect: 6647.7, 5968.58 787.166x732.576
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 7367.15 6701.15 L 7364.28 6691.12 C 7347.09 6662.46 7319.86 6672.49 7288.33 6648.13 C 7279.73 6640.96 7276.86 6628.06 7266.83 6625.2 C 7261.1 6622.33 7253.93 6628.06 7246.76 6629.49 C 7249.63 6630.93 7251.06 6630.93 7253.93 6632.36 C 7256.8 6633.79 7259.66 6642.39 7256.8 6642.39 C 7233.87 6640.96 7216.67 6619.46 7193.74 6616.6 C 7183.71 6615.16 7172.24 6618.03 7162.21 6616.6 C 7159.34 6616.6 7156.48 6609.43 7155.04 6610.86 C 7152.18 6612.3 7152.18 6619.46 7155.04 6620.9 C 7163.64 6623.76 7173.67 6619.46 7183.71 6620.9 C 7192.3 6622.33 7202.34 6625.2 7212.37 6630.93 C 7215.23 6632.36 7213.8 6638.09 7216.67 6639.53 C 7265.4 6665.32 7255.36 6623.76 7331.32 6683.95 C 7341.35 6691.12 7354.25 6698.29 7367.15 6701.15 M 7391.51 6241.11 C 7378.62 6226.78 7400.11 6233.94 7405.85 6223.91 C 7407.28 6222.48 7407.28 6219.61 7405.85 6218.18 C 7387.21 6199.55 7400.11 6192.38 7401.55 6173.75 C 7402.98 6166.58 7438.81 6195.25 7434.51 6166.58 C 7414.44 6166.58 7391.51 6160.85 7374.32 6149.38 C 7367.15 6143.65 7380.05 6140.79 7380.05 6139.35 C 7380.05 6135.05 7365.72 6132.19 7374.32 6123.59 C 7375.75 6122.15 7385.78 6130.75 7387.21 6122.15 C 7388.65 6106.39 7358.55 6125.02 7358.55 6110.69 C 7361.42 6077.73 7367.15 6086.32 7342.79 6051.93 L 7341.35 6049.06 C 7337.05 6050.5 7332.75 6050.5 7325.59 6051.93 C 7315.56 6051.93 7314.12 6071.99 7311.26 6074.86 C 7292.63 6090.62 7229.57 6092.06 7209.5 6083.46 C 7199.47 6079.16 7190.87 6069.13 7179.41 6064.83 C 7176.54 6063.39 7147.88 6067.69 7143.58 6061.96 C 7113.48 6023.27 7080.52 6006.07 7041.82 5974.54 C 7031.79 5973.1 7007.43 5967.37 7001.69 5968.81 C 6985.93 5971.67 7007.43 5991.74 6998.83 5997.47 C 6991.66 6000.33 6983.06 5996.04 6975.9 5998.9 C 6973.03 6000.33 6977.33 6006.07 6974.46 6008.93 C 6960.13 6020.4 6937.2 6021.83 6922.87 6034.73 C 6905.67 6050.5 6954.4 6090.62 6932.9 6106.39 C 6882.74 6142.22 6914.27 6082.03 6881.31 6129.32 C 6877.01 6135.05 6894.21 6136.49 6897.07 6143.65 C 6899.94 6149.38 6882.74 6147.95 6882.74 6153.68 C 6882.74 6156.55 6897.07 6175.18 6891.34 6182.35 C 6875.57 6198.11 6852.64 6173.75 6838.31 6173.75 C 6816.81 6173.75 6858.38 6193.81 6822.55 6183.78 C 6812.52 6180.91 6799.62 6165.15 6795.32 6156.55 C 6792.45 6153.68 6789.58 6145.08 6788.15 6147.95 C 6782.42 6156.55 6783.85 6166.58 6778.12 6173.75 C 6759.49 6198.11 6733.69 6173.75 6712.19 6180.91 C 6709.33 6182.35 6715.06 6188.08 6712.19 6190.95 C 6699.3 6198.11 6673.5 6196.68 6660.6 6190.95 C 6656.3 6190.95 6647.7 6186.65 6647.7 6190.95 C 6649.13 6202.41 6659.17 6211.01 6663.47 6221.04 C 6663.47 6222.48 6660.6 6222.48 6660.6 6223.91 C 6662.03 6235.37 6659.17 6246.84 6664.9 6255.44 C 6664.9 6255.44 6666.33 6255.44 6666.33 6256.87 C 6660.6 6265.47 6683.53 6275.5 6690.7 6285.53 C 6696.43 6294.13 6700.73 6331.4 6707.89 6322.8 C 6715.06 6314.2 6719.36 6302.73 6725.09 6292.7 C 6726.53 6288.4 6727.96 6284.1 6727.96 6279.8 C 6727.96 6278.37 6723.66 6279.8 6723.66 6276.94 C 6723.66 6275.5 6723.66 6269.77 6725.09 6271.2 C 6730.82 6272.64 6726.53 6305.6 6742.29 6279.8 C 6745.16 6272.64 6745.16 6265.47 6745.16 6256.87 C 6745.16 6255.44 6742.29 6254.01 6742.29 6251.14 C 6742.29 6249.71 6743.72 6255.44 6745.16 6254.01 C 6756.62 6248.27 6746.59 6209.58 6759.49 6209.58 C 6801.05 6206.71 6786.72 6222.48 6812.52 6243.97 C 6818.25 6248.27 6826.85 6243.97 6831.15 6248.27 C 6856.94 6278.37 6826.85 6315.63 6855.51 6347.16 C 6864.11 6357.19 6888.47 6378.69 6898.51 6385.86 C 6909.97 6391.59 6945.8 6397.32 6934.33 6401.62 C 6914.27 6407.35 6877.01 6365.79 6882.74 6420.25 C 6884.17 6437.45 6950.1 6474.71 6960.13 6487.61 C 6963 6489.04 6948.67 6483.31 6951.53 6484.74 C 6960.13 6490.48 6997.39 6501.94 6998.83 6506.24 C 7001.69 6516.27 6993.09 6532.04 7000.26 6540.64 C 7004.56 6543.5 7048.99 6527.74 7050.42 6526.31 C 7079.08 6520.57 7059.02 6532.04 7094.85 6544.94 C 7106.31 6547.8 7119.21 6543.5 7130.68 6547.8 C 7146.44 6553.54 7156.48 6579.33 7173.67 6587.93 C 7193.74 6596.53 7206.64 6602.26 7212.37 6608 C 7212.37 6609.43 7213.8 6608 7213.8 6608 C 7216.67 6608 7219.53 6605.13 7220.97 6608 C 7226.7 6618.03 7218.1 6618.03 7231 6623.76 C 7235.3 6619.46 7245.33 6619.46 7246.76 6613.73 C 7253.93 6595.1 7192.3 6570.73 7186.57 6560.7 C 7180.84 6552.1 7185.14 6539.21 7179.41 6530.61 C 7175.11 6524.87 7165.07 6526.31 7157.91 6523.44 C 7127.81 6504.81 7109.18 6470.41 7083.38 6448.92 C 7074.78 6443.18 7041.82 6410.22 7031.79 6405.92 C 7027.49 6404.49 7021.76 6410.22 7017.46 6407.35 C 7010.29 6400.19 7027.49 6384.42 7027.49 6381.56 C 7026.06 6375.82 7018.89 6374.39 7014.59 6370.09 C 7003.13 6352.89 6998.83 6329.96 6983.06 6315.63 C 6977.33 6308.47 6965.86 6308.47 6958.7 6302.73 C 6952.97 6298.43 6942.93 6215.31 6974.46 6216.74 C 6988.79 6216.74 7013.16 6248.27 7026.06 6255.44 L 7037.52 6254.01 L 7026.06 6255.44 C 7043.25 6254.01 7040.39 6226.77 7048.99 6215.31 C 7064.75 6196.68 7071.92 6219.61 7091.98 6215.31 C 7097.72 6213.88 7097.72 6202.41 7103.45 6198.11 C 7103.45 6198.11 7112.05 6206.71 7136.41 6213.88 C 7139.28 6215.31 7143.58 6216.74 7147.88 6215.31 C 7150.74 6215.31 7152.18 6209.58 7156.48 6208.14 C 7173.67 6206.71 7212.37 6228.21 7231 6225.34 C 7235.3 6225.34 7239.6 6222.48 7241.03 6218.18 C 7245.33 6215.31 7243.9 6205.28 7249.63 6205.28 C 7258.23 6203.84 7263.96 6212.44 7272.56 6215.31 C 7288.33 6219.61 7269.7 6208.14 7278.29 6205.28 C 7286.89 6202.41 7296.93 6202.41 7305.52 6205.28 C 7311.26 6206.71 7315.56 6215.31 7321.29 6215.31 C 7325.59 6215.31 7321.29 6205.28 7325.59 6205.28 C 7358.55 6206.71 7349.95 6242.54 7365.72 6245.41 C 7375.75 6246.84 7384.35 6243.97 7391.51 6241.11 " }
+ }
+ }
+ // PATH visit ba count: 150
+ DemoShape {
+ objectName: "ba"
+ ShapePath {
+ objectName: "svg_path:ba"
+ // boundingRect: 6952.52, 6198.11 537.243x503.041
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 7430.21 6546.37 C 7415.88 6536.34 7415.88 6526.31 7400.11 6527.74 L 7402.98 6523.44 L 7400.11 6527.74 C 7380.05 6550.67 7382.92 6583.63 7377.18 6590.8 C 7365.72 6605.13 7361.42 6583.63 7357.12 6605.13 C 7349.95 6646.69 7394.38 6648.13 7361.42 6679.66 L 7368.58 6678.22 L 7370.02 6701.15 C 7352.82 6659.59 7324.16 6673.92 7288.33 6648.13 C 7279.73 6640.96 7276.86 6628.06 7266.83 6625.19 C 7259.66 6622.33 7251.06 6630.93 7242.47 6630.93 C 7238.17 6630.93 7228.13 6629.49 7229.57 6625.19 C 7232.43 6619.46 7245.33 6620.9 7246.76 6613.73 C 7253.93 6595.1 7192.3 6570.73 7186.57 6560.7 C 7180.84 6552.1 7185.14 6539.21 7179.41 6530.61 C 7175.11 6524.87 7165.07 6526.31 7157.91 6523.44 C 7127.81 6504.81 7109.18 6470.41 7083.38 6448.92 C 7074.78 6443.18 7041.82 6410.22 7031.79 6405.92 C 7027.49 6404.49 7021.76 6410.22 7017.46 6407.35 C 7010.29 6400.19 7027.49 6384.42 7027.49 6381.56 C 7026.06 6375.82 7018.89 6374.39 7014.59 6370.09 C 7003.13 6352.89 6998.83 6329.96 6983.06 6315.63 C 6977.33 6308.47 6965.86 6308.47 6958.7 6302.73 C 6952.97 6298.43 6942.93 6215.31 6974.46 6216.74 C 6988.79 6216.74 7013.16 6248.27 7026.06 6255.44 L 7037.52 6254.01 L 7026.06 6255.44 C 7043.25 6254.01 7040.39 6226.77 7048.99 6215.31 C 7064.75 6196.68 7071.92 6219.61 7091.98 6215.31 C 7097.72 6213.88 7097.72 6202.41 7103.45 6198.11 C 7103.45 6198.11 7112.05 6206.71 7136.41 6213.88 C 7139.28 6215.31 7143.58 6216.74 7147.88 6215.31 C 7150.74 6215.31 7152.18 6209.58 7156.48 6208.14 C 7173.67 6206.71 7212.37 6228.21 7231 6225.34 C 7235.3 6225.34 7239.6 6222.48 7241.03 6218.18 C 7245.33 6215.31 7243.9 6205.28 7249.63 6205.28 C 7258.23 6203.84 7263.96 6212.44 7272.56 6215.31 C 7288.33 6219.61 7269.7 6208.14 7278.29 6205.28 C 7286.89 6202.41 7296.93 6202.41 7305.52 6205.28 C 7311.26 6206.71 7315.56 6215.31 7321.29 6215.31 C 7325.59 6215.31 7321.29 6205.28 7325.59 6205.28 C 7358.55 6206.71 7349.95 6242.54 7365.72 6245.41 C 7392.95 6248.27 7407.28 6228.21 7433.08 6229.64 C 7433.08 6274.07 7407.28 6304.17 7411.58 6331.4 C 7417.31 6362.93 7425.91 6340 7445.97 6348.59 C 7458.87 6354.33 7461.74 6372.96 7474.64 6380.12 C 7478.94 6381.56 7493.27 6377.26 7488.97 6390.16 C 7480.37 6418.82 7444.54 6387.29 7437.38 6397.32 C 7437.38 6397.32 7501.87 6457.51 7484.67 6476.15 C 7478.94 6480.45 7471.77 6466.11 7464.61 6468.98 C 7456.01 6471.85 7454.57 6483.31 7448.84 6490.48 C 7438.81 6493.34 7411.58 6487.61 7410.15 6494.78 C 7405.85 6514.84 7441.67 6516.27 7430.21 6546.37 L 7424.48 6546.37 L 7430.21 6546.37 " }
+ }
+ }
+ // PATH visit me count: 95
+ DemoShape {
+ objectName: "me"
+ ShapePath {
+ objectName: "svg_path:me"
+ // boundingRect: 7357.01, 6465.39 262.356x329.8
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 7364.97 6687.77 L 7367.84 6697.8 C 7375.01 6699.23 7380.74 6699.23 7387.9 6699.23 C 7385.04 6702.09 7382.17 6704.96 7383.61 6709.26 C 7403.67 6753.66 7407.97 6712.12 7428.03 6722.15 C 7432.33 6725.01 7429.47 6730.74 7432.33 6735.04 C 7443.8 6749.36 7458.13 6746.49 7468.16 6762.25 C 7471.03 6766.55 7468.16 6775.14 7472.46 6779.44 C 7481.06 6788.03 7492.53 6792.33 7503.99 6795.19 C 7503.99 6785.17 7503.99 6775.14 7503.99 6766.55 C 7503.99 6760.82 7506.86 6753.66 7503.99 6747.93 C 7499.69 6740.77 7486.79 6740.77 7485.36 6733.6 C 7485.36 6732.17 7531.22 6639.08 7535.52 6636.21 C 7536.95 6634.78 7544.12 6670.59 7555.59 6672.02 C 7555.59 6672.02 7588.55 6646.95 7588.55 6646.95 C 7585.54 6631.87 7588.54 6632.67 7583.46 6618.14 C 7580.05 6608.4 7591.54 6613.99 7599.36 6607.55 C 7602.79 6604.72 7601.08 6600.33 7596.56 6595.16 C 7591.96 6589.89 7626.09 6589.56 7618.17 6583.5 C 7602.45 6571.48 7583.24 6550.99 7567.94 6543.88 C 7558.06 6539.29 7570.45 6519.73 7560.82 6510.26 C 7542.78 6492.52 7499.02 6481.72 7485.36 6472.93 C 7479.63 6477.23 7472.46 6462.91 7465.3 6465.77 C 7456.7 6468.64 7455.26 6480.1 7449.53 6487.26 C 7439.5 6490.12 7412.27 6484.39 7410.84 6491.55 C 7406.54 6511.61 7442.36 6513.04 7430.9 6543.11 L 7425.17 6543.11 L 7430.9 6543.11 C 7416.57 6533.09 7416.57 6523.06 7400.8 6524.5 L 7403.67 6520.2 L 7400.8 6524.5 C 7380.74 6547.41 7383.61 6580.35 7377.87 6587.51 C 7366.41 6601.84 7362.11 6580.35 7357.81 6601.84 C 7350.64 6643.37 7395.07 6644.8 7362.11 6676.31 L 7369.27 6674.88 L 7370.71 6697.8 C 7369.27 6693.5 7367.84 6690.64 7364.97 6687.77 " }
+ }
+ }
+ // PATH visit rs count: 210
+ DemoShape {
+ objectName: "rs"
+ ShapePath {
+ objectName: "svg_path:rs"
+ // boundingRect: 7329.87, 5973.8 653.296x724.318
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 7686.47 6519.21 C 7710.27 6519.21 7743.85 6594.24 7757.24 6601.67 C 7761.71 6604.65 7793.42 6622.31 7799.37 6623.8 C 7809.79 6626.77 7800.22 6642.13 7807.66 6649.57 C 7827 6670.39 7807.61 6669.72 7803.14 6690.54 C 7803.14 6690.54 7802.46 6680.35 7802.46 6680.35 L 7798.59 6688.08 C 7835.79 6713.35 7799.84 6683.67 7808.77 6677.72 C 7825.14 6667.31 7792.71 6681.11 7812.05 6679.62 C 7819.49 6679.62 7806.4 6677.77 7809.37 6670.34 C 7810.86 6664.39 7800.51 6689.04 7802 6684.58 C 7815.39 6651.86 7783.7 6698.19 7811.97 6693.73 C 7835.77 6689.27 7899.74 6648.87 7919.08 6666.72 C 7926.52 6653.34 7947.35 6650.36 7939.91 6631.03 C 7938.42 6625.08 7933.96 6622.11 7929.49 6619.14 C 7926.52 6617.65 7922.05 6620.62 7920.57 6617.65 C 7919.08 6610.21 7920.57 6602.78 7920.57 6595.34 C 7919.08 6586.42 7908.66 6577.5 7913.13 6570.07 C 7956.28 6498.69 7907.18 6586.42 7954.79 6549.25 C 7959.25 6544.79 7990.5 6489.77 7981.57 6480.85 C 7969.67 6471.93 7913.13 6445.16 7910.15 6442.19 C 7892.3 6427.32 7864.03 6364.87 7874.44 6342.56 C 7878.91 6332.16 7895.27 6333.64 7901.22 6324.72 C 7905.69 6314.31 7899.74 6300.93 7904.2 6290.52 C 7883.37 6281.6 7864.03 6268.22 7867 6247.4 C 7868.49 6234.02 7917.59 6232.53 7902.71 6225.1 C 7745 6146.29 7886.35 6217.66 7822.37 6254.83 C 7811.95 6262.27 7806 6235.5 7795.58 6231.04 C 7788.14 6226.58 7777.73 6231.04 7770.29 6231.04 C 7761.36 6231.04 7752.43 6235.5 7743.51 6232.53 C 7739.04 6229.56 7742.02 6222.12 7739.04 6216.17 C 7731.6 6201.3 7667.62 6225.1 7703.33 6199.82 C 7712.26 6193.87 7734.58 6187.92 7727.14 6181.97 C 7719.7 6177.51 7704.82 6181.97 7701.85 6173.05 C 7700.36 6164.13 7731.6 6147.77 7710.77 6135.88 C 7682.5 6119.52 7625.96 6126.96 7606.62 6092.76 C 7602.16 6085.32 7602.16 6049.64 7602.16 6040.71 C 7602.16 6039.23 7602.16 6037.74 7602.16 6037.74 C 7597.69 6039.23 7594.72 6048.15 7591.74 6045.17 C 7581.33 6039.23 7579.84 6022.87 7570.91 6015.44 C 7561.98 6009.49 7548.59 6010.98 7539.67 6003.54 C 7530.74 5999.08 7526.27 5988.67 7520.32 5981.24 C 7512.88 5981.24 7505.44 5973.8 7498 5973.8 C 7496.52 5973.8 7457.83 5985.7 7456.34 5985.7 C 7431.05 5984.21 7459.32 5961.91 7425.1 5984.21 C 7408.73 5993.13 7399.8 6010.98 7386.41 6021.38 C 7373.02 6031.79 7367.07 6016.92 7362.6 6021.38 C 7343.26 6043.69 7341.77 6045.17 7329.87 6045.17 L 7331.36 6048.15 C 7356.65 6083.84 7350.7 6074.91 7347.73 6109.11 C 7347.73 6123.98 7378.97 6104.65 7377.48 6121.01 C 7376 6129.93 7365.58 6121.01 7364.09 6122.5 C 7355.17 6131.42 7370.04 6134.39 7370.04 6138.85 C 7370.04 6140.34 7356.65 6143.31 7364.09 6149.26 C 7381.95 6161.16 7405.75 6167.1 7426.58 6167.1 C 7431.05 6196.84 7393.85 6167.1 7392.36 6174.54 C 7390.88 6193.87 7377.48 6201.3 7396.83 6220.63 C 7398.31 6222.12 7398.31 6225.1 7396.83 6226.58 C 7390.88 6236.99 7368.56 6229.56 7381.95 6244.43 C 7396.83 6239.96 7408.73 6231.04 7425.1 6232.53 C 7425.1 6278.63 7398.31 6309.85 7402.78 6338.1 C 7408.73 6370.82 7417.66 6347.02 7438.49 6355.95 C 7451.88 6361.89 7454.85 6381.22 7468.25 6388.66 C 7472.71 6390.15 7487.59 6385.69 7483.13 6399.07 C 7474.2 6428.81 7437 6396.09 7429.56 6406.5 C 7429.56 6406.5 7496.52 6468.95 7478.66 6488.28 C 7513.64 6506.5 7496.1 6499.47 7550.63 6522.44 C 7569.16 6528.4 7551.87 6560.03 7568.26 6566.54 C 7594.22 6576.84 7585.73 6586.82 7603.45 6596.18 C 7619.99 6604.9 7586.21 6581.29 7596.56 6588.65 C 7613.68 6600.84 7622.04 6574.55 7619 6582.51 C 7640.91 6586.18 7688.39 6511.04 7686.47 6519.21 " }
+ }
+ }
+ // PATH visit rs-km count: 77
+ DemoShape {
+ objectName: "rs-km"
+ ShapePath {
+ objectName: "svg_path:rs-km"
+ // boundingRect: 7585.83, 6524.48 229.594x247.068
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 7673.25 6767.22 C 7673.25 6767.22 7679.97 6731.22 7667.49 6711.54 C 7655 6691.86 7618.04 6686.58 7618.04 6686.58 L 7601.24 6653.93 L 7589.72 6642.41 C 7589.72 6642.41 7582.04 6612.65 7588.28 6613.61 C 7591.4 6614.09 7596.27 6613.15 7599.01 6609.48 C 7601.74 6605.81 7603.51 6599.41 7612.11 6593.65 C 7619.29 6588.84 7636.24 6580.56 7639.48 6577.69 C 7647.63 6570.47 7659.58 6559.6 7659.58 6559.6 C 7659.58 6559.6 7684.51 6528.38 7687.01 6525.43 C 7693.08 6518.26 7715.44 6553.98 7718.92 6555.67 C 7726.84 6559.51 7749.14 6604.1 7752.98 6605.06 C 7756.82 6606.02 7796.14 6627.05 7799.02 6628.01 C 7801.9 6628.97 7805.74 6637.61 7802.86 6640.49 C 7799.98 6643.37 7816.78 6658.25 7815.34 6661.61 C 7813.9 6664.97 7814.38 6676.01 7811.02 6678.41 C 7807.66 6680.81 7815.76 6695.1 7811.92 6696.06 C 7808.08 6697.02 7797.1 6688.5 7797.1 6688.5 L 7793.92 6681.24 C 7793.92 6681.24 7788.46 6675.05 7780.3 6680.33 C 7772.14 6685.62 7763.02 6700.5 7765.42 6703.86 C 7767.82 6707.22 7773.58 6710.1 7771.66 6712.5 C 7769.74 6714.9 7763.5 6703.38 7751.01 6702.42 C 7738.53 6701.46 7708.77 6715.38 7706.37 6718.74 C 7703.97 6722.1 7700.13 6724.98 7698.69 6726.9 C 7697.25 6728.82 7695.33 6748.5 7695.33 6752.34 C 7695.33 6756.18 7691.01 6771.54 7691.01 6771.54 L 7673.25 6767.22 " }
+ }
+ }
+ // PATH visit mk count: 74
+ DemoShape {
+ objectName: "mk"
+ ShapePath {
+ objectName: "svg_path:mk"
+ // boundingRect: 7665.12, 6644.19 351.987x307.82
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 7669.54 6768.51 C 7668.11 6778.54 7666.68 6788.58 7668.11 6797.18 C 7668.11 6807.21 7676.71 6815.81 7676.71 6824.41 C 7675.28 6828.71 7663.81 6828.71 7665.24 6833 C 7666.68 6843.04 7681.01 6848.77 7682.44 6858.8 C 7683.88 6863.1 7675.28 6867.4 7675.28 6871.7 C 7675.28 6883.17 7712.54 6936.19 7718.27 6944.79 C 7726.87 6954.82 7732.6 6939.06 7736.9 6939.06 C 7742.64 6937.63 7749.8 6939.06 7754.1 6941.93 C 7756.97 6944.79 7752.67 6951.96 7755.53 6951.96 C 7765.57 6953.39 7861.59 6923.29 7867.32 6918.99 C 7883.09 6901.8 7871.62 6878.87 7900.28 6868.83 C 7910.32 6864.53 7966.21 6871.7 7974.81 6865.97 C 7979.11 6863.1 7977.68 6854.5 7981.97 6851.64 C 7984.84 6850.2 7989.14 6858.8 7992.01 6855.94 C 8009.71 6803.88 8022.37 6809.24 8014.94 6734.12 C 8004.91 6724.08 7989.14 6695.42 7976.24 6686.82 C 7969.08 6682.52 7959.04 6686.82 7950.44 6682.52 C 7947.58 6681.09 7908.88 6650.99 7908.88 6648.13 C 7890.25 6630.93 7844.39 6675.36 7821.46 6679.66 C 7794.23 6683.96 7776.33 6672.35 7763.43 6703.88 C 7761.99 6708.18 7774.17 6706.89 7772.73 6712.62 C 7769.87 6719.78 7756.97 6702.59 7749.8 6702.59 C 7731.17 6704.02 7713.97 6716.92 7698.21 6726.95 C 7689.61 6732.68 7709.67 6792.88 7673.84 6768.51 L 7669.54 6768.51 " }
+ }
+ }
+ // PATH visit al count: 145
+ DemoShape {
+ objectName: "al"
+ ShapePath {
+ objectName: "svg_path:al"
+ // boundingRect: 7484.67, 6639.48 287.237x551.811
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 7755.54 6951.96 C 7755.54 6970.59 7775.6 6976.32 7771.3 6993.52 C 7756.97 7047.98 7748.37 7000.68 7738.34 7039.38 C 7738.34 7039.38 7729.74 7096.71 7729.74 7098.14 C 7726.88 7102.44 7682.45 7116.77 7681.01 7126.8 C 7681.01 7126.8 7699.64 7155.47 7699.64 7155.47 C 7703.94 7168.36 7683.88 7155.47 7683.88 7164.07 C 7685.31 7201.33 7669.55 7181.26 7645.18 7185.56 C 7643.75 7185.56 7646.62 7187 7645.18 7188.43 C 7643.75 7189.86 7643.75 7189.86 7642.32 7191.3 C 7640.89 7189.86 7640.89 7188.43 7639.45 7185.56 C 7639.45 7182.7 7639.45 7179.83 7639.45 7176.96 C 7639.45 7168.36 7643.75 7161.2 7640.89 7154.03 C 7638.02 7149.73 7629.42 7154.03 7626.55 7149.73 C 7619.39 7144 7620.82 7132.54 7615.09 7126.8 C 7605.06 7113.9 7513.33 7089.54 7523.37 7066.61 C 7527.67 7056.58 7547.73 7068.04 7552.03 7059.44 C 7553.46 7056.58 7524.8 7037.95 7520.5 7022.18 C 7519.07 7017.88 7526.23 7016.45 7526.23 7012.15 C 7527.67 7006.42 7526.23 6999.25 7527.67 6993.52 C 7527.67 6986.35 7523.37 6979.19 7527.67 6974.89 C 7530.53 6969.15 7542 6973.45 7546.3 6969.15 C 7549.16 6964.86 7546.3 6953.39 7542 6953.39 C 7536.26 6954.82 7540.56 6966.29 7536.26 6970.59 C 7527.67 6977.75 7536.26 6921.86 7537.7 6907.53 C 7540.56 6890.33 7516.2 6898.93 7516.2 6881.73 C 7516.2 6868.83 7514.77 6855.93 7521.93 6845.9 C 7526.23 6840.17 7539.13 6845.9 7544.86 6840.17 C 7547.73 6837.3 7537.7 6835.87 7536.26 6831.57 C 7534.83 6821.54 7544.86 6807.21 7537.7 6800.04 C 7529.1 6791.44 7514.77 6801.47 7503.3 6798.61 C 7503.3 6788.58 7503.3 6778.54 7503.3 6769.94 C 7503.3 6764.21 7506.17 6757.05 7503.3 6751.31 C 7499 6744.15 7486.1 6744.15 7484.67 6736.98 C 7484.67 6735.55 7530.53 6642.39 7534.83 6639.53 C 7536.26 6638.09 7543.43 6673.92 7554.9 6675.36 C 7554.9 6675.36 7584.99 6650.99 7584.99 6650.99 C 7607.92 6650.99 7603.62 6686.82 7616.52 6693.99 C 7620.82 6696.85 7625.12 6691.12 7630.85 6692.55 C 7640.89 6695.42 7650.92 6699.72 7658.08 6706.89 C 7685.31 6736.98 7665.25 6767.08 7668.12 6797.18 C 7668.12 6807.21 7676.71 6815.81 7676.71 6824.41 C 7675.28 6828.7 7663.82 6828.7 7665.25 6833 C 7666.68 6843.04 7681.01 6848.77 7682.45 6858.8 C 7683.88 6863.1 7675.28 6867.4 7675.28 6871.7 C 7675.28 6883.16 7712.54 6936.19 7718.28 6944.79 C 7726.88 6954.82 7732.61 6939.06 7736.91 6939.06 C 7742.64 6937.63 7749.81 6939.06 7754.11 6941.92 C 7756.97 6944.79 7752.67 6951.96 7755.54 6951.96 " }
+ }
+ }
+ // PATH visit is count: 553
+ DemoShape {
+ objectName: "is"
+ ShapePath {
+ objectName: "svg_path:is"
+ // boundingRect: 3559.94, 1656.42 811.066x675.17
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 3676.75 2152.28 C 3672.45 2150.85 3580.73 2106.42 3576.43 2103.56 C 3570.69 2099.26 3589.33 2093.53 3593.63 2087.79 C 3597.92 2080.63 3593.63 2059.13 3600.79 2062 C 3612.26 2066.3 3605.09 2084.93 3612.26 2093.53 C 3613.69 2096.39 3615.12 2086.36 3619.42 2086.36 C 3630.89 2084.93 3643.79 2094.96 3653.82 2090.66 C 3698.25 2073.46 3639.49 2057.7 3693.95 2053.4 C 3703.98 2053.4 3714.01 2060.56 3724.04 2062 C 3731.21 2063.43 3712.58 2051.96 3706.85 2049.1 C 3703.98 2049.1 3701.11 2049.1 3698.25 2049.1 C 3686.78 2047.66 3675.32 2050.53 3665.28 2046.23 C 3658.12 2041.93 3682.48 2049.1 3688.21 2043.36 C 3691.08 2040.5 3676.75 2039.06 3678.18 2034.77 C 3678.18 2027.6 3683.91 2021.87 3691.08 2019 C 3695.38 2017.57 3702.55 2021.87 3708.28 2021.87 C 3718.31 2020.43 3729.78 2019 3738.37 2011.83 C 3742.67 2008.97 3726.91 2010.4 3722.61 2007.54 C 3718.31 2006.1 3682.48 2023.3 3672.45 2021.87 C 3665.28 2020.43 3676.75 2006.1 3678.18 1998.94 C 3678.18 1990.34 3672.45 1983.17 3673.88 1974.57 C 3675.32 1965.97 3691.08 1960.24 3688.21 1950.21 C 3686.78 1944.48 3673.88 1953.08 3668.15 1950.21 C 3663.85 1948.78 3665.28 1937.31 3660.98 1940.18 C 3659.55 1941.61 3665.28 1948.78 3662.42 1947.34 C 3650.95 1941.61 3639.49 1922.98 3629.45 1915.81 C 3628.02 1912.95 3623.72 1914.38 3620.86 1914.38 C 3617.99 1914.38 3615.12 1918.68 3613.69 1917.25 C 3610.82 1915.81 3612.26 1908.65 3607.96 1907.21 C 3602.22 1904.35 3523.4 1904.35 3580.73 1877.12 C 3596.49 1869.95 3593.63 1884.28 3607.96 1892.88 C 3620.86 1900.05 3640.92 1881.42 3653.82 1888.58 C 3659.55 1891.45 3643.79 1902.91 3649.52 1907.21 C 3653.82 1911.51 3656.68 1898.61 3662.42 1897.18 C 3672.45 1894.32 3683.91 1888.58 3692.51 1894.32 C 3698.25 1900.05 3689.65 1911.51 3691.08 1918.68 C 3691.08 1922.98 3691.08 1911.51 3692.51 1910.08 C 3699.68 1901.48 3807.17 1971.71 3769.9 1910.08 C 3764.17 1901.48 3749.84 1917.25 3738.37 1915.81 C 3725.48 1914.38 3715.44 1898.61 3709.71 1887.15 C 3709.71 1887.15 3711.14 1885.72 3712.58 1884.28 C 3728.34 1872.82 3754.14 1869.95 3771.34 1868.52 C 3779.94 1868.52 3789.97 1877.12 3795.7 1869.95 C 3807.17 1859.92 3752.71 1864.22 3754.14 1848.45 C 3755.57 1838.42 3782.8 1842.72 3782.8 1831.26 C 3781.37 1763.9 3732.64 1838.42 3729.78 1825.52 C 3728.34 1816.92 3735.51 1808.33 3732.64 1801.16 C 3731.21 1798.29 3726.91 1806.89 3724.04 1806.89 C 3721.18 1806.89 3726.91 1799.73 3724.04 1799.73 C 3714.01 1802.59 3714.01 1819.79 3706.85 1801.16 C 3705.41 1799.73 3708.28 1793.99 3706.85 1793.99 C 3701.11 1798.29 3701.11 1808.33 3693.95 1809.76 C 3689.65 1809.76 3691.08 1799.73 3686.78 1798.29 C 3678.18 1795.43 3638.05 1815.49 3636.62 1792.56 C 3636.62 1788.26 3643.79 1788.26 3643.79 1783.96 C 3639.49 1771.06 3605.09 1772.5 3607.96 1758.16 C 3619.42 1697.97 3653.82 1783.96 3660.98 1779.66 C 3681.05 1766.76 3638.05 1725.2 3666.72 1725.2 C 3692.51 1723.77 3675.32 1821.22 3708.28 1776.8 C 3712.58 1771.06 3691.08 1763.9 3696.81 1759.6 C 3702.55 1752.43 3718.31 1768.2 3725.48 1761.03 C 3729.78 1753.86 3706.85 1761.03 3701.11 1755.3 C 3692.51 1746.7 3689.65 1733.8 3688.21 1722.34 C 3682.48 1673.61 3715.44 1766.76 3728.34 1752.43 C 3732.64 1748.13 3683.91 1709.44 3705.41 1699.4 C 3715.44 1695.11 3722.61 1722.34 3732.64 1718.04 C 3738.37 1713.74 3705.41 1667.87 3746.97 1682.21 C 3781.37 1695.11 3742.67 1755.3 3781.37 1779.66 C 3781.37 1781.1 3805.73 1769.63 3807.17 1740.97 C 3807.17 1735.23 3798.57 1738.1 3795.7 1733.8 C 3791.4 1729.5 3775.64 1702.27 3781.37 1693.67 C 3791.4 1682.21 3811.47 1703.7 3825.8 1710.87 C 3830.1 1712.3 3812.9 1708 3812.9 1703.7 C 3811.47 1699.4 3820.07 1700.84 3822.93 1699.4 C 3824.36 1697.97 3824.36 1695.11 3822.93 1695.11 C 3804.3 1696.54 3805.73 1725.2 3784.24 1677.91 C 3765.61 1636.35 3805.73 1667.87 3807.17 1667.87 C 3807.17 1667.87 3808.6 1666.44 3808.6 1665.01 C 3808.6 1662.14 3805.73 1656.41 3808.6 1657.84 C 3812.9 1662.14 3812.9 1670.74 3818.63 1675.04 C 3824.36 1679.34 3834.4 1677.91 3840.13 1682.21 C 3854.46 1693.67 3832.96 1708 3834.4 1715.17 C 3834.4 1718.04 3841.56 1715.17 3844.43 1716.6 C 3845.86 1718.04 3855.89 1726.63 3853.03 1732.37 C 3850.16 1733.8 3843 1732.37 3844.43 1735.23 C 3847.3 1740.97 3858.76 1739.53 3858.76 1746.7 C 3860.19 1756.73 3845.86 1766.76 3848.73 1776.8 C 3851.59 1785.39 3873.09 1779.66 3871.66 1788.26 C 3871.66 1796.86 3850.16 1782.53 3847.3 1789.69 C 3845.86 1796.86 3911.79 1825.52 3845.86 1835.56 C 3834.4 1838.42 3830.1 1818.36 3818.63 1814.06 C 3814.33 1812.62 3820.07 1822.66 3822.93 1826.96 C 3825.8 1838.42 3838.7 1848.45 3835.83 1858.49 C 3832.96 1869.95 3811.47 1869.95 3810.03 1881.42 C 3807.17 1888.58 3827.23 1884.28 3828.66 1891.45 C 3831.53 1898.61 3820.07 1905.78 3817.2 1912.95 C 3814.33 1921.55 3804.3 1938.74 3812.9 1940.18 C 3843 1945.91 3841.56 1885.72 3860.19 1875.68 C 3918.95 1844.15 3878.83 1884.28 3877.39 1890.02 C 3868.79 1925.84 3911.79 1887.15 3914.65 1884.28 C 3933.29 1864.22 3926.12 1806.89 3940.45 1808.33 C 3990.61 1812.62 3946.18 1875.68 3974.85 1898.61 C 3997.78 1918.68 3984.88 1872.82 3990.61 1861.35 C 3992.05 1854.19 3997.78 1845.59 4004.94 1842.72 C 4009.24 1841.29 4014.98 1844.15 4020.71 1847.02 C 4022.14 1848.45 4022.14 1852.75 4023.57 1852.75 C 4035.04 1849.89 4046.51 1834.12 4056.54 1839.85 C 4066.57 1844.15 4065.14 1859.92 4066.57 1871.38 C 4066.57 1878.55 4057.97 1882.85 4059.4 1890.02 C 4066.57 1925.84 4083.77 1864.22 4073.74 1917.25 C 4069.44 1947.34 4059.4 1931.58 4066.57 1958.81 C 4078.04 2007.54 4078.04 1865.65 4092.37 1862.79 C 4129.63 1852.75 4121.03 1914.38 4123.9 1928.71 C 4123.9 1931.58 4123.9 1921.55 4126.76 1920.11 C 4128.2 1918.68 4133.93 1920.11 4132.5 1918.68 C 4123.9 1900.05 4135.36 1927.28 4135.36 1927.28 C 4136.79 1927.28 4136.79 1922.98 4138.23 1921.55 C 4145.39 1910.08 4159.73 1890.02 4175.49 1888.58 C 4191.26 1887.15 4189.82 1920.11 4202.72 1928.71 C 4208.45 1931.58 4199.85 1915.81 4204.15 1911.51 C 4212.75 1901.48 4218.49 1924.41 4218.49 1924.41 C 4219.92 1927.28 4217.05 1917.25 4218.49 1914.38 C 4221.35 1910.08 4228.52 1907.21 4229.95 1901.48 C 4232.82 1895.75 4229.95 1888.58 4229.95 1881.42 C 4231.38 1872.82 4229.95 1861.35 4237.12 1857.05 C 4247.15 1852.75 4257.18 1859.92 4267.21 1862.79 C 4293.01 1868.52 4271.51 1879.98 4274.38 1890.02 C 4277.25 1895.75 4285.84 1894.32 4288.71 1898.61 C 4298.74 1920.11 4245.72 1925.84 4293.01 1951.64 C 4298.74 1954.51 4298.74 1938.74 4304.48 1935.88 C 4310.21 1933.01 4317.37 1938.74 4323.11 1935.88 C 4336.01 1931.58 4350.34 1900.05 4368.97 1934.44 C 4371.83 1940.18 4356.07 1937.31 4348.9 1938.74 C 4327.41 1943.04 4318.81 1940.18 4304.48 1963.11 C 4303.04 1965.97 4311.64 1965.97 4311.64 1968.84 C 4313.07 1973.14 4304.48 1976.01 4307.34 1977.44 C 4314.51 1983.17 4327.41 1978.87 4334.57 1984.6 C 4357.5 2001.8 4303.04 2033.33 4300.18 2036.2 C 4297.31 2037.63 4305.91 2031.9 4310.21 2033.33 C 4320.24 2036.2 4330.27 2043.36 4338.87 2050.53 C 4340.3 2051.96 4331.71 2051.96 4331.71 2054.83 C 4331.71 2059.13 4338.87 2063.43 4338.87 2067.73 C 4338.87 2070.59 4333.14 2066.3 4331.71 2067.73 C 4321.67 2073.46 4294.44 2084.93 4304.48 2089.23 C 4317.37 2093.53 4328.84 2062 4338.87 2070.59 C 4343.17 2076.33 4347.47 2082.06 4353.2 2086.36 C 4356.07 2089.23 4361.8 2083.49 4363.24 2087.79 C 4370.4 2100.69 4377.57 2125.05 4360.37 2136.52 C 4351.77 2142.25 4338.87 2140.82 4330.27 2145.12 C 4325.97 2147.99 4320.24 2153.72 4323.11 2156.58 C 4327.41 2160.88 4401.93 2169.48 4343.17 2203.88 C 4330.27 2211.04 4297.31 2180.95 4297.31 2179.52 C 4287.28 2166.62 4343.17 2202.45 4328.84 2215.34 C 4321.67 2221.08 4310.21 2201.01 4303.04 2206.75 C 4297.31 2211.04 4317.37 2215.34 4320.24 2222.51 C 4321.67 2225.38 4314.51 2228.24 4311.64 2229.68 C 4298.74 2235.41 4281.54 2251.17 4271.51 2241.14 C 4264.35 2233.98 4265.78 2205.31 4258.61 2212.48 C 4251.45 2221.08 4274.38 2233.98 4268.65 2244.01 C 4264.35 2252.61 4245.72 2242.57 4238.55 2249.74 C 4229.95 2256.91 4235.68 2274.1 4228.52 2282.7 C 4225.65 2287 4217.05 2278.4 4212.75 2279.84 C 4202.72 2282.7 4196.99 2295.6 4186.96 2297.03 C 4178.36 2298.47 4182.66 2261.21 4159.73 2255.47 C 4152.56 2254.04 4161.16 2271.24 4156.86 2278.4 C 4155.43 2281.27 4149.69 2275.54 4146.83 2278.4 C 4145.39 2278.4 4152.56 2282.7 4151.13 2282.7 C 4112.43 2289.87 4133.93 2279.84 4098.1 2285.57 C 4079.47 2288.44 4063.7 2304.2 4045.07 2311.37 C 4042.21 2312.8 4036.47 2314.23 4033.61 2312.8 C 4023.57 2308.5 4020.71 2292.74 4010.68 2292.74 C 4002.08 2294.17 4004.94 2312.8 3997.78 2315.67 C 3992.05 2317.1 3990.61 2305.63 3984.88 2302.77 C 3976.28 2299.9 3944.75 2298.47 3933.29 2294.17 C 3913.22 2288.44 3911.79 2322.83 3907.49 2327.13 C 3897.46 2335.73 3844.43 2330 3834.4 2325.7 C 3808.6 2317.1 3787.1 2275.54 3774.2 2262.64 C 3755.57 2246.87 3739.81 2259.77 3729.78 2231.11 C 3728.34 2223.94 3721.18 2215.34 3724.04 2208.18 C 3726.91 2198.15 3754.14 2193.85 3745.54 2189.55 C 3736.94 2185.25 3729.78 2212.48 3722.61 2206.75 C 3714.01 2199.58 3732.64 2183.81 3726.91 2173.78 C 3724.04 2168.05 3716.88 2186.68 3711.14 2183.81 C 3701.11 2178.08 3701.11 2163.75 3692.51 2156.58 C 3688.21 2152.29 3682.48 2153.72 3676.75 2152.28 " }
+ }
+ }
+ // PATH visit by count: 321
+ DemoShape {
+ objectName: "by"
+ ShapePath {
+ objectName: "svg_path:by"
+ // boundingRect: 7670.98, 3935.51 1022.16x977.052
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 7768.44 4911.13 C 7785.63 4906.83 7751.24 4893.93 7774.17 4886.77 C 7781.34 4883.9 7791.37 4883.9 7799.97 4885.33 C 7802.83 4885.33 7802.83 4892.5 7807.13 4893.93 C 7821.46 4898.23 7841.53 4830.87 7847.26 4826.57 C 7858.73 4820.84 7873.06 4823.71 7884.52 4819.41 C 7901.72 4812.24 7914.62 4797.91 7933.25 4792.18 C 7940.42 4790.74 7947.58 4793.61 7954.75 4793.61 C 7961.91 4793.61 7969.08 4793.61 7976.25 4793.61 C 7997.74 4790.74 8017.81 4777.84 8037.87 4779.28 C 8042.17 4779.28 8043.6 4785.01 8047.9 4786.44 C 8083.73 4790.74 8128.16 4786.44 8161.12 4777.84 C 8176.89 4773.55 8165.42 4787.88 8174.02 4795.04 C 8176.89 4796.48 8182.62 4789.31 8185.49 4792.18 C 8188.35 4795.04 8179.76 4803.64 8184.05 4805.07 C 8219.88 4819.41 8194.09 4796.48 8211.29 4792.18 C 8268.61 4776.41 8217.02 4800.78 8235.65 4810.81 C 8238.52 4813.67 8242.81 4817.97 8244.25 4815.11 C 8251.41 4810.81 8244.25 4785.01 8251.41 4785.01 C 8258.58 4783.58 8271.48 4796.48 8280.08 4786.44 C 8285.81 4780.71 8285.81 4759.21 8294.41 4763.51 C 8307.31 4772.11 8275.78 4785.01 8311.61 4785.01 C 8324.51 4785.01 8317.34 4756.35 8337.4 4770.68 C 8374.67 4796.48 8330.24 4787.88 8360.33 4795.04 C 8368.93 4796.48 8357.47 4774.98 8363.2 4767.81 C 8371.8 4756.35 8384.7 4736.28 8396.16 4742.02 C 8407.63 4747.75 8419.09 4787.88 8430.56 4785.01 C 8450.62 4779.28 8437.73 4754.91 8460.66 4749.18 C 8469.25 4747.75 8476.42 4757.78 8483.59 4756.35 C 8530.88 4747.75 8452.06 4731.98 8517.98 4736.28 C 8550.95 4739.15 8533.75 4774.98 8571.01 4766.38 C 8606.84 4759.21 8549.51 4720.52 8549.51 4704.75 C 8549.51 4693.29 8552.38 4666.06 8553.81 4656.03 C 8560.98 4615.9 8571.01 4601.57 8576.74 4600.13 C 8586.77 4597.27 8598.24 4601.57 8606.84 4597.27 C 8612.57 4594.4 8609.71 4584.37 8615.44 4581.5 C 8628.34 4572.9 8646.97 4574.34 8662.73 4570.04 C 8658.43 4567.17 8661.3 4561.44 8658.43 4557.14 C 8658.43 4557.14 8628.34 4538.51 8628.34 4537.07 C 8626.9 4534.21 8632.64 4529.91 8631.2 4527.04 C 8626.9 4517.01 8616.87 4511.28 8615.44 4502.68 C 8614 4498.38 8622.6 4496.94 8622.6 4492.64 C 8619.74 4482.61 8599.67 4482.61 8598.24 4471.15 C 8596.81 4466.85 8605.41 4465.41 8606.84 4461.11 C 8611.14 4443.92 8559.54 4433.88 8555.24 4422.42 C 8549.51 4410.95 8559.54 4396.62 8558.11 4383.72 C 8558.11 4360.79 8626.9 4390.89 8645.53 4379.42 C 8658.43 4372.26 8672.76 4345.03 8671.33 4330.7 C 8671.33 4329.26 8665.6 4330.7 8667.03 4329.26 C 8674.2 4322.1 8687.1 4319.23 8691.4 4310.63 C 8695.7 4304.9 8691.4 4292 8685.66 4289.13 C 8661.3 4280.54 8658.43 4290.57 8645.53 4276.24 C 8641.23 4270.5 8655.57 4250.44 8639.8 4251.87 C 8622.6 4253.31 8614 4247.57 8589.64 4254.74 C 8581.04 4257.61 8572.44 4266.2 8563.84 4263.34 C 8556.68 4260.47 8569.58 4220.34 8556.68 4211.74 C 8552.38 4208.88 8507.95 4208.88 8493.62 4198.85 C 8470.69 4184.51 8485.02 4170.18 8452.06 4160.15 C 8446.32 4157.28 8460.66 4132.92 8454.92 4131.49 C 8434.86 4131.49 8427.69 4130.05 8404.76 4114.29 C 8394.73 4108.56 8413.36 4078.46 8410.5 4072.73 C 8401.9 4059.83 8421.96 4069.86 8416.23 4061.26 C 8411.93 4054.1 8377.53 4026.87 8378.97 4019.7 C 8384.7 3999.64 8387.56 3985.3 8376.1 3965.24 C 8373.23 3959.51 8364.63 3970.97 8358.9 3970.97 C 8357.47 3970.97 8311.61 3942.31 8311.61 3942.31 C 8275.78 3927.98 8301.57 3939.44 8281.51 3948.04 C 8278.64 3949.47 8261.45 3946.61 8257.15 3950.91 C 8249.98 3960.94 8238.52 3988.17 8227.05 3993.9 C 8204.12 4005.37 8205.55 3946.61 8205.55 3946.61 C 8161.12 3936.58 8169.72 3942.31 8139.63 3965.24 C 8132.46 3970.97 8126.73 3950.91 8119.56 3945.18 C 8095.2 3927.98 8102.36 3975.27 8066.54 3946.61 C 8066.54 3948.04 8039.31 3969.54 8036.44 3978.14 C 8033.57 3982.44 8026.41 4025.43 8026.41 4025.43 C 8019.24 4031.17 8007.78 4022.57 7999.18 4025.43 C 7996.31 4026.87 7999.18 4036.9 7994.88 4036.9 C 7989.14 4036.9 7984.84 4028.3 7977.68 4028.3 C 7959.05 4026.87 7956.18 4068.43 7931.82 4074.16 L 7931.82 4075.59 C 7940.42 4097.09 7930.38 4115.72 7928.95 4137.22 C 7927.52 4150.12 7974.81 4124.32 7969.08 4144.39 C 7967.65 4148.68 7960.48 4148.68 7957.61 4152.98 C 7956.18 4158.72 7961.91 4167.32 7957.61 4173.05 C 7949.02 4183.08 7927.52 4168.75 7920.35 4178.78 C 7914.62 4188.81 7921.79 4203.15 7914.62 4211.74 C 7887.39 4254.74 7900.29 4198.85 7883.09 4251.87 C 7883.09 4254.74 7877.36 4254.74 7877.36 4256.17 C 7877.36 4256.17 7890.26 4296.3 7890.26 4296.3 C 7890.26 4297.73 7875.92 4337.86 7877.36 4343.6 C 7877.36 4349.33 7921.79 4340.73 7908.89 4372.26 C 7906.02 4379.42 7877.36 4389.46 7878.79 4376.56 C 7878.79 4372.26 7885.96 4369.39 7884.52 4365.09 C 7881.66 4346.46 7848.69 4362.23 7844.39 4367.96 C 7828.63 4383.72 7860.16 4382.29 7837.23 4395.19 C 7827.2 4399.49 7812.86 4396.62 7805.7 4405.22 C 7799.97 4410.95 7820.03 4426.72 7812.86 4429.59 C 7805.7 4431.02 7797.1 4426.72 7789.93 4431.02 C 7781.34 4436.75 7779.9 4451.08 7771.3 4456.82 C 7758.4 4468.28 7752.67 4442.48 7741.21 4446.78 C 7729.74 4452.52 7688.18 4475.45 7670.98 4463.98 C 7696.78 4537.07 7759.84 4604.43 7764.14 4683.26 C 7764.14 4686.12 7761.27 4688.99 7759.84 4690.42 C 7749.81 4700.45 7659.52 4776.41 7701.08 4792.18 C 7703.94 4793.61 7706.81 4786.44 7709.68 4787.88 C 7722.58 4789.31 7736.91 4793.61 7748.37 4802.21 C 7777.04 4825.14 7746.94 4873.87 7758.4 4899.66 C 7759.84 4903.96 7764.14 4908.26 7767 4912.56 L 7768.44 4911.13 " }
+ }
+ }
+ // PATH visit no count: 1982
+ DemoShape {
+ objectName: "no"
+ ShapePath {
+ objectName: "svg_path:no"
+ // boundingRect: 5717.75, 1239.32 1829.56x2604.54
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 6918.57 1718.04 C 6920 1718.04 6920 1718.04 6920 1719.47 M 7152.18 1963.11 L 7150.74 1963.11 M 7529.1 1421.37 C 7537.7 1432.84 7557.76 1460.07 7540.56 1465.8 C 7523.37 1471.53 7478.94 1448.6 7493.27 1461.5 C 7520.5 1484.43 7466.04 1517.39 7458.87 1534.59 C 7458.87 1536.02 7476.07 1597.65 7456.01 1590.48 C 7401.55 1568.99 7466.04 1533.16 7447.41 1501.63 C 7418.74 1451.47 7374.32 1470.1 7337.05 1429.97 L 7335.62 1422.8 C 7334.19 1422.8 7332.75 1422.8 7331.32 1424.24 C 7331.32 1422.8 7329.89 1422.8 7329.89 1421.37 L 7329.89 1424.24 C 7301.22 1429.97 7306.96 1462.93 7282.59 1470.1 C 7261.1 1475.83 7269.7 1445.73 7245.33 1472.96 C 7242.47 1477.26 7245.33 1484.43 7243.9 1490.16 C 7242.47 1491.6 7226.7 1521.69 7226.7 1523.13 C 7222.4 1534.59 7231 1571.85 7232.43 1581.89 C 7232.43 1586.18 7229.57 1589.05 7229.57 1593.35 C 7229.57 1601.95 7231 1609.12 7232.43 1617.71 C 7236.73 1629.18 7246.76 1637.78 7248.2 1649.24 C 7255.36 1699.4 7242.47 1665.01 7225.27 1680.77 C 7205.2 1700.84 7223.83 1706.57 7218.1 1730.93 C 7216.67 1736.67 7210.94 1739.53 7209.5 1745.27 C 7209.5 1746.7 7190.87 1729.5 7188 1728.07 C 7183.71 1725.2 7130.68 1706.57 7126.38 1712.3 C 7120.65 1718.04 7124.95 1729.5 7120.65 1735.23 C 7103.45 1765.33 7080.52 1746.7 7056.15 1751 C 7048.99 1751 7038.96 1758.16 7033.22 1753.86 C 7026.06 1748.13 7028.92 1736.67 7024.62 1729.5 C 7014.59 1712.3 6981.63 1667.87 6964.43 1657.84 C 6907.1 1624.88 6932.9 1710.87 6932.9 1710.87 C 6924.3 1712.3 6917.14 1702.27 6908.54 1702.27 C 6904.24 1702.27 6897.07 1706.57 6898.51 1709.44 C 6899.94 1710.87 6901.37 1712.3 6902.8 1712.3 L 6899.94 1712.3 C 6888.47 1715.17 6872.71 1708 6866.98 1718.04 C 6862.68 1725.2 6881.31 1729.5 6885.61 1736.67 C 6889.91 1745.27 6892.77 1755.3 6892.77 1765.33 C 6892.77 1782.53 6868.41 1795.43 6872.71 1812.62 C 6874.14 1825.52 6924.3 1822.66 6877.01 1852.75 C 6864.11 1861.35 6765.22 1812.62 6745.16 1838.42 C 6736.56 1849.89 6772.39 1931.58 6743.72 1943.04 L 6697.86 1922.98 C 6689.26 1922.98 6662.03 1973.14 6660.6 1984.6 C 6657.73 2000.37 6657.73 2020.43 6646.27 2034.77 C 6637.67 2044.8 6621.9 2029.03 6626.2 2054.83 C 6631.94 2086.36 6669.2 2089.23 6653.43 2127.92 C 6644.83 2152.28 6597.54 2208.18 6588.94 2233.98 C 6586.08 2246.87 6604.71 2258.34 6600.41 2271.24 L 6568.88 2298.47 C 6557.41 2304.2 6534.48 2291.3 6528.75 2304.2 L 6543.08 2360.09 C 6543.08 2360.09 6535.91 2403.09 6535.91 2404.52 L 6540.21 2457.55 C 6538.78 2463.28 6531.61 2464.72 6530.18 2470.45 C 6517.28 2509.14 6497.22 2549.27 6484.32 2589.4 C 6475.72 2615.2 6535.91 2600.87 6525.88 2671.09 C 6515.85 2738.45 6477.15 2671.09 6418.39 2708.35 C 6399.76 2719.82 6368.23 2768.55 6363.93 2791.48 C 6362.5 2798.64 6371.1 2804.38 6369.67 2810.11 C 6368.23 2825.87 6348.17 2835.91 6348.17 2851.67 C 6348.17 3025.08 6369.67 2724.12 6369.67 2897.53 C 6369.67 2906.13 6359.64 2911.86 6359.64 2920.46 C 6358.2 2930.49 6363.93 2939.09 6365.37 2949.13 C 6365.37 2957.72 6358.2 2967.76 6359.64 2976.36 C 6361.07 2997.85 6384 3016.48 6386.87 3037.98 C 6389.73 3069.51 6366.8 3109.64 6373.97 3139.74 C 6382.57 3172.7 6437.03 3169.83 6442.76 3205.66 L 6426.99 3262.99 C 6415.53 3273.02 6386.87 3265.85 6388.3 3280.19 C 6395.46 3341.81 6432.73 3326.05 6416.96 3407.74 L 6418.39 3449.3 C 6405.5 3482.26 6359.64 3485.13 6356.77 3495.16 C 6355.34 3498.03 6362.5 3499.46 6362.5 3503.76 C 6365.37 3509.49 6368.23 3516.66 6365.37 3522.39 C 6361.07 3530.99 6346.74 3532.42 6343.87 3542.46 C 6335.27 3568.25 6375.4 3625.58 6343.87 3670.01 C 6330.97 3688.64 6325.24 3674.31 6320.94 3659.98 C 6322.37 3659.98 6322.37 3659.98 6323.81 3658.54 C 6329.54 3654.24 6320.94 3642.78 6316.64 3637.04 C 6286.54 3589.75 6302.31 3659.98 6255.01 3615.55 C 6250.71 3611.25 6259.31 3602.65 6259.31 3596.92 C 6259.31 3588.32 6250.71 3596.92 6250.71 3596.92 C 6242.12 3584.02 6244.98 3562.52 6247.85 3565.39 C 6247.85 3562.52 6246.41 3561.09 6246.41 3559.65 C 6243.55 3545.32 6239.25 3532.42 6236.38 3518.09 C 6234.95 3509.49 6247.85 3490.86 6237.82 3490.86 C 6201.99 3490.86 6263.61 3535.29 6227.78 3559.65 C 6226.35 3559.65 6224.92 3558.22 6224.92 3556.79 C 6223.48 3548.19 6227.78 3538.16 6224.92 3530.99 C 6220.62 3523.82 6206.29 3510.93 6204.85 3518.09 C 6203.42 3529.56 6217.75 3536.72 6222.05 3546.76 C 6224.92 3552.49 6216.32 3565.39 6219.18 3572.55 C 6230.65 3602.65 6239.25 3586.88 6230.65 3606.95 C 6230.65 3608.38 6230.65 3612.68 6227.78 3612.68 C 6224.92 3612.68 6222.05 3604.08 6219.18 3606.95 C 6209.15 3625.58 6222.05 3649.94 6210.59 3649.94 C 6204.85 3649.94 6212.02 3631.31 6207.72 3634.18 C 6183.36 3649.94 6229.22 3665.71 6169.02 3665.71 C 6161.86 3665.71 6169.02 3651.38 6163.29 3647.08 C 6156.13 3642.78 6143.23 3627.01 6138.93 3634.18 C 6134.63 3644.21 6153.26 3649.94 6157.56 3659.98 C 6158.99 3664.27 6120.3 3667.14 6116 3681.47 C 6114.56 3687.21 6130.33 3692.94 6126.03 3697.24 C 6118.86 3705.84 6100.23 3698.67 6093.07 3705.84 C 6088.77 3711.57 6107.4 3713 6105.96 3718.73 C 6097.37 3777.49 6085.9 3701.54 6078.73 3731.63 C 6077.3 3734.5 6083.03 3737.37 6081.6 3740.23 C 6074.43 3750.26 6037.17 3794.69 6035.74 3796.13 C 6032.87 3798.99 6028.57 3790.39 6025.71 3793.26 C 6017.11 3800.43 6018.54 3819.06 6007.08 3820.49 C 5998.48 3823.36 5997.04 3798.99 5987.01 3801.86 C 5976.98 3804.72 5981.28 3823.36 5974.11 3829.09 C 5968.38 3833.39 5958.35 3826.22 5952.62 3829.09 C 5948.32 3830.52 5946.88 3836.25 5942.58 3837.69 C 5928.25 3846.29 5932.55 3833.39 5912.49 3833.39 C 5902.46 3833.39 5890.99 3849.15 5885.26 3841.99 C 5879.52 3834.82 5903.89 3829.09 5901.02 3820.49 C 5896.72 3813.32 5888.12 3831.96 5879.52 3831.96 C 5868.06 3833.39 5856.59 3829.09 5845.13 3824.79 C 5820.76 3813.32 5868.06 3797.56 5872.36 3787.53 C 5873.79 3781.79 5863.76 3776.06 5858.03 3777.49 C 5852.29 3778.93 5853.73 3791.83 5846.56 3793.26 C 5837.96 3794.69 5829.36 3788.96 5820.76 3784.66 C 5803.57 3777.49 5793.53 3751.7 5784.94 3745.97 C 5780.64 3741.67 5772.04 3744.53 5766.3 3741.67 C 5756.27 3735.93 5739.07 3698.67 5740.51 3688.64 C 5740.51 3680.04 5750.54 3674.31 5753.41 3664.27 C 5754.84 3655.68 5743.37 3634.18 5753.41 3637.04 C 5764.87 3639.91 5756.27 3664.27 5767.74 3668.57 C 5773.47 3672.87 5774.9 3654.24 5782.07 3651.38 C 5784.94 3648.51 5787.8 3651.38 5790.67 3654.24 C 5787.8 3647.08 5786.37 3639.91 5783.5 3632.75 C 5782.07 3622.71 5803.57 3625.58 5809.3 3618.41 C 5812.17 3615.55 5796.4 3618.41 5797.83 3614.11 C 5800.7 3606.95 5807.87 3602.65 5815.03 3599.78 C 5823.63 3594.05 5840.83 3598.35 5845.13 3588.32 C 5850.86 3575.42 5810.73 3594.05 5802.13 3585.45 C 5796.4 3592.62 5793.53 3592.62 5793.53 3579.72 C 5794.97 3568.25 5819.33 3565.39 5816.47 3555.35 C 5812.17 3543.89 5794.97 3541.02 5783.5 3543.89 C 5764.87 3549.62 5772.04 3594.05 5753.41 3592.62 C 5743.37 3592.62 5750.54 3573.99 5746.24 3566.82 C 5743.37 3562.52 5737.64 3559.65 5731.91 3556.79 C 5731.91 3556.79 5731.91 3558.22 5733.34 3558.22 C 5731.91 3558.22 5731.91 3558.22 5730.48 3559.65 C 5730.48 3558.22 5731.91 3556.79 5731.91 3556.79 C 5727.61 3553.92 5723.31 3551.05 5723.31 3546.76 C 5723.31 3539.59 5740.51 3552.49 5746.24 3548.19 C 5754.84 3541.02 5751.97 3522.39 5762 3518.09 C 5769.17 3513.79 5773.47 3529.56 5780.64 3530.99 C 5783.5 3532.42 5779.2 3523.82 5782.07 3522.39 C 5784.94 3519.53 5789.24 3523.82 5792.1 3522.39 C 5797.83 3520.96 5777.77 3520.96 5779.2 3515.23 C 5779.2 3513.79 5837.96 3488 5833.66 3488 C 5787.8 3485.13 5816.47 3523.82 5772.04 3483.7 C 5770.6 3482.26 5779.2 3483.7 5780.64 3480.83 C 5783.5 3477.96 5780.64 3470.8 5784.94 3469.36 C 5790.67 3465.06 5797.83 3470.8 5803.57 3466.5 C 5806.43 3465.06 5802.13 3460.77 5802.13 3457.9 C 5805 3452.17 5807.87 3447.87 5810.73 3445 C 5817.9 3440.7 5833.66 3445 5835.1 3437.83 C 5836.53 3429.24 5816.47 3430.67 5816.47 3423.5 C 5815.03 3420.64 5817.9 3416.34 5820.76 3412.04 C 5817.9 3412.04 5813.6 3404.87 5810.73 3407.74 C 5803.57 3412.04 5799.27 3419.2 5794.97 3424.94 C 5789.24 3436.4 5792.1 3450.73 5783.5 3459.33 C 5779.2 3463.63 5780.64 3447.87 5779.2 3443.57 C 5770.6 3427.8 5763.44 3432.1 5769.17 3417.77 C 5774.9 3406.3 5797.83 3380.51 5784.94 3383.37 C 5770.6 3387.67 5760.57 3450.73 5743.37 3419.2 C 5739.07 3409.17 5734.77 3397.71 5731.91 3386.24 C 5730.48 3374.78 5751.97 3386.24 5777.77 3377.64 C 5783.5 3376.21 5786.37 3370.48 5787.8 3363.31 C 5777.77 3373.34 5759.14 3351.84 5759.14 3346.11 C 5759.14 3333.21 5779.2 3330.35 5790.67 3324.61 C 5787.8 3308.85 5774.9 3323.18 5763.44 3336.08 C 5763.44 3336.08 5762 3336.08 5762 3334.65 C 5760.57 3333.21 5759.14 3330.35 5756.27 3327.48 C 5760.57 3331.78 5762 3337.51 5763.44 3336.08 C 5756.27 3343.25 5750.54 3348.98 5746.24 3350.41 C 5739.07 3350.41 5741.94 3336.08 5739.07 3330.35 C 5737.64 3327.48 5711.84 3301.68 5719.01 3300.25 C 5729.04 3300.25 5737.64 3308.85 5746.24 3316.02 C 5746.24 3314.58 5744.81 3311.72 5746.24 3308.85 C 5749.11 3298.82 5766.3 3298.82 5774.9 3291.65 C 5776.34 3290.22 5773.47 3284.49 5770.6 3285.92 C 5759.14 3287.35 5740.51 3301.68 5730.48 3295.95 C 5717.58 3288.79 5727.61 3255.82 5734.77 3251.52 C 5744.81 3244.36 5756.27 3265.85 5769.17 3265.85 C 5770.6 3267.29 5799.27 3232.89 5830.8 3248.66 C 5840.83 3252.96 5842.26 3267.29 5852.29 3271.59 C 5862.33 3275.89 5843.7 3250.09 5876.66 3241.49 C 5918.22 3230.03 5875.22 3303.12 5919.65 3300.25 C 5946.88 3297.38 5909.62 3274.45 5911.05 3255.82 C 5912.49 3235.76 5985.58 3283.05 5975.55 3232.89 C 5974.11 3222.86 5955.48 3241.49 5946.88 3238.62 C 5941.15 3237.19 5939.72 3228.59 5939.72 3222.86 C 5939.72 3207.09 5979.85 3191.33 5965.51 3185.6 C 5929.69 3171.27 5941.15 3237.19 5938.28 3244.36 C 5938.28 3245.79 5921.09 3250.09 5906.75 3251.52 C 5903.89 3252.96 5905.32 3247.22 5903.89 3245.79 C 5893.86 3240.06 5882.39 3237.19 5872.36 3231.46 L 5870.93 3230.03 C 5866.63 3240.06 5862.33 3247.22 5859.46 3250.09 C 5858.03 3251.52 5813.6 3231.46 5802.13 3231.46 C 5797.83 3230.03 5800.7 3238.62 5797.83 3240.06 C 5782.07 3247.22 5763.44 3250.09 5747.67 3245.79 C 5744.81 3245.79 5723.31 3221.43 5726.18 3217.13 C 5733.34 3207.09 5746.24 3202.8 5756.27 3199.93 C 5767.74 3197.06 5789.23 3209.96 5789.23 3198.5 C 5790.67 3188.46 5767.74 3195.63 5756.27 3197.06 C 5749.11 3197.06 5743.37 3207.09 5736.21 3204.23 C 5706.11 3192.76 5741.94 3177 5750.54 3177 C 5764.87 3178.43 5789.23 3195.63 5806.43 3184.16 C 5823.63 3171.27 5756.27 3188.46 5747.67 3168.4 C 5744.81 3159.8 5780.64 3161.23 5773.47 3156.93 C 5764.87 3152.63 5751.97 3158.37 5744.81 3151.2 C 5721.88 3132.57 5756.27 3095.31 5777.77 3093.87 C 5793.53 3093.87 5813.6 3096.74 5822.2 3109.64 C 5826.5 3115.37 5813.6 3125.4 5817.9 3131.14 C 5822.2 3136.87 5819.33 3113.94 5825.06 3112.51 C 5832.23 3111.07 5835.1 3125.4 5842.26 3126.84 C 5847.99 3126.84 5830.8 3116.81 5833.66 3113.94 C 5840.83 3105.34 5875.22 3135.44 5901.02 3111.07 C 5905.32 3106.77 5893.86 3103.91 5888.12 3103.91 C 5837.96 3101.04 5912.49 3115.37 5870.93 3118.24 C 5863.76 3119.67 5819.33 3098.17 5799.27 3095.31 C 5792.1 3095.31 5786.37 3091.01 5779.2 3091.01 C 5770.6 3091.01 5754.84 3103.91 5753.41 3095.31 C 5751.97 3085.28 5774.9 3085.28 5777.77 3075.24 C 5780.64 3062.35 5751.97 3056.61 5751.97 3042.28 C 5751.97 3036.55 5766.3 3042.28 5769.17 3046.58 C 5773.47 3053.75 5773.47 3070.94 5782.07 3069.51 C 5790.67 3068.08 5772.04 3045.15 5780.64 3043.71 C 5792.1 3042.28 5797.83 3065.21 5809.3 3065.21 C 5817.9 3065.21 5815.03 3037.98 5820.76 3043.71 C 5827.93 3049.45 5817.9 3062.35 5817.9 3072.38 C 5817.9 3073.81 5815.03 3078.11 5816.47 3078.11 C 5825.06 3075.24 5820.76 3056.61 5829.36 3056.61 C 5833.66 3056.61 5830.8 3066.64 5835.1 3069.51 C 5843.7 3073.81 5858.03 3082.41 5862.33 3073.81 C 5865.19 3066.64 5843.7 3069.51 5839.4 3063.78 C 5832.23 3055.18 5829.36 3045.15 5829.36 3035.12 C 5827.93 3022.22 5849.43 3012.18 5862.33 3015.05 C 5868.06 3016.48 5865.19 3027.95 5868.06 3033.68 C 5872.36 3042.28 5879.52 3048.01 5882.39 3056.61 C 5882.39 3059.48 5875.22 3065.21 5878.09 3065.21 C 5882.39 3065.21 5883.82 3059.48 5883.82 3056.61 C 5878.09 3027.95 5846.56 3009.32 5896.72 3000.72 C 5913.92 2997.85 5916.79 3022.22 5916.79 3045.15 C 5918.22 3042.28 5919.65 3037.98 5922.52 3036.55 C 5931.12 3029.38 5955.48 3045.15 5952.62 3035.12 C 5949.75 3023.65 5929.69 3033.68 5919.65 3026.52 C 5912.49 3020.78 5915.35 3007.88 5909.62 3000.72 C 5902.46 2990.69 5863.76 2977.79 5858.03 2973.49 C 5856.59 2972.06 5862.33 2967.76 5866.63 2967.76 C 5872.36 2966.32 5879.52 2966.32 5885.26 2969.19 C 5888.12 2970.62 5886.69 2977.79 5889.56 2977.79 C 5893.86 2979.22 5911.05 2949.13 5931.12 2964.89 C 5936.85 2969.19 5928.25 2983.52 5935.42 2986.39 C 5941.15 2989.25 5932.55 2970.62 5938.28 2967.76 C 5948.32 2962.02 5969.81 2993.55 5969.81 2994.99 C 5978.41 2996.42 5995.61 2989.25 5991.31 2982.09 C 5987.01 2973.49 5969.81 2987.82 5962.65 2982.09 C 5952.62 2973.49 5972.68 2957.72 5988.45 2951.99 C 5976.98 2956.29 5966.95 2959.16 5956.92 2959.16 C 5870.93 2960.59 5946.88 2950.56 5944.02 2933.36 C 5942.58 2921.89 5923.95 2923.33 5916.79 2913.3 C 5906.75 2901.83 5911.05 2891.8 5949.75 2896.1 C 5958.35 2897.53 5958.35 2913.3 5966.95 2916.16 C 5972.68 2917.6 5976.98 2907.56 5982.71 2907.56 C 5991.31 2906.13 5998.48 2906.13 6007.08 2907.56 C 6005.64 2906.13 6004.21 2903.26 6002.78 2901.83 C 6001.34 2893.23 6012.81 2884.63 6021.41 2883.2 C 6025.71 2881.77 6021.41 2891.8 6024.27 2896.1 C 6028.57 2901.83 6038.61 2901.83 6041.47 2909 C 6044.34 2914.73 6035.74 2923.33 6041.47 2927.63 C 6048.64 2934.79 6067.27 2947.69 6073 2937.66 C 6077.3 2927.63 6050.07 2923.33 6048.64 2911.86 C 6048.64 2904.7 6064.4 2910.43 6070.14 2906.13 C 6073 2903.26 6060.1 2909 6057.24 2906.13 C 6055.8 2904.7 6065.84 2898.96 6062.97 2900.4 C 6055.8 2901.83 6050.07 2911.86 6044.34 2909 C 6034.31 2903.26 6031.44 2890.37 6028.57 2880.33 C 6025.71 2876.03 6035.74 2884.63 6040.04 2886.07 C 6044.34 2888.93 6025.71 2871.73 6040.04 2874.6 C 6041.47 2874.6 6098.8 2904.7 6093.07 2866 C 6087.33 2818.71 6047.2 2907.56 6055.8 2845.94 C 6057.24 2833.04 6091.63 2810.11 6101.67 2815.84 C 6110.26 2820.14 6100.23 2838.77 6107.4 2847.37 C 6110.26 2851.67 6114.56 2840.2 6118.86 2837.34 C 6126.03 2834.47 6146.09 2834.47 6140.36 2828.74 C 6136.06 2823.01 6116 2843.07 6117.43 2834.47 C 6117.43 2824.44 6133.19 2821.57 6140.36 2812.97 C 6148.96 2804.38 6148.96 2787.18 6160.42 2785.74 C 6169.02 2782.88 6164.72 2800.08 6169.02 2807.24 C 6171.89 2812.97 6181.92 2815.84 6181.92 2823.01 C 6181.92 2831.61 6169.02 2835.91 6170.46 2844.5 C 6171.89 2850.24 6179.06 2837.34 6184.79 2838.77 C 6193.39 2840.2 6203.42 2861.7 6207.72 2854.54 C 6212.02 2843.07 6190.52 2834.47 6191.95 2823.01 C 6191.95 2811.54 6250.71 2825.87 6252.15 2825.87 C 6262.18 2818.71 6263.61 2802.94 6262.18 2791.48 C 6260.75 2785.74 6243.55 2797.21 6244.98 2791.48 C 6249.28 2772.85 6308.04 2769.98 6305.17 2755.65 C 6303.74 2744.18 6269.35 2744.18 6276.51 2734.15 C 6282.24 2724.12 6308.04 2726.98 6309.47 2715.52 C 6313.77 2658.19 6262.18 2728.42 6250.71 2738.45 C 6244.98 2742.75 6227.78 2747.05 6232.08 2754.21 C 6237.82 2764.25 6255.01 2758.51 6265.05 2762.81 C 6266.48 2762.81 6262.18 2764.25 6260.75 2765.68 C 6253.58 2769.98 6244.98 2772.85 6237.82 2778.58 C 6230.65 2784.31 6194.82 2815.84 6183.36 2812.97 C 6176.19 2811.54 6179.06 2800.08 6176.19 2794.34 C 6173.32 2788.61 6163.29 2784.31 6166.16 2778.58 C 6170.46 2768.55 6184.79 2767.11 6193.39 2759.95 C 6194.82 2758.51 6187.66 2764.25 6184.79 2762.81 C 6181.92 2762.81 6189.09 2755.65 6187.66 2757.08 C 6177.62 2761.38 6161.86 2784.31 6147.53 2778.58 C 6126.03 2769.98 6157.56 2751.35 6173.32 2741.32 C 6181.92 2737.02 6193.39 2737.02 6199.12 2728.42 C 6203.42 2724.12 6186.22 2732.72 6180.49 2731.28 C 6177.62 2731.28 6179.06 2728.42 6179.06 2725.55 C 6180.49 2715.52 6179.06 2705.49 6184.79 2696.89 C 6187.65 2692.59 6196.25 2699.75 6200.55 2696.89 C 6203.42 2696.89 6194.82 2696.89 6194.82 2694.02 C 6194.82 2689.72 6196.25 2685.42 6197.69 2681.12 C 6201.99 2676.82 6212.02 2686.86 6214.89 2681.12 C 6217.75 2676.82 6213.45 2668.22 6217.75 2662.49 C 6222.05 2656.76 6234.95 2658.19 6237.82 2649.59 C 6239.25 2643.86 6219.18 2636.69 6224.92 2635.26 C 6234.95 2632.4 6243.55 2649.59 6253.58 2646.73 C 6260.75 2645.29 6242.12 2638.13 6237.82 2630.96 C 6230.65 2620.93 6252.15 2609.46 6263.61 2602.3 C 6275.08 2595.13 6279.38 2628.1 6293.71 2633.83 C 6302.31 2636.69 6313.77 2633.83 6319.51 2626.66 C 6322.37 2622.36 6299.44 2626.66 6302.31 2620.93 C 6306.61 2612.33 6325.24 2613.76 6329.54 2605.17 C 6336.7 2585.1 6285.11 2638.13 6298.01 2583.67 C 6299.44 2575.07 6302.31 2569.34 6303.74 2566.47 C 6298.01 2570.77 6292.28 2575.07 6285.11 2577.94 C 6263.61 2587.97 6325.24 2550.7 6320.94 2544.97 C 6319.51 2542.11 6316.64 2542.11 6312.34 2543.54 L 6312.34 2542.11 C 6312.34 2539.24 6302.31 2542.11 6303.74 2539.24 C 6308.04 2529.21 6352.47 2532.07 6359.63 2529.21 C 6362.5 2526.34 6356.77 2519.18 6359.63 2516.31 C 6381.13 2496.24 6409.8 2509.14 6416.96 2467.58 C 6416.96 2460.42 6405.5 2474.75 6399.76 2477.61 C 6392.6 2479.05 6385.43 2477.61 6378.27 2477.61 C 6372.53 2479.05 6362.5 2487.65 6362.5 2481.91 C 6365.37 2463.28 6416.96 2463.28 6402.63 2438.92 C 6401.2 2434.62 6388.3 2437.48 6378.27 2437.48 C 6379.7 2440.35 6382.57 2443.22 6385.43 2448.95 C 6378.27 2456.12 6372.53 2464.72 6365.37 2471.88 C 6362.5 2473.31 6356.77 2481.91 6355.34 2477.61 C 6353.9 2470.45 6353.9 2430.32 6365.37 2428.89 C 6365.37 2424.59 6365.37 2421.72 6368.23 2415.99 C 6372.53 2404.52 6391.16 2410.25 6401.2 2404.52 C 6404.06 2403.09 6394.03 2404.52 6392.6 2403.09 C 6388.3 2397.36 6384 2390.19 6382.57 2384.46 C 6381.13 2375.86 6394.03 2342.9 6402.63 2342.9 C 6414.1 2341.46 6419.83 2360.09 6431.29 2362.96 C 6435.59 2364.39 6426.99 2352.93 6425.56 2347.2 C 6422.69 2340.03 6424.13 2327.13 6416.96 2322.83 C 6409.8 2318.53 6396.9 2330 6389.73 2324.26 C 6366.8 2305.63 6414.1 2312.8 6421.26 2309.93 C 6434.16 2304.2 6435.59 2285.57 6455.66 2289.87 C 6464.26 2292.74 6468.56 2304.2 6477.15 2304.2 C 6484.32 2304.2 6465.69 2295.6 6464.26 2289.87 L 6464.26 2288.44 C 6462.82 2288.44 6461.39 2289.87 6459.96 2289.87 C 6457.09 2289.87 6459.96 2281.27 6457.09 2279.84 C 6442.76 2276.97 6432.73 2302.77 6416.96 2301.33 C 6366.8 2294.17 6444.19 2284.14 6452.79 2276.97 C 6455.66 2275.54 6447.06 2275.54 6442.76 2275.54 C 6432.73 2274.1 6424.13 2278.4 6414.1 2276.97 C 6401.2 2274.1 6405.5 2251.17 6408.36 2239.71 C 6418.39 2186.68 6439.89 2209.61 6475.72 2195.28 C 6495.79 2186.68 6452.79 2172.35 6447.06 2162.32 C 6444.19 2156.58 6459.96 2160.88 6465.69 2158.02 C 6471.42 2155.15 6441.33 2133.65 6477.15 2145.12 C 6480.02 2145.12 6472.86 2150.85 6472.86 2153.72 C 6474.29 2173.78 6481.45 2143.69 6481.45 2140.82 C 6481.45 2139.39 6484.32 2132.22 6485.75 2135.09 C 6490.05 2139.39 6484.32 2152.28 6491.49 2153.72 C 6502.95 2155.15 6518.72 2149.42 6521.58 2139.39 C 6525.88 2129.35 6505.82 2125.05 6504.38 2115.02 C 6504.38 2113.59 6538.78 2093.53 6550.25 2099.26 C 6557.41 2102.12 6543.08 2125.05 6551.68 2123.62 C 6560.28 2123.62 6550.25 2103.56 6557.41 2099.26 C 6558.84 2097.82 6558.84 2097.82 6560.28 2096.39 C 6558.84 2094.96 6557.41 2093.53 6555.98 2092.09 C 6551.68 2089.23 6564.58 2080.63 6560.28 2079.19 C 6555.98 2077.76 6553.11 2087.79 6547.38 2090.66 C 6533.05 2096.39 6515.85 2107.86 6501.52 2099.26 C 6495.79 2094.96 6512.98 2086.36 6517.28 2079.19 C 6525.88 2060.56 6528.75 2017.57 6550.25 2033.33 C 6557.41 2039.06 6528.75 2047.66 6535.91 2053.4 C 6541.65 2059.13 6550.25 2043.36 6560.28 2041.93 C 6567.44 2041.93 6574.61 2044.8 6580.34 2050.53 C 6588.94 2059.13 6604.71 2090.66 6600.41 2079.19 C 6597.54 2069.16 6583.21 2060.56 6586.08 2049.1 C 6587.51 2039.06 6604.71 2037.63 6610.44 2029.03 C 6613.31 2024.73 6601.84 2031.9 6597.54 2033.33 C 6576.04 2040.5 6568.88 2050.53 6558.84 2023.3 C 6553.11 2008.97 6566.01 2017.57 6567.44 2010.4 C 6568.88 2008.97 6563.14 2011.83 6563.14 2010.4 C 6558.84 1997.5 6598.97 2017.57 6604.71 2010.4 C 6614.74 1993.2 6570.31 1978.87 6567.44 1978.87 C 6564.58 1978.87 6570.31 1984.6 6568.88 1987.47 C 6564.58 1996.07 6540.21 2026.17 6531.61 2021.87 C 6521.58 2017.57 6520.15 2001.8 6524.45 1991.77 C 6527.32 1983.17 6541.65 1988.9 6547.38 1983.17 C 6551.68 1978.87 6534.48 1988.9 6531.61 1984.6 C 6525.88 1976.01 6550.25 1970.27 6557.41 1976.01 C 6560.28 1977.44 6554.55 1984.6 6555.98 1983.17 C 6578.91 1960.24 6616.17 1974.57 6613.31 1943.04 C 6613.31 1938.74 6604.71 1947.34 6600.41 1944.48 C 6597.54 1943.04 6601.84 1937.31 6598.97 1935.88 C 6597.54 1934.44 6597.54 1941.61 6596.11 1941.61 C 6590.37 1944.48 6586.08 1943.04 6581.78 1943.04 C 6573.18 1944.48 6561.71 1951.64 6558.84 1944.48 C 6540.21 1907.21 6596.11 1933.01 6597.54 1933.01 C 6606.14 1925.84 6598.97 1910.08 6603.27 1900.05 C 6604.71 1895.75 6607.57 1910.08 6609.01 1915.81 C 6610.44 1917.25 6614.74 1914.38 6614.74 1915.81 C 6614.74 1924.41 6609.01 1933.01 6611.87 1940.18 C 6611.87 1943.04 6643.4 1988.9 6650.57 1980.31 C 6667.77 1960.24 6596.11 1897.18 6617.6 1887.15 C 6624.77 1882.85 6639.1 1894.32 6650.57 1904.35 C 6649.13 1900.05 6649.13 1895.75 6646.27 1892.88 C 6639.1 1887.15 6617.6 1890.02 6620.47 1879.98 C 6621.9 1868.52 6640.54 1869.95 6652 1868.52 C 6713.63 1858.49 6662.03 1888.58 6700.73 1907.21 C 6727.96 1920.11 6669.2 1862.79 6695 1862.79 C 6702.16 1862.79 6706.46 1871.38 6712.19 1871.38 C 6720.79 1869.95 6733.69 1869.95 6732.26 1862.79 C 6723.66 1802.59 6687.83 1862.79 6673.5 1859.92 C 6670.63 1858.49 6679.23 1855.62 6677.8 1852.75 C 6677.8 1849.89 6673.5 1845.59 6670.63 1847.02 C 6666.33 1848.45 6666.33 1857.05 6660.6 1857.05 C 6652 1858.49 6637.67 1859.92 6633.37 1851.32 C 6630.5 1845.59 6631.94 1838.42 6634.8 1832.69 C 6627.64 1834.12 6619.04 1835.56 6614.74 1839.85 C 6607.57 1847.02 6614.74 1865.65 6606.14 1871.38 C 6600.41 1875.68 6606.14 1854.19 6600.41 1849.89 C 6593.24 1845.59 6584.64 1847.02 6577.48 1848.45 C 6571.74 1849.89 6574.61 1861.35 6570.31 1865.65 C 6566.01 1869.95 6560.28 1874.25 6555.98 1878.55 C 6550.25 1884.28 6545.95 1890.02 6541.65 1895.75 L 6541.65 1890.02 C 6545.95 1879.98 6554.55 1869.95 6555.98 1859.92 C 6557.41 1854.19 6550.25 1847.02 6553.11 1841.29 C 6560.28 1834.12 6574.61 1836.99 6581.78 1829.82 C 6611.87 1801.16 6534.48 1809.76 6576.04 1765.33 C 6606.14 1730.93 6600.41 1795.43 6593.24 1826.96 C 6596.11 1821.22 6600.41 1816.92 6604.71 1815.49 C 6607.57 1814.06 6610.44 1824.09 6611.87 1821.22 C 6616.17 1814.06 6609 1745.27 6633.37 1778.23 C 6646.27 1795.43 6650.57 1808.33 6650.57 1815.49 C 6656.3 1812.62 6660.6 1809.76 6664.9 1809.76 C 6670.63 1809.76 6673.5 1821.22 6679.23 1821.22 C 6690.7 1822.66 6703.59 1819.79 6713.63 1814.06 C 6727.96 1805.46 6683.53 1816.92 6680.66 1798.29 C 6680.66 1792.56 6687.83 1785.39 6695 1785.39 L 6697.86 1785.39 C 6696.43 1783.96 6695 1783.96 6695 1781.1 C 6695 1772.5 6712.19 1775.36 6719.36 1769.63 C 6720.79 1768.2 6713.63 1768.2 6712.19 1766.76 C 6702.16 1759.6 6697.86 1743.83 6700.73 1730.93 C 6702.16 1719.47 6730.82 1729.5 6733.69 1718.04 C 6736.56 1709.44 6729.39 1700.84 6726.53 1692.24 C 6726.53 1702.27 6725.09 1708 6723.66 1709.44 C 6713.63 1709.44 6703.59 1700.84 6695 1706.57 C 6680.66 1712.3 6677.8 1730.93 6669.2 1743.83 C 6662.03 1739.53 6649.13 1739.53 6649.13 1732.37 C 6652 1720.9 6670.63 1719.47 6673.5 1708 C 6676.36 1702.27 6657.73 1715.17 6656.3 1709.44 C 6653.43 1700.84 6669.2 1693.67 6667.77 1683.64 C 6667.77 1677.91 6647.7 1685.07 6652 1682.21 C 6672.07 1672.17 6705.03 1680.77 6690.7 1662.14 C 6684.96 1656.41 6663.47 1659.28 6669.2 1654.98 C 6676.36 1650.68 6687.83 1663.58 6696.43 1659.28 C 6705.03 1653.54 6700.73 1634.91 6709.33 1632.05 C 6723.66 1627.75 6726.53 1654.98 6727.96 1677.91 C 6727.96 1669.31 6730.82 1662.14 6733.69 1654.98 C 6740.86 1643.51 6743.72 1683.64 6753.76 1689.37 C 6763.79 1695.11 6776.69 1689.37 6786.72 1685.07 C 6788.15 1685.07 6743.72 1669.31 6746.59 1659.28 C 6749.46 1649.24 6759.49 1636.35 6769.52 1637.78 C 6779.55 1637.78 6778.12 1656.41 6785.29 1663.58 C 6792.45 1670.74 6802.48 1669.31 6811.08 1676.47 C 6815.38 1680.77 6819.68 1699.4 6822.55 1693.67 C 6834.01 1659.28 6749.46 1667.87 6780.99 1600.52 C 6786.72 1589.05 6811.08 1574.72 6822.55 1583.32 C 6832.58 1589.05 6819.68 1656.41 6819.68 1659.28 C 6822.55 1662.14 6826.85 1654.98 6828.28 1650.68 C 6829.71 1642.08 6822.55 1630.61 6828.28 1623.45 C 6832.58 1616.28 6851.21 1627.75 6852.64 1619.15 C 6852.64 1610.55 6832.58 1611.98 6829.71 1603.38 C 6826.85 1596.22 6841.18 1534.59 6862.68 1560.39 C 6868.41 1568.99 6862.68 1649.24 6862.68 1652.11 C 6859.81 1662.14 6841.18 1679.34 6851.21 1682.21 C 6877.01 1690.81 6864.11 1640.64 6872.71 1634.91 C 6881.31 1629.18 6894.21 1634.91 6902.8 1630.61 C 6907.1 1627.75 6895.64 1624.88 6892.77 1622.01 C 6882.74 1613.41 6861.24 1601.95 6869.84 1581.89 C 6907.1 1498.76 6869.84 1593.35 6912.84 1564.69 C 6924.3 1557.52 6912.84 1536.02 6921.44 1525.99 C 6924.3 1523.13 6928.6 1527.42 6931.47 1530.29 C 6934.33 1533.16 6932.9 1538.89 6935.77 1541.76 C 6942.93 1547.49 6951.53 1548.92 6958.7 1554.65 C 6964.43 1558.95 6968.73 1567.55 6975.9 1570.42 C 6983.06 1571.85 6963 1560.39 6960.13 1553.22 C 6960.13 1551.79 6965.86 1551.79 6965.86 1548.92 C 6968.73 1528.86 6964.43 1498.76 6961.56 1500.19 C 6954.4 1500.19 6912.84 1536.02 6901.37 1494.46 C 6895.64 1471.53 6937.2 1461.5 6948.67 1464.37 C 6958.7 1465.8 6964.43 1478.7 6974.46 1481.56 C 6977.33 1481.56 6973.03 1472.96 6975.9 1471.53 C 6978.76 1468.66 6984.5 1471.53 6987.36 1472.96 C 6995.96 1472.96 7005.99 1471.53 7013.16 1474.4 C 7031.79 1480.13 7007.43 1521.69 7046.12 1518.83 C 7053.29 1517.39 7057.59 1507.36 7056.15 1500.19 C 7056.15 1495.9 7047.55 1501.63 7043.26 1500.19 C 7038.96 1498.76 7031.79 1497.33 7031.79 1493.03 C 7031.79 1487.3 7048.99 1490.16 7043.26 1480.13 C 7037.52 1471.53 7036.09 1462.93 7041.82 1435.7 L 7041.82 1432.84 C 7038.96 1438.57 7034.66 1444.3 7030.36 1451.47 C 7023.19 1444.3 7010.29 1440 7007.43 1431.4 C 7000.26 1405.61 7086.25 1343.98 7053.29 1412.77 C 7066.19 1401.31 7084.82 1414.2 7089.12 1409.91 C 7096.28 1405.61 7073.35 1405.61 7070.49 1398.44 C 7060.45 1374.08 7103.45 1378.38 7106.31 1374.08 C 7112.05 1361.18 7067.62 1345.41 7067.62 1341.11 C 7069.05 1332.51 7089.12 1352.58 7091.98 1345.41 C 7097.72 1335.38 7079.08 1323.92 7081.95 1312.45 C 7086.25 1300.98 7165.07 1308.15 7166.51 1312.45 C 7169.37 1316.75 7130.68 1386.97 7132.11 1391.27 C 7132.11 1392.71 7133.54 1392.71 7134.98 1392.71 C 7132.11 1392.71 7130.68 1392.71 7130.68 1394.14 C 7133.54 1398.44 7142.14 1391.27 7146.44 1394.14 C 7165.07 1407.04 7122.08 1412.77 7146.44 1419.94 C 7155.04 1422.8 7140.71 1435.7 7139.28 1444.3 C 7139.28 1447.17 7136.41 1488.73 7160.77 1464.37 C 7165.07 1460.07 7160.77 1451.47 7162.21 1445.73 C 7163.64 1437.14 7167.94 1431.4 7170.81 1424.24 C 7173.67 1415.64 7157.91 1425.67 7162.21 1412.77 C 7170.81 1388.41 7193.74 1293.82 7209.5 1285.22 C 7209.5 1285.22 7219.53 1322.48 7219.53 1325.35 C 7216.67 1333.95 7202.34 1338.25 7203.77 1348.28 C 7205.2 1354.01 7218.1 1338.25 7222.4 1343.98 C 7228.13 1351.15 7216.67 1369.78 7225.27 1374.08 C 7235.3 1381.24 7249.63 1374.08 7258.23 1366.91 C 7263.96 1361.18 7245.33 1356.88 7245.33 1349.71 C 7245.33 1339.68 7241.03 1326.78 7246.76 1318.18 C 7251.06 1308.15 7265.4 1306.72 7272.56 1298.12 C 7275.43 1295.25 7265.4 1298.12 7262.53 1296.69 C 7252.5 1292.39 7235.3 1289.52 7235.3 1278.05 C 7233.87 1269.45 7256.8 1279.49 7261.1 1272.32 C 7266.83 1262.29 7253.93 1250.82 7256.8 1240.79 C 7258.23 1233.63 7268.26 1255.12 7275.43 1250.82 C 7286.89 1246.52 7295.49 1236.49 7318.42 1252.26 C 7335.62 1263.72 7288.33 1325.35 7284.03 1333.95 C 7282.59 1336.81 7292.63 1329.65 7294.06 1326.78 C 7302.66 1319.62 7306.96 1303.85 7316.99 1300.98 C 7324.16 1299.55 7319.86 1313.88 7318.42 1321.05 C 7314.12 1331.08 7296.93 1341.11 7302.66 1351.15 C 7308.39 1359.74 7322.72 1333.95 7331.32 1339.68 C 7332.75 1341.11 7334.19 1342.55 7334.19 1343.98 C 7337.05 1342.55 7342.79 1346.85 7345.65 1345.41 C 7354.25 1336.81 7332.75 1329.65 7332.75 1329.65 C 7331.32 1323.92 7329.89 1275.19 7335.62 1266.59 C 7361.42 1233.63 7378.62 1296.69 7380.05 1296.69 C 7473.2 1300.98 7332.75 1240.79 7424.48 1269.45 C 7471.77 1283.79 7437.38 1285.22 7430.21 1303.85 C 7428.78 1306.72 7437.38 1305.28 7440.24 1303.85 C 7448.84 1300.98 7456.01 1293.82 7464.61 1292.39 C 7467.47 1292.39 7464.61 1298.12 7466.04 1299.55 C 7470.34 1302.42 7476.07 1302.42 7480.37 1303.85 C 7481.8 1305.28 7483.24 1308.15 7486.1 1309.58 C 7493.27 1315.32 7504.73 1319.62 7510.47 1328.21 C 7511.9 1331.08 7504.73 1331.08 7501.87 1333.95 C 7494.7 1338.25 7484.67 1339.68 7480.37 1346.85 C 7471.77 1358.31 7478.94 1378.38 7467.47 1384.11 C 7435.94 1399.87 7397.25 1378.38 7371.45 1407.04 C 7367.15 1409.91 7380.05 1402.74 7385.78 1402.74 C 7392.95 1402.74 7398.68 1404.17 7405.85 1405.61 C 7407.28 1407.04 7408.71 1408.47 7410.15 1408.47 C 7421.61 1409.91 7437.38 1401.31 7444.54 1411.34 C 7450.27 1418.5 7427.34 1428.54 7431.64 1437.14 C 7435.94 1444.3 7441.68 1417.07 7450.27 1418.5 C 7460.31 1421.37 7457.44 1444.3 7453.14 1458.63 C 7454.57 1455.77 7456.01 1454.33 7457.44 1452.9 C 7467.47 1448.6 7481.8 1455.77 7493.27 1451.47 C 7496.14 1450.03 7484.67 1445.73 7484.67 1441.43 C 7483.24 1431.4 7484.67 1422.8 7487.54 1414.2 C 7488.97 1411.34 7486.1 1422.8 7490.4 1422.8 C 7501.87 1425.67 7513.33 1422.8 7524.8 1421.37 L 7529.1 1421.37 M 6914.27 1716.6 L 6915.7 1716.6 L 6914.27 1716.6 M 7175.11 1278.05 C 7176.54 1289.52 7156.48 1292.39 7149.31 1300.98 C 7091.98 1245.09 7169.37 1245.09 7175.11 1278.05 M 6957.27 1389.84 C 6963 1389.84 6965.86 1399.87 6970.16 1397.01 C 6975.9 1392.71 6960.13 1376.94 6965.86 1378.38 C 6968.73 1379.81 6968.73 1386.97 6973.03 1386.97 C 6975.9 1385.54 6970.16 1378.38 6973.03 1376.94 C 6985.93 1371.21 6980.2 1407.04 6993.09 1388.41 C 6995.96 1385.54 6985.93 1379.81 6988.79 1376.94 C 6997.39 1365.48 7011.73 1361.18 7024.62 1352.58 C 7024.62 1354.01 7023.19 1354.01 7023.19 1354.01 C 7023.19 1355.44 7028.92 1355.44 7028.92 1356.88 C 7027.49 1362.61 7021.76 1368.34 7018.89 1374.08 C 7007.43 1405.61 6991.66 1418.5 6957.27 1424.24 C 6960.13 1415.64 6970.16 1405.61 6965.86 1397.01 C 6964.43 1395.57 6961.56 1394.14 6958.7 1394.14 C 6958.7 1392.71 6955.83 1389.84 6957.27 1389.84 M 6947.23 1395.57 L 6941.5 1395.57 C 6938.63 1394.14 6941.5 1395.57 6947.23 1395.57 M 6861.24 1497.33 C 6864.11 1491.6 6872.71 1488.73 6879.87 1485.86 C 6881.31 1484.43 6885.61 1485.86 6884.17 1487.3 C 6879.87 1498.76 6872.71 1508.79 6866.98 1518.83 C 6865.54 1511.66 6858.38 1504.49 6861.24 1497.33 M 6834.01 1533.16 L 6835.45 1536.02 C 6835.45 1537.46 6834.01 1538.89 6834.01 1540.32 C 6834.01 1537.46 6832.58 1536.02 6834.01 1533.16 M 6758.06 1560.39 C 6769.52 1528.86 6884.17 1536.02 6785.29 1581.89 C 6778.12 1573.29 6755.19 1570.42 6758.06 1560.39 M 6558.84 1793.99 C 6561.71 1796.86 6553.11 1799.73 6554.55 1804.03 C 6557.41 1819.79 6594.67 1818.36 6543.08 1839.85 C 6537.35 1841.29 6531.61 1834.12 6524.45 1831.26 C 6561.71 1801.16 6540.21 1796.86 6540.21 1805.46 C 6541.65 1822.66 6523.02 1811.19 6514.42 1816.92 C 6507.25 1819.79 6501.52 1844.15 6500.09 1835.56 C 6495.79 1811.19 6533.05 1769.63 6558.84 1793.99 M 6444.19 1924.41 C 6447.06 1915.81 6441.33 1900.05 6449.92 1898.61 C 6502.95 1888.58 6455.66 1938.74 6438.46 1943.04 C 6438.46 1941.61 6435.59 1941.61 6435.59 1940.18 C 6438.46 1934.44 6442.76 1930.14 6444.19 1924.41 M 6090.2 2742.75 C 6097.37 2744.18 6093.07 2754.21 6094.5 2761.38 C 6093.07 2762.81 6090.2 2764.25 6088.77 2764.25 C 6083.03 2765.68 6075.87 2765.68 6070.14 2767.11 C 6009.94 2775.71 6088.77 2741.32 6090.2 2742.75 M 5823.63 3010.75 C 5829.36 3007.88 5836.53 3010.75 5843.7 3012.18 C 5843.7 3010.75 5843.7 3009.32 5845.13 3009.32 C 5845.13 3007.88 5846.56 3010.75 5846.56 3012.18 C 5845.13 3013.62 5843.7 3013.62 5842.26 3015.05 L 5843.7 3013.62 C 5837.96 3016.48 5832.23 3023.65 5826.5 3023.65 C 5822.2 3023.65 5820.76 3013.62 5823.63 3010.75 M 5730.48 3561.09 L 5733.34 3558.22 C 5736.21 3572.55 5741.94 3588.32 5734.77 3602.65 C 5719.01 3631.31 5727.61 3578.28 5730.48 3561.09 M 5753.41 3455.03 L 5753.41 3453.6 L 5753.41 3452.17 C 5756.27 3455.03 5760.57 3456.47 5760.57 3459.33 C 5769.17 3520.96 5737.64 3476.53 5750.54 3456.47 C 5750.54 3456.47 5750.54 3457.9 5749.11 3459.33 C 5750.54 3457.9 5753.41 3456.47 5753.41 3455.03 M 6303.74 2546.41 C 6298.01 2547.84 6293.71 2549.27 6289.41 2549.27 C 6279.38 2547.84 6292.28 2547.84 6303.74 2546.41 M 7145.01 1391.27 C 7142.14 1392.71 7137.84 1392.71 7134.98 1392.71 C 7139.28 1392.71 7147.88 1389.84 7145.01 1391.27 M 6902.8 1713.74 L 6904.24 1713.74 L 6902.8 1713.74 M 6907.1 1715.17 L 6909.97 1715.17 L 6907.1 1715.17 M 6911.4 1715.17 C 6911.4 1716.6 6911.4 1716.6 6912.84 1716.6 C 6911.4 1716.6 6911.4 1716.6 6911.4 1715.17 " }
+ }
+ }
+ // PATH visit ua count: 886
+ DemoShape {
+ objectName: "ua"
+ ShapePath {
+ objectName: "svg_path:ua"
+ // boundingRect: 7693.24, 4446.56 2146.03x1480.63
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 9710.38 5187.73 L 9710.38 5186.3 C 9698.91 5173.4 9706.08 5169.1 9708.94 5156.2 C 9711.81 5140.44 9691.75 5160.5 9691.75 5151.9 C 9693.18 5141.87 9684.58 5107.47 9688.88 5098.87 C 9690.31 5098.87 9731.87 5060.18 9731.87 5060.18 C 9734.74 5054.45 9727.57 5047.28 9727.57 5041.55 C 9726.14 5035.81 9724.71 5028.65 9729.01 5022.92 C 9750.51 4997.12 9817.86 5008.58 9837.93 4978.49 C 9842.23 4972.76 9835.06 4964.16 9832.2 4956.99 C 9830.76 4954.12 9825.03 4952.69 9825.03 4949.82 C 9825.03 4945.53 9833.63 4945.53 9833.63 4942.66 C 9833.63 4938.36 9827.9 4935.49 9826.46 4931.19 C 9825.03 4924.03 9826.46 4915.43 9827.9 4906.83 C 9827.9 4903.96 9832.2 4901.1 9832.2 4898.23 C 9837.93 4881.03 9812.13 4896.8 9812.13 4896.8 C 9807.83 4893.93 9816.43 4886.77 9815 4881.03 C 9809.26 4871 9800.67 4860.97 9793.5 4852.37 C 9783.47 4842.34 9767.7 4866.7 9766.27 4850.94 C 9759.1 4805.07 9763.4 4817.97 9789.2 4806.51 C 9790.63 4805.07 9802.1 4780.71 9793.5 4783.58 C 9773.44 4787.88 9763.4 4802.21 9746.21 4787.88 C 9727.57 4772.11 9760.54 4767.81 9764.84 4760.65 C 9769.14 4756.35 9763.4 4749.18 9764.84 4744.88 C 9769.14 4726.25 9786.33 4716.22 9769.14 4697.59 C 9763.4 4690.42 9753.37 4688.99 9747.64 4683.26 C 9740.47 4674.66 9757.67 4656.03 9746.21 4654.59 C 9718.98 4653.16 9736.17 4676.09 9714.68 4680.39 C 9641.58 4691.85 9733.31 4670.36 9674.55 4660.32 C 9655.92 4657.46 9654.48 4678.96 9638.72 4668.92 C 9632.99 4666.06 9628.69 4658.89 9624.39 4654.59 C 9611.49 4645.99 9617.22 4678.96 9601.46 4678.96 C 9591.42 4678.96 9581.39 4676.09 9571.36 4671.79 C 9567.06 4668.92 9564.19 4658.89 9558.46 4660.32 C 9551.29 4660.32 9548.43 4674.66 9539.83 4674.66 C 9529.8 4674.66 9522.63 4664.62 9511.17 4663.19 C 9473.9 4657.46 9529.8 4713.35 9491.1 4706.19 C 9481.07 4704.75 9478.2 4691.85 9469.6 4687.56 C 9463.87 4684.69 9455.27 4688.99 9448.11 4686.12 C 9426.61 4678.96 9410.84 4651.73 9392.21 4637.39 C 9386.48 4633.09 9333.45 4687.56 9314.82 4713.35 C 9309.09 4721.95 9294.76 4706.19 9284.73 4704.75 C 9278.99 4704.75 9278.99 4713.35 9274.69 4716.22 C 9267.53 4720.52 9261.8 4703.32 9253.2 4700.45 C 9218.8 4691.85 9211.63 4742.02 9187.27 4729.12 C 9177.24 4724.82 9168.64 4719.08 9161.47 4711.92 C 9155.74 4706.19 9150.01 4699.02 9148.58 4690.42 C 9148.58 4686.12 9157.17 4684.69 9155.74 4680.39 C 9155.74 4674.66 9118.48 4641.69 9117.05 4637.39 C 9115.61 4633.09 9124.21 4625.93 9121.35 4623.06 C 9119.91 4621.63 9117.05 4621.63 9115.61 4621.63 C 9109.88 4623.06 9105.58 4627.36 9099.85 4627.36 C 9089.82 4628.8 9088.38 4611.6 9082.65 4604.43 C 9081.22 4601.57 9078.35 4601.57 9075.48 4603 C 9069.75 4605.86 9039.65 4624.5 9033.92 4624.5 C 9031.06 4625.93 9031.06 4617.33 9026.76 4617.33 C 9016.72 4617.33 9006.69 4618.76 8998.09 4621.63 C 8995.23 4623.06 8986.63 4643.13 8979.46 4628.8 C 8978.03 4625.93 8983.76 4623.06 8983.76 4620.2 C 8985.19 4615.9 8985.19 4610.16 8982.33 4607.3 C 8978.03 4603 8972.3 4605.86 8968 4601.57 C 8960.83 4597.27 8969.43 4582.93 8963.7 4577.2 C 8957.96 4570.04 8937.9 4565.74 8942.2 4557.14 C 8947.93 4549.97 8980.9 4542.81 8972.3 4529.91 C 8960.83 4512.71 8933.6 4514.14 8925 4506.98 C 8919.27 4502.68 8914.97 4496.94 8913.54 4491.21 C 8910.67 4485.48 8914.97 4478.31 8912.1 4475.45 C 8906.37 4469.71 8897.77 4469.71 8892.04 4465.41 C 8883.44 4459.68 8879.14 4448.22 8869.11 4446.78 C 8857.64 4443.92 8853.34 4469.71 8840.44 4469.71 C 8836.15 4469.71 8837.58 4459.68 8833.28 4459.68 C 8777.39 4455.38 8811.78 4486.91 8778.82 4501.24 C 8778.82 4501.24 8717.19 4505.54 8715.76 4505.54 C 8712.89 4505.54 8722.93 4548.54 8710.03 4561.44 C 8701.43 4568.6 8691.4 4575.77 8679.93 4577.2 C 8675.63 4577.2 8677.06 4568.6 8672.76 4565.74 C 8669.9 4564.3 8665.6 4571.47 8662.73 4570.04 C 8646.97 4574.33 8628.34 4572.9 8615.44 4581.5 C 8609.7 4584.37 8612.57 4594.4 8606.84 4597.27 C 8598.24 4601.57 8586.77 4597.27 8576.74 4600.13 C 8571.01 4601.57 8560.98 4615.9 8553.81 4656.03 C 8552.38 4666.06 8549.51 4693.29 8549.51 4704.75 C 8549.51 4720.52 8606.84 4759.21 8571.01 4766.38 C 8533.75 4774.98 8550.95 4739.15 8517.98 4736.28 C 8452.06 4731.98 8530.88 4747.75 8483.59 4756.35 C 8476.42 4757.78 8469.25 4747.75 8460.66 4749.18 C 8437.73 4754.91 8450.62 4779.28 8430.56 4785.01 C 8419.09 4787.88 8407.63 4747.75 8396.16 4742.02 C 8384.7 4736.28 8371.8 4756.35 8363.2 4767.81 C 8357.47 4774.98 8368.93 4796.48 8360.33 4795.04 C 8330.24 4787.88 8374.67 4796.48 8337.4 4770.68 C 8317.34 4756.35 8324.51 4785.01 8311.61 4785.01 C 8275.78 4785.01 8307.31 4772.11 8294.41 4763.51 C 8285.81 4759.21 8285.81 4780.71 8280.08 4786.44 C 8271.48 4796.48 8258.58 4783.58 8251.41 4785.01 C 8244.25 4785.01 8251.41 4810.81 8244.25 4815.11 C 8242.81 4817.97 8238.52 4813.67 8235.65 4810.81 C 8217.02 4800.78 8268.61 4776.41 8211.28 4792.18 C 8194.09 4796.48 8219.88 4819.41 8184.05 4805.07 C 8179.76 4803.64 8188.35 4795.04 8185.49 4792.18 C 8182.62 4789.31 8176.89 4796.48 8174.02 4795.04 C 8165.42 4787.88 8176.89 4773.55 8161.12 4777.84 C 8128.16 4786.44 8083.73 4790.74 8047.9 4786.44 C 8043.6 4785.01 8042.17 4779.28 8037.87 4779.28 C 8017.81 4777.84 7997.74 4790.74 7976.25 4793.61 C 7969.08 4793.61 7961.91 4793.61 7954.75 4793.61 C 7947.58 4793.61 7940.42 4790.74 7933.25 4792.18 C 7914.62 4797.91 7901.72 4812.24 7884.52 4819.41 C 7873.06 4823.71 7858.73 4820.84 7847.26 4826.57 C 7841.53 4830.87 7821.46 4898.23 7807.13 4893.93 C 7802.83 4892.5 7802.83 4885.33 7799.97 4885.33 C 7791.37 4883.9 7781.34 4883.9 7774.17 4886.77 C 7751.24 4893.93 7785.63 4906.83 7768.44 4911.13 L 7767 4912.56 C 7767 4912.56 7767 4911.13 7767 4911.13 C 7771.3 4916.86 7777.04 4921.16 7779.9 4926.89 C 7782.77 4935.49 7777.04 4945.52 7779.9 4952.69 C 7792.8 4979.92 7834.36 5007.15 7857.29 5024.35 C 7861.59 5028.65 7828.63 5027.22 7835.8 5041.55 C 7837.23 5042.98 7865.89 5068.78 7865.89 5080.24 C 7861.59 5131.84 7845.83 5100.31 7820.03 5121.8 C 7808.57 5131.84 7721.14 5293.78 7725.44 5305.25 C 7728.31 5321.01 7742.64 5332.48 7746.94 5346.81 C 7748.37 5353.98 7736.91 5364.01 7742.64 5369.74 C 7767 5399.84 7752.67 5342.51 7769.87 5396.97 C 7771.3 5399.84 7765.57 5392.67 7762.7 5391.24 C 7755.54 5389.81 7748.37 5392.67 7741.21 5392.67 C 7736.91 5391.24 7731.17 5391.24 7726.88 5389.81 C 7728.31 5404.14 7718.28 5424.2 7716.84 5438.53 C 7715.41 5448.57 7716.84 5458.6 7712.54 5467.2 C 7708.24 5477.23 7695.35 5480.1 7693.91 5490.13 C 7691.05 5500.16 7698.21 5510.19 7698.21 5521.66 C 7731.17 5523.09 7709.68 5538.86 7732.61 5547.45 C 7736.91 5548.89 7742.64 5541.72 7746.94 5544.59 C 7755.54 5550.32 7756.97 5564.65 7765.57 5570.39 C 7771.3 5571.82 7775.6 5564.65 7781.34 5563.22 C 7785.63 5563.22 7789.93 5566.09 7792.8 5567.52 C 7811.43 5580.42 7788.5 5577.55 7805.7 5591.88 C 7810 5594.75 7818.6 5589.02 7828.63 5561.79 C 7830.06 5558.92 7830.06 5554.62 7832.93 5554.62 C 7837.23 5554.62 7873.06 5571.82 7877.36 5571.82 C 7880.22 5571.82 7881.66 5564.65 7884.52 5563.22 C 7903.15 5556.05 7950.45 5574.68 7973.38 5568.95 C 7986.28 5564.65 7994.88 5553.19 8007.78 5551.75 C 8030.71 5550.32 8046.47 5580.42 8062.24 5584.72 C 8083.73 5591.88 8090.9 5551.75 8096.63 5546.02 C 8122.43 5518.79 8188.35 5521.66 8208.42 5501.59 C 8247.11 5464.33 8191.22 5495.86 8218.45 5460.03 C 8225.62 5451.43 8237.08 5444.27 8248.55 5441.4 L 8249.98 5437.1 L 8255.71 5424.2 C 8255.71 5422.77 8255.71 5421.34 8255.71 5421.34 L 8257.15 5415.6 L 8271.48 5418.47 C 8270.04 5415.6 8267.18 5412.74 8267.18 5409.87 C 8267.18 5408.44 8321.64 5401.27 8324.51 5399.84 C 8351.74 5386.94 8343.14 5365.44 8381.83 5368.31 C 8397.6 5369.74 8414.79 5375.47 8427.69 5385.51 C 8431.99 5388.37 8427.69 5398.41 8431.99 5398.41 C 8442.02 5398.41 8452.06 5388.37 8463.52 5386.94 C 8469.25 5385.51 8462.09 5399.84 8463.52 5405.57 C 8466.39 5417.04 8473.55 5395.54 8476.42 5398.41 C 8480.72 5404.14 8480.72 5411.3 8485.02 5415.6 C 8490.75 5421.34 8485.02 5396.97 8493.62 5394.11 C 8542.35 5381.21 8520.85 5409.87 8555.24 5424.2 C 8569.58 5429.93 8559.54 5401.27 8572.44 5408.44 C 8605.41 5429.93 8582.47 5460.03 8592.51 5491.56 C 8593.94 5498.73 8629.77 5524.52 8638.37 5527.39 C 8655.57 5533.12 8634.07 5501.59 8654.13 5513.06 C 8679.93 5527.39 8646.97 5567.52 8665.6 5556.05 C 8672.76 5551.75 8668.46 5574.68 8674.2 5580.42 C 8682.8 5586.15 8718.63 5587.58 8727.22 5594.75 L 8741.56 5639.18 C 8741.56 5642.04 8732.96 5642.04 8734.39 5644.91 C 8737.26 5654.94 8770.22 5659.24 8770.22 5660.67 C 8761.62 5666.41 8751.59 5667.84 8744.42 5673.57 C 8741.56 5676.44 8742.99 5679.31 8741.56 5682.17 C 8734.39 5689.34 8727.22 5662.11 8715.76 5662.11 C 8707.16 5662.11 8715.76 5689.34 8707.16 5687.9 C 8701.43 5686.47 8682.8 5672.14 8682.8 5672.14 C 8679.93 5676.44 8681.36 5685.04 8675.63 5686.47 C 8672.76 5687.9 8671.33 5676.44 8669.9 5679.31 C 8662.73 5685.04 8664.17 5695.07 8659.87 5700.8 C 8658.43 5702.24 8655.57 5700.8 8654.13 5699.37 C 8654.13 5696.5 8657 5695.07 8657 5692.2 C 8655.57 5685.04 8652.7 5677.87 8649.83 5672.14 C 8644.1 5662.11 8631.2 5683.61 8624.04 5692.2 C 8603.97 5715.13 8639.8 5726.6 8642.67 5738.07 C 8644.1 5745.23 8636.94 5752.4 8636.94 5759.56 C 8636.94 5766.73 8645.53 5772.46 8642.67 5778.19 C 8639.8 5783.93 8629.77 5783.93 8624.04 5789.66 C 8611.14 5799.69 8631.2 5805.42 8624.04 5815.46 C 8618.3 5822.62 8609.7 5826.92 8605.41 5832.65 C 8592.51 5852.72 8614 5884.25 8603.97 5885.68 C 8596.81 5887.11 8589.64 5884.25 8582.47 5885.68 L 8583.91 5885.68 L 8576.74 5895.71 C 8576.74 5900.01 8575.31 5904.31 8572.44 5902.88 C 8575.31 5904.31 8579.61 5901.45 8582.47 5904.31 C 8586.77 5908.61 8585.34 5917.21 8591.07 5921.51 C 8596.81 5927.24 8658.43 5930.11 8657 5922.94 C 8657 5921.51 8636.94 5917.21 8651.27 5908.61 C 8659.87 5904.31 8669.9 5905.75 8678.5 5901.45 C 8692.83 5894.28 8698.56 5874.22 8714.33 5868.48 C 8745.86 5857.02 8761.62 5868.48 8768.79 5895.71 C 8771.65 5887.11 8783.12 5854.15 8765.92 5848.42 C 8763.05 5846.99 8767.35 5854.15 8764.49 5854.15 C 8763.05 5855.59 8763.05 5849.85 8761.62 5848.42 C 8753.02 5845.55 8758.75 5871.35 8748.72 5852.72 C 8740.12 5839.82 8741.56 5819.76 8740.12 5805.42 C 8740.12 5799.69 8730.09 5785.36 8735.82 5788.23 C 8748.72 5792.53 8745.86 5825.49 8758.75 5821.19 C 8801.75 5803.99 8773.09 5799.69 8773.09 5781.06 C 8773.09 5778.19 8775.95 5786.79 8778.82 5785.36 C 8783.12 5783.93 8771.65 5772.46 8775.95 5769.6 C 8783.12 5766.73 8791.72 5772.46 8798.88 5769.6 C 8804.62 5768.16 8808.92 5762.43 8811.78 5756.7 C 8823.25 5730.9 8836.15 5699.37 8844.74 5670.71 C 8846.18 5664.97 8834.71 5659.24 8837.58 5653.51 C 8839.01 5649.21 8847.61 5647.78 8850.48 5643.48 C 8860.51 5624.85 8831.85 5627.71 8843.31 5611.95 C 8874.84 5571.82 8917.84 5589.02 8917.84 5576.12 C 8919.27 5564.65 8903.5 5548.89 8913.54 5541.72 C 8920.7 5535.99 8916.4 5564.65 8926.43 5570.39 C 8930.73 5574.68 8936.47 5563.22 8943.63 5561.79 C 8950.8 5560.35 8959.4 5561.79 8968 5560.35 C 8986.63 5557.49 8963.7 5525.96 8963.7 5525.96 C 8962.26 5508.76 8976.6 5511.63 8968 5497.29 C 8972.3 5497.29 8976.6 5495.86 8976.6 5498.73 C 8978.03 5581.85 9025.32 5554.62 9069.75 5524.52 C 9075.48 5520.22 9056.85 5534.56 9051.12 5540.29 C 9043.95 5548.89 9053.99 5564.65 9041.09 5566.09 C 9016.72 5570.39 8989.49 5571.82 8965.13 5574.68 C 8963.7 5574.68 8927.87 5574.68 8932.17 5578.98 C 8940.77 5586.15 8949.37 5596.18 8960.83 5599.05 C 8965.13 5600.48 8957.96 5587.58 8962.26 5586.15 C 8970.86 5581.85 8980.9 5587.58 8990.93 5586.15 C 8993.79 5586.15 9005.26 5578.98 9006.69 5587.58 C 9009.56 5601.91 8973.73 5611.95 8983.76 5621.98 C 8988.06 5627.71 9038.22 5616.25 9045.39 5617.68 C 9049.69 5619.11 9045.39 5629.15 9049.69 5630.58 C 9059.72 5634.88 9072.62 5636.31 9084.08 5632.01 C 9095.55 5629.15 9101.28 5614.81 9111.31 5610.51 C 9121.35 5604.78 9134.24 5607.65 9142.84 5603.35 C 9145.71 5601.91 9139.98 5594.75 9142.84 5593.32 C 9145.71 5590.45 9151.44 5597.62 9154.31 5596.18 C 9161.47 5593.32 9157.17 5573.25 9164.34 5576.12 C 9177.24 5578.98 9188.7 5606.21 9198.74 5597.62 C 9205.9 5590.45 9204.47 5577.55 9213.07 5571.82 C 9237.43 5557.49 9211.63 5596.18 9227.4 5610.51 C 9233.13 5614.81 9247.46 5597.62 9246.03 5604.78 C 9246.03 5609.08 9201.6 5654.94 9193 5659.24 C 9188.7 5660.67 9184.4 5653.51 9180.1 5656.38 C 9178.67 5659.24 9187.27 5662.11 9185.84 5664.97 C 9185.84 5664.97 9155.74 5692.2 9154.31 5692.2 C 9151.44 5695.07 9148.58 5699.37 9147.14 5703.67 C 9147.14 5706.54 9151.44 5707.97 9151.44 5709.4 C 9150.01 5710.84 9098.41 5746.66 9117.05 5753.83 C 9152.87 5768.16 9145.71 5743.8 9175.81 5743.8 C 9185.84 5745.23 9217.37 5771.03 9227.4 5766.73 C 9240.3 5762.43 9250.33 5746.66 9267.53 5763.86 C 9306.22 5803.99 9273.26 5798.26 9280.43 5821.19 C 9287.59 5841.25 9297.62 5848.42 9296.19 5849.85 C 9290.46 5855.59 9270.39 5855.59 9273.26 5864.18 C 9277.56 5874.22 9296.19 5868.48 9306.22 5872.78 C 9316.26 5875.65 9316.26 5885.68 9329.15 5885.68 C 9400.81 5877.08 9386.48 5793.96 9432.34 5762.43 C 9440.94 5755.26 9449.54 5749.53 9461.01 5748.1 C 9466.74 5748.1 9473.9 5755.26 9478.2 5752.4 C 9488.24 5742.37 9479.64 5722.3 9489.67 5713.7 C 9499.7 5706.54 9505.43 5709.4 9508.3 5696.5 C 9509.73 5695.07 9505.43 5696.5 9504 5695.07 C 9496.83 5687.9 9508.3 5673.57 9512.6 5672.14 C 9519.77 5667.84 9529.8 5667.84 9538.4 5669.27 C 9547 5670.71 9552.73 5682.17 9561.33 5680.74 C 9571.36 5679.31 9574.23 5666.41 9582.82 5662.11 C 9589.99 5659.24 9598.59 5662.11 9605.76 5659.24 C 9634.42 5649.21 9611.49 5621.98 9614.35 5599.05 C 9617.22 5587.58 9634.42 5576.12 9627.25 5567.52 C 9627.25 5567.52 9568.49 5578.98 9567.06 5580.42 C 9558.46 5586.15 9565.63 5603.35 9557.03 5607.65 C 9551.29 5610.51 9544.13 5607.65 9538.4 5604.78 C 9534.1 5603.35 9535.53 5594.75 9531.23 5594.75 C 9521.2 5594.75 9529.8 5616.25 9524.06 5624.85 C 9516.9 5632.01 9509.73 5640.61 9499.7 5643.48 C 9475.34 5650.64 9395.08 5573.25 9382.18 5556.05 C 9377.88 5551.75 9357.82 5515.92 9360.68 5513.06 C 9369.28 5507.33 9377.88 5528.82 9387.91 5527.39 C 9420.88 5521.66 9412.28 5455.73 9425.18 5435.67 C 9429.48 5429.93 9438.07 5428.5 9440.94 5422.77 C 9448.11 5412.74 9448.11 5399.84 9455.27 5391.24 C 9476.77 5362.58 9488.24 5365.44 9506.87 5374.04 C 9508.3 5375.47 9508.3 5371.18 9509.73 5369.74 C 9522.63 5355.41 9506.87 5328.18 9541.26 5326.75 C 9552.73 5325.31 9559.89 5348.24 9568.49 5342.51 C 9578.53 5336.78 9565.63 5319.58 9569.93 5308.12 C 9569.93 5305.25 9602.89 5267.99 9604.32 5267.99 C 9610.05 5265.12 9617.22 5279.45 9620.09 5275.15 C 9622.95 5270.85 9624.39 5232.16 9632.99 5224.99 C 9644.45 5216.39 9680.28 5202.06 9694.61 5199.2 C 9698.91 5199.2 9700.34 5213.53 9703.21 5209.23 C 9707.51 5203.49 9706.08 5193.46 9710.38 5187.73 " }
+ }
+ }
+ // PATH visit ch count: 232
+ DemoShape {
+ objectName: "ch"
+ ShapePath {
+ objectName: "svg_path:ch"
+ // boundingRect: 5655.76, 5764.54 593.483x374.682
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 6244.98 5941.58 C 6243.55 5947.31 6244.98 5954.47 6242.12 5960.21 C 6240.68 5965.94 6236.38 5970.24 6233.52 5975.97 C 6233.52 5978.84 6260.75 5998.9 6243.55 6004.63 C 6213.45 6011.8 6223.48 5970.24 6197.69 5988.87 C 6177.62 6003.2 6203.42 6018.97 6206.29 6026.13 C 6207.72 6031.86 6199.12 6036.16 6199.12 6041.9 C 6200.55 6047.63 6206.29 6050.5 6209.15 6054.8 C 6210.59 6060.53 6199.12 6066.26 6193.39 6063.39 C 6183.36 6057.66 6189.09 6034.73 6177.62 6033.3 C 6138.93 6026.13 6157.56 6054.8 6134.63 6047.63 C 6097.37 6039.03 6120.3 6010.37 6101.67 6007.5 C 6077.3 6003.2 6093.07 6041.9 6093.07 6044.76 C 6087.33 6070.56 6052.94 6079.16 6052.94 6110.69 C 6052.94 6125.02 6081.6 6119.29 6057.24 6137.92 C 6048.64 6145.08 6045.77 6120.72 6040.04 6113.56 C 6035.74 6109.26 6025.71 6112.12 6024.27 6106.39 C 6022.84 6100.66 6032.87 6096.36 6034.31 6090.62 C 6034.31 6087.76 6031.44 6084.89 6030.01 6084.89 C 6014.24 6079.16 5991.31 6074.86 5981.28 6056.23 C 5979.85 6050.5 5984.15 6044.76 5984.15 6040.46 C 5984.15 6031.86 5985.58 6023.27 5982.71 6014.67 C 5981.28 6013.23 5978.41 6016.1 5975.55 6017.53 C 5968.38 6023.27 5962.65 6029 5955.48 6034.73 C 5948.32 6040.46 5936.85 6043.33 5933.98 6051.93 C 5932.55 6057.66 5945.45 6060.53 5944.02 6067.69 C 5944.02 6074.86 5903.89 6116.42 5902.46 6116.42 C 5889.56 6116.42 5879.52 6099.22 5866.63 6102.09 C 5847.99 6106.39 5809.3 6135.05 5794.97 6109.26 C 5789.23 6100.66 5789.23 6090.62 5782.07 6083.46 C 5780.64 6080.59 5774.9 6089.19 5773.47 6086.32 C 5772.04 6082.03 5779.2 6074.86 5776.34 6070.56 C 5774.9 6066.26 5766.3 6070.56 5763.44 6067.69 C 5754.84 6053.36 5774.9 6054.8 5773.47 6046.2 C 5772.04 6039.03 5763.44 6036.16 5763.44 6029 C 5762 6024.7 5773.47 6016.1 5767.74 6014.67 C 5749.11 6006.07 5708.98 6006.07 5696.08 6026.13 C 5693.21 6029 5694.65 6031.86 5694.65 6036.16 C 5696.08 6039.03 5703.24 6041.9 5701.81 6044.76 C 5693.21 6061.96 5673.15 6069.13 5655.95 6064.83 C 5654.52 6064.83 5661.68 6061.96 5661.68 6059.09 C 5661.68 6040.46 5676.01 6047.63 5677.45 6043.33 C 5684.61 6020.4 5665.98 6000.33 5683.18 5978.84 C 5693.21 5964.51 5719.01 5964.51 5724.74 5948.74 C 5729.04 5940.14 5720.44 5927.24 5724.74 5917.21 C 5730.48 5905.75 5750.54 5910.05 5759.14 5900.01 C 5769.17 5891.41 5780.64 5862.75 5793.53 5852.72 C 5800.7 5846.99 5807.87 5862.75 5809.3 5842.69 C 5809.3 5835.52 5787.8 5849.85 5786.37 5842.69 C 5783.5 5835.52 5794.97 5829.79 5799.27 5824.06 C 5799.27 5824.06 5802.13 5825.49 5802.13 5824.06 C 5802.13 5821.19 5796.4 5815.46 5799.27 5814.02 C 5839.4 5802.56 5822.2 5857.02 5870.93 5806.86 C 5872.36 5806.86 5875.22 5803.99 5876.66 5801.12 L 5879.52 5798.26 C 5882.39 5796.83 5885.26 5796.83 5888.12 5799.69 C 5889.56 5801.12 5879.52 5802.56 5880.96 5805.42 C 5885.26 5814.02 5951.18 5798.26 5955.48 5798.26 C 5984.15 5796.83 5958.35 5824.06 5994.18 5805.42 C 5995.61 5803.99 5991.31 5796.83 5994.18 5795.39 C 5998.48 5792.53 6014.24 5791.09 6008.51 5789.66 C 5999.91 5788.23 5991.31 5791.09 5982.71 5789.66 C 5978.41 5788.23 6002.78 5749.53 6024.27 5771.03 C 6027.14 5773.89 6019.97 5779.63 6021.41 5783.93 C 6022.84 5786.79 6028.57 5788.23 6031.44 5786.79 C 6034.31 5785.36 6030.01 5775.33 6031.44 5778.19 C 6037.17 5781.06 6037.17 5791.09 6042.91 5793.96 C 6042.91 5793.96 6090.2 5791.09 6091.63 5791.09 C 6105.96 5793.96 6116 5808.29 6128.9 5815.46 L 6128.9 5816.89 C 6128.9 5826.92 6147.53 5829.79 6141.79 5844.12 C 6140.36 5846.99 6134.63 5845.55 6133.19 5846.99 C 6128.9 5854.15 6114.56 5905.75 6117.43 5907.18 C 6120.3 5908.61 6167.59 5912.91 6169.02 5912.91 C 6171.89 5915.78 6164.72 5920.08 6167.59 5922.94 C 6174.76 5931.54 6183.36 5937.28 6193.39 5941.58 C 6216.32 5953.04 6220.62 5914.34 6236.38 5917.21 C 6240.68 5917.21 6243.55 5918.64 6246.41 5920.08 L 6244.98 5932.98 C 6243.55 5937.28 6242.12 5940.14 6244.98 5941.58 " }
+ }
+ }
+ // PATH visit md count: 155
+ DemoShape {
+ objectName: "md"
+ ShapePath {
+ objectName: "svg_path:md"
+ // boundingRect: 8254.28, 5368.05 515.94x534.916
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 8254.28 5435.67 C 8274.34 5425.64 8287.24 5434.23 8303.01 5447.13 C 8333.1 5468.63 8338.84 5504.46 8363.2 5528.82 C 8403.33 5567.52 8512.25 5636.31 8525.15 5692.2 C 8535.18 5728.03 8522.28 5768.16 8530.88 5803.99 C 8533.75 5819.76 8559.54 5855.59 8558.11 5871.35 C 8558.11 5877.08 8546.65 5878.52 8548.08 5884.25 C 8549.51 5889.98 8558.11 5887.11 8562.41 5889.98 C 8566.71 5892.85 8566.71 5902.88 8572.44 5902.88 C 8579.61 5904.31 8573.88 5887.11 8579.61 5885.68 C 8588.21 5884.25 8596.81 5887.11 8603.97 5885.68 C 8614 5884.25 8592.51 5852.72 8605.41 5832.65 C 8609.71 5826.92 8618.3 5822.62 8624.04 5815.46 C 8631.2 5805.42 8611.14 5799.69 8624.04 5789.66 C 8629.77 5783.93 8639.8 5783.93 8642.67 5778.19 C 8645.53 5772.46 8636.94 5766.73 8636.94 5759.56 C 8636.94 5752.4 8644.1 5745.23 8642.67 5738.07 C 8639.8 5726.6 8603.97 5715.13 8624.04 5692.2 C 8631.2 5683.61 8644.1 5662.11 8649.83 5672.14 C 8652.7 5677.87 8655.57 5685.04 8657 5692.2 C 8657 5695.07 8654.13 5696.5 8654.13 5699.37 C 8655.57 5700.8 8658.43 5702.24 8659.87 5700.8 C 8664.17 5695.07 8662.73 5685.04 8669.9 5679.31 C 8671.33 5676.44 8672.76 5687.9 8675.63 5686.47 C 8681.36 5685.04 8679.93 5676.44 8682.8 5672.14 C 8682.8 5672.14 8701.43 5686.47 8707.16 5687.9 C 8715.76 5689.34 8707.16 5662.11 8715.76 5662.11 C 8727.22 5662.11 8734.39 5689.34 8741.56 5682.17 C 8742.99 5679.31 8741.56 5676.44 8744.42 5673.57 C 8751.59 5667.84 8761.62 5666.41 8770.22 5660.67 C 8770.22 5659.24 8737.26 5654.94 8734.39 5644.91 C 8732.96 5642.04 8741.56 5642.04 8741.56 5639.18 L 8727.22 5594.75 C 8718.63 5587.58 8682.8 5586.15 8674.2 5580.42 C 8668.46 5574.68 8672.76 5551.75 8665.6 5556.05 C 8646.97 5567.52 8679.93 5527.39 8654.13 5513.06 C 8634.07 5501.59 8655.57 5533.12 8638.37 5527.39 C 8629.77 5524.52 8593.94 5498.73 8592.51 5491.56 C 8582.47 5460.03 8605.41 5429.93 8572.44 5408.44 C 8559.54 5401.27 8569.58 5429.93 8555.24 5424.2 C 8520.85 5409.87 8542.35 5381.21 8493.62 5394.11 C 8485.02 5396.97 8490.75 5421.34 8485.02 5415.6 C 8480.72 5411.3 8480.72 5404.14 8476.42 5398.41 C 8473.55 5395.54 8466.39 5417.04 8463.52 5405.57 C 8462.09 5399.84 8469.25 5385.51 8463.52 5386.94 C 8452.06 5388.37 8442.02 5398.41 8431.99 5398.41 C 8427.69 5398.41 8431.99 5388.37 8427.69 5385.51 C 8414.79 5375.47 8397.6 5369.74 8381.83 5368.31 C 8343.14 5365.44 8351.74 5386.94 8324.51 5399.84 C 8321.64 5401.27 8267.18 5408.44 8267.18 5409.87 C 8267.18 5415.6 8274.34 5418.47 8274.34 5424.2 C 8275.78 5429.93 8262.88 5415.6 8258.58 5418.47 C 8252.85 5421.34 8255.71 5429.93 8254.28 5435.67 " }
+ }
+ }
+ // PATH visit ad count: 7
+ DemoShape {
+ objectName: "ad"
+ ShapePath {
+ objectName: "svg_path:ad"
+ // boundingRect: 4995.66, 6660.73 46.2837x38.6574
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 5033.96 6695.42 C 4969.46 6714.05 5005.29 6661.02 5008.16 6661.02 C 5045.42 6658.16 5048.29 6676.79 5033.96 6695.42 " }
+ }
+ }
+ // PATH visit mc count: 16
+ DemoShape {
+ objectName: "mc"
+ ShapePath {
+ objectName: "svg_path:mc"
+ // boundingRect: 5753.41, 6504.81 42.995x38.6956
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 5774.9 6543.5 C 5786.37 6543.5 5796.4 6533.47 5796.4 6523.44 C 5796.4 6513.41 5786.37 6504.81 5774.9 6504.81 C 5763.44 6504.81 5753.41 6513.41 5753.41 6523.44 C 5753.41 6533.47 5763.44 6543.5 5774.9 6543.5 C 5786.37 6543.5 5763.44 6543.5 5774.9 6543.5 " }
+ }
+ }
+ // PATH visit li count: 9
+ DemoShape {
+ objectName: "li"
+ ShapePath {
+ objectName: "svg_path:li"
+ // boundingRect: 6117.15, 5875.65 13.1832x32.9627
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 6123.16 5875.65 L 6130.33 5891.41 L 6130.33 5908.61 C 6123.16 5908.61 6118.86 5907.18 6117.43 5907.18 C 6116 5905.75 6120.3 5891.41 6123.16 5875.65 " }
+ }
+ }
+ // PATH visit ru-kgd count: 71
+ DemoShape {
+ objectName: "ru-kgd"
+ ShapePath {
+ objectName: "svg_path:ru-kgd"
+ // boundingRect: 7236.73, 4257.61 342.527x184.111
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 7579.26 4400.92 C 7547.73 4357.93 7577.83 4319.23 7569.23 4304.9 C 7564.93 4299.17 7559.2 4294.87 7553.46 4292 C 7550.6 4290.57 7546.3 4294.87 7544.87 4293.44 C 7539.13 4289.14 7542 4277.67 7536.27 4276.24 C 7516.2 4270.51 7496.14 4289.14 7474.64 4289.14 C 7471.77 4289.14 7476.07 4284.84 7473.21 4283.4 C 7454.58 4277.67 7425.91 4279.1 7408.71 4269.07 C 7404.41 4266.21 7404.41 4259.04 7400.12 4257.61 C 7395.82 4257.61 7394.38 4263.34 7390.08 4264.77 C 7391.52 4269.07 7391.52 4271.94 7390.08 4274.8 C 7388.65 4277.67 7381.48 4273.37 7381.48 4276.24 C 7380.05 4292 7400.12 4306.33 7395.82 4322.1 C 7391.52 4340.73 7315.56 4339.3 7318.43 4330.7 C 7319.86 4327.83 7321.29 4324.97 7322.72 4322.1 C 7306.96 4339.3 7289.76 4336.43 7266.83 4342.16 C 7263.96 4342.16 7259.67 4340.73 7259.67 4343.6 C 7258.23 4355.06 7263.96 4366.53 7263.96 4377.99 C 7263.96 4398.06 7253.93 4419.55 7236.73 4436.75 C 7318.43 4448.22 7511.9 4441.05 7577.83 4402.36 C 7577.83 4402.36 7577.83 4402.36 7579.26 4400.92 M 7357.12 4263.34 C 7357.12 4263.34 7355.69 4263.34 7355.69 4263.34 C 7354.25 4267.64 7351.39 4273.37 7349.95 4277.67 C 7352.82 4273.37 7355.69 4267.64 7357.12 4263.34 " }
+ }
+ }
+ // PATH visit im count: 10
+ DemoShape {
+ objectName: "im"
+ ShapePath {
+ objectName: "svg_path:im"
+ // boundingRect: 4575.97, 4351.37 54.7176x60.3339
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 4630.62 4351.37 C 4623.46 4352.8 4616.29 4352.8 4609.13 4357.1 C 4603.39 4361.4 4601.96 4371.43 4596.23 4377.16 C 4534.6 4433.06 4633.49 4418.73 4630.62 4351.37 " }
+ }
+ }
+ // PATH visit fo count: 26
+ DemoShape {
+ objectName: "fo"
+ ShapePath {
+ objectName: "svg_path:fo"
+ // boundingRect: 4732.49, 2985.47 44.4281x176.62
+ strokeColor: "#aa805d"
+ strokeWidth: 4.58365
+ fillColor: "#fffff7df"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 4736.79 3126.26 C 4735.36 3139.16 4732.49 3162.09 4732.49 3162.09 C 4732.49 3162.09 4735.36 3139.16 4736.79 3126.26 M 4758.29 2985.81 C 4741.09 3021.64 4765.45 2977.21 4769.75 2998.71 C 4769.75 3001.58 4762.59 3001.58 4762.59 3003.01 C 4765.45 3008.74 4776.92 3007.31 4776.92 3013.04 C 4776.92 3023.07 4774.05 3040.27 4764.02 3040.27 C 4755.42 3038.84 4765.45 3021.64 4764.02 3013.04 C 4759.72 2998.71 4716.72 2982.95 4758.29 2985.81 " }
+ }
+ }
+ } // END countries type: G 1
+ } // END Europakarte type: DOC 0
+}
diff --git a/examples/quick/quickshapes/weatherforecast/Gear.qml b/examples/quick/quickshapes/weatherforecast/Gear.qml
new file mode 100644
index 0000000000..ef6db2b090
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/Gear.qml
@@ -0,0 +1,5 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+Gear_generated {
+}
diff --git a/examples/quick/quickshapes/weatherforecast/Gear_generated.qml b/examples/quick/quickshapes/weatherforecast/Gear_generated.qml
new file mode 100644
index 0000000000..473f7235e0
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/Gear_generated.qml
@@ -0,0 +1,36 @@
+// Copyright (C) 2023 Framework7
+// SPDX-License-Identifier: MIT
+// Generated from: assets/gear-alt-stroke.svg
+import QtQuick
+import QtQuick.Shapes
+
+Item {
+ // viewBox 0, 0 56x56
+ // size 56x56
+ implicitWidth: 56
+ implicitHeight: 56
+ // START svg4 type: DOC 0
+ Item { // structure node
+ transform: [
+ Scale { xScale: width / 56; yScale: height / 56 }
+ ]
+ objectName: "svg4"
+ // skipping DEFS "defs8"
+ // PATH visit path2 count: 78
+ DemoShape {
+ objectName: "path2"
+ // Translate 4, 4
+ x: 4
+ y: 4
+ ShapePath {
+ objectName: "svg_path:path2"
+ // boundingRect: 0.682945, 0.682945 46.7504x46.7504
+ strokeColor: "#333333"
+ strokeWidth: 3
+ fillColor: "transparent"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 18.7918 47.4333 C 16.3367 46.8901 14.0229 45.9709 11.9139 44.7392 L 12.0378 42.3144 C 12.2067 39.0073 9.65397 36.4638 6.35565 36.6322 L 3.67513 36.7691 C 2.41991 34.7754 1.44994 32.584 0.822479 30.2522 L 2.92622 28.3529 C 5.38411 26.1339 5.37761 22.5303 2.92622 20.3171 L 0.682945 18.2919 C 1.23975 16.0095 2.12294 13.855 3.28025 11.8807 L 6.35565 12.0378 C 9.66271 12.2067 12.2062 9.65397 12.0378 6.35565 L 11.8807 3.28025 C 13.855 2.12294 16.0095 1.23975 18.2919 0.682945 L 20.3171 2.92622 C 22.5361 5.38411 26.1397 5.37761 28.3529 2.92622 L 30.2522 0.822479 C 32.584 1.44994 34.7754 2.41991 36.7691 3.67513 L 36.6322 6.35565 C 36.4633 9.66271 39.016 12.2062 42.3144 12.0378 L 44.7392 11.9139 C 45.9709 14.0229 46.8901 16.3367 47.4333 18.7918 L 45.7438 20.3171 C 43.2859 22.5361 43.2924 26.1397 45.7438 28.3529 L 47.304 29.7614 C 46.6874 32.2638 45.6783 34.6117 44.3457 36.736 L 42.3144 36.6322 C 39.0073 36.4633 36.4638 39.016 36.6322 42.3144 L 36.736 44.3457 C 34.6117 45.6783 32.2638 46.6874 29.7614 47.304 L 28.3529 45.7438 C 26.1339 43.2859 22.5303 43.2924 20.3171 45.7438 L 18.7918 47.4333 M 24 34 C 29.5228 34 34 29.5228 34 24 C 34 18.4772 29.5228 14 24 14 C 18.4772 14 14 18.4772 14 24 C 14 29.5228 18.4772 34 24 34 " }
+ }
+ }
+ } // END svg4 type: DOC 0
+}
diff --git a/examples/quick/quickshapes/weatherforecast/MapLabel.qml b/examples/quick/quickshapes/weatherforecast/MapLabel.qml
new file mode 100644
index 0000000000..66ba91ecde
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/MapLabel.qml
@@ -0,0 +1,65 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Rectangle {
+ id: mapLabel
+ property url iconSource
+ property string label
+ property int degrees
+
+ radius: 8 * mainWindow.designWindowWidthRatio
+ color: Qt.rgba(0, 0, 0, 0.05)
+ height: 42 * mainWindow.designWindowHeightRatio
+ width: labelText.width + divider.width + labelDegrees.width + iconLoader.width + row.padding * 5
+
+ x: -height / 2
+ y: -height / 2
+
+ Row {
+ id: row
+ anchors.fill: parent
+ padding: 8 * mainWindow.designWindowWidthRatio
+ spacing: padding
+
+ Text {
+ id: labelText
+ text: mapLabel.label
+ color: "#333"
+ font.family: workSansRegular.font.family
+ font.pixelSize: 22 * mainWindow.designWindowHeightRatio
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ Rectangle {
+ id: divider
+ color: "#333"
+ width: 2 * mainWindow.designWindowWidthRatio
+ antialiasing: true
+ height: labelText.implicitHeight
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ Text {
+ id: labelDegrees
+ text: degrees+"°"
+ color: "#333"
+ font.family: workSansRegular.font.family
+ font.pixelSize: 22 * mainWindow.designWindowHeightRatio
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ Loader {
+ id: iconLoader
+ source: mapLabel.iconSource
+
+ // TODO: implement PreserveAspectRatio in Shapes
+ property real aspectRatio: implicitWidth / implicitHeight
+ width: 25 * mainWindow.designWindowWidthRatio
+ height: width / aspectRatio
+
+ anchors.verticalCenter: parent.verticalCenter
+ }
+ }
+}
diff --git a/examples/quick/quickshapes/weatherforecast/SettingsDrawer.qml b/examples/quick/quickshapes/weatherforecast/SettingsDrawer.qml
new file mode 100644
index 0000000000..deb6b02b95
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/SettingsDrawer.qml
@@ -0,0 +1,117 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Layouts
+import QtQuick.Controls
+
+Page {
+ id: settingsDrawer
+ default property alias content: contentLayout.children
+ required property bool isLandscape
+ readonly property bool isMobile: Qt.platform.os === "android" || Qt.platform.os === "ios"
+ property bool isOpen: false
+
+ title: "Settings"
+
+ onIsLandscapeChanged: updateState();
+ Component.onCompleted: updateState();
+ onIsOpenChanged: updateState();
+ x: 0
+ y: 0
+
+ function updateState() {
+ if (isOpen)
+ if (isLandscape)
+ settingsDrawer.state = "Landscape_Visible"
+ else
+ settingsDrawer.state = "Portrait_Visible"
+ else
+ if (isLandscape)
+ settingsDrawer.state = "Landscape_Hidden"
+ else
+ settingsDrawer.state = "Portrait_Hidden"
+ }
+
+ states: [
+ State {
+ name: "Landscape_Visible"
+ PropertyChanges {
+ settingsDrawer.x: 0
+ }
+ },
+ State {
+ name: "Landscape_Hidden"
+ PropertyChanges {
+ settingsDrawer.x: -settingsDrawer.width
+ }
+ },
+ State {
+ name: "Portrait_Visible"
+ PropertyChanges {
+ settingsDrawer.y: 0
+ }
+ },
+ State {
+ name: "Portrait_Hidden"
+ PropertyChanges {
+ settingsDrawer.y: -settingsDrawer.height
+ }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ from: "Landscape_Visible"
+ to: "Landscape_Hidden"
+ NumberAnimation {
+ duration: 400
+ property: "x"
+ easing.type: Easing.InOutQuad
+ }
+ },
+ Transition {
+ from: "Landscape_Hidden"
+ to: "Landscape_Visible"
+ NumberAnimation {
+ duration: 400
+ property: "x"
+ easing.type: Easing.InOutQuad
+ }
+ },
+ Transition {
+ from: "Portrait_Visible"
+ to: "Portrait_Hidden"
+ NumberAnimation {
+ duration: 400
+ property: "y"
+ easing.type: Easing.InOutQuad
+ }
+ },
+ Transition {
+ from: "Portrait_Hidden"
+ to: "Portrait_Visible"
+ NumberAnimation {
+ duration: 400
+ property: "y"
+ easing.type: Easing.InOutQuad
+ }
+ }
+ ]
+
+ header: Label {
+ text: settingsDrawer.title
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ font.pointSize: 20
+ }
+
+ ScrollView {
+ anchors.fill: parent
+ padding: 10
+
+ ColumnLayout {
+ id: contentLayout
+ }
+ }
+}
diff --git a/examples/quick/quickshapes/weatherforecast/Sun.qml b/examples/quick/quickshapes/weatherforecast/Sun.qml
new file mode 100644
index 0000000000..b65a11371d
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/Sun.qml
@@ -0,0 +1,5 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+Sun_generated {
+}
diff --git a/examples/quick/quickshapes/weatherforecast/SunBehindCloud.qml b/examples/quick/quickshapes/weatherforecast/SunBehindCloud.qml
new file mode 100644
index 0000000000..7ca3eee981
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/SunBehindCloud.qml
@@ -0,0 +1,5 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+SunBehindCloud_generated {
+}
diff --git a/examples/quick/quickshapes/weatherforecast/SunBehindCloud_generated.qml b/examples/quick/quickshapes/weatherforecast/SunBehindCloud_generated.qml
new file mode 100644
index 0000000000..b64fe5bf57
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/SunBehindCloud_generated.qml
@@ -0,0 +1,90 @@
+// Copyright (C) 2023 Googlefonts
+// SPDX-License-Identifier: Apache-2.0
+// Generated from: assets/sun-behind-cloud-svgrepo-com.svg
+import QtQuick
+import QtQuick.Shapes
+
+Item {
+ // viewBox 0, 0 128x128
+ // size 800x800
+ implicitWidth: 800
+ implicitHeight: 800
+ // START type: DOC 0
+ DemoShape { //combined path container
+ transform: [
+ Scale { xScale: width / 128; yScale: height / 128 }
+ ]
+ // PATH visit count: 13
+ ShapePath {
+ // boundingRect: 24.455, 35.8525 49.3712x49.8728
+ strokeColor: "transparent"
+ fillColor: "#fffcc11a"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 29.53 45.25 C 22.39 54.42 22.51 70.73 31.64 78.8 C 42 87.97 56.57 87.88 65.74 79.44 C 76.73 69.33 76.1 52.49 66.38 42.96 C 56.61 33.37 39.15 32.87 29.53 45.25 " }
+ }
+ // PATH visit count: 13
+ ShapePath {
+ // boundingRect: 32.2619, 41.832 10.7315x13.1421
+ strokeColor: "transparent"
+ fillColor: "#fffee269"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 40.99 42.1 C 38.17 40.85 35.08 44.25 33.73 46.58 C 32.38 48.91 31.13 53.48 34 54.64 C 36.87 55.8 38.93 53.83 40.99 50.43 C 43.05 47.03 44.21 43.54 40.99 42.1 " }
+ }
+ // PATH visit count: 19
+ ShapePath {
+ // boundingRect: 47.9692, 15.7549 13.1149x17.8884
+ strokeColor: "transparent"
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 48.34 29.31 C 47.66 30.59 47.89 31.57 49.24 31.9 C 50.6 32.22 59.06 33.6 59.77 33.64 C 60.8 33.7 61.19 32.93 61.06 32.02 C 60.93 31.12 58.86 18.45 58.67 17.28 C 58.48 16.12 57.25 14.95 56.08 16.5 C 54.93 18.07 48.85 28.34 48.34 29.31 " }
+ }
+ // PATH visit count: 19
+ ShapePath {
+ // boundingRect: 69.1814, 34.4063 18.2257x15.4262
+ strokeColor: "transparent"
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 70.25 38.1 C 68.92 38.51 68.96 39.33 69.67 40.36 C 70.38 41.39 75.29 48.89 75.75 49.41 C 76.21 49.93 76.98 50.06 77.62 49.28 C 78.26 48.5 86.34 37.19 86.93 36.48 C 87.9 35.32 87.32 34.09 85.83 34.48 C 84.69 34.78 71.09 37.85 70.25 38.1 " }
+ }
+ // PATH visit count: 19
+ ShapePath {
+ // boundingRect: 10.8789, 71.5427 18.0836x15.5928
+ strokeColor: "transparent"
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 19.84 72.49 C 20.74 71 21.91 71.39 22.75 72.81 C 23.33 73.78 28.18 80.31 28.63 81.02 C 29.08 81.73 29.28 83.09 27.85 83.41 C 26.43 83.73 14.86 86.77 13.05 87.09 C 11.24 87.41 10.21 85.99 11.37 84.44 C 12.05 83.54 19.32 73.33 19.84 72.49 " }
+ }
+ // PATH visit count: 19
+ ShapePath {
+ // boundingRect: 3.98165, 48.399 18.0509x13.2527
+ strokeColor: "transparent"
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 17.38 61.24 C 19.03 61.98 19.81 61.71 20.16 60.53 C 20.61 58.98 21.97 51.87 22.03 50.25 C 22.07 49.2 21.64 48.18 20.03 48.44 C 18.41 48.7 6.78 50.31 5.29 50.83 C 3.56 51.43 3.69 53.33 4.84 53.93 C 6.2 54.65 16.22 60.72 17.38 61.24 " }
+ }
+ // PATH visit count: 19
+ ShapePath {
+ // boundingRect: 22.4845, 22.1259 15.5758x18.5311
+ strokeColor: "transparent"
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 37.48 34.1 C 38.41 33.36 38.13 32.29 37.29 31.71 C 36.45 31.13 26.07 23.62 24.75 22.6 C 23.59 21.7 22.16 22.02 22.55 24.09 C 22.83 25.57 26.14 38.57 26.36 39.47 C 26.62 40.5 27.39 41.02 28.3 40.37 C 29.21 39.72 36.51 34.87 37.48 34.1 " }
+ }
+ // PATH visit count: 28
+ ShapePath {
+ // boundingRect: 19.1486, 46.294 104.389x55.916
+ strokeColor: "transparent"
+ fillColor: "#ffe2ebee"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 109.13 81.18 C 109.13 81.18 110.58 52.73 87.55 47.18 C 64.52 41.63 57.81 63.97 57.81 63.97 C 57.81 63.97 50.13 62.18 43.01 68.1 C 37.42 72.75 36.63 79.73 36.63 79.73 C 36.63 79.73 29.28 78.61 23.16 84.55 C 18.73 88.85 19.16 94.37 19.16 94.37 L 28.08 102.21 L 118.73 99.76 L 123.5 94.64 C 123.5 94.64 124.26 88.96 118.96 84.69 C 113.66 80.41 109.13 81.18 109.13 81.18 " }
+ }
+ // PATH visit count: 43
+ ShapePath {
+ // boundingRect: 19.168, 92.23 104.332x12.3586
+ strokeColor: "transparent"
+ fillColor: "#ffb9ced3"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 40.64 92.23 C 40.64 92.23 44.25 96.31 55.7 96.04 C 67.15 95.77 70.16 92.77 70.16 92.77 C 70.16 92.77 75.18 98.04 89.69 96.92 C 104.2 95.8 108.37 92.74 108.37 92.74 C 108.37 92.74 111.91 95.27 116.39 95.34 C 120.86 95.41 123.5 94.63 123.5 94.63 C 123.5 94.63 123.03 98.19 121.47 100.47 C 119.91 102.75 117.31 104.49 113.2 104.46 C 109.08 104.43 96.56 104.54 83.85 104.52 C 71.14 104.5 34.82 104.71 29.45 104.48 C 25.36 104.31 22.39 101.9 21.02 99.86 C 18.83 96.6 19.19 93.16 19.19 93.16 C 19.19 93.16 23.31 96.39 28.87 96.15 C 36.47 95.83 40.64 92.23 40.64 92.23 " }
+ }
+ } // END type: DOC 0
+}
diff --git a/examples/quick/quickshapes/weatherforecast/SunBehindLargeCloud_generated.qml b/examples/quick/quickshapes/weatherforecast/SunBehindLargeCloud_generated.qml
new file mode 100644
index 0000000000..3122c64b9c
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/SunBehindLargeCloud_generated.qml
@@ -0,0 +1,90 @@
+// Copyright (C) 2023 Googlefonts
+// SPDX-License-Identifier: Apache-2.0
+// Generated from: assets/sun-behind-large-cloud-svgrepo-com.svg
+import QtQuick
+import QtQuick.Shapes
+
+Item {
+ // viewBox 0, 0 128x128
+ // size 800x800
+ implicitWidth: 800
+ implicitHeight: 800
+ // START type: DOC 0
+ DemoShape { //combined path container
+ transform: [
+ Scale { xScale: width / 128; yScale: height / 128 }
+ ]
+ // PATH visit count: 13
+ ShapePath {
+ // boundingRect: 25.7146, 32.9147 33.1229x33.4701
+ strokeColor: "transparent"
+ fillColor: "#fffcc11a"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 29.12 39.22 C 24.33 45.38 24.41 56.32 30.53 61.74 C 37.48 67.89 47.26 67.83 53.41 62.17 C 60.79 55.38 60.36 44.08 53.84 37.69 C 47.29 31.25 35.58 30.91 29.12 39.22 " }
+ }
+ // PATH visit count: 13
+ ShapePath {
+ // boundingRect: 30.9585, 36.9296 7.20214x8.82548
+ strokeColor: "transparent"
+ fillColor: "#fffee269"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 36.81 37.11 C 34.92 36.27 32.84 38.55 31.94 40.12 C 31.04 41.68 30.2 44.75 32.12 45.53 C 34.04 46.31 35.43 44.99 36.81 42.7 C 38.2 40.41 38.98 38.07 36.81 37.11 " }
+ }
+ // PATH visit count: 19
+ ShapePath {
+ // boundingRect: 41.4903, 19.4387 8.81367x11.9934
+ strokeColor: "transparent"
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 41.74 28.53 C 41.28 29.39 41.44 30.05 42.35 30.26 C 43.26 30.48 48.94 31.4 49.42 31.43 C 50.11 31.47 50.37 30.95 50.29 30.35 C 50.21 29.75 48.82 21.24 48.69 20.46 C 48.56 19.68 47.74 18.9 46.96 19.94 C 46.18 20.98 42.09 27.88 41.74 28.53 " }
+ }
+ // PATH visit count: 19
+ ShapePath {
+ // boundingRect: 55.7317, 31.9409 12.2375x10.3504
+ strokeColor: "transparent"
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 56.45 34.42 C 55.56 34.7 55.58 35.24 56.06 35.94 C 56.54 36.63 59.83 41.66 60.14 42.01 C 60.44 42.36 60.96 42.44 61.4 41.92 C 61.83 41.4 67.25 33.81 67.65 33.33 C 68.3 32.55 67.91 31.73 66.91 31.99 C 66.14 32.19 57.01 34.25 56.45 34.42 " }
+ }
+ // PATH visit count: 19
+ ShapePath {
+ // boundingRect: 16.6111, 56.8641 12.1295x10.4676
+ strokeColor: "transparent"
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 22.62 57.5 C 23.23 56.5 24.01 56.76 24.57 57.72 C 24.96 58.37 28.21 62.75 28.52 63.23 C 28.82 63.71 28.95 64.62 28 64.83 C 27.05 65.05 19.28 67.09 18.07 67.3 C 16.86 67.52 16.16 66.56 16.94 65.52 C 17.39 64.91 22.27 58.06 22.62 57.5 " }
+ }
+ // PATH visit count: 19
+ ShapePath {
+ // boundingRect: 11.9801, 41.3307 12.1119x8.89368
+ strokeColor: "transparent"
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 20.97 49.95 C 22.08 50.44 22.6 50.27 22.83 49.47 C 23.13 48.43 24.04 43.66 24.09 42.57 C 24.12 41.86 23.83 41.18 22.75 41.36 C 21.67 41.53 13.86 42.62 12.86 42.96 C 11.7 43.36 11.78 44.64 12.56 45.04 C 13.47 45.53 20.19 49.6 20.97 49.95 " }
+ }
+ // PATH visit count: 19
+ ShapePath {
+ // boundingRect: 24.4062, 23.699 10.4393x12.4393
+ strokeColor: "transparent"
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 34.46 31.74 C 35.08 31.24 34.89 30.53 34.33 30.14 C 33.77 29.75 26.8 24.71 25.92 24.02 C 25.14 23.41 24.19 23.63 24.45 25.02 C 24.64 26.02 26.86 34.74 27.01 35.34 C 27.18 36.03 27.7 36.38 28.31 35.95 C 28.91 35.51 33.81 32.26 34.46 31.74 " }
+ }
+ // PATH visit count: 28
+ ShapePath {
+ // boundingRect: 4.23467, 37.495 119.251x63.625
+ strokeColor: "transparent"
+ fillColor: "#ffe2ebee"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 107.33 76.86 C 107.19 76.4 111.85 42.97 81.48 38.03 C 54.28 33.61 48.38 58.03 48.38 58.03 C 48.38 58.03 38.05 56.3 30.62 63.64 C 24.49 69.69 23.69 76.5 23.69 76.5 C 23.69 76.5 16.1 75 9.46 80.07 C 2.78 85.17 4.41 90.5 4.41 90.5 L 19.77 101.12 L 110.32 98.4 L 123.18 94.96 C 123.18 94.96 125.39 87.15 117.93 81.16 C 111.91 76.33 107.33 76.86 107.33 76.86 " }
+ }
+ // PATH visit count: 40
+ ShapePath {
+ // boundingRect: 4.26296, 87.98 119.212x15.8916
+ strokeColor: "transparent"
+ fillColor: "#ffb9ced3"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 30.29 90.24 C 30.29 90.24 24.88 93.78 16.16 92.84 C 6.17 91.76 4.34 87.98 4.34 87.98 C 4.34 87.98 3.25 95.38 9.27 100.37 C 14.71 104.88 21.56 103.72 31.1 103.78 C 40.64 103.84 104.73 103.75 110.79 103.81 C 115.75 103.86 119.76 102.31 121.88 98.18 C 123.89 94.28 123.43 92.16 123.43 92.16 C 123.43 92.16 119.82 94.4 111.96 93.48 C 105.17 92.69 101.85 89.95 101.85 89.95 C 101.85 89.95 93.22 94.37 78.81 94.19 C 63.71 94 58.58 88.46 58.58 88.46 C 58.58 88.46 53.68 93.1 42.91 92.83 C 32.14 92.56 30.29 90.24 30.29 90.24 " }
+ }
+ } // END type: DOC 0
+}
diff --git a/examples/quick/quickshapes/weatherforecast/SunBehindRainCloud.qml b/examples/quick/quickshapes/weatherforecast/SunBehindRainCloud.qml
new file mode 100644
index 0000000000..9a3c593174
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/SunBehindRainCloud.qml
@@ -0,0 +1,5 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+SunBehindRainCloud_generated {
+}
diff --git a/examples/quick/quickshapes/weatherforecast/SunBehindRainCloud_generated.qml b/examples/quick/quickshapes/weatherforecast/SunBehindRainCloud_generated.qml
new file mode 100644
index 0000000000..130129af53
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/SunBehindRainCloud_generated.qml
@@ -0,0 +1,138 @@
+// Copyright (C) 2023 Googlefonts
+// SPDX-License-Identifier: Apache-2.0
+// Generated from: assets/sun-behind-rain-cloud-svgrepo-com.svg
+import QtQuick
+import QtQuick.Shapes
+
+Item {
+ // viewBox 0, 0 128x128
+ // size 800x800
+ implicitWidth: 800
+ implicitHeight: 800
+ // START type: DOC 0
+ DemoShape { //combined path container
+ transform: [
+ Scale { xScale: width / 128; yScale: height / 128 }
+ ]
+ // PATH visit count: 13
+ ShapePath {
+ // boundingRect: 34.0183, 21.2222 41.6055x42.0205
+ strokeColor: "transparent"
+ fillColor: "#fffcc11a"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 38.29 29.14 C 32.28 36.87 32.38 50.61 40.07 57.41 C 48.8 65.13 61.08 65.06 68.81 57.95 C 78.07 49.43 77.54 35.24 69.35 27.21 C 61.11 19.13 46.4 18.71 38.29 29.14 " }
+ }
+ // PATH visit count: 13
+ ShapePath {
+ // boundingRect: 40.5962, 26.2619 9.04604x11.0908
+ strokeColor: "transparent"
+ fillColor: "#fffee269"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 47.95 26.49 C 45.57 25.43 42.97 28.3 41.83 30.27 C 40.7 32.23 39.64 36.08 42.06 37.07 C 44.48 38.05 46.21 36.39 47.95 33.52 C 49.69 30.64 50.67 27.7 47.95 26.49 " }
+ }
+ // PATH visit count: 19
+ ShapePath {
+ // boundingRect: 53.8243, 4.29781 11.0661x15.0649
+ strokeColor: "transparent"
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 54.14 15.71 C 53.56 16.79 53.76 17.62 54.9 17.89 C 56.04 18.16 63.18 19.32 63.78 19.36 C 64.65 19.41 64.98 18.76 64.87 18 C 64.76 17.24 63.02 6.56 62.85 5.58 C 62.69 4.6 61.65 3.62 60.67 4.93 C 59.69 6.24 54.58 14.89 54.14 15.71 " }
+ }
+ // PATH visit count: 19
+ ShapePath {
+ // boundingRect: 71.6983, 20.0076 15.3551x12.9961
+ strokeColor: "transparent"
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 72.6 23.12 C 71.48 23.47 71.51 24.15 72.11 25.03 C 72.71 25.9 76.85 32.22 77.23 32.65 C 77.61 33.09 78.26 33.19 78.81 32.54 C 79.36 31.89 86.16 22.35 86.65 21.76 C 87.47 20.78 86.98 19.74 85.72 20.07 C 84.78 20.32 73.31 22.9 72.6 23.12 " }
+ }
+ // PATH visit count: 19
+ ShapePath {
+ // boundingRect: 22.5769, 51.2931 15.2318x13.1453
+ strokeColor: "transparent"
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 30.12 52.09 C 30.88 50.84 31.86 51.16 32.57 52.36 C 33.05 53.18 37.14 58.68 37.53 59.28 C 37.91 59.88 38.07 61.02 36.88 61.3 C 35.68 61.57 25.93 64.13 24.41 64.4 C 22.89 64.67 22.01 63.47 22.99 62.17 C 23.56 61.4 29.69 52.8 30.12 52.09 " }
+ }
+ // PATH visit count: 19
+ ShapePath {
+ // boundingRect: 16.7694, 31.7949 15.2134x11.1614
+ strokeColor: "transparent"
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 28.06 42.61 C 29.45 43.23 30.11 43.01 30.4 42.01 C 30.78 40.7 31.92 34.71 31.98 33.35 C 32.02 32.46 31.65 31.61 30.29 31.83 C 28.93 32.05 19.13 33.41 17.87 33.85 C 16.42 34.36 16.52 35.96 17.49 36.46 C 18.63 37.06 27.08 42.18 28.06 42.61 " }
+ }
+ // PATH visit count: 19
+ ShapePath {
+ // boundingRect: 32.3542, 9.63925 13.1208x15.6136
+ strokeColor: "transparent"
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 44.99 19.74 C 45.77 19.11 45.53 18.22 44.83 17.72 C 44.12 17.23 35.37 10.9 34.26 10.04 C 33.28 9.28 32.08 9.55 32.41 11.29 C 32.64 12.54 35.43 23.5 35.62 24.25 C 35.84 25.12 36.49 25.56 37.25 25.01 C 38.02 24.48 44.18 20.39 44.99 19.74 " }
+ }
+ // PATH visit count: 27
+ ShapePath {
+ // boundingRect: 19.6233, 35.0519 92.0786x46.5981
+ strokeColor: "transparent"
+ fillColor: "#ffe2ebee"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 99.22 65.16 C 99.22 65.16 102.76 41.69 81.62 36.13 C 58.67 30.09 53.29 51.4 53.29 51.4 C 53.29 51.4 46.61 49.58 40.44 54.54 C 35.61 58.42 34.78 65.26 34.78 65.26 C 34.78 65.26 25.37 64.94 21.33 71.43 C 17.49 77.6 21.33 81.65 21.33 81.65 L 76.87 79.42 L 111.06 79.62 C 111.06 79.62 113.53 73.2 108.78 68.75 C 104.02 64.31 99.22 65.16 99.22 65.16 " }
+ }
+ // PATH visit count: 52
+ ShapePath {
+ // boundingRect: 19.64, 64.4059 92.0852x22.3779
+ strokeColor: "transparent"
+ fillColor: "#ffb9ced3"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 61.29 67.49 C 61.29 67.49 65.54 71.74 76.67 71.03 C 87.8 70.32 93.66 66.38 94.98 65.77 C 96.3 65.16 97.81 63.75 98.32 64.76 C 98.83 65.77 97.71 68.6 96.2 70.63 C 94.68 72.65 93.83 73.88 93.57 74.78 C 93.37 75.49 96.71 76.5 102.98 76.8 C 108.34 77.06 111.72 75.98 111.72 75.98 C 111.72 75.98 111.87 79.35 110.56 81.98 C 109.34 84.41 108.07 85.2 106.05 85.61 C 105.01 85.82 85.38 85.81 68.49 86.21 C 51.6 86.61 29.54 87.32 25.8 86.11 C 22.06 84.9 21.14 82.53 20.66 81.61 C 19.82 80.03 19.64 77.56 19.64 77.56 C 19.64 77.56 23.78 79.64 29.65 78.83 C 35.52 78.02 38.65 74.99 39.46 74.68 C 40.27 74.38 44.11 76.3 50.18 74.78 C 58.66 72.65 61.29 67.49 61.29 67.49 " }
+ }
+ // PATH visit count: 10
+ ShapePath {
+ // boundingRect: 37.616, 90.8719 11.1663x16.7914
+ strokeColor: "transparent"
+ fillColor: "#ff4fc2f7"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 47.26 90.91 C 45.94 90.43 40.21 94.54 38.15 100.02 C 35.11 108.11 45.94 110.81 48.22 103.02 C 49.09 100.06 49.08 91.57 47.26 90.91 " }
+ }
+ // PATH visit count: 13
+ ShapePath {
+ // boundingRect: 80.0867, 96.7588 11.3411x16.8179
+ strokeColor: "transparent"
+ fillColor: "#ff4fc2f7"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 90.07 96.81 C 88.9 96.29 84.25 99.83 82.14 102.8 C 80.12 105.64 78.32 110.44 83.28 112.9 C 88.69 115.57 91.15 109.76 91.38 105.54 C 91.59 101.72 91.1 97.27 90.07 96.81 " }
+ }
+ // PATH visit count: 10
+ ShapePath {
+ // boundingRect: 56.5834, 106.381 11.2326x16.7162
+ strokeColor: "transparent"
+ fillColor: "#ff4fc2f7"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 66.52 106.4 C 65.05 106.05 59.41 110.63 57.39 114.9 C 53.34 123.46 65.78 126.48 67.32 118.27 C 68.3 113.06 67.72 106.68 66.52 106.4 " }
+ }
+ // PATH visit count: 10
+ ShapePath {
+ // boundingRect: 58.021, 112.999 4.24576x7.23228
+ strokeColor: "transparent"
+ fillColor: "#ffafe6f8"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 61.24 113.05 C 60.07 112.58 57.79 115.45 58.04 118 C 58.3 120.55 60.4 120.78 61.4 119.37 C 62.74 117.5 62.4 113.51 61.24 113.05 " }
+ }
+ // PATH visit count: 10
+ ShapePath {
+ // boundingRect: 38.6898, 97.5009 4.26287x6.93974
+ strokeColor: "transparent"
+ fillColor: "#ffafe6f8"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 41.68 97.56 C 40.57 97.04 38.67 100.08 38.69 101.65 C 38.74 104.85 41.1 105.06 42.2 103.48 C 43.3 101.91 43.25 98.3 41.68 97.56 " }
+ }
+ // PATH visit count: 10
+ ShapePath {
+ // boundingRect: 81.401, 103.683 4.67559x7.32839
+ strokeColor: "transparent"
+ fillColor: "#ffafe6f8"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 84.83 103.77 C 83.51 103.14 81.24 106.05 81.41 108.16 C 81.71 111.8 84.6 111.58 85.57 109.59 C 86.54 107.6 86.02 104.34 84.83 103.77 " }
+ }
+ } // END type: DOC 0
+}
diff --git a/examples/quick/quickshapes/weatherforecast/SunBehindSmallCloud.qml b/examples/quick/quickshapes/weatherforecast/SunBehindSmallCloud.qml
new file mode 100644
index 0000000000..b9d39522bf
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/SunBehindSmallCloud.qml
@@ -0,0 +1,5 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+SunBehindSmallCloud_generated {
+}
diff --git a/examples/quick/quickshapes/weatherforecast/SunBehindSmallCloud_generated.qml b/examples/quick/quickshapes/weatherforecast/SunBehindSmallCloud_generated.qml
new file mode 100644
index 0000000000..da849732cf
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/SunBehindSmallCloud_generated.qml
@@ -0,0 +1,106 @@
+// Copyright (C) 2023 Googlefonts
+// SPDX-License-Identifier: Apache-2.0
+// Generated from: assets/sun-behind-small-cloud-svgrepo-com.svg
+import QtQuick
+import QtQuick.Shapes
+
+Item {
+ // viewBox 0, 0 128x128
+ // size 800x800
+ implicitWidth: 800
+ implicitHeight: 800
+ // START type: DOC 0
+ DemoShape { //combined path container
+ transform: [
+ Scale { xScale: width / 128; yScale: height / 128 }
+ ]
+ // PATH visit count: 13
+ ShapePath {
+ // boundingRect: 27.7018, 34.4865 57.227x57.809
+ strokeColor: "transparent"
+ fillColor: "#fffcc11a"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 33.58 45.38 C 25.31 56.01 25.45 74.91 36.02 84.27 C 48.03 94.9 64.92 94.79 75.55 85.01 C 88.3 73.29 87.56 53.77 76.3 42.72 C 64.98 31.61 44.74 31.03 33.58 45.38 " }
+ }
+ // PATH visit count: 13
+ ShapePath {
+ // boundingRect: 36.7609, 41.4189 12.4351x15.2413
+ strokeColor: "transparent"
+ fillColor: "#fffee269"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 46.87 41.73 C 43.6 40.28 40.02 44.22 38.46 46.92 C 36.9 49.62 35.45 54.92 38.77 56.27 C 42.09 57.62 44.48 55.34 46.87 51.39 C 49.26 47.44 50.61 43.39 46.87 41.73 " }
+ }
+ // PATH visit count: 19
+ ShapePath {
+ // boundingRect: 54.9601, 11.2148 15.2177x20.7191
+ strokeColor: "transparent"
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 55.39 26.91 C 54.6 28.4 54.87 29.53 56.44 29.91 C 58.01 30.28 67.83 31.88 68.65 31.93 C 69.85 32 70.3 31.11 70.15 30.06 C 70 29.01 67.6 14.32 67.38 12.98 C 67.16 11.64 65.73 10.28 64.38 12.08 C 63.03 13.87 55.99 25.79 55.39 26.91 " }
+ }
+ // PATH visit count: 19
+ ShapePath {
+ // boundingRect: 78.1267, 30.7303 20.5286x19.0219
+ strokeColor: "transparent"
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 79.23 37.03 C 77.75 37.67 77.9 38.61 78.85 39.71 C 79.8 40.81 86.41 48.83 86.99 49.37 C 87.58 49.91 88.49 49.96 89.13 48.98 C 89.77 48 97.65 33.95 98.24 33.06 C 99.21 31.6 98.39 30.26 96.72 30.89 C 95.46 31.38 80.16 36.63 79.23 37.03 " }
+ }
+ // PATH visit count: 19
+ ShapePath {
+ // boundingRect: 68.7867, 86.5617 18.1037x20.9806
+ strokeColor: "transparent"
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 80.19 86.84 C 81.38 86.2 82.44 86.69 82.74 88.04 C 83.04 89.39 86.34 103.17 86.86 105.72 C 87.12 107 85.66 108.04 84.46 107.29 C 83.26 106.54 70.24 97.46 69.4 96.73 C 68.2 95.68 69.03 94.59 69.62 94.03 C 70.82 92.91 79.06 87.44 80.19 86.84 " }
+ }
+ // PATH visit count: 19
+ ShapePath {
+ // boundingRect: 42.1527, 94.3999 15.7215x21.5623
+ strokeColor: "transparent"
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 43.93 94.41 C 42.42 94.27 41.98 95.61 42.21 96.81 C 42.43 98.01 44.68 113.21 44.83 114.34 C 45.05 115.99 46.78 116.66 47.9 115.01 C 49.02 113.36 56.72 101.03 57.34 99.88 C 58.46 97.78 57.64 97.33 56.52 96.81 C 55.39 96.28 45.5 94.56 43.93 94.41 " }
+ }
+ // PATH visit count: 19
+ ShapePath {
+ // boundingRect: 11.9586, 75.8565 20.9654x18.0662
+ strokeColor: "transparent"
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 22.35 76.95 C 23.4 75.23 24.75 75.68 25.72 77.32 C 26.39 78.45 32.01 86.01 32.54 86.83 C 33.06 87.65 33.29 89.23 31.64 89.6 C 29.99 89.97 16.58 93.5 14.48 93.87 C 12.38 94.24 11.18 92.6 12.53 90.8 C 13.32 89.76 21.76 77.93 22.35 76.95 " }
+ }
+ // PATH visit count: 19
+ ShapePath {
+ // boundingRect: 3.98342, 49.0428 20.9099x15.3499
+ strokeColor: "transparent"
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 19.5 63.92 C 21.42 64.77 22.32 64.46 22.72 63.1 C 23.24 61.3 24.82 53.06 24.89 51.19 C 24.94 49.97 24.44 48.79 22.57 49.09 C 20.7 49.39 7.22 51.26 5.5 51.86 C 3.5 52.56 3.64 54.76 4.98 55.46 C 6.54 56.28 18.16 63.32 19.5 63.92 " }
+ }
+ // PATH visit count: 19
+ ShapePath {
+ // boundingRect: 25.4244, 18.5677 18.0479x21.4831
+ strokeColor: "transparent"
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 42.8 32.45 C 43.88 31.59 43.55 30.35 42.58 29.68 C 41.61 29.01 29.57 20.3 28.05 19.12 C 26.7 18.07 25.05 18.45 25.5 20.84 C 25.82 22.56 29.66 37.63 29.92 38.67 C 30.22 39.87 31.12 40.47 32.17 39.72 C 33.22 38.97 41.68 33.35 42.8 32.45 " }
+ }
+ // PATH visit count: 28
+ ShapePath {
+ // boundingRect: 40.2592, 40.77 84.0624x44.63
+ strokeColor: "transparent"
+ fillColor: "#ffe2ebee"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 112.86 68.59 C 112.87 67.94 115.07 45.51 95.37 41.36 C 76.33 37.34 71.34 55.18 71.34 55.18 C 71.34 55.18 64.59 54.35 59.64 58.11 C 54.69 61.88 54.41 68.09 54.41 68.09 C 54.41 68.09 46.45 67.79 42.7 72.22 C 39.31 76.22 40.44 79.83 40.44 79.83 L 62.41 85.4 L 117.94 83.91 L 124.31 80.05 C 124.31 80.05 124.67 75 121.38 71.8 C 116.84 67.4 112.86 68.59 112.86 68.59 " }
+ }
+ // PATH visit count: 34
+ ShapePath {
+ // boundingRect: 40.262, 77.3 84.038x10.2109
+ strokeColor: "transparent"
+ fillColor: "#ffbacdd2"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 61.29 77.3 C 61.29 77.3 55.2 79.98 47.66 79.32 C 43.18 78.93 40.32 77.6 40.32 77.6 C 40.32 77.6 39.55 82.78 43.62 85.33 C 46.67 87.24 49.58 87.53 55 87.51 C 60.42 87.49 109.74 87.39 113.29 87.35 C 116.85 87.31 120.23 86.68 121.96 85.07 C 124.14 83.04 124.3 80.05 124.3 80.05 C 124.3 80.05 120.88 81.07 116.12 80.45 C 111.38 79.83 108.62 77.71 108.62 77.71 C 108.62 77.71 105.21 80.62 87.58 80.94 C 68.56 81.29 61.29 77.3 61.29 77.3 " }
+ }
+ } // END type: DOC 0
+}
diff --git a/examples/quick/quickshapes/weatherforecast/Sun_generated.qml b/examples/quick/quickshapes/weatherforecast/Sun_generated.qml
new file mode 100644
index 0000000000..c5711f12a2
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/Sun_generated.qml
@@ -0,0 +1,119 @@
+// Copyright (C) 2023 Googlefonts
+// SPDX-License-Identifier: Apache-2.0
+// Generated from: assets/sun-svgrepo-com.svg
+import QtQuick
+import QtQuick.Shapes
+
+Item {
+ // viewBox 0, 0 128x128
+ // size 800x800
+ implicitWidth: 800
+ implicitHeight: 800
+ // START svg1524 type: DOC 0
+ DemoShape { //combined path container
+ transform: [
+ Scale { xScale: width / 128; yScale: height / 128 }
+ ]
+ objectName: "svg1524"
+ // skipping DEFS "defs1528"
+ // PATH visit path1504 count: 13
+ ShapePath {
+ objectName: "svg_path:path1504"
+ // boundingRect: 30.5107, 29.1663 67.158x67.8384
+ strokeColor: "#b0ab9d"
+ strokeWidth: 0.888
+ fillColor: "#fffcc11a"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 37.41 41.95 C 27.7 54.43 27.87 76.6 40.28 87.59 C 54.37 100.06 74.2 99.93 86.67 88.46 C 101.62 74.7 100.76 51.8 87.54 38.83 C 74.25 25.79 50.5 25.11 37.41 41.95 " }
+ }
+ // PATH visit path1506 count: 13
+ ShapePath {
+ objectName: "svg_path:path1506"
+ // boundingRect: 41.1383, 37.3059 14.591x17.8796
+ strokeColor: "transparent"
+ fillColor: "#fffee269"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 53 37.67 C 49.16 35.97 44.96 40.6 43.13 43.76 C 41.3 46.93 39.6 53.14 43.5 54.73 C 47.4 56.31 50.2 53.63 53.01 49 C 55.8 44.37 57.39 39.62 53 37.67 " }
+ }
+ // PATH visit path1508 count: 19
+ ShapePath {
+ objectName: "svg_path:path1508"
+ // boundingRect: 62.4917, 1.85223 17.8593x24.3131
+ strokeColor: "#b0ab9d"
+ strokeWidth: 0.888
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 63 20.27 C 62.07 22.01 62.38 23.35 64.23 23.79 C 66.08 24.23 77.59 26.1 78.56 26.16 C 79.97 26.25 80.49 25.19 80.32 23.96 C 80.14 22.73 77.33 5.5 77.07 3.92 C 76.81 2.34 75.14 0.76 73.55 2.87 C 71.96 4.98 63.7 18.96 63 20.27 " }
+ }
+ // PATH visit path1510 count: 19
+ ShapePath {
+ objectName: "svg_path:path1510"
+ // boundingRect: 91.3437, 27.2032 24.7856x20.9868
+ strokeColor: "#b0ab9d"
+ strokeWidth: 0.888
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 92.8 32.23 C 90.99 32.79 91.04 33.9 92.01 35.31 C 92.98 36.72 99.66 46.91 100.27 47.62 C 100.89 48.32 101.94 48.5 102.82 47.44 C 103.7 46.39 114.68 30.99 115.48 30.03 C 116.8 28.45 116.01 26.78 113.99 27.3 C 112.45 27.71 93.94 31.88 92.8 32.23 " }
+ }
+ // PATH visit path1512 count: 19
+ ShapePath {
+ objectName: "svg_path:path1512"
+ // boundingRect: 100.595, 61.4539 24.575x18.2962
+ strokeColor: "#b0ab9d"
+ strokeWidth: 0.888
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 106.6 61.86 C 105.3 61.12 103.61 61.33 103.17 63 C 102.73 64.67 100.8 76.8 100.62 77.86 C 100.44 78.92 101.24 79.97 102.55 79.71 C 103.86 79.45 122 76.76 123.21 76.46 C 125.32 75.93 126.02 73.82 123.83 72.24 C 122.41 71.21 107.83 62.56 106.6 61.86 " }
+ }
+ // PATH visit path1514 count: 19
+ ShapePath {
+ objectName: "svg_path:path1514"
+ // boundingRect: 78.7207, 90.2732 21.2359x24.6316
+ strokeColor: "#b0ab9d"
+ strokeWidth: 0.888
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 92.09 90.6 C 93.49 89.85 94.73 90.42 95.08 92.01 C 95.43 93.59 99.3 109.77 99.92 112.76 C 100.23 114.26 98.51 115.49 97.11 114.61 C 95.7 113.73 80.42 103.08 79.44 102.21 C 78.03 100.98 79.01 99.7 79.7 99.05 C 81.1 97.72 90.77 91.31 92.09 90.6 " }
+ }
+ // PATH visit path1516 count: 19
+ ShapePath {
+ objectName: "svg_path:path1516"
+ // boundingRect: 47.4529, 99.4674 18.4556x25.2985
+ strokeColor: "#b0ab9d"
+ strokeWidth: 0.888
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 49.54 99.48 C 47.77 99.31 47.25 100.89 47.52 102.29 C 47.78 103.7 50.42 121.53 50.6 122.86 C 50.86 124.79 52.89 125.59 54.2 123.65 C 55.51 121.71 64.55 107.25 65.28 105.89 C 66.6 103.43 65.63 102.9 64.31 102.29 C 63 101.68 51.39 99.66 49.54 99.48 " }
+ }
+ // PATH visit path1518 count: 19
+ ShapePath {
+ objectName: "svg_path:path1518"
+ // boundingRect: 12.0424, 77.7167 24.6027x21.2165
+ strokeColor: "#b0ab9d"
+ strokeWidth: 0.888
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 24.23 79 C 25.46 76.98 27.04 77.51 28.19 79.44 C 28.97 80.76 35.57 89.64 36.19 90.6 C 36.81 91.57 37.07 93.41 35.14 93.85 C 33.19 94.3 17.46 98.43 15 98.87 C 12.54 99.31 11.13 97.38 12.71 95.27 C 13.63 94.03 23.53 80.15 24.23 79 " }
+ }
+ // PATH visit path1520 count: 19
+ ShapePath {
+ objectName: "svg_path:path1520"
+ // boundingRect: 2.66887, 46.235 24.5552x18.0221
+ strokeColor: "#b0ab9d"
+ strokeWidth: 0.888
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 20.89 63.7 C 23.14 64.7 24.2 64.34 24.67 62.73 C 25.29 60.62 27.13 50.95 27.22 48.75 C 27.28 47.32 26.69 45.94 24.49 46.29 C 22.29 46.64 6.47 48.85 4.45 49.55 C 2.1 50.37 2.27 52.95 3.83 53.77 C 5.68 54.74 19.3 63 20.89 63.7 " }
+ }
+ // PATH visit path1522 count: 19
+ ShapePath {
+ objectName: "svg_path:path1522"
+ // boundingRect: 27.8408, 10.482 21.1791x25.207
+ strokeColor: "#b0ab9d"
+ strokeWidth: 0.888
+ fillColor: "#ffffa722"
+ fillRule: ShapePath.WindingFill
+ PathSvg { path: "M 48.23 26.78 C 49.5 25.77 49.11 24.32 47.97 23.53 C 46.83 22.74 32.71 12.53 30.92 11.13 C 29.34 9.9 27.4 10.34 27.93 13.15 C 28.31 15.17 32.81 32.85 33.12 34.07 C 33.47 35.48 34.53 36.18 35.76 35.3 C 36.97 34.43 46.91 27.84 48.23 26.78 " }
+ }
+ } // END svg1524 type: DOC 0
+}
diff --git a/examples/quick/quickshapes/weatherforecast/assets/Europe.svg b/examples/quick/quickshapes/weatherforecast/assets/Europe.svg
new file mode 100644
index 0000000000..2717687f51
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/assets/Europe.svg
@@ -0,0 +1,395 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xml:space="preserve"
+ width="443.42206"
+ height="455.37424"
+ viewBox="1754 161 6480.483 6957.5929"
+ version="1.0"
+ id="Europakarte"
+ sodipodi:version="0.32"
+ inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
+ sodipodi:docname="Europe.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ style="fill:none;enable-background:new"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"><sodipodi:namedview
+ inkscape:window-height="1833"
+ inkscape:window-width="2935"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ guidetolerance="10.0"
+ gridtolerance="10.0"
+ objecttolerance="10.0"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ inkscape:zoom="2.8284271"
+ inkscape:cx="147.78532"
+ inkscape:cy="236.88077"
+ inkscape:window-x="1670"
+ inkscape:window-y="50"
+ inkscape:current-layer="countries"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ showgrid="false"
+ inkscape:pagecheckerboard="0"
+ inkscape:window-maximized="0"
+ fit-margin-top="5"
+ fit-margin-left="5"
+ fit-margin-right="5"
+ fit-margin-bottom="5"><inkscape:grid
+ type="xygrid"
+ id="grid2717"
+ originx="-1559.5366"
+ originy="-991.63777" /></sodipodi:namedview>
+ <metadata
+ id="metadata"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF>
+ </metadata>
+
+ <defs
+ style="fill:none"
+ id="defs">
+ <inkscape:perspective
+ id="perspective81"
+ inkscape:persp3d-origin="340 : -814.07375 : 1"
+ inkscape:vp_z="680 : -727.40708 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : -727.40708 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <style
+ id="style10"
+ type="text/css">
+ * { fill:none; }
+ path { fill:#C0C0C0; stroke:white; stroke-width:8; }
+ .europe {}
+ .eu {}
+ #ad {}
+ #al {}
+ #am {}
+ #at {}
+ #az {}
+ #ba {}
+ #be {}
+ #bg {}
+ #by {}
+ #ch {}
+ #cs {}
+ #cy {}
+ #cz {}
+ #de {}
+ #dk {}
+ #dz {}
+ #ee {}
+ #es {}
+ #fi {}
+ #fr {}
+ #gb {}
+ #ge {}
+ #gl {}
+ #gr {}
+ #hr {}
+ #hu {}
+ #ie {}
+ #il {}
+ #iq {}
+ #ir {}
+ #is {}
+ #it {}
+ #jo {}
+ #kz {}
+ #lb {}
+ #li {}
+ #lt {}
+ #lu {}
+ #lv {}
+ #ma {}
+ #mc {}
+ #md {}
+ #mk {}
+ #mt {}
+ #nl {}
+ #no {}
+ #pl {}
+ #pt {}
+ #rs {}
+ #rs-km {}
+ #ro {}
+ #ru {}
+ #ru-kgd {}
+ #sa {}
+ #se {}
+ #si {}
+ #sk {}
+ #sm {}
+ #sy {}
+ #tm {}
+ #tn {}
+ #tr {}
+ #ua {}
+ </style>
+ <style
+ type="text/css"
+ id="style2412">
+ * { fill:none; }
+ path { fill:#C0C0C0; stroke:white; stroke-width:8; }
+
+ .gmt /* GMT/WET (UTC) */
+ { fill:#5F61BF; }
+ .gmt-nodst
+ { fill:#C0BFFD; }
+
+ .cet /* CET (UTC+1) */
+ { fill:#C15F61; }
+ .cet-nodst
+ { fill:#FBBFC0; }
+
+ .eet /* EET (UTC+2) */
+ { fill:#D7D65C; }
+
+ .msk /* MSK (UTC+3) */
+ { fill:#5EBF5F }
+ </style>
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : -461.226 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09449 : -461.226 : 1"
+ inkscape:persp3d-origin="372.04724 : -636.6197 : 1"
+ id="perspective2459" /><inkscape:perspective
+ id="perspective2460"
+ inkscape:persp3d-origin="372.04724 : -636.6197 : 1"
+ inkscape:vp_z="744.09449 : -461.226 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : -461.226 : 1"
+ sodipodi:type="inkscape:persp3d" /></defs><g
+ style="display:inline;opacity:1;fill:none"
+ inkscape:label="countries"
+ id="countries"
+ inkscape:groupmode="layer"
+ transform="translate(-1630.407,-991.63776)"><path
+ id="fi"
+ class="eu europe"
+ d="m 7814.2981,3152.6347 c 8.599,-32.9629 35.8292,-67.3588 53.0271,-96.0222 44.4282,-78.824 71.6583,-169.1135 101.7548,-253.6703 22.9306,-61.6261 30.0965,-77.391 32.9628,-143.3165 1.4332,-10.0322 7.1658,-21.4975 2.8663,-31.5297 -11.4653,-32.9628 -139.0171,-80.2573 -171.9798,-103.1879 -4.2995,-2.8663 47.2944,-81.6905 11.4653,-108.9207 -12.8985,-10.032 -40.1287,0 -48.7276,-14.3315 -37.2624,-64.4925 8.5989,-34.3961 -2.8663,-53.0273 -17.198,-25.7969 -35.8292,-5.7325 -57.3266,-31.5296 -18.6312,-21.4975 -5.7327,-22.9305 4.2995,-42.9949 5.7325,-12.8985 -28.6634,-12.8985 -28.6634,-18.6312 1.4332,-10.0322 1.4332,-61.6261 1.4332,-63.0593 -30.0966,-25.7969 5.7326,-10.0322 14.3317,-20.0642 5.7326,-8.599 -30.0966,-60.1931 -34.3961,-65.9258 -24.3637,-32.9627 -51.5939,-71.6582 -80.2572,-100.3215 -4.2995,-4.2995 -27.2302,-21.4974 -31.5297,-30.0964 -21.4975,-40.1286 47.2945,-141.8835 20.0644,-166.2473 -7.1659,-8.5989 -20.0644,-8.5989 -28.6634,-14.3316 -15.7647,-11.4654 -22.9306,-31.5297 -38.6954,-41.5619 -1.4332,0 -50.1608,-7.1658 -51.594,-7.1658 -8.599,-7.1659 -11.4653,-18.6311 -17.198,-28.6633 -31.5297,-51.5939 5.7327,-47.2944 -10.0322,-84.5568 -7.1658,-17.1979 -34.3959,-1.4332 -28.6632,-11.4652 7.1657,-12.8987 17.1979,-21.4976 25.7969,-32.9629 -45.8613,-21.4975 14.3317,-55.8935 -4.2995,-87.4232 -28.6633,-50.1607 -73.0915,-31.5295 -110.3537,-71.6583 l -1.4332,-7.1657 c -1.4332,0 -2.8663,0 -4.2995,1.4332 0,-1.4332 -1.4332,-1.4332 -1.4332,-2.8665 v 2.8665 c -28.6632,5.7325 -22.9307,38.6954 -47.2944,45.8613 -21.4975,5.7326 -12.8985,-24.3639 -37.2624,2.8663 -2.8662,4.2995 0,11.4652 -1.4332,17.1979 -1.433,1.4333 -17.1979,31.5297 -17.1979,32.9629 -4.2995,11.4653 4.2995,48.7276 5.7327,58.7598 0,4.2995 -2.8663,7.1658 -2.8663,11.4653 0,8.599 1.4331,15.7647 2.8663,24.3639 4.2995,11.4652 14.3317,20.0642 15.7647,31.5296 7.1659,50.1607 -5.7325,15.7648 -22.9305,31.5295 -20.0644,20.0644 -1.4332,25.7971 -7.1659,50.1608 -1.4332,5.7328 -7.1658,8.599 -8.599,14.3317 0,1.4332 -18.6312,-15.7647 -21.4975,-17.1979 -4.2994,-2.8663 -57.3265,-21.4975 -61.626,-15.7649 -5.7327,5.7327 -1.4333,17.1981 -5.7327,22.9306 -17.198,30.0966 -40.1287,11.4654 -64.4926,15.7649 -7.1657,0 -14.3316,4.2995 -20.0642,2.8663 l -5.7327,-4.2995 c -2.8663,-5.7327 -2.8663,-14.3317 -5.7327,-20.0642 -10.0321,-17.1981 -42.9949,-61.6263 -60.1929,-71.6583 -37.2623,-21.4976 -38.6956,8.599 -35.8291,31.5296 l -8.599,30.0965 c 0,0 1.4331,0 1.4331,0 l -1.4331,1.4332 5.7325,7.1658 c -1.433,2.8662 -7.1657,4.2995 0,8.599 24.3639,18.6311 65.9258,53.0271 91.7227,64.4925 30.0965,12.8984 54.4603,1.433 81.6905,28.6632 5.7326,4.2995 1.4331,17.198 7.1658,20.0644 4.2995,1.433 7.1657,-5.7327 10.0322,-4.2995 11.4652,4.2995 15.7647,18.6312 24.3637,27.2301 2.8664,2.8663 11.4654,2.8663 10.0322,7.1658 -15.7648,30.0965 1.4332,31.5297 5.7327,65.9256 1.4332,5.7327 -4.2995,11.4654 -4.2995,17.198 0,0 0,0 0,0 0,0 0,0 0,0 -1.4332,1.4332 -1.4332,1.4332 -1.4332,1.4332 0,0 0,0 0,0 0,14.3317 21.4975,2.8663 27.2302,8.599 18.6311,14.3316 -11.4653,34.396 -2.8663,48.7276 8.599,20.0644 42.9949,38.6955 45.8612,61.6262 1.4332,17.198 -11.4653,71.6583 -10.0321,78.8241 12.8985,45.8613 44.4281,61.6261 61.6261,98.8884 5.7327,-10.0322 12.8985,-18.6312 32.9629,-7.1659 10.032,5.7327 4.2995,25.7971 14.3315,31.5296 8.599,5.7327 20.0644,-5.7325 30.0966,-2.8662 4.2995,0 4.2995,8.5989 7.1658,11.4654 8.5989,4.2995 8.5989,-12.8986 17.1979,1.433 15.7649,32.9629 4.2995,61.6261 10.0322,75.9578 4.2995,12.8985 42.9949,-15.7647 25.797,25.797 -4.2995,10.0322 -18.6312,7.1659 -27.2302,12.8986 -8.599,5.7325 -18.6312,10.032 -24.3637,18.631 -2.8664,2.8664 1.433,10.0322 -1.4332,12.8986 -2.8663,2.8663 -10.0322,-4.2995 -11.4653,-1.4332 -4.2995,10.0322 -5.7327,22.9307 -5.7327,34.396 0,7.1659 4.2995,14.3316 1.4332,21.4974 -1.4332,12.8986 -18.6312,18.6312 -21.4976,30.0966 -2.8663,8.599 4.2995,18.6312 1.4332,25.7969 -7.1657,15.7648 -22.9306,12.8985 -24.3637,34.396 -1.4332,4.2995 7.1658,8.599 7.1658,14.3317 -4.2995,27.2301 -42.995,22.9306 -44.4282,47.2944 -1.4332,10.0322 -8.5989,35.8291 -10.0322,37.2623 -5.7327,0 -12.8984,-14.3317 -18.6311,-10.0322 -12.8985,11.4654 7.1659,40.1287 -5.7326,48.7278 -4.2996,2.8663 -12.8986,-15.7649 -11.4654,-10.0322 0,7.1658 10.0322,10.0322 12.8985,17.1979 12.8984,47.2945 -4.2995,15.7648 -24.3638,38.6955 -4.2995,5.7327 4.2995,20.0644 -1.4332,20.0644 -8.599,-1.4333 -4.2995,-18.6312 -11.4652,-20.0644 -11.4654,-2.8663 -25.7971,1.4332 -31.5297,11.4654 -22.9307,38.6954 25.797,11.4652 22.9305,34.3959 -2.8662,14.3317 -40.1286,38.6954 -41.5617,54.4603 -7.1659,94.589 1.4331,-2.8663 15.7648,32.9629 1.4332,1.4331 -12.8985,27.23 -1.4331,34.3959 1.4331,1.4332 4.2995,-5.7327 5.7326,-4.2995 2.8664,4.2995 -1.4331,14.3317 4.2995,15.7648 2.8664,1.4332 -2.8663,-12.8985 1.4332,-12.8985 4.2995,-1.4332 5.7327,4.2995 7.1658,8.599 8.5989,22.9307 -1.4331,60.193 2.8664,68.792 2.8663,5.7327 11.4652,2.8663 15.7647,7.1658 5.7327,7.1659 8.599,15.7649 12.8985,22.9306 1.4332,2.8665 -1.4331,7.1659 0,10.0322 2.8664,4.2995 8.599,4.2995 11.4654,7.1658 1.4331,1.4332 -5.7327,0 -5.7327,1.4332 -1.4332,2.8663 1.4332,5.7327 2.8663,8.599 7.1659,8.599 22.9307,12.8985 21.4976,22.9307 -1.4332,8.5989 -24.3639,1.4332 -25.7971,10.0322 -2.8663,11.4652 14.3317,18.6311 17.1981,28.6632 1.4331,4.2995 -5.7327,8.599 -4.2996,14.3317 1.4332,2.8662 10.0322,2.8662 10.0322,7.1659 -1.4331,18.631 -15.7648,-1.4332 -10.0322,14.3315 1.4332,5.7327 8.5991,10.0322 7.1659,14.3317 -1.4332,5.7327 -15.7649,-1.4332 -17.198,2.8663 -1.4332,37.2623 14.3317,41.5618 25.797,57.3267 2.8662,2.8663 -11.4653,5.7326 -8.599,10.0321 1.4332,7.1659 4.2995,12.8986 8.599,18.6312 31.5296,41.5618 7.1657,-1.4331 37.2623,-7.1658 5.7326,0 -5.7327,15.7647 0,20.0642 8.599,4.2995 18.6311,-2.8662 28.6632,-2.8662 8.599,1.4332 12.8985,15.7649 20.0644,15.7649 7.1658,0 10.0322,-8.5992 15.7648,-8.5992 2.8664,-1.433 0,4.2995 1.4332,5.7327 4.2995,1.4332 7.1658,0 11.4653,-1.4332 1.4332,-1.4331 1.4332,-10.032 2.8664,-7.1658 14.3317,31.5297 -8.599,37.2624 -2.8664,38.6955 2.8664,0 35.8291,-24.3638 40.1286,-27.23 1.4332,-1.4333 4.2995,-8.5992 5.7327,-10.0322 0,0 0,0 0,0 -7.1658,21.4974 -25.7969,45.8613 8.599,58.7598 5.7327,2.8662 17.1979,-10.0322 20.0644,-4.2995 2.8663,8.599 -20.0644,21.4974 -11.4654,24.3637 8.5989,4.2995 7.1659,-20.0642 15.7649,-21.4974 7.1657,-1.4333 1.433,14.3316 -1.4332,20.0642 -4.2995,7.1659 -12.8985,10.0322 -20.0643,15.7649 -2.8664,4.2995 -14.3317,14.3317 -10.0322,11.4653 44.4281,-17.198 27.2302,-45.8612 50.1608,-60.1929 7.1658,-4.2995 -11.4654,18.6312 -4.2995,22.9307 10.0321,5.7325 22.9306,-1.4333 32.9628,-7.166 7.1659,-2.8662 10.0322,-14.3315 15.7649,-18.6311 8.5989,-7.1658 47.2944,-11.4653 51.5939,-17.198 4.2995,-4.2995 -10.0322,-11.4653 -5.7327,-15.7648 7.1659,-5.7327 18.6311,-1.4332 28.6633,-2.8664 2.8663,0 8.599,1.4332 10.0322,-1.4331 2.8663,-4.2994 -2.8664,-10.0321 -1.4332,-12.8984 1.4332,-2.8664 1.4332,7.1657 4.2995,8.599 1.4332,1.433 38.6956,-21.4975 41.5618,-25.797 1.4333,-1.4332 -5.7327,-30.0966 8.599,-27.2301 2.8663,0 55.8934,48.7276 42.9949,-4.2995 -2.8662,-10.0322 -28.6632,-11.4654 -24.3637,-22.9307 2.8663,-10.0322 21.4975,-4.2995 31.5297,-1.4332 5.7325,1.4332 5.7325,17.1979 11.4652,14.3317 14.3317,-10.0322 -7.1658,-58.7598 10.0322,-48.7277 14.3317,10.0321 -24.3639,45.8612 20.0643,31.5297 68.792,-22.9307 10.0322,-8.599 24.3638,-30.0966 1.4332,-1.4331 2.8663,2.8664 5.7327,2.8664 2.8663,0 7.1658,0 8.599,-2.8664 1.4332,-2.8663 -4.2995,-12.8985 0,-12.8985 1.4332,0 24.3638,20.0644 31.5297,17.198 10.0322,-2.8663 17.1979,-11.4653 22.9306,-18.631 1.4331,0 1.4331,-1.4332 1.4331,-2.8664 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ sodipodi:nodetypes="ccccccccccccccsscccccccsccccscccccccscccssscccccccccccccccccsccccccccccccsccccccscsssccccccccsccccccccccscccscsssscscscccscccscccscccccscccccsccccscccccsssscccsccccssscccc" /><path
+ id="se"
+ class="eu europe"
+ d="m 6447.058,4352.1943 c 2.8665,-8.599 -2.8663,-12.8984 -11.4652,-17.1979 l -5.7327,-14.3317 c 11.4654,7.1657 30.0964,11.4652 24.3638,24.3639 0,2.8662 -2.8664,5.7325 -7.1659,7.1657 z m 5.7327,-65.9256 c 20.0644,-22.9306 -2.8662,-21.4974 -4.2995,-50.1608 0,-8.599 8.599,-14.3317 10.0322,-22.9306 0,-2.8663 -5.7327,-5.7328 -7.1659,-8.599 -18.6312,-2.8663 -42.9949,-8.599 -58.7598,2.8662 15.7649,-20.0642 42.9951,-14.3315 64.4925,-10.032 -11.4652,-18.6312 -18.6312,-32.9629 -15.7647,-35.8291 5.7325,-12.8987 25.7969,15.7647 38.6954,10.032 11.4653,-4.2995 -28.6634,-21.4975 -22.9307,-32.9627 4.2995,-10.0322 24.3639,1.4331 28.6634,-7.1659 7.1658,-10.0321 2.8663,-24.3638 -2.8664,-34.396 -2.8663,-5.7327 -11.4653,-1.4332 -17.198,-2.8662 -11.4653,-4.2995 -8.599,-24.3639 -17.198,-34.3961 -5.7327,-7.1658 -17.1979,-7.1658 -22.9306,-14.3317 -2.8663,-5.7326 1.4332,-12.8985 -1.4332,-18.631 -2.8663,-7.1659 -20.0643,-30.0966 -20.0643,-31.5297 0,-2.8664 5.7327,-4.2995 4.2995,-5.7327 -1.4332,-2.8663 -7.1658,-1.4332 -10.0322,-2.8663 -7.1658,-5.7327 -12.8985,-14.3316 -17.198,-21.4976 -7.1657,-12.8984 1.4333,-47.2944 -8.5989,-63.0593 -2.8663,-4.2995 -12.8985,1.4332 -17.198,-2.8662 -4.2995,-5.7327 -2.8664,-15.7648 -2.8664,-24.3638 -2.8663,-21.4976 37.2623,-71.6583 18.6312,-94.5889 -25.797,-32.9629 -11.4653,55.8934 -65.9256,1.433 -8.599,-8.5989 5.7327,-34.3959 5.7327,-44.4281 -1.4332,-17.198 -18.6312,-81.6903 -18.6312,-81.6903 5.7327,-7.1659 20.0642,5.7325 28.6632,4.2995 4.2995,14.3315 10.0322,28.6632 22.9307,10.032 31.5296,-44.4281 -8.599,-101.7547 0,-127.5517 2.8664,-10.0321 17.198,-11.4654 21.4976,-20.0643 2.8663,-5.7326 0,-12.8985 -2.8664,-18.6312 0,-4.2995 -7.1658,-5.7326 -5.7327,-8.599 2.8664,-10.0321 48.7277,-12.8985 61.6262,-45.8612 l -1.4332,-41.5618 c 15.7647,-81.6905 -21.4975,-65.9256 -28.6634,-127.5519 -1.4331,-14.3315 27.2302,-7.1657 38.6956,-17.1979 l 15.7647,-57.3266 c -5.7325,-35.8292 -60.1928,-32.9629 -68.7918,-65.9256 -7.1659,-30.0966 15.7647,-70.2252 12.8984,-101.7549 -2.8664,-21.4974 -25.797,-40.1286 -27.2301,-61.6261 -1.4332,-8.5989 5.7327,-18.6311 5.7327,-27.2301 -1.4332,-10.0321 -7.1659,-18.6312 -5.7327,-28.6632 0,-8.599 10.0322,-14.3317 10.0322,-22.9307 0,-173.413 -21.4976,127.5517 -21.4976,-45.8613 0,-15.7648 20.0644,-25.797 21.4976,-41.5619 1.4331,-5.7326 -7.1659,-11.4653 -5.7327,-18.6312 4.2995,-22.9305 35.8291,-71.6583 54.4603,-83.1235 58.7598,-37.2624 97.4552,30.0964 107.4874,-37.2624 10.0321,-70.225 -50.1608,-55.8934 -41.5618,-81.6903 12.8985,-40.1286 32.9628,-80.2573 45.8613,-118.9528 1.4331,-5.7327 8.599,-7.1658 10.0321,-12.8985 l -4.2995,-53.0271 c 0,-1.4332 7.1659,-44.4281 7.1659,-44.4281 l -14.3317,-55.8936 c 5.7327,-12.8985 28.6634,0 40.1286,-5.7325 l 31.5297,-27.2302 c 4.2995,-12.8985 -14.3317,-24.3639 -11.4653,-37.2623 8.599,-25.797 55.8934,-81.6905 64.4924,-106.0543 15.7649,-38.6955 -21.4975,-41.5618 -27.2302,-73.0915 -4.2995,-25.7969 11.4654,-10.0322 20.0644,-20.0643 11.4653,-14.3316 11.4653,-34.396 14.3317,-50.1607 1.4331,-11.4654 28.6632,-61.6263 37.2622,-61.6263 l 45.8614,20.0644 c 28.6633,-11.4654 -7.1658,-93.1557 1.4332,-104.6211 20.0642,-25.797 118.9527,22.9306 131.8511,14.3317 47.2946,-30.0965 -2.8662,-27.2302 -4.2995,-40.1287 -4.2994,-17.1979 20.0644,-30.0964 20.0644,-47.2944 0,-10.0322 -2.8664,-20.0644 -7.1659,-28.6633 -4.2995,-7.1658 -22.9307,-11.4653 -18.631,-18.6312 5.7325,-10.0322 21.4974,-2.8663 32.9627,-5.7327 h 2.8664 c 4.2995,2.8664 11.4653,2.8664 17.198,7.1659 17.198,11.4652 -5.7327,10.0322 5.7325,17.198 24.3639,18.6311 65.9258,53.0271 91.7227,64.4925 30.0965,12.8984 54.4603,1.433 81.6905,28.6632 5.7326,4.2995 1.4331,17.198 7.1658,20.0644 4.2995,1.433 7.1657,-5.7327 10.0322,-4.2995 11.4652,4.2995 15.7647,18.6312 24.3637,27.2301 2.8664,2.8663 11.4654,2.8663 10.0322,7.1658 -15.7648,30.0965 1.4332,31.5297 5.7327,65.9256 1.4332,5.7327 -4.2995,11.4654 -4.2995,17.198 -2.8664,17.1981 18.6312,4.2995 25.797,10.0322 18.6311,14.3316 -11.4653,34.396 -2.8663,48.7276 8.599,20.0644 42.9949,38.6955 45.8612,61.6262 1.4332,17.198 -11.4653,71.6583 -10.0321,78.8241 12.8985,45.8613 44.4281,61.6261 61.6261,98.8884 -4.2995,5.7327 -8.599,12.8985 -14.3317,15.7648 -5.7327,2.8664 -10.0322,-11.4653 -17.1979,-10.0321 -2.8663,1.4331 -4.2995,8.599 -7.1658,8.599 -11.4654,1.4331 -24.3639,-8.599 -34.3961,-2.8664 -7.1658,4.2995 4.2995,21.4976 -2.8663,25.7971 -30.0964,18.631 -40.1286,-15.7649 -61.6261,-20.0644 -2.8664,0 2.8663,8.599 2.8663,12.8984 0,2.8665 1.4332,5.7328 0,8.599 -1.4332,10.0322 -10.0322,18.6312 -7.1657,27.2302 0,1.4332 1.0302,3.4038 -0.5785,3.3619 -6.2271,-0.1621 -16.6197,-3.3619 -25.2186,-7.6614 -4.2995,-1.4332 -8.599,-12.8985 -10.0321,-8.599 -2.8664,15.7649 35.8292,10.0322 38.6954,25.797 2.8663,8.5989 -17.1979,2.8664 -25.7969,7.1659 -1.4332,1.433 4.2995,1.433 7.1658,1.433 1.4332,1.4333 17.1979,11.4655 8.5989,18.6312 -1.433,1.4332 -2.8662,-7.1657 -5.7325,-5.7327 -1.4332,1.4332 4.2995,7.1659 1.433,8.5991 -11.4652,7.1658 -44.4281,0 -50.1608,21.4975 0,4.2995 8.599,0 11.4654,1.4331 10.0322,7.1659 18.6312,17.1981 22.9307,28.6633 8.599,25.797 -34.3961,37.2624 -35.8292,65.9256 -1.4332,34.3961 45.8612,37.2624 57.3266,63.0593 1.4333,1.4332 -28.6633,38.6956 -34.3959,51.5941 -8.599,17.1979 -11.4654,87.423 -28.6634,90.2894 -2.8662,0 -2.8662,-10.0322 -5.7327,-8.5991 -10.032,1.4332 4.2995,24.3639 -5.7325,28.6634 -4.2995,2.8663 -2.8664,-17.198 -7.1659,-14.3317 -1.4332,0 -1.4332,1.4332 -1.4332,2.8664 h -1.4331 c -2.8664,4.2995 2.8663,12.8985 -1.4332,15.7648 -4.2995,5.7327 -21.4975,2.8662 -25.797,11.4654 -4.2995,5.7325 -2.8662,17.1979 -10.0322,20.0642 -8.5989,2.8663 -21.4974,-12.8985 -27.2301,-5.7327 -5.7327,8.599 15.7649,20.0644 11.4654,30.0966 -4.2995,7.1658 -14.3317,-14.3317 -20.0644,-10.0322 -7.1658,5.7327 1.4332,17.198 0,25.7969 -1.4332,10.0322 -2.8663,24.3639 -12.8985,30.0965 -8.599,4.2995 -18.6312,-10.0321 -28.6634,-8.599 -5.7325,0 12.8987,4.2995 14.3317,10.0322 1.4332,2.8663 -5.7327,4.2995 -8.5989,4.2995 -2.8663,0 4.2994,-7.1658 1.4332,-10.0322 -2.8665,-1.4331 -8.599,-1.4331 -10.0322,1.4332 -1.4332,4.2995 8.599,8.599 5.7327,12.8985 -2.8665,2.8664 -11.4654,-5.7327 -15.7649,-1.4332 -2.8663,2.8664 7.1659,4.2996 8.599,8.5991 0,1.4331 -5.7326,-1.4332 -7.1658,0 -2.8663,5.7326 0,15.7648 -4.2995,20.0642 -5.7327,5.7327 -27.2302,1.4333 -21.4975,5.7327 8.599,7.1658 34.396,-4.2994 31.5297,5.7327 -4.2995,11.4653 -17.198,18.6311 -24.3639,28.6633 -2.8663,2.8663 -5.7327,8.599 -10.0322,10.0322 -4.2995,1.4332 -12.8985,0 -12.8985,-4.2995 1.4333,-4.2995 11.4654,-1.4332 12.8985,-5.7327 4.2995,-8.599 -11.4652,2.8663 -17.1979,4.2995 1.4332,4.2995 4.2994,8.5989 7.1659,12.8984 4.2995,10.0322 11.4652,37.2624 0,34.3961 -2.8665,0 -1.4332,-14.3317 -4.2995,-11.4654 -4.2995,7.1659 1.433,18.6312 -4.2995,25.797 -1.4332,4.2994 -8.5991,-1.4331 -12.8986,-1.4331 -10.0321,1.4331 -22.9306,0 -31.5297,5.7325 -22.9305,17.1982 15.7649,24.3639 32.9629,44.4283 1.4332,1.4331 -5.7327,2.8663 -7.1658,1.4331 0,-1.4331 -4.2995,-1.4331 -4.2995,0 -1.4332,11.4654 1.4331,22.9307 0,34.3961 -1.4332,7.1657 -7.1659,12.8984 -8.599,20.0642 -1.4332,8.599 -1.4332,17.198 1.4331,25.797 0,1.4332 4.2995,-2.8663 5.7327,-1.4331 5.7327,10.032 21.4975,24.3637 12.8985,32.9627 -8.599,8.599 -21.4975,-15.7648 -32.9629,-11.4653 -32.9627,11.4653 22.9307,41.5619 18.6312,73.0914 0,5.7327 -14.3317,-2.8663 -14.3317,1.4332 -1.4331,7.1659 10.0322,8.599 11.4654,14.3317 1.4332,2.8663 -5.7327,1.4332 -5.7327,4.2995 0,5.7327 0,12.8985 2.8664,18.6312 1.4331,5.7327 0,12.8984 2.8663,18.6311 1.4332,2.8663 7.1658,-2.8664 7.1658,0 1.4332,1.4331 -5.7326,1.4331 -7.1658,2.8663 -1.4332,2.8663 -1.4332,7.1658 0,10.0322 2.8663,7.1658 12.8985,11.4653 14.3317,20.0643 1.4331,8.5989 -7.1659,17.1979 -5.7327,25.797 0,2.8663 4.2995,-1.4332 7.1658,0 4.2995,1.4331 1.4332,11.4653 5.7327,11.4653 15.7649,0 45.8613,-8.599 60.193,0 5.7325,2.8663 0,12.8985 2.8663,18.6312 4.2995,8.599 12.8984,14.3317 21.4974,20.0642 1.4332,1.4332 7.1659,-4.2995 8.599,-1.433 2.8664,2.8662 -4.2995,8.5989 -1.4331,10.032 1.4331,0 74.5246,-28.6632 35.8292,14.3317 -5.7327,7.1659 -18.6312,-12.8985 -27.2302,-10.0322 -7.1659,2.8664 10.0321,8.5991 14.3317,14.3317 5.7326,8.599 7.1658,21.4974 15.7648,27.2301 4.2995,1.4333 7.1657,-14.3316 12.8984,-11.4652 7.166,2.8663 2.8663,15.7647 8.599,20.0642 21.4975,24.3639 37.2624,8.599 32.9629,47.2946 -1.4332,14.3317 -14.3317,-1.4332 -15.7649,-1.4332 -7.1658,1.4332 -8.599,10.0322 -14.3316,14.3317 -12.8986,14.3316 0,27.2301 -40.1286,45.8613 -1.4332,1.4331 7.1658,14.3315 7.1658,15.7647 -2.8663,4.2995 -10.0322,-2.8662 -15.7649,-1.4332 -10.0321,1.4332 -20.0643,10.0322 -31.5297,10.0322 -11.4652,0 -1.433,-21.4974 -1.433,-31.5296 1.433,-10.0322 -7.166,-8.599 -11.4654,-14.3317 0,-1.4331 1.4332,-4.2995 0,-7.1658 -5.7326,-8.599 -7.1658,-21.4974 -17.198,-25.7969 -7.1658,-2.8665 -17.198,4.2995 -21.4975,11.4652 -1.4332,4.2995 11.4653,-1.433 12.8985,1.4332 5.7327,10.0322 1.4332,22.9307 7.1659,31.5297 4.2995,7.1658 25.797,5.7327 21.4975,12.8985 -17.198,32.9628 -58.7598,-17.198 -67.3588,-14.3317 -11.4654,2.8664 -17.198,18.6312 -30.0966,18.6312 -8.599,0 -10.032,-18.6312 -18.631,-17.198 -7.1659,1.4332 0,15.7647 -4.2995,22.9307 -1.4332,2.8662 -5.7327,-2.8665 -10.0322,-2.8665 -11.4654,1.4333 -24.3639,1.4333 -34.3959,7.166 -2.8665,1.433 4.2994,5.7325 7.1657,8.5989 11.4653,7.1658 25.797,-4.2995 34.396,-7.1659 14.3316,-1.433 28.6633,17.1981 41.5618,12.8986 5.7327,-2.8664 -11.4653,-20.0643 -4.2995,-18.6311 8.599,0 11.4653,15.7647 20.0643,20.0642 8.5991,2.8664 21.4976,-7.1658 28.6633,0 4.2995,4.2995 -11.4652,12.8985 -8.599,20.0644 2.8663,4.2995 14.3317,1.4331 18.6312,-2.8664 2.8663,-2.8663 -8.599,-10.0321 -5.7327,-11.4653 7.1658,-2.8663 12.8985,5.7327 18.6312,7.1658 11.4653,2.8664 21.4975,10.0322 31.5296,5.7327 7.1658,-2.8663 1.4333,-18.6312 7.1658,-22.9307 7.1659,-4.2995 17.198,4.2995 24.3639,0 10.0322,-4.2995 11.4653,-22.9307 22.9307,-24.3637 8.5989,-1.4332 22.9306,12.8985 18.6311,20.0642 -7.1659,10.0322 -24.3638,0 -35.8291,4.2995 -1.4332,0 2.8663,4.2995 4.2995,5.7327 4.2995,8.599 12.8985,17.198 12.8985,27.2302 1.433,2.8663 -7.1659,-1.4332 -10.0322,1.4332 -10.0322,5.7325 -21.4975,11.4653 -27.2302,21.4974 -5.7327,10.0321 -1.4332,22.9307 -5.7327,32.9628 -2.8663,5.7327 -7.1658,-21.4975 -14.3315,-18.6311 -4.2997,2.8663 7.1657,18.6311 2.8662,15.7648 -14.3316,-5.7327 5.7327,-54.4603 -17.1979,-51.5939 0,0 4.2995,63.0591 -21.4975,81.6903 -8.5991,5.7327 -21.4976,1.4332 -31.5296,2.8664 -4.2995,1.4331 11.4652,4.2995 11.4652,8.599 5.7327,17.198 -15.7647,5.7326 -18.6311,8.599 -2.8663,1.4331 8.5989,1.4331 8.5989,5.7327 1.4333,1.4331 -4.2994,-1.4332 -7.1657,0 -1.4332,1.4331 -2.8665,4.2995 -4.2995,4.2995 -2.8664,0 -75.9578,-10.0322 -70.2252,2.8663 1.4332,2.8663 5.7327,2.8663 10.0322,2.8663 1.4332,0 2.8664,-4.2995 4.2994,-4.2995 2.8665,1.4332 2.8665,10.0322 7.166,8.599 2.8662,0 -1.4332,-8.599 2.8662,-8.599 22.9307,-5.7326 41.5619,0 51.5941,22.9306 0,2.8663 -7.1659,-1.4332 -8.5991,0 -5.7326,5.7327 7.1659,14.3317 -8.599,14.3317 -11.4653,0 -25.797,-15.7649 -32.9627,-7.1657 -7.166,8.5989 21.4974,4.2994 30.0964,10.032 5.7327,4.2995 17.198,30.0966 12.8985,37.2624 -2.8663,5.7327 -17.198,-4.2995 -18.6312,1.4332 -1.4331,7.1657 30.0966,45.8612 20.0644,58.7598 -7.1659,8.599 -24.3639,-4.2996 -34.3961,0 -4.2995,0 1.4332,5.7325 4.2996,8.599 5.7326,7.1657 28.6633,14.3315 28.6633,25.7969 0,10.0322 -18.6312,15.7648 -17.198,27.2302 0,8.599 14.3317,8.599 20.0642,15.7647 1.4333,2.8665 -5.7325,2.8665 -7.1657,4.2995 -5.7327,10.0322 -11.4653,21.4975 -12.8985,32.9629 -2.8663,8.599 17.198,40.1286 15.7648,42.9949 -2.8663,2.8664 -10.0321,-2.8663 -14.3316,1.4332 -11.4654,11.4653 12.8985,34.3959 8.599,53.0271 0,4.2994 -11.4654,0 -12.8985,4.2994 -2.8664,4.2995 7.1658,10.0323 4.2995,14.3318 -15.7649,47.2944 -8.599,-34.3959 -15.7649,14.3317 -4.2995,30.0964 -5.7327,77.391 -30.0964,100.3215 -1.4332,1.4332 -5.7327,0 -7.1659,-2.8663 0,-2.8663 4.2996,-5.7327 2.8664,-8.599 0,-4.2995 -24.3639,-1.4332 -24.3639,-1.4332 -1.4331,-1.4331 2.8664,-7.1658 1.4332,-7.1658 -14.3317,1.4333 -15.7649,8.599 -22.9307,15.7648 -12.8984,10.0322 -4.2994,-11.4653 -8.5989,-10.0321 -10.0322,5.7326 -22.9307,8.599 -25.797,8.599 -7.1659,1.4331 -12.8985,-1.4332 -20.0644,-1.4332 -5.7325,0 -14.3317,-4.2995 -15.7647,1.4332 -2.8664,8.599 12.8985,17.198 8.599,24.3638 -7.166,7.1659 -20.0644,-1.4331 -30.0965,1.4332 -8.5991,2.8663 -10.0322,12.8985 -14.3317,20.0642 -37.2623,54.4603 10.0322,37.2624 8.599,74.5247 -1.4332,11.4653 -8.599,21.4975 -17.1979,30.0965 -7.166,7.1657 -30.0966,-7.1658 -34.3961,-7.1658 -34.396,-2.8664 -24.3638,21.4975 -60.1929,21.4975 -11.4654,0 -21.4975,-7.166 -31.5297,-8.599 -5.7327,0 -14.3316,4.2995 -20.0643,1.433 -10.0321,-5.7325 15.7649,-10.032 15.7649,-10.032 0,-8.599 -8.599,-15.7649 -7.166,-24.3639 0,-8.599 11.4654,-12.8985 14.3317,-20.0642 0,0 -25.7969,-35.8292 -45.8613,-67.3588 -1.4331,5.7325 -8.599,11.4652 -8.599,18.6311 1.4332,30.0965 30.0966,27.2301 -1.4331,55.8934 0,1.4332 0,1.4332 -1.4332,1.4332 z m 448.5809,-355.4251 c 2.8663,-4.2995 8.599,-2.8663 12.8985,-4.2995 -10.0322,22.9307 -30.0965,121.8191 -34.3959,151.9155 -1.4333,7.166 4.2994,63.0594 -14.3317,64.4926 -2.8665,0 -8.599,-64.4926 -8.599,-68.792 2.8663,-41.5619 31.5296,-63.0593 38.6954,-101.7547 2.8663,-17.198 -7.1658,-24.3639 5.7327,-41.5619 z m 193.4774,-38.6954 c 0,8.599 -11.4654,10.032 -17.1981,15.7647 -18.631,21.4975 14.3317,5.7327 -12.8985,27.2302 -21.4974,15.7649 -8.599,15.7649 -20.0642,37.2624 -4.2995,7.1657 -14.3317,28.6632 -18.6312,20.0642 -4.2995,-8.599 7.1658,-20.0642 11.4653,-30.0964 -1.4331,1.4332 -2.8663,4.2994 -4.2995,4.2994 -1.4331,0 -1.4331,-4.2994 -1.4331,-5.7327 -1.4332,-10.032 -15.7649,-27.2301 -15.7649,-30.0964 0,-8.599 5.7327,-17.198 5.7327,-25.7969 -1.4332,-10.0322 -10.0322,-17.198 -10.0322,-27.2302 -1.433,-7.1658 41.5619,-75.9578 47.2946,-78.8241 10.032,-4.2996 21.4974,0 31.5296,-1.4332 15.7648,22.9307 -2.8664,25.797 -15.7649,55.8934 -15.7647,37.2624 20.0644,25.7971 20.0644,38.6956 z m -50.1608,-1175.1959 c 0,2.8662 0,-1.4332 -1.4332,-5.7327 1.4332,1.4332 1.4332,4.2995 1.4332,5.7327 z m -640.6251,1540.6531 -1.4332,-4.2995 c 0,-8.599 -2.8663,-14.3317 -7.1658,-17.198 l -1.4332,-5.7327 c 2.8663,0 5.7327,1.4332 7.1659,4.2995 1.4331,5.7327 2.8663,14.3317 2.8663,22.9307 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ sodipodi:nodetypes="cccccccccccccccccccccccscccccccscccccsccccccccccccssccccccccccccccccccccccsccccccccccsccccccccscccccscccccccccccccccccccccccccccccccccscccsccscccsccccccccccccccccsccccscscccsccscscccccccccccccccscccccccccscccccccccscscscccccccccsccccccccccscsccccsssccccccscccccsccccccccccccscccccscsccccccccccccccccscccscscsccccccccsccc" /><path
+ id="dk"
+ class="eu europe"
+ d="m 6123.1627,4443.917 c -18.6312,-2.8664 -37.2624,-12.8986 -55.8936,-15.7649 -4.2994,0 -21.4974,1.4332 -31.5296,0 0,-7.1658 0,-14.3317 1.4332,-22.9307 0,-7.1657 11.4653,-15.7647 5.7327,-21.4974 5.7326,-7.1658 -2.8664,-18.6312 -2.8664,-28.6634 -1.4332,-8.599 2.8664,-21.4974 -2.8663,-27.2302 -12.8985,-12.8984 -50.1608,1.4333 -57.3266,-24.3637 -4.2995,-15.7649 10.0321,-32.9628 10.0321,-51.594 l 2.8664,2.8664 c 44.4281,21.4975 15.7647,-35.8291 12.8985,-41.5618 -1.4333,-2.8663 -2.8665,-11.4653 -7.166,-8.599 -7.1657,2.8662 -5.7325,15.7647 -12.8984,17.1979 -4.2995,1.4332 -1.4331,-10.0322 -1.4331,-14.3317 1.4331,-10.032 4.2995,-20.0642 4.2995,-28.6632 1.4331,-8.599 -7.1659,-20.0644 0,-25.7971 1.4331,-1.433 4.2995,-2.8663 5.7326,-2.8663 -1.4331,-2.8662 -7.1658,-64.4923 7.1659,-58.7598 8.599,2.8665 2.8662,17.198 7.1657,24.3639 12.8985,30.0965 74.5247,-44.4281 77.391,-44.4281 30.0965,-8.5991 -4.2995,38.6954 1.4332,45.8612 5.7326,7.1659 17.198,1.4332 27.2302,-1.4331 -2.8664,0 -4.2996,0 -4.2996,-1.4332 -2.8663,-7.1658 5.7327,-15.7647 1.4332,-21.4974 -2.8663,-4.2995 -11.4653,7.1657 -12.8985,2.8662 -2.8663,-5.7325 8.599,-10.032 8.599,-15.7647 1.4332,-32.9629 -20.0643,-22.9307 7.1659,-42.9951 5.7326,-5.7325 22.9305,-4.2995 27.23,0 2.8664,2.8664 -4.2995,15.7649 -1.4331,12.8986 5.7326,-5.7327 5.7326,-18.6311 12.8985,-22.9306 5.7327,-2.8665 12.8985,0 18.6312,0 7.1658,4.2995 41.5617,12.8984 41.5617,12.8984 2.8664,8.599 -4.2995,18.6311 -2.8663,28.6633 0,7.1659 11.4654,14.3316 8.599,21.4976 -2.8663,5.7325 -12.8985,-1.4332 -18.6312,0 -8.599,1.433 21.4976,7.1657 20.0644,15.7647 0,2.8663 -1.4332,4.2995 -1.4332,5.7327 5.7327,1.4331 7.1659,14.3317 14.3317,15.7648 17.198,4.2995 42.9949,-20.0643 50.1608,12.8985 2.8663,11.4654 -31.5296,68.792 -42.995,63.0593 -10.0321,-5.7326 -10.0321,-24.3638 -21.4975,-28.6633 -12.8985,-4.2995 -11.4653,70.2251 -15.7648,78.8241 -7.1659,18.6312 -18.6311,31.5296 -38.6955,31.5296 -10.0321,0 -31.5297,-15.7647 -28.6632,-5.7327 4.2994,10.0322 27.2301,4.2995 32.9627,15.7649 v 4.2995 h 2.8664 c 5.7326,0 7.1658,10.0322 11.4653,10.0322 15.7649,-4.2995 27.2301,-28.6634 42.995,-22.9307 8.599,4.2995 12.8985,17.198 22.9305,18.6312 5.7327,1.4331 7.166,-8.5991 11.4654,-11.4654 25.797,53.0271 -5.7327,7.1659 4.2995,27.2302 8.599,15.7649 35.8292,81.6905 -17.1979,75.9578 -11.4654,-1.4333 -21.4975,-10.0322 -32.9629,-12.8985 -4.2995,0 -11.4653,7.1658 -15.7647,2.8663 -11.4655,-8.599 28.6632,-5.7326 5.7325,-18.6312 -35.8291,-18.6311 0,12.8986 -11.4652,12.8986 -4.2995,0 -14.3317,-42.9951 -14.3317,-44.4281 -4.2995,-10.0322 -18.6312,-15.7649 -21.4975,-27.2302 0,-1.4332 1.4332,-1.4332 1.4332,-1.4332 -11.4654,4.2995 -27.2301,7.1658 -27.2301,8.599 -2.8665,5.7327 14.3315,0 17.1979,5.7327 1.4332,4.2995 -8.599,5.7325 -8.599,10.032 -1.4332,8.5992 0,17.1981 2.8663,24.3639 1.4332,4.2995 8.599,5.7327 8.599,10.0322 0,15.7648 -25.7969,21.4975 -28.6632,37.2622 0,5.7327 11.4652,-2.8663 15.7647,0 10.0322,7.1659 18.6312,17.1981 20.0644,28.6634 1.4331,5.7327 -10.0322,-11.4653 -15.7649,-10.0322 -7.1657,2.8664 -15.7647,15.7649 -20.0642,21.4976 z m 270.8682,-237.9055 v 1.433 c 15.7649,-11.4652 40.1287,-5.7325 57.3266,-2.8662 1.4332,2.8662 7.1659,5.7327 7.1659,8.599 -1.4332,8.5989 -10.0322,14.3316 -10.0322,22.9306 1.4333,28.6634 24.3639,27.2302 4.2995,50.1608 -7.1657,7.1658 -18.6311,8.599 -25.7969,15.7648 -12.8985,14.3317 2.8663,18.6312 15.7647,25.7969 l 8.599,21.4976 c -11.4652,10.0321 -42.9949,5.7326 -42.9949,18.6311 1.4332,15.7649 35.8291,37.2623 0,38.6955 -12.8985,0 -22.9307,-8.5989 -34.3959,-14.3316 5.7325,2.8662 12.8984,5.7327 14.3315,1.4332 2.8664,-10.0322 -5.7325,-21.4975 -12.8985,-30.0966 -2.8662,-2.8663 -4.2994,5.7327 -7.1657,5.7327 -8.599,0 -14.3317,-7.1658 -21.4975,-8.599 -7.1659,-1.4332 -14.3317,4.2995 -20.0644,2.8663 -2.8663,0 -2.8663,-4.2995 -2.8663,-5.7326 8.599,-22.9306 -17.1979,-17.1979 -15.7649,-21.4974 1.4333,-5.7327 11.4655,-4.2997 12.8985,-10.0322 5.7327,-41.5619 -7.1657,-30.0966 -30.0964,-50.1608 -2.8663,-2.8663 -11.4653,-10.0322 -7.1658,-11.4653 12.8985,-7.1659 81.6905,8.599 68.7919,-35.8292 -2.8663,-10.0321 -18.6311,-7.1659 -27.2302,-12.8986 -4.2995,-2.8662 10.0322,2.8665 14.3317,2.8665 7.1659,2.8662 14.3317,5.7325 21.4975,5.7325 21.4976,0 55.8935,-10.032 48.7277,34.3961 -1.4332,7.1658 -20.0644,14.3317 -14.3317,18.6312 25.797,21.4974 17.198,-30.0966 12.8985,-50.1609 -1.4332,-8.5989 -24.3639,-1.4332 -21.4975,-8.5989 1.4331,-5.7327 4.2995,-8.599 7.1658,-12.8985 z m 28.6634,229.3064 h -7.1659 v 2.8664 c 1.4332,2.8663 0,4.2995 0,5.7327 -4.2995,2.8663 -10.0321,7.1658 -11.4653,10.0321 -4.2995,2.8664 -7.1659,5.7327 -8.599,10.0321 l -1.4332,1.4333 v 1.433 -2.8663 c -8.599,0 -18.6312,-1.4332 -22.9306,0 -7.1658,1.4333 -12.8985,14.3317 -21.4975,12.8985 -11.4653,-1.4332 -17.198,-15.7647 -27.2302,-21.4974 -7.1657,-4.2995 -17.1979,-7.1658 -22.9306,-12.8985 -4.2995,-2.8664 11.4654,-5.7327 25.7969,-31.5297 20.0644,17.198 50.1608,21.4975 67.3588,35.8292 l 1.4332,1.4332 c -8.599,-12.8986 -27.2301,-22.9307 -20.0642,-34.3961 2.8663,-5.7325 11.4652,-2.8663 15.7647,-4.2995 10.0322,10.0322 31.5297,8.599 34.396,21.4975 0,1.4332 0,2.8664 -1.4331,4.2995 z m -432.8161,-209.2422 v 11.4654 c -1.4331,-8.599 -1.4331,-17.1981 0,-11.4654 z m 250.804,-273.7346 c 4.2994,15.7649 -10.0321,93.1557 -35.8292,84.5567 -8.599,-2.8663 -15.7647,-12.8985 -25.7969,-12.8985 10.0322,-12.8984 -32.9629,-2.8662 -44.4282,0 -10.0322,2.8665 -18.6311,11.4655 -28.6633,12.8985 -4.2995,0 -7.1658,-7.1658 -11.4653,-7.1658 -11.4653,-1.4332 -22.9307,0 -32.9629,2.8663 -4.2994,1.4332 -1.433,10.0322 -5.7325,12.8985 -20.0644,8.5991 1.4331,-48.7276 -27.2302,27.2302 -1.4332,1.4332 7.1658,41.5618 5.7326,41.5618 -47.2944,-1.4332 -21.4975,-90.2895 5.7327,-100.3215 24.3639,-11.4654 58.7598,1.4331 83.1237,-8.5991 32.9627,-15.7648 25.7969,-61.6261 55.8934,-78.8241 10.0322,-4.2995 22.9306,-1.4332 32.9628,-5.7327 10.0322,-5.7325 15.7648,-25.7969 27.2302,-25.7969 21.4974,0 -11.4654,15.7649 -12.8985,28.6633 -2.8664,20.0643 7.1658,7.1658 14.3316,28.6633 z m 131.8513,487.2763 -12.8985,1.4332 c 10.0322,2.8664 18.6312,7.1659 25.7969,14.3317 h 1.4332 c -4.2994,-5.7327 -10.0321,-10.0322 -14.3316,-15.7649 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ sodipodi:nodetypes="ccccccscccscccccccccsccccccsscccccccccccccscccscccccccccscccccccscccccccccccccccccccsscccccccscscccccccccccccccccccccccccccccsccccccccccccsccccccc" /><g
+ id="gb"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"><path
+ sodipodi:nodetypes="csccscccccccccccccscccccccc"
+ style="display:inline;opacity:1;fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;enable-background:new"
+ d="m 4338.9677,4169.7186 c 4.2995,5.7328 10.0322,10.0322 15.7649,7.1658 8.599,-4.2995 11.4653,-18.6312 20.0643,-22.9306 8.5991,-5.7326 18.6312,7.1659 27.2301,5.7327 10.0322,0 17.1982,-7.1658 25.7971,-5.7327 10.0321,1.4332 15.7648,11.4654 24.3638,14.3316 4.2995,2.8665 12.8984,-2.8662 14.3317,1.4332 5.7327,10.0322 8.5989,24.3638 5.7327,35.8292 0,4.2995 -5.7327,5.7327 -5.7327,8.599 15.7647,61.6261 8.5989,-18.6312 25.7969,35.8291 5.7327,15.7648 -31.5296,37.2624 -31.5296,37.2624 24.3638,-5.7327 50.1608,-24.3639 45.8613,32.9627 -5.7327,55.8935 -45.8613,25.7971 -57.3266,38.6956 -10.0322,10.032 -2.8664,32.9627 -28.6634,28.6632 -5.7327,0 -10.0322,-5.7326 -14.3317,-10.0322 l -5.7325,-7.1658 c -21.4976,-12.8985 8.599,20.0644 -40.1287,2.8663 -7.1659,-1.4331 2.8663,-14.3315 5.7326,-21.4975 1.4332,-10.0322 -12.8985,-7.1657 -15.7648,-12.8984 -7.1659,-14.3317 0,-48.7277 -15.7648,-45.8614 -61.6261,8.599 17.1981,37.2624 -48.7277,42.9951 -21.4974,1.4331 -77.3908,-73.0915 -71.6582,-80.2573 1.4332,0 57.3266,-14.3317 57.3266,-14.3317 2.8664,-8.5989 -15.7648,-12.8984 -17.198,-21.4974 -2.8663,-8.599 34.3961,2.8663 38.6955,0 22.9307,-14.3317 14.3316,-50.1609 45.8612,-50.1609 z"
+ class="eu europe"
+ id="gb-nir"
+ transform="translate(-2.3653846e-5)" /><path
+ sodipodi:nodetypes="cccsccccccssccccsccccccccccsccccccccccssccccsccccccccccsccccccssccccccsccssccccccccscccscsccccccscsccscccccscccccccscccsscccscccccccssccccsssccccsccscccccccsccccscssccsscccsccccccsccccccsssssccccccccscccccsccscccscccccccccssccscccccccccccccsscccccsssccccccccscccscccscccsccccsccccccccccccccccccsccsscccccccc"
+ style="display:inline;opacity:1;fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;enable-background:new"
+ d="m 4586.1972,4531.9437 c 25.7969,20.0642 47.2944,31.5296 20.0642,44.4281 m -15.7647,7.1658 c -4.2995,2.8662 -8.599,4.2995 -12.8985,4.2995 -4.2995,0 4.2995,-5.7328 2.8663,-8.599 -8.599,-30.0965 -30.0965,-35.8292 5.7327,-47.2944 m 147.616,-973.1196 c 8.599,4.2995 27.2302,12.8985 28.6634,22.9307 0,7.1658 -20.0644,20.0642 -14.3317,15.7647 8.599,-5.7325 11.4653,-22.9306 21.4975,-21.4974 8.599,2.8663 -1.4332,21.4974 5.7327,27.2301 5.7325,4.2995 8.599,-11.4652 14.3317,-12.8984 21.4974,-5.7327 70.225,2.8663 98.8883,7.1657 11.4654,1.4333 27.2301,-8.5989 34.396,0 7.1658,7.166 -11.4654,14.3317 -15.7648,22.9307 -2.8663,8.599 0,17.198 -2.8663,25.797 -2.8663,7.1659 -93.1558,61.6262 -110.3537,74.5247 -28.6634,21.4974 12.8984,-2.8665 27.23,8.599 5.7327,2.8662 -7.1658,8.5989 -12.8985,12.8984 -4.2995,4.2995 -7.1658,11.4653 -14.3315,12.8985 -2.8665,0 0,-10.0322 -2.8665,-10.0322 -5.7327,-1.4331 -10.0322,4.2995 -14.3316,5.7327 -10.0321,4.2995 -11.4653,-7.1658 -15.7648,2.8663 -11.4654,25.7971 15.7648,34.3961 22.9307,25.7971 1.433,-2.8664 -5.7327,-7.1659 -2.8665,-7.1659 7.166,-1.4331 14.3317,4.2995 22.9307,4.2995 15.7649,-1.4331 35.8292,-18.6312 55.8935,-14.3317 10.0322,1.4332 18.6312,11.4654 28.6633,14.3317 24.3639,7.1659 104.6211,5.7327 117.5196,34.396 2.8664,8.599 4.2995,17.198 1.4332,25.797 l -32.9629,32.9627 c -4.2994,5.7327 -7.1657,12.8986 -8.5989,20.0644 -1.4332,2.8663 1.4332,5.7327 0,7.1658 -11.4653,21.4976 -71.6583,106.0543 -90.2895,107.4874 -28.6632,2.8664 -38.6954,-11.4653 -63.0593,7.1659 -4.2995,2.8663 8.599,4.2995 12.8986,2.8663 11.4653,-1.4332 21.4975,-8.599 31.5295,-10.0322 20.0644,-1.4331 4.2997,12.8986 5.7327,17.1981 4.2995,10.032 22.9307,12.8985 21.4975,22.9305 -4.2995,31.5297 -34.3959,4.2995 -42.9949,5.7327 -44.4282,7.1659 35.8291,25.797 -57.3266,18.6311 -1.4332,0 -1.4332,15.7649 0,15.7649 10.0322,4.2996 -1.4332,-4.2995 8.599,-2.8663 11.4652,2.8663 35.8291,21.4974 48.7276,12.8984 5.7327,-4.2994 7.1657,-14.3316 12.8984,-17.1979 2.8663,-1.4332 57.3266,38.6954 63.0593,44.4281 10.0322,7.1659 14.3317,42.9951 24.3639,54.4603 5.7326,5.7327 14.3316,7.1658 18.6311,12.8985 1.4332,2.8663 -1.4331,5.7327 -1.4331,10.0322 -1.4332,8.599 -1.4332,18.6312 -1.4332,27.2302 1.4332,25.7969 11.4654,131.8511 20.0644,153.3487 1.433,2.8663 4.2995,-5.7327 7.1657,-4.2995 5.7327,1.4331 10.0322,8.599 15.7648,11.4653 25.7971,15.7647 20.0644,2.8663 44.4283,32.9628 8.5989,10.0321 4.2995,27.2302 11.4652,38.6955 7.1658,15.7647 27.2302,1.4332 27.2302,30.0964 0,8.599 -15.7649,8.599 -17.198,17.198 -5.7327,22.9306 21.4975,55.8935 27.2302,75.9577 7.1657,27.2302 -15.7649,-12.8984 -17.198,17.1982 0,7.1657 51.5939,61.626 25.797,88.8562 -20.0644,20.0643 -28.6634,-2.8664 -42.9951,32.9627 -1.4331,4.2995 10.0322,-1.433 12.8985,1.4332 5.7327,4.2995 7.1659,12.8985 11.4654,17.198 4.2995,4.2995 11.4652,11.4654 15.7647,8.599 28.6634,-18.6312 7.166,-37.2622 37.2624,-32.9627 48.7276,7.1657 127.5518,28.6632 113.2201,106.0542 -4.2995,24.3639 -37.2623,88.8562 -61.6261,97.4552 -8.5991,2.8664 -21.4976,-14.3317 -24.3639,-7.1658 -12.8984,25.797 54.4604,18.6312 -2.8662,34.396 -4.2995,1.4332 -7.1659,-1.4332 -11.4654,-4.2995 -1.4331,0 -1.4331,-2.8663 -2.8663,-2.8663 -11.4654,1.4331 -28.6634,-1.4332 -34.3959,7.1658 -4.2997,8.599 21.4974,-2.8663 27.23,4.2995 5.7327,5.7327 1.4332,17.1979 -2.8663,24.3638 -11.4653,18.6312 -42.9949,5.7326 -58.7598,11.4653 -4.2995,1.4332 -15.7648,5.7327 -11.4653,8.599 1.4331,0 42.9949,-12.8985 41.5617,5.7327 -1.433,7.1658 -17.1979,-1.4332 -22.9305,2.8663 -4.2995,4.2995 11.4653,11.4654 17.198,8.599 2.8662,-2.8663 2.8662,-11.4653 7.1657,-11.4653 5.7327,-1.4332 11.4654,4.2995 17.198,8.599 20.0644,18.6312 -41.5617,8.599 0,15.7649 20.0644,2.8663 41.5618,-12.8986 63.0593,-4.2995 5.7327,1.433 -8.599,8.599 -10.0322,14.3315 -2.8663,10.0322 -1.4331,20.0644 -2.8663,31.5297 -4.2995,14.3317 -30.0964,8.599 -44.4281,15.7649 -5.7327,4.2995 -1.4332,18.6311 -8.599,21.4974 -25.7969,8.599 -12.8985,-14.3317 -28.6634,-4.2995 -15.7647,10.0322 -30.0964,5.7327 -45.8611,12.8985 -7.166,2.8663 -10.0322,14.3317 -18.6312,14.3317 -12.8985,0 -35.8292,-24.3639 -48.7276,-27.2302 -10.0322,-1.4332 -81.6905,15.7648 -85.99,0 -1.4332,-7.1657 18.6312,-1.4332 4.2995,-11.4654 -8.599,-5.7325 -4.2995,7.1659 -7.1659,11.4654 -2.8663,1.4332 -7.1658,-1.4332 -8.599,-4.2995 0,-4.2994 10.0322,-8.5989 5.7327,-8.5989 -4.2995,-1.4332 -8.599,8.5989 -12.8985,7.1657 -4.2995,-1.433 4.2995,-8.5989 1.4332,-12.8984 -10.0322,-12.8985 -4.2995,12.8984 -8.599,11.4654 -17.1981,-5.7327 -30.0965,-34.3961 -34.396,-30.0966 -5.7326,7.1659 11.4654,17.1979 10.0322,25.7969 -1.4332,14.3317 -81.6905,-4.2995 -84.5568,0 -4.2995,7.1659 10.0322,17.1981 8.599,25.7971 -1.4332,4.2995 -8.599,-1.4332 -12.8985,-1.4332 h -1.4332 c -7.1658,-4.2995 -30.0964,-20.0642 -37.2622,-17.198 -8.5991,4.2995 -5.7327,17.198 -10.0322,24.3638 -2.8664,2.8664 2.8663,-8.599 1.4331,-12.8985 -2.8663,-7.1658 -10.0321,-12.8985 -17.198,-18.6312 -18.6312,-18.631 -73.0914,-31.5295 -98.8884,-21.4974 0,0 -15.7648,68.792 -37.2623,78.8242 -17.1979,7.1657 -47.2945,-34.3961 -58.7598,-40.1287 -7.1659,-4.2995 14.3317,12.8985 -4.2995,8.599 -17.1979,-4.2995 -41.5618,-21.4974 -61.626,-15.7649 -7.166,1.4332 -4.2997,14.3317 -10.0322,17.198 -8.599,2.8664 -18.6312,-2.8663 -28.6634,-2.8663 -1.4332,0 -2.8663,0 -4.2995,1.4332 -2.8663,7.1658 -20.0642,42.9949 -25.797,42.9949 -8.5989,-1.4332 -4.2994,-20.0642 -10.0321,-27.2301 -8.599,-14.3317 -42.995,-4.2995 -42.995,-20.0643 0,-10.0322 57.3266,-12.8984 58.7599,-12.8984 5.7325,-1.4333 11.4652,-7.166 15.7647,-12.8987 2.8663,-1.433 0,-7.1657 2.8663,-8.5989 2.8664,-2.8663 8.5991,1.4332 11.4654,0 10.0322,-8.599 12.8985,-21.4975 22.9307,-28.6633 4.2995,-2.8664 11.4652,2.8663 15.7647,1.4331 4.2995,-2.8663 2.8664,-8.599 7.1659,-11.4653 7.1658,-7.1657 20.0643,-8.5989 27.2302,-17.1979 4.2995,-5.7327 2.8663,-38.6956 12.8985,-42.9951 5.7325,-1.4331 11.4652,10.0322 17.1979,11.4654 32.9627,2.8663 -5.7327,-47.2945 74.5246,-32.9628 27.2301,4.2994 63.0593,41.5618 90.2895,20.0643 8.5989,-7.1659 5.7327,-21.4974 10.0321,-30.0965 1.4331,-2.8663 70.2251,-45.8612 78.8241,-55.8934 8.599,-10.0322 -37.2622,20.0642 -42.9949,24.3639 -7.1659,2.8662 -14.3317,4.2994 -21.4975,5.7325 -4.2995,0 -7.1659,-7.1658 -11.4654,-5.7325 -35.8291,10.032 -27.2301,40.1286 -70.225,15.7647 -14.3317,-10.0322 -11.4655,-34.3959 -24.3639,-47.2944 -11.4653,-11.4654 -32.9627,14.3315 -47.2944,7.1658 -2.8665,-1.4332 -5.7327,-45.8614 -7.1659,-50.1609 -1.4331,-2.8662 -2.8663,5.7327 -5.7326,5.7327 -10.0322,1.4333 2.8663,-10.0321 -31.5297,0 -4.2994,0 -2.8664,8.599 -5.7327,11.4653 -8.5989,2.8664 -20.0642,5.7327 -28.6633,2.8664 -7.1658,-1.4332 -20.0643,-10.0322 -17.198,-15.7649 4.2995,-8.5989 18.6312,-2.8662 27.2302,-4.2995 4.2995,-1.4332 -35.8292,-2.8662 -40.1287,-8.5989 -5.7327,-8.599 -2.8662,-20.0643 -2.8662,-30.0965 0,-28.6633 53.0271,-12.8984 60.1928,-15.7649 8.599,-2.8663 10.0322,-17.1979 20.0644,-18.6311 7.1658,0 14.3317,7.1659 21.4975,5.7327 22.9306,-5.7327 68.792,-44.4282 77.391,-64.4924 2.8662,-5.7327 -2.8665,-61.6262 -11.4654,-70.2252 -24.3638,-30.0965 -51.5939,55.8935 -61.6261,-2.8663 -2.8663,-10.0322 27.2301,-11.4654 45.8613,-25.797 2.8663,-4.2995 1.4332,-11.4654 4.2995,-15.7649 2.8663,-4.2994 5.7327,-7.1657 8.599,-8.5989 5.7327,-4.2995 11.4652,-5.7327 15.7647,-7.1658 10.0322,0 18.6312,4.2995 38.6956,-2.8664 2.8663,-1.4331 -5.7327,-11.4653 -1.4332,-10.0321 10.0322,1.4331 15.7649,12.8985 25.7969,14.3316 20.0644,2.8664 24.3639,-15.7648 38.6956,-2.8663 7.1658,7.1657 10.0322,28.6633 18.6312,22.9306 8.599,-5.7327 -7.1659,-21.4974 -4.2995,-31.5296 1.433,-5.7327 27.23,-2.8663 45.8612,20.0642 4.2995,4.2997 -11.4653,0 -17.198,-2.8662 -12.8985,-7.1658 -18.6312,-28.6633 -15.7647,-44.4282 1.433,-8.5989 10.032,-15.7647 17.1979,-21.4974 5.7327,-4.2995 20.0643,0 18.6312,-7.1659 -2.8664,-8.599 -20.0644,-8.599 -22.9307,-17.198 -18.6311,-40.1286 30.0965,-8.599 30.0965,-25.7969 1.4332,-8.599 -10.0322,-4.2995 -5.7327,-14.3317 4.2995,-10.0322 17.1981,-17.198 15.7649,-28.6633 -1.4332,-21.4976 -18.6312,17.198 -38.6956,18.6311 -12.8985,0 4.2996,-27.23 0,-38.6955 -2.8663,-5.7327 -10.0321,11.4655 -15.7648,10.0322 -17.1979,-5.7327 -2.8662,-21.4974 -4.2994,-30.0964 l -17.198,-35.8291 c -1.4332,-17.1981 45.8613,-64.4926 47.2944,-64.4926 2.8664,1.4333 1.4332,8.599 4.2995,7.1658 11.4654,-2.8663 27.2301,-5.7325 30.0966,-15.7647 2.8662,-8.599 -17.1981,0 -25.7971,-1.4332 -5.7326,-1.4331 -11.4653,-8.599 -18.6312,-7.1658 -8.599,2.8663 -12.8985,14.3317 -21.4975,17.1979 -7.1657,2.8663 -15.7647,-2.8662 -22.9306,-1.4332 -8.599,2.8665 -12.8985,10.0322 -20.0643,12.8985 -2.8663,1.4332 -7.1659,1.4332 -8.599,-1.4331 -1.4332,-4.2994 7.1658,-11.4654 2.8663,-12.8984 -4.2995,-1.4332 -2.8663,8.599 -5.7327,11.4652 -1.433,1.4332 -4.2995,0 -5.7325,-1.4332 -7.166,-8.599 -7.166,-30.0964 -22.9307,-32.9627 -20.0644,-4.2995 7.1658,20.0642 -7.1659,42.9949 -5.7326,8.599 -12.8985,-14.3317 -18.6311,-22.9307 -41.5618,-54.4603 1.4331,8.599 -54.4603,-24.3637 -14.3317,-8.599 20.0643,-1.4332 18.6312,-8.599 -1.4332,-32.9628 4.2995,-30.0966 24.3637,-53.0272 37.2624,-41.5617 -25.7969,7.1659 20.0644,-34.396 4.2995,-4.2994 14.3316,-4.2994 17.198,-10.0321 5.7327,-10.0321 -21.4975,-42.995 -22.9307,-45.8612 -1.4332,-4.2995 7.1658,-4.2995 8.599,-8.599 4.2995,-10.0322 0,-22.9307 4.2995,-34.3961 5.7327,-12.8986 17.198,1.4332 30.0964,7.1659 47.2946,21.4975 -24.3637,-12.8986 -24.3637,-15.7649 -4.2995,-8.5991 0,-20.0642 1.4331,-31.5296 0,-7.1658 5.7327,-15.7648 1.4332,-21.4975 -1.4332,-1.4332 -58.7598,30.0965 -63.0593,34.3959 -11.4653,10.0321 7.1659,30.0966 4.2995,45.8614 -1.4331,5.7327 -12.8985,4.2995 -17.198,8.599 -2.8663,2.8664 -5.7327,7.1659 -5.7327,11.4654 -1.4331,4.2995 1.4332,10.032 0,12.8984 -4.2995,11.4653 -15.7647,17.198 -20.0642,28.6633 -1.4333,2.8664 7.1657,8.599 4.2995,10.0322 -10.0322,5.7327 -22.9307,10.0322 -34.396,5.7327 -8.599,-4.2995 11.4653,-15.7649 15.7648,-22.9307 8.599,-11.4654 5.7327,-30.0964 14.3317,-41.5618 l 30.0964,-25.797 c -2.8663,-7.1658 -18.6312,2.8663 -21.4975,-4.2995 -2.8662,-5.7327 38.6955,-30.0964 18.6312,-34.3959 -8.599,-2.8664 -12.8985,18.631 -20.0644,14.3315 -8.599,-7.1657 20.0644,-12.8984 25.7971,-22.9305 5.7326,-11.4654 1.4331,-37.2624 5.7326,-47.2945 2.8664,-8.599 10.0322,-17.198 17.1979,-18.6312 7.166,-1.4331 20.0644,14.3317 20.0644,7.1659 0,-7.1659 -15.7649,-7.1659 -20.0644,-14.3317 -10.032,-20.0644 48.7278,-30.0964 50.1609,-30.0964 4.2995,-4.2995 -18.6312,1.433 -18.6312,-4.2995 0,-8.5992 14.3317,-10.0322 17.1981,-18.6312 2.8663,-4.2995 -8.5991,2.8663 -12.8986,7.1658 -10.0321,7.1657 -8.599,10.0322 -17.198,14.3317 -18.6312,10.0321 -35.8291,25.7969 -48.7276,20.0642 1.4332,2.8664 2.8663,4.2995 5.7327,5.7327 1.4332,2.8663 7.1658,5.7327 4.2995,8.599 -11.4654,10.0322 -68.792,30.0964 -78.8242,10.0322 -1.4331,-1.4332 0,-5.7327 1.4332,-5.7327 28.6634,-11.4653 5.7327,31.5296 41.5619,-17.198 22.9306,-30.0964 -67.3588,-14.3317 -2.8663,-35.8291 2.8663,5.7327 5.7325,11.4654 10.032,15.7649 1.4332,2.8662 4.2995,5.7325 7.1659,7.1657 -2.8664,-4.2995 -5.7327,-10.0322 -7.1659,-17.1979 -1.433,-4.2995 10.0322,0 14.3317,0 11.4654,0 22.9307,5.7327 32.9629,1.433 12.8985,-5.7325 -77.391,-4.2995 -65.9257,-21.4974 8.5991,-11.4653 45.8613,4.2995 48.7277,-1.4331 5.7326,-14.3317 -35.8291,-31.5296 4.2995,-41.5618 10.0321,-2.8663 20.0642,10.0322 31.5297,7.1657 38.6954,-8.5989 -10.0322,-34.3959 -10.0322,-34.3959 4.2995,-10.0322 25.7969,2.8663 32.9627,-5.7327 7.1659,-8.599 1.4332,-22.9307 1.4332,-34.3959 0,-8.599 1.4332,-17.198 -1.4332,-22.9307 -1.4331,-2.8663 -48.7276,-53.0271 -17.198,-65.9256 7.1659,-4.2995 8.599,22.9307 17.198,20.0643 11.4654,-2.8663 -4.2995,-35.8292 12.8986,-25.797 22.9305,12.8985 24.3637,14.3317 24.3637,12.8985 4.2995,-18.6312 -11.4652,-20.0642 -10.0322,-38.6954 0,-7.1659 18.6312,8.599 21.4976,1.433 5.7326,-10.032 -7.1659,-22.9305 -5.7327,-32.9627 0,-4.2995 4.2995,7.1658 8.599,7.1658 10.0322,4.2995 25.797,12.8985 32.9629,4.2995 5.7325,-7.1658 -14.3317,-14.3317 -17.1981,-22.9307 -7.1658,-24.3637 14.3317,-5.7325 14.3317,-5.7325 2.8664,-2.8665 -4.2995,-8.599 -2.8663,-11.4654 2.8663,-1.4331 10.0322,5.7327 10.0322,2.8664 0,-4.2995 -10.0322,-7.1659 -8.599,-11.4654 1.4331,-10.0322 10.032,-17.198 15.7647,-25.797 z m 421.6906,-262.675 c 2.9907,2.103 2.7244,-0.7325 3.9597,1.8388 1.3878,2.8888 2.7299,2.6131 2.5377,-2.6496 -0.2081,-2.7926 1.7617,-3.0831 8.9275,-1.6499 4.2995,1.4333 -7.1658,7.166 -10.032,11.4654 0,1.4331 5.7325,5.7326 4.2995,7.1658 -2.8665,1.4332 -8.599,-5.7327 -10.0322,-1.4332 0,2.8664 8.5989,2.8664 8.5989,7.1659 1.4333,12.8985 -17.1979,8.599 -15.7647,12.8985 1.4331,18.6312 15.6514,16.4032 -13.012,46.4998 -1.4331,2.8663 -6.5543,-1.3185 -5.1211,-4.1848 8.599,-18.6312 19.5662,-38.0155 12.4004,-42.315 -5.7327,-5.7327 -8.4407,8.0069 -15.6065,3.7074 -10.0322,-4.2995 -4.9978,-4.2318 -7.864,-14.264 -1.4333,-2.8663 4.613,-6.1584 7.4793,-7.5916 11.4654,-1.4332 9.1889,1.3057 19.2211,-2.9938 7.1658,-4.2995 5.709,-6.4937 10.0084,-13.6597 z m -188.0845,249.7765 c -18.6312,37.2623 -104.6212,-42.995 -44.4282,-47.2945 8.599,0 17.198,10.0322 17.198,20.0644 1.4332,5.7327 -17.198,4.2995 -14.3317,8.599 4.2995,8.599 17.198,8.599 25.797,11.4652 4.2995,2.8665 10.0322,4.2995 15.7649,7.1659 z m -355.4252,30.0965 c -7.1657,11.4654 -27.2301,22.9307 -30.0964,31.5296 -1.4332,7.1658 -2.8663,47.2944 -21.4975,47.2944 -10.0322,-1.433 -8.5989,-17.1979 -15.7649,-24.3637 -8.5989,-5.7327 2.8665,24.3637 -5.7325,28.6634 -4.2997,1.433 -10.0322,-5.7327 -12.8986,-2.8664 -10.0321,5.7327 -11.4653,25.7969 -22.9306,25.7969 -10.0322,0 -18.6311,-17.198 -12.8986,-25.7969 5.7327,-10.0322 30.0966,7.1659 34.3961,-4.2995 4.2995,-10.0322 -20.0644,-11.4653 -24.3639,-22.9307 -1.4332,-4.2995 10.0322,-2.8663 12.8985,-5.7326 1.4332,-1.4332 -4.2995,0 -4.2995,-1.4332 -2.8663,-5.7327 -4.2995,-11.4654 -2.8663,-17.1979 12.8985,-35.8292 22.9307,-2.8665 42.9949,1.433 1.4332,0 -7.1657,-21.4974 -2.8662,-25.7969 14.3316,-17.198 14.3316,-1.4332 28.6633,-2.8663 1.4331,-1.4332 1.4331,-5.7327 2.8663,-5.7327 8.599,-7.1658 17.198,-18.6312 27.2302,-17.198 7.1657,1.4332 4.2995,14.3317 7.1657,21.4975 z"
+ class="eu europe"
+ id="gb-main" /></g><path
+ id="ie"
+ class="eu europe"
+ d="m 4406.2301,4375.125 c 2.8663,7.1658 15.7648,14.3317 10.0322,20.0642 -5.7327,8.599 -22.9306,1.4333 -31.5296,7.166 -4.2995,4.2994 11.4652,7.1657 11.4652,12.8984 1.4333,11.4653 -5.7327,22.9307 -5.7327,34.396 1.4333,10.0322 11.4654,15.7649 11.4654,25.7969 0,7.1659 -11.4654,11.4654 -11.4654,20.0644 -1.433,5.7327 10.0322,11.4653 7.166,17.198 -4.2995,5.7327 -15.7649,-7.1658 -18.6312,-1.4332 -4.2995,5.7327 7.1657,11.4654 8.599,18.6311 0,2.8665 -2.8663,5.7327 -2.8663,8.599 1.433,18.6312 7.1658,30.0966 1.433,48.7278 -4.2994,12.8984 -54.4601,85.9898 -63.0591,93.1557 -2.8664,2.8663 -10.0322,4.2995 -11.4654,10.0321 -2.8663,10.0322 1.4332,21.4976 0,31.5296 0,1.4332 -2.8663,1.4332 -2.8663,0 -4.2995,-10.032 -7.1659,2.8664 -21.4975,-2.8663 -5.7327,-1.4332 -5.7327,-10.0322 -11.4654,-11.4652 -10.0322,-2.8665 -41.5618,12.8984 -48.7276,4.2995 -1.4332,-2.8665 5.7327,-2.8665 5.7327,-5.7327 1.4331,-4.2995 -10.0322,4.2995 -14.3317,2.8662 -21.4974,-1.433 -28.6633,-12.8984 -48.7276,-5.7325 -2.8664,1.433 5.7326,7.1658 5.7326,11.4652 -1.4331,7.1658 -27.23,12.8985 -27.23,12.8985 -5.7327,0 -8.5992,-8.599 -14.3317,-7.1658 -10.0322,4.2995 -14.3317,17.198 -22.9307,22.9307 -30.0964,15.7648 -11.4654,-27.2301 -38.6954,-22.9307 -8.5991,1.4331 7.1658,17.198 4.2995,24.3638 -4.2995,5.7327 -14.3317,5.7327 -21.4976,10.0322 -4.2995,2.8663 -7.1658,11.4654 -12.8985,12.8984 -2.8663,0 -1.4331,-5.7327 -4.2995,-7.1657 -2.8663,-2.8664 -7.1658,-5.7327 -11.4652,-4.2995 -2.8665,2.8663 0,11.4652 -4.2995,12.8985 -14.3317,1.4332 -40.1287,-15.7649 -48.7276,-14.3317 -11.4655,1.4332 -20.0644,10.0322 -30.0966,11.4654 -28.6633,2.8663 15.7649,-20.0644 -7.1658,-15.7649 -8.599,2.8663 -42.9949,7.1658 -45.8613,4.2995 -5.7327,-8.599 48.7276,-24.3638 54.4603,-37.2624 1.4332,-2.8663 -4.2995,-2.8663 -7.1658,-4.2995 -1.4332,-2.8662 -34.3961,4.2995 -75.9578,0 -1.4332,0 2.8663,-1.433 21.4975,-7.1657 2.8663,0 5.7325,-1.4333 5.7325,-4.2995 0,-1.4332 -4.2994,-2.8663 -2.8662,-4.2995 12.8984,-11.4654 7.1659,7.1657 24.3638,0 8.599,-2.8663 32.9628,-4.2995 27.2302,-11.4654 -1.4332,-1.4331 -65.9257,7.1659 -68.792,7.1659 -12.8985,-2.8664 -22.9307,-22.9307 -21.4975,-37.2624 1.4331,-5.7327 12.8985,5.7327 17.198,2.8665 4.2995,-2.8665 -2.8663,-7.166 -2.8663,-11.4655 2.8663,-12.8984 25.797,-5.7327 38.6955,-8.5989 10.0321,-1.4332 22.9306,0 30.0964,-7.1658 5.7327,-4.2995 -14.3317,-14.3317 -21.4975,-10.0322 -1.4332,2.8663 2.8663,8.599 0,10.0322 -1.4332,1.4331 -44.4281,-20.0644 -53.0271,-31.5297 -1.4332,-2.8664 8.599,4.2995 11.4653,2.8663 2.8664,-1.4332 0,-7.1657 2.8664,-8.599 7.1658,-4.2995 27.2302,-2.8662 37.2622,-1.4332 12.8985,0 21.4976,12.8985 32.9629,18.6312 11.4653,5.7327 -21.4975,-22.9307 -15.7649,-34.3959 4.2996,-10.0322 21.4976,-2.8664 31.5296,-7.1659 5.7327,-2.8663 5.7327,-11.4653 11.4654,-12.8985 1.4333,0 93.1558,15.7649 103.188,10.0322 7.1658,-4.2995 -18.6312,-2.8663 -22.9307,-10.0322 -1.4332,-4.2995 4.2995,-11.4653 2.8663,-15.7648 -1.4331,-2.8664 -30.0964,25.797 -44.4281,24.3638 -2.8663,-1.4331 8.599,-8.599 4.2995,-10.0321 -4.2995,-1.4332 -10.0321,4.2995 -15.7648,2.8663 -5.7327,-1.4332 -10.0322,-5.7327 -12.8985,-10.0322 -1.4332,-2.8663 1.4331,-5.7327 0,-7.1658 0,0 -41.5618,8.599 -47.2945,5.7326 -4.2995,-1.4331 10.0322,0 14.3317,-1.4331 11.4652,-5.7327 20.0644,-12.8984 31.5296,-17.1979 2.8663,-2.8665 8.599,1.433 11.4653,0 5.7327,-5.7327 7.1659,-15.7649 14.3317,-22.9307 2.8664,-2.8664 7.1659,-4.2995 11.4654,-5.7327 2.8663,-2.8663 -10.0322,0 -12.8985,-4.2995 -5.7327,-7.1658 12.8985,-12.8985 18.631,-18.6312 4.2995,-5.7327 7.1659,-12.8985 14.3317,-14.3317 4.2995,-1.433 5.7327,10.0322 10.0322,8.599 11.4653,0 22.9307,-4.2995 32.9629,-10.032 2.8663,-1.4332 -11.4654,1.433 -11.4654,-2.8665 0,-4.2994 10.0322,-2.8662 10.0322,-7.1657 -1.4332,-4.2995 -30.0965,1.4332 -61.6261,-7.1658 -30.0966,-8.5991 0,-7.1659 -7.1659,-31.5296 -7.1658,-25.7971 -47.2944,-7.166 -58.7598,-24.3639 -31.5297,-41.5619 27.2301,-24.3639 28.6633,-24.3639 1.4332,-1.4331 -5.7327,-5.7326 -4.2995,-7.1658 5.7327,-10.0322 12.8985,-20.0642 24.3639,-22.9306 10.0321,-2.8663 21.4975,5.7327 32.9627,5.7327 2.8665,0 5.7327,-1.4333 7.1659,-4.2995 18.6311,-44.4282 -34.396,-11.4654 -37.2623,-24.3639 -2.8663,-5.7326 12.8985,0 17.198,-4.2995 8.5989,-5.7326 -5.7327,-20.0643 -7.1658,-21.4975 0,-10.0322 12.8985,-22.9306 5.7325,-31.5296 -5.7325,-5.7327 -17.1979,15.7649 -22.9306,10.0322 -5.7326,-5.7327 8.5991,-12.8985 11.4654,-20.0644 1.4332,-5.7326 -12.8985,-4.2995 0,-7.1658 12.8985,-2.8663 80.2572,-2.8663 87.423,15.7648 4.2995,10.0322 -1.433,25.7971 7.1659,28.6633 8.599,2.8663 8.599,-14.3316 15.7648,-18.6311 12.8985,-7.1658 50.1608,35.8291 51.594,31.5296 4.2995,-10.0322 -10.0322,-21.4974 -8.599,-32.9628 2.8663,-12.8985 45.8612,-8.599 45.8612,-10.0321 11.4654,-4.2995 20.0644,-12.8985 27.2302,-21.4975 4.2995,-5.7327 -21.4975,0 -21.4975,-2.8664 -4.2995,-15.7647 0,5.7327 -18.6311,4.2995 -2.8663,0 1.4332,-5.7327 1.4332,-8.599 0,-1.4332 0,-4.2995 -1.4332,-4.2995 -5.7326,-2.8662 -34.396,-4.2994 -30.0965,-21.4974 8.599,-28.6634 37.2624,2.8663 45.8614,0 5.7327,-2.8663 -17.198,-11.4654 -12.8985,-17.198 5.7325,-5.7327 17.198,5.7326 24.3637,4.2995 7.1659,-1.4332 -5.7325,-11.4654 -10.0322,-15.7649 -2.8663,-2.8663 10.0322,-2.8663 11.4654,-7.1658 5.7327,-24.3638 -55.8935,0 18.6312,-34.3959 4.2995,-1.4332 10.0322,2.8663 15.7648,4.2995 20.0644,5.7326 42.995,4.2995 60.193,15.7648 10.0322,7.1657 -25.797,21.4974 -20.0644,31.5296 5.7327,5.7327 17.198,-4.2995 24.3639,-11.4653 2.8663,-2.8664 -4.2995,-15.7649 1.4332,-15.7649 8.599,2.8663 14.3315,14.3317 20.0642,21.4975 v 0 c -31.5296,0 -22.9306,35.8291 -45.8613,50.1608 -4.2995,2.8663 -41.5617,-8.5989 -38.6954,0 1.4332,8.599 20.0642,12.8985 17.1979,21.4975 0,0 -55.8933,14.3317 -57.3266,14.3317 -5.7327,7.1659 50.1609,81.6905 71.6583,80.2572 65.9256,-5.7327 -12.8984,-34.3959 48.7276,-42.9949 15.7648,-2.8664 8.599,31.5297 15.7648,45.8614 2.8664,5.7325 17.1981,2.8662 15.7649,12.8984 -2.8663,7.1658 -12.8985,20.0643 -5.7327,21.4975 48.7276,17.198 18.6312,-15.7649 40.1286,-2.8663 l 5.7327,7.1658 c -1.4332,-1.4332 -2.8663,-2.8663 -4.2995,-4.2995 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
+ id="nl"
+ class="eu europe"
+ d="m 5655.9506,4754.9139 -25.7969,19.779 c -14.3317,50.1608 48.7276,26.0823 25.7969,43.2803 -10.0322,7.1657 -25.7969,4.2995 -31.5296,14.3317 -7.1658,10.0322 15.529,19.1809 6.93,27.7799 -2.8662,4.2996 -21.2617,13.7819 -18.3953,18.0814 0,0 17.9643,6.8323 17.9643,6.8323 8.599,0 40.2665,-57.9742 63.6283,-44.0947 8.7124,5.1761 -2.7685,-4.2994 -5.6348,-14.3316 -2.8664,-10.0322 20.0642,-20.0643 15.7647,-30.0965 -5.7327,-12.8985 -40.1286,4.2995 -40.1286,-8.599 1.4332,-10.0322 7.1658,-18.6311 8.599,-28.6633 0,-2.8663 -2.8663,-5.7327 -4.2995,-8.599 -1.4332,-2.8663 -17.4834,12.8426 -11.7507,5.6768 l -28.3779,17.2539 c -10.0322,2.8662 -21.4975,-1.4333 -31.5297,-1.4333 -4.2995,0 -8.599,-2.8662 -10.0322,-1.433 -18.6312,22.9305 -12.8985,68.7918 -21.4974,93.1557 -8.599,21.4975 -25.797,45.8613 -41.5619,63.0593 -5.7325,7.1658 -10.032,15.7648 -17.198,20.0643 -4.2994,2.8664 -14.3316,-2.8663 -15.7647,2.8664 -2.8664,8.599 10.032,20.0642 5.7326,28.6632 -14.3316,22.9307 -58.7597,11.4654 -48.7277,17.198 11.4654,7.1659 20.0644,17.1979 32.9629,22.9306 5.7327,1.4333 11.4653,-7.1657 15.7648,-5.7327 5.7327,1.4333 15.7649,10.0322 11.4654,14.3317 -7.166,4.2995 -25.797,-11.4652 -25.797,-2.8663 1.4331,12.8985 38.6954,11.4653 31.5297,21.4975 -21.4976,28.6634 -41.5619,-24.3637 -50.1609,-25.7969 -27.2301,-7.166 -53.0271,-2.8663 -48.7276,7.1657 0,1.4332 44.4281,31.5297 53.0271,30.0966 2.8663,0 1.4332,-5.7327 4.2995,-8.5991 5.7327,-4.2995 11.4653,5.7327 17.198,7.1659 5.7327,2.8663 14.3317,-2.8663 20.0644,2.8663 2.8663,2.8664 5.7325,7.1659 7.1657,11.4654 4.2995,1.4331 7.1658,2.8663 11.4653,1.4331 10.0322,0 -17.198,-32.9628 17.1981,-22.9307 2.8663,0 -2.8664,7.1659 -1.4332,8.5991 17.198,14.3316 21.4975,-20.0644 34.3959,-10.0322 4.2995,4.2995 -11.4652,12.8985 -7.1657,15.7648 32.9627,17.1979 4.2995,-4.2995 30.0964,-10.0321 4.2995,-1.4332 11.4654,40.1287 21.4975,41.5617 22.9306,4.2995 53.0271,2.8664 71.6582,27.2302 1.4333,2.8664 -5.7325,5.7327 -7.1657,8.599 -2.8663,8.5989 -10.0322,15.7649 -11.4654,24.3638 0,2.8663 7.1659,1.4331 5.7327,4.2995 -1.4332,4.2995 -8.599,5.7327 -10.0322,11.4653 -10.0321,35.8291 14.3317,25.7971 37.2623,27.2302 h 1.4332 c -2.8664,-4.2995 -4.2995,-8.599 -4.2995,-10.0322 1.4331,-5.7326 11.4653,-5.7326 12.8985,-11.4653 4.2995,-24.3639 -37.2623,-32.9629 -24.3639,-35.8291 4.2995,-1.4333 7.166,4.2994 10.0322,4.2994 0,0 27.2302,-24.3638 27.2302,-24.3638 1.4332,-7.1658 -17.198,1.4332 -11.4653,-10.0321 4.2995,-10.0322 14.3316,-17.1979 18.6311,-27.2301 12.8984,-31.5297 -18.6311,-54.4604 -27.2302,-70.2253 -1.4331,-2.8662 1.4332,-7.1657 2.8664,-10.032 0,-2.8664 -2.8664,-7.1659 0,-8.599 7.1658,-4.2995 15.7648,0 24.3638,-2.8664 2.8664,-1.4331 -2.8663,-10.0321 0,-8.599 8.5989,2.8664 14.3317,12.8985 24.3638,12.8985 10.0322,1.4332 48.7277,-11.4653 53.0272,-21.4975 4.2994,-10.0322 -27.2302,-11.4652 -14.3317,-20.0642 22.9306,-15.7649 50.1608,-21.4976 44.4281,-57.3268 -1.4331,-20.0642 -54.4602,-11.4652 -41.5617,-32.9627 1.4331,-4.2995 8.599,0 8.599,-2.8664 1.433,-4.2995 -5.7327,-8.599 -4.2995,-12.8985 0,-2.8663 4.2995,-2.8663 7.1658,-2.8663 10.0321,0 18.6311,4.2995 28.6633,4.2995 11.4653,0 1.4331,-22.9306 5.7326,-34.3959 2.8664,-10.0322 27.2301,-55.8935 24.3639,-80.2573 -28.6634,14.3316 -31.5297,-38.6955 -55.8936,-44.4282 -21.4974,-4.2995 -134.7174,20.0644 -147.616,40.1287 -7.1658,8.599 -10.0321,17.198 -15.7648,24.3638 z m -250.804,303.8311 c -2.8663,37.2623 27.2302,12.8985 48.7276,22.9306 2.8663,1.4333 -2.8662,7.166 0,10.0322 17.198,11.4653 31.5297,-8.5989 42.995,-18.6311 -7.1658,-7.1658 -15.7648,-12.8985 -18.6311,-14.3317 -7.1659,-1.4331 -8.599,11.4654 -15.7649,11.4654 -24.3637,0 -8.599,-14.3317 -37.2623,-18.6312 -7.1658,-1.4332 -14.3316,-1.4332 -22.9306,1.4332 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ sodipodi:nodetypes="cccccccssscccccscccsccccsccccccccscccccccccccscccsccccccscscccscccccssccccccscccsccc" /><path
+ id="be"
+ class="eu europe"
+ d="m 5671.7154,5427.0686 c -4.2995,-1.4332 -8.599,-2.8663 -12.8985,-2.8663 -10.0321,-1.4332 -20.0642,8.599 -28.6632,4.2995 -7.1659,-2.8664 -1.4332,-15.7649 -5.7327,-21.4976 -2.8663,-4.2995 -10.0322,-1.4331 -14.3317,-4.2995 -1.4332,-1.4331 5.7327,-4.2995 5.7327,-5.7325 -1.4332,-2.8665 -2.8663,-5.7327 -5.7327,-7.166 -2.8663,-1.433 -7.1658,4.2995 -8.599,2.8665 -5.7327,-4.2995 -7.1658,-12.8985 -12.8985,-17.198 -10.0322,-4.2996 -24.3639,0 -30.0964,-8.5991 -5.7327,-5.7326 5.7325,-14.3316 5.7325,-21.4975 -1.433,-5.7325 -10.032,-7.1658 -10.032,-12.8985 0,-7.1657 5.7326,-12.8984 7.1658,-18.6311 1.4332,-4.2995 8.599,-8.599 5.7327,-11.4653 -10.0322,-8.599 -18.6312,17.198 -28.6634,25.7969 -20.0642,18.6312 -67.3588,7.1658 -63.0593,-1.4332 4.2995,-7.1657 11.4654,-11.4652 11.4654,-18.631 0,-4.2995 -11.4654,-4.2995 -10.0322,-10.0322 0,-8.599 11.4653,-15.7649 11.4653,-24.3639 -2.8663,-24.3637 -61.6261,-10.0322 -64.4924,-21.4974 -1.4332,-5.7327 2.8663,-12.8985 1.4331,-18.6312 -4.2995,-22.9307 -35.8292,0 -44.4282,-20.0642 -5.7325,-11.4655 2.8665,-44.4282 -15.7647,-51.5941 -8.599,-4.2995 -15.7649,15.7649 -27.2302,15.7649 -31.5296,0 -32.9628,-54.4603 -35.8291,-74.5247 1.4332,-1.4331 1.4332,-1.4331 1.4332,-1.4331 25.7969,-7.1659 65.9256,-38.6955 98.8884,-48.7276 l 2.8663,5.7326 c -2.8663,37.2623 27.2302,12.8985 48.7276,22.9306 2.8663,1.4333 -2.8662,7.166 0,10.0322 17.198,11.4653 31.5297,-8.5989 42.995,-18.6311 8.5991,7.1657 17.1981,12.8984 20.0643,11.4652 4.2995,-2.8663 2.8663,-8.599 0,-14.3315 4.2995,1.4331 7.1658,2.8663 11.4653,1.4331 10.0322,0 -17.198,-32.9628 17.1981,-22.9307 2.8663,0 -2.8664,7.1659 -1.4332,8.5991 17.198,14.3316 21.4975,-20.0644 34.3959,-10.0322 4.2995,4.2995 -11.4652,12.8985 -7.1657,15.7648 32.9627,17.1979 4.2995,-4.2995 30.0964,-10.0321 4.2995,-1.4332 11.4654,40.1287 21.4975,41.5617 22.9306,4.2995 53.0271,2.8664 71.6582,27.2302 1.4333,2.8664 -5.7325,5.7327 -7.1657,8.599 -2.8663,8.5989 -10.0322,15.7649 -11.4654,24.3638 0,2.8663 7.1659,1.4331 5.7327,4.2995 -1.4332,4.2995 -8.599,5.7327 -10.0322,11.4653 -10.0321,35.8291 14.3317,25.7971 37.2623,27.2302 h 1.4332 c 5.7326,10.0321 14.3317,25.7969 15.7648,25.7969 2.8664,2.8664 11.4654,-2.8663 11.4654,1.4332 1.4331,5.7327 -10.0322,11.4654 -8.599,17.198 2.8663,8.599 15.7648,7.1659 20.0643,14.3317 15.7649,25.7969 -22.9307,30.0964 -32.9629,57.3266 -15.7648,-27.2302 -44.4281,25.7971 -50.1607,41.5618 -4.2995,12.8985 38.6954,68.792 7.1658,65.9256 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
+ id="lu"
+ class="eu europe"
+ d="m 5739.0742,5441.4003 c -7.1658,-2.8664 -15.7648,-7.1659 -24.3638,-7.1659 -7.1659,0 -14.3317,7.1659 -22.9306,7.1659 -1.4332,1.433 0,-4.2995 -1.4332,-5.7327 -5.7326,-2.8663 -11.4653,-5.7327 -18.6312,-8.599 l 1.4332,-5.7327 c 31.5296,2.8664 -11.4653,-53.0271 -7.1658,-65.9256 5.7326,-15.7647 34.3959,-68.792 50.1607,-41.5618 -1.4331,7.1659 -2.8663,14.3316 0,25.7971 7.1659,30.0964 41.5618,32.9627 44.4283,37.2622 20.0642,24.3638 -37.2624,35.8291 -21.4976,64.4925 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
+ id="de"
+ class="eu europe"
+ d="m 6657.7334,4638.8275 c 2.8664,22.9306 25.7969,67.3588 28.6634,81.6904 4.2995,34.396 -41.5619,57.3266 -31.5297,84.5568 5.7327,17.198 60.1929,24.3637 60.1929,45.8613 0,21.4975 -17.198,28.6633 -4.2995,44.4282 4.2995,7.1657 14.3317,10.032 17.1981,18.6311 4.2995,7.1658 -1.4332,17.198 0,24.3638 1.4331,4.2995 7.1658,2.8663 8.599,5.7327 7.1658,10.0322 -10.0322,34.3959 -14.3317,42.9949 -8.599,12.8985 12.8985,20.0644 17.198,32.9629 2.8662,7.1657 -7.1658,15.7647 -2.8663,21.4974 5.7325,8.599 18.631,5.7327 24.3637,11.4654 20.0644,18.6311 11.4654,123.2522 -5.7327,126.1185 -18.631,4.2995 -48.7276,-74.5246 -64.4923,-30.0965 -2.8663,7.1658 22.9306,12.8985 17.1979,17.198 -17.1979,14.3317 -41.5618,15.7649 -58.7598,25.797 -2.8663,1.4332 0,8.5991 -2.8663,10.0321 -11.4654,5.7327 -27.2301,-2.8662 -35.8291,4.2995 -7.1659,5.7327 -4.2995,17.198 -11.4654,22.9307 -2.8663,2.8664 -5.7326,-7.1658 -10.0321,-5.7327 -12.8986,2.8664 -14.3317,20.0644 -22.9306,25.7971 -4.2995,4.2995 -12.8985,-2.8664 -17.198,1.4331 -4.2995,2.8664 0,11.4654 -4.2995,15.7649 -5.7327,7.1657 -21.4976,-5.7327 -25.7971,-5.7327 -35.8291,5.7327 -41.5617,32.9628 -53.0271,55.8935 -2.8663,5.7325 -2.8663,-14.3317 -8.599,-18.6312 -4.2995,-5.7327 -12.8985,-7.1659 -20.0642,-8.599 -12.8986,-2.8664 14.3315,42.9949 42.9949,61.6261 2.8663,1.4332 12.8985,2.8663 14.3317,11.4653 4.2995,20.0644 -14.3317,12.8986 -17.198,28.6634 -1.4332,4.2994 30.0964,57.3265 34.3959,61.626 24.3638,24.3639 30.0965,7.166 45.8614,22.9307 10.032,10.0322 11.4652,25.797 21.4974,34.3959 22.9307,15.7649 84.5568,37.2624 83.1236,74.5247 -1.4331,38.6955 -10.0321,30.0965 -40.1287,22.9307 -2.8662,0 -5.7325,1.4331 -7.1657,4.2995 -2.8664,14.3317 5.7327,30.0964 -8.599,41.5617 -12.8985,10.0322 -73.0915,24.3639 -74.5247,47.2946 0,0 34.3961,47.2944 34.3961,48.7276 1.433,1.4332 -18.6312,18.6311 -11.4654,24.3639 15.7649,14.3315 31.5296,-7.166 18.6311,40.1286 0,2.8663 -2.8662,7.1658 -5.7327,7.1658 -45.8612,-12.8985 -10.032,-35.8292 -31.5296,-37.2624 -11.4653,0 -21.4975,10.0322 -32.9627,8.599 -5.7327,-1.4331 -4.2995,-11.4653 -8.599,-12.8985 -8.599,-2.8663 -17.198,4.2995 -24.3639,1.4332 -2.8663,-1.4332 2.8664,-10.0322 0,-10.0322 -17.198,1.4332 -1.4332,24.3639 -5.7327,25.797 -20.0643,5.7327 -53.0271,-2.8663 -71.6583,4.2995 -5.7326,2.8664 -2.8663,12.8986 -8.599,15.7649 -5.7325,4.2995 -12.8984,-2.8663 -18.631,1.4332 -4.2996,1.433 1.4331,8.599 -1.4332,11.4652 -1.4332,1.4333 -50.1608,14.3317 -55.8936,11.4654 -2.8662,-2.8664 0,-10.0321 -2.8662,-12.8986 -1.4332,-2.8663 -8.599,-2.8663 -10.0322,-5.7325 -1.4331,-2.8665 7.1659,-1.4332 5.7327,-4.2995 -5.7327,-18.6312 -45.8614,4.2995 -57.3266,-8.599 0,0 2.8663,-1.4332 2.8663,-2.8664 -8.599,-5.7327 0,18.6311 -2.8663,28.6633 0,5.7327 -27.2302,38.6955 -37.2624,28.6633 -5.7327,-5.7326 10.0322,-14.3316 5.7327,-20.0643 -1.4332,-1.4332 -5.7327,4.2995 -8.599,4.2995 -2.8664,0 -7.1659,-1.4332 -8.5989,-4.2995 -2.8665,-4.2995 7.1657,-10.0322 0,-15.7649 -5.7327,-4.2995 -8.599,-11.4652 -14.3317,-14.3315 -4.2995,-2.8664 -10.0322,4.2995 -15.7649,2.8663 -2.8663,-2.8663 0,-10.0322 -2.8663,-12.8985 -7.1658,-5.7327 -5.7327,20.0642 -28.6634,12.8985 -15.7647,-5.7327 -25.7969,-21.4975 -41.5617,-25.797 -1.4332,0 -48.7276,2.8663 -48.7276,2.8663 -5.7327,-2.8663 -5.7327,-12.8985 -11.4654,-15.7648 -1.4332,-2.8664 2.8663,7.1658 0,8.599 -2.8663,1.4331 -8.599,0 -10.0322,-2.8664 -1.4331,-4.2995 5.7327,-10.032 2.8664,-12.8985 -21.4976,-21.4974 -45.8613,17.198 -41.5618,18.6312 8.599,1.4332 17.198,-1.4332 25.7969,0 5.7327,1.4332 -10.0322,2.8663 -14.3316,5.7327 -2.8663,1.4331 1.4332,8.599 0,10.0322 -35.8292,18.631 -10.0321,-8.5991 -38.6955,-7.1659 -4.2995,0 -70.225,15.7649 -74.5245,7.1659 -1.4332,-2.8664 8.5989,-4.2996 7.1657,-5.7327 -12.8984,-10.0322 -18.6311,32.9627 -18.6311,-17.198 -1.4331,-20.0644 12.8984,-38.6955 14.3316,-58.7598 0,-2.8664 -5.7327,-2.8664 -5.7327,-7.1659 -1.433,-7.1658 1.4333,-14.3315 4.2995,-21.4974 0,0 20.0644,-32.9628 20.0644,-32.9628 1.4332,-8.5991 2.8663,-40.1287 7.1658,-50.1608 11.4654,-22.9307 40.1286,-40.1286 55.8935,-67.3588 5.7327,-10.0322 -80.2572,-20.0644 -85.9899,-24.3639 -4.2995,-4.2995 -1.4333,-12.8984 -5.7327,-17.1979 -7.1658,-5.7327 -53.0272,12.8984 -55.8934,8.599 -1.4332,-4.2995 4.2995,-10.0322 1.433,-12.8985 -42.9949,-38.6954 -14.3315,20.0644 -31.5296,1.4332 -14.3316,-14.3317 -21.4975,-47.2946 -32.9627,-54.4603 -4.2995,-4.2995 -12.8985,0 -15.7649,-4.2995 -15.7648,-28.6634 41.5618,-40.1287 21.4976,-64.4925 -2.8665,-4.2995 -37.2624,-7.1658 -44.4283,-37.2622 -12.8985,-53.0273 53.0272,-50.1609 32.9629,-83.1237 -4.2995,-7.1658 -17.198,-5.7327 -20.0643,-14.3317 -1.4332,-5.7326 10.0321,-11.4653 8.599,-17.198 0,-4.2995 -8.599,1.4332 -11.4654,-1.4332 -1.4331,-1.4331 -21.4975,-31.5296 -20.0643,-35.8291 1.4331,-5.7326 11.4653,-5.7326 12.8985,-11.4653 4.2995,-24.3639 -37.2623,-32.9629 -24.3639,-35.8291 4.2995,-1.4333 7.166,4.2994 10.0322,4.2994 0,0 27.2302,-24.3638 27.2302,-24.3638 1.4332,-7.1658 -17.198,1.4332 -11.4653,-10.0321 4.2995,-10.0322 14.3316,-17.1979 18.6311,-27.2301 12.8984,-31.5297 -18.6311,-54.4604 -27.2302,-70.2253 -1.4331,-2.8662 1.4332,-7.1657 2.8664,-10.032 0,-2.8664 -2.8664,-7.1659 0,-8.599 7.1658,-4.2995 15.7648,0 24.3638,-2.8664 2.8664,-1.4331 -2.8663,-10.0321 0,-8.599 8.5989,2.8664 14.3317,12.8985 24.3638,12.8985 10.0322,1.4332 48.7277,-11.4653 53.0272,-21.4975 4.2994,-10.0322 -27.2302,-11.4652 -14.3317,-20.0642 22.9306,-15.7649 50.1608,-21.4976 44.4281,-57.3268 -1.4331,-20.0642 -54.4602,-11.4652 -41.5617,-32.9627 1.4331,-4.2995 8.599,0 8.599,-2.8664 1.433,-4.2995 -5.7327,-8.599 -4.2995,-12.8985 0,-2.8663 4.2995,-2.8663 7.1658,-2.8663 10.0321,0 18.6311,4.2995 28.6633,4.2995 11.4653,0 1.4331,-22.9306 5.7326,-34.3959 2.8664,-10.0322 27.2301,-55.8935 24.3639,-80.2573 4.2995,-1.4332 8.5989,-4.2995 12.8984,-10.0322 5.7327,-5.7327 -7.1657,-2.8664 -20.0642,-2.8664 0,0 0,0 0,0 -2.8664,-2.8663 -7.1659,-1.4331 -10.0322,-1.4331 -2.8664,0 -4.2995,-1.4332 -5.7327,-2.8664 -11.4653,-14.3315 20.0644,-58.7596 31.5296,-64.4923 7.1658,-4.2995 15.7649,4.2994 22.9307,4.2994 107.4874,-4.2994 -111.7869,-12.8984 51.5939,-8.5989 1.4332,0 5.7327,1.433 7.1659,2.8662 8.599,15.7649 14.3317,81.6905 50.1609,67.3588 11.4652,-4.2995 -11.4655,-103.1879 21.4974,-103.1879 2.8663,0 2.8663,8.599 7.1658,10.0322 4.2995,2.8663 11.4654,2.8663 17.1979,2.8663 14.3317,2.8664 30.0966,-11.4653 42.9951,-5.7326 10.0322,4.2995 10.0322,18.631 15.7648,27.23 7.1659,11.4654 45.8613,84.5569 45.8613,35.8292 0,-10.0321 -21.4975,-7.1658 -30.0964,-15.7648 -14.3317,-12.8985 -11.4655,-45.8613 -38.6956,-50.1608 -4.2995,0 -37.2622,7.1659 -34.3959,-12.8985 1.4332,-12.8985 21.4974,-53.0271 8.5989,-68.792 -4.2995,-4.2995 -35.8291,11.4654 -40.1286,-4.2995 -1.4332,-2.8663 8.599,0 10.0322,-2.8663 2.8663,-2.8662 -10.0322,-8.5989 -7.1659,-8.5989 14.3317,-4.2995 38.6956,10.0322 42.995,-18.6312 0,-2.8663 -32.9628,-38.6954 -35.8291,-44.4281 -4.2995,-10.0322 -5.7327,-21.4975 -5.7327,-31.5297 10.0322,1.4332 27.2302,0 31.5296,0 18.6312,2.8663 37.2624,12.8985 55.8936,15.7649 -1.4332,4.2995 -1.4332,5.7326 1.433,4.2995 5.7328,-4.2995 8.599,-11.4654 14.3317,-12.8986 2.8663,0 -1.4332,7.1659 0,10.0322 4.2995,2.8664 10.0322,1.4332 14.3317,2.8664 10.0322,1.4331 20.0643,1.4331 27.2302,5.7326 4.2995,2.8664 5.7327,8.5989 5.7327,12.8984 0,1.4332 -2.8664,0 -2.8664,0 -2.8663,1.4332 -8.599,4.2995 -5.7327,5.7327 1.4332,2.8663 8.5991,-2.8663 10.0321,0 4.2995,7.1659 2.8665,15.7649 0,22.9307 -2.8662,7.1658 -22.9306,11.4653 -17.1979,18.6312 7.1658,10.0322 34.3959,-15.7649 35.8291,-2.8664 1.4332,8.5991 -14.3317,24.3638 -5.7327,27.2301 10.0322,4.2995 10.0322,-20.0642 20.0644,-21.4974 8.599,-1.4331 41.5619,27.2301 48.7276,24.3638 1.4332,0 30.0965,-32.9628 40.1287,-15.7649 20.0643,37.2624 -80.2573,75.9578 -25.797,81.6905 11.4653,1.4332 20.0643,-12.8985 31.5297,-12.8985 14.3316,1.4333 -1.4332,42.995 30.0964,21.4975 7.1658,-4.2995 11.4653,-40.1286 24.3639,-47.2944 18.631,-10.0322 38.6954,-14.3317 47.2944,5.7326 -1.4332,-4.2995 -2.8663,-11.4653 -1.4332,-12.8985 8.599,-10.0321 20.0644,-14.3317 27.2301,-22.9307 8.599,-10.032 10.0322,-25.7969 18.6312,-35.8291 2.8663,-2.8663 21.4975,4.2995 38.6954,10.0322 7.1659,-1.4332 14.3317,-2.8663 17.1981,-2.8663 10.0321,0 4.2995,20.0642 10.0321,28.6632 4.2995,5.7327 14.3317,2.8664 18.6312,8.599 8.599,7.1659 12.8984,27.2302 25.7969,25.7971 10.0322,0 21.4976,-7.1659 32.9629,-4.2995 4.2995,1.4331 -5.7327,8.599 -5.7327,12.8985 1.4332,11.4652 5.7327,22.9306 10.0322,34.3959 4.2995,11.4654 18.6311,15.7649 30.0964,20.0644 8.599,2.8663 14.3317,4.2995 18.6312,2.8663 z m -130.4181,-110.3537 c 2.8664,-12.8985 -2.8663,-28.6634 1.4332,-41.5619 4.2995,-12.8985 47.2944,24.3638 38.6954,11.4653 -5.7325,-8.599 -24.3637,-4.2995 -28.6632,-14.3316 -1.4332,-8.5991 11.4653,-15.7649 17.198,-22.9306 5.7327,-4.2995 -4.2995,17.1979 1.4332,18.6311 10.032,2.8663 20.0642,-1.4332 28.6632,1.4331 8.599,2.8664 -11.4653,14.3317 -8.599,22.9307 2.8664,10.0322 15.7649,11.4654 20.0644,21.4974 2.8663,2.8665 -15.7649,17.198 -38.6956,22.9307 -11.4652,4.2995 -21.4974,-12.8985 -31.5296,-20.0642 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
+ id="fr"
+ class="eu europe"
+ d="m 5301.9587,5103.1731 c 2.8663,20.0644 4.2995,74.5247 35.8291,74.5247 11.4653,0 18.6312,-20.0644 27.2302,-15.7649 18.6312,7.1659 10.0322,40.1286 15.7647,51.5941 8.599,20.0642 40.1287,-2.8665 44.4282,20.0642 1.4332,5.7327 -2.8663,12.8985 -1.4331,18.6312 2.8663,11.4652 61.6261,-2.8663 64.4924,21.4974 0,8.599 -11.4653,15.7649 -11.4653,24.3639 -1.4332,5.7327 10.0322,5.7327 10.0322,10.0322 0,7.1658 -7.1659,11.4653 -11.4654,18.631 -4.2995,8.599 42.9951,20.0644 63.0593,1.4332 10.0322,-8.5989 18.6312,-34.3959 28.6634,-25.7969 2.8663,2.8663 -4.2995,7.1658 -5.7327,11.4653 -1.4332,5.7327 -7.1658,11.4654 -7.1658,18.6311 0,5.7327 8.599,7.166 10.032,12.8985 0,7.1659 -11.4652,15.7649 -5.7325,21.4975 5.7325,8.5991 20.0642,4.2995 30.0964,8.5991 5.7327,4.2995 7.1658,12.8985 12.8985,17.198 1.4332,1.433 5.7327,-4.2995 8.599,-2.8665 2.8664,1.4333 4.2995,4.2995 5.7327,7.166 0,1.433 -7.1659,4.2994 -5.7327,5.7325 4.2995,2.8664 11.4654,0 14.3317,4.2995 4.2995,5.7327 -1.4332,18.6312 5.7327,21.4976 8.599,4.2995 18.6311,-5.7327 28.6632,-4.2995 4.2995,0 8.599,1.4331 12.8985,2.8663 7.1659,2.8663 12.8986,5.7327 18.6312,8.599 1.4332,1.4332 0,7.1657 1.4332,5.7327 8.5989,0 15.7647,-7.1659 22.9306,-7.1659 8.599,0 17.198,4.2995 24.3638,7.1659 2.8664,4.2995 11.4654,0 15.7649,4.2995 11.4652,7.1657 18.6311,40.1286 32.9627,54.4603 17.1981,18.6312 -11.4653,-40.1286 31.5296,-1.4332 2.8665,2.8663 -2.8662,8.599 -1.433,12.8985 2.8662,4.2994 48.7276,-14.3317 55.8934,-8.599 4.2994,4.2995 1.4332,12.8984 5.7327,17.1979 5.7327,4.2995 91.7226,14.3317 85.9899,24.3639 -15.7649,27.2302 -44.4281,44.4281 -55.8935,67.3588 -4.2995,10.0321 -5.7326,41.5617 -7.1658,50.1608 l -20.0644,32.9628 c -2.8662,7.1659 -5.7325,14.3316 -4.2995,21.4974 0,4.2995 5.7327,4.2995 5.7327,7.1659 -1.4332,20.0643 -15.7647,38.6954 -14.3316,58.7598 0,18.6311 0,24.3638 1.4332,24.3638 -48.7276,50.1608 -31.5297,-4.2995 -71.6583,7.1659 -2.8663,1.4331 2.8663,7.1658 2.8663,10.032 0,1.4332 -2.8663,0 -2.8663,0 -4.2995,5.7327 -15.7649,11.4654 -12.8985,18.6312 1.4331,7.1659 22.9307,-7.1658 22.9307,0 -1.4332,20.0644 -8.599,4.2995 -15.7649,10.0322 -12.8985,10.0322 -24.3638,38.6954 -34.3959,47.2944 -8.599,10.0322 -28.6634,5.7327 -34.396,17.1981 -4.2995,10.0321 4.2995,22.9305 0,31.5297 -5.7327,15.7647 -31.5296,15.7647 -41.5618,30.0964 -17.198,21.4975 1.4332,41.5619 -5.7327,64.4924 -1.4332,4.2995 -15.7648,-2.8663 -15.7648,15.7649 0,2.8663 -7.1659,5.7327 -5.7327,5.7327 17.198,4.2995 37.2624,-2.8664 45.8614,-20.0644 1.433,-2.8663 -5.7327,-5.7327 -7.166,-8.599 0,-4.2995 -1.433,-7.1658 1.4333,-10.0322 12.8984,-20.0642 53.0271,-20.0642 71.6582,-11.4652 5.7327,1.433 -5.7327,10.0321 -4.2995,14.3316 0,7.1658 8.599,10.0321 10.0322,17.198 1.4331,8.599 -18.6311,7.1658 -10.0322,21.4975 2.8663,2.8662 11.4653,-1.4333 12.8985,2.8662 2.8663,4.2995 -4.2995,11.4654 -2.8663,15.7649 1.4331,2.8663 7.1658,-5.7327 8.599,-2.8664 7.1658,7.1659 7.1658,17.1981 12.8985,25.7971 -65.9256,38.6954 -28.6634,21.4975 -8.599,55.8934 2.8663,5.7327 -2.8664,15.7649 1.4331,21.4974 4.2996,10.0322 18.6312,11.4655 22.9307,20.0644 7.1659,12.8985 -38.6955,50.1609 -45.8612,51.5939 -4.2995,1.4332 -7.166,-7.1657 -11.4654,-7.1657 -7.1658,1.4332 -20.0643,1.4332 -20.0643,8.5989 -2.8664,22.9307 44.4281,41.5619 51.5939,53.0272 4.2995,8.5989 5.7327,20.0643 5.7327,31.5296 -1.4332,4.2995 -14.3317,-2.8663 -15.7649,1.4332 -1.4331,2.8663 2.8664,5.7327 1.4332,7.1658 -4.2995,7.1659 -11.4652,11.4654 -17.1979,17.198 -4.2995,8.5991 10.0321,12.8986 11.4652,17.1981 0,2.8662 -7.1658,2.8662 -7.1658,5.7325 -1.4332,20.0644 35.8292,47.2946 51.5939,51.5941 8.599,2.8662 18.6312,-1.4333 27.2302,-1.4333 8.599,-1.4332 18.6312,-7.1657 25.7971,-2.8662 21.4974,15.7647 -27.2302,48.7276 -20.0644,74.5245 -1.4332,0 -25.7969,8.599 -28.6634,11.4654 -1.433,1.4331 2.8665,7.1658 0,7.1658 -1.433,-1.4332 0,-7.1658 -1.433,-7.1658 -8.599,1.4331 -18.6312,2.8663 -24.3639,8.599 -4.2995,4.2995 2.8664,14.3316 -2.8663,18.6311 -5.7327,4.2996 -15.7649,-1.4331 -22.9307,2.8664 -5.7327,4.2995 -4.2995,15.7647 -11.4652,21.4974 -5.7327,2.8663 -12.8986,-4.2995 -18.6312,-1.4332 -4.2995,1.4332 -1.4332,8.599 -5.7327,12.8985 -4.2995,5.7327 -15.7649,7.1659 -18.6312,14.3317 -1.4332,5.7327 11.4654,14.3317 5.7327,18.6312 -7.1659,7.1659 -21.4974,0 -31.5296,1.4332 -12.8985,2.8662 -21.4975,15.7647 -32.9629,20.0642 -12.8985,4.2995 -2.8663,-15.7647 -31.5296,-17.198 -18.6312,-1.4332 1.4332,7.166 -1.4331,10.0322 -2.8664,2.8663 -8.599,2.8663 -12.8986,1.4333 -4.2995,0 -8.599,0 -10.0321,-2.8665 0,-2.8662 10.0321,-10.0322 -10.0322,-20.0642 -4.2995,-1.4332 -8.599,0 -14.3317,0 -10.0322,-2.8664 -21.4974,-1.4332 -28.6632,-8.599 -7.1659,-7.1659 0,-21.4976 -5.7327,-28.6634 -2.8664,-4.2995 -8.599,5.7327 -14.3317,5.7327 -8.599,0 -25.7969,2.8663 -24.3639,-5.7327 1.4333,-11.4652 27.2302,-7.1657 28.6634,-18.6311 0,-11.4653 -15.7647,-20.0643 -25.7969,-18.6312 -8.599,1.4332 7.1657,17.1981 2.8662,22.9306 -7.1657,7.166 -18.6311,11.4655 -28.6632,10.0322 -22.9306,-1.4332 -15.7649,-41.5618 -20.0644,-35.8291 -20.0642,22.9307 24.3639,32.9629 11.4654,38.6954 -45.8613,18.6312 -25.7971,-11.4652 -27.2301,-17.1979 -1.4332,-5.7327 -51.5941,-11.4653 -55.8936,-14.3317 -11.4652,-5.7326 -25.7969,-24.3638 -40.1286,-15.7648 -15.7647,8.599 -38.6954,37.2624 -54.4603,45.8614 -14.3317,7.1657 -42.9949,1.433 -60.1929,25.7969 -2.8664,2.8663 4.2995,8.599 4.2995,12.8985 -2.8664,14.3317 -21.4976,22.9306 -22.9307,38.6954 0,4.2995 10.0322,2.8664 11.4653,7.1659 7.1659,25.797 -11.4653,18.6312 -1.4331,47.2944 2.8663,8.599 11.4653,15.7649 20.0643,22.9307 h -5.7327 c -22.9307,-5.7327 -48.7276,-18.6312 -70.2251,-4.2995 -4.2995,2.8663 1.4332,14.3317 -4.2995,15.7649 -14.3317,4.2995 -38.6954,-24.3639 -53.0271,-24.3639 -12.8985,0 -22.9307,7.1658 -34.3959,8.599 -8.5992,1.4332 -10.0322,-14.3317 -12.8986,-17.198 -7.1658,-5.7327 -18.6311,-8.599 -28.6633,-12.8984 14.3317,-18.6312 11.4653,-37.2624 -25.7969,-34.3961 -1.4332,0 -5.7327,5.7327 -8.5991,12.8986 v -1.4332 c -7.1658,-4.2995 -2.8663,-17.198 -10.0321,-22.9307 -4.2995,-4.2995 -12.8985,-4.2995 -20.0644,-5.7327 -2.8663,0 -7.1658,1.4332 -8.599,0 -15.7647,-14.3315 -30.0964,-31.5296 -54.4603,-35.8291 -17.198,-2.8663 -10.032,30.0966 -10.032,30.0966 -15.7649,-1.4333 -28.6634,-12.8987 -42.9951,-11.4655 -4.2995,0 -4.2995,8.599 -8.599,8.599 -8.599,-1.433 -12.8984,-11.4652 -21.4974,-12.8984 -8.599,-1.4333 -14.3317,7.1659 -22.9307,5.7327 -18.6312,0 -11.4653,-18.6312 -21.4975,-27.2302 -20.0643,-17.198 -38.6955,8.599 -57.3266,-5.7327 -1.4332,0 -15.7649,-32.9627 -17.1981,-34.3959 -18.631,-14.3317 -50.1606,-7.1659 -70.225,-25.797 -2.8663,-2.8664 1.4332,-10.0322 0,-12.8985 -2.8663,-2.8664 -11.4653,12.8985 -20.0643,10.0321 -18.6312,-8.599 22.9305,-25.797 10.0321,-40.1286 -4.2995,-5.7326 -12.8985,-8.599 -20.0643,-10.0322 -1.4332,0 0,7.1659 -2.8664,5.7327 0,0 -15.7648,-14.3317 -24.3637,-22.9307 8.5989,-1.4331 14.3316,-2.8663 20.0642,-5.7326 41.5619,-20.0643 58.7598,-157.6482 74.5247,-200.6433 2.8663,-7.1657 5.7326,-17.1979 12.8985,-20.0642 5.7327,-2.8663 18.6312,10.0322 21.4974,2.8663 4.2995,-7.1658 -5.7327,-18.6312 -14.3316,-20.0643 -7.1658,-1.4332 -8.599,18.6312 -15.7648,15.7648 -14.3317,-4.2995 7.1658,-27.2302 10.0322,-41.5619 5.7326,-22.9305 21.4975,-107.4874 37.2622,-118.9527 5.7327,-2.8662 25.797,28.6634 31.5297,42.995 20.0644,42.995 -7.1658,2.8664 7.1659,48.7277 2.8663,8.599 11.4652,15.7648 14.3315,24.3638 1.4332,4.2994 -4.2995,17.1979 0,15.7648 7.1659,-1.4332 11.4654,-11.4654 10.0322,-17.1981 -2.8663,-8.5989 -12.8985,-11.4652 -18.6312,-18.631 -11.4652,-18.6312 4.2995,-53.0272 -7.1657,-74.5247 -5.7327,-11.4653 -15.7649,-21.4975 -24.3639,-31.5297 -5.7326,-7.1657 -12.8985,-14.3316 -21.4975,-20.0642 v 0 c 8.599,2.8663 18.6312,5.7326 27.2302,1.4331 10.0322,-5.7326 -21.4975,-20.0643 -18.6312,-31.5297 2.8664,-11.4652 15.7649,-17.1979 17.198,-28.6632 1.4332,-8.599 -8.599,-15.7649 -8.599,-24.3639 0,-10.032 8.599,-20.0642 8.599,-30.0964 0,-2.8663 -7.1658,-2.8663 -11.4653,-1.4332 -2.8663,1.4332 0,10.0322 -2.8663,8.5989 -7.1659,-2.8662 -8.5989,-14.3315 -14.3316,-18.631 -4.2995,-1.4332 -10.0322,4.2995 -14.3317,1.4331 -4.2995,-2.8663 0,-12.8985 -4.2995,-15.7648 -25.797,-24.3639 -11.4653,28.6633 -35.8292,-18.6312 -1.4332,-4.2994 -2.8662,-35.8291 -8.599,-42.9949 -1.4332,-1.4332 -5.7327,0 -7.1659,-1.4332 -5.7325,-8.599 -12.8984,-18.6312 -17.1979,-28.6633 -5.7326,-14.3317 22.9306,-28.6633 25.7971,-34.396 5.7325,-12.8985 -28.6634,-21.4974 -28.6634,-22.9306 -2.8663,-10.0322 -2.8663,-15.7648 -1.4332,-20.0643 h -1.4331 c -58.7598,-5.7327 -4.2995,-20.0644 -2.8664,-51.594 1.4332,-18.6312 -58.7598,-2.8663 -60.1929,-10.0322 -2.8664,-11.4653 14.3316,-15.7648 22.9307,-21.4975 1.433,-1.4332 -7.1659,2.8663 -8.5991,1.4332 -1.4331,-1.4332 0,-5.7327 -1.4331,-7.1659 -4.2995,0 -5.7327,4.2995 -10.0322,5.7327 -11.4653,0 -22.9307,-8.599 -32.9629,-4.2995 -1.433,1.4332 -2.8663,2.8663 -2.8663,4.2995 v -1.4332 c 2.8663,-18.631 17.198,-37.2622 -12.8984,-40.1286 -15.7649,-1.4331 -11.4654,18.6312 -22.9307,11.4654 -8.599,-5.7327 -20.0642,-24.3639 -28.6634,-28.6634 -5.7325,-1.4331 -12.8984,4.2995 -17.1979,0 -18.6312,-14.3317 4.2995,-31.5296 -31.5297,-28.6632 -2.8663,1.4331 2.8664,8.599 0,10.032 -10.032,4.2995 -24.3637,12.8986 -32.9627,5.7327 -8.599,-5.7327 0,-21.4974 -2.8664,-31.5296 -4.2995,-17.198 -22.9307,-12.8985 -34.396,-20.0643 -1.4332,-1.4332 2.8663,-5.7327 5.7327,-5.7327 14.3317,-2.8662 28.6633,-1.4332 42.995,-1.4332 2.8662,0 10.0322,5.7327 10.0322,2.8664 0,-2.8664 -12.8985,-22.9306 -21.4975,-37.2623 l 1.4331,1.4332 c 7.1659,2.8663 15.7649,0 24.3638,1.4331 5.7327,0 18.6312,5.7327 14.3317,2.8664 -10.0322,-5.7327 -27.2301,-2.8664 -31.5296,-12.8985 -2.8664,-8.5991 20.0642,-5.7327 21.4974,-14.3317 4.2995,-17.1979 -85.9899,48.7277 -55.8935,-28.6633 1.4332,0 48.7278,-18.6312 61.6262,-18.6312 15.7648,0 -20.0643,18.6312 14.3316,8.599 10.0322,-1.4331 20.0644,-12.8985 30.0966,-10.0321 8.5989,2.8663 4.2995,20.0643 12.8984,22.9305 5.7327,0 1.4332,-17.1979 7.1658,-18.631 10.0322,0 17.198,18.631 27.2302,15.7648 8.599,-2.8663 2.8664,-21.4975 11.4654,-27.2302 2.8663,-2.8663 8.599,5.7327 12.8984,5.7327 8.599,0 18.6312,-8.599 25.797,-4.2995 7.1658,4.2995 1.4332,18.6312 8.599,22.9307 4.2995,2.8663 4.2995,-7.1659 8.599,-10.0322 7.1659,-5.7327 30.0964,55.8935 35.8291,67.3588 1.4332,1.4332 1.4332,-5.7327 4.2995,-5.7327 8.599,-5.7326 17.198,-7.1658 27.2302,-11.4653 7.1659,-4.2995 12.8984,-15.7649 20.0643,-12.8985 12.8985,5.7326 1.4331,55.8934 35.8292,41.5617 10.032,-4.2994 4.2995,-22.9305 11.4652,-32.9627 7.1658,-10.0322 8.599,20.0643 17.198,21.4975 8.599,1.4332 15.7649,-2.8663 24.3639,-1.4332 8.599,0 25.7969,12.8984 28.6632,4.2995 2.8664,-15.7648 -30.0964,-27.2302 -25.7969,-42.9949 2.8664,-10.0322 5.7327,-20.0644 10.0322,-30.0965 -2.8663,0 -5.7327,-1.4332 -4.2995,-7.1659 2.8663,-10.0322 11.4652,-21.4975 11.4652,-32.9627 0,-2.8664 -8.5989,1.433 -10.032,-1.4332 -2.8664,-7.1658 0,-18.6312 -4.2995,-25.797 -1.4332,-4.2995 -10.0322,-4.2995 -12.8986,-8.599 -2.8663,-8.5989 -4.2995,-20.0644 -2.8663,-28.6633 0,-4.2995 7.1658,-5.7327 7.1658,-8.599 0,-10.0322 -5.7326,-20.0644 -7.1658,-30.0965 0,-2.8664 2.8663,5.7326 4.2995,7.1658 11.4654,5.7327 21.4974,11.4653 32.9629,14.3317 2.8662,1.4332 7.1657,-1.4332 10.032,-1.4332 11.4654,0 22.9307,-5.7327 32.9629,0 5.7327,1.4332 2.8662,10.0322 0,15.7649 -1.4332,2.8663 -5.7327,1.4331 -8.599,4.2995 -4.2995,4.2995 11.4652,50.1607 12.8985,50.1607 58.7598,8.5991 -25.797,-27.2301 20.0643,-10.0321 21.4975,8.599 48.7277,12.8985 68.7919,22.9307 7.1659,4.2995 11.4654,14.3315 18.6312,15.7647 32.9628,4.2995 25.7969,-14.3317 50.1608,-21.4974 5.7327,-1.4332 11.4653,-1.4332 18.6312,-1.4332 -15.7649,-2.8663 -30.0965,-12.8985 -10.0322,-47.2944 14.3317,-22.9307 110.3537,-25.797 136.1508,-40.1287 10.032,-4.2995 17.198,-12.8984 27.2302,-18.6311 8.5989,-4.2995 24.3637,-2.8663 28.6632,-11.4655 4.2995,-8.5989 -11.4653,-12.8984 -12.8985,-21.4974 -1.4332,-4.2995 0,-11.4653 2.8663,-14.3317 2.8664,-2.8663 8.599,2.8664 8.599,0 0,-2.8663 -7.1658,-2.8663 -7.1658,-7.1658 0,-10.0322 11.4654,-78.824 14.3317,-85.9899 5.7327,-17.198 53.0271,-20.0643 65.9256,-21.4975 17.1979,-1.4332 34.3959,-2.8663 50.1608,-5.7327 z m 804.0059,1563.5838 c 20.0644,14.3317 1.0072,47.0705 1.0072,62.8354 6.9309,9.9826 8.3042,16.0925 11.8914,24.5878 4.2995,10.032 4.2995,41.5617 4.2995,50.1606 1.433,24.3639 -22.9307,42.9951 -22.9307,60.1931 0,18.6311 7.1658,44.4281 -8.599,61.6261 -1.4332,2.8664 -8.599,0 -8.599,2.8664 0,4.2995 10.0321,0 8.599,2.8663 0,5.7327 -8.599,5.7327 -11.4654,10.0322 -4.2995,10.0322 0,22.9306 -7.1657,31.5296 -20.0644,20.0643 -14.3317,-21.4974 -18.6312,-22.9307 -18.6312,-5.7327 -30.0965,8.599 -42.9949,-12.8984 -2.8665,-4.2995 5.7325,-10.0322 2.8662,-15.7649 -4.2994,-8.599 -21.4974,-11.4653 -20.0643,-21.4975 0,-11.4653 22.9306,-17.198 21.4976,-28.6634 -1.4333,-8.5989 -24.3639,8.5992 -25.7971,0 -2.8663,-11.4652 20.0644,-17.1979 18.6311,-27.23 -1.433,-11.4654 -22.9306,-8.5991 -25.7969,-20.0644 -1.4332,-8.5989 17.198,-11.4652 17.198,-21.4974 0,-8.599 -14.3317,-12.8985 -18.6312,-21.4975 -1.4331,-5.7327 14.3317,-1.4332 17.1979,-5.7327 2.8665,-10.0322 1.4333,-22.9306 7.166,-31.5296 1.4332,-2.8663 4.2995,7.1657 7.1657,5.7327 7.1659,-1.4332 8.599,-11.4654 15.7649,-14.3317 5.7326,-2.8664 12.8985,2.8663 18.6312,0 7.1658,-4.2995 7.1658,-17.198 14.3315,-18.6312 8.599,-1.4332 15.7649,10.0322 25.7971,10.0322 8.599,0 -1.4332,-18.6312 0,-28.6634 1.4331,-11.4652 12.8985,-20.0642 18.6311,-31.5296 z m -331.0613,-123.2522 c 11.4654,0 21.4976,-10.0322 21.4976,-20.0644 0,-10.0322 -10.0322,-18.6312 -21.4976,-18.6312 -11.4653,0 -21.4974,8.599 -21.4974,18.6312 0,10.0322 10.0321,20.0644 21.4974,20.0644 11.4654,0 -11.4653,0 0,0 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ sodipodi:nodetypes="cscccsccsccccsccccsccccccccsccccccccccccccccscccccccccscscccccccccccccccccccccccccccsccsscccccccccsccccscscccccccsccccccccccscscccccccccccccscscccccccccccccccccccscccccsscscsscccsccccccccccccscccccccccccccccsscccccccsccccccsscccccccsscccccsccccscccscsscccccccccscssscccccccscscccccscccccscccccccsccssssss" /><path
+ id="es"
+ class="eu europe"
+ d="m 5033.9567,6695.4203 c 10.0322,4.2994 21.4975,7.1657 28.6633,12.8984 2.8664,2.8663 4.2994,18.6312 12.8986,17.198 11.4652,-1.4332 21.4974,-8.599 34.3959,-8.599 14.3317,0 38.6954,28.6634 53.0271,24.3639 5.7327,-1.4332 0,-12.8986 4.2995,-15.7649 21.4975,-14.3317 47.2944,-1.4332 70.2251,4.2995 h 5.7327 c 7.1658,7.1659 12.8985,14.3317 10.0322,22.9307 -2.8664,11.4652 -21.4975,8.5989 -28.6634,15.7647 -5.7326,5.7327 17.198,38.6956 2.8664,63.0593 -7.1659,15.7649 -68.792,40.1286 -85.9899,47.2946 -15.7649,5.7327 -40.1287,11.4652 -51.5941,21.4974 -8.599,5.7327 -21.4974,27.2302 -34.3959,30.0965 -48.7276,14.3316 -136.1508,4.2994 -174.8462,35.8291 -10.0322,8.599 -30.0965,15.7649 -27.2302,28.6634 4.2995,10.0322 25.797,8.5989 24.3639,18.6311 0,4.2995 -44.4281,14.3317 -47.2946,15.7648 -17.1979,12.8985 -22.9306,37.2623 -37.2622,51.594 -40.1286,41.5617 -93.1559,81.6904 -118.9528,134.7176 -11.4653,21.4975 4.2995,90.2893 17.198,108.9205 4.2995,5.7327 57.3266,35.8292 44.4281,44.4281 -10.0321,8.599 -34.3959,11.4654 -44.4281,18.6312 -2.8663,2.8664 -2.8663,10.0322 -5.7326,11.4654 -2.8664,2.8663 -7.1659,-1.4332 -10.0322,-1.4332 -11.4654,2.8663 -24.3639,4.2995 -34.3961,11.4653 -4.2995,4.2995 -1.433,14.3317 -7.1657,18.6312 -4.2995,2.8664 -11.4653,-2.8663 -14.3317,0 -5.7326,7.1659 -1.4331,18.6311 -5.7326,24.3638 -5.7327,5.7327 -17.1981,0 -21.4976,7.1658 -5.7325,8.599 2.8664,21.4975 -1.4331,30.0966 -11.4654,28.6632 -37.2623,-4.2997 -38.6955,41.5617 0,11.4654 22.9307,15.7649 20.0644,25.7969 -4.2995,10.0322 -20.0644,8.5992 -31.5297,7.1659 -7.1659,0 -14.3317,-7.1659 -21.4974,-8.5989 -30.0966,-8.599 -65.9258,5.7327 -91.7227,22.9306 -44.4281,28.6633 -44.4281,84.5568 -90.2895,107.4875 -17.1979,10.032 -22.9306,-37.2624 -65.9255,-25.7971 -8.599,2.8664 -12.8985,14.3317 -22.9307,17.1981 -12.8985,4.2995 -42.9949,-20.0644 -55.8934,-21.4976 -17.1981,-4.2995 -35.8291,5.7327 -54.4603,2.8664 -10.0322,-2.8664 -15.7649,-11.4654 -25.797,-14.3317 -18.6311,-7.1658 -103.1879,-20.0644 -118.9528,-17.198 -17.198,4.2995 -25.797,25.797 -41.5618,32.9628 -22.9306,8.5991 -51.5939,-17.198 -83.1236,-1.4331 -25.7969,12.8985 -22.9307,24.3637 -35.8291,42.9949 -1.4332,1.4332 -10.0322,-7.1658 -15.7649,-2.8663 -8.599,7.1658 -15.7648,18.6312 -27.2301,22.9307 -4.2994,1.4331 -4.2994,-8.599 -8.5991,-11.4654 -5.7325,-4.2995 -14.3315,-5.7326 -18.631,-10.0322 -5.7327,-7.1658 -7.1659,-17.198 -14.3317,-22.9305 -4.2995,-4.2995 -12.8985,0 -17.198,-4.2995 -10.0322,-10.0322 -24.3638,-57.3268 -27.2301,-71.6583 0,-1.4332 21.4974,20.0642 18.6312,7.1658 0,-4.2995 -8.599,0 -10.0322,-2.8663 -1.4332,-2.8664 5.7327,-5.7327 4.2995,-8.599 -4.2995,-24.3639 -25.797,4.2995 -24.3639,-37.2623 0,0 55.8935,-25.797 42.995,-28.6634 -11.4654,-2.8663 -18.6311,21.4974 -30.0966,18.6312 -10.032,-1.4332 -5.7325,-18.6312 -10.032,-27.2302 -4.2995,-8.599 -10.0322,-15.7648 -15.7649,-22.9307 0,0 -38.6954,-37.2622 -38.6954,-37.2622 0,-1.4332 0,-1.4332 0,-2.8664 -1.4332,2.8664 -2.8664,4.2995 -5.7327,4.2995 -8.599,1.4332 -12.8985,-10.0321 -20.0643,-14.3317 -5.7327,-2.8663 -31.5296,-7.1658 -50.1608,-7.1658 2.8663,-60.1928 -11.4654,-70.225 35.8291,-111.7869 8.599,-7.1658 7.1658,-22.9307 15.7648,-27.2301 2.8664,-1.4333 73.0915,-2.8663 55.8935,-31.5297 -4.2995,-7.1658 -18.6311,4.2995 -25.7969,0 -7.1659,-5.7327 -5.7327,-17.198 -8.5991,-25.7969 -2.8663,-8.599 -2.8663,-18.6312 -8.599,-25.797 -1.4331,-2.8664 -10.0321,0 -10.0321,-2.8664 4.2995,-10.0321 14.3316,-17.198 18.6311,-27.2302 8.5991,-17.1979 -15.7648,-4.2995 8.5991,-24.3637 21.4974,-17.198 50.1607,-14.3317 53.0271,-51.594 0,-2.8663 -27.2302,-21.4975 -32.9629,-32.9628 -8.599,-18.6311 1.4332,-48.7276 1.4332,-51.594 -1.4332,-1.4331 -24.3638,-45.8613 -24.3638,-47.2944 -1.4331,-2.8664 4.2994,1.4331 7.1659,1.4331 12.8984,4.2996 21.4974,5.7327 34.3959,8.5991 32.9629,8.599 40.1286,11.4652 57.3266,-21.4976 20.0644,-40.1286 -1.4332,-25.797 -5.7327,-55.8934 -4.2995,-27.2302 40.1286,-14.3317 41.5618,-34.3959 1.4333,-14.3317 -14.3316,-1.4332 -5.7327,-18.6312 1.4333,-2.8664 7.166,-2.8664 8.599,-7.1659 4.2997,-10.0321 4.2997,-20.0643 5.7327,-30.0965 1.4332,-11.4652 10.0322,-22.9306 8.599,-34.3959 0,0 -12.8985,-34.3961 -12.8985,-34.3961 4.2995,-4.2995 14.3317,4.2995 20.0644,1.4332 0,0 30.0965,-31.5296 30.0965,-31.5296 21.4974,-11.4653 61.6261,-12.8985 73.0915,-44.4281 8.5989,-28.6634 -28.6634,-25.797 -38.6956,-27.2302 -7.1658,-1.4332 5.7327,-55.8934 0,-58.7598 -27.2302,-14.3317 -32.9627,-1.4331 -65.9256,-14.3317 -5.7327,-2.8663 -4.2995,-17.198 -17.198,-8.599 -2.8664,2.8665 2.8663,10.0322 0,12.8985 -20.0643,17.1981 -41.5618,-2.8663 -47.2945,-4.2995 -5.7326,-2.8663 -12.8985,4.2995 -17.198,1.4332 -2.8662,-1.4332 8.599,-4.2995 5.7327,-7.1657 -1.4332,-5.7327 -8.5989,-7.166 -14.3316,-7.166 -8.599,-1.433 -18.6312,1.4333 -27.2302,0 -1.4331,-1.433 1.4332,-4.2995 1.4332,-7.1657 0,-1.4332 1.4332,-7.1659 0,-5.7327 -7.1658,1.4332 -24.3639,21.4974 -37.2624,12.8984 -34.3959,-24.3637 32.9629,-30.0964 15.7649,-47.2944 -2.8664,-2.8664 -8.5989,0 -11.4654,-2.8664 -1.433,-2.8663 5.7327,-8.599 2.8665,-10.032 -25.7971,-5.7327 -61.6263,2.8662 -83.1237,14.3316 2.8664,-11.4654 -12.8985,-21.4976 -12.8985,-32.9628 -1.4332,-4.2995 7.1658,5.7327 10.0322,2.8663 2.8663,-1.4331 -2.8664,-7.1658 -1.4332,-10.0322 2.8664,-12.8985 24.3639,-8.599 34.3959,-17.198 2.8664,-1.4331 8.5991,-8.599 4.2996,-7.1658 -8.5991,1.4332 -17.1981,10.0322 -25.797,11.4653 -7.1658,1.4332 -10.0321,-11.4653 -4.2995,-17.198 8.5989,-5.7327 27.2301,-1.433 30.0965,-11.4652 1.4331,-8.599 -18.6311,2.8662 -25.797,0 -5.7326,-2.8665 -10.0321,-10.0322 -11.4653,-15.7649 -1.4332,-14.3317 12.8985,4.2995 14.3317,2.8664 2.8663,-5.7327 0,-12.8985 4.2995,-18.6312 4.2995,-7.1659 17.1979,-8.599 18.6311,-17.1979 7.1658,-70.2253 -50.1608,10.032 -61.6262,-58.7599 -8.599,-47.2945 31.5297,-32.9628 32.9629,-40.1286 1.4332,-4.2995 -11.4654,0 -15.7649,-2.8664 -1.4331,-2.8663 4.2995,-5.7326 5.7327,-5.7326 15.7649,-2.8664 24.3639,1.4331 35.8291,0 37.2624,-2.8664 87.4232,-34.396 121.8191,-48.7276 12.8985,-5.7327 27.2302,-24.3639 40.1287,-15.7649 5.7327,4.2995 -8.599,21.4975 -1.4332,22.9307 11.4654,1.4332 18.6311,-18.6312 30.0965,-18.6312 38.6955,0 35.8292,67.3588 71.6583,75.9578 7.1658,1.4332 10.0321,-14.3317 17.198,-12.8985 40.1286,10.0322 18.6312,11.4653 58.7598,17.198 10.0321,1.4332 28.6632,-2.8663 37.2622,-1.4332 8.599,2.8664 12.8985,11.4654 21.4976,11.4654 11.4653,0 21.4975,-14.3317 32.9627,-11.4654 10.0322,2.8664 11.4654,20.0643 20.0644,27.2301 8.599,7.1659 25.797,-1.4331 34.3959,7.1659 2.8663,2.8663 -5.7327,7.1658 -2.8662,8.599 2.8662,4.2995 11.4652,-5.7327 15.7647,-2.8663 35.8292,24.3638 128.9849,70.2251 176.2795,55.8934 2.8662,-1.4332 2.8662,-7.1657 5.7325,-8.599 5.7327,-1.4332 11.4654,0 17.1981,0 11.4653,1.4333 41.5617,-1.4332 50.1607,15.7648 0,1.4332 -1.4331,4.2995 -2.8663,5.7327 11.4654,2.8664 42.9949,32.9629 54.4603,32.9629 4.2995,0 -2.8662,-10.0322 0,-12.8985 2.8663,-4.2995 8.599,-5.7327 14.3317,-7.1659 41.5617,-5.7326 14.3317,-1.4331 31.5297,18.6311 5.7325,5.7327 17.1979,-2.8662 22.9306,1.4333 8.599,4.2994 12.8985,14.3316 20.0643,18.6311 18.6312,10.0321 58.7598,8.599 85.99,1.4331 8.5989,8.599 24.3637,22.9307 24.3637,22.9307 2.8664,1.4332 1.4332,-5.7327 2.8664,-5.7327 7.1658,1.4332 15.7648,4.2996 20.0643,10.0322 12.8984,14.3316 -28.6633,31.5296 -10.0321,40.1286 8.599,2.8664 17.198,-12.8985 20.0643,-10.0321 1.4332,2.8663 -2.8663,10.0321 0,12.8985 20.0644,18.6311 51.594,11.4653 70.225,25.797 1.4332,1.4332 15.7649,34.3959 17.1981,34.3959 18.6311,14.3317 37.2623,-11.4653 57.3266,5.7327 10.0322,8.599 2.8663,27.2302 21.4975,27.2302 8.599,1.4332 14.3317,-7.166 22.9307,-5.7327 8.599,1.4332 12.8984,11.4654 21.4974,12.8984 4.2995,0 4.2995,-8.599 8.599,-8.599 14.3317,-1.4332 27.2302,10.0322 42.9951,11.4655 0,0 -7.166,-32.9629 10.032,-30.0966 24.3639,4.2995 38.6956,21.4976 54.4603,35.8291 1.4332,1.4332 5.7327,0 8.599,0 7.1659,1.4332 15.7649,1.4332 20.0644,5.7327 7.1658,5.7327 2.8663,18.6312 10.0321,22.9307 v 1.4332 c -7.1658,14.3315 -10.0321,34.3959 34.396,21.4975 z m -1248.2872,1060.5425 10.032,41.5619 h 31.5297 c 0,-4.2995 -1.4331,-7.1659 -1.4331,-11.4654 -1.4332,-8.599 -4.2995,-17.198 -1.4332,-25.797 1.4332,-4.2995 14.3317,-5.7327 12.8985,-10.0322 -8.599,-20.0642 -48.7277,4.2995 -51.5939,5.7327 0,0 0,0 0,0 z m 369.7566,173.413 21.4975,14.3317 c 0,-12.8984 2.8664,-27.2301 1.4332,-38.6954 -2.8664,-11.4654 -14.3317,17.198 -22.9307,24.3637 0,0 0,0 0,0 z m 27.2302,11.4654 2.8663,-4.2994 c -1.4331,0 -2.8663,0 -2.8663,2.8662 0,1.4332 0,1.4332 0,1.4332 z m 1010.3818,-752.4119 c -21.4975,73.0913 4.2994,21.4974 40.1286,51.5939 10.0322,8.5989 -63.0593,78.8242 -68.7919,77.3909 -7.1659,0 -5.7327,-15.7649 -12.8984,-20.0643 -21.4976,-12.8985 -22.9307,10.0321 -30.0966,-11.4653 -2.8663,-10.0322 0,-22.9307 -7.1658,-28.6634 -5.7327,-5.7325 -14.3317,4.2995 -20.0644,2.8664 -10.032,-1.4332 -20.0642,-5.7327 -28.6632,-11.4654 -1.4332,-1.433 1.433,-4.2995 2.8663,-5.7325 35.8291,-27.2302 80.2572,-45.8614 124.6854,-54.4603 z m 150.4824,1.433 c 32.9628,83.1237 -5.7327,25.7971 -25.7971,15.7649 -8.5989,-2.8663 -20.0642,4.2995 -28.6632,-1.4332 -35.8291,-24.3637 11.4653,-34.3959 54.4603,-14.3317 z m -255.1035,134.7176 c -8.5989,8.599 -21.4976,8.599 -21.4976,15.7649 0,5.7327 5.7328,17.198 12.8987,17.198 8.5989,0 14.3315,0 25.7969,-10.0322 11.4653,-10.0322 0,-17.198 0,-17.198 l -15.7649,-5.7327 z m -34.396,-42.9949 c -11.4653,2.8663 -14.3316,10.0322 -20.0643,17.198 -5.7327,8.5989 -14.3317,21.4974 -1.4332,27.2301 7.1659,4.2995 28.6634,-7.1657 32.9629,-15.7647 2.8663,-7.1659 11.4652,-8.5992 11.4652,-17.1981 0,-7.1658 -10.0322,-12.8985 -10.0322,-12.8985 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
+ id="pt"
+ class="eu europe"
+ d="m 3564.9619,7442.0995 c 2.8663,-60.1928 -11.4654,-70.225 35.8291,-111.7869 8.599,-7.1658 7.1658,-22.9307 15.7648,-27.2301 2.8664,-1.4333 73.0915,-2.8663 55.8935,-31.5297 -4.2995,-7.1658 -18.6311,4.2995 -25.7969,0 -7.1659,-5.7327 -5.7327,-17.198 -8.5991,-25.7969 -2.8663,-8.599 -2.8663,-18.6312 -8.599,-25.797 -1.4331,-2.8664 -10.0321,0 -10.0321,-2.8664 4.2995,-10.0321 14.3316,-17.198 18.6311,-27.2302 8.5991,-17.1979 -15.7648,-4.2995 8.5991,-24.3637 21.4974,-17.198 50.1607,-14.3317 53.0271,-51.594 0,-2.8663 -27.2302,-21.4975 -32.9629,-32.9628 -8.599,-18.6311 1.4332,-48.7276 1.4332,-51.594 -1.4332,-1.4331 -24.3638,-45.8613 -24.3638,-47.2944 -1.4331,-2.8664 4.2994,1.4331 7.1659,1.4331 12.8984,4.2996 21.4974,5.7327 34.3959,8.5991 32.9629,8.599 40.1286,11.4652 57.3266,-21.4976 20.0644,-40.1286 -1.4332,-25.797 -5.7327,-55.8934 -4.2995,-27.2302 40.1286,-14.3317 41.5618,-34.3959 1.4333,-14.3317 -14.3316,-1.4332 -5.7327,-18.6312 1.4333,-2.8664 7.166,-2.8664 8.599,-7.1659 4.2997,-10.0321 4.2997,-20.0643 5.7327,-30.0965 1.4332,-11.4652 10.0322,-22.9306 8.599,-34.3959 0,0 -12.8985,-34.3961 -12.8985,-34.3961 4.2995,-4.2995 14.3317,4.2995 20.0644,1.4332 0,0 30.0965,-31.5296 30.0965,-31.5296 21.4974,-11.4653 61.6261,-12.8985 73.0915,-44.4281 8.5989,-28.6634 -28.6634,-25.797 -38.6956,-27.2302 -7.1658,-1.4332 5.7327,-55.8934 0,-58.7598 -27.2302,-14.3317 -32.9627,-1.4331 -65.9256,-14.3317 -5.7327,-2.8663 -4.2995,-17.198 -17.198,-8.599 -2.8664,2.8665 2.8663,10.0322 0,12.8985 -20.0643,17.1981 -41.5618,-2.8663 -47.2945,-4.2995 -5.7326,-2.8663 -12.8985,4.2995 -17.198,1.4332 -2.8662,-1.4332 8.599,-4.2995 5.7327,-7.1657 -1.4332,-5.7327 -8.5989,-7.166 -14.3316,-7.166 -8.599,-1.433 -18.6312,1.4333 -27.2302,0 -1.4331,-1.433 1.4332,-4.2995 1.4332,-7.1657 0,-1.4332 1.4332,-7.1659 0,-5.7327 -7.1658,1.4332 -24.3639,21.4974 -37.2624,12.8984 -34.3959,-24.3637 32.9629,-30.0964 15.7649,-47.2944 -2.8664,-2.8664 -8.5989,0 -11.4654,-2.8664 -1.433,-2.8663 5.7327,-8.599 2.8665,-10.032 -25.7971,-5.7327 -61.6263,2.8662 -83.1237,14.3316 -2.8663,14.3316 -38.6954,21.4975 -30.0965,34.396 5.7327,7.1657 22.9307,4.2995 25.797,12.8985 2.8664,7.1657 -15.7648,-1.4333 -20.0643,4.2994 -8.5989,12.8985 -7.1659,74.5246 -4.2995,90.2895 0,4.2995 7.1658,5.7327 7.1658,11.4653 -1.4332,24.3638 -11.4652,38.6955 -21.4974,58.7598 -4.2995,8.599 -22.9307,27.2301 -12.8985,25.7969 10.032,-2.8663 10.032,-24.3637 20.0642,-27.2301 7.1659,-1.4331 11.4654,12.8986 8.599,18.6311 -7.1658,10.0322 -27.2301,5.7327 -34.3959,17.198 -10.0322,17.1981 -15.7649,37.2624 -27.2302,54.4603 -4.2995,7.1659 -12.8985,11.4654 -11.4652,18.6312 0,7.1659 12.8984,10.0322 15.7647,17.198 1.4332,2.8664 -7.1658,-8.599 -11.4652,-5.7326 -7.166,4.2995 -10.0322,15.7648 -15.7649,24.3637 -14.3317,22.9307 -30.0965,51.5941 -47.2944,71.6583 -4.2995,5.7327 -12.8985,7.1659 -18.6312,14.3317 -1.4332,1.4332 7.1657,5.7327 4.2995,7.1658 -11.4654,2.8664 -25.797,-7.1658 -32.9629,0 -7.1658,7.1659 5.7327,18.6312 2.8664,27.2301 -4.2995,14.3317 -47.2945,74.5248 -42.995,88.8563 2.8664,10.0322 10.0322,18.6312 15.7649,28.6634 14.3317,24.3638 8.5989,35.8291 8.5989,35.8291 11.4653,2.8663 24.3638,1.4332 35.8292,0 5.7327,0 8.599,-7.1658 14.3317,-5.7327 5.7325,0 8.599,8.599 15.7647,10.0322 4.2995,1.4332 4.2995,-18.6312 7.1658,-14.3317 4.2996,7.1659 -2.8663,17.198 0,22.9307 4.2996,5.7327 24.3639,8.599 18.6312,11.4654 -38.6954,18.631 -15.7648,-30.0966 -47.2944,-25.7971 -8.599,1.4332 10.0322,12.8985 12.8984,20.0644 1.4333,8.599 0,18.6312 -1.4332,28.6632 -2.8662,18.6312 -27.2301,35.8292 -27.2301,50.1608 0,5.7327 8.599,10.0322 8.599,15.7649 1.4332,10.0322 -14.3316,28.6633 -4.2995,31.5297 2.8664,0 12.8986,-4.2995 10.0322,-1.4332 -2.8663,4.2995 -11.4653,1.4332 -14.3317,5.7327 -7.1658,14.3317 -2.8663,31.5296 -10.0321,45.8613 -5.7327,11.4653 -40.1286,58.7597 -37.2623,74.5246 1.4332,5.7327 11.4652,-5.7327 17.1979,-5.7327 8.599,-1.4332 17.198,1.4332 25.797,0 4.2995,0 8.599,-4.2995 12.8985,-2.8663 22.9306,5.7327 97.4553,54.4603 107.4874,53.0271 4.2996,0 48.7277,-21.4975 51.594,-22.9307 4.2995,0 11.4653,0 18.6312,0 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
+ id="at"
+ class="eu europe"
+ d="m 6128.8952,5816.8897 c 0,10.0322 18.6312,12.8984 12.8985,27.2301 -1.4331,2.8663 -7.1658,1.4332 -8.599,2.8663 -1.433,4.2995 -5.7325,15.7649 -10.032,28.6634 l 7.1658,15.7647 v 17.198 c 14.3316,1.4332 37.2623,4.2996 38.6954,4.2996 2.8664,2.8663 -4.2995,7.1658 -1.4331,10.0321 7.1658,8.599 15.7648,14.3317 25.797,18.6312 22.9306,11.4654 27.2301,-27.2302 42.9949,-24.3638 30.0965,4.2995 -1.4331,20.0643 8.5989,24.3638 22.9307,11.4654 2.8665,-2.8663 25.7971,0 11.4653,1.4332 22.9307,31.5296 45.8612,18.6311 0,0 18.6312,-38.6954 18.6312,-38.6954 11.4654,-8.599 61.6261,-2.8664 74.5247,-4.2995 21.4975,-1.4332 38.6954,-20.0644 60.1929,-20.0644 5.7327,0 -10.0322,7.1658 -11.4653,12.8985 -7.1659,30.0964 11.4653,10.0322 22.9307,27.2302 2.8663,4.2995 -4.2995,10.0322 -1.4332,15.7649 1.4332,2.8662 5.7327,-2.8665 8.599,0 27.2301,20.0642 34.3959,22.9305 71.6583,28.6632 42.9949,5.7327 87.423,7.1659 131.8513,14.3317 11.4652,1.4332 22.9305,10.0322 34.3959,11.4652 11.4653,1.4332 22.9307,-7.1657 34.3959,-5.7325 7.1659,1.433 11.4654,11.4652 18.6312,11.4652 2.8663,1.4333 1.4332,-7.1657 4.2995,-8.5989 7.1658,-7.1658 18.6312,-10.0322 25.7969,-18.6312 5.7327,-4.2995 1.4333,-14.3317 5.7327,-18.6312 27.2302,-21.4975 55.8936,5.7327 81.6905,-5.7326 8.599,-4.2994 10.0322,-17.1981 18.6312,-20.0643 1.4331,-1.4333 48.7276,5.7327 50.1607,4.2994 4.2995,-1.4332 -4.2995,-7.1657 -5.7326,-11.4652 -2.8664,-14.3317 2.8663,-22.9307 12.8985,-25.7971 v 0 c 25.7969,-28.6632 37.2624,-32.9627 50.1608,-54.4602 2.8663,-5.7327 -22.9306,-35.8291 -15.7649,-50.1608 10.0322,-20.0644 34.396,1.4332 31.5297,-27.2302 -1.4332,-24.3638 -44.4281,-21.4974 -35.8292,-28.6633 20.0644,-17.198 71.6583,5.7327 80.2573,-10.0321 1.4332,-5.7327 -18.6312,-51.594 1.4332,-60.193 -17.198,-18.6312 -31.5296,-37.2624 -44.4281,-58.7598 -11.4654,-18.6312 30.0964,-48.7276 0,-70.2251 -4.2995,-2.8664 -10.0322,5.7327 -14.3317,5.7327 -7.1658,-1.4332 -21.4975,-20.0644 -31.5296,-17.1981 -7.1658,2.8664 -10.0322,14.3317 -18.6312,18.6312 -5.7327,1.4332 -12.8985,-1.4331 -18.6312,-1.4331 -38.6954,-4.2996 -71.6583,-35.8291 -113.22,-35.8291 -7.1659,0 -12.8985,8.5989 -20.0644,8.5989 -2.8663,-1.4332 0,-8.5989 -2.8663,-10.0321 -5.7327,-2.8665 -14.3316,-5.7327 -18.6311,-1.4333 -1.4332,2.8665 1.4332,44.4282 -1.4332,47.2946 -2.8663,4.2995 -12.8985,-5.7327 -18.6312,-1.4332 0,0 -11.4653,37.2623 -11.4653,37.2623 -10.0322,2.8663 -20.0644,-10.0322 -30.0964,-10.0322 -5.7327,0 -4.2995,11.4653 -10.0322,12.8985 -30.0965,11.4653 -47.2946,-18.6312 -70.2251,-30.0964 h -1.4332 c 1.4332,4.2995 2.8663,8.599 2.8663,12.8984 -1.4331,38.6955 -10.0321,30.0965 -40.1287,22.9307 -2.8662,0 -5.7325,1.4331 -7.1657,4.2995 -2.8664,14.3317 5.7327,30.0964 -8.599,41.5617 -12.8985,10.0322 -73.0915,24.3639 -74.5247,47.2946 0,0 34.3961,47.2944 34.3961,48.7276 1.433,1.4332 -18.6312,18.6311 -11.4654,24.3639 15.7649,14.3315 31.5296,-7.166 18.6311,40.1286 0,2.8663 -2.8662,7.1658 -5.7327,7.1658 -45.8612,-12.8985 -10.032,-35.8292 -31.5296,-37.2624 -11.4653,0 -21.4975,10.0322 -32.9627,8.599 -5.7327,-1.4331 -4.2995,-11.4653 -8.599,-12.8985 -8.599,-2.8663 -17.198,4.2995 -24.3639,1.4332 -2.8663,-1.4332 2.8664,-10.0322 0,-10.0322 -17.198,1.4332 -1.4332,24.3639 -5.7327,25.797 -20.0643,5.7327 -53.0271,-2.8663 -71.6583,4.2995 -5.7326,2.8664 -2.8663,12.8986 -8.599,15.7649 -5.7325,4.2995 -12.8984,-2.8663 -18.631,1.4332 -4.2996,1.433 1.4331,8.599 -1.4332,11.4652 -1.4332,1.4333 -50.1608,14.3317 -55.8936,11.4654 -2.8662,-2.8664 0,-10.0321 -2.8662,-12.8986 -1.4332,-2.8663 -8.599,-2.8663 -10.0322,-5.7325 -1.4331,-2.8665 7.1659,-1.4332 5.7327,-4.2995 -5.7327,-18.6312 -45.8614,4.2995 -57.3266,-8.599 0,0 2.8663,-1.4332 2.8663,-2.8664 -8.599,-5.7327 0,18.6311 -2.8663,28.6633 0,5.7327 -27.2302,38.6955 -37.2624,28.6633 -5.7327,-5.7326 10.0322,-14.3316 5.7327,-20.0643 -1.4332,-1.4332 -5.7327,4.2995 -8.599,4.2995 -2.8664,0 -7.1659,-1.4332 -8.5989,-4.2995 -2.8665,-4.2995 7.1657,-10.0322 0,-15.7649 -5.7327,-4.2995 -8.599,-11.4652 -14.3317,-14.3315 -4.2995,-2.8664 -10.0322,4.2995 -15.7649,2.8663 -2.8663,-2.8663 0,-10.0322 -2.8663,-12.8985 -7.1658,-5.7327 -5.7327,20.0642 -28.6634,12.8985 -1.433,-1.4332 -2.8662,-1.4332 -4.2995,-1.4332 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
+ id="it"
+ class="eu europe"
+ d="m 7023.1907,7523.79 c -18.6312,10.0322 -80.2572,159.0813 -65.9257,179.1457 5.7327,8.599 34.3961,8.599 25.7971,14.3317 -7.1659,4.2995 -5.7327,-10.0322 -10.0322,0 0,2.8663 -2.8664,5.7326 -1.4332,10.0321 2.8664,11.4654 20.0644,17.1981 24.3639,28.6633 1.433,2.8663 -4.2995,1.4332 -7.1659,4.2995 -7.1658,4.2995 -14.3316,8.599 -18.6312,15.7649 -4.2995,7.1658 -5.7326,15.7648 -7.1658,22.9305 -1.4332,8.599 4.2995,20.0644 0,27.2302 -2.8663,4.2995 -7.1658,-14.3315 -34.3959,-12.8985 -30.0966,2.8665 -17.198,12.8985 -57.3266,-5.7327 -17.1981,-7.1657 -21.4976,-38.6954 -40.1287,-50.1607 -25.7971,-15.7649 -48.7277,0 -77.3909,-11.4654 -4.2995,-1.433 -8.599,-2.8662 -12.8985,-5.7325 -5.7327,-4.2997 -8.599,-14.3317 -15.7649,-17.1981 -5.7327,-4.2995 -12.8985,0 -20.0643,-2.8663 -28.6633,-10.0322 -48.7276,-37.2624 -80.2572,-45.8613 -12.8986,-2.8663 -27.2302,10.0321 -40.1287,4.2994 -2.8664,-1.433 -37.2623,-38.6954 -35.8291,-44.4281 0,-5.7327 8.599,-8.599 8.599,-12.8985 1.433,-4.2994 -4.2995,-5.7327 -4.2995,-10.0321 0,-5.7326 2.8663,-12.8985 7.1658,-18.6312 4.2994,-5.7326 12.8984,-7.1658 18.6311,-12.8985 7.1658,-5.7326 14.3317,-27.2302 20.0643,-20.0642 2.8664,4.2994 7.1659,32.9627 20.0644,31.5296 48.7276,-7.1659 0,-42.995 61.6261,-40.1286 15.7649,0 2.8662,17.1979 11.4654,21.4974 5.7325,2.8663 14.3315,-4.2995 21.4974,-1.4332 4.2995,1.4332 2.8663,10.0322 5.7326,11.4654 8.5991,5.7326 20.0644,11.4653 30.0966,11.4653 1.433,0 37.2622,-17.198 37.2622,-17.198 11.4654,-1.4332 35.8291,7.1658 53.0272,2.8663 35.8292,-7.1658 34.396,-21.4975 53.0271,-31.5296 42.9949,-22.9306 11.4653,8.5989 53.0271,5.7327 28.6634,-1.4333 8.599,-17.198 20.0643,-28.6633 4.2995,-4.2996 4.2995,12.8985 8.5991,11.4653 25.797,-5.7327 25.797,-28.6634 48.7276,-12.8985 m -945.8894,-528.8381 c 4.2995,20.0642 67.3588,15.7647 58.7599,47.2944 -1.4333,8.599 -25.7971,5.7327 -22.9307,15.7649 2.8663,10.0322 22.9307,7.1657 30.0964,15.7647 2.8663,2.8664 -7.1657,4.2995 -7.1657,8.599 8.5989,51.594 21.4974,-21.4975 24.3637,47.2946 1.4332,24.3637 -24.3637,32.9627 -31.5297,53.0271 -7.1657,18.6311 14.3317,18.6311 17.198,34.3959 0,5.7327 -7.1658,11.4654 -7.1658,18.6312 -4.2995,47.2945 1.4332,113.2201 -25.7969,160.5145 -1.4332,2.8664 0,-4.2995 -2.8664,-5.7326 -20.0643,-7.1659 -45.8612,-27.2301 -70.2251,-25.7971 -4.2995,0 10.0322,5.7328 10.0322,10.0322 -1.4332,5.7327 -8.599,8.599 -10.0322,15.7649 -8.599,32.9628 14.3317,27.2302 -25.797,45.8612 -55.8935,25.7971 -21.4974,-27.2301 -48.7276,-38.6954 6.9358,17.1436 -13.4659,-15.8504 -21.4974,-24.3639 -8.599,-28.6632 11.4652,-47.2944 15.7647,-71.6583 1.4332,-10.032 -4.2995,-18.631 -1.4332,-28.6632 1.4332,-8.599 17.1981,-12.8985 14.3317,-21.4974 -1.4331,-7.166 -17.198,0 -21.4975,-5.7327 -4.2995,-7.1658 2.8663,-15.7649 2.8663,-22.9307 0,-1.4332 -5.7325,-1.4332 -4.2995,-2.8663 2.8665,-4.2995 11.4654,-2.8664 14.3317,-8.599 5.7327,-14.3317 -15.7647,-84.5569 -24.3637,-94.5889 -17.1981,-18.6312 -28.6634,42.9949 -24.3639,-28.6634 1.4332,-10.0322 11.4653,-17.198 12.8985,-27.2302 1.4332,-5.7327 -5.7327,-11.4652 -1.4332,-15.7647 1.4332,-1.4332 11.4654,28.6632 37.2623,28.6632 21.4975,1.4332 100.3217,-63.0593 113.2201,-78.824 m 590.4643,-1003.216 c -2.8663,28.6634 -38.6954,22.9307 -41.5619,45.8613 -2.8662,17.198 30.0966,14.3316 37.2624,20.0643 10.0322,8.5989 -17.198,20.0644 -21.4975,32.9628 -5.7327,18.6312 17.198,-1.4332 20.0643,5.7327 2.8664,7.1658 -12.8985,25.797 -2.8663,31.5297 14.3317,8.599 71.6583,42.9949 21.4975,40.1286 2.8662,-7.1659 2.8662,-12.8986 -2.8663,-20.0644 -27.2302,-25.7969 -26.6015,-7.0348 -37.5539,2.8344 -2.3099,3.0587 -2.5748,0.032 -2.5748,0.032 0,-14.3315 -27.2301,-17.198 -40.1286,-11.4653 -7.1659,4.2995 0,20.0643 -5.7327,25.797 -5.7327,5.7327 -15.7649,1.4332 -24.3639,4.2995 -20.0642,8.599 -38.6954,31.5296 -61.6261,35.8291 -7.1657,1.4332 -14.3316,-5.7325 -20.0642,-1.433 -5.7327,1.433 0,10.032 -2.8664,15.7647 -1.4331,4.2995 -5.7326,10.0322 -8.599,14.3317 1.4332,-1.4332 1.4332,-2.8664 2.8664,-2.8664 7.1658,0 1.4331,15.7649 7.1658,18.6312 2.8663,1.4332 4.2995,-8.599 7.1658,-5.7326 2.8664,5.7326 8.5989,17.198 2.8664,21.4974 -2.8664,1.4331 -4.2995,4.2995 -2.8664,7.1658 1.4332,1.4332 4.2994,-1.433 7.1659,-1.433 8.5989,7.1657 22.9306,11.4652 24.3637,21.4974 8.599,40.1286 -25.7969,24.3637 -35.8291,48.7276 -2.8663,7.1658 15.7649,84.5568 20.0643,93.1558 8.599,14.3316 108.9207,85.9899 128.9849,97.4552 20.0644,11.4654 25.797,4.2995 44.4282,20.0644 20.0643,17.198 47.2945,130.4181 63.0593,159.0813 15.7649,30.0966 48.7276,57.3266 74.5245,77.391 8.599,5.7327 21.4976,7.1658 28.6634,14.3317 4.2995,2.8663 0,11.4652 2.8663,14.3317 38.6955,40.1286 111.7869,27.2301 157.6482,20.0642 10.0322,-1.4332 31.5297,-17.198 44.4282,-2.8663 35.8291,40.1287 -71.6583,54.4603 -17.198,91.7226 51.594,34.396 123.2523,31.5296 176.2794,58.7598 18.6312,10.0322 25.797,25.7969 47.2944,32.9628 17.198,7.1658 64.4925,14.3317 78.8242,25.797 5.7326,4.2995 0,14.3317 4.2995,18.6312 17.198,24.3637 63.0593,20.0642 77.3909,70.225 5.7327,18.6312 -7.1658,12.8985 -11.4653,25.797 -2.8663,7.1659 1.4332,35.8291 -4.2995,38.6955 -5.7327,4.2995 -15.7649,0 -24.3639,-4.2994 -44.4281,-17.198 -25.7969,-42.9951 -48.7276,-73.0915 -12.8985,-17.198 -54.4603,0 -75.9578,-7.1658 -28.6632,-10.0322 -44.4281,-42.9951 -71.6583,-14.3317 -2.8662,4.2995 -38.6954,75.9578 -38.6954,78.8241 0,4.2994 7.1658,8.5989 5.7326,14.3316 -5.7326,27.2302 -34.3959,25.797 -10.0321,57.3266 14.3317,17.198 18.6312,1.4333 34.396,5.7327 17.1979,5.7327 28.6633,22.9307 44.4281,30.0965 5.7327,2.8664 14.3317,0 17.198,5.7327 2.8664,4.2995 -5.7326,10.0322 -5.7326,15.7647 1.4331,40.1288 20.0642,2.8665 17.198,54.4604 -1.4333,30.0965 -58.7599,18.6311 -84.5568,48.7276 -18.6312,21.4976 5.7326,42.995 0,68.792 -4.2995,21.4974 -18.6312,15.7649 -32.9629,27.2301 -34.3959,30.0965 -10.0322,98.8885 -81.6904,78.8241 -14.3317,-4.2995 -30.0965,-41.5617 -21.4975,-57.3266 5.7327,-8.599 20.0644,-7.1658 27.2302,-14.3317 4.2995,-5.7326 4.2995,-14.3315 5.7327,-21.4974 1.433,-7.1658 7.1657,-12.8985 5.7325,-20.0643 -1.433,-8.599 -15.7647,-12.8985 -14.3315,-21.4976 5.7325,-25.7969 40.1286,-11.4653 50.1607,-25.7969 24.3638,-28.6633 -4.2995,-32.9628 -15.7648,-48.7277 -11.4654,-17.1979 -5.7327,-41.5618 -14.3317,-60.1928 -4.2995,-11.4654 -10.0322,-21.4976 -17.1979,-30.0966 -1.4332,-2.8663 -7.1658,-2.8663 -10.0322,-5.7326 -25.797,-38.6955 1.4332,-15.7649 -15.7648,-58.7598 -21.4976,-54.4603 -34.3961,-27.2301 -77.391,-24.3639 -1.4332,0 1.4332,-4.2995 0,-7.1657 -5.7327,-5.7327 -12.8984,-12.8985 -21.4974,-17.198 -8.599,-4.2995 -25.797,0 -31.5297,-10.0322 -5.7327,-10.0322 11.4653,-20.0644 10.0322,-31.5296 -1.4332,-11.4655 -10.0322,-21.4975 -15.7649,-30.0965 -34.3959,-47.2945 -40.1286,18.631 -80.2572,4.2995 -4.2995,-1.4332 27.2301,-24.3639 12.8984,-34.3961 -51.5939,-37.2622 -1.4332,1.4332 -57.3266,-5.7325 -4.2995,-1.4332 0,-8.5992 -1.4332,-12.8986 -5.7325,-17.198 -35.8291,-63.0592 -50.1608,-68.7919 -38.6954,-14.3317 -8.599,12.8985 -21.4975,10.0322 -12.8984,-2.8664 -24.3637,-18.6312 -38.6954,-17.1981 -12.8985,2.8664 -22.9307,20.0644 -34.3959,17.1981 -12.8986,-2.8664 -11.4654,-21.4976 -20.0644,-30.0966 -10.0322,-8.599 -35.8292,-5.7326 -44.4281,-11.4653 l -21.4975,-30.0964 c -10.0322,-8.5991 -25.7969,-10.0322 -34.3961,-20.0644 -17.1979,-25.7969 2.8665,-21.4974 -17.1979,-37.2623 -8.599,-7.1658 -18.6312,-12.8985 -28.6633,-18.6311 -2.8664,-1.4332 -8.5989,2.8663 -11.4654,1.4331 -15.7647,-12.8985 -15.7647,-37.2622 -31.5296,-50.1608 -27.2302,-22.9306 -44.4281,-5.7326 -73.0914,-17.198 -4.2995,-1.4331 7.1658,-5.7326 10.0321,-8.599 8.599,-11.4652 -8.599,-30.0964 -12.8985,-34.3959 -2.8663,-2.8664 -8.599,0 -11.4653,-2.8664 -4.2994,-5.7326 -4.2994,-14.3316 -10.0321,-18.6311 -7.1658,-5.7327 -21.4975,-1.4332 -27.2302,-10.0322 -4.2995,-5.7327 8.599,-17.1979 1.4332,-21.4974 -8.599,-7.1659 -22.9307,1.433 -34.3961,-2.8664 -7.1657,-2.8663 4.2997,-15.7648 4.2997,-24.3638 4.2995,-28.6634 0,-38.6955 -15.7649,-63.0593 -30.0965,-42.995 -8.599,-81.6905 -44.4282,-114.6533 -2.8662,-4.2995 -8.5989,-5.7326 -12.8984,-7.1658 -1.4332,0 -2.8665,4.2995 -4.2995,2.8663 -7.1659,-2.8663 -11.4654,-11.4653 -18.6312,-11.4653 -4.2995,0 4.2995,12.8985 0,11.4653 -11.4653,-2.8663 -20.0644,-11.4653 -30.0964,-18.631 -4.2995,-2.8665 -40.1287,-40.1287 -51.5941,-40.1287 -2.8663,0 1.4332,7.1658 -1.433,8.599 -2.8665,1.4331 -7.166,0 -8.5992,-2.8664 -7.1657,-8.599 -37.2622,-22.9307 -51.5939,-22.9307 -5.7327,0 -42.9949,21.4976 -45.8613,27.2302 -2.8663,5.7327 1.4332,14.3317 -2.8663,18.6311 -4.2995,5.7327 -15.7649,4.2995 -20.0644,8.599 -10.032,10.0322 -17.1979,32.9629 -28.6632,42.9951 -18.6312,18.631 -51.594,17.198 -73.0915,20.0642 -7.1658,-25.7969 41.5618,-58.7598 20.0644,-74.5245 -7.1659,-4.2995 -17.1981,1.433 -25.7971,2.8662 -8.599,0 -18.6312,4.2995 -27.2302,1.4333 -15.7647,-4.2995 -53.0271,-31.5297 -51.5939,-51.5941 0,-2.8663 7.1658,-2.8663 7.1658,-5.7325 -1.4331,-4.2995 -15.7647,-8.599 -11.4652,-17.1981 5.7327,-5.7326 12.8984,-10.0321 17.1979,-17.198 1.4332,-1.4331 -2.8663,-4.2995 -1.4332,-7.1658 1.4332,-4.2995 14.3317,2.8663 15.7649,-1.4332 0,-11.4653 -1.4332,-22.9307 -5.7327,-31.5296 -7.1658,-11.4653 -54.4603,-30.0965 -51.5939,-53.0272 0,-7.1657 12.8985,-7.1657 20.0643,-8.5989 4.2994,0 7.1659,8.5989 11.4654,7.1657 7.1657,-1.433 53.0271,-38.6954 45.8612,-51.5939 -4.2995,-8.5989 -18.6311,-10.0322 -22.9307,-20.0644 -4.2995,-5.7325 1.4332,-15.7647 -1.4331,-21.4974 -20.0644,-34.3959 -57.3266,-17.198 8.599,-55.8934 14.3317,25.797 53.0271,-2.8664 71.6583,-7.1659 12.8985,-2.8663 22.9306,14.3317 35.8291,14.3317 1.4332,0 41.5619,-41.5619 41.5619,-48.7276 1.433,-7.1658 -11.4654,-10.0322 -10.0322,-15.7649 2.8663,-8.599 14.3317,-11.4653 21.4974,-17.198 7.1658,-5.7326 12.8985,-11.4653 20.0644,-17.198 2.8663,-1.4332 5.7326,-4.2995 7.1658,-2.8662 2.8663,8.5989 1.4332,17.1979 1.4332,25.7969 0,4.2995 -4.2995,10.0322 -2.8664,15.7649 10.0322,18.631 32.9628,22.9305 48.7276,28.6632 1.4332,0 4.2995,2.8663 4.2995,5.7327 -1.4331,5.7327 -11.4653,10.0322 -10.0321,15.7648 1.4331,5.7327 11.4653,2.8664 15.7648,7.1659 5.7327,7.1658 8.599,31.5296 17.198,24.3637 24.3638,-18.6311 -4.2995,-12.8984 -4.2995,-27.2301 0,-31.5297 34.396,-40.1287 40.1286,-65.9256 0,-2.8663 -15.7648,-41.5619 8.599,-37.2624 18.6312,2.8665 -4.2995,31.5297 32.9628,40.1287 22.9307,7.1659 4.2995,-21.4975 42.995,-14.3316 11.4654,1.4331 5.7327,24.3638 15.7649,30.0965 5.7327,2.8662 17.1979,-2.8663 15.7647,-8.599 -2.8663,-4.2995 -8.599,-7.1659 -10.032,-12.8985 0,-5.7327 8.5989,-10.0322 7.1657,-15.7649 -2.8663,-7.1658 -28.6633,-22.9307 -8.599,-37.2622 25.797,-18.6312 15.7648,22.9305 45.8614,15.7648 17.1979,-5.7327 -10.0322,-25.797 -10.0322,-28.6634 2.8663,-5.7326 7.1658,-10.0321 8.599,-15.7648 2.8662,-5.7327 1.4332,-12.8984 2.8662,-18.6311 v 0 c 22.9307,11.4654 2.8665,-2.8663 25.7971,0 11.4653,1.4332 22.9307,31.5296 45.8612,18.6311 l 18.6312,-38.6954 c 11.4654,-8.599 61.6261,-2.8664 74.5247,-4.2995 21.4975,-1.4332 38.6954,-20.0644 60.1929,-20.0644 5.7327,0 -10.0322,7.1658 -11.4653,12.8985 -7.1659,30.0964 11.4653,10.0322 22.9307,27.2302 2.8663,4.2995 -4.2995,10.0322 -1.4332,15.7649 1.4332,2.8662 5.7327,-2.8665 8.599,0 27.2301,20.0642 34.3959,22.9305 71.6583,28.6632 35.8291,4.2995 71.6582,7.1659 107.4874,10.0322 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ sodipodi:nodetypes="cccccccscccccccccccccssccccsccsccccsccccsccccccccccccccccccscccccsccccccsccccccscccccsscccccccscccccccccccccccccccscccccccccccccsccccccccccsssccccscsccccccccccccsccccccccccsccsscsscsccccccccccccccccccccsccsccscccsccsccccccccccccssscccscssccc" /><path
+ id="gr"
+ class="eu europe"
+ d="m 8708.5935,7823.3216 c -15.7648,30.0965 12.8984,10.0322 -2.8663,54.4603 -1.4332,4.2995 -117.5196,30.0965 -128.9849,34.396 -8.599,2.8663 -88.8562,40.1286 -97.4552,32.9628 -25.7971,-28.6633 20.0642,-25.7969 -61.6263,-35.8291 -83.1235,-10.0322 20.0644,10.0322 -50.1608,10.0322 -4.2995,0 -5.7325,-7.1659 -10.032,-7.1659 -8.599,-1.4332 -18.6312,0 -28.6634,1.4332 -10.0322,2.8663 -21.4975,8.599 -31.5297,10.0322 -21.4974,0 -12.8984,-27.2302 -11.4652,-35.8292 0,-11.4654 -4.2995,-24.3638 0,-34.396 15.7647,-44.4282 30.0964,5.7327 40.1286,10.0322 10.0322,4.2995 21.4975,-1.4333 31.5297,-5.7327 7.1657,-2.8663 11.4652,-21.4975 17.1979,-15.7648 7.1658,5.7327 -17.1979,11.4653 -14.3317,18.6312 1.4333,7.1658 14.3317,2.8663 21.4975,5.7325 7.1659,2.8665 12.8985,12.8985 21.4975,14.3317 7.1659,1.4332 12.8986,-4.2995 20.0643,-7.1657 14.3317,-4.2995 24.3639,-15.7649 37.2624,-20.0644 15.7648,-4.2995 31.5297,-2.8663 47.2944,-5.7326 10.0322,-2.8664 1.4332,8.599 10.0322,10.0321 15.7648,4.2994 31.5297,-8.599 48.7276,-7.1658 4.2995,0 7.1658,8.599 11.4653,7.1658 7.1659,-1.4331 32.9628,-22.9307 45.8613,-20.0643 2.8664,1.4331 -21.4974,31.5297 12.8985,41.5617 7.1659,2.8664 7.1659,-12.8985 12.8985,-17.198 30.0965,-30.0964 25.7971,8.599 58.7598,-38.6954 m -295.2321,-1084.9064 1.4332,-1.4331 v 0 h 1.4332 v 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 c 1.433,0 45.8612,-14.3317 45.8612,-14.3317 31.5296,-24.3639 -58.7598,-64.4925 -2.8663,-75.9578 v 0 0 0 h 1.4332 v 0 0 0 0 0 h 4.2995 v 0 h 1.4331 v 0 h 1.4332 v 0 0 0 c 2.8663,0 5.7327,0 7.1657,1.4331 v 0 h 2.8665 v 0 c 31.5296,7.1659 74.5245,37.2624 53.0271,63.0593 -15.7648,17.198 -31.5297,8.599 -37.2624,37.2624 l 11.4654,41.5618 c -1.4332,10.0321 -21.4974,42.9949 -31.5296,48.7276 l -1.4332,15.7648 c -24.3638,-12.8985 21.4974,-14.3317 -1.4332,-34.396 -11.4653,-8.5989 -57.3266,11.4653 -71.6583,10.0322 -45.8612,-2.8664 -51.5939,-32.9628 -81.6904,4.2995 -7.1659,8.599 -14.3317,15.7648 -22.9306,21.4975 -40.1287,21.4974 -18.6312,-28.6634 -58.7598,-4.2995 -15.7649,10.0322 -4.2995,34.3959 -35.8292,48.7276 -27.2301,11.4653 -30.0964,-22.9307 -55.8935,10.0322 -10.0321,12.8985 7.1659,11.4653 11.4654,14.3317 12.8985,7.1658 11.4652,28.6632 22.9307,40.1286 2.8662,2.8663 8.5989,1.4331 14.3316,0 1.4331,0 2.8663,-1.4332 4.2995,-4.2995 0,-2.8664 -5.7327,-8.5989 -1.4332,-8.5989 5.7327,-1.4333 5.7327,11.4652 11.4653,12.8984 15.7649,4.2995 48.7276,10.0321 54.4603,31.5297 11.4654,41.5617 -37.2624,-18.6312 -37.2624,-18.6312 -15.7647,-8.599 -61.626,-14.3317 -65.9255,12.8985 -4.2995,17.1979 32.9628,11.4652 44.4281,22.9306 8.599,8.599 7.1659,37.2623 -2.8663,32.9628 -22.9307,-8.599 -24.3639,-34.396 -47.2945,-45.8612 -5.7326,-1.4332 -11.4653,1.433 -17.198,0 -7.1658,0 -15.7648,-7.1659 -20.0642,-1.4332 -32.9629,35.8291 63.0593,45.8613 55.8933,58.7598 -2.8662,4.2995 -40.1286,2.8662 -51.5939,0 -4.2994,-1.4332 -14.3316,-47.2946 -14.3316,-47.2946 -11.4653,-14.3315 -51.5939,-5.7325 -67.3588,-17.1979 -30.0965,-22.9307 0,-18.6312 0,-47.2945 0,-5.7327 -15.7648,10.0322 -24.3638,17.198 -7.1659,7.1658 -18.6311,12.8985 -20.0644,22.9307 -1.4332,7.1658 12.8985,8.599 14.3317,15.7647 l -10.0322,42.9951 c 4.2995,27.2302 37.2624,40.1286 53.0271,57.3266 l 18.6312,37.2623 c 10.0322,10.0321 83.1236,45.8612 71.6583,63.0593 -2.8663,4.2995 -58.7598,-24.3638 -63.0593,-22.9306 -4.2995,0 0,8.599 0,12.8985 -2.8663,10.0321 -18.6312,31.5296 -8.599,30.0964 2.8663,-1.4332 1.4332,-8.599 4.2995,-7.1658 4.2995,1.4331 2.8663,8.599 7.1658,11.4653 10.0322,7.1658 41.5618,7.1658 17.1981,28.6634 -20.0644,17.1979 -40.1286,18.6311 -67.3588,30.0964 -4.2995,1.4332 8.599,5.7327 12.8985,4.2995 4.2995,-1.4332 7.1657,-8.599 12.8984,-8.599 5.7327,0 5.7327,8.599 10.0322,11.4653 2.8663,1.4332 5.7326,-1.4331 8.599,-2.8663 11.4653,0 22.9307,-2.8663 32.9627,1.4332 8.599,2.8663 7.166,17.198 15.7649,18.6312 10.0322,2.8663 20.0643,-12.8986 28.6633,-8.5992 8.5991,4.2995 -1.4331,22.9307 7.1659,27.2302 11.4652,7.1659 25.7969,-12.8985 35.8291,-5.7326 5.7327,2.8663 0,25.797 22.9307,27.2302 28.6632,1.4331 37.2622,-8.5991 57.3266,14.3315 15.7647,17.1982 -8.599,10.0322 -8.599,20.0644 0,7.1658 8.599,11.4653 10.0322,17.198 2.8663,7.1658 -1.4332,15.7649 1.4331,21.4975 7.1659,12.8984 25.7971,18.6311 10.0322,42.995 -2.8663,4.2995 -8.599,1.4331 -12.8985,0 -2.8663,-2.8664 0,-7.1659 -1.4332,-10.0322 -1.4331,-2.8663 -18.6312,-14.3317 -20.0643,-14.3317 -2.8664,-1.4332 -4.2995,5.7327 -7.1659,4.2995 -10.032,-7.1657 -25.7969,-35.8291 -40.1286,-40.1286 -18.6312,-5.7327 -8.599,15.7649 -18.6312,18.6312 -17.198,5.7327 -65.9256,20.0642 -61.6261,27.2301 4.2995,10.0322 21.4975,5.7327 31.5297,10.0322 4.2995,1.4331 -8.599,4.2995 -8.599,8.599 0,4.2995 7.1659,4.2995 8.599,7.1658 2.8664,5.7327 -1.4331,14.3317 2.8664,18.6312 15.7647,15.7647 42.9949,7.1657 57.3266,24.3637 8.599,10.0322 -22.9307,12.8986 -35.8292,12.8986 -20.0643,1.4331 -35.8291,0 -41.5618,-1.4332 -4.2995,-1.4332 -1.4332,-8.599 -4.2995,-12.8985 -1.4332,-1.4332 -5.7327,-1.4332 -7.1658,-1.4332 -11.4654,0 -27.2301,-8.599 -34.396,0 -11.4653,15.7649 35.8291,51.5941 41.5618,61.6261 1.4332,5.7327 -2.8663,11.4654 -1.4332,15.7649 2.8664,4.2995 11.4654,0 14.3317,4.2995 5.7327,10.0322 22.9307,41.5618 28.6634,54.4603 5.7325,12.8985 -11.4655,4.2995 -11.4655,8.599 0,4.2995 5.7328,5.7327 7.166,8.599 0,2.8663 -5.7327,7.1657 -4.2995,10.0322 1.433,2.8662 34.3959,21.4974 31.5296,32.9627 -2.8664,4.2995 -12.8986,4.2995 -18.6312,2.8664 -4.2994,-2.8664 -2.8664,-11.4654 -7.1659,-14.3317 -2.8662,-2.8664 -8.599,4.2995 -12.8984,1.4332 -24.3638,-18.6311 -34.396,-75.9579 -70.2251,-25.7971 -1.4332,2.8665 1.4332,32.9629 4.2995,50.1609 1.4332,4.2995 1.4332,14.3317 -2.8663,12.8984 -35.8291,-4.2994 -12.8986,-40.1286 -24.3639,-55.8933 -1.4332,-1.4333 -5.7327,0 -7.1658,-1.4333 -8.5989,-8.5989 -12.8984,-18.6311 -20.0643,-28.6633 -4.2995,-7.1658 -7.1658,-20.0643 -15.7648,-21.4975 -68.792,-15.7647 -7.1659,50.1608 -31.5296,61.6261 -41.5619,18.6312 -30.0966,-28.6632 -31.5297,-38.6954 0,-2.8663 -4.2995,-2.8663 -5.7327,-2.8663 -12.8985,1.4331 -20.0644,-15.7649 -22.9307,-31.5296 -2.8662,-21.4975 14.3317,2.8662 17.198,-30.0966 1.4332,-22.9305 -35.8291,-51.5939 -54.4603,-57.3266 -4.2995,-1.4331 -8.599,8.599 -11.4653,4.2995 -5.7327,-7.1658 0,-20.0643 -7.1658,-27.2302 -8.5989,-8.599 -47.2945,2.8664 -27.2301,-24.3637 1.4331,-1.4332 7.1658,1.4332 8.599,-1.4332 22.9306,-15.7648 11.4652,-28.6633 18.6311,-55.8934 0,-2.8664 2.8663,5.7325 5.7326,5.7325 1.4332,0 -2.8663,-5.7325 -1.4331,-5.7325 14.3316,0 28.6633,14.3315 40.1287,2.8663 15.7647,-15.7648 -5.7327,-17.198 22.9306,-35.8292 20.0643,-12.8985 34.396,8.599 50.1607,14.3317 22.9307,8.599 50.1608,5.7327 74.5247,12.8985 14.3317,2.8663 22.9307,20.0642 37.2622,21.4974 5.7327,1.4332 17.1981,-5.7327 15.7649,-12.8984 -2.8662,-5.7327 -18.6311,1.4332 -21.4974,-5.7327 -14.3317,-32.9628 35.8291,15.7648 53.0271,-31.5297 1.4332,-4.2995 -10.0322,2.8664 -15.7649,0 -2.8663,-1.4331 0,-8.599 -2.8663,-8.599 -2.8663,0 -4.2995,17.198 -11.4653,8.599 -11.4654,-14.3315 -20.0643,5.7327 -38.6955,-2.8663 -10.0322,-5.7327 -12.8985,-22.9306 -24.3638,-24.3639 -7.1659,-1.433 -2.8664,21.4976 -11.4654,21.4976 -25.7969,-1.4332 -8.5989,-60.193 -27.2301,-27.2301 -2.8663,5.7325 7.1659,17.1979 1.4332,21.4974 -10.0322,10.0322 -55.8935,-8.5989 -65.9256,-4.2995 -18.6312,7.1658 -32.9629,24.3638 -60.193,31.5297 -15.7648,4.2995 -20.0643,-20.0644 -28.6632,-24.3639 -4.2997,-1.4331 1.433,10.0322 -1.4332,12.8985 -5.7328,8.599 -15.7649,15.7649 -24.3639,20.0644 -2.8663,1.4332 -1.4331,-5.7327 -2.8663,-5.7327 -15.7649,-7.1658 0,-20.0643 -10.0322,-35.8292 -5.7327,-8.5989 -12.8985,-17.1979 -21.4975,-22.9306 -2.8662,-1.4331 -7.1657,4.2995 -8.5989,1.4332 -7.166,-5.7327 -4.2995,-18.6312 -11.4654,-22.9307 -14.3316,-10.0322 -40.1287,28.6634 -18.6311,-24.3637 -2.8664,-1.4332 -5.7327,-2.8665 -10.0322,-5.7327 -4.2995,-4.2995 -1.4332,-11.4654 -4.2995,-15.7649 -15.7649,-20.0643 -55.8935,-38.6954 -73.0915,-53.0271 -5.7327,-2.8663 2.8663,-17.198 -1.4332,-21.4975 -4.2995,-4.2995 -25.7969,11.4653 -40.1286,-22.9307 1.4332,-1.4332 1.4332,-1.4332 2.8664,-2.8662 1.4331,-1.4333 -1.4332,-2.8665 0,-2.8665 24.3638,-4.2995 40.1286,15.7649 38.6954,-21.4974 0,-8.599 20.0644,4.2995 15.7649,-8.599 l -18.6311,-28.6634 c 1.433,-10.032 45.8613,-24.3637 48.7276,-28.6632 0,-1.4332 8.599,-58.7598 8.599,-58.7598 10.0321,-38.6954 18.6311,8.599 32.9628,-45.8613 4.2995,-17.198 -15.7649,-22.9307 -15.7649,-41.5617 10.0322,1.433 106.0542,-28.6634 111.7869,-32.9629 15.7649,-17.198 4.2995,-40.1286 32.9629,-50.1608 10.0322,-4.2995 65.9256,2.8662 74.5246,-2.8663 4.2995,-2.8664 2.8664,-11.4654 7.1659,-14.3317 2.8663,-1.4332 7.1658,7.1658 10.032,4.2995 17.074,-13.3664 23.3109,-31.4532 19.6723,-48.2271 6.1679,15.9809 6.373,-10.9646 6.1248,-13.399 -1.1923,19.1243 -0.9238,18.6312 17.198,18.6312 5.7325,0 12.8985,4.2995 17.198,0 5.7327,-2.8664 5.7327,-14.3317 11.4652,-17.1981 15.7649,-10.0321 37.2624,-4.2995 54.4603,-10.0321 40.1287,-14.3317 50.1609,-31.5296 75.9578,-47.2945 4.2995,-2.8663 11.4654,8.5989 17.198,5.7327 8.599,-1.4332 12.8984,-15.7649 21.4976,-12.8985 11.4652,1.4331 14.3315,17.198 24.3637,22.9307 1.4332,2.8662 5.7327,-2.8665 8.599,-1.4332 4.2995,1.4332 7.1659,11.4652 11.4654,10.0321 5.7326,-1.4332 5.7326,-12.8984 11.4653,-14.3316 15.7649,-4.2995 34.3959,4.2995 48.7276,11.4652 2.8664,1.4332 0,8.599 4.2995,8.599 20.0644,1.4332 51.594,-22.9305 71.6583,-30.0964 z m -583.2985,554.6351 c 17.1981,-31.5297 -25.797,2.8664 -27.23,1.4332 -10.0322,-4.2995 -18.6312,-22.9307 -27.2302,-17.198 -2.8664,0 7.1658,21.4975 5.7326,30.0964 14.3317,0 40.1286,0 48.7276,-14.3316 z m -24.3638,170.5467 c -11.4654,10.0322 -15.7648,-4.2995 -25.7969,-5.7326 -5.7327,0 -11.4654,7.1658 -17.198,5.7326 -10.0322,-2.8663 -5.7327,-35.8291 -14.3317,-28.6632 -4.2994,2.8662 2.8663,12.8984 0,18.6311 -11.4654,24.3638 -18.6311,-17.1981 12.8985,-58.7598 4.2995,7.1658 10.0322,14.3316 12.8985,22.9307 0,1.4331 -4.2995,14.3315 2.8663,15.7648 7.1659,1.4332 44.4281,17.1979 28.6633,30.0964 z m 490.1426,-121.8191 c -7.1657,-8.599 -17.1979,-15.7648 -28.6632,-20.0643 -17.198,-5.7327 -41.5618,21.4975 -60.193,2.8663 -2.8663,-4.2995 5.7327,-10.032 2.8664,-14.3315 -4.2995,-12.8986 -88.8562,-53.0273 -104.6211,-50.1609 -8.599,2.8663 -12.8985,12.8985 -20.0643,17.198 -4.2996,1.4332 2.8663,-8.599 5.7326,-11.4654 4.2995,-4.2995 10.0322,-8.599 14.3317,-12.8985 5.7327,-5.7325 10.0322,-10.032 15.7649,-14.3315 8.5989,-5.7327 17.1979,-10.0322 25.7969,-14.3317 24.3637,12.8985 21.4975,25.797 45.8613,38.6954 4.2995,2.8663 10.0321,4.2995 15.7648,4.2995 2.8663,0 4.2995,-5.7327 7.1658,-4.2995 7.1659,2.8663 12.8986,11.4654 21.4976,14.3317 8.5989,1.4332 38.6954,-15.7649 44.4281,-5.7327 1.4331,1.4332 -1.4332,2.8664 -1.4332,4.2995 -1.4332,1.4332 -2.8663,4.2995 -1.4332,5.7327 5.7327,5.7327 15.7649,5.7327 20.0644,12.8985 0,1.4332 -2.8665,44.4281 11.4652,54.4603 15.7649,11.4653 80.2573,-10.0322 54.4603,32.9629 -14.3316,22.9305 -53.0271,-5.7327 -61.6261,-15.7649 -1.4332,-2.8663 4.2995,-4.2995 4.2995,-7.1658 -1.4332,-4.2995 -5.7327,-8.599 -10.0322,-11.4654 -2.8662,0 -5.7327,7.1659 -7.1657,4.2995 0,-2.8663 8.599,-7.1658 5.7325,-10.0322 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ sodipodi:nodetypes="cccccscccccscccscccccccccccccccccccccccccccccccccscsccccccccccccccccssccscccccccccccccscccccccsccccccccsccccccscccccccssccccsccccsccccsccccccsssccccsccccsscsccccccccscccccccccscccssscccccccssccccccccccscccccccccscsccccccccccscccccccccccccccscsccccccscccccccscccccccsscccsccccsccccccc" /><path
+ id="ee"
+ class="eu europe"
+ d="m 7607.9223,3723.0345 c 11.4654,-2.8663 55.8935,-44.4281 68.792,-54.4602 8.5989,-5.7327 24.3637,21.4975 20.0642,2.8663 0,-1.4332 -1.4331,-1.4332 -1.4331,-2.8663 0,-2.8664 -2.8664,-7.1659 0,-7.1659 12.8985,0 28.6633,21.4975 37.2623,24.3639 4.2994,1.4331 8.5989,-7.1659 12.8984,-7.1659 4.2995,1.4332 2.8664,10.0322 7.1659,11.4654 8.599,2.8663 17.198,-5.7327 25.797,-2.8664 4.2995,1.4332 -1.4332,10.0322 1.4332,12.8986 5.7326,8.599 51.5939,38.6954 61.6261,37.2622 1.4332,0 28.6634,-30.0964 28.6634,-30.0964 5.7325,-1.4332 48.7276,14.3317 50.1606,7.1657 2.8665,-7.1657 -7.1657,-27.2301 -2.8662,-31.5296 2.8662,-2.8663 10.0322,-2.8663 11.4652,-7.1658 1.4332,-2.8663 -4.2995,-4.2995 -4.2995,-8.599 -1.433,-2.8662 -1.433,-7.1657 0,-10.0322 17.1981,-14.3316 18.6312,1.4333 24.3639,-15.7647 1.4332,-4.2995 -11.4654,-1.4332 -15.7649,-5.7327 -10.032,-10.0322 -4.2995,-17.198 -7.1658,-27.2302 -1.4332,-4.2995 -24.3638,-17.1979 -28.6633,-21.4974 -11.4653,-20.0644 1.4332,-11.4654 1.4332,-30.0965 0,-25.7971 -28.6632,-53.0272 -32.9629,-78.8242 -1.433,-15.7647 15.7649,-27.2301 20.0644,-38.6954 0,0 1.4332,-35.8291 1.4332,-35.8291 0,-7.1659 -5.7327,-15.7649 -1.4332,-21.4975 14.3317,-30.0966 38.6954,-17.1981 4.2995,-38.6956 -1.4332,5.7327 -4.2995,11.4655 -14.3317,17.198 -12.8985,8.5991 -147.616,10.0322 -170.5467,7.1659 -4.2995,0 -7.1658,-7.1659 -12.8985,-5.7327 -27.2301,5.7327 34.3961,21.4975 -11.4652,15.7649 -7.166,-1.4332 -8.599,-17.1981 -15.7649,-15.7649 -5.7326,1.4332 4.2995,12.8985 1.4332,18.6312 -4.2995,8.599 -12.8985,17.198 -21.4975,21.4975 -14.3317,7.1659 -30.0966,10.0322 -45.8613,7.1659 -5.7327,-1.4332 -10.0322,-12.8986 -14.3317,-10.0322 -7.1658,4.2995 10.0322,20.0642 2.8664,21.4974 -14.3317,4.2995 -57.3267,5.7327 -65.9257,27.2302 -2.8663,7.1658 12.8985,14.3317 8.599,20.0642 -7.1658,11.4654 -50.1607,8.5992 -55.8934,21.4976 -20.0644,54.4602 17.198,20.0643 25.7969,42.995 4.2995,12.8984 -17.1979,28.6633 -11.4652,41.5618 5.7325,15.7647 28.6632,31.5296 31.5296,37.2622 8.599,12.8986 -5.7327,27.2302 12.8985,37.2624 7.1658,2.8662 15.7648,-4.2995 22.9307,-1.4333 7.1657,1.4333 11.4652,15.7649 18.631,11.4655 10.0322,-5.7327 10.0322,-60.1931 40.1286,-24.3639 2.8665,4.2995 -7.1657,8.599 -7.1657,14.3317 0,11.4654 5.7327,22.9306 5.7327,34.3959 0,28.6634 -11.4654,12.8986 -8.599,38.6956 z m -156.2151,-110.3537 c 18.6312,12.8985 17.198,14.3317 40.1287,24.3639 10.0321,5.7326 -17.198,-12.8985 -11.4653,-1.4332 5.7325,12.8985 1.4331,-5.7327 -8.5991,-4.2995 -8.599,1.4332 0,20.0642 -7.1658,27.2302 -1.4332,1.4332 -7.1658,-7.166 -8.599,-4.2995 -2.8663,2.8662 1.4332,10.0322 0,15.7647 -7.1658,18.6312 -21.4974,12.8985 -25.7969,14.3317 -2.8665,0 -2.8665,5.7327 -5.7327,7.1659 -8.599,4.2995 -18.6312,7.1658 -25.797,11.4653 -1.4332,0 -1.4332,1.4332 -1.4332,2.8663 0,11.4654 2.8663,24.3638 0,35.8291 -2.8663,7.1659 -12.8985,21.4976 -18.6312,15.7649 -17.1979,-20.0644 15.7649,-31.5297 12.8985,-47.2945 -1.4331,-4.2995 -8.599,1.4332 -12.8985,-1.4331 -8.599,-4.2995 -21.4974,-7.1659 -25.7969,-17.198 -2.8663,-5.7327 12.8984,-8.5991 11.4652,-14.3317 -1.433,-11.4654 -24.3637,-15.7649 -20.0642,-25.7971 2.8663,-8.5989 17.198,11.4654 27.2302,11.4654 8.5989,0 -4.2995,-22.9306 4.2994,-27.2301 4.2995,-1.4332 10.0322,12.8985 11.4653,8.599 10.0322,-34.396 31.5297,-21.4975 64.4925,-31.5297 z m -51.594,-83.1235 c 2.8664,0 7.1659,-1.4332 8.5991,1.433 2.8663,2.8665 -1.4332,10.0322 2.8663,12.8985 5.7327,2.8664 15.7647,-4.2995 21.4974,-1.4331 48.7277,28.6633 2.8663,22.9307 0,28.6633 -11.4652,27.2301 28.6634,4.2995 -24.3637,34.396 -15.7649,8.599 -17.1981,-25.797 -17.1981,-25.797 -5.7326,-15.7648 -31.5297,-10.0321 -41.5617,-12.8985 -10.0322,-1.4331 21.4975,-5.7326 31.5296,-8.599 12.8985,-2.8663 15.7648,-20.0642 18.6311,-28.6632 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
+ id="lv"
+ class="eu europe"
+ d="m 7341.3535,4114.2888 c 5.7326,0 11.4653,1.4332 15.7648,-2.8663 5.7327,-8.599 4.2995,-21.4974 10.0322,-30.0966 11.4652,-14.3316 57.3266,-42.9949 74.5245,-47.2944 10.0322,-2.8662 55.8936,0 65.9256,-2.8662 5.7327,-1.4333 10.0322,-12.8985 15.7649,-12.8985 10.0322,1.4331 15.7648,25.7969 21.4975,18.631 4.2995,-2.8663 2.8664,-10.032 7.1659,-14.3315 12.8984,-12.8986 18.631,1.433 34.3959,0 8.599,-1.4332 12.8985,-10.0322 21.4975,-10.0322 1.4332,-1.4332 44.4281,10.0322 45.8613,8.599 7.1658,-1.4332 10.0322,-11.4654 17.198,-12.8985 12.8984,-2.8664 12.8984,18.6312 24.3638,1.4331 8.599,-10.0321 8.599,-34.396 25.797,-37.2622 14.3317,-2.8665 20.0642,42.9949 38.6954,42.9949 18.6312,0 37.2624,-11.4653 55.8935,-5.7327 27.2302,7.1659 70.2251,60.193 103.188,65.9257 35.8291,5.7325 37.2622,-48.7276 58.7598,-47.2946 7.1658,0 11.4653,8.599 17.198,8.599 4.2994,0 1.433,-10.032 4.2994,-11.4652 8.599,-2.8663 20.0643,5.7327 27.2302,0 0,0 7.1658,-42.995 10.0321,-47.2944 2.8664,-8.5992 30.0965,-30.0966 30.0965,-31.5297 11.4653,-41.5618 -30.0965,-80.2574 -54.4603,-100.3217 -10.0322,-7.1657 10.0322,-20.0643 -10.0322,-22.9306 -7.1657,-1.4332 -12.8984,10.0322 -20.0642,8.599 -2.8664,0 0,-4.2995 0,-7.1658 0,-1.4332 1.433,-4.2995 1.433,-5.7327 0,-10.0322 2.8665,-20.0643 1.4333,-30.0965 -1.4333,-4.2994 -11.4654,-2.8664 -11.4654,-7.1659 0,-18.631 34.396,-30.0964 -12.8985,-47.2944 -5.7326,-1.4332 -14.3316,-1.4332 -18.6311,-5.7327 -4.2996,-5.7327 2.8663,-15.7647 -2.8664,-18.6311 -5.7327,-4.2995 -11.4652,2.8664 -18.6312,4.2994 -1.433,7.166 -44.4281,-8.5989 -50.1606,-7.1657 0,0 -27.2302,30.0964 -28.6634,30.0964 -10.0322,1.4332 -55.8935,-28.6632 -61.6261,-37.2622 -2.8664,-2.8664 2.8663,-11.4654 -1.4332,-12.8986 -8.599,-2.8663 -17.198,5.7327 -25.797,2.8664 -4.2995,-1.4332 -2.8664,-10.0322 -7.1659,-11.4654 -4.2995,0 -8.599,8.599 -12.8984,7.1659 -8.599,-2.8664 -24.3638,-24.3639 -37.2623,-24.3639 -2.8664,0 0,4.2995 0,7.1659 0,1.4331 1.4331,1.4331 1.4331,2.8663 4.2995,18.6312 -11.4653,-8.599 -20.0642,-2.8663 -12.8985,10.0321 -57.3266,51.5939 -68.792,54.4602 l -2.8663,-1.433 c 1.433,2.8662 1.433,7.1657 1.433,11.4652 5.7328,30.0966 42.9951,71.6583 34.3961,104.6212 -4.2995,20.0642 -38.6955,61.6261 -60.193,64.4923 -8.599,1.4332 -14.3317,-7.1657 -21.4975,-8.5989 -14.3316,-4.2995 -17.1979,5.7327 -25.7969,-8.599 -10.0322,-14.3316 -10.0322,-34.396 -22.9307,-45.8612 -12.8984,-12.8986 -42.995,-18.6312 -57.3266,-31.5297 -8.599,-7.1659 0,-25.7971 -8.599,-30.0966 -12.8986,-5.7325 -22.9306,14.3317 -34.396,21.4976 -14.3317,11.4653 -34.396,14.3316 -47.2944,28.6633 -34.3961,35.8291 -4.2995,77.391 -17.198,113.2201 -4.2995,14.3317 -22.9307,20.0642 -27.2302,34.3959 -2.8664,8.599 4.2995,17.198 4.2995,27.2302 0,10.0322 -4.2995,20.0644 -1.4332,28.6634 0,1.433 1.4332,2.8662 2.8663,2.8662 0,0 0,0 0,0 -14.3315,17.1979 8.5991,60.1931 17.1981,80.2573 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
+ id="lt"
+ class="eu europe"
+ d="m 7579.2589,4400.9219 c 2.8664,-2.8662 2.8664,-8.5989 7.1659,-10.0321 21.4975,-7.1658 11.4653,11.4654 25.797,17.1981 40.1286,17.1979 24.3638,-14.3317 50.1608,22.9305 8.599,11.4654 0,27.2301 8.599,32.9628 17.1979,11.4653 58.7598,-11.4652 70.225,-17.1979 11.4654,-4.2995 17.198,21.4974 30.0966,10.0322 8.599,-5.7327 10.0321,-20.0644 18.6311,-25.7971 7.1659,-4.2995 15.7648,0 22.9306,-1.4331 7.1659,-2.8664 -12.8985,-18.6312 -7.1658,-24.3639 7.1658,-8.5989 21.4975,-5.7327 31.5297,-10.0322 22.9307,-12.8984 -8.599,-11.4652 7.1658,-27.2301 4.2995,-5.7326 37.2623,-21.4975 40.1286,-2.8663 1.4332,4.2995 -5.7326,7.1659 -5.7326,11.4654 -1.4332,12.8985 27.2302,2.8663 30.0965,-4.2995 12.8985,-31.5296 -31.5297,-22.9307 -31.5297,-28.6634 -1.4332,-5.7327 12.8985,-45.8613 12.8985,-47.2945 0,0 -12.8985,-40.1286 -12.8985,-40.1286 0,-1.4331 5.7327,-1.4331 5.7327,-4.2995 17.198,-53.0271 4.2995,2.8664 31.5297,-40.1287 7.1658,-8.5989 0,-22.9306 5.7325,-32.9627 7.166,-10.0322 28.6634,4.2995 37.2624,-5.7327 4.2995,-5.7327 -1.4332,-14.3317 0,-20.0644 2.8663,-4.2995 10.0322,-4.2995 11.4653,-8.599 5.7327,-20.0642 -41.5617,5.7327 -40.1287,-7.1657 1.4332,-21.4975 11.4654,-40.1287 2.8665,-61.6261 v -1.4332 c -4.2995,1.4332 -8.599,1.4332 -12.8985,1.4332 -32.9629,-5.7327 -75.9578,-58.7598 -103.188,-65.9257 -18.6311,-5.7326 -37.2623,5.7327 -55.8935,5.7327 -18.6312,0 -24.3637,-45.8614 -38.6954,-42.9949 -17.198,2.8662 -17.198,27.2301 -25.797,37.2622 -11.4654,17.1981 -11.4654,-4.2995 -24.3638,-1.4331 -7.1658,1.4331 -10.0322,11.4653 -17.198,12.8985 -1.4332,1.4332 -44.4281,-10.0322 -45.8613,-8.599 -8.599,0 -12.8985,8.599 -21.4975,10.0322 -15.7649,1.433 -21.4975,-12.8986 -34.3959,0 -4.2995,4.2995 -2.8664,11.4652 -7.1659,14.3315 -5.7327,7.1659 -11.4653,-17.1979 -21.4975,-18.631 -5.7327,0 -10.0322,11.4652 -15.7649,12.8985 -10.032,2.8662 -55.8934,0 -65.9256,2.8662 -17.1979,4.2995 -63.0593,32.9628 -74.5245,47.2944 -5.7327,8.5992 -4.2995,21.4976 -10.0322,30.0966 -4.2995,4.2995 -10.0322,2.8663 -15.7648,2.8663 1.4331,2.8663 1.4331,4.2995 2.8663,5.7327 10.0322,37.2624 -7.1658,14.3317 7.1658,50.1608 1.4332,2.8663 2.8664,5.7326 5.7327,8.599 2.8662,5.7326 5.7327,10.0321 8.5989,14.3317 7.166,10.0321 12.8985,21.4975 14.3317,32.9627 1.4332,8.599 -4.2995,17.198 -2.8662,25.797 1.433,2.8664 2.8662,-7.1658 5.7325,-7.1658 5.7327,-1.4332 5.7327,10.0322 7.1659,14.3317 0,2.8663 0,4.2995 0,5.7327 4.2995,-1.4332 5.7326,-7.1659 10.0321,-7.1659 4.2996,1.4332 4.2996,8.599 8.5991,11.4654 17.198,10.032 45.8612,8.599 64.4924,14.3315 2.8664,1.4332 -1.4332,5.7327 1.4332,5.7327 21.4974,0 41.5618,-18.6311 61.6261,-12.8984 5.7327,1.4332 2.8663,12.8984 8.599,17.1979 1.4332,1.4332 5.7327,-2.8663 8.5989,-1.4332 5.7327,2.8664 11.4654,7.1659 15.7649,12.8986 8.599,14.3316 -21.4974,53.0271 10.0321,96.022 z m -222.1406,-222.1406 c -1.4332,1.4331 -1.4332,2.8663 -1.4332,2.8663 -4.2995,11.4654 5.7327,22.9307 7.1659,34.3959 1.433,14.3317 -1.4332,30.0966 -7.1659,47.2946 0,0 1.4332,0 1.4332,0 4.2995,-8.599 5.7327,-17.198 7.1657,-28.6634 0,-5.7326 1.4332,-25.7969 1.4332,-41.5617 0,-18.6312 -1.4332,-31.5296 -8.5989,-14.3317 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
+ id="pl"
+ class="eu europe"
+ d="m 6763.7877,5169.0988 c 38.6955,-5.7327 -7.1659,-37.2623 32.9628,-30.0966 25.7969,2.8665 4.2995,14.3317 20.0644,25.7971 22.9306,18.6311 41.5617,5.7326 60.1928,17.198 5.7327,4.2995 4.2995,11.4653 7.1659,15.7648 2.8663,1.4332 4.2995,-2.8663 5.7326,-2.8663 4.2995,-1.4332 8.599,-4.2995 10.0322,-1.4332 4.2995,4.2995 0,11.4654 4.2995,15.7649 0,0 31.5296,-17.1981 38.6956,-12.8985 38.6954,18.631 -15.7649,25.7969 -12.8987,44.4281 0,0 32.9629,20.0643 32.9629,20.0643 4.2995,5.7327 12.8985,42.995 34.3959,34.3959 5.7327,-2.8663 4.2995,-12.8985 8.599,-17.198 7.1659,-5.7325 21.4976,-2.8663 25.7971,-11.4652 1.4331,-2.8665 -30.0966,-34.396 -21.4974,-35.8292 21.4974,-2.8664 45.8611,18.6312 58.7596,22.9307 5.7327,1.4331 12.8986,-1.4332 18.6312,-1.4332 5.7327,0 12.8985,2.8663 18.6312,0 2.8663,-1.4332 1.4332,-7.1658 2.8663,-10.0322 1.4332,-1.4331 4.2994,-1.4331 4.2994,0 17.1982,34.3961 5.7327,12.8985 -12.8984,30.0966 -5.7326,4.2995 14.3317,5.7325 20.0644,10.032 4.2994,4.2995 2.8662,11.4654 7.1657,15.7649 2.8665,2.8663 7.1659,4.2995 10.0322,4.2995 41.5619,-4.2995 -5.7327,-7.1659 18.6312,-17.198 2.8663,-1.4332 2.8663,4.2995 5.7327,5.7326 5.7326,4.2995 21.4975,8.599 28.6632,10.0322 8.599,2.8664 21.4975,-1.4332 28.6634,4.2995 1.4331,1.4332 14.3317,35.8291 15.7648,37.2623 5.7327,4.2995 17.1979,0 22.9306,5.7327 5.7327,7.1658 1.4332,20.0643 7.1659,27.2302 2.8663,4.2995 12.8985,-2.8664 17.198,1.4331 4.2995,4.2995 -2.8664,14.3317 1.4331,18.6311 22.9306,18.6312 41.5618,-54.4603 55.8935,-44.4281 8.599,5.7327 8.599,18.6312 15.7648,25.797 1.4332,1.4332 7.1659,-2.8663 8.5989,-1.4331 1.4332,2.8663 -4.2995,8.599 -1.433,10.032 7.1657,1.4333 14.3317,-5.7325 20.0642,-2.8662 10.0322,4.2995 1.4332,31.5296 1.4332,34.3959 0,7.1659 12.8985,-4.2995 20.0644,-5.7326 5.7326,-1.4332 11.4653,10.0321 17.198,7.1658 1.433,-1.4332 18.6312,-45.8613 38.6954,-50.1608 5.7327,-1.4332 11.4653,4.2995 17.198,4.2995 5.7327,-1.4332 8.5989,-10.0322 14.3317,-8.599 11.4652,1.4332 18.6311,17.198 30.0964,17.198 8.599,0 15.7649,-8.599 20.0644,-15.7648 1.433,-2.8664 -7.1659,-2.8664 -7.1659,-5.7327 4.2995,-20.0642 12.8986,0 18.6311,-2.8663 4.2995,-1.4332 4.2995,-10.0322 8.599,-10.0322 21.4976,-5.7327 70.2252,-4.2995 88.8563,10.0322 4.2996,4.2995 2.8664,14.3316 8.5991,17.198 8.599,5.7327 18.631,5.7327 28.6632,8.599 18.6312,5.7327 35.8292,7.1657 53.0271,10.0322 7.1659,0 14.3317,-2.8665 21.4976,-1.4332 2.8663,1.4332 8.599,8.5989 7.1658,5.7327 -17.198,-54.4604 -2.8663,2.8662 -27.2302,-27.2302 -5.7327,-5.7327 5.7327,-15.7649 4.2995,-22.9307 -4.2995,-14.3317 -18.6311,-25.7969 -21.4974,-41.5618 -4.2995,-11.4653 83.1235,-173.413 94.5889,-183.4452 25.797,-21.4975 41.5617,10.0322 45.8612,-41.5619 0,-11.4652 -28.6632,-37.2622 -30.0964,-38.6954 -7.1658,-14.3317 25.7969,-12.8985 21.4974,-17.198 -22.9305,-17.1979 -64.4923,-44.4281 -77.3908,-71.6582 -2.8664,-7.1658 2.8663,-17.198 0,-25.797 -4.2995,-10.0322 -17.198,-17.198 -21.4976,-27.2301 -11.4653,-25.797 18.6312,-74.5248 -10.0321,-97.4553 -11.4654,-8.5991 -25.797,-12.8986 -38.6955,-14.3317 -2.8663,-1.4332 -5.7326,5.7326 -8.599,4.2995 -41.5617,-15.7649 48.7276,-91.7226 58.7598,-101.7548 1.4332,-1.4331 4.2995,-4.2995 4.2995,-7.1658 -4.2995,-78.8241 -67.3588,-146.1829 -93.1557,-219.2744 -8.599,-5.7327 0,-21.4974 -8.599,-32.9628 -25.797,-37.2622 -10.0322,-5.7326 -50.1608,-22.9305 -14.3317,-5.7327 -4.2995,-24.3639 -25.797,-17.1981 -4.2995,1.4332 -4.2995,8.5989 -8.599,11.4654 -65.9256,38.6954 -259.403,45.8613 -341.0934,34.3959 -25.797,27.2301 -65.9256,42.995 -98.8885,30.0964 -28.6633,-11.4652 -22.9306,-38.6954 -31.5296,-55.8934 -2.8663,-4.2995 -12.8985,-15.7649 -7.1658,-14.3316 4.2995,0 8.599,0 11.4653,1.4332 -7.1658,-4.2995 -15.7648,-8.599 -24.3638,-10.0322 -51.594,-8.599 -108.9206,37.2623 -147.616,60.193 -12.8987,7.1658 -28.6634,4.2995 -38.6956,12.8985 -24.3637,21.4974 -30.0964,55.8934 -37.2624,57.3266 -53.0271,12.8984 -103.1877,35.8291 -153.3486,55.8934 -12.8984,5.7327 -21.4974,21.4976 -34.396,24.3638 -7.1658,2.8663 -14.3316,-4.2995 -21.4975,-1.4332 -12.8985,7.1659 17.198,38.6956 4.2995,41.5619 2.8664,22.9306 25.7969,67.3588 28.6634,81.6904 4.2995,34.396 -41.5619,57.3266 -31.5297,84.5568 5.7327,17.198 60.1929,24.3637 60.1929,45.8613 0,21.4975 -17.198,28.6633 -4.2995,44.4282 4.2995,7.1657 14.3317,10.032 17.1981,18.6311 4.2995,7.1658 -1.4332,17.198 0,24.3638 1.4331,4.2995 7.1658,2.8663 8.599,5.7327 7.1658,10.0322 -10.0322,34.3959 -14.3317,42.9949 -8.599,12.8985 12.8985,20.0644 17.198,32.9629 2.8662,7.1657 -7.1658,15.7647 -2.8663,21.4974 5.7325,8.599 18.631,5.7327 24.3637,11.4654 17.198,15.7648 14.3317,88.8563 2.8664,116.0864 z m -143.3165,-540.3035 c 0,0 1.433,0 1.433,0 m 0,0 c 1.4333,1.4332 2.8665,1.4332 4.2995,2.8664 -1.433,-1.4332 -2.8662,-1.4332 -4.2995,-2.8664 z m 7.166,2.8664 c 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,1.4331 0,1.4331 0,1.4331 0,0 0,0 0,0 1.433,0 1.433,0 1.433,0 m 0,0 c 0,0 0,0 1.4332,0 -1.4332,0 -1.4332,0 -1.4332,0 z m 2.8665,0 c 0,0 0,1.4332 1.433,1.4332 -1.433,0 -1.433,-1.4332 -1.433,-1.4332 z m 1.433,1.4332 c 0,0 0,0 0,0 1.4332,0 1.4332,0 1.4332,0 0,0 0,0 0,0 m 0,0 c 1.4332,0 1.4332,0 1.4332,1.4332 0,-1.4332 0,-1.4332 -1.4332,-1.4332 z m 1.4332,1.4332 c 1.4331,0 1.4331,0 1.4331,0 m 0,0 c 1.4332,0 1.4332,0 1.4332,0 0,0 0,0 -1.4332,0 z m 12.8986,2.8663 c 0,0 0,0 0,0 0,0 0,0 0,0 z m 0,0 c 0,0 0,0 1.4331,0 0,0 -1.4331,0 -1.4331,0 z m 477.2441,-230.7396 c 5.7327,2.8662 11.4653,5.7325 15.7648,11.4652 1.4332,1.4332 1.4332,7.1658 -1.4331,5.7327 -10.0322,-7.1659 -12.8984,-12.8984 -14.3317,-17.1979 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
+ id="cz"
+ class="eu europe"
+ d="m 7050.4209,5566.0857 c 21.4974,-84.5568 68.7918,-12.8985 111.7869,-67.3588 2.8663,-4.2995 -1.4332,-11.4653 1.4331,-15.7648 4.2995,-5.7327 14.3317,-2.8664 18.6311,-8.5991 0,0 11.4655,-44.4281 11.4655,-45.8612 12.8984,-22.9307 47.2944,-41.5618 71.6582,-53.0271 -5.7327,-7.1659 -1.4332,-20.0644 -7.1659,-27.2302 -5.7327,-5.7327 -17.1979,-1.4332 -22.9306,-5.7327 -1.4331,-1.4332 -14.3317,-35.8291 -15.7648,-37.2623 -7.1659,-5.7327 -20.0644,-1.4331 -28.6634,-4.2995 -7.1657,-1.4332 -22.9306,-5.7327 -28.6632,-10.0322 -2.8664,-1.4331 -2.8664,-7.1658 -5.7327,-5.7326 -24.3639,10.0321 22.9307,12.8985 -18.6312,17.198 -2.8663,0 -7.1657,-1.4332 -10.0322,-4.2995 -4.2995,-4.2995 -2.8663,-11.4654 -7.1657,-15.7649 -5.7327,-4.2995 -25.797,-5.7325 -20.0644,-10.032 18.6311,-17.1981 30.0966,4.2995 12.8984,-30.0966 0,-1.4331 -2.8662,-1.4331 -4.2994,0 -1.4331,2.8664 0,8.599 -2.8663,10.0322 -5.7327,2.8663 -12.8985,0 -18.6312,0 -5.7326,0 -12.8985,2.8663 -18.6312,1.4332 -12.8985,-4.2995 -37.2622,-25.7971 -58.7596,-22.9307 -8.5992,1.4332 22.9305,32.9627 21.4974,35.8292 -4.2995,8.5989 -18.6312,5.7327 -25.7971,11.4652 -4.2995,4.2995 -2.8663,14.3317 -8.599,17.198 -21.4974,8.5991 -30.0964,-28.6632 -34.3959,-34.3959 0,0 -32.9629,-20.0643 -32.9629,-20.0643 -2.8662,-18.6312 51.5941,-25.7971 12.8987,-44.4281 -7.166,-4.2996 -38.6956,12.8985 -38.6956,12.8985 -4.2995,-4.2995 0,-11.4654 -4.2995,-15.7649 -1.4332,-2.8663 -5.7327,0 -10.0322,1.4332 -1.4331,0 -2.8663,4.2995 -5.7326,2.8663 -2.8664,-4.2995 -1.4332,-11.4653 -7.1659,-15.7648 -18.6311,-11.4654 -37.2622,1.4331 -60.1928,-17.198 -15.7649,-11.4654 5.7325,-22.9306 -20.0644,-25.7971 -40.1287,-7.1657 5.7327,24.3639 -32.9628,30.0966 -2.8664,5.7326 -4.2994,10.0321 -8.5991,10.0321 -18.631,4.2995 -48.7276,-74.5246 -64.4923,-30.0965 -2.8663,7.1658 22.9306,12.8985 17.1979,17.198 -17.1979,14.3317 -41.5618,15.7649 -58.7598,25.797 -2.8663,1.4332 0,8.5991 -2.8663,10.0321 -11.4654,5.7327 -27.2301,-2.8662 -35.8291,4.2995 -7.1659,5.7327 -4.2995,17.198 -11.4654,22.9307 -2.8663,2.8664 -5.7326,-7.1658 -10.0321,-5.7327 -12.8986,2.8664 -14.3317,20.0644 -22.9306,25.7971 -4.2995,4.2995 -12.8985,-2.8664 -17.198,1.4331 -4.2995,2.8664 0,11.4654 -4.2995,15.7649 -5.7327,7.1657 -21.4976,-5.7327 -25.7971,-5.7327 -35.8291,5.7327 -41.5617,32.9628 -53.0271,55.8935 -2.8663,5.7325 -2.8663,-14.3317 -8.599,-18.6312 -4.2995,-5.7327 -12.8985,-7.1659 -20.0642,-8.599 -12.8986,-2.8664 14.3315,42.9949 42.9949,61.6261 2.8663,1.4332 12.8985,2.8663 14.3317,11.4653 4.2995,20.0644 -14.3317,12.8986 -17.198,28.6634 -1.4332,4.2994 30.0964,57.3265 34.3959,61.626 24.3638,24.3639 30.0965,7.166 45.8614,22.9307 10.032,10.0322 11.4652,25.797 21.4974,34.3959 20.0643,14.3317 70.2251,32.9629 80.2573,61.6263 h 1.4332 c 22.9305,11.4652 40.1286,41.5617 70.2251,30.0964 5.7327,-1.4332 4.2995,-12.8985 10.0322,-12.8985 10.032,0 20.0642,12.8985 30.0964,10.0322 0,0 11.4653,-37.2623 11.4653,-37.2623 5.7327,-4.2995 15.7649,5.7327 18.6312,1.4332 2.8664,-2.8664 0,-44.4281 1.4332,-47.2946 4.2995,-4.2994 12.8984,-1.4332 18.6311,1.4333 2.8663,1.4332 0,8.5989 2.8663,10.0321 7.1659,0 12.8985,-8.5989 20.0644,-8.5989 41.5617,0 74.5246,31.5295 113.22,35.8291 5.7327,0 12.8985,2.8663 18.6312,1.4331 8.599,-4.2995 11.4654,-15.7648 18.6312,-18.6312 10.0321,-2.8663 24.3638,15.7649 31.5296,17.1981 4.2995,0 10.0322,-8.5991 14.3317,-5.7327 7.1658,5.7327 10.0322,11.4653 10.0322,17.198 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
+ id="sk"
+ class="eu europe"
+ d="m 7726.8751,5389.8062 c 1.4331,14.3317 -8.5991,34.3961 -10.0322,48.7277 -1.4332,10.0321 0,20.0643 -4.2995,28.6633 -4.2995,10.0322 -17.198,12.8985 -18.6312,22.9307 -2.8662,10.0322 4.2995,20.0642 4.2995,31.5296 0,11.4653 -21.4974,11.4653 -32.9628,14.3317 -5.7326,1.4331 -11.4653,8.599 -15.7648,5.7326 -27.2302,-8.599 -5.7327,-35.8292 -41.5618,-37.2622 -14.3317,0 -22.9307,20.0642 -37.2624,21.4974 -24.3637,4.2995 -55.8934,-21.4974 -77.3908,5.7327 -8.599,11.4653 -2.8665,50.1607 -18.6312,57.3266 -5.7327,1.4332 -14.3317,-4.2995 -20.0644,-1.4332 -22.9307,14.3317 10.0322,24.3639 -25.7969,30.0965 -11.4653,1.4332 -37.2624,-30.0965 -48.7277,-10.0321 -4.2995,7.1658 2.8663,20.0643 -2.8662,25.797 -15.7649,15.7647 -60.1931,5.7327 -80.2573,20.0642 -18.6312,11.4654 1.4331,31.5297 7.1658,40.1286 5.7327,10.0322 -116.0865,31.5297 -133.2844,28.6634 -27.2302,-5.7327 -47.2946,-42.9949 -73.0915,-45.8613 -5.7327,-1.4331 -10.0322,0 -12.8985,1.4332 -17.198,-18.6312 -31.5296,-37.2624 -44.4281,-58.7598 -8.599,-14.3317 12.8985,-34.396 11.4653,-53.0271 20.0643,-84.5568 67.3587,-14.3317 110.3538,-67.3588 2.8663,-4.2995 -1.4332,-11.4653 1.4331,-15.7648 4.2995,-5.7327 14.3317,-2.8664 18.6311,-8.5991 0,0 11.4655,-44.4281 11.4655,-45.8612 12.8984,-22.9307 47.2944,-41.5618 71.6582,-53.0271 2.8663,4.2995 12.8985,-2.8664 17.198,1.4331 4.2995,4.2995 -2.8664,14.3317 1.4331,18.6311 22.9306,18.6312 41.5618,-54.4603 55.8935,-44.4281 8.599,5.7327 8.599,18.6312 15.7648,25.797 1.4332,1.4332 7.1659,-2.8663 8.5989,-1.4331 1.4332,2.8663 -4.2995,8.599 -1.433,10.032 7.1657,1.4333 14.3317,-5.7325 20.0642,-2.8662 10.0322,4.2995 1.4332,31.5296 1.4332,34.3959 0,7.1659 12.8985,-4.2995 20.0644,-5.7326 5.7326,-1.4332 11.4653,10.0321 17.198,7.1658 1.433,-1.4332 18.6312,-45.8613 38.6954,-50.1608 5.7327,-1.4332 11.4653,4.2995 17.198,4.2995 5.7327,-1.4332 8.5989,-10.0322 14.3317,-8.599 11.4652,1.4332 18.6311,17.198 30.0964,17.198 8.599,0 15.7649,-8.599 20.0644,-15.7648 1.433,-2.8664 -7.1659,-2.8664 -7.1659,-5.7327 4.2995,-20.0642 12.8986,0 18.6311,-2.8663 4.2995,-1.4332 4.2995,-10.0322 8.599,-10.0322 21.4976,-5.7327 70.2252,-4.2995 88.8563,10.0322 4.2996,4.2995 2.8664,14.3316 8.5991,17.198 8.599,5.7327 18.631,5.7327 28.6632,8.599 12.8985,4.2995 25.797,5.7327 38.6956,7.1657 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
+ id="si"
+ class="eu europe"
+ d="m 7041.8218,5974.5379 c -10.0321,-1.4332 -34.396,-7.1659 -40.1287,-5.7327 -15.7647,2.8663 5.7327,22.9307 -2.8663,28.6634 -7.1657,2.8663 -15.7647,-1.4332 -22.9306,1.4331 -2.8663,1.4332 1.4332,7.1659 -1.4331,10.0321 -14.3317,11.4655 -37.2623,12.8985 -51.594,25.797 -17.198,15.7649 31.5296,55.8935 10.0322,71.6583 -50.1609,35.8291 -18.6312,-24.3638 -51.5941,22.9307 -4.2995,5.7327 12.8985,7.1659 15.7649,14.3316 2.8663,5.7327 -14.3317,4.2995 -14.3317,10.0322 0,2.8663 14.3317,21.4975 8.599,28.6633 -15.7647,15.7649 -38.6954,-8.599 -53.0271,-8.599 -21.4974,0 20.0643,20.0644 -15.7649,10.0322 -10.032,-2.8663 -22.9305,-18.6312 -27.23,-27.2302 -2.8664,-2.8663 -5.7327,-11.4653 -7.1659,-8.599 -5.7327,8.599 -4.2995,18.6312 -10.0322,25.797 -18.631,24.3639 -44.4281,0 -65.9256,7.1659 -2.8663,1.4331 2.8663,7.1658 0,10.032 -12.8985,7.166 -38.6954,5.7327 -51.5939,0 0,0 0,-1.433 1.4331,-1.433 7.1659,-7.1659 15.7649,-14.3317 18.6312,-21.4975 50.1608,2.8663 -7.1658,-31.5296 -21.4975,-40.1286 -10.0322,-5.7327 5.7327,-24.3639 2.8663,-31.5297 -2.8663,-7.1659 -25.797,12.8985 -20.0643,-5.7327 4.2995,-12.8984 31.5297,-24.3639 21.4975,-32.9628 -7.1658,-5.7327 -40.1286,-2.8663 -37.2624,-20.0643 16.0545,-33.9389 40.963,-45.4022 65.9258,-41.5618 11.4652,1.4332 22.9305,10.0322 34.3959,11.4652 11.4653,1.4332 22.9307,-7.1657 34.3959,-5.7325 7.1659,1.433 11.4654,11.4652 18.6312,11.4652 2.8663,1.4333 1.4332,-7.1657 4.2995,-8.5989 7.1658,-7.1658 18.6312,-10.0322 25.7969,-18.6312 5.7327,-4.2995 1.4333,-14.3317 5.7327,-18.6312 27.2302,-21.4975 55.8936,5.7327 81.6905,-5.7326 8.599,-4.2994 10.0322,-17.1981 18.6312,-20.0643 1.4331,-1.4333 48.7276,5.7327 50.1607,4.2994 4.2995,-1.4332 -4.2995,-7.1657 -5.7326,-11.4652 -4.2995,-22.9307 12.8985,-28.6634 34.396,-28.6634 5.7327,0 17.1979,44.4281 47.2944,68.792 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ sodipodi:nodetypes="cccccccccscsccccccccccsccccscccccccccsc" /><path
+ id="hu"
+ class="eu europe"
+ d="m 6994.5274,5905.7459 c 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 5.7327,0 17.1979,44.4281 47.2944,68.792 38.6955,31.5297 71.6582,48.7276 101.7548,87.4231 4.2995,5.7327 32.9627,1.4332 35.8292,2.8664 11.4652,4.2995 20.0642,14.3315 30.0964,18.631 20.0644,8.5991 83.1236,7.1659 101.7547,-8.599 2.8665,-2.8662 4.2995,-22.9306 14.3317,-22.9306 27.2302,-4.2995 22.9307,1.4332 47.2946,-25.797 4.2995,-4.2995 10.032,10.0322 22.9305,0 12.8986,-10.0322 21.4976,-27.2301 37.2623,-35.8291 32.9629,-21.4975 5.7327,0 30.0965,1.4332 1.4332,0 38.6955,-11.4654 40.1286,-11.4654 7.1659,0 14.3317,7.1659 21.4976,7.1659 2.8663,-1.4332 4.2995,-7.1659 7.1658,-8.599 8.599,-2.8664 51.594,-7.1659 54.4603,-17.198 2.8663,-5.7327 -18.6312,-12.8984 7.1658,-17.1981 10.0322,-1.433 20.0644,8.5992 28.6633,5.7327 27.2302,-10.0322 18.6312,-61.6261 25.797,-77.3909 2.8663,-4.2995 10.0322,-4.2995 12.8985,-8.599 0,0 15.7649,-50.1607 15.7649,-50.1607 2.8662,-7.1659 7.1657,-12.8986 7.1657,-20.0644 0,-2.8663 -7.1657,-2.8663 -7.1657,-5.7327 1.433,-12.8985 17.1979,-53.0271 24.3637,-64.4924 2.8664,-2.8664 10.0322,0 10.0322,-4.2995 7.1658,-27.2301 -2.8663,-47.2945 28.6634,-77.391 10.032,-11.4652 21.4974,-4.2994 37.2622,-10.0321 15.7649,-7.1658 17.1979,-28.6633 28.6633,-40.1287 -17.1979,-14.3317 5.7328,-11.4652 -12.8984,-24.3637 -2.8664,-1.4332 -7.1659,-4.2995 -11.4654,-4.2995 -5.7326,1.4331 -10.0321,8.599 -15.7648,7.1658 -8.599,-5.7327 -10.0322,-20.0644 -18.6312,-25.797 -4.2995,-2.8664 -10.0322,4.2995 -14.3316,2.8663 -22.9307,-8.599 -1.4331,-24.3637 -34.396,-25.797 0,11.4653 -21.4974,11.4653 -32.9628,14.3317 -5.7326,1.4331 -11.4653,8.599 -15.7648,5.7326 -27.2302,-8.599 -5.7327,-35.8292 -41.5618,-37.2622 -14.3317,0 -22.9307,20.0642 -37.2624,21.4974 -24.3637,4.2995 -55.8934,-21.4974 -77.3908,5.7327 -8.599,11.4653 -2.8665,50.1607 -18.6312,57.3266 -5.7327,1.4332 -14.3317,-4.2995 -20.0644,-1.4332 -22.9307,14.3317 10.0322,24.3639 -25.7969,30.0965 -11.4653,1.4332 -37.2624,-30.0965 -48.7277,-10.0321 -4.2995,7.1658 2.8663,20.0643 -2.8662,25.797 -15.7649,15.7647 -60.1931,5.7327 -80.2573,20.0642 -18.6312,11.4654 1.4331,31.5297 7.1658,40.1286 5.7327,10.0322 -116.0865,31.5297 -133.2844,28.6634 -27.2302,-5.7327 -47.2946,-42.9949 -73.0915,-45.8613 -5.7327,-1.4331 -10.0322,0 -12.8985,1.4332 0,0 0,0 0,0 -20.0644,8.599 0,54.4603 -1.4332,60.193 -8.599,15.7648 -60.1929,-7.1659 -80.2573,10.0321 -8.5989,7.1659 34.396,4.2995 35.8292,28.6633 2.8663,28.6634 -21.4975,7.1658 -31.5297,27.2302 -7.1657,14.3317 18.6312,44.4281 15.7649,50.1608 -12.8984,21.4975 -24.3639,25.797 -50.1608,54.4602 v 0 c 0,0 0,0 -1.4332,1.4332 2.8664,-1.4332 4.2995,-2.8663 7.1659,-2.8663 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
+ id="ro"
+ class="eu europe"
+ d="m 8695.695,6202.4112 c -22.9307,4.2995 -60.1929,17.198 -81.6905,-1.4332 -7.1658,-5.7327 -8.599,-25.7969 -17.1979,-21.4974 -4.2995,1.4332 -7.1658,7.1657 -11.4653,8.599 -34.3959,18.6311 11.4653,-10.0322 -25.797,-8.599 -11.4654,0 -20.0643,12.8985 -31.5296,14.3317 -24.3639,2.8662 -4.2995,-31.5297 -68.792,-7.166 -27.2302,11.4655 -77.391,34.3961 -98.8885,55.8936 -24.3637,24.3637 -28.6633,54.4603 -60.1928,74.5245 -28.6634,17.198 -50.1609,5.7327 -78.8242,4.2995 -22.9307,-1.433 -47.2944,-2.8662 -68.792,4.2995 -8.599,2.8664 -11.4653,14.3317 -20.0643,17.1981 -40.1286,14.3316 -87.4232,-8.5991 -127.5518,-4.2996 -31.5296,2.8664 -41.5617,28.6634 -75.9578,14.3317 -24.3637,-10.0321 30.0966,-41.5617 17.1981,-47.2944 -22.9306,-10.0322 -91.7226,-24.3639 -87.4231,-61.6261 1.4332,-12.8986 48.7276,-14.3317 34.3959,-21.4976 -151.9156,-75.9578 -15.7648,-7.1658 -77.3909,28.6634 -10.0322,7.1657 -15.7649,-18.6312 -25.797,-22.9307 -7.1658,-4.2995 -17.198,0 -24.3638,0 -8.599,0 -17.198,4.2995 -25.7969,1.4332 -4.2995,-2.8664 -1.4332,-10.0322 -4.2995,-15.7649 -7.1659,-14.3315 -68.792,8.599 -34.3961,-15.7647 8.599,-5.7327 30.0966,-11.4655 22.9307,-17.198 -7.1658,-4.2995 -21.4975,0 -24.3638,-8.599 -1.4332,-8.599 28.6633,-24.3639 8.599,-35.8291 -27.2301,-15.7649 -81.6905,-8.599 -100.3216,-41.5619 -4.2995,-7.1659 -4.2995,-41.5618 -4.2995,-50.1608 v -2.8663 c -4.2995,1.4331 -7.1658,10.0321 -10.0322,7.1658 -10.0321,-5.7327 -11.4653,-21.4975 -20.0643,-28.6632 -8.599,-5.7327 -21.4974,-4.2997 -30.0966,-11.4655 -8.5989,-4.2994 -12.8984,-14.3316 -18.631,-21.4974 2.8663,-1.4332 4.2995,-7.1659 7.1658,-8.599 8.599,-2.8664 51.594,-7.1659 54.4603,-17.198 2.8663,-5.7327 -18.6312,-12.8984 7.1658,-17.1981 10.0322,-1.433 20.0644,8.5992 28.6633,5.7327 27.2302,-10.0322 18.6312,-61.6261 25.797,-77.3909 2.8663,-4.2995 10.0322,-4.2995 12.8985,-8.599 l 15.7649,-50.1607 c 2.8662,-7.1659 7.1657,-12.8986 7.1657,-20.0644 0,-2.8663 -7.1657,-2.8663 -7.1657,-5.7327 1.433,-12.8985 17.1979,-53.0271 24.3637,-64.4924 2.8664,-2.8664 10.0322,0 10.0322,-4.2995 7.1658,-27.2301 -2.8663,-47.2945 28.6634,-77.391 10.032,-11.4652 21.4974,-4.2994 37.2622,-10.0321 15.7649,-7.1658 17.1979,-28.6633 28.6633,-40.1287 4.2995,2.8664 12.8985,-2.8663 22.9307,-30.0964 1.4331,-2.8663 1.4331,-7.1658 4.2995,-7.1658 4.2995,0 40.1286,17.198 44.4281,17.198 2.8663,0 4.2995,-7.1659 7.1658,-8.599 18.6312,-7.1659 65.9257,11.4653 88.8563,5.7326 12.8986,-4.2995 21.4976,-15.7648 34.396,-17.198 22.9307,-1.4332 38.6954,28.6634 54.4603,32.9628 21.4975,7.1658 28.6633,-32.9628 34.396,-38.6955 25.7969,-27.23 91.7225,-24.3638 111.7869,-44.4281 38.6954,-37.2623 -17.198,-5.7326 10.0322,-41.5617 7.1658,-8.599 18.6312,-15.7649 30.0964,-18.6312 l 1.4332,-4.2995 5.7326,-12.8985 v 0 c -1.4331,2.8663 -1.4331,8.599 -1.4331,11.4653 20.0643,-10.0322 32.9628,-1.4332 48.7276,11.4654 30.0965,21.4974 35.8292,57.3266 60.1929,81.6903 40.1287,38.6956 149.0493,107.4874 161.9478,163.381 10.0322,35.8291 -2.8663,75.9577 5.7327,111.7869 2.8663,15.7647 28.6633,51.5939 27.2301,67.3588 0,5.7327 -11.4654,7.1658 -10.0322,12.8985 1.4333,5.7327 10.0322,2.8662 14.3317,5.7327 4.2995,2.8662 4.2995,12.8984 10.0322,12.8984 2.8663,1.4331 7.1658,-1.4332 10.0321,1.4331 4.2996,4.2995 2.8664,12.8986 8.5991,17.1981 5.7326,5.7326 67.3588,8.599 65.9256,1.4331 0,-1.4331 -20.0644,-5.7326 -5.7327,-14.3317 8.599,-4.2995 18.6312,-2.8663 27.2301,-7.1658 14.3317,-7.1657 20.0644,-27.2301 35.8292,-32.9628 31.5296,-11.4653 47.2944,0 54.4603,27.2301 -1.4332,1.4332 -5.7327,0 -5.7327,1.4332 0,4.2995 2.8664,7.1658 5.7327,8.599 2.8663,1.4332 5.7327,-4.2995 7.1658,-1.4332 2.8664,5.7327 4.2995,54.4603 4.2995,60.193 -1.4331,18.6312 -44.4282,20.0644 -55.8934,28.6634 -7.1659,5.7326 -7.1659,25.7969 -15.7649,24.3637 -1.4331,-1.4332 10.0322,-48.7276 -10.0321,-60.1928 -7.1659,-2.8665 -15.7649,8.5989 -20.0644,15.7647 -5.7327,10.0322 20.0644,18.6312 18.6312,30.0964 0,11.4655 -21.4974,18.6312 -15.7649,27.2302 5.7327,8.599 16.9165,-12.2282 26.9486,-12.2282 2.8664,-1.4332 -1.1515,6.4956 -4.0179,9.3619 -3.39,1.8409 -0.8114,2.4342 -1.4331,4.2995 8.599,7.1658 -25.7971,63.0593 -25.7971,64.4925 1.4332,10.0321 14.3317,60.1929 21.4976,106.0542 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ sodipodi:nodetypes="cccccccsccscccccsccscscccccsccccccccccccscccccccssccccccccccsccccccsscscccsscsssccccccscccccc" /><path
+ id="bg"
+ class="eu europe"
+ d="m 8477.8539,6648.1257 c -7.1659,-1.4331 -14.3317,-1.4331 -18.6312,-1.4331 -55.8935,11.4653 34.3959,51.5939 2.8663,75.9578 0,0 -44.4282,14.3317 -45.8612,14.3317 -20.0644,7.1658 -53.0273,32.9627 -74.5247,31.5295 -4.2995,0 -1.4331,-7.1658 -4.2995,-8.599 -14.3317,-7.1657 -32.9627,-15.7647 -48.7276,-11.4652 -5.7327,1.4332 -5.7327,12.8984 -11.4653,14.3316 -4.2995,1.4331 -7.1659,-8.5989 -11.4654,-10.0321 -2.8663,-1.4333 -7.1658,4.2994 -8.599,1.4332 -10.0322,-5.7327 -12.8985,-21.4976 -24.3637,-22.9307 -8.5992,-2.8664 -12.8986,11.4653 -21.4976,12.8985 -5.7326,2.8662 -12.8985,-8.599 -17.198,-5.7327 -25.7969,15.7649 -35.8291,32.9628 -75.9578,47.2945 -17.1979,5.7326 -38.6954,0 -54.4603,10.0321 -5.7325,2.8664 -5.7325,14.3317 -11.4652,17.1981 -4.2995,4.2995 -11.4655,0 -17.198,0 -34.5518,-2.9572 -17.5714,-48.5095 -20.0644,-78.8242 -10.0322,-10.0322 -25.7969,-38.6954 -38.6954,-47.2944 -7.1659,-4.2995 -17.198,0 -25.797,-4.2995 -2.8664,-1.4332 -41.5618,-31.5297 -41.5618,-34.3961 7.1658,-12.8985 27.2301,-15.7647 20.0642,-34.3959 -1.433,-5.7327 -5.7325,-8.599 -10.032,-11.4653 -2.8664,-1.4332 -7.1659,1.4331 -8.599,-1.4332 -1.4332,-7.1658 0,-14.3317 0,-21.4975 -1.4332,-8.5989 -11.4654,-17.1979 -7.1659,-24.3638 41.5618,-68.7919 -5.7327,15.7649 40.1286,-20.0643 4.2995,-4.2995 34.3961,-57.3267 25.797,-65.9257 -11.4653,-8.599 -65.9256,-34.3959 -68.7919,-37.2622 -17.198,-14.3317 -44.4281,-74.5247 -34.3961,-96.0222 4.2997,-10.0322 20.0644,-8.599 25.7971,-17.1979 4.2995,-10.0322 -1.4332,-22.9307 2.8663,-32.9629 18.6312,8.599 41.5618,14.3317 51.594,20.0644 12.8985,5.7327 -41.5618,37.2623 -17.1981,47.2944 34.3961,14.3317 44.4282,-11.4653 75.9578,-14.3317 40.1286,-4.2995 87.4232,18.6312 127.5518,4.2996 8.599,-2.8664 11.4653,-14.3317 20.0643,-17.1981 21.4976,-7.1657 45.8613,-5.7325 68.792,-4.2995 28.6633,1.4332 50.1608,12.8985 78.8242,-4.2995 31.5295,-20.0642 35.8291,-50.1608 60.1928,-74.5245 21.4975,-21.4975 71.6583,-44.4281 98.8885,-55.8936 64.4925,-24.3637 44.4281,10.0322 68.792,7.166 11.4653,-1.4332 20.0642,-14.3317 31.5296,-14.3317 37.2623,-1.4332 -8.5989,27.2301 25.797,8.599 4.2995,-1.4333 7.1658,-7.1658 11.4653,-8.599 8.5989,-4.2995 10.0321,15.7647 17.1979,21.4974 21.4976,18.6312 58.7598,5.7327 81.6905,1.4332 h 2.8664 c 5.7326,35.8292 8.599,68.7921 -1.4332,74.5246 -5.7327,2.8664 -12.8985,-7.1658 -20.0644,-5.7325 -53.0271,14.3315 -18.631,12.8984 -34.3959,44.4281 -1.4332,5.7325 -11.4653,5.7325 -14.3317,10.032 0,2.8664 8.599,1.4332 8.599,4.2995 2.8664,22.9307 1.4332,37.2624 7.1659,60.193 1.4331,8.599 10.0321,20.0643 5.7326,27.2302 -4.2995,7.1658 -17.198,2.8663 -24.3638,7.1658 -1.4332,0 4.2995,2.8664 4.2995,4.2995 -2.8663,5.7327 -10.0322,7.1659 -11.4654,12.8984 -1.4331,4.2995 7.1659,8.5992 4.2996,11.4654 -5.7327,8.599 -18.6311,11.4653 -24.3638,20.0643 -25.797,34.3961 37.2623,-17.198 53.0271,21.4976 1.4332,2.8663 -2.8663,7.1658 -2.8663,10.032 1.4331,1.4332 32.9627,20.0644 40.1286,25.7971 4.2995,5.7326 8.599,10.0321 10.0322,14.3316 h -2.8664 c -8.599,1.4332 -17.198,0 -25.7969,2.8664 -11.4653,4.2995 -20.0644,14.3317 -30.0965,21.4975 -2.8664,1.4332 0,7.1657 -1.4332,5.7327 -32.9629,-7.166 -42.9949,-32.9629 -75.9578,-15.7649 l -24.3639,27.2301 c -10.032,4.2995 -22.9305,-2.8663 -30.0964,4.2995 -8.599,7.1659 0,21.4975 -5.7327,30.0964 -8.599,10.0322 -37.2622,5.7327 -24.3637,27.2302 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ sodipodi:nodetypes="cccccscccccccccccccsccccccccccccccccsccsccccccccccccccscccccccccccccccccc" /><path
+ id="cy"
+ class="eu europe"
+ d="m 9926.7843,7409.1367 c -1.4331,22.9306 -65.9256,78.8242 -77.3908,104.6211 -12.8987,31.5297 51.5939,35.8292 44.4281,47.2946 -4.2995,5.7325 -15.7649,-1.4332 -21.4976,1.433 -5.7326,1.4332 -7.1658,10.0322 -12.8985,12.8985 -8.599,5.7327 -22.9307,0 -30.0964,7.1659 -5.7327,7.1658 1.4332,20.0643 -2.8663,27.2302 -11.4654,20.0642 -61.6262,34.3959 -73.0915,50.1607 -4.2995,5.7327 4.2995,15.7649 0,22.9306 -11.4653,21.4976 -22.9307,-11.4652 -27.2302,-11.4652 -8.5989,0 -14.3316,11.4652 -22.9306,14.3317 -4.2995,1.433 -51.5939,-5.7327 -53.0271,-5.7327 -4.2995,-2.8663 -2.8663,-10.0322 -5.7327,-14.3317 -4.2995,-4.2995 -41.5617,-44.4282 -28.6633,-42.9949 7.1658,0 11.4653,7.1657 18.6312,7.1657 12.8985,-1.4332 15.7648,-27.2301 18.631,-31.5296 10.0322,-15.7648 37.2624,-4.2995 47.2946,-12.8985 7.1658,-4.2995 5.7327,-15.7647 4.2995,-24.3637 -1.4332,-7.1659 -14.3317,-15.7649 -8.599,-22.9307 4.2995,-5.7327 15.7648,2.8663 24.3637,1.4331 17.1981,-1.4331 58.7598,-11.4653 74.5247,-20.0643 20.0643,-11.4654 130.4181,-111.7869 131.8512,-110.3538 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
+ sodipodi:nodetypes="cssssc"
+ style="display:inline;fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 6829.9519,7968.4904 c -10.2335,2.0464 -18.1436,18.6209 -18.1436,18.6211 18.1928,-3e-4 25.4206,-7.6225 18.1436,21.4858 -7.2772,29.1084 87.3099,11.1464 76.3942,-14.3239 -10.9158,-25.4703 -51.3355,-7.4093 -65.89,-21.9633 -3.6385,-3.6388 -7.093,-4.5019 -10.5042,-3.8197 z"
+ id="mt"
+ class="eu europe" /><path
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 7367.1505,6701.153 -2.8665,-10.0322 c -17.1979,-28.6634 -44.4281,-18.6312 -75.9577,-42.9951 -8.599,-7.1658 -11.4653,-20.0642 -21.4975,-22.9307 -5.7326,-2.8662 -12.8985,2.8665 -20.0642,4.2997 2.8662,1.433 4.2995,1.433 7.1657,2.8663 2.8663,1.4332 5.7327,10.0321 2.8663,10.0321 -22.9305,-1.4332 -40.1286,-22.9306 -63.0591,-25.797 -10.0322,-1.4331 -21.4976,1.4332 -31.5297,0 -2.8664,0 -5.7327,-7.1658 -7.1659,-5.7326 -2.8663,1.4331 -2.8663,8.599 0,10.032 8.599,2.8665 18.6312,-1.433 28.6634,0 8.5989,1.4333 18.6311,4.2995 28.6632,10.0322 2.8664,1.4333 1.4332,7.166 4.2995,8.599 48.7277,25.7971 38.6955,-15.7647 114.6533,44.4281 10.0322,7.166 22.9307,14.3317 35.8292,17.1982 z m 24.3637,-460.0463 c -12.8985,-14.3317 8.599,-7.1658 14.3317,-17.198 1.4332,-1.4332 1.4332,-4.2995 0,-5.7327 -18.6312,-18.631 -5.7327,-25.7969 -4.2995,-44.4281 1.4332,-7.1658 37.2623,21.4974 32.9629,-7.1658 -20.0644,0 -42.9951,-5.7327 -60.1931,-17.198 -7.1657,-5.7327 5.7327,-8.5989 5.7327,-10.0322 0,-4.2994 -14.3317,-7.1657 -5.7327,-15.7649 1.4332,-1.433 11.4654,7.166 12.8985,-1.433 1.4332,-15.7649 -28.6632,2.8663 -28.6632,-11.4654 2.8663,-32.9627 8.599,-24.3638 -15.7649,-58.7598 l -1.4331,-2.8663 c -4.2995,1.4332 -8.599,1.4332 -15.7649,2.8663 -10.0322,0 -11.4652,20.0644 -14.3317,22.9306 -18.6311,15.7649 -81.6903,17.1981 -101.7547,8.599 -10.0322,-4.2995 -18.6312,-14.3315 -30.0964,-18.631 -2.8665,-1.4332 -31.5297,2.8663 -35.8292,-2.8664 -30.0966,-38.6955 -63.0593,-55.8934 -101.7548,-87.4231 -10.0321,-1.4332 -34.396,-7.1659 -40.1287,-5.7327 -15.7647,2.8663 5.7327,22.9307 -2.8663,28.6634 -7.1657,2.8663 -15.7647,-1.4332 -22.9306,1.4331 -2.8663,1.4332 1.4332,7.1659 -1.4331,10.0321 -14.3317,11.4655 -37.2623,12.8985 -51.594,25.797 -17.198,15.7649 31.5296,55.8935 10.0322,71.6583 -50.1609,35.8291 -18.6312,-24.3638 -51.5941,22.9307 -4.2995,5.7327 12.8985,7.1659 15.7649,14.3316 2.8663,5.7327 -14.3317,4.2995 -14.3317,10.0322 0,2.8663 14.3317,21.4975 8.599,28.6633 -15.7647,15.7649 -38.6954,-8.599 -53.0271,-8.599 -21.4974,0 20.0643,20.0644 -15.7649,10.0322 -10.032,-2.8663 -22.9305,-18.6312 -27.23,-27.2302 -2.8664,-2.8663 -5.7327,-11.4653 -7.1659,-8.599 -5.7327,8.599 -4.2995,18.6312 -10.0322,25.797 -18.631,24.3639 -44.4281,0 -65.9256,7.1659 -2.8663,1.4331 2.8663,7.1658 0,10.032 -12.8985,7.166 -38.6954,5.7327 -51.5939,0 -4.2995,0 -12.8986,-4.2995 -12.8986,0 1.4332,11.4654 11.4654,20.0644 15.7649,30.0966 0,1.4331 -2.8663,1.4331 -2.8663,2.8663 1.4331,11.4654 -1.4332,22.9307 4.2995,31.5297 0,0 1.4331,0 1.4331,1.4332 -5.7326,8.5989 17.1979,18.6311 24.3639,28.6632 5.7327,8.599 10.0321,45.8613 17.1979,37.2623 7.1658,-8.5989 11.4653,-20.0643 17.198,-30.0964 1.4332,-4.2995 2.8664,-8.599 2.8664,-12.8985 0,-1.4332 -4.2995,0 -4.2995,-2.8664 0,-1.4331 0,-7.1658 1.4331,-5.7325 5.7327,1.433 1.4332,34.3959 17.1979,8.5989 2.8665,-7.1659 2.8665,-14.3317 2.8665,-22.9306 0,-1.4332 -2.8665,-2.8665 -2.8665,-5.7327 0,-1.4332 1.4333,4.2995 2.8665,2.8662 11.4652,-5.7325 1.433,-44.4281 14.3317,-44.4281 41.5617,-2.8663 27.23,12.8985 53.0271,34.3961 5.7325,4.2995 14.3315,0 18.6311,4.2995 25.797,30.0964 -4.2996,67.3588 24.3638,98.8884 8.599,10.0321 32.9628,31.5297 42.9949,38.6954 11.4654,5.7328 47.2945,11.4653 35.8291,15.7648 -20.0642,5.7327 -57.3266,-35.8291 -51.5939,18.6312 1.4332,17.1979 67.3588,54.4603 77.391,67.3588 2.8663,1.4332 -11.4654,-4.2995 -8.599,-2.8663 8.599,5.7327 45.8612,17.198 47.2944,21.4974 2.8663,10.0322 -5.7327,25.797 1.4333,34.396 4.2994,2.8664 48.7276,-12.8985 50.1608,-14.3316 28.6632,-5.7327 8.599,5.7326 44.4281,18.6311 11.4653,2.8664 24.3637,-1.4331 35.8292,2.8664 15.7647,5.7326 25.7969,31.5296 42.9949,40.1286 20.0644,8.599 32.9628,14.3317 38.6954,20.0643 0,1.4332 1.4332,0 1.4332,0 2.8663,0 5.7327,-2.8663 7.1658,0 5.7327,10.0322 -2.8663,10.0322 10.0322,15.7649 4.2995,-4.2995 14.3316,-4.2995 15.7649,-10.0322 7.1657,-18.6312 -54.4604,-42.9949 -60.1931,-53.0271 -5.7327,-8.599 -1.4332,-21.4975 -7.1657,-30.0965 -4.2995,-5.7327 -14.3317,-4.2995 -21.4975,-7.1659 -30.0966,-18.6312 -48.7277,-53.0271 -74.5247,-74.5246 -8.599,-5.7327 -41.5618,-38.6955 -51.5939,-42.995 -4.2995,-1.4331 -10.0322,4.2995 -14.3317,1.4332 -7.1657,-7.1658 10.0322,-22.9307 10.0322,-25.7969 -1.4332,-5.7327 -8.599,-7.166 -12.8985,-11.4654 -11.4654,-17.198 -15.7649,-40.1287 -31.5296,-54.4602 -5.7327,-7.1659 -17.1981,-7.1659 -24.3639,-12.8986 -5.7327,-4.2995 -15.7647,-87.4231 15.7649,-85.9899 14.3316,0 38.6954,31.5297 51.5939,38.6955 l 11.4653,-1.4333 -11.4653,1.4333 c 17.198,-1.4333 14.3317,-28.6634 22.9307,-40.1287 15.7647,-18.6312 22.9306,4.2995 42.9949,0 5.7327,-1.4332 5.7327,-12.8985 11.4654,-17.1979 0,0 8.599,8.5989 32.9627,15.7647 2.8664,1.4332 7.1659,2.8664 11.4654,1.4332 2.8663,0 4.2995,-5.7327 8.599,-7.1658 17.198,-1.4332 55.8934,20.0643 74.5246,17.198 4.2995,0 8.5989,-2.8664 10.0322,-7.1659 4.2994,-2.8663 2.8662,-12.8985 8.5989,-12.8985 8.599,-1.433 14.3317,7.1659 22.9307,10.0322 15.7648,4.2995 -2.8663,-7.1658 5.7327,-10.0322 8.599,-2.8663 18.6312,-2.8663 27.2302,0 5.7325,1.4332 10.032,10.0322 15.7647,10.0322 4.2995,0 0,-10.0322 4.2995,-10.0322 32.9629,1.4332 24.3639,37.2624 40.1286,40.1287 10.0322,1.4332 18.6312,-1.4331 25.797,-4.2995 z"
+ class="europe"
+ id="hr" /><path
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 7430.2098,6546.371 c -14.3317,-10.0322 -14.3317,-20.0643 -30.0966,-18.6312 l 2.8664,-4.2995 -2.8664,4.2995 c -20.0643,22.9307 -17.198,55.8935 -22.9305,63.0593 -11.4655,14.3317 -15.7649,-7.1658 -20.0644,14.3317 -7.1658,41.5618 37.2623,42.9949 4.2995,74.5246 l 7.1659,-1.4331 1.433,22.9307 c -17.1979,-41.5619 -45.8613,-27.2302 -81.6904,-53.0273 -8.599,-7.1658 -11.4653,-20.0642 -21.4975,-22.9307 -7.1658,-2.8662 -15.7647,5.7327 -24.3637,5.7327 -4.2995,0 -14.3317,-1.433 -12.8985,-5.7327 2.8663,-5.7325 15.7647,-4.2995 17.198,-11.4652 7.1657,-18.6312 -54.4604,-42.9949 -60.1931,-53.0271 -5.7327,-8.599 -1.4332,-21.4975 -7.1657,-30.0965 -4.2995,-5.7327 -14.3317,-4.2995 -21.4975,-7.1659 -30.0966,-18.6312 -48.7277,-53.0271 -74.5247,-74.5246 -8.599,-5.7327 -41.5618,-38.6955 -51.5939,-42.995 -4.2995,-1.4331 -10.0322,4.2995 -14.3317,1.4332 -7.1657,-7.1658 10.0322,-22.9307 10.0322,-25.7969 -1.4332,-5.7327 -8.599,-7.166 -12.8985,-11.4654 -11.4654,-17.198 -15.7649,-40.1287 -31.5296,-54.4602 -5.7327,-7.1659 -17.1981,-7.1659 -24.3639,-12.8986 -5.7327,-4.2995 -15.7647,-87.4231 15.7649,-85.9899 14.3316,0 38.6954,31.5297 51.5939,38.6955 l 11.4653,-1.4333 -11.4653,1.4333 c 17.198,-1.4333 14.3317,-28.6634 22.9307,-40.1287 15.7647,-18.6312 22.9306,4.2995 42.9949,0 5.7327,-1.4332 5.7327,-12.8985 11.4654,-17.1979 0,0 8.599,8.5989 32.9627,15.7647 2.8664,1.4332 7.1659,2.8664 11.4654,1.4332 2.8663,0 4.2995,-5.7327 8.599,-7.1658 17.198,-1.4332 55.8934,20.0643 74.5246,17.198 4.2995,0 8.5989,-2.8664 10.0322,-7.1659 4.2994,-2.8663 2.8662,-12.8985 8.5989,-12.8985 8.599,-1.433 14.3317,7.1659 22.9307,10.0322 15.7648,4.2995 -2.8663,-7.1658 5.7327,-10.0322 8.599,-2.8663 18.6312,-2.8663 27.2302,0 5.7325,1.4332 10.032,10.0322 15.7647,10.0322 4.2995,0 0,-10.0322 4.2995,-10.0322 32.9629,1.4332 24.3639,37.2624 40.1286,40.1287 27.2302,2.8664 41.5619,-17.198 67.3588,-15.7648 0,44.4281 -25.7969,74.5246 -21.4974,101.7547 5.7327,31.5297 14.3317,8.599 34.3959,17.198 12.8985,5.7327 15.7649,24.3639 28.6634,31.5296 4.2995,1.4333 18.6312,-2.8662 14.3317,10.0322 -8.599,28.6634 -44.4282,-2.8662 -51.5941,7.1658 0,0 64.4925,60.193 47.2946,78.8242 -5.7327,4.2995 -12.8986,-10.0322 -20.0644,-7.1659 -8.599,2.8664 -10.0322,14.3317 -15.7648,21.4976 -10.0322,2.8663 -37.2623,-2.8664 -38.6955,4.2995 -4.2995,20.0642 31.5296,21.4974 20.0644,51.5939 h -5.7327 z"
+ class="europe"
+ id="ba" /><path
+ sodipodi:nodetypes="cccccccscscccccssssssccccccccccsccccc"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 7364.9738,6687.7722 2.8671,10.0257 c 7.1648,1.4322 12.8977,1.4322 20.0636,1.4322 -2.8659,2.8645 -5.7329,5.7289 -4.2988,10.0257 20.0636,44.3997 24.3636,2.8645 44.4273,12.8903 4.3,2.8645 1.4341,8.5935 4.3,12.8902 11.4659,14.3226 25.7966,11.4581 35.8295,27.2128 2.866,4.2967 0,12.8903 4.2989,17.187 8.5989,8.5936 20.0648,12.8902 31.5296,15.7549 0,-10.0259 0,-20.0516 0,-28.6452 0,-5.7291 2.867,-12.8903 0,-18.6193 -4.2989,-7.1611 -17.1978,-7.1611 -18.6307,-14.3223 0,-1.4323 45.8614,-94.5287 50.1614,-97.3932 1.4329,-1.4322 8.5988,34.3741 20.0636,35.8063 0,0 32.9682,-25.0655 32.9682,-25.0655 -3.0114,-15.0806 -0.01,-14.2809 -5.0926,-28.8088 -3.4107,-9.7457 8.0836,-4.1504 15.8967,-10.589 3.4356,-2.8306 1.7184,-7.223 -2.8023,-12.3987 -4.5968,-5.2613 29.5383,-5.5936 21.6127,-11.6552 -15.7205,-12.0245 -34.9289,-32.514 -50.2297,-39.624 -9.876,-4.5889 2.5088,-24.1417 -7.1227,-33.6155 -18.0348,-17.7407 -61.7911,-28.5418 -75.4553,-37.3262 -5.733,4.2967 -12.8989,-10.0258 -20.0648,-7.1613 -8.5989,2.8645 -10.0318,14.3225 -15.7648,21.4839 -10.0318,2.8644 -37.2625,-2.8646 -38.6955,4.2968 -4.2988,20.0513 31.5296,21.4836 20.0648,51.5609 h -5.7329 5.7329 c -14.3318,-10.0258 -14.3318,-20.0515 -30.0966,-18.6193 l 2.8659,-4.2968 -2.8659,4.2968 c -20.0648,22.9161 -17.1977,55.8578 -22.9307,63.0191 -11.4659,14.3225 -15.7648,-7.1613 -20.0648,14.3225 -7.1659,41.5353 37.2625,42.9675 4.3,74.477 l 7.1659,-1.4321 1.433,22.916 c -1.433,-4.2969 -2.8659,-7.1614 -5.733,-10.0257 z"
+ class="europe"
+ id="me" /><path
+ sodipodi:nodetypes="cccccccccccccccccccccccccsccscscccccscccccsccscccccsscccscccccccccsssscc"
+ id="rs"
+ class="europe"
+ d="m 7686.4663,6519.2109 c 23.8063,0 57.3844,75.0265 70.7747,82.4612 4.4642,2.9738 36.1762,20.6419 42.1279,22.1285 10.4161,2.9742 0.8486,18.3344 8.2882,25.769 19.3422,20.8174 -0.048,20.1553 -4.5124,40.9724 0,0 -0.6894,-10.1895 -0.6894,-10.1895 l -3.8636,7.7237 c 37.1977,25.2782 1.2506,-4.4095 10.1777,-10.3572 16.3669,-10.4087 -16.0594,3.392 3.2837,1.905 7.4397,0 -5.6552,-1.8498 -2.6786,-9.2845 1.4877,-5.9479 -8.861,18.6972 -7.3733,14.2362 13.3915,-32.7126 -18.3044,13.6139 9.965,9.1532 23.8064,-4.4609 87.7699,-44.8543 107.1133,-27.0108 7.4395,-13.3826 28.2694,-16.3564 20.8298,-35.6866 -1.4877,-5.9478 -5.9507,-8.9218 -10.4149,-11.8955 -2.9754,-1.4872 -7.4396,1.4869 -8.9273,-1.4872 -1.4876,-7.4346 0,-14.8694 0,-22.304 -1.4876,-8.9216 -11.9037,-17.8434 -7.4396,-25.2781 43.1486,-71.3733 -5.9518,16.3565 41.6609,-20.8173 4.4642,-4.4607 35.7102,-59.4778 26.7829,-68.3994 -11.9038,-8.9217 -68.4438,-35.6867 -71.4192,-38.6605 -17.8556,-14.8695 -46.1249,-77.3213 -35.7101,-99.6254 4.4642,-10.4087 20.8311,-8.9217 26.7818,-17.8433 4.4642,-10.4087 -1.4877,-23.7913 2.9764,-34.1998 -20.8308,-8.9217 -40.173,-22.3042 -37.1976,-43.1213 1.4875,-13.3827 50.5892,-14.8694 35.7101,-22.3043 -157.7173,-78.8081 -16.3668,-7.4347 -80.3476,29.739 -10.4149,7.4345 -16.3669,-19.3304 -26.7817,-23.7911 -7.4395,-4.4609 -17.8545,0 -25.2941,0 -8.9272,0 -17.8543,4.4607 -26.7817,1.487 -4.4641,-2.9741 -1.4888,-10.4088 -4.4641,-16.3566 -7.4396,-14.8692 -71.4192,8.9217 -35.7102,-16.3562 8.9284,-5.9478 31.2459,-11.8958 23.8064,-17.8434 -7.4384,-4.461 -22.3175,0 -25.2941,-8.9216 -1.4877,-8.9218 29.7583,-25.2782 8.9273,-37.1737 -28.2694,-16.3564 -84.8094,-8.9216 -104.1527,-43.1213 -4.4629,-7.4349 -4.4629,-43.1216 -4.4629,-52.0432 0,-1.4871 0,-2.974 0,-2.974 -4.4644,1.4869 -7.4396,10.4087 -10.4163,7.4347 -10.4149,-5.9478 -11.9026,-22.3041 -20.8298,-29.7387 -8.9272,-5.9479 -22.3186,-4.461 -31.246,-11.8957 -8.9271,-4.4608 -13.3913,-14.8693 -19.3432,-22.3041 -7.4395,0 -14.8792,-7.4349 -22.3186,-7.4349 -1.4877,0 -40.1733,11.8957 -41.661,11.8957 -25.294,-1.4869 2.9765,-23.7912 -31.2459,-1.4869 -16.3668,8.9215 -25.294,26.7649 -38.6854,37.1735 -13.3902,10.4086 -19.3422,-4.4609 -23.8063,0 -19.3422,22.3042 -20.83,23.7911 -32.7337,23.7911 l 1.4878,2.974 c 25.2951,35.6867 19.3431,26.7651 16.3667,60.9646 0,14.8696 31.246,-4.4608 29.7581,11.8958 -1.4875,8.9216 -11.9025,0 -13.3913,1.4867 -8.9273,8.9219 5.9519,11.8957 5.9519,16.3565 0,1.4871 -13.3903,4.4608 -5.9519,10.4086 17.8557,11.8955 41.6619,17.8434 62.4918,17.8434 4.4642,29.7388 -32.7336,0 -34.2212,7.4346 -1.4878,19.3305 -14.8793,26.7653 4.4643,46.0953 1.4875,1.487 1.4875,4.4609 0,5.9479 -5.9521,10.4085 -28.2707,2.9738 -14.8792,17.8434 14.8792,-4.4609 26.7816,-13.3825 43.1484,-11.8955 0,46.0951 -26.7817,77.321 -22.3186,105.5729 5.9518,32.7129 14.8791,8.9216 35.7101,17.8434 13.3915,5.9478 16.3669,25.278 29.7583,32.7128 4.4629,1.487 19.342,-2.9739 14.8792,10.4086 -8.9286,29.739 -46.1252,-2.9737 -53.5647,7.4346 0,0 66.9549,62.4518 49.1004,81.7821 34.9816,18.2199 17.4364,11.1863 71.9716,34.1526 18.5275,5.9612 1.2349,37.5971 17.6313,44.1048 25.9517,10.3007 17.4622,20.279 35.1904,29.6348 16.5342,8.7264 -17.2431,-14.8826 -6.899,-7.524 17.1235,12.1829 25.4817,-14.1028 22.4484,-6.1471 21.9102,3.6734 69.3821,-71.4706 67.4624,-63.2949 z"
+ style="display:inline;opacity:1;fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;enable-background:new" /><path
+ sodipodi:nodetypes="cscccsssscssssssssccssssssscc"
+ id="rs-km"
+ d="m 7673.2462,6767.2235 c 0,0 6.7207,-36.0036 -5.7605,-55.6855 -12.4812,-19.682 -49.4449,-24.9625 -49.4449,-24.9625 l -16.8017,-32.6432 -11.5211,-11.5212 c 0,0 -7.6808,-29.7629 -1.4402,-28.8028 3.1203,0.48 7.9963,-0.4574 10.7311,-4.1265 2.7347,-3.6691 4.4988,-10.0698 13.1004,-15.834 7.1812,-4.8123 24.1275,-13.0844 27.3667,-15.9534 8.1572,-7.2247 20.1065,-18.0991 20.1065,-18.0991 0,0 24.9298,-31.2167 27.431,-34.1702 6.0694,-7.1672 28.4299,28.5539 31.9115,30.2442 7.9103,3.8404 30.2146,48.4298 34.055,49.3899 3.8404,0.9601 43.1584,21.9904 46.0387,22.9505 2.8803,0.9601 6.7207,9.601 3.8404,12.4812 -2.8803,2.8803 13.9214,17.7618 12.4812,21.1221 -1.4401,3.3604 -0.9601,14.4015 -4.3204,16.8017 -3.3603,2.4002 4.7413,16.6833 0.9009,17.6434 -3.8403,0.9601 -14.8223,-7.5624 -14.8223,-7.5624 l -3.1828,-7.2598 c 0,0 -5.458,-6.1815 -13.6189,-0.901 -8.1608,5.2805 -17.2817,20.162 -14.8814,23.5223 2.4002,3.3604 8.1608,6.2406 6.2406,8.6409 -1.9202,2.4002 -8.1608,-9.1209 -20.6421,-10.081 -12.4812,-0.9601 -42.2441,12.9613 -44.6444,16.3216 -2.4002,3.3603 -6.2406,6.2406 -7.6807,8.1608 -1.4402,1.9202 -3.3604,21.6022 -3.3604,25.4425 0,3.8404 -4.3204,19.2019 -4.3204,19.2019 z"
+ style="fill:#fff7df;fill-opacity:1;fill-rule:evenodd;stroke:#aa805d;stroke-width:4.58365;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ class="europe" /><path
+ id="mk"
+ class="europe"
+ d="m 7669.5443,6768.5121 c -1.4331,10.0322 -2.8663,20.0644 -1.4331,28.6634 0,10.0322 8.599,18.6312 8.599,27.2301 -1.4332,4.2995 -12.8985,4.2995 -11.4654,8.599 1.4332,10.0322 15.7649,15.7649 17.1979,25.797 1.4332,4.2995 -7.1657,8.5989 -7.1657,12.8984 0,11.4654 37.2623,64.4926 42.9949,73.0915 8.5991,10.0322 14.3317,-5.7327 18.6311,-5.7327 5.7327,-1.433 12.8985,0 17.198,2.8665 2.8664,2.8662 -1.4331,10.0322 1.4332,10.0322 10.0322,1.433 106.0542,-28.6634 111.7869,-32.9629 15.7649,-17.198 4.2995,-40.1286 32.9629,-50.1608 10.0322,-4.2995 65.9256,2.8662 74.5246,-2.8663 4.2995,-2.8664 2.8664,-11.4654 7.1659,-14.3317 2.8663,-1.4332 7.1658,7.1658 10.032,4.2995 17.7081,-52.0544 30.3676,-46.6927 22.9307,-121.8191 -10.0322,-10.0322 -25.7969,-38.6954 -38.6954,-47.2944 -7.1659,-4.2995 -17.198,0 -25.797,-4.2995 -2.8664,-1.4332 -41.5618,-31.5297 -41.5618,-34.3961 -18.6312,-17.198 -64.4925,27.2302 -87.4232,31.5297 -27.2302,4.2994 -45.1333,-7.3084 -58.0318,24.2211 -1.4332,4.2997 10.7374,3.009 9.3042,8.7417 -2.8663,7.1658 -15.7648,-10.0322 -22.9307,-10.0322 -18.631,1.4332 -35.8291,14.3317 -51.5939,24.3639 -8.599,5.7326 11.4653,65.9256 -24.3639,41.5617 z"
+ style="display:inline;opacity:1;fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;enable-background:new"
+ sodipodi:nodetypes="cccccsccccccsscccscccccccc" /><path
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 7755.5383,6951.957 c 0,18.631 20.0644,24.3637 15.7649,41.5617 -14.3317,54.4603 -22.9307,7.1659 -32.9628,45.8613 0,0 -8.599,57.3266 -8.599,58.7598 -2.8663,4.2995 -47.2946,18.6312 -48.7276,28.6632 0,0 18.6311,28.6634 18.6311,28.6634 4.2995,12.8985 -15.7649,0 -15.7649,8.599 1.4332,37.2623 -14.3316,17.1979 -38.6954,21.4974 -1.4332,0 1.4331,1.4332 0,2.8665 -1.4332,1.433 -1.4332,1.433 -2.8664,2.8662 -1.4331,-1.4332 -1.4331,-2.8662 -2.8663,-5.7327 0,-2.8662 0,-5.7325 0,-8.5989 0,-8.599 4.2995,-15.7648 1.4332,-22.9307 -2.8664,-4.2995 -11.4654,0 -14.3317,-4.2995 -7.1657,-5.7326 -5.7327,-17.198 -11.4654,-22.9307 -10.032,-12.8984 -101.7547,-37.2622 -91.7225,-60.1929 4.2995,-10.0321 24.3639,1.4333 28.6634,-7.1657 1.433,-2.8664 -27.2302,-21.4976 -31.5297,-37.2624 -1.4332,-4.2995 5.7326,-5.7327 5.7326,-10.0322 1.4332,-5.7327 0,-12.8984 1.4332,-18.6311 0,-7.1658 -4.2995,-14.3317 0,-18.6312 2.8663,-5.7326 14.3317,-1.4331 18.6312,-5.7326 2.8663,-4.2995 0,-15.7649 -4.2995,-15.7649 -5.7327,1.4332 -1.4332,12.8985 -5.7327,17.198 -8.599,7.1659 0,-48.7276 1.4332,-63.0593 2.8663,-17.198 -21.4975,-8.599 -21.4975,-25.797 0,-12.8984 -1.4332,-25.7969 5.7326,-35.8291 4.2995,-5.7327 17.198,0 22.9307,-5.7327 2.8664,-2.8663 -7.1658,-4.2995 -8.599,-8.599 -1.4332,-10.032 8.599,-24.3637 1.4332,-31.5296 -8.599,-8.599 -22.9307,1.4332 -34.3961,-1.4331 0,-10.0322 0,-20.0644 0,-28.6634 0,-5.7327 2.8664,-12.8985 0,-18.6312 -4.2995,-7.1657 -17.198,-7.1657 -18.631,-14.3315 0,-1.4332 45.8612,-94.589 50.1607,-97.4554 1.4332,-1.433 8.5989,34.3961 20.0644,35.8292 0,0 30.0964,-24.3638 30.0964,-24.3638 22.9307,0 18.6312,35.8292 31.5296,42.9949 4.2995,2.8663 8.599,-2.8662 14.3317,-1.4332 10.0322,2.8665 20.0643,7.1659 27.2302,14.3317 27.2301,30.0966 7.1658,60.193 10.0322,90.2895 0,10.0322 8.599,18.6312 8.599,27.2301 -1.4332,4.2995 -12.8985,4.2995 -11.4654,8.599 1.4332,10.0322 15.7649,15.7649 17.1979,25.797 1.4332,4.2995 -7.1657,8.5989 -7.1657,12.8984 0,11.4654 37.2623,64.4926 42.9949,73.0915 8.5991,10.0322 14.3317,-5.7327 18.6311,-5.7327 5.7327,-1.433 12.8985,0 17.198,2.8665 2.8664,2.8662 -1.4331,10.0322 1.4332,10.0322 z"
+ class="europe"
+ id="al" /><path
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 3676.7488,2152.285 c -4.2995,-1.4331 -96.0221,-45.8614 -100.3216,-48.7276 -5.7326,-4.2995 12.8984,-10.0322 17.1979,-15.7648 4.2995,-7.1659 0,-28.6634 7.1659,-25.7971 11.4653,4.2995 4.2995,22.9307 11.4653,31.5297 1.4332,2.8664 2.8664,-7.1658 7.1659,-7.1658 11.4653,-1.4332 24.3638,8.599 34.396,4.2995 44.4281,-17.198 -14.3317,-32.9629 40.1286,-37.2624 10.0322,0 20.0644,7.1659 30.0964,8.599 7.1659,1.4332 -11.4652,-10.032 -17.1979,-12.8985 -2.8663,0 -5.7327,0 -8.599,0 -11.4653,-1.433 -22.9307,1.4332 -32.9629,-2.8662 -7.1658,-4.2995 17.1981,2.8662 22.9307,-2.8663 2.8664,-2.8664 -11.4653,-4.2997 -10.0321,-8.5991 0,-7.1658 5.7326,-12.8985 12.8985,-15.7648 4.2995,-1.4332 11.4653,2.8663 17.198,2.8663 10.0322,-1.4331 21.4974,-2.8663 30.0964,-10.0321 4.2995,-2.8664 -11.4653,-1.4332 -15.7647,-4.2995 -4.2995,-1.4332 -40.1287,15.7648 -50.1609,14.3316 -7.1659,-1.4331 4.2995,-15.7648 5.7327,-22.9307 0,-8.599 -5.7327,-15.7647 -4.2996,-24.3637 1.4332,-8.599 17.1981,-14.3317 14.3317,-24.3639 -1.4331,-5.7326 -14.3317,2.8664 -20.0643,0 -4.2995,-1.4331 -2.8664,-12.8985 -7.1659,-10.0321 -1.433,1.4331 4.2995,8.599 1.4332,7.1658 -11.4652,-5.7327 -22.9306,-24.3639 -32.9628,-31.5296 -1.4331,-2.8663 -5.7326,-1.4332 -8.599,-1.4332 -2.8663,0 -5.7326,4.2994 -7.1658,2.8664 -2.8663,-1.4332 -1.4332,-8.599 -5.7327,-10.0322 -5.7327,-2.8663 -84.5567,-2.8663 -27.2301,-30.0965 15.7649,-7.1659 12.8984,7.1658 27.2301,15.7648 12.8985,7.1659 32.9629,-11.4653 45.8614,-4.2995 5.7327,2.8663 -10.0322,14.3317 -4.2995,18.6312 4.2995,4.2995 7.1657,-8.599 12.8984,-10.0322 10.0322,-2.8663 21.4975,-8.599 30.0965,-2.8663 5.7327,5.7327 -2.8663,17.198 -1.4331,24.3637 0,4.2995 0,-7.1657 1.4331,-8.5989 7.1659,-8.599 114.6533,61.6262 77.391,0 -5.7327,-8.599 -20.0643,7.1659 -31.5297,5.7327 -12.8985,-1.4332 -22.9307,-17.198 -28.6634,-28.6634 0,0 1.4333,-1.4331 2.8665,-2.8663 15.7647,-11.4653 41.5618,-14.3317 58.7598,-15.7647 8.599,0 18.6311,8.5989 24.3637,1.433 11.4654,-10.0322 -42.9949,-5.7325 -41.5617,-21.4974 1.4331,-10.0322 28.6632,-5.7327 28.6632,-17.198 -1.4332,-67.3588 -50.1608,7.1658 -53.0271,-5.7327 -1.4332,-8.599 5.7327,-17.198 2.8663,-24.3637 -1.4331,-2.8665 -5.7326,5.7325 -8.599,5.7325 -2.8663,0 2.8664,-7.1657 0,-7.1657 -10.032,2.8662 -10.032,20.0642 -17.1979,1.4332 -1.4333,-1.4332 1.4332,-7.1659 0,-7.1659 -5.7327,4.2994 -5.7327,14.3316 -12.8985,15.7648 -4.2995,0 -2.8663,-10.0321 -7.1658,-11.4654 -8.599,-2.8662 -48.7277,17.198 -50.1608,-5.7325 0,-4.2997 7.1658,-4.2997 7.1658,-8.5991 -4.2995,-12.8985 -38.6955,-11.4653 -35.8292,-25.797 11.4654,-60.1929 45.8614,25.797 53.0271,21.4975 20.0644,-12.8985 -22.9306,-54.4602 5.7327,-54.4602 25.797,-1.4332 8.599,96.022 41.5619,51.5939 4.2995,-5.7327 -17.198,-12.8985 -11.4654,-17.198 5.7327,-7.1659 21.4976,8.599 28.6633,1.4332 4.2995,-7.1659 -18.6311,0 -24.3638,-5.7327 -8.599,-8.599 -11.4653,-21.4974 -12.8985,-32.9628 -5.7326,-48.7276 27.2301,44.4281 40.1286,30.0964 4.2995,-4.2995 -44.4281,-42.9949 -22.9307,-53.0271 10.0322,-4.2995 17.1982,22.9307 27.2302,18.6312 5.7327,-4.2995 -27.2302,-50.1609 14.3317,-35.8292 34.3959,12.8985 -4.2995,73.0915 34.3959,97.4553 0,1.4332 24.3639,-10.0321 25.7971,-38.6955 0,-5.7327 -8.599,-2.8662 -11.4654,-7.1657 -4.2995,-4.2995 -20.0642,-31.5297 -14.3317,-40.1287 10.0322,-11.4654 30.0966,10.0321 44.4283,17.198 4.2995,1.4331 -12.8986,-2.8664 -12.8986,-7.1659 -1.4331,-4.2995 7.1659,-2.8663 10.0322,-4.2995 1.4332,-1.4331 1.4332,-4.2995 0,-4.2995 -18.6312,1.4332 -17.198,30.0966 -38.6955,-17.198 -18.6311,-41.5618 21.4975,-10.0322 22.9307,-10.0322 0,0 1.4331,-1.433 1.4331,-2.8662 0,-2.8663 -2.8663,-8.599 0,-7.1658 4.2995,4.2995 4.2995,12.8985 10.0322,17.198 5.7327,4.2995 15.7649,2.8662 21.4974,7.1657 14.3317,11.4654 -7.1657,25.797 -5.7325,32.9629 0,2.8663 7.1657,0 10.032,1.4331 1.4332,1.4332 11.4654,10.0322 8.599,15.7649 -2.8663,1.4332 -10.032,0 -8.599,2.8662 2.8664,5.7327 14.3317,4.2995 14.3317,11.4654 1.4332,10.0322 -12.8985,20.0643 -10.0322,30.0965 2.8664,8.599 24.3639,2.8663 22.9307,11.4652 0,8.5992 -21.4975,-5.7325 -24.3638,1.4333 -1.4332,7.1659 64.4924,35.8291 -1.4332,45.8613 -11.4652,2.8663 -15.7647,-17.198 -27.2301,-21.4975 -4.2995,-1.4332 1.4332,8.599 4.2995,12.8985 2.8664,11.4653 15.7649,21.4975 12.8984,31.5297 -2.8662,11.4652 -24.3637,11.4652 -25.7969,22.9306 -2.8663,7.1658 17.198,2.8663 18.6312,10.0321 2.8663,7.1659 -8.599,14.3317 -11.4654,21.4976 -2.8663,8.599 -12.8985,25.7969 -4.2995,27.2301 30.0966,5.7326 28.6633,-54.4603 47.2945,-64.4925 58.7598,-31.5296 18.6312,8.599 17.198,14.3317 -8.599,35.8292 34.3959,-2.8664 37.2623,-5.7327 18.6312,-20.0642 11.4653,-77.391 25.797,-75.9578 50.1608,4.2995 5.7327,67.3588 34.3959,90.2895 22.9307,20.0642 10.0322,-25.797 15.7649,-37.2624 1.4331,-7.1657 7.1658,-15.7647 14.3317,-18.6311 4.2995,-1.4331 10.0321,1.4332 15.7648,4.2995 1.4332,1.4332 1.4332,5.7327 2.8662,5.7327 11.4654,-2.8663 22.9307,-18.6312 32.9629,-12.8985 10.0322,4.2995 8.599,20.0642 10.0322,31.5296 0,7.1658 -8.599,11.4653 -7.1659,18.6312 7.1659,35.8292 24.3639,-25.7969 14.3317,27.2302 -4.2995,30.0964 -14.3317,14.3315 -7.1658,41.5617 11.4653,48.7277 11.4653,-93.1558 25.7969,-96.022 37.2624,-10.0322 28.6634,51.5939 31.5297,65.9255 0,2.8663 0,-7.1657 2.8663,-8.5989 1.4332,-1.4333 7.1659,0 5.7327,-1.4333 -8.599,-18.631 2.8663,8.599 2.8663,8.599 1.4332,0 1.4332,-4.2995 2.8664,-5.7325 7.1657,-11.4654 21.4974,-31.5297 37.2622,-32.9629 15.7649,-1.4332 14.3317,31.5297 27.2301,40.1286 5.7327,2.8663 -2.8662,-12.8984 1.4333,-17.1979 8.5989,-10.0322 14.3316,12.8984 14.3316,12.8984 1.4333,2.8663 -1.4332,-7.1657 0,-10.0321 2.8663,-4.2995 10.0322,-7.1658 11.4653,-12.8985 2.8664,-5.7327 0,-12.8985 0,-20.0643 1.4332,-8.599 0,-20.0644 7.1659,-24.3638 10.0321,-4.2995 20.0643,2.8662 30.0965,5.7327 25.7969,5.7327 4.2995,17.1979 7.1657,27.2301 2.8665,5.7326 11.4654,4.2995 14.3317,8.599 10.0322,21.4975 -42.9949,27.2302 4.2995,53.0271 5.7327,2.8663 5.7327,-12.8985 11.4654,-15.7647 5.7326,-2.8665 12.8985,2.8662 18.6312,0 12.8985,-4.2997 27.23,-35.8292 45.8612,-1.4333 2.8664,5.7327 -12.8985,2.8663 -20.0643,4.2995 -21.4974,4.2995 -30.0965,1.4332 -44.4281,24.3638 -1.4332,2.8664 7.1658,2.8664 7.1658,5.7327 1.4332,4.2995 -7.1658,7.1659 -4.2995,8.599 7.1658,5.7327 20.0644,1.4332 27.2302,7.1659 22.9306,17.1979 -31.5297,48.7276 -34.396,51.5939 -2.8664,1.4332 5.7326,-4.2995 10.0321,-2.8663 10.0322,2.8663 20.0644,10.0322 28.6633,17.1979 1.4333,1.4333 -7.1657,1.4333 -7.1657,4.2995 0,4.2995 7.1657,8.599 7.1657,12.8985 0,2.8663 -5.7327,-1.4332 -7.1657,0 -10.0322,5.7327 -37.2624,17.198 -27.2302,21.4975 12.8985,4.2995 24.3637,-27.2302 34.3959,-18.6312 4.2995,5.7327 8.599,11.4654 14.3317,15.7649 2.8663,2.8663 8.599,-2.8663 10.0322,1.4332 7.1658,12.8985 14.3316,37.2622 -2.8664,48.7276 -8.599,5.7326 -21.4975,4.2995 -30.0964,8.599 -4.2995,2.8663 -10.0322,8.599 -7.1658,11.4653 4.2995,4.2995 78.824,12.8984 20.0642,47.2945 -12.8984,7.1658 -45.8613,-22.9307 -45.8613,-24.3639 -10.0321,-12.8984 45.8613,22.9307 31.5296,35.8292 -7.1657,5.7327 -18.6311,-14.3317 -25.7969,-8.599 -5.7327,4.2995 14.3317,8.599 17.198,15.7649 1.4332,2.8663 -5.7327,5.7325 -8.599,7.1658 -12.8985,5.7327 -30.0965,21.4974 -40.1286,11.4652 -7.1658,-7.1657 -5.7328,-35.8291 -12.8985,-28.6632 -7.1658,8.599 15.7647,21.4975 10.0322,31.5296 -4.2995,8.599 -22.9307,-1.4332 -30.0966,5.7326 -8.599,7.1659 -2.8663,24.3639 -10.0321,32.9629 -2.8664,4.2995 -11.4654,-4.2995 -15.7649,-2.8663 -10.0322,2.8663 -15.7647,15.7647 -25.7969,17.198 -8.599,1.4332 -4.2995,-35.8292 -27.2302,-41.5619 -7.1657,-1.4332 1.4332,15.7649 -2.8662,22.9307 -1.4333,2.8663 -7.166,-2.8663 -10.0322,0 -1.4333,0 5.7327,4.2995 4.2995,4.2995 -38.6955,7.1657 -17.198,-2.8663 -53.0272,2.8662 -18.6311,2.8665 -34.396,18.6312 -53.0271,25.7971 -2.8664,1.4331 -8.5989,2.8663 -11.4654,1.4331 -10.0322,-4.2995 -12.8984,-20.0642 -22.9306,-20.0642 -8.599,1.4332 -5.7326,20.0642 -12.8985,22.9306 -5.7327,1.4331 -7.1658,-10.0322 -12.8985,-12.8984 -8.599,-2.8665 -40.1286,-4.2995 -51.5939,-8.599 -20.0644,-5.7327 -21.4976,28.6632 -25.7971,32.9627 -10.032,8.599 -63.0593,2.8664 -73.0913,-1.4332 -25.7971,-8.599 -47.2946,-50.1607 -60.193,-63.0592 -18.6312,-15.7649 -34.396,-2.8664 -44.4282,-31.5296 -1.4332,-7.1659 -8.599,-15.7649 -5.7327,-22.9307 2.8664,-10.0322 30.0966,-14.3317 21.4975,-18.6312 -8.599,-4.2995 -15.7648,22.9307 -22.9305,17.198 -8.599,-7.1658 10.032,-22.9307 4.2994,-32.9629 -2.8664,-5.7325 -10.0321,12.8986 -15.7648,10.0322 -10.0322,-5.7327 -10.0322,-20.0642 -18.6312,-27.2301 -4.2995,-4.2995 -10.0321,-2.8663 -15.7648,-4.2995 z"
+ class="europe"
+ id="is" /><path
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 7768.4368,4911.1289 c 17.198,-4.2995 -17.198,-17.1979 5.7327,-24.3637 7.1658,-2.8664 17.198,-2.8664 25.7969,-1.4332 2.8665,0 2.8665,7.1657 7.166,8.599 14.3315,4.2994 34.3959,-63.0593 40.1286,-67.3588 11.4653,-5.7327 25.7969,-2.8663 37.2622,-7.1658 17.198,-7.1659 30.0966,-21.4976 48.7276,-27.2302 7.1659,-1.4332 14.3317,1.4331 21.4976,1.4331 7.1658,0 14.3316,0 21.4975,0 21.4974,-2.8663 41.5618,-15.7648 61.6261,-14.3315 4.2995,0 5.7327,5.7325 10.0322,7.1657 35.8291,4.2995 80.2572,0 113.2201,-8.599 15.7647,-4.2994 4.2995,10.0322 12.8985,17.198 2.8662,1.4332 8.5989,-5.7327 11.4652,-2.8663 2.8663,2.8663 -5.7327,11.4653 -1.4332,12.8985 35.8292,14.3317 10.0322,-8.599 27.2302,-12.8985 57.3267,-15.7649 5.7327,8.599 24.3639,18.6312 2.8662,2.8663 7.1657,7.1658 8.5989,4.2995 7.1658,-4.2995 0,-30.0966 7.1658,-30.0966 7.1659,-1.4331 20.0644,11.4654 28.6634,1.4332 5.7327,-5.7327 5.7327,-27.2301 14.3317,-22.9306 12.8984,8.5989 -18.6312,21.4974 17.1979,21.4974 12.8985,0 5.7327,-28.6632 25.797,-14.3315 37.2623,25.7969 -7.1658,17.1979 22.9306,24.3637 8.599,1.4332 -2.8662,-20.0642 2.8663,-27.2302 8.5992,-11.4652 21.4976,-31.5296 32.9629,-25.7969 11.4654,5.7327 22.9307,45.8613 34.3959,42.9949 20.0644,-5.7325 7.1659,-30.0964 30.0966,-35.8291 8.599,-1.4331 15.7648,8.599 22.9307,7.1659 47.2944,-8.599 -31.5297,-24.3639 34.3959,-20.0644 32.9629,2.8664 15.7648,38.6956 53.0271,30.0966 35.8291,-7.1659 -21.4974,-45.8614 -21.4974,-61.6263 0,-11.4652 2.8662,-38.6954 4.2994,-48.7276 7.1658,-40.1286 17.198,-54.4603 22.9307,-55.8934 10.0322,-2.8664 21.4975,1.4331 30.0964,-2.8664 5.7328,-2.8663 2.8663,-12.8985 8.599,-15.7647 12.8985,-8.599 31.5297,-7.1659 47.2946,-11.4654 -4.2995,-2.8663 -1.4332,-8.599 -4.2995,-12.8985 0,0 -30.0966,-18.6312 -30.0966,-20.0643 -1.4331,-2.8664 4.2995,-7.1659 2.8664,-10.0322 -4.2995,-10.0321 -14.3317,-15.7648 -15.7649,-24.3638 -1.4332,-4.2995 7.1659,-5.7326 7.1659,-10.0321 -2.8664,-10.0322 -22.9306,-10.0322 -24.3638,-21.4976 -1.4332,-4.2995 7.1657,-5.7325 8.5989,-10.032 4.2995,-17.198 -47.2944,-27.2302 -51.5938,-38.6956 -5.7327,-11.4653 4.2994,-25.7969 2.8662,-38.6954 0,-22.9307 68.792,7.1658 87.4231,-4.2995 12.8986,-7.1658 27.2301,-34.3959 25.7971,-48.7276 0,-1.4332 -5.7327,0 -4.2995,-1.4332 7.1657,-7.1658 20.0642,-10.0322 24.3637,-18.6312 4.2995,-5.7326 0,-18.6312 -5.7327,-21.4975 -24.3637,-8.599 -27.23,1.4332 -40.1286,-12.8984 -4.2995,-5.7327 10.0322,-25.797 -5.7326,-24.3639 -17.198,1.4332 -25.7971,-4.2995 -50.1608,2.8664 -8.599,2.8663 -17.198,11.4653 -25.797,8.599 -7.1659,-2.8664 5.7326,-42.9951 -7.1659,-51.5941 -4.2995,-2.8662 -48.7276,-2.8662 -63.0593,-12.8984 -22.9306,-14.3317 -8.599,-28.6633 -41.5617,-38.6955 -5.7327,-2.8662 8.599,-27.2301 2.8663,-28.6633 -20.0644,0 -27.2302,-1.4331 -50.1608,-17.198 -10.0322,-5.7327 8.599,-35.8292 5.7327,-41.5618 -8.599,-12.8985 11.4652,-2.8663 5.7327,-11.4653 -4.2995,-7.1658 -38.6956,-34.3959 -37.2624,-41.5618 5.7327,-20.0643 8.599,-34.396 -2.8663,-54.4604 -2.8664,-5.7325 -11.4654,5.7327 -17.1981,5.7327 -1.433,0 -47.2944,-28.6632 -47.2944,-28.6632 -35.8291,-14.3317 -10.0322,-2.8664 -30.0964,5.7326 -2.8664,1.4332 -20.0644,-1.4331 -24.3639,2.8664 -7.1658,10.032 -18.6312,37.2622 -30.0964,42.9949 -22.9307,11.4653 -21.4975,-47.2944 -21.4975,-47.2944 -44.4281,-10.0322 -35.8291,-4.2995 -65.9257,18.631 -7.1658,5.7327 -12.8985,-14.3315 -20.0643,-20.0642 -24.3638,-17.198 -17.1979,30.0964 -53.0271,1.4332 0,1.4331 -27.2301,22.9305 -30.0965,31.5297 -2.8663,4.2994 -10.0321,47.2944 -10.0321,47.2944 -7.1659,5.7327 -18.6312,-2.8663 -27.2302,0 -2.8664,1.4332 0,11.4652 -4.2994,11.4652 -5.7327,0 -10.0322,-8.599 -17.198,-8.599 -18.6312,-1.433 -21.4976,40.1287 -45.8613,45.8614 v 1.4332 c 8.5989,21.4974 -1.4333,40.1286 -2.8665,61.6261 -1.433,12.8984 45.8614,-12.8985 40.1287,7.1657 -1.4331,4.2995 -8.599,4.2995 -11.4653,8.599 -1.4332,5.7327 4.2995,14.3317 0,20.0644 -8.599,10.0322 -30.0964,-4.2995 -37.2624,5.7327 -5.7325,10.0321 1.4333,24.3638 -5.7325,32.9627 -27.2302,42.9951 -14.3317,-12.8984 -31.5297,40.1287 0,2.8664 -5.7327,2.8664 -5.7327,4.2995 0,0 12.8985,40.1286 12.8985,40.1286 0,1.4332 -14.3317,41.5618 -12.8985,47.2945 0,5.7327 44.4282,-2.8662 31.5297,28.6634 -2.8663,7.1658 -31.5297,17.198 -30.0965,4.2995 0,-4.2995 7.1658,-7.1659 5.7326,-11.4654 -2.8663,-18.6312 -35.8291,-2.8663 -40.1286,2.8663 -15.7648,15.7649 15.7649,14.3317 -7.1658,27.2301 -10.0322,4.2995 -24.3639,1.4333 -31.5297,10.0322 -5.7327,5.7327 14.3317,21.4975 7.1658,24.3639 -7.1658,1.4331 -15.7647,-2.8664 -22.9306,1.4331 -8.599,5.7327 -10.0321,20.0644 -18.6311,25.7971 -12.8986,11.4652 -18.6312,-14.3317 -30.0966,-10.0322 -11.4652,5.7327 -53.0271,28.6632 -70.225,17.1979 25.7969,73.0915 88.8562,140.4503 93.1557,219.2744 0,2.8663 -2.8663,5.7327 -4.2995,7.1658 -10.0322,10.0322 -100.3215,85.9899 -58.7598,101.7548 2.8664,1.4331 5.7327,-5.7327 8.599,-4.2995 12.8985,1.4331 27.2301,5.7326 38.6955,14.3317 28.6633,22.9305 -1.4332,71.6583 10.0321,97.4553 1.4332,4.2994 5.7327,8.5989 8.5991,12.8984 z"
+ class="europe"
+ id="by" /><path
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 6904.2379,1713.7363 v 0 m 14.3317,4.2995 c 1.4332,0 1.4332,0 1.4332,1.4332 m 232.1728,243.6381 h -1.4332 m 0,1.4332 v 0 m 378.3558,-543.1699 c 8.599,11.4654 28.6632,38.6956 11.4653,44.4282 -17.198,5.7327 -61.6261,-17.198 -47.2944,-4.2995 27.2301,22.9306 -27.2302,55.8935 -34.3961,73.0915 0,1.4332 17.1981,63.0593 -2.8663,55.8935 -54.4603,-21.4976 10.0322,-57.3267 -8.599,-88.8564 -28.6633,-50.1607 -73.0915,-31.5295 -110.3537,-71.6583 l -1.4332,-7.1657 c -1.4332,0 -2.8663,0 -4.2995,1.4332 0,-1.4332 -1.4332,-1.4332 -1.4332,-2.8665 v 2.8665 c -28.6632,5.7325 -22.9307,38.6954 -47.2944,45.8613 -21.4975,5.7326 -12.8985,-24.3639 -37.2624,2.8663 -2.8662,4.2995 0,11.4652 -1.4332,17.1979 -1.433,1.4333 -17.1979,31.5297 -17.1979,32.9629 -4.2995,11.4653 4.2995,48.7276 5.7327,58.7598 0,4.2995 -2.8663,7.1658 -2.8663,11.4653 0,8.599 1.4331,15.7647 2.8663,24.3639 4.2995,11.4652 14.3317,20.0642 15.7647,31.5296 7.1659,50.1607 -5.7325,15.7648 -22.9305,31.5295 -20.0644,20.0644 -1.4332,25.7971 -7.1659,50.1608 -1.4332,5.7328 -7.1658,8.599 -8.599,14.3317 0,1.4332 -18.6312,-15.7647 -21.4975,-17.1979 -4.2994,-2.8663 -57.3265,-21.4975 -61.626,-15.7649 -5.7327,5.7327 -1.4333,17.1981 -5.7327,22.9306 -17.198,30.0966 -40.1287,11.4654 -64.4926,15.7649 -7.1657,0 -17.1979,7.1658 -22.9306,2.8663 -7.1658,-5.7327 -4.2995,-17.1979 -8.599,-24.3637 -10.0321,-17.1981 -42.9949,-61.6263 -60.1929,-71.6583 -57.3266,-32.9629 -31.5296,53.0271 -31.5296,53.0271 -8.599,1.4331 -15.7649,-8.599 -24.3639,-8.599 -4.2995,0 -11.4653,4.2995 -10.0322,7.1658 1.4332,1.4332 2.8664,2.8663 4.2996,2.8663 h -2.8664 c -11.4653,2.8664 -27.2302,-4.2995 -32.9627,5.7327 -4.2997,7.1659 14.3315,11.4654 18.631,18.6312 4.2995,8.5989 7.1659,18.6311 7.1659,28.6633 0,17.198 -24.3638,30.0965 -20.0644,47.2944 1.4333,12.8985 51.5941,10.0322 4.2995,40.1287 -12.8984,8.5989 -111.7869,-40.1287 -131.8511,-14.3317 -8.599,11.4654 27.2301,93.1557 -1.4332,104.6211 l -45.8614,-20.0644 c -8.599,0 -35.8291,50.1609 -37.2622,61.6263 -2.8664,15.7647 -2.8664,35.8291 -14.3317,50.1607 -8.599,10.0321 -24.3639,-5.7326 -20.0644,20.0643 5.7327,31.5297 42.9951,34.396 27.2302,73.0915 -8.599,24.3638 -55.8934,80.2573 -64.4924,106.0543 -2.8664,12.8984 15.7648,24.3638 11.4653,37.2623 l -31.5297,27.2302 c -11.4652,5.7325 -34.3959,-7.166 -40.1286,5.7325 l 14.3317,55.8936 c 0,0 -7.1659,42.9949 -7.1659,44.4281 l 4.2995,53.0271 c -1.4331,5.7327 -8.599,7.1658 -10.0321,12.8985 -12.8985,38.6955 -32.9628,78.8242 -45.8613,118.9528 -8.599,25.7969 51.5939,11.4653 41.5618,81.6903 -10.0322,67.3588 -48.7276,0 -107.4874,37.2624 -18.6312,11.4652 -50.1608,60.193 -54.4603,83.1235 -1.4332,7.1659 7.1658,12.8986 5.7327,18.6312 -1.4332,15.7649 -21.4976,25.7971 -21.4976,41.5619 0,173.413 21.4976,-127.5517 21.4976,45.8613 0,8.599 -10.0322,14.3317 -10.0322,22.9307 -1.4332,10.032 4.2995,18.6311 5.7327,28.6632 0,8.599 -7.1659,18.6312 -5.7327,27.2301 1.4331,21.4975 24.3637,40.1287 27.2301,61.6261 2.8663,31.5297 -20.0643,71.6583 -12.8984,101.7549 8.599,32.9627 63.0593,30.0964 68.7918,65.9256 l -15.7647,57.3266 c -11.4654,10.0322 -40.1287,2.8664 -38.6956,17.1979 7.1659,61.6263 44.4281,45.8614 28.6634,127.5519 l 1.4332,41.5618 c -12.8985,32.9627 -58.7598,35.8291 -61.6262,45.8612 -1.4331,2.8664 5.7327,4.2995 5.7327,8.599 2.8664,5.7327 5.7327,12.8986 2.8664,18.6312 -4.2996,8.5989 -18.6312,10.0322 -21.4976,20.0643 -8.599,25.797 31.5296,83.1236 0,127.5517 -12.8985,18.6312 -18.6312,4.2995 -22.9307,-10.032 1.4332,0 1.4332,0 2.8664,-1.4332 5.7327,-4.2995 -2.8664,-15.7649 -7.1659,-21.4975 -30.0964,-47.2946 -14.3315,22.9307 -61.6261,-21.4976 -4.2994,-4.2995 4.2995,-12.8985 4.2995,-18.631 0,-8.599 -8.5989,0 -8.5989,0 -8.599,-12.8985 -5.7328,-34.3961 -2.8663,-31.5297 0,-2.8664 -1.4332,-4.2995 -1.4332,-5.7327 -2.8663,-14.3317 -7.1658,-27.2301 -10.0322,-41.5618 -1.4331,-8.599 11.4654,-27.2302 1.4332,-27.2302 -35.8292,0 25.7969,44.4281 -10.0322,68.792 -1.4331,0 -2.8663,-1.4332 -2.8663,-2.8663 -1.4332,-8.599 2.8663,-18.6311 0,-25.7971 -4.2995,-7.1657 -18.6312,-20.0642 -20.0644,-12.8984 -1.4331,11.4654 12.8985,18.6311 17.1981,28.6633 2.8663,5.7327 -5.7327,18.6312 -2.8664,25.797 11.4654,30.0964 20.0644,14.3317 11.4654,34.3959 0,1.4332 0,5.7327 -2.8664,5.7327 -2.8663,0 -5.7326,-8.599 -8.599,-5.7327 -10.0322,18.6312 2.8664,42.9951 -8.599,42.9951 -5.7327,0 1.4332,-18.6312 -2.8663,-15.7649 -24.3638,15.7649 21.4975,31.5296 -38.6955,31.5296 -7.1658,0 0,-14.3317 -5.7326,-18.6312 -7.1659,-4.2994 -20.0644,-20.0642 -24.3639,-12.8984 -4.2995,10.0322 14.3317,15.7649 18.6312,25.7971 1.4332,4.2995 -37.2623,7.1657 -41.5618,21.4974 -1.4331,5.7326 14.3317,11.4653 10.0322,15.7648 -7.1658,8.599 -25.797,1.4332 -32.9629,8.599 -4.2995,5.7327 14.3317,7.1659 12.8985,12.8984 -8.599,58.7598 -20.0643,-17.1979 -27.23,12.8986 -1.4333,2.8663 4.2994,5.7326 2.8662,8.599 -7.1659,10.0321 -44.4281,54.4602 -45.8613,55.8934 -2.8663,2.8664 -7.1658,-5.7327 -10.0322,-2.8663 -8.599,7.1658 -7.1658,25.797 -18.631,27.2302 -8.5992,2.8663 -10.0322,-21.4975 -20.0644,-18.6312 -10.0322,2.8663 -5.7327,21.4975 -12.8985,27.2302 -5.7327,4.2995 -15.7649,-2.8664 -21.4974,0 -4.2995,1.4331 -5.7328,7.1658 -10.0322,8.599 -14.3317,8.5989 -10.0322,-4.2995 -30.0965,-4.2995 -10.0322,0 -21.4976,15.7647 -27.2301,8.599 -5.7327,-7.1658 18.6311,-12.8985 15.7647,-21.4975 -4.2995,-7.1659 -12.8985,11.4653 -21.4974,11.4653 -11.4653,1.4332 -22.9307,-2.8663 -34.396,-7.1658 -24.3639,-11.4654 22.9307,-27.2302 27.2302,-37.2624 1.4331,-5.7327 -8.599,-11.4652 -14.3317,-10.0322 -5.7327,1.4333 -4.2995,14.3317 -11.4654,15.7649 -8.599,1.4331 -17.198,-4.2995 -25.797,-8.5989 -17.1979,-7.166 -27.2301,-32.9629 -35.8291,-38.6956 -4.2995,-4.2995 -12.8985,-1.4331 -18.6312,-4.2995 -10.032,-5.7326 -27.2301,-42.9949 -25.7969,-53.0271 0,-8.599 10.0322,-14.3317 12.8985,-24.3637 1.4332,-8.599 -10.0322,-30.0966 0,-27.2302 11.4654,2.8663 2.8664,27.2302 14.3316,31.5296 5.7327,4.2995 7.1658,-14.3316 14.3317,-17.1981 2.8663,-2.8662 5.7326,0 8.599,2.8665 -2.8664,-7.166 -4.2995,-14.3317 -7.1659,-21.4975 -1.4331,-10.0322 20.0644,-7.1659 25.7971,-14.3317 2.8663,-2.8664 -12.8985,0 -11.4654,-4.2995 2.8664,-7.1659 10.0322,-11.4654 17.1979,-14.3317 8.599,-5.7327 25.7971,-1.4332 30.0966,-11.4652 5.7326,-12.8986 -34.396,5.7325 -42.995,-2.8664 -5.7326,7.1659 -8.599,7.1659 -8.599,-5.7327 1.4332,-11.4653 25.7969,-14.3316 22.9307,-24.3638 -4.2995,-11.4654 -21.4975,-14.3317 -32.9629,-11.4654 -18.631,5.7327 -11.4653,50.1608 -30.0964,48.7278 -10.0322,0 -2.8663,-18.6312 -7.1658,-25.7971 -2.8664,-4.2995 -8.599,-7.1658 -14.3317,-10.0321 0,0 0,1.4331 1.4332,1.4331 -1.4332,0 -1.4332,0 -2.8664,1.4332 0,-1.4332 1.4332,-2.8663 1.4332,-2.8663 -4.2995,-2.8664 -8.599,-5.7327 -8.599,-10.0322 0,-7.1659 17.198,5.7327 22.9307,1.4332 8.599,-7.1659 5.7325,-25.797 15.7647,-30.0965 7.1659,-4.2995 11.4654,11.4654 18.6312,12.8984 2.8663,1.4333 -1.4332,-7.1657 1.4332,-8.5989 2.8663,-2.8663 7.1658,1.4332 10.0322,0 5.7326,-1.4331 -14.3317,-1.4331 -12.8986,-7.1658 0,-1.4332 58.7598,-27.2302 54.4603,-27.2302 -45.8613,-2.8663 -17.1979,35.8292 -61.6261,-4.2995 -1.4332,-1.4332 7.1658,0 8.599,-2.8662 2.8663,-2.8665 0,-10.0322 4.2995,-11.4655 5.7327,-4.2994 12.8985,1.4333 18.6312,-2.8662 2.8663,-1.4332 -1.4332,-5.7327 -1.4332,-8.599 2.8664,-5.7327 5.7327,-10.0322 8.599,-12.8985 7.1659,-4.2995 22.9306,0 24.3638,-7.1659 1.4332,-8.599 -18.6311,-7.1658 -18.6311,-14.3317 -1.4333,-2.8663 1.4332,-7.1658 4.2994,-11.4652 -2.8662,0 -7.1657,-7.1658 -10.0321,-4.2995 -7.1658,4.2995 -11.4653,11.4652 -15.7648,17.1979 -5.7327,11.4653 -2.8663,25.797 -11.4654,34.396 -4.2995,4.2994 -2.8663,-11.4653 -4.2995,-15.7648 -8.599,-15.7649 -15.7648,-11.4654 -10.0321,-25.7969 5.7326,-11.4655 28.6633,-37.2624 15.7648,-34.3961 -14.3317,4.2995 -24.3637,67.3588 -41.5618,35.8291 -4.2995,-10.032 -8.599,-21.4974 -11.4653,-32.9627 -1.4332,-11.4654 20.0642,0 45.8613,-8.599 5.7326,-1.4332 8.599,-7.1659 10.0321,-14.3317 -10.0321,10.0322 -28.6632,-11.4654 -28.6632,-17.1979 0,-12.8985 20.0642,-15.7649 31.5296,-21.4976 -2.8664,-15.7648 -15.7649,-1.4331 -27.2302,11.4654 0,0 -1.4332,0 -1.4332,-1.4332 -1.433,-1.4331 -2.8662,-4.2995 -5.7325,-7.1658 4.2995,4.2995 5.7325,10.0322 7.1657,8.599 -7.1657,7.1657 -12.8984,12.8984 -17.1979,14.3317 -7.1659,0 -4.2995,-14.3317 -7.1659,-20.0644 -1.4331,-2.8663 -27.2302,-28.6633 -20.0643,-30.0965 10.0322,0 18.6312,8.599 27.2302,15.7648 0,-1.4331 -1.4332,-4.2995 0,-7.1658 2.8663,-10.0322 20.0642,-10.0322 28.6632,-17.198 1.4332,-1.4332 -1.4331,-7.1659 -4.2995,-5.7327 -11.4652,1.4333 -30.0964,15.7649 -40.1286,10.0322 -12.8985,-7.1659 -2.8663,-40.1286 4.2995,-44.4281 10.0322,-7.1659 21.4976,14.3317 34.396,14.3317 1.4331,1.4331 30.0965,-32.9629 61.6261,-17.1981 10.0322,4.2995 11.4653,18.6312 21.4975,22.9307 10.0322,4.2995 -8.599,-21.4975 24.3639,-30.0965 41.5617,-11.4652 -1.4332,61.6261 42.9949,58.7598 27.2301,-2.8662 -10.0322,-25.7969 -8.599,-44.4281 1.4332,-20.0644 74.5246,27.2302 64.4925,-22.9307 -1.4332,-10.0322 -20.0644,8.599 -28.6634,5.7327 -5.7327,-1.4332 -7.1657,-10.0322 -7.1657,-15.7649 0,-15.7647 40.1286,-31.5296 25.7969,-37.2623 -35.8291,-14.3316 -24.3639,51.594 -27.2301,58.7598 0,1.4332 -17.198,5.7327 -31.5297,7.1659 -2.8663,1.4331 -1.4332,-4.2995 -2.8663,-5.7327 -10.0322,-5.7327 -21.4976,-8.599 -31.5296,-14.3317 l -1.4332,-1.433 c -4.2995,10.032 -8.599,17.1979 -11.4654,20.0642 -1.4331,1.4332 -45.8612,-18.6312 -57.3266,-18.6312 -4.2995,-1.433 -1.4331,7.1659 -4.2995,8.599 -15.7648,7.1659 -34.396,10.0322 -50.1609,5.7327 -2.8662,0 -24.3637,-24.3639 -21.4974,-28.6634 7.1659,-10.032 20.0644,-14.3315 30.0966,-17.1979 11.4652,-2.8663 32.9627,10.0322 32.9627,-1.4331 1.4332,-10.0322 -21.4975,-2.8664 -32.9627,-1.4332 -7.1659,0 -12.8986,10.0322 -20.0644,7.1658 -30.0965,-11.4653 5.7327,-27.2302 14.3317,-27.2302 14.3317,1.4332 38.6954,18.6312 55.8934,7.1659 17.1979,-12.8985 -50.1607,4.2995 -58.7599,-15.7649 -2.8662,-8.599 32.9629,-7.1657 25.7971,-11.4652 -8.5989,-4.2995 -21.4976,1.4332 -28.6633,-5.7327 -22.9307,-18.6312 11.4654,-55.8934 32.9628,-57.3266 15.7648,0 35.8292,2.8662 44.4282,15.7647 4.2994,5.7327 -8.599,15.7649 -4.2995,21.4976 4.2995,5.7326 1.433,-17.1981 7.1657,-18.6312 7.166,-1.4332 10.0322,12.8985 17.198,14.3317 5.7327,0 -11.4653,-10.0322 -8.599,-12.8986 7.1659,-8.599 41.5619,21.4976 67.3588,-2.8663 4.2995,-4.2995 -7.1658,-7.1657 -12.8985,-7.1657 -50.1608,-2.8665 24.3639,11.4652 -17.1979,14.3316 -7.1658,1.4331 -51.5941,-20.0643 -71.6583,-22.9306 -7.1658,0 -12.8985,-4.2995 -20.0644,-4.2995 -8.599,0 -24.3637,12.8985 -25.7969,4.2995 -1.4333,-10.0322 21.4974,-10.0322 24.3638,-20.0644 2.8663,-12.8985 -25.7971,-18.6312 -25.7971,-32.9629 0,-5.7325 14.3317,0 17.1981,4.2997 4.2995,7.1657 4.2995,24.3637 12.8985,22.9305 8.599,-1.4331 -10.0322,-24.3638 -1.4332,-25.797 11.4654,-1.4332 17.198,21.4975 28.6634,21.4975 8.599,0 5.7325,-27.2302 11.4652,-21.4975 7.166,5.7327 -2.8662,18.6312 -2.8662,28.6634 0,1.4331 -2.8665,5.7326 -1.4332,5.7326 8.5989,-2.8663 4.2994,-21.4975 12.8984,-21.4975 4.2995,0 1.4332,10.0322 5.7327,12.8985 8.599,4.2995 22.9307,12.8986 27.2302,4.2995 2.8663,-7.1658 -18.6312,-4.2995 -22.9307,-10.0321 -7.1657,-8.599 -10.0322,-18.6312 -10.0322,-28.6633 -1.433,-12.8985 20.0644,-22.9307 32.9629,-20.0643 5.7327,1.4331 2.8663,12.8985 5.7327,18.631 4.2995,8.599 11.4653,14.3317 14.3315,22.9307 0,2.8664 -7.1657,8.599 -4.2995,8.599 4.2995,0 5.7327,-5.7326 5.7327,-8.599 -5.7327,-28.6632 -37.2623,-47.2944 12.8985,-55.8934 17.198,-2.8664 20.0644,21.4975 20.0644,44.4281 1.4331,-2.8664 2.8663,-7.1659 5.7326,-8.5989 8.599,-7.166 32.9628,8.5989 30.0966,-1.4332 -2.8665,-11.4653 -22.9307,-1.4333 -32.9629,-8.599 -7.1658,-5.7327 -4.2995,-18.6312 -10.0322,-25.797 -7.1658,-10.0322 -45.8612,-22.9306 -51.5939,-27.2301 -1.4332,-1.4332 4.2995,-5.7327 8.599,-5.7327 5.7327,-1.4333 12.8985,-1.4333 18.6312,1.4332 2.8662,1.433 1.433,8.599 4.2994,8.599 4.2995,1.4332 21.4975,-28.6634 41.5618,-12.8985 5.7327,4.2995 -2.8663,18.6312 4.2996,21.4974 5.7325,2.8663 -2.8664,-15.7649 2.8663,-18.6311 10.0322,-5.7327 31.5296,25.7969 31.5296,27.2301 8.599,1.4332 25.797,-5.7327 21.4975,-12.8985 -4.2995,-8.5989 -21.4975,5.7327 -28.6634,0 -10.032,-8.5989 10.0322,-24.3638 25.7971,-30.0964 -11.4654,4.2995 -21.4976,7.1658 -31.5297,7.1658 -85.9899,1.4332 -10.0322,-8.599 -12.8984,-25.797 -1.4332,-11.4654 -20.0644,-10.0322 -27.2302,-20.0644 -10.0322,-11.4652 -5.7327,-21.4974 32.9627,-17.1979 8.599,1.4332 8.599,17.1979 17.198,20.0644 5.7327,1.433 10.0322,-8.599 15.7649,-8.599 8.599,-1.4332 15.7647,-1.4332 24.3639,0 -1.4332,-1.4332 -2.8665,-4.2995 -4.2997,-5.7327 -1.433,-8.599 10.0322,-17.198 18.6312,-18.6312 4.2995,-1.4332 0,8.599 2.8664,12.8985 4.2995,5.7327 14.3316,5.7327 17.198,12.8984 2.8663,5.7328 -5.7327,14.3317 0,18.6312 7.1658,7.1658 25.7969,20.0644 31.5297,10.0322 4.2994,-10.0322 -22.9307,-14.3317 -24.3639,-25.7969 0,-7.1659 15.7649,-1.4332 21.4974,-5.7327 2.8665,-2.8663 -10.032,2.8662 -12.8984,0 -1.4331,-1.4332 8.5989,-7.1659 5.7327,-5.7327 -7.1658,1.4332 -12.8985,11.4654 -18.6312,8.5989 -10.0322,-5.7325 -12.8985,-18.6311 -15.7648,-28.6632 -2.8664,-4.2995 7.1658,4.2995 11.4653,5.7326 4.2995,2.8664 -14.3317,-14.3316 0,-11.4653 1.4332,0 58.7598,30.0965 53.0271,-8.599 -5.7326,-47.2945 -45.8612,41.5619 -37.2622,-20.0644 1.4331,-12.8984 35.8291,-35.8291 45.8612,-30.0964 8.599,4.2995 -1.4331,22.9307 5.7327,31.5297 2.8663,4.2995 7.1659,-7.1658 11.4654,-10.0322 7.1658,-2.8663 27.23,-2.8663 21.4974,-8.599 -4.2994,-5.7327 -24.3638,14.3317 -22.9306,5.7327 0,-10.0322 15.7647,-12.8985 22.9306,-21.4975 8.599,-8.599 8.599,-25.7971 20.0643,-27.2301 8.599,-2.8665 4.2995,14.3317 8.599,21.4974 2.8664,5.7327 12.8984,8.599 12.8984,15.7648 0,8.5991 -12.8984,12.8986 -11.4652,21.4976 1.4332,5.7325 8.599,-7.1659 14.3317,-5.7327 8.599,1.4332 18.6311,22.9306 22.9306,15.7647 4.2995,-11.4652 -17.1979,-20.0642 -15.7649,-31.5296 0,-11.4653 58.7599,2.8664 60.1931,2.8664 10.0322,-7.1659 11.4652,-22.9307 10.0322,-34.3961 -1.4333,-5.7325 -18.6312,5.7327 -17.1982,0 4.2995,-18.631 63.0593,-21.4974 60.1931,-35.8291 -1.4332,-11.4653 -35.8292,-11.4653 -28.6634,-21.4975 5.7327,-10.032 31.5296,-7.1657 32.9629,-18.6311 4.2995,-57.3266 -47.2944,12.8986 -58.7598,22.9306 -5.7328,4.2995 -22.9307,8.599 -18.6312,15.7649 5.7327,10.0322 22.9306,4.2995 32.9628,8.599 1.4332,0 -2.8662,1.4332 -4.2995,2.8663 -7.1659,4.2995 -15.7649,7.1659 -22.9306,12.8985 -7.1658,5.7327 -42.9949,37.2623 -54.4603,34.396 -7.1658,-1.4332 -4.2995,-12.8984 -7.1658,-18.6311 -2.8664,-5.7328 -12.8985,-10.0322 -10.0322,-15.7649 4.2995,-10.0321 18.6312,-11.4653 27.2302,-18.6311 1.4332,-1.4332 -5.7328,4.2995 -8.599,2.8663 -2.8665,0 4.2995,-7.1659 2.8662,-5.7327 -10.0321,4.2995 -25.7969,27.2302 -40.1286,21.4975 -21.4974,-8.599 10.0322,-27.2302 25.797,-37.2623 8.5989,-4.2994 20.0644,-4.2994 25.7971,-12.8984 4.2994,-4.2995 -12.8985,4.2995 -18.6312,2.8662 -2.8664,0 -1.4332,-2.8662 -1.4332,-5.7327 1.4332,-10.0321 0,-20.0642 5.7327,-28.6632 2.8662,-4.2995 11.4652,2.8663 15.7647,0 2.8664,0 -5.7325,0 -5.7325,-2.8664 0,-4.2995 1.433,-8.599 2.8662,-12.8985 4.2995,-4.2995 14.3317,5.7327 17.198,0 2.8663,-4.2995 -1.4332,-12.8985 2.8663,-18.6312 4.2996,-5.7325 17.1981,-4.2994 20.0644,-12.8984 1.4332,-5.7327 -18.6312,-12.8985 -12.8985,-14.3317 10.0322,-2.8663 18.6312,14.3317 28.6632,11.4654 7.1659,-1.4332 -11.4652,-8.599 -15.7647,-15.7649 -7.1658,-10.0321 14.3317,-21.4975 25.7969,-28.6632 11.4654,-7.1659 15.7649,25.7969 30.0966,31.5296 8.599,2.8663 20.0643,0 25.797,-7.1659 2.8662,-4.2995 -20.0644,0 -17.198,-5.7326 4.2995,-8.5991 22.9305,-7.1659 27.2301,-15.7649 7.1658,-20.0642 -44.4282,32.9629 -31.5296,-21.4974 1.4331,-8.599 4.2995,-14.3317 5.7326,-17.198 -5.7326,4.2995 -11.4653,8.599 -18.6312,11.4653 -21.4975,10.0322 40.1286,-27.2302 35.8291,-32.9627 -1.433,-2.8665 -4.2995,-2.8665 -8.599,-1.4332 v -1.4333 c 0,-2.8662 -10.032,0 -8.5989,-2.8662 4.2994,-10.0322 48.7276,-7.1659 55.8935,-10.0322 2.8663,-2.8663 -2.8664,-10.0322 0,-12.8985 21.4974,-20.0644 50.1608,-7.1658 57.3266,-48.7276 0,-7.1659 -11.4653,7.1658 -17.198,10.0322 -7.1659,1.433 -14.3317,0 -21.4974,0 -5.7327,1.433 -15.7649,10.032 -15.7649,4.2995 2.8664,-18.6312 54.4603,-18.6312 40.1286,-42.9951 -1.4331,-4.2995 -14.3317,-1.4331 -24.3637,-1.4331 1.433,2.8663 4.2995,5.7326 7.1657,11.4653 -7.1657,7.1658 -12.8984,15.7648 -20.0642,22.9307 -2.8664,1.4332 -8.5991,10.0322 -10.0322,5.7327 -1.4332,-7.1659 -1.4332,-47.2946 10.0322,-48.7278 0,-4.2995 0,-7.1658 2.8663,-12.8985 4.2995,-11.4652 22.9306,-5.7325 32.9628,-11.4652 2.8663,-1.4332 -7.1659,0 -8.5991,-1.4332 -4.2995,-5.7327 -8.599,-12.8985 -10.032,-18.6312 -1.4333,-8.599 11.4652,-41.5617 20.0642,-41.5617 11.4654,-1.4332 17.198,17.198 28.6634,20.0642 4.2995,1.4332 -4.2995,-10.0322 -5.7327,-15.7647 -2.8663,-7.1659 -1.4332,-20.0644 -8.599,-24.3639 -7.1658,-4.2995 -20.0644,7.1659 -27.2302,1.4332 -22.9306,-18.6312 24.3639,-11.4654 31.5297,-14.3317 12.8985,-5.7327 14.3317,-24.3639 34.3959,-20.0644 8.599,2.8665 12.8985,14.3317 21.4976,14.3317 7.1658,0 -11.4654,-8.599 -12.8986,-14.3317 v -1.433 c -1.4331,0 -2.8663,1.433 -4.2995,1.433 -2.8663,0 0,-8.5989 -2.8663,-10.032 -14.3317,-2.8664 -24.3639,22.9307 -40.1286,21.4974 -50.1608,-7.1657 27.2301,-17.1979 35.8291,-24.3638 2.8663,-1.4331 -5.7327,-1.4331 -10.0322,-1.4331 -10.0322,-1.4332 -18.6311,2.8663 -28.6632,1.4331 -12.8985,-2.8663 -8.599,-25.797 -5.7327,-37.2622 10.0322,-53.0272 31.5297,-30.0966 67.3588,-44.4282 20.0642,-8.599 -22.9307,-22.9306 -28.6634,-32.9628 -2.8663,-5.7327 12.8985,-1.4332 18.6312,-4.2995 5.7327,-2.8663 -24.3637,-24.3639 11.4654,-12.8985 2.8663,0 -4.2995,5.7327 -4.2995,8.599 1.4331,20.0642 8.599,-10.0322 8.599,-12.8985 0,-1.4332 2.8663,-8.599 4.2995,-5.7327 4.2995,4.2995 -1.4332,17.198 5.7326,18.6312 11.4654,1.4332 27.2301,-4.2995 30.0965,-14.3317 4.2995,-10.0322 -15.7649,-14.3317 -17.1981,-24.3637 0,-1.4332 34.3961,-21.4976 45.8614,-15.7649 7.1659,2.8662 -7.1658,25.7969 1.4332,24.3638 8.599,0 -1.4332,-20.0643 5.7327,-24.3638 1.433,-1.4332 1.433,-1.4332 2.8663,-2.8663 -1.4333,-1.4332 -2.8663,-2.8664 -4.2995,-4.2995 -4.2995,-2.8664 8.5989,-11.4654 4.2995,-12.8985 -4.2995,-1.4332 -7.1658,8.599 -12.8985,11.4653 -14.3317,5.7327 -31.5297,17.1979 -45.8614,8.599 -5.7327,-4.2995 11.4655,-12.8985 15.7649,-20.0643 8.599,-18.6312 11.4653,-61.6262 32.9628,-45.8613 7.1659,5.7325 -21.4975,14.3317 -14.3317,20.0642 5.7327,5.7327 14.3317,-10.032 24.3639,-11.4652 7.1657,0 14.3316,2.8662 20.0643,8.5989 8.599,8.599 24.3638,40.1287 20.0643,28.6634 -2.8663,-10.0322 -17.198,-18.6312 -14.3317,-30.0966 1.4332,-10.0322 18.6312,-11.4652 24.3639,-20.0642 2.8663,-4.2995 -8.599,2.8663 -12.8985,4.2995 -21.4976,7.1658 -28.6634,17.1979 -38.6956,-10.0322 -5.7325,-14.3317 7.166,-5.7327 8.599,-12.8985 1.4332,-1.4332 -4.2995,1.4332 -4.2995,0 -4.2995,-12.8985 35.8292,7.1658 41.5619,0 10.0322,-17.1979 -34.3959,-31.5296 -37.2624,-31.5296 -2.8663,0 2.8665,5.7327 1.4332,8.5989 -4.2995,8.599 -28.6633,38.6955 -37.2623,34.396 -10.0321,-4.2995 -11.4653,-20.0643 -7.1658,-30.0965 2.8663,-8.5989 17.198,-2.8662 22.9307,-8.5989 4.2995,-4.2995 -12.8985,5.7327 -15.7649,1.4332 -5.7326,-8.599 18.6312,-14.3317 25.7971,-8.599 2.8663,1.4331 -2.8664,8.599 -1.4332,7.1658 22.9306,-22.9307 60.193,-8.599 57.3266,-40.1287 0,-4.2995 -8.599,4.2995 -12.8985,1.4332 -2.8663,-1.4332 1.4332,-7.1659 -1.4332,-8.5989 -1.4331,-1.4333 -1.4331,5.7325 -2.8663,5.7325 -5.7327,2.8664 -10.0322,1.4332 -14.3317,1.4332 -8.599,1.4332 -20.0642,8.599 -22.9307,1.4332 -18.6311,-37.2623 37.2624,-11.4654 38.6956,-11.4654 8.599,-7.1657 1.4331,-22.9306 5.7326,-32.9627 1.4332,-4.2996 4.2995,10.0321 5.7327,15.7648 1.4332,1.4332 5.7327,-1.4332 5.7327,0 0,8.5989 -5.7327,17.1979 -2.8664,24.3638 0,2.8663 31.5296,48.7277 38.6955,40.1287 17.198,-20.0644 -54.4603,-83.1237 -32.9628,-93.1559 7.1659,-4.2995 21.4974,7.1659 32.9628,17.1981 -1.4332,-4.2995 -1.4332,-8.5991 -4.2995,-11.4654 -7.1659,-5.7327 -28.6633,-2.8663 -25.7969,-12.8985 1.433,-11.4652 20.0642,-10.0322 31.5296,-11.4652 61.6261,-10.0322 10.0321,20.0642 48.7276,38.6954 27.2302,12.8985 -31.5296,-44.4281 -5.7327,-44.4281 7.1658,0 11.4653,8.5989 17.198,8.5989 8.599,-1.4332 21.4975,-1.4332 20.0644,-8.5989 -8.599,-60.1931 -44.4281,0 -58.7598,-2.8665 -2.8664,-1.433 5.7325,-4.2995 4.2995,-7.1657 0,-2.8663 -4.2995,-7.1658 -7.1659,-5.7327 -4.2995,1.4332 -4.2995,10.0322 -10.0321,10.0322 -8.599,1.4332 -22.9307,2.8662 -27.2301,-5.7328 -2.8665,-5.7325 -1.4333,-12.8984 1.433,-18.631 -7.1658,1.4331 -15.7647,2.8663 -20.0642,7.1658 -7.1659,7.1658 0,25.7969 -8.599,31.5296 -5.7327,4.2995 0,-17.1979 -5.7327,-21.4974 -7.1658,-4.2995 -15.7648,-2.8664 -22.9307,-1.4332 -5.7327,1.4332 -2.8663,12.8984 -7.1657,17.1979 -4.2995,4.2995 -10.0322,8.599 -14.3317,12.8985 -5.7327,5.7327 -10.0322,11.4654 -14.3317,17.198 v -5.7326 c 4.2995,-10.0322 12.8985,-20.0644 14.3317,-30.0966 1.4332,-5.7325 -5.7327,-12.8984 -2.8663,-18.631 7.1658,-7.1659 21.4974,-4.2995 28.6632,-11.4654 30.0965,-28.6632 -47.2944,-20.0643 -5.7327,-64.4924 30.0966,-34.3961 24.3639,30.0965 17.1981,61.6261 2.8663,-5.7327 7.1658,-10.0322 11.4653,-11.4654 2.8663,-1.4331 5.7327,8.599 7.1658,5.7327 4.2996,-7.1658 -2.8742,-75.9578 21.4976,-42.9949 12.8984,17.198 17.1979,30.0964 17.1979,37.2622 5.7327,-2.8663 10.0322,-5.7326 14.3317,-5.7326 5.7326,0 8.599,11.4653 14.3315,11.4653 11.4655,1.4332 24.3639,-1.4332 34.3961,-7.1658 14.3317,-8.5989 -30.0966,2.8663 -32.9628,-15.7649 0,-5.7325 7.1659,-12.8984 14.3316,-12.8984 h 2.8663 c -1.433,-1.4332 -2.8663,-1.4332 -2.8663,-4.2995 0,-8.599 17.198,-5.7327 24.3638,-11.4653 1.4332,-1.4332 -5.7326,-1.4332 -7.1658,-2.8664 -10.0322,-7.1658 -14.3317,-22.9307 -11.4653,-35.8292 1.4331,-11.4652 30.0965,-1.433 32.9628,-12.8984 2.8664,-8.599 -4.2995,-17.198 -7.1658,-25.797 0,10.0322 -1.4332,15.7648 -2.8663,17.198 -10.0322,0 -20.0644,-8.599 -28.6634,-2.8663 -14.3316,5.7326 -17.1979,24.3637 -25.7969,37.2622 -7.1659,-4.2995 -20.0644,-4.2995 -20.0644,-11.4652 2.8664,-11.4653 21.4975,-12.8985 24.3639,-24.3639 2.8663,-5.7326 -15.7649,7.1659 -17.198,1.4332 -2.8664,-8.599 12.8985,-15.7648 11.4653,-25.797 0,-5.7327 -20.0644,1.4333 -15.7648,-1.4332 20.0643,-10.0322 53.0271,-1.4332 38.6955,-20.0642 -5.7328,-5.7327 -27.2302,-2.8664 -21.4975,-7.1659 7.1658,-4.2995 18.6312,8.599 27.2302,4.2995 8.5989,-5.7326 4.2994,-24.3638 12.8984,-27.2302 14.3317,-4.2995 17.198,22.9307 18.6312,45.8613 0,-8.5989 2.8663,-15.7647 5.7326,-22.9306 7.1659,-11.4653 10.0322,28.6633 20.0644,34.396 10.0321,5.7326 22.9306,0 32.9627,-4.2994 1.4332,0 -42.9949,-15.7649 -40.1287,-25.7971 2.8665,-10.0321 12.8987,-22.9307 22.9307,-21.4975 10.0322,0 8.599,18.6312 15.7649,25.797 7.1658,7.1659 17.198,5.7327 25.797,12.8984 4.2994,4.2995 8.5989,22.9307 11.4652,17.1981 11.4654,-34.396 -73.0913,-25.7971 -41.5617,-93.1558 5.7326,-11.4653 30.0965,-25.797 41.5617,-17.198 10.0322,5.7327 -2.8663,73.0915 -2.8663,75.9578 2.8663,2.8664 7.1658,-4.2995 8.599,-8.599 1.4332,-8.599 -5.7327,-20.0643 0,-27.2302 4.2995,-7.1657 22.9307,4.2995 24.3639,-4.2995 0,-8.599 -20.0644,-7.1657 -22.9307,-15.7647 -2.8664,-7.1659 11.4653,-68.792 32.9627,-42.9951 5.7328,8.599 0,88.8564 0,91.7227 -2.8662,10.0322 -21.4974,27.2302 -11.4652,30.0964 25.7969,8.599 12.8985,-41.5618 21.4974,-47.2944 8.599,-5.7327 21.4975,0 30.0966,-4.2995 4.2995,-2.8664 -7.1659,-5.7327 -10.0322,-8.5989 -10.0322,-8.599 -31.5296,-20.0644 -22.9306,-40.1287 37.2623,-83.1237 0,11.4653 42.9949,-17.1981 11.4654,-7.1658 0,-28.6632 8.599,-38.6954 2.8664,-2.8663 7.1659,1.4332 10.0322,4.2995 2.8662,2.8663 1.4332,8.599 4.2994,11.4654 7.166,5.7325 15.7649,7.1658 22.9307,12.8985 5.7327,4.2995 10.0322,12.8984 17.198,15.7647 7.1659,1.4332 -12.8985,-10.0322 -15.7648,-17.1979 0,-1.4333 5.7326,-1.4333 5.7326,-4.2995 2.8664,-20.0644 -1.4331,-50.1609 -4.2995,-48.7277 -7.1658,0 -48.7276,35.8292 -60.1929,-5.7327 -5.7327,-22.9306 35.8292,-32.9628 47.2944,-30.0964 10.0322,1.4331 15.7649,14.3317 25.7971,17.198 2.8663,0 -1.4332,-8.599 1.4331,-10.0322 2.8664,-2.8663 8.599,0 11.4654,1.4332 8.599,0 18.631,-1.4332 25.7969,1.4332 18.6312,5.7326 -5.7327,47.2944 32.9629,44.4281 7.1658,-1.4332 11.4653,-11.4654 10.032,-18.6312 0,-4.2994 -8.5989,1.4331 -12.8984,0 -4.2995,-1.4332 -11.4653,-2.8664 -11.4653,-7.1659 0,-5.7325 17.198,-2.8663 11.4653,-12.8984 -5.7327,-8.599 -7.1658,-17.198 -1.4332,-44.4282 v -2.8663 c -2.8663,5.7328 -7.1658,11.4653 -11.4653,18.6312 -7.1658,-7.1659 -20.0642,-11.4654 -22.9307,-20.0644 -7.1657,-25.7969 78.8242,-87.423 45.8614,-18.6311 12.8984,-11.4653 31.5296,1.4332 35.8291,-2.8663 7.1658,-4.2995 -15.7649,-4.2995 -18.6312,-11.4653 -10.0322,-24.3639 32.9629,-20.0644 35.8292,-24.3639 5.7327,-12.8984 -38.6955,-28.6633 -38.6955,-32.9628 1.4331,-8.599 21.4975,11.4654 24.3638,4.2995 5.7327,-10.0321 -12.8985,-21.4975 -10.0321,-32.9628 4.2995,-11.4654 83.1236,-4.2994 84.5568,0 2.8663,4.2995 -35.8291,74.5246 -34.3961,78.8241 0,1.4332 1.4332,1.4332 2.8664,1.4332 -2.8664,0 -4.2994,0 -4.2994,1.4331 2.8662,4.2996 11.4652,-2.8663 15.7647,0 18.6312,12.8986 -24.3637,18.6312 0,25.7971 8.599,2.8663 -5.7327,15.7647 -7.1658,24.3637 0,2.8664 -2.8664,44.4281 21.4975,20.0644 4.2995,-4.2995 0,-12.8985 1.4332,-18.6312 1.4331,-8.599 5.7326,-14.3317 8.599,-21.4974 2.8663,-8.599 -12.8985,1.433 -8.599,-11.4654 8.599,-24.3638 31.5297,-118.9527 47.2944,-127.5517 0,0 10.0322,37.2622 10.0322,40.1286 -2.8664,8.599 -17.198,12.8985 -15.7649,22.9307 1.4332,5.7326 14.3317,-10.0322 18.6312,-4.2995 5.7327,7.1658 -5.7327,25.7969 2.8664,30.0964 10.0321,7.1658 24.3637,0 32.9627,-7.1657 5.7327,-5.7327 -12.8985,-10.0322 -12.8985,-17.1981 0,-10.0321 -4.2994,-22.9306 1.4333,-31.5297 4.2995,-10.032 18.6311,-11.4653 25.7969,-20.0642 2.8663,-2.8663 -7.1658,0 -10.0322,-1.4332 -10.0322,-4.2995 -27.2301,-7.1658 -27.2301,-18.6312 -1.4331,-8.599 21.4974,1.4332 25.797,-5.7326 5.7326,-10.0322 -7.1659,-21.4976 -4.2996,-31.5296 1.4332,-7.1659 11.4654,14.3317 18.6312,10.032 11.4654,-4.2995 20.0644,-14.3315 42.995,1.4332 17.198,11.4654 -30.0965,73.0915 -34.396,81.6905 -1.4331,2.8663 8.599,-4.2995 10.0322,-7.1658 8.5989,-7.1659 12.8984,-22.9306 22.9306,-25.7971 7.1658,-1.433 2.8663,12.8985 1.4332,20.0644 -4.2994,10.0322 -21.4974,20.0643 -15.7649,30.0965 5.7327,8.599 20.0644,-17.198 28.6634,-11.4653 1.4332,1.4331 2.8663,2.8663 2.8663,4.2995 2.8664,-1.4332 8.599,2.8663 11.4654,1.4331 8.599,-8.599 -12.8985,-15.7648 -12.8985,-15.7648 -1.4332,-5.7327 -2.8664,-54.4603 2.8663,-63.0593 25.797,-32.9628 42.9949,30.0965 44.4281,30.0965 93.1558,4.2994 -47.2944,-55.8934 44.4282,-27.2302 47.2944,14.3317 12.8984,15.7649 5.7327,34.3961 -1.4332,2.8662 7.1657,1.433 10.0322,0 8.5989,-2.8665 15.7647,-10.0322 24.3637,-11.4654 2.8663,0 0,5.7327 1.4332,7.1659 4.2995,2.8663 10.0322,2.8663 14.3317,4.2995 1.4331,1.433 2.8663,4.2995 5.7325,5.7325 7.166,5.7327 18.6312,10.0322 24.3639,18.6312 1.4332,2.8664 -5.7327,2.8664 -8.599,5.7327 -7.1659,4.2995 -17.1979,5.7327 -21.4974,12.8985 -8.5991,11.4652 -1.4332,31.5296 -12.8986,37.2623 -31.5297,15.7648 -70.2251,-5.7327 -96.022,22.9307 -4.2995,2.8663 8.5989,-4.2995 14.3316,-4.2995 7.1658,0 12.8985,1.4331 20.0643,2.8663 1.4332,1.4332 2.8664,2.8663 4.2995,2.8663 11.4654,1.4332 27.2301,-7.1658 34.396,2.8664 5.7326,7.1658 -17.1981,17.198 -12.8986,25.7969 4.2995,7.1658 10.0322,-20.0643 18.6312,-18.6311 10.0322,2.8662 7.1659,25.7969 2.8664,40.1286 1.4331,-2.8663 2.8663,-4.2995 4.2995,-5.7327 10.0321,-4.2995 24.3638,2.8664 35.8292,-1.4331 2.8662,-1.4332 -8.599,-5.7327 -8.599,-10.0322 -1.4332,-10.0322 0,-18.6311 2.8663,-27.2301 1.4332,-2.8663 -1.4333,8.599 2.8662,8.599 11.4654,2.8662 22.9307,0 34.3961,-1.4333 z m -614.8281,295.2322 h 1.4332 z m 260.8362,-438.5487 c 1.433,11.4654 -18.6312,14.3317 -25.7971,22.9306 -57.3266,-55.8933 20.0644,-55.8933 25.7971,-22.9306 z m -217.8413,111.7869 c 5.7327,0 8.599,10.0322 12.8985,7.1659 5.7327,-4.2995 -10.0321,-20.0644 -4.2995,-18.6312 2.8664,1.4332 2.8664,8.599 7.1659,8.599 2.8663,-1.4332 -2.8664,-8.599 0,-10.0322 12.8985,-5.7325 7.1658,30.0966 20.0642,11.4654 2.8665,-2.8664 -7.1657,-8.599 -4.2994,-11.4654 8.5989,-11.4652 22.9306,-15.7647 35.8291,-24.3637 0,1.4331 -1.4331,1.4331 -1.4331,1.4331 0,1.4332 5.7326,1.4332 5.7326,2.8664 -1.4331,5.7327 -7.1658,11.4652 -10.0321,17.1979 -11.4654,31.5297 -27.2301,44.4282 -61.6262,50.1609 2.8664,-8.599 12.8985,-18.6312 8.599,-27.2302 -1.4331,-1.4332 -4.2995,-2.8664 -7.1658,-2.8664 0,-1.4331 -2.8663,-4.2995 -1.4332,-4.2995 z m -10.0321,5.7327 h -5.7327 c -2.8662,-1.4332 0,0 5.7327,0 z m -85.9899,101.7547 c 2.8663,-5.7325 11.4652,-8.599 18.6312,-11.4652 1.433,-1.4333 5.7325,0 4.2994,1.4332 -4.2994,11.4652 -11.4654,21.4974 -17.1979,31.5296 -1.4332,-7.1659 -8.5991,-14.3317 -5.7327,-21.4976 z m -27.2302,35.8292 1.4332,2.8664 c 0,1.4331 -1.4332,2.8663 -1.4332,4.2995 0,-2.8664 -1.4332,-4.2995 0,-7.1659 z m -75.9578,27.2301 c 11.4653,-31.5296 126.1186,-24.3637 27.2302,21.4976 -7.1659,-8.5991 -30.0966,-11.4654 -27.2302,-21.4976 z m -199.2101,233.6061 c 2.8665,2.8664 -5.7325,5.7327 -4.2994,10.0321 2.8664,15.7648 40.1286,14.3317 -11.4653,35.8292 -5.7327,1.4332 -11.4654,-5.7327 -18.6312,-8.599 37.2624,-30.0964 15.7648,-34.3959 15.7648,-25.7969 1.4332,17.1979 -17.198,5.7325 -25.797,11.4652 -7.1658,2.8663 -12.8985,27.2302 -14.3317,18.6312 -4.2995,-24.3639 32.9629,-65.9256 58.7598,-41.5618 z m -114.6532,130.418 c 2.8663,-8.5989 -2.8662,-24.3637 5.7328,-25.7969 53.0271,-10.0322 5.7325,40.1286 -11.4655,44.4281 0,-1.4332 -2.8662,-1.4332 -2.8662,-2.8663 2.8662,-5.7327 7.1657,-10.0322 8.5989,-15.7649 z m -353.9919,818.3376 c 7.1658,1.4332 2.8663,11.4654 4.2995,18.6312 -1.4332,1.4332 -4.2995,2.8664 -5.7327,2.8664 -5.7326,1.4331 -12.8985,1.4331 -18.6312,2.8663 -60.1928,8.599 18.6312,-25.797 20.0644,-24.3639 z m -266.5689,268.0021 c 5.7327,-2.8664 12.8986,0 20.0644,1.4331 0,-1.4331 0,-2.8663 1.4332,-2.8663 0,-1.4332 1.4331,1.4332 1.4331,2.8663 -1.4331,1.4332 -2.8663,1.4332 -4.2995,2.8664 l 1.4332,-1.4332 c -5.7327,2.8663 -11.4652,10.0322 -17.198,10.0322 -4.2994,0 -5.7327,-10.0322 -2.8664,-12.8985 z m -93.1557,550.3356 2.8664,-2.8664 c 2.8663,14.3317 8.599,30.0966 1.4331,44.4281 -15.7648,28.6634 -7.1658,-24.3637 -4.2995,-41.5617 z m 22.9307,-106.0543 v -1.4331 -1.4332 c 2.8664,2.8663 7.1659,4.2995 7.1659,7.1658 8.5989,61.6262 -22.9307,17.1981 -10.0322,-2.8663 0,0 0,1.4332 -1.4332,2.8663 1.4332,-1.4331 4.2995,-2.8663 4.2995,-4.2995 z m 550.3356,-908.6271 c -5.7326,1.4332 -10.0321,2.8665 -14.3317,2.8665 -10.0321,-1.4333 2.8664,-1.4333 14.3317,-2.8665 z M 7145.0097,1391.274 c -2.8663,1.4332 -7.1658,1.4332 -10.0321,1.4332 4.2995,0 12.8985,-2.8664 10.0321,-1.4332 z m -242.2049,322.4623 h 1.4331 z m 4.2995,1.4332 h 2.8663 z m 4.2995,0 c 0,1.4331 0,1.4331 1.4331,1.4331 -1.4331,0 -1.4331,0 -1.4331,-1.4331 z"
+ class="europe"
+ id="no"
+ sodipodi:nodetypes="cccccccccsccccccccccccccscccccccccccccscccccsccccccccccccccccccccccssccccccccccccsccccccsccccscccccccscscscccccccccsccscccssccccscccccccccccccccccccccccccsccccccccccccccccccscccccccsccccccscccccccccscccccsscccccscccccccccccccccscccccccsccscscscscscccccscscccccccccscccccccccccccccccccccccscccccccccccccccsccccccccccccccscsccccsccccscsccsccccsccsccccccsccccccccccccccccccccscccsccsccccccccsccscccccccccsccccccsccssccccssccsscscccccccccsccccccccsccccccscscccsscccccccccccscccscscccccccccccccccccccscscsccccccccccccscccccsccccccccccccccsscccccccccccccccccccscccccccccsccccccccsccccccccccccccccccccscscccccccccccccccccccccccccccscccccccccccccscccccccccccccccccccccccccccccccccccccccscccccscccccscccscsccccccccccc" /><path
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 9710.3764,5187.7299 v -1.4331 c -11.4654,-12.8985 -4.2995,-17.198 -1.4332,-30.0966 2.8663,-15.7647 -17.198,4.2996 -17.198,-4.2995 1.4331,-10.032 -7.1659,-44.4281 -2.8664,-53.0271 1.4332,0 42.995,-38.6954 42.995,-38.6954 2.8663,-5.7327 -4.2994,-12.8985 -4.2994,-18.6312 -1.4333,-5.7327 -2.8665,-12.8985 1.433,-18.6312 21.4976,-25.7969 88.8564,-14.3317 108.9207,-44.4281 4.2994,-5.7327 -2.8663,-14.3317 -5.7327,-21.4974 -1.4331,-2.8663 -7.1658,-4.2995 -7.1658,-7.1658 0,-4.2995 8.599,-4.2995 8.599,-7.1659 0,-4.2995 -5.7327,-7.1658 -7.1658,-11.4653 -1.4332,-7.1659 0,-15.7649 1.4331,-24.3639 0,-2.8663 4.2995,-5.7327 4.2995,-8.599 5.7327,-17.1979 -20.0643,-1.4332 -20.0643,-1.4332 -4.2995,-2.8662 4.2995,-10.032 2.8663,-15.7647 -5.7326,-10.0322 -14.3317,-20.0644 -21.4975,-28.6634 -10.0322,-10.032 -25.7969,14.3317 -27.2301,-1.4331 -7.1658,-45.8613 -2.8663,-32.9628 22.9306,-44.4281 1.4333,-1.4332 12.8985,-25.7971 4.2995,-22.9307 -20.0642,4.2995 -30.0964,18.6312 -47.2944,4.2995 -18.6311,-15.7649 14.3316,-20.0644 18.6311,-27.2301 4.2996,-4.2995 -1.4331,-11.4654 0,-15.7649 4.2996,-18.6312 21.4976,-28.6632 4.2996,-47.2944 -5.7327,-7.1659 -15.7649,-8.599 -21.4976,-14.3317 -7.1658,-8.599 10.0322,-27.2302 -1.4331,-28.6634 -27.2301,-1.433 -10.0322,21.4976 -31.5296,25.7971 -73.0915,11.4653 18.6312,-10.0322 -40.1287,-20.0644 -18.6311,-2.8663 -20.0643,18.6312 -35.8291,8.599 -5.7327,-2.8663 -10.0322,-10.032 -14.3317,-14.3317 -12.8985,-8.599 -7.1659,24.3639 -22.9307,24.3639 -10.0321,0 -20.0643,-2.8663 -30.0964,-7.1658 -4.2995,-2.8664 -7.1659,-12.8984 -12.8985,-11.4654 -7.1659,0 -10.0322,14.3317 -18.6311,14.3317 -10.0322,0 -17.198,-10.0322 -28.6634,-11.4653 -37.2624,-5.7327 18.6312,50.1607 -20.0643,42.995 -10.0322,-1.4333 -12.8986,-14.3317 -21.4976,-18.6312 -5.7325,-2.8663 -14.3315,1.4332 -21.4974,-1.4332 -21.4975,-7.1658 -37.2622,-34.396 -55.8934,-48.7276 -5.7327,-4.2995 -58.7598,50.1608 -77.391,75.9577 -5.7327,8.599 -20.0644,-7.1657 -30.0964,-8.599 -5.7327,0 -5.7327,8.599 -10.0322,11.4655 -7.1658,4.2994 -12.8985,-12.8985 -21.4975,-15.7649 -34.3961,-8.599 -41.5618,41.5618 -65.9257,28.6633 -10.0321,-4.2995 -18.631,-10.0322 -25.797,-17.1979 -5.7327,-5.7327 -11.4652,-12.8985 -12.8984,-21.4976 0,-4.2995 8.599,-5.7326 7.1657,-10.0321 0,-5.7327 -37.2622,-38.6956 -38.6954,-42.995 -1.4332,-4.2995 7.1659,-11.4653 4.2995,-14.3316 -1.4332,-1.4332 -4.2995,-1.4332 -5.7327,-1.4332 -5.7325,1.4332 -10.032,5.7327 -15.7647,5.7327 -10.0322,1.4331 -11.4653,-15.7649 -17.198,-22.9307 -1.4332,-2.8664 -4.2995,-2.8664 -7.1659,-1.4332 -5.7326,2.8663 -35.8292,21.4975 -41.5617,21.4975 -2.8664,1.4332 -2.8664,-7.1658 -7.1659,-7.1658 -10.0321,0 -20.0643,1.4331 -28.6633,4.2995 -2.8664,1.4332 -11.4654,21.4975 -18.6311,7.1658 -1.4333,-2.8663 4.2994,-5.7326 4.2994,-8.599 1.4333,-4.2995 1.4333,-10.0322 -1.4332,-12.8985 -4.2995,-4.2995 -10.0322,-1.4332 -14.3316,-5.7327 -7.1658,-4.2995 1.4332,-18.6312 -4.2995,-24.3637 -5.7326,-7.1659 -25.797,-11.4654 -21.4975,-20.0644 5.7327,-7.1658 38.6956,-14.3317 30.0964,-27.2302 -11.4652,-17.1979 -38.6954,-15.7647 -47.2944,-22.9306 -5.7327,-4.2995 -10.0322,-10.0321 -11.4652,-15.7648 -2.8664,-5.7327 1.433,-12.8985 -1.4332,-15.7649 -5.7327,-5.7326 -14.3317,-5.7326 -20.0644,-10.032 -8.599,-5.7327 -12.8985,-17.198 -22.9307,-18.6312 -11.4653,-2.8663 -15.7647,22.9306 -28.6632,22.9306 -4.2995,0 -2.8663,-10.0321 -7.1659,-10.0321 -55.8934,-4.2995 -21.4975,27.2301 -54.4602,41.5618 0,0 -61.6262,4.2995 -63.0593,4.2995 -2.8664,0 7.1658,42.9949 -5.7327,55.8934 -8.599,7.1659 -18.6312,14.3317 -30.0965,15.7649 -4.2994,0 -2.8664,-8.599 -7.1659,-11.4654 -2.8662,-1.4331 -7.1657,5.7327 -10.032,4.2995 -15.7649,4.2995 -34.3961,2.8664 -47.2946,11.4654 -5.7327,2.8662 -2.8662,12.8984 -8.599,15.7647 -8.5989,4.2995 -20.0642,0 -30.0964,2.8664 -5.7327,1.4331 -15.7649,15.7648 -22.9307,55.8934 -1.4332,10.0322 -4.2994,37.2624 -4.2994,48.7276 0,15.7649 57.3265,54.4604 21.4974,61.6263 -37.2623,8.599 -20.0642,-27.2302 -53.0271,-30.0966 -65.9256,-4.2995 12.8985,11.4654 -34.3959,20.0644 -7.1659,1.4331 -14.3317,-8.599 -22.9307,-7.1659 -22.9307,5.7327 -10.0322,30.0966 -30.0966,35.8291 -11.4652,2.8664 -22.9305,-37.2622 -34.3959,-42.9949 -11.4653,-5.7327 -24.3637,14.3317 -32.9629,25.7969 -5.7325,7.166 5.7327,28.6634 -2.8663,27.2302 -30.0964,-7.1658 14.3317,1.4332 -22.9306,-24.3637 -20.0643,-14.3317 -12.8985,14.3315 -25.797,14.3315 -35.8291,0 -4.2995,-12.8985 -17.1979,-21.4974 -8.599,-4.2995 -8.599,17.1979 -14.3317,22.9306 -8.599,10.0322 -21.4975,-2.8663 -28.6634,-1.4332 -7.1658,0 0,25.7971 -7.1658,30.0966 -1.4332,2.8663 -5.7327,-1.4332 -8.5989,-4.2995 -18.6312,-10.0322 32.9628,-34.3961 -24.3639,-18.6312 -17.198,4.2995 8.599,27.2302 -27.2302,12.8985 -4.2995,-1.4332 4.2995,-10.0322 1.4332,-12.8985 -2.8663,-2.8664 -8.599,4.2995 -11.4652,2.8663 -8.599,-7.1658 2.8662,-21.4974 -12.8985,-17.198 -32.9629,8.599 -77.391,12.8985 -113.2201,8.599 -4.2995,-1.4332 -5.7327,-7.1657 -10.0322,-7.1657 -20.0643,-1.4333 -40.1287,11.4652 -61.6261,14.3315 -7.1659,0 -14.3317,0 -21.4975,0 -7.1659,0 -14.3317,-2.8663 -21.4976,-1.4331 -18.631,5.7326 -31.5296,20.0643 -48.7276,27.2302 -11.4653,4.2995 -25.7969,1.4331 -37.2622,7.1658 -5.7327,4.2995 -25.7971,71.6582 -40.1286,67.3588 -4.2995,-1.4333 -4.2995,-8.599 -7.166,-8.599 -8.5989,-1.4332 -18.6311,-1.4332 -25.7969,1.4332 -22.9307,7.1658 11.4653,20.0642 -5.7327,24.3637 l -1.4331,1.4332 c 0,0 0,-1.4332 0,-1.4332 4.2995,5.7327 10.0321,10.0322 12.8985,15.7649 2.8663,8.599 -2.8664,18.6312 0,25.797 12.8985,27.2301 54.4603,54.4603 77.3908,71.6582 4.2995,4.2995 -28.6632,2.8663 -21.4974,17.198 1.4332,1.4332 30.0964,27.2302 30.0964,38.6954 -4.2995,51.5941 -20.0642,20.0644 -45.8612,41.5619 -11.4654,10.0322 -98.8884,171.9799 -94.5889,183.4452 2.8663,15.7649 17.1979,27.2301 21.4974,41.5618 1.4332,7.1658 -10.0322,17.198 -4.2995,22.9307 24.3639,30.0964 10.0322,-27.2302 27.2302,27.2302 1.4332,2.8662 -4.2995,-4.2995 -7.1658,-5.7327 -7.1659,-1.4333 -14.3317,1.4332 -21.4976,1.4332 -4.2995,-1.4332 -10.032,-1.4332 -14.3315,-2.8665 1.4331,14.3317 -8.5991,34.3961 -10.0322,48.7277 -1.4332,10.0321 0,20.0643 -4.2995,28.6633 -4.2995,10.0322 -17.198,12.8985 -18.6312,22.9307 -2.8662,10.0322 4.2995,20.0642 4.2995,31.5296 32.9629,1.4333 11.4653,17.198 34.396,25.797 4.2994,1.4332 10.0321,-5.7327 14.3316,-2.8663 8.599,5.7326 10.0322,20.0643 18.6312,25.797 5.7327,1.4332 10.0322,-5.7327 15.7648,-7.1658 4.2995,0 8.599,2.8663 11.4654,4.2995 18.6312,12.8985 -4.2995,10.032 12.8984,24.3637 4.2995,2.8664 12.8985,-2.8663 22.9307,-30.0964 1.4331,-2.8663 1.4331,-7.1658 4.2995,-7.1658 4.2995,0 40.1286,17.198 44.4281,17.198 2.8663,0 4.2995,-7.1659 7.1658,-8.599 18.6312,-7.1659 65.9257,11.4653 88.8563,5.7326 12.8986,-4.2995 21.4976,-15.7648 34.396,-17.198 22.9307,-1.4332 38.6954,28.6634 54.4603,32.9628 21.4975,7.1658 28.6633,-32.9628 34.396,-38.6955 25.7969,-27.23 91.7225,-24.3638 111.7869,-44.4281 38.6954,-37.2623 -17.198,-5.7326 10.0322,-41.5617 7.1658,-8.599 18.6312,-15.7649 30.0964,-18.6312 l 1.4332,-4.2995 5.7326,-12.8985 c 0,-1.4332 0,-2.8664 0,-2.8664 l 1.4332,-5.7326 14.3317,2.8663 c -1.4332,-2.8663 -4.2995,-5.7327 -4.2995,-8.599 0,-1.4332 54.4603,-8.599 57.3266,-10.0322 27.2302,-12.8984 18.6312,-34.3959 57.3266,-31.5296 15.7649,1.4332 32.9629,7.1659 45.8613,17.1979 4.2995,2.8665 0,12.8985 4.2995,12.8985 10.0322,0 20.0644,-10.032 31.5297,-11.4652 5.7327,-1.4333 -1.4332,12.8984 0,18.6311 2.8663,11.4653 10.0322,-10.0322 12.8985,-7.1659 4.2994,5.7327 4.2994,12.8986 8.5989,17.1981 5.7327,5.7326 0,-18.6311 8.599,-21.4976 48.7276,-12.8984 27.2302,15.7649 61.6263,30.0966 14.3315,5.7326 4.2994,-22.9307 17.1979,-15.7649 32.9627,21.4975 10.0321,51.5941 20.0643,83.1237 1.4332,7.1658 37.2623,32.9627 45.8613,35.8291 17.198,5.7326 -4.2995,-25.797 15.7648,-14.3316 25.797,14.3316 -7.1658,54.4603 11.4654,42.9949 7.1657,-4.2995 2.8662,18.6312 8.5989,24.3639 8.599,5.7325 44.4282,7.1657 53.0272,14.3316 l 14.3316,44.4282 c 0,2.8662 -8.5989,2.8662 -7.1657,5.7325 2.8662,10.0322 35.8291,14.3317 35.8291,15.7649 -8.5991,5.7327 -18.6312,7.1658 -25.7971,12.8985 -2.8663,2.8663 -1.4331,5.7327 -2.8663,8.599 -7.1657,7.1658 -14.3316,-20.0643 -25.7969,-20.0643 -8.599,0 0,27.2301 -8.599,25.797 -5.7327,-1.4332 -24.3639,-15.7649 -24.3639,-15.7649 -2.8663,4.2995 -1.4332,12.8985 -7.1657,14.3317 -2.8665,1.4332 -4.2995,-10.0322 -5.7327,-7.1658 -7.1658,5.7326 -5.7328,15.7648 -10.0322,21.4975 -1.4331,1.4332 -4.2995,0 -5.7327,-1.4333 0,-2.8662 2.8664,-4.2994 2.8664,-7.1657 -1.4332,-7.1659 -4.2995,-14.3317 -7.1659,-20.0644 -5.7326,-10.0321 -18.6311,11.4654 -25.797,20.0644 -20.0642,22.9306 15.7649,34.3959 18.6312,45.8613 1.4332,7.1658 -5.7327,14.3316 -5.7327,21.4975 0,7.1657 8.599,12.8984 5.7327,18.6311 -2.8663,5.7326 -12.8985,5.7326 -18.6312,11.4653 -12.8985,10.0322 7.1659,15.7649 0,25.797 -5.7327,7.1659 -14.3317,11.4654 -18.6312,17.1979 -12.8984,20.0644 8.599,51.5941 -1.433,53.0273 -7.1659,1.433 -14.3317,-1.4332 -21.4976,0 h 1.4332 l -7.1658,10.032 c 0,4.2995 -1.4332,8.599 -4.2995,7.1659 2.8663,1.4331 7.1658,-1.4332 10.0321,1.4331 4.2996,4.2995 2.8664,12.8986 8.5991,17.1981 5.7326,5.7326 67.3588,8.599 65.9256,1.4331 0,-1.4331 -20.0644,-5.7326 -5.7327,-14.3317 8.599,-4.2995 18.6312,-2.8663 27.2301,-7.1658 14.3317,-7.1657 20.0644,-27.2301 35.8292,-32.9628 31.5296,-11.4653 47.2944,0 54.4603,27.2301 2.8663,-8.599 14.3317,-41.5617 -2.8663,-47.2944 -2.8664,-1.4332 1.4331,5.7327 -1.4332,5.7327 -1.4332,1.4331 -1.4332,-4.2995 -2.8664,-5.7327 -8.599,-2.8663 -2.8663,22.9307 -12.8985,4.2995 -8.599,-12.8985 -7.1658,-32.9629 -8.599,-47.2944 0,-5.7327 -10.032,-20.0644 -4.2995,-17.1981 12.8985,4.2995 10.0322,37.2623 22.9307,32.9629 42.9951,-17.198 14.3317,-21.4975 14.3317,-40.1287 0,-2.8663 2.8663,5.7327 5.7327,4.2995 4.2995,-1.4332 -7.1659,-12.8985 -2.8664,-15.7647 7.1659,-2.8665 15.7649,2.8662 22.9306,0 5.7327,-1.4333 10.0322,-7.166 12.8985,-12.8987 11.4654,-25.7969 24.3639,-57.3266 32.9629,-85.9898 1.4332,-5.7327 -10.0322,-11.4654 -7.1658,-17.1981 1.4331,-4.2995 10.0321,-5.7326 12.8985,-10.032 10.032,-18.6312 -18.6312,-15.7649 -7.1659,-31.5297 31.5296,-40.1286 74.5247,-22.9307 74.5247,-35.8291 1.433,-11.4654 -14.3317,-27.2302 -4.2995,-34.3961 7.1657,-5.7326 2.8663,22.9307 12.8984,28.6634 4.2995,4.2995 10.0321,-7.1658 17.198,-8.599 7.1658,-1.4332 15.7648,0 24.3638,-1.4332 18.6311,-2.8663 -4.2995,-34.396 -4.2995,-34.396 -1.4331,-17.1979 12.8984,-14.3316 4.2995,-28.6633 4.2994,0 8.5989,-1.4331 8.5989,1.4332 1.4332,83.1235 48.7278,55.8935 93.1559,25.7969 5.7326,-4.2995 -12.8985,10.0322 -18.6312,15.7649 -7.1659,8.599 2.8663,24.3638 -10.0322,25.797 -24.3637,4.2995 -51.5938,5.7327 -75.9577,8.599 -1.4332,0 -37.2624,0 -32.9629,4.2994 8.599,7.1658 17.1981,17.198 28.6634,20.0644 4.2995,1.4331 -2.8663,-11.4654 1.4332,-12.8986 8.599,-4.2995 18.6312,1.4332 28.6632,0 2.8664,0 14.3317,-7.1658 15.7649,1.4332 2.8663,14.3317 -32.9628,24.3639 -22.9307,34.396 4.2995,5.7327 54.4604,-5.7326 61.6261,-4.2995 4.2995,1.4332 0,11.4654 4.2995,12.8986 10.0322,4.2995 22.9307,5.7325 34.396,1.4331 11.4654,-2.8663 17.1981,-17.198 27.2301,-21.4975 10.0322,-5.7327 22.9307,-2.8663 31.5297,-7.1658 2.8664,-1.4332 -2.8663,-8.599 0,-10.0322 2.8664,-2.8663 8.599,4.2995 11.4654,2.8663 7.1657,-2.8663 2.8663,-22.9307 10.0322,-20.0642 12.8984,2.8662 24.3637,30.0964 34.3959,21.4974 7.1658,-7.1658 5.7327,-20.0644 14.3317,-25.7969 24.3637,-14.3317 -1.4332,24.3637 14.3315,38.6954 5.7327,4.2995 20.0644,-12.8985 18.6312,-5.7327 0,4.2995 -44.4281,50.1608 -53.0271,54.4603 -4.2995,1.4332 -8.599,-5.7327 -12.8985,-2.8663 -1.4332,2.8663 7.1658,5.7327 5.7327,8.599 0,0 -30.0966,27.2302 -31.5296,27.2302 -2.8664,2.8663 -5.7327,7.1657 -7.1659,11.4652 0,2.8665 4.2995,4.2995 4.2995,5.7327 -1.4331,1.4333 -53.0272,37.2624 -34.396,44.4282 35.8292,14.3316 28.6634,-10.0322 58.7598,-10.0322 10.0322,1.4332 41.5619,27.2301 51.5939,22.9306 12.8986,-4.2995 22.9307,-20.0642 40.1288,-2.8662 38.6954,40.1286 5.7326,34.3959 12.8985,57.3266 7.1658,20.0643 17.1979,27.2301 15.7647,28.6633 -5.7327,5.7326 -25.7969,5.7326 -22.9306,14.3316 4.2995,10.0322 22.9306,4.2995 32.9628,8.599 10.0322,2.8664 10.0322,12.8986 22.9307,12.8986 71.6583,-8.599 57.3266,-91.7227 103.1879,-123.2524 8.599,-7.1657 17.198,-12.8984 28.6633,-14.3316 5.7327,0 12.8984,7.1659 17.1979,4.2995 10.0322,-10.0321 1.4332,-30.0965 11.4654,-38.6955 10.0322,-7.1657 15.7648,-4.2995 18.6312,-17.1979 1.4331,-1.4332 -2.8664,0 -4.2995,-1.4332 -7.1659,-7.1658 4.2995,-21.4975 8.599,-22.9307 7.1658,-4.2995 17.198,-4.2995 25.7969,-2.8663 8.599,1.4332 14.3317,12.8985 22.9307,11.4653 10.0322,-1.4331 12.8985,-14.3316 21.4975,-18.6311 7.1659,-2.8664 15.7649,0 22.9306,-2.8664 28.6634,-10.0322 5.7327,-37.2623 8.599,-60.1929 2.8663,-11.4654 20.0644,-22.9306 12.8985,-31.5296 0,0 -58.7598,11.4652 -60.1929,12.8985 -8.599,5.7325 -1.4332,22.9306 -10.0322,27.2301 -5.7327,2.8663 -12.8985,0 -18.6312,-2.8664 -4.2994,-1.4331 -2.8662,-10.0321 -7.1657,-10.0321 -10.0322,0 -1.4332,21.4975 -7.1659,30.0965 -7.1658,7.1658 -14.3317,15.7647 -24.3638,18.6312 -24.3639,7.1657 -104.6211,-70.2253 -117.5196,-87.4232 -4.2995,-4.2995 -24.3639,-40.1287 -21.4975,-42.9949 8.599,-5.7327 17.198,15.7647 27.2302,14.3316 32.9627,-5.7327 24.3637,-71.6582 37.2622,-91.7226 4.2995,-5.7327 12.8985,-7.1658 15.7649,-12.8985 7.1658,-10.0322 7.1658,-22.9307 14.3317,-31.5296 21.4975,-28.6634 32.9627,-25.797 51.5939,-17.198 1.4332,1.4332 1.4332,-2.8664 2.8663,-4.2995 12.8986,-14.3317 -2.8663,-41.5619 31.5296,-42.9951 11.4654,-1.433 18.6312,21.4976 27.2302,15.7649 10.0322,-5.7327 -2.8663,-22.9306 1.4332,-34.3959 0,-2.8664 32.9629,-40.1286 34.3959,-40.1286 5.7327,-2.8665 12.8985,11.4652 15.7649,7.1657 2.8663,-4.2994 4.2995,-42.9949 12.8985,-50.1608 11.4653,-8.599 47.2944,-22.9307 61.6261,-25.7969 4.2995,0 5.7327,14.3317 8.599,10.0322 4.2995,-5.7327 2.8664,-15.7649 7.1659,-21.4976 z"
+ class="europe"
+ id="ua" /><path
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 6244.9816,5941.5751 c -1.433,5.7327 0,12.8984 -2.8662,18.6311 -1.4332,5.7327 -5.7327,10.0322 -8.599,15.7648 0,2.8664 27.2301,22.9307 10.0322,28.6634 -30.0966,7.1657 -20.0644,-34.396 -45.8614,-15.7648 -20.0643,14.3315 5.7327,30.0964 8.599,37.2622 1.4332,5.7327 -7.1657,10.0322 -7.1657,15.7649 1.433,5.7326 7.1657,8.599 10.032,12.8985 1.4332,5.7327 -10.032,11.4652 -15.7647,8.599 -10.0322,-5.7327 -4.2995,-28.6634 -15.7649,-30.0965 -38.6955,-7.1659 -20.0643,21.4975 -42.995,14.3316 -37.2623,-8.599 -14.3316,-37.2622 -32.9628,-40.1287 -24.3638,-4.2995 -8.599,34.3961 -8.599,37.2624 -5.7326,25.7969 -40.1286,34.3959 -40.1286,65.9256 0,14.3317 28.6633,8.599 4.2995,27.2301 -8.599,7.1659 -11.4653,-17.1979 -17.198,-24.3637 -4.2995,-4.2995 -14.3317,-1.4332 -15.7648,-7.1659 -1.4332,-5.7326 8.599,-10.0321 10.0321,-15.7648 0,-2.8664 -2.8663,-5.7327 -4.2995,-5.7327 -15.7648,-5.7327 -38.6954,-10.0322 -48.7276,-28.6632 -1.4331,-5.7327 2.8664,-11.4654 2.8664,-15.7649 0,-8.599 1.4331,-17.198 -1.4332,-25.7969 -1.4332,-1.4333 -4.2995,1.433 -7.1658,2.8662 -7.1659,5.7327 -12.8986,11.4654 -20.0644,17.198 -7.1657,5.7327 -18.6311,8.599 -21.4974,17.198 -1.4332,5.7327 11.4652,8.5991 10.0322,15.7649 0,7.1657 -40.1287,48.7276 -41.5619,48.7276 -12.8985,0 -22.9306,-17.198 -35.8291,-14.3317 -18.6312,4.2995 -57.3266,32.9629 -71.6583,7.1659 -5.7327,-8.599 -5.7327,-18.6312 -12.8985,-25.7971 -1.4332,-2.8663 -7.1659,5.7327 -8.599,2.8664 -1.4332,-4.2995 5.7326,-11.4654 2.8663,-15.7649 -1.4332,-4.2995 -10.0322,0 -12.8985,-2.8662 -8.5989,-14.3317 11.4653,-12.8985 10.0322,-21.4975 -1.4332,-7.1659 -10.0322,-10.0322 -10.0322,-17.198 -1.4332,-4.2995 10.0322,-12.8986 4.2995,-14.3316 -18.6311,-8.599 -58.7598,-8.599 -71.6582,11.4652 -2.8663,2.8664 -1.4333,5.7327 -1.4333,10.0322 1.4333,2.8663 8.599,5.7327 7.166,8.599 -8.599,17.198 -28.6634,24.3639 -45.8614,20.0644 -1.4332,0 5.7327,-2.8664 5.7327,-5.7327 0,-18.6312 14.3316,-11.4654 15.7648,-15.7649 7.1659,-22.9305 -11.4653,-42.9949 5.7327,-64.4924 10.0322,-14.3317 35.8291,-14.3317 41.5618,-30.0964 4.2995,-8.5992 -4.2995,-21.4976 0,-31.5297 5.7326,-11.4654 25.797,-7.1659 34.396,-17.1981 10.0321,-8.599 21.4974,-37.2622 34.3959,-47.2944 7.1659,-5.7327 14.3317,10.0322 15.7649,-10.0322 0,-7.1658 -21.4976,7.1659 -22.9307,0 -2.8664,-7.1658 8.599,-12.8985 12.8985,-18.6312 0,0 2.8663,1.4332 2.8663,0 0,-2.8662 -5.7326,-8.5989 -2.8663,-10.032 40.1286,-11.4654 22.9307,42.9949 71.6583,-7.1659 1.4332,0 4.2995,-2.8663 5.7327,-5.7327 l 2.8663,-2.8663 c 2.8662,-1.4332 5.7327,-1.4332 8.5989,1.4332 1.4332,1.4331 -8.5989,2.8663 -7.1657,5.7327 4.2995,8.599 70.225,-7.1659 74.5245,-7.1659 28.6634,-1.4332 2.8663,25.7969 38.6955,7.1659 1.4332,-1.4332 -2.8663,-8.5991 0,-10.0322 4.2994,-2.8664 20.0643,-4.2995 14.3316,-5.7327 -8.5989,-1.4332 -17.1979,1.4332 -25.7969,0 -4.2995,-1.4332 20.0642,-40.1286 41.5618,-18.6312 2.8663,2.8665 -4.2995,8.599 -2.8664,12.8985 1.4332,2.8664 7.1659,4.2995 10.0322,2.8664 2.8663,-1.4332 -1.4332,-11.4654 0,-8.599 5.7327,2.8663 5.7327,12.8985 11.4654,15.7648 0,0 47.2944,-2.8663 48.7276,-2.8663 14.3316,2.8663 24.3638,17.198 37.2622,24.3638 v 1.4332 c 0,10.0322 18.6312,12.8984 12.8985,27.2301 -1.4331,2.8663 -7.1658,1.4332 -8.599,2.8663 -4.2995,7.1659 -18.631,58.7598 -15.7647,60.193 2.8663,1.4331 50.1608,5.7327 51.5939,5.7327 2.8664,2.8663 -4.2995,7.1658 -1.4331,10.0321 7.1658,8.599 15.7648,14.3317 25.797,18.6312 22.9306,11.4654 27.2301,-27.2302 42.9949,-24.3638 4.2995,0 7.1659,1.4331 10.0322,2.8663 l -1.4333,12.8985 c -1.433,4.2995 -2.8662,7.1657 0,8.599 z"
+ class="europe"
+ id="ch" /><path
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 8254.28,5435.6676 c 20.0643,-10.0322 32.9628,-1.4332 48.7276,11.4654 30.0965,21.4974 35.8292,57.3266 60.1929,81.6903 40.1287,38.6956 149.0493,107.4874 161.9478,163.381 10.0322,35.8291 -2.8663,75.9577 5.7327,111.7869 2.8663,15.7647 28.6633,51.5939 27.2301,67.3588 0,5.7327 -11.4654,7.1658 -10.0322,12.8985 1.4333,5.7327 10.0322,2.8662 14.3317,5.7327 4.2995,2.8662 4.2995,12.8984 10.0322,12.8984 7.1658,1.4331 1.4331,-15.7649 7.1658,-17.1979 8.599,-1.4332 17.198,1.433 24.3639,0 10.032,-1.4332 -11.4654,-32.9629 1.433,-53.0273 4.2995,-5.7325 12.8985,-10.032 18.6312,-17.1979 7.1659,-10.0321 -12.8985,-15.7648 0,-25.797 5.7327,-5.7327 15.7649,-5.7327 18.6312,-11.4653 2.8663,-5.7327 -5.7327,-11.4654 -5.7327,-18.6311 0,-7.1659 7.1659,-14.3317 5.7327,-21.4975 -2.8663,-11.4654 -38.6954,-22.9307 -18.6312,-45.8613 7.1659,-8.599 20.0644,-30.0965 25.797,-20.0644 2.8664,5.7327 5.7327,12.8985 7.1659,20.0644 0,2.8663 -2.8664,4.2995 -2.8664,7.1657 1.4332,1.4333 4.2996,2.8665 5.7327,1.4333 4.2994,-5.7327 2.8664,-15.7649 10.0322,-21.4975 1.4332,-2.8664 2.8662,8.599 5.7327,7.1658 5.7325,-1.4332 4.2994,-10.0322 7.1657,-14.3317 0,0 18.6312,14.3317 24.3639,15.7649 8.599,1.4331 0,-25.797 8.599,-25.797 11.4653,0 18.6312,27.2301 25.7969,20.0643 1.4332,-2.8663 0,-5.7327 2.8663,-8.599 7.1659,-5.7327 17.198,-7.1658 25.7971,-12.8985 0,-1.4332 -32.9629,-5.7327 -35.8291,-15.7649 -1.4332,-2.8663 7.1657,-2.8663 7.1657,-5.7325 l -14.3316,-44.4282 c -8.599,-7.1659 -44.4282,-8.5991 -53.0272,-14.3316 -5.7327,-5.7327 -1.4332,-28.6634 -8.5989,-24.3639 -18.6312,11.4654 14.3316,-28.6633 -11.4654,-42.9949 -20.0643,-11.4654 1.4332,20.0642 -15.7648,14.3316 -8.599,-2.8664 -44.4281,-28.6633 -45.8613,-35.8291 -10.0322,-31.5296 12.8984,-61.6262 -20.0643,-83.1237 -12.8985,-7.1658 -2.8664,21.4975 -17.1979,15.7649 -34.3961,-14.3317 -12.8987,-42.995 -61.6263,-30.0966 -8.599,2.8665 -2.8663,27.2302 -8.599,21.4976 -4.2995,-4.2995 -4.2995,-11.4654 -8.5989,-17.1981 -2.8663,-2.8663 -10.0322,18.6312 -12.8985,7.1659 -1.4332,-5.7327 5.7327,-20.0644 0,-18.6311 -11.4653,1.4332 -21.4975,11.4652 -31.5297,11.4652 -4.2995,0 0,-10.032 -4.2995,-12.8985 -12.8984,-10.032 -30.0964,-15.7647 -45.8613,-17.1979 -38.6954,-2.8663 -30.0964,18.6312 -57.3266,31.5296 -2.8663,1.4332 -57.3266,8.599 -57.3266,10.0322 0,5.7327 7.1658,8.599 7.1658,14.3317 1.4332,5.7326 -11.4653,-8.599 -15.7648,-5.7327 -5.7327,2.8663 -2.8664,11.4653 -4.2995,17.198 z"
+ class="europe"
+ id="md" /><path
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 5033.9567,6695.4203 c -64.4925,18.6311 -28.6633,-34.3961 -25.7969,-34.3961 37.2622,-2.8663 40.1286,15.7649 25.7969,34.3961 z"
+ class="europe"
+ id="ad" /><path
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 5774.9033,6543.5047 c 11.4654,0 21.4976,-10.0322 21.4976,-20.0644 0,-10.0322 -10.0322,-18.6312 -21.4976,-18.6312 -11.4653,0 -21.4974,8.599 -21.4974,18.6312 0,10.0322 10.0321,20.0644 21.4974,20.0644 11.4654,0 -11.4653,0 0,0 z"
+ class="europe"
+ id="mc" /><path
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 6123.1627,5875.6495 7.1658,15.7647 v 17.198 c -7.1658,0 -11.4653,-1.4331 -12.8985,-1.4331 -1.4332,-1.4332 2.8663,-15.7649 5.7327,-31.5296 z"
+ class="europe"
+ id="li" /><path
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 7579.2613,4400.9232 c -31.5297,-42.995 -1.4332,-81.6905 -10.0322,-96.0221 -4.2995,-5.7327 -10.0321,-10.0322 -15.7648,-12.8985 -2.8663,-1.4332 -7.1658,2.8663 -8.599,1.4331 -5.7327,-4.2995 -2.8663,-15.7648 -8.599,-17.198 -20.0643,-5.7326 -40.1286,12.8985 -61.6261,12.8985 -2.8664,0 1.4331,-4.2995 -1.4332,-5.7326 -18.6311,-5.7327 -47.2945,-4.2995 -64.4925,-14.3317 -4.2995,-2.8663 -4.2995,-10.0321 -8.599,-11.4653 -4.2995,0 -5.7326,5.7326 -10.0321,7.1658 1.4331,4.2995 1.4331,7.1658 0,10.0322 -1.4332,2.8663 -8.599,-1.4332 -8.599,1.4331 -1.4332,15.7649 18.6311,30.0965 14.3316,45.8614 -4.2995,18.6311 -80.2572,17.1979 -77.3909,8.599 1.4331,-2.8664 2.8663,-5.7327 4.2995,-8.599 -15.7648,17.1979 -32.9628,14.3316 -55.8935,20.0643 -2.8663,0 -7.1658,-1.4332 -7.1658,1.4331 -1.4332,11.4654 4.2995,22.9307 4.2995,34.396 0,20.0644 -10.0322,41.5618 -27.2302,58.7598 81.6905,11.4654 275.1679,4.2995 341.0935,-34.3959 0,0 0,0 1.4332,-1.4332 z m -222.1407,-137.584 c 0,0 -1.4332,0 -1.4332,0 -1.4332,4.2995 -4.2995,10.0322 -5.7327,14.3317 2.8664,-4.2995 5.7327,-10.0322 7.1659,-14.3317 z"
+ class="europe ru"
+ id="ru-kgd" /><path
+ sodipodi:nodetypes="cccc"
+ style="display:inline;opacity:1;fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;enable-background:new"
+ d="m 4630.6239,4351.3664 c -7.1658,1.4333 -14.3317,1.4333 -21.4974,5.7327 -5.7328,4.2995 -7.166,14.3316 -12.8985,20.0643 -61.6263,55.8935 37.2622,41.5618 34.3959,-25.797 z"
+ class="europe"
+ id="im" />
+
+
+<path
+ d="m 4736.7888,3126.2627 c -1.4332,12.8984 -4.2995,35.8292 -4.2995,35.8292 0,0 2.8663,-22.9308 4.2995,-35.8292 z m 21.4974,-140.4503 c -17.1979,35.8292 7.1658,-8.599 11.4653,12.8985 0,2.8663 -7.1658,2.8663 -7.1658,4.2996 2.8663,5.7325 14.3317,4.2995 14.3317,10.0321 0,10.0321 -2.8664,27.2301 -12.8985,27.2301 -8.5989,-1.4331 1.4331,-18.6311 0,-27.2301 -4.2995,-14.3317 -47.2945,-30.0964 -5.7327,-27.2302 z"
+ style="fill:#fff7df;fill-opacity:1;stroke:#aa805d;stroke-width:4.58365;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="fo"
+ inkscape:label="#fo" /></g>
+
+
+</svg>
diff --git a/examples/quick/quickshapes/weatherforecast/assets/OFL.txt b/examples/quick/quickshapes/weatherforecast/assets/OFL.txt
new file mode 100644
index 0000000000..d3a046cf57
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/assets/OFL.txt
@@ -0,0 +1,93 @@
+Copyright 2019 The Work Sans Project Authors (https://github.com/weiweihuanghuang/Work-Sans)
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/examples/quick/quickshapes/weatherforecast/assets/WorkSans-Regular.ttf b/examples/quick/quickshapes/weatherforecast/assets/WorkSans-Regular.ttf
new file mode 100644
index 0000000000..20c7240371
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/assets/WorkSans-Regular.ttf
Binary files differ
diff --git a/examples/quick/quickshapes/weatherforecast/assets/apache.txt b/examples/quick/quickshapes/weatherforecast/assets/apache.txt
new file mode 100644
index 0000000000..989e2c59e9
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/assets/apache.txt
@@ -0,0 +1,201 @@
+Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License. \ No newline at end of file
diff --git a/examples/quick/quickshapes/weatherforecast/assets/attribution.txt b/examples/quick/quickshapes/weatherforecast/assets/attribution.txt
new file mode 100644
index 0000000000..7d71070406
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/assets/attribution.txt
@@ -0,0 +1,10 @@
+The SVG files in this directory are converted to QML using the svgtoqml tool. They are not directly
+used by the example, but are provided as .svg for users who might want to modify them on their own.
+The font file is required to build the example.
+
+The following third-party assets are used in this example:
+
+- Weather icons from the Noto Emoji collection: https://www.svgrepo.com/collection/noto-emojis/ (Author: googlefonts, License: Apache, see apache.txt))
+- "Europe.svg" is a modified version of https://commons.wikimedia.org/wiki/File:Europ%C3%A4ische_Wirtschafts-_und_W%C3%A4hrungsunion-2009.svg (Cc-by-3.0 license)
+- "Work Sans" font by Wei Huang (Licensed under Open Font License, see OFL.txt)
+- "gear alt fill" from "Framework7 iOS icons" by Framework7. (licensed under MIT license)
diff --git a/examples/quick/quickshapes/weatherforecast/assets/cloud-svgrepo-com.svg b/examples/quick/quickshapes/weatherforecast/assets/cloud-svgrepo-com.svg
new file mode 100644
index 0000000000..2dac977b7c
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/assets/cloud-svgrepo-com.svg
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
+
+<svg
+ width="800px"
+ height="800px"
+ viewBox="0 0 128 128"
+ aria-hidden="true"
+ role="img"
+ class="iconify iconify--noto"
+ preserveAspectRatio="xMidYMid meet"
+ version="1.1"
+ id="svg1047"
+ sodipodi:docname="cloud-svgrepo-com.svg"
+ inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs1051" />
+ <sodipodi:namedview
+ id="namedview1049"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ showgrid="false"
+ inkscape:zoom="0.805"
+ inkscape:cx="399.37888"
+ inkscape:cy="400"
+ inkscape:window-width="3840"
+ inkscape:window-height="2065"
+ inkscape:window-x="1200"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg1047" />
+ <path
+ d="M23.45 62.3c.72-.72-1.27-9.29 7.6-15.91s14.92-2.67 15.77-2.96c.84-.28 4.79-17.6 21.4-22.1s33.93 3.94 38.01 18.02c3.73 12.87.84 21.54 1.27 22.1c.42.56 8.45.28 13.09 7.74s2.96 12.11 2.96 12.11l-29.56 9.15h-47.3S5.02 79.47 4.6 77.5c-.42-1.97.53-8.37 7.32-12.25c5.9-3.37 10.26-1.68 11.53-2.95z"
+ fill="#e4eaee"
+ id="path1043" />
+ <path
+ d="M35.16 92.84s-15.78 3.3-26.45-4.96C2.29 82.9 4.63 74.83 4.63 74.83s4.6 4.65 13.89 5.91c9.29 1.27 19.71.84 19.71.84s2.6 4.44 12.39 6.48c12.27 2.55 18.74-3.73 18.74-3.73s3.36 4.02 15.19 4.3c11.83.28 18.46-7.98 19.57-8.17c.56-.09 3.82 2.87 10.28 1.83c6.15-.99 9.39-3.66 9.39-3.66s.89 6.62-5.3 10.7c-4.83 3.18-13.23 3.52-13.23 3.52s-1.28 4.91-7.05 8.48c-5.36 3.33-14.6 4.44-21.44 2.4c-8.59-2.56-10.72-6.47-10.72-6.47s-6.4 3.75-16.4 2.48c-9.45-1.18-14.49-6.9-14.49-6.9z"
+ fill="#bacdd2"
+ id="path1045"
+ style="stroke:none;stroke-opacity:1" />
+ <path
+ id="path1183"
+ style="stroke-width:6.25;fill:none;stroke:#000000;stroke-opacity:1"
+ d="M 484.66211 125.7207 C 465.45998 125.60837 445.83984 128.03906 426.375 133.3125 C 322.5625 161.4375 297.875 269.6875 292.625 271.4375 C 287.3125 273.25 249.5 248.5625 194.0625 289.9375 C 138.625 331.3125 151.0625 384.875 146.5625 389.375 C 138.625 397.3125 111.375 386.75 74.5 407.8125 C 44.21865 425.11613 32.528534 450.43334 29.265625 467.99414 C 29.212598 467.94196 28.9375 467.6875 28.9375 467.6875 C 28.9375 467.6875 14.3125 518.125 54.4375 549.25 C 121.125 600.875 219.75 580.25 219.75 580.25 C 219.75 580.25 251.25 616 310.3125 623.375 C 372.8125 631.3125 412.8125 607.875 412.8125 607.875 C 412.8125 607.875 426.125 632.3125 479.8125 648.3125 C 522.5625 661.0625 580.3125 654.125 613.8125 633.3125 C 649.875 611 657.875 580.3125 657.875 580.3125 C 657.875 580.3125 710.375 578.1875 740.5625 558.3125 C 770.74033 538.42146 773.97809 508.95537 773.94922 496.91797 C 774.56495 484.39547 772.04478 461.95157 753.6875 432.4375 C 724.6875 385.8125 674.5 387.5625 671.875 384.0625 C 669.1875 380.5625 687.25 326.375 663.9375 245.9375 C 643.21875 174.4375 567.87135 126.20749 484.66211 125.7207 z "
+ transform="scale(0.16)" />
+</svg>
diff --git a/examples/quick/quickshapes/weatherforecast/assets/cloud-with-lightning-and-rain-svgrepo-com.svg b/examples/quick/quickshapes/weatherforecast/assets/cloud-with-lightning-and-rain-svgrepo-com.svg
new file mode 100644
index 0000000000..78a958817c
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/assets/cloud-with-lightning-and-rain-svgrepo-com.svg
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
+<svg width="800px" height="800px" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--noto" preserveAspectRatio="xMidYMid meet"><path d="M78 67.82l-22.83 3.97s-7.6 19.36-8.07 20.67s-.45 3.38 1.62 3.38c2.63 0 15.98-.07 15.98-.07s-3.24 15.63-3.43 17.03s1.31 2.63 2.63 1.22s19.51-24.79 20.3-25.93c1.41-2.04.05-3.92-1.55-4.01c-1.6-.09-12.32.14-12.32.14L78 67.82z" fill="#feca18"></path><path d="M71.92 70.54s-5.09 11.26-5.28 11.9c-.56 1.9 1.9 2.67 2.6 1.13c.7-1.55 6.76-14.08 6.76-14.08l-4.08 1.05z" fill="#fdb900"></path><path d="M49.99 92.17c1.34-.04 13.1-.07 14.08-.14c1.83-.14 2.11 2.39 0 2.39c-2.19 0-13.73.04-14.43.07c-1.62.08-1.84-2.25.35-2.32z" fill="#fdb900"></path><path d="M59.42 69.01s-6 15.06-6.34 16.19c-1.41 4.72 3.66 4.58 5 1.9c.66-1.33 7.11-14.99 7.39-17.46c.28-2.46-6.05-.63-6.05-.63z" fill="#ffe36a"></path><path d="M61.01 86.57c-.86-.59-1.9-.07-2.53.92c-.63.99-1.55 2.6-.14 3.45c1.27.76 2.39-.77 2.89-1.48c.49-.71 1.12-1.98-.22-2.89z" fill="#ffe36a"></path><path d="M71.34 89.8c-2.29-.49-3.03 1.41-3.52 3.66c-.49 2.25-2.33 9.53-2.67 11.33c-.49 2.53 1.83 2.89 2.82.56c.74-1.74 3.95-9.59 4.36-10.84c.63-1.89 1.33-4.21-.99-4.71z" fill="#ffe36a"></path><path d="M107.92 46.26s2.6-34.98-27.31-39.42C53.72 2.85 48.44 28.38 48.44 28.38s-10.16-2.37-17.46 4.15c-7.25 6.48-6.69 14.15-6.69 14.15S6.41 43.86 4.58 59.21C2.87 73.55 24.01 69.98 24.01 69.98l100.38-7.39s2.38-7.54-5.21-13.23c-4.51-3.39-11.26-3.1-11.26-3.1z" fill="#e4eaee"></path><radialGradient id="IconifyId17ecdb2904d178eab6090" cx="65.811" cy="75.277" r="29.434" fx="52.634" fy="75.403" gradientTransform="matrix(.0288 -.9996 1.4975 .0432 -48.813 137.809)" gradientUnits="userSpaceOnUse"><stop offset=".193" stop-color="#ffe366"></stop><stop offset=".331" stop-color="#eddd82"></stop><stop offset=".571" stop-color="#d0d4ad"></stop><stop offset=".759" stop-color="#bfcfc7"></stop><stop offset=".87" stop-color="#b8cdd1"></stop></radialGradient><path d="M53.81 54.19c.84-.28 5.63 3.81 19.43 3.94c18.96.19 33.32-10.98 33.32-10.98s.48 3.4-1.03 5.82c-1.88 3-4.79 3.57-4.79 3.57s5.26 3.66 12.48 3.1c6.51-.51 11.22-2.72 11.22-2.72s.63 3.21.28 6.34c-.7 6.24-4.36 8.78-8.4 9.24c-2.97.34-28.34.46-38.76.56c-9.39.09-57.24 1.29-62.13.75c-5.07-.56-8.92-3.61-10.32-7.98c-1.07-3.31-.56-5.44-.56-5.44s9.32 2.47 14.55 1.88c6.57-.75 10.98-4.88 10.98-4.88s3.94 2.25 12.67 1.5c7.51-.66 11.06-4.7 11.06-4.7z" fill="url(#IconifyId17ecdb2904d178eab6090)"></path><path d="M103.9 74.2c-1.02-.57-4.65 2.82-6.69 4.86c-1.25 1.25-5.23 4.52-5.77 7.67c-1.34 7.74 7.53 9.5 11.05 5.91c2.66-2.71 2.18-8 2.18-9.78c.01-2.47.5-7.96-.77-8.66z" fill="#52c0ee"></path><path d="M31.02 78.36c-.97-.56-4.45 2.72-6.41 4.71c-1.2 1.21-5.01 4.38-5.55 7.46c-1.32 7.55 7.13 9.32 10.51 5.84c2.55-2.63 2.13-7.8 2.14-9.54c.01-2.41.51-7.77-.69-8.47z" fill="#52c0ee"></path><path d="M47.15 100.74c-1.09-.41-4.76 2.93-6.8 4.97c-1.25 1.25-4.95 4.45-5.49 7.6c-1.34 7.74 7.25 9.57 10.77 5.98c2.66-2.71 2.22-8 2.18-9.78c-.1-4.64.09-8.49-.66-8.77z" fill="#52c0ee"></path><path d="M97.78 84.22c-1.4-.73-3.1-.42-4.18 1.83c-1.08 2.25-.19 4.04.94 4.55c1.3.6 2.91.05 3.99-1.78s.42-3.99-.75-4.6z" fill="#b2e6fe"></path><path d="M40.01 110.93c-1.44-.5-3.02.03-3.74 2.34c-.72 2.31.39 3.89 1.54 4.23c1.33.39 2.79-.36 3.57-2.27c.77-1.91-.17-3.88-1.37-4.3z" fill="#b2e6fe"></path><path d="M24.07 87.97c-1.52-.42-3.12.23-3.7 2.66c-.58 2.43.66 3.99 1.87 4.25c1.4.31 2.85-.56 3.53-2.58c.67-2-.42-3.98-1.7-4.33z" fill="#b2e6fe"></path></svg> \ No newline at end of file
diff --git a/examples/quick/quickshapes/weatherforecast/assets/cloud-with-lightning-svgrepo-com.svg b/examples/quick/quickshapes/weatherforecast/assets/cloud-with-lightning-svgrepo-com.svg
new file mode 100644
index 0000000000..88ff853912
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/assets/cloud-with-lightning-svgrepo-com.svg
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
+
+<svg
+ width="800px"
+ height="800px"
+ viewBox="0 0 128 128"
+ aria-hidden="true"
+ role="img"
+ class="iconify iconify--noto"
+ preserveAspectRatio="xMidYMid meet"
+ version="1.1"
+ id="svg1314"
+ sodipodi:docname="cloud-with-lightning-svgrepo-com.svg"
+ inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs1318" />
+ <sodipodi:namedview
+ id="namedview1316"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ showgrid="false"
+ inkscape:zoom="0.805"
+ inkscape:cx="399.37888"
+ inkscape:cy="400"
+ inkscape:window-width="3840"
+ inkscape:window-height="2065"
+ inkscape:window-x="1200"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg1314" />
+ <path
+ d="M79.83 71.24L57 75.21s-7.6 19.36-8.07 20.67c-.47 1.31-.45 3.38 1.62 3.38c2.63 0 15.98-.07 15.98-.07s-3.24 15.63-3.43 17.03s1.31 2.63 2.63 1.22c1.31-1.41 19.51-24.79 20.3-25.93c1.41-2.04.05-3.92-1.55-4.01c-1.6-.09-12.32.14-12.32.14l7.67-16.4z"
+ fill="#feca18"
+ id="path1287"
+ style="stroke:#b0ab9d;stroke-opacity:1" />
+ <path
+ d="M73.71 75.04s-5.09 11.26-5.28 11.9c-.56 1.9 1.9 2.67 2.6 1.13c.7-1.55 6.76-14.08 6.76-14.08l-4.08 1.05z"
+ fill="#fdb900"
+ id="path1289" />
+ <path
+ d="M50.83 96.3c1.34-.04 13.1-.07 14.08-.14c1.83-.14 2.11 2.39 0 2.39c-2.19 0-13.73.04-14.43.07c-1.62.08-1.83-2.25.35-2.32z"
+ fill="#fdb900"
+ id="path1291" />
+ <path
+ d="M59.98 75.96s-6 15.06-6.34 16.19c-1.41 4.72 3.66 4.58 5 1.9c.66-1.33 7.11-14.99 7.39-17.46c.29-2.46-6.05-.63-6.05-.63z"
+ fill="#ffe36a"
+ id="path1293" />
+ <path
+ d="M62.52 91.16c-.86-.59-1.9-.07-2.53.92c-.63.99-1.55 2.6-.14 3.45c1.27.76 2.39-.77 2.89-1.48c.48-.7 1.11-1.97-.22-2.89z"
+ fill="#ffe36a"
+ id="path1295" />
+ <path
+ d="M72.09 94.4c-2.29-.49-3.03 1.41-3.52 3.66c-.49 2.25-2.33 9.53-2.67 11.33c-.49 2.53 1.83 2.89 2.82.56c.74-1.74 3.95-9.59 4.36-10.84c.63-1.89 1.33-4.22-.99-4.71z"
+ fill="#ffe36a"
+ id="path1297" />
+ <path
+ d="M107.35 50.2s1.29-34.78-27.45-39C53.01 7.26 48.23 32.6 48.23 32.6s-11.68-2.67-18.02 4.79s-6.48 13.23-6.48 13.23s-17.6-1.69-19.15 12.67s11.54 8.45 11.54 8.45l107.13-4.72s2.95-8.03-4.65-13.73c-4.49-3.37-11.25-3.09-11.25-3.09z"
+ fill="#e4eaee"
+ id="path1299" />
+ <radialGradient
+ id="IconifyId17ecdb2904d178eab6089"
+ cx="65.427"
+ cy="79.054"
+ r="29.294"
+ fx="52.312"
+ fy="79.18"
+ gradientTransform="matrix(.0288 -.9996 1.4975 .0432 -54.843 141.038)"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset=".193"
+ stop-color="#ffe366"
+ id="stop1301" />
+ <stop
+ offset=".331"
+ stop-color="#eddd82"
+ id="stop1303" />
+ <stop
+ offset=".571"
+ stop-color="#d0d4ad"
+ id="stop1305" />
+ <stop
+ offset=".759"
+ stop-color="#bfcfc7"
+ id="stop1307" />
+ <stop
+ offset=".87"
+ stop-color="#b8cdd1"
+ id="stop1309" />
+ </radialGradient>
+ <path
+ d="M58.78 55.69c.84-.28 6.05 4.22 19.85 3.8s26.61-7.32 26.61-7.32s-.7 4.93-2.25 7.32s-4.22 5.21-4.22 5.21s7.18 1.69 13.66.84c6.48-.84 11.26-3.94 11.26-3.94s.84 3.24.28 6.34c-.72 3.97-4.22 6.9-7.18 7.32s-29.56 1.76-39.98 2.11c-8.45.29-56.63.68-61.52.14c-5.07-.56-8.87-2.82-10.28-7.18c-1.07-3.31-.56-5.35-.56-5.35s6.36 2.73 11.54 1.83c6.48-1.13 10-6.19 10-6.19s6.34 3.24 15.49 2.11c9.14-1.13 17.3-7.04 17.3-7.04z"
+ fill="url(#IconifyId17ecdb2904d178eab6089)"
+ id="path1312" />
+ <path
+ id="path1377"
+ style="stroke-width:6.25;fill:none;stroke:#b0ab9d;stroke-opacity:1"
+ d="M 462.46484 67.416016 C 326.82772 69.1539 301.4375 203.75 301.4375 203.75 C 301.4375 203.75 228.4375 187.0625 188.8125 233.6875 C 149.1875 280.3125 148.3125 316.375 148.3125 316.375 C 148.3125 316.375 38.3125 305.8125 28.625 395.5625 C 28.219648 399.31789 27.988274 402.83249 27.890625 406.15625 C 27.88823 406.15523 27.8125 406.125 27.8125 406.125 C 27.8125 406.125 24.625 418.875 31.3125 439.5625 C 40.125 466.8125 63.875 480.9375 95.5625 484.4375 C 126.125 487.8125 427.25 485.375 480.0625 483.5625 C 545.1875 481.375 711.4375 473 729.9375 470.375 C 748.4375 467.75 770.3125 449.4375 774.8125 424.625 C 778.04161 406.74956 773.86966 388.33772 773.19727 385.5625 C 771.11652 369.23452 763.28052 349.58539 741.25 333.0625 C 713.1875 312 670.9375 313.75 670.9375 313.75 C 670.9375 313.75 679 96.375 499.375 70 C 486.24512 68.076172 473.95951 67.268737 462.46484 67.416016 z "
+ transform="scale(0.16)" />
+</svg>
diff --git a/examples/quick/quickshapes/weatherforecast/assets/cloud-with-rain-svgrepo-com.svg b/examples/quick/quickshapes/weatherforecast/assets/cloud-with-rain-svgrepo-com.svg
new file mode 100644
index 0000000000..93f690c7bb
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/assets/cloud-with-rain-svgrepo-com.svg
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
+<svg width="800px" height="800px" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--noto" preserveAspectRatio="xMidYMid meet"><path d="M107.62 46.29s1.72-32.32-23.89-38.72C54.12.17 48.29 28.49 48.29 28.49s-11.55-2.19-18.74 5.62c-6.03 6.55-5.46 12.96-5.46 12.96s-7.96-1.72-14.21 3.75s-5.31 10.61-5.31 10.61l18.58 7.18s93.83.47 94.3.16c.47-.31 6.25-9.37 6.25-9.37s-.94-7.81-6.4-10.93c-5.47-3.12-9.68-2.18-9.68-2.18z" fill="#e2ebee"></path><path d="M14.25 73.45c4.68.16 35.29.78 53.86.62s46.81.14 50.73-1.71c3.07-1.45 4.9-3.85 5.19-7.21c.28-3.21-.34-5.75-.34-5.75s-4.37 3.16-12.65 3.28c-5.15.07-15.61-.78-13.58-2.65c.57-.53 8.66-6.66 8.27-12.33c-.09-1.34-7.34 5.31-14.21 8.12c-6.87 2.81-13.39 4.98-22.47 4.4c-7.65-.5-10.97-3.61-10.97-3.61s-3.69 4.33-14.78 5.26c-11.09.94-13.48-3.23-13.48-3.23s-5.37 4.06-14.39 3.94c-9-.14-10.77-3.38-10.77-3.38s-.85 5.77 1.03 9.14c1.92 3.43 5.41 5.01 8.56 5.11z" fill="#b9ced2"></path><path d="M69.99 81.57c-1.71-.6-7.81 4.23-10.56 9c-2.76 4.79-.96 8.29 1.99 9.73c3.32 1.62 8.1.62 9.46-4.1c1.34-4.67.95-13.98-.89-14.63z" fill="#4fc4f8"></path><path d="M37.66 79.19c-1.55-.55-6.58 4.12-8.84 6.64c-3.03 3.39-5.37 9.71.38 12.27c5.79 2.57 9.55-1.64 9.84-7.46c.28-5.42-.1-10.99-1.38-11.45z" fill="#4fc4f8"></path><path d="M49.87 101.65c-1.65-.89-8.58 5.26-10.79 8.93c-2.2 3.67-2.06 8.38 2.44 10.31s8.47-.54 9.3-6.97c.58-4.56.64-11.41-.95-12.27z" fill="#4fc4f8"></path><path d="M83.38 102.18c-1.19-.67-9.43 5.69-11.28 10.32c-3.67 9.19 8.87 13.29 11.72 4.65c1.66-5.04 1.03-14.14-.44-14.97z" fill="#4fc4f8"></path><path d="M103.87 82.37c-1.63-1-8.48 4.64-10.76 8.88c-2.88 5.36-.64 9.4 2.5 10.68c3.26 1.32 7.45.05 8.87-4.78c2.05-6.96.97-13.8-.61-14.78z" fill="#4fc4f8"></path><path d="M96.4 91.09c-1.08.13-2.42 1.67-2.63 4.3s1.45 3.96 3.13 3.29c1.58-.63 1.84-2.88 1.84-4.3s-.67-3.5-2.34-3.29z" fill="#aee6fd"></path><path d="M63 90.26c-1.14-.32-3.26 1.44-3.63 4.29c-.29 2.2.56 3.53 2.27 3.66c2.38.18 3.13-2.75 3.07-4.54c-.04-1.02-.22-2.99-1.71-3.41z" fill="#aee6fd"></path><path d="M42.45 109.79c-1.06-.08-2.84 1.7-2.84 4.47s1.44 3.97 3.14 3.6c1.7-.38 2.04-3.63 1.93-4.92c-.11-1.29-.66-3.03-2.23-3.15z" fill="#aee6fd"></path><path d="M30.91 88.44c-1.43-.41-3.26 1.4-3.48 3.44c-.23 2.04.72 3.52 2.23 3.75c1.51.23 2.8-1.59 2.95-3.71c.16-2.12-.37-3.11-1.7-3.48z" fill="#aee6fd"></path><path d="M76.4 110.97c-1.32-.11-3.21 1.84-3.16 4.79s1.58 3.45 2.59 3.51c1.45.09 2.46-1.62 2.59-4.3c.11-2.25-.4-3.87-2.02-4z" fill="#aee6fd"></path></svg> \ No newline at end of file
diff --git a/examples/quick/quickshapes/weatherforecast/assets/cloud-with-snow-svgrepo-com.svg b/examples/quick/quickshapes/weatherforecast/assets/cloud-with-snow-svgrepo-com.svg
new file mode 100644
index 0000000000..978570a9cd
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/assets/cloud-with-snow-svgrepo-com.svg
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
+<svg width="800px" height="800px" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--noto" preserveAspectRatio="xMidYMid meet"><path d="M108.55 45.69s1.97-34.42-27.94-38.86C53.72 2.85 48.44 28.38 48.44 28.38s-9.52-2.44-16.82 4.08C24.36 38.93 25 46.11 25 46.11S6.84 44.28 5.01 59.63c-1.71 14.34 19 10.35 19 10.35l100.38-7.39s2.38-7.54-5.21-13.23c-4.51-3.39-10.63-3.67-10.63-3.67z" fill="#e4eaee"></path><path d="M56.95 55.83c.84-.28 3.37 2.96 17.18 2.96c14.36 0 32.1-12.11 32.1-12.11s-.07 4.74-1.55 7.18c-1.97 3.24-6.48 5.07-6.48 5.07s6.48 2.67 15.06 1.97c6.51-.53 11.17-3.99 11.17-3.99s.63 3.21.28 6.34c-.7 6.24-4.32 8.02-8.35 8.49c-2.97.34-28.39 1.21-38.81 1.31c-9.39.09-56.96.21-61.85-.33c-5.07-.56-8.87-3.24-10.28-7.6C4.35 61.81 5 58.64 5 58.64s5.77 2.25 12.67 2.25c6.61 0 11.54-3.1 11.54-3.1s5.21 3.57 13.94 2.82c7.54-.64 13.8-4.78 13.8-4.78z" fill="#b9ced2"></path><path d="M104.07 81.59s2.25-3.66 2.85-4.4c.6-.74 1.62-1.55 2.89-.84c1.27.7.84 2.15.49 2.78c-.35.63-2.46 4.72-2.46 4.72s3.98.04 4.86.04s2.46.7 2.46 2.25c0 1.34-.63 2.18-2.15 2.25s-5.31.07-5.31.07s2.04 3.34 2.64 4.36c.6 1.02.67 2.25-.21 2.99c-1.13.95-2.6.42-3.48-.95c-.66-1.04-2.71-4.01-2.71-4.01s-2.43 3.52-3.06 4.29c-.63.77-1.79 1.69-2.96.81c-1.44-1.09-.61-2.32 0-3.27l2.6-4.08s-4.43-.11-5.7-.11c-1.27 0-2.36-.7-2.29-2.15c.07-1.48.99-2.08 2.5-2.11c1.51-.04 5.53-.04 5.53-.04s-2.46-3.52-3.1-4.54c-.63-1.02-.7-2.32.28-3.06c.99-.74 2.15-.32 2.89.63s3.44 4.37 3.44 4.37z" fill="#92c9f4"></path><path d="M65.21 85.22s2.25-3.66 2.85-4.4c.6-.74 1.62-1.55 2.89-.84c1.27.7.84 2.15.49 2.78c-.35.63-2.46 4.72-2.46 4.72s3.98.04 4.86.04s2.46.7 2.46 2.25c0 1.34-.63 2.18-2.15 2.25c-1.51.07-5.31.07-5.31.07s2.04 3.34 2.64 4.36s.67 2.25-.21 2.99c-1.13.95-2.6.42-3.48-.95c-.66-1.04-2.71-4.01-2.71-4.01s-2.43 3.52-3.06 4.29c-.63.77-1.79 1.69-2.96.81c-1.44-1.09-.61-2.32 0-3.27l2.6-4.08s-4.43-.11-5.7-.11c-1.27 0-2.36-.7-2.29-2.15c.07-1.48.99-2.08 2.5-2.11c1.51-.04 5.53-.04 5.53-.04s-2.46-3.52-3.1-4.54c-.63-1.02-.7-2.32.28-3.06c.99-.74 2.15-.32 2.89.63s3.44 4.37 3.44 4.37z" fill="#92c9f4"></path><path d="M44.19 105.43s2.25-3.66 2.85-4.4c.6-.74 1.62-1.55 2.89-.84c1.27.7.84 2.15.49 2.78c-.35.63-2.46 4.72-2.46 4.72s3.98.04 4.86.04s2.46.7 2.46 2.25c0 1.34-.63 2.18-2.15 2.25c-1.51.07-5.31.07-5.31.07s2.04 3.34 2.64 4.36c.6 1.02.67 2.25-.21 2.99c-1.13.95-2.6.42-3.48-.95c-.66-1.04-2.71-4.01-2.71-4.01s-2.43 3.52-3.06 4.29c-.63.77-1.79 1.69-2.96.81c-1.44-1.09-.61-2.32 0-3.27l2.6-4.08s-4.43-.11-5.7-.11s-2.36-.7-2.29-2.15c.07-1.48.99-2.08 2.5-2.11c1.51-.04 5.53-.04 5.53-.04s-2.46-3.52-3.1-4.54c-.63-1.02-.7-2.32.28-3.06c.99-.74 2.15-.32 2.89.63s3.44 4.37 3.44 4.37z" fill="#92c9f4"></path><path d="M26.9 82.16s2.31-3.63 2.92-4.36s1.65-1.52 2.9-.8c1.26.72.81 2.16.45 2.79s-2.54 4.68-2.54 4.68s3.98.1 4.86.11c.88.01 2.45.74 2.43 2.29c-.02 1.34-.67 2.17-2.18 2.22c-1.51.05-5.31-.01-5.31-.01s1.99 3.37 2.57 4.4s.64 2.26-.26 2.99c-1.14.93-2.61.38-3.47-1c-.65-1.05-2.65-4.05-2.65-4.05s-2.48 3.48-3.13 4.25c-.65.76-1.81 1.67-2.97.76c-1.43-1.11-.57-2.33.05-3.27l2.67-4.04s-4.43-.17-5.7-.19c-1.27-.02-2.35-.74-2.25-2.18c.09-1.48 1.02-2.06 2.53-2.07s5.53.05 5.53.05s-2.41-3.56-3.03-4.59c-.62-1.03-.67-2.33.33-3.06c1-.72 2.15-.28 2.88.68c.71.94 3.37 4.4 3.37 4.4z" fill="#92c9f4"></path><path d="M87.08 105.15s2.25-3.66 2.85-4.4c.6-.74 1.62-1.55 2.89-.84c1.27.7.84 2.15.49 2.78c-.35.63-2.46 4.72-2.46 4.72s3.98.04 4.86.04s2.46.7 2.46 2.25c0 1.34-.63 2.18-2.15 2.25s-5.31.07-5.31.07s2.04 3.34 2.64 4.36c.6 1.02.67 2.25-.21 2.99c-1.13.95-2.6.42-3.48-.95c-.66-1.04-2.71-4.01-2.71-4.01s-2.43 3.52-3.06 4.29c-.63.77-1.79 1.69-2.96.81c-1.44-1.09-.61-2.32 0-3.27l2.6-4.08s-4.43-.11-5.7-.11c-1.27 0-2.36-.7-2.29-2.15c.07-1.48.99-2.08 2.5-2.11s5.53-.04 5.53-.04s-2.46-3.52-3.1-4.54c-.63-1.02-.7-2.32.28-3.06c.99-.74 2.15-.32 2.89.63s3.44 4.37 3.44 4.37z" fill="#92c9f4"></path></svg> \ No newline at end of file
diff --git a/examples/quick/quickshapes/weatherforecast/assets/gear-alt-stroke.svg b/examples/quick/quickshapes/weatherforecast/assets/gear-alt-stroke.svg
new file mode 100644
index 0000000000..674e35b272
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/assets/gear-alt-stroke.svg
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ height="56"
+ viewBox="0 0 56 56"
+ width="56"
+ version="1.1"
+ id="svg4"
+ sodipodi:docname="gear-alt-fill.svg"
+ inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs8" />
+ <sodipodi:namedview
+ id="namedview6"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ showgrid="false"
+ inkscape:zoom="11.5"
+ inkscape:cx="28.043478"
+ inkscape:cy="28"
+ inkscape:window-width="1402"
+ inkscape:window-height="1783"
+ inkscape:window-x="1563"
+ inkscape:window-y="282"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="svg4" />
+ <path
+ d="m18.7917819 47.4333262c-2.455097-.5432286-4.7688821-1.4624372-6.8778614-2.694132l.1238514-2.4248414c.168912-3.3070638-2.38380448-5.850592-5.68212655-5.6821266l-2.68051418.1369103c-1.2552175-1.9937532-2.22519257-4.185172-2.85265254-6.5169816l2.10374479-1.8992856c2.45788604-2.2190084 2.45138898-5.8225976 0-8.0357404l-2.24327877-2.0252585c.55680792-2.282373 1.43999294-4.4368497 2.59730287-6.4111778l3.07539783.1570793c3.30706381.168912 5.85059205-2.38380448 5.68212655-5.68212655l-.1570793-3.07539783c1.9743281-1.15730993 4.1288048-2.04049495 6.4111778-2.59730287l2.0252585 2.24327877c2.2190084 2.45788604 5.8225976 2.45138898 8.0357404 0l1.8992856-2.10374479c2.3318096.62745997 4.5232284 1.59743504 6.5169869 2.85265588l-.1369156 2.68051084c-.1689119 3.30706381 2.3838045 5.85059205 5.6821266 5.68212655l2.4248414-.1238514c1.2316948 2.1089793 2.1509034 4.4227644 2.694132 6.8778614l-1.6895515 1.525347c-2.457886 2.2190084-2.4513889 5.8225976 0 8.0357404l1.5602089 1.408575c-.6165867 2.5023605-1.6256955 4.8502225-2.9582811 6.9745407l-2.0313497-.1037588c-3.3070638-.1689119-5.850592 2.3838045-5.6821266 5.6821266l.1037537 2.0313529c-2.1243131 1.3325824-4.4721751 2.3416912-6.9745356 2.9582779l-1.408575-1.5602089c-2.2190084-2.457886-5.8225976-2.4513889-8.0357404 0zm5.2082181-13.4333262c5.5228475 0 10-4.4771525 10-10s-4.4771525-10-10-10-10 4.4771525-10 10 4.4771525 10 10 10z"
+ fill-rule="evenodd"
+ transform="translate(4 4)"
+ id="path2"
+ style="fill:none;stroke:#333333;stroke-opacity:1;stroke-width:3;stroke-miterlimit:4;stroke-dasharray:none" />
+</svg>
diff --git a/examples/quick/quickshapes/weatherforecast/assets/sun-behind-cloud-svgrepo-com.svg b/examples/quick/quickshapes/weatherforecast/assets/sun-behind-cloud-svgrepo-com.svg
new file mode 100644
index 0000000000..790e64f824
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/assets/sun-behind-cloud-svgrepo-com.svg
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
+<svg width="800px" height="800px" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--noto" preserveAspectRatio="xMidYMid meet"><path d="M29.53 45.25c-7.14 9.17-7.02 25.48 2.11 33.55c10.36 9.17 24.93 9.08 34.1.64c10.99-10.11 10.36-26.95.64-36.48c-9.77-9.59-27.23-10.09-36.85 2.29z" fill="#fcc11a"></path><path d="M40.99 42.1c-2.82-1.25-5.91 2.15-7.26 4.48s-2.6 6.9.27 8.06s4.93-.81 6.99-4.21c2.06-3.4 3.22-6.89 0-8.33z" fill="#fee269"></path><path d="M48.34 29.31c-.68 1.28-.45 2.26.9 2.59c1.36.32 9.82 1.7 10.53 1.74c1.03.06 1.42-.71 1.29-1.62c-.13-.9-2.2-13.57-2.39-14.74c-.19-1.16-1.42-2.33-2.59-.78c-1.15 1.57-7.23 11.84-7.74 12.81z" fill="#ffa722"></path><path d="M70.25 38.1c-1.33.41-1.29 1.23-.58 2.26c.71 1.03 5.62 8.53 6.08 9.05s1.23.65 1.87-.13s8.72-12.09 9.31-12.8c.97-1.16.39-2.39-1.1-2c-1.14.3-14.74 3.37-15.58 3.62z" fill="#ffa722"></path><path d="M19.84 72.49c.9-1.49 2.07-1.1 2.91.32c.58.97 5.43 7.5 5.88 8.21c.45.71.65 2.07-.78 2.39c-1.42.32-12.99 3.36-14.8 3.68s-2.84-1.1-1.68-2.65c.68-.9 7.95-11.11 8.47-11.95z" fill="#ffa722"></path><path d="M17.38 61.24c1.65.74 2.43.47 2.78-.71c.45-1.55 1.81-8.66 1.87-10.28c.04-1.05-.39-2.07-2-1.81c-1.62.26-13.25 1.87-14.74 2.39c-1.73.6-1.6 2.5-.45 3.1c1.36.72 11.38 6.79 12.54 7.31z" fill="#ffa722"></path><path d="M37.48 34.1c.93-.74.65-1.81-.19-2.39c-.84-.58-11.22-8.09-12.54-9.11c-1.16-.9-2.59-.58-2.2 1.49c.28 1.48 3.59 14.48 3.81 15.38c.26 1.03 1.03 1.55 1.94.9c.91-.65 8.21-5.5 9.18-6.27z" fill="#ffa722"></path><path d="M109.13 81.18s1.45-28.45-21.58-34s-29.74 16.79-29.74 16.79s-7.68-1.79-14.8 4.13c-5.59 4.65-6.38 11.63-6.38 11.63s-7.35-1.12-13.47 4.82c-4.43 4.3-4 9.82-4 9.82l8.92 7.84l90.65-2.45l4.77-5.12s.76-5.68-4.54-9.95c-5.3-4.28-9.83-3.51-9.83-3.51z" fill="#e2ebee"></path><path d="M40.64 92.23s3.61 4.08 15.06 3.81s14.46-3.27 14.46-3.27s5.02 5.27 19.53 4.15s18.68-4.18 18.68-4.18s3.54 2.53 8.02 2.6c4.47.07 7.11-.71 7.11-.71s-.47 3.56-2.03 5.84c-1.56 2.28-4.16 4.02-8.27 3.99c-4.12-.03-16.64.08-29.35.06c-12.71-.02-49.03.19-54.4-.04c-4.09-.17-7.06-2.58-8.43-4.62c-2.19-3.26-1.83-6.7-1.83-6.7s4.12 3.23 9.68 2.99c7.6-.32 11.77-3.92 11.77-3.92z" fill="#b9ced3"></path></svg> \ No newline at end of file
diff --git a/examples/quick/quickshapes/weatherforecast/assets/sun-behind-large-cloud-svgrepo-com.svg b/examples/quick/quickshapes/weatherforecast/assets/sun-behind-large-cloud-svgrepo-com.svg
new file mode 100644
index 0000000000..dd83ecaa80
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/assets/sun-behind-large-cloud-svgrepo-com.svg
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
+<svg width="800px" height="800px" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--noto" preserveAspectRatio="xMidYMid meet"><path d="M29.12 39.22c-4.79 6.16-4.71 17.1 1.41 22.52c6.95 6.15 16.73 6.09 22.88.43c7.38-6.79 6.95-18.09.43-24.48c-6.55-6.44-18.26-6.78-24.72 1.53z" fill="#fcc11a"></path><path d="M36.81 37.11c-1.89-.84-3.97 1.44-4.87 3.01c-.9 1.56-1.74 4.63.18 5.41s3.31-.54 4.69-2.83c1.39-2.29 2.17-4.63 0-5.59z" fill="#fee269"></path><path d="M41.74 28.53c-.46.86-.3 1.52.61 1.73c.91.22 6.59 1.14 7.07 1.17c.69.04.95-.48.87-1.08s-1.47-9.11-1.6-9.89c-.13-.78-.95-1.56-1.73-.52s-4.87 7.94-5.22 8.59z" fill="#ffa722"></path><path d="M56.45 34.42c-.89.28-.87.82-.39 1.52c.48.69 3.77 5.72 4.08 6.07c.3.35.82.43 1.26-.09c.43-.52 5.85-8.11 6.25-8.59c.65-.78.26-1.6-.74-1.34c-.77.2-9.9 2.26-10.46 2.43z" fill="#ffa722"></path><path d="M22.62 57.5c.61-1 1.39-.74 1.95.22c.39.65 3.64 5.03 3.95 5.51c.3.48.43 1.39-.52 1.6c-.95.22-8.72 2.26-9.93 2.47c-1.21.22-1.91-.74-1.13-1.78c.45-.61 5.33-7.46 5.68-8.02z" fill="#ffa722"></path><path d="M20.97 49.95c1.11.49 1.63.32 1.86-.48c.3-1.04 1.21-5.81 1.26-6.9c.03-.71-.26-1.39-1.34-1.21c-1.08.17-8.89 1.26-9.89 1.6c-1.16.4-1.08 1.68-.3 2.08c.91.49 7.63 4.56 8.41 4.91z" fill="#ffa722"></path><path d="M34.46 31.74c.62-.5.43-1.21-.13-1.6c-.56-.39-7.53-5.43-8.41-6.12c-.78-.61-1.73-.39-1.47 1c.19 1 2.41 9.72 2.56 10.32c.17.69.69 1.04 1.3.61c.6-.44 5.5-3.69 6.15-4.21z" fill="#ffa722"></path><path d="M107.33 76.86c-.14-.46 4.52-33.89-25.85-38.83c-27.2-4.42-33.1 20-33.1 20s-10.33-1.73-17.76 5.61c-6.13 6.05-6.93 12.86-6.93 12.86S16.1 75 9.46 80.07C2.78 85.17 4.41 90.5 4.41 90.5l15.36 10.62l90.55-2.72l12.86-3.44s2.21-7.81-5.25-13.8c-6.02-4.83-10.6-4.3-10.6-4.3z" fill="#e2ebee"></path><path d="M30.29 90.24s-5.41 3.54-14.13 2.6c-9.99-1.08-11.82-4.86-11.82-4.86s-1.09 7.4 4.93 12.39c5.44 4.51 12.29 3.35 21.83 3.41s73.63-.03 79.69.03c4.96.05 8.97-1.5 11.09-5.63c2.01-3.9 1.55-6.02 1.55-6.02s-3.61 2.24-11.47 1.32c-6.79-.79-10.11-3.53-10.11-3.53s-8.63 4.42-23.04 4.24c-15.1-.19-20.23-5.73-20.23-5.73s-4.9 4.64-15.67 4.37s-12.62-2.59-12.62-2.59z" fill="#b9ced3"></path></svg> \ No newline at end of file
diff --git a/examples/quick/quickshapes/weatherforecast/assets/sun-behind-rain-cloud-svgrepo-com.svg b/examples/quick/quickshapes/weatherforecast/assets/sun-behind-rain-cloud-svgrepo-com.svg
new file mode 100644
index 0000000000..5f67942417
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/assets/sun-behind-rain-cloud-svgrepo-com.svg
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
+<svg width="800px" height="800px" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--noto" preserveAspectRatio="xMidYMid meet"><path d="M38.29 29.14c-6.01 7.73-5.91 21.47 1.78 28.27c8.73 7.72 21.01 7.65 28.74.54c9.26-8.52 8.73-22.71.54-30.74c-8.24-8.08-22.95-8.5-31.06 1.93z" fill="#fcc11a"></path><path d="M47.95 26.49c-2.38-1.06-4.98 1.81-6.12 3.78c-1.13 1.96-2.19 5.81.23 6.8c2.42.98 4.15-.68 5.89-3.55c1.74-2.88 2.72-5.82 0-7.03z" fill="#fee269"></path><path d="M54.14 15.71c-.58 1.08-.38 1.91.76 2.18c1.14.27 8.28 1.43 8.88 1.47c.87.05 1.2-.6 1.09-1.36c-.11-.76-1.85-11.44-2.02-12.42c-.16-.98-1.2-1.96-2.18-.65s-6.09 9.96-6.53 10.78z" fill="#ffa722"></path><path d="M72.6 23.12c-1.12.35-1.09 1.03-.49 1.91c.6.87 4.74 7.19 5.12 7.62c.38.44 1.03.54 1.58-.11s7.35-10.19 7.84-10.78c.82-.98.33-2.02-.93-1.69c-.94.25-12.41 2.83-13.12 3.05z" fill="#ffa722"></path><path d="M30.12 52.09c.76-1.25 1.74-.93 2.45.27c.48.82 4.57 6.32 4.96 6.92c.38.6.54 1.74-.65 2.02c-1.2.27-10.95 2.83-12.47 3.1s-2.4-.93-1.42-2.23c.57-.77 6.7-9.37 7.13-10.08z" fill="#ffa722"></path><path d="M28.06 42.61c1.39.62 2.05.4 2.34-.6c.38-1.31 1.52-7.3 1.58-8.66c.04-.89-.33-1.74-1.69-1.52s-11.16 1.58-12.42 2.02c-1.45.51-1.35 2.11-.38 2.61c1.14.6 9.59 5.72 10.57 6.15z" fill="#ffa722"></path><path d="M44.99 19.74c.78-.63.54-1.52-.16-2.02c-.71-.49-9.46-6.82-10.57-7.68c-.98-.76-2.18-.49-1.85 1.25c.23 1.25 3.02 12.21 3.21 12.96c.22.87.87 1.31 1.63.76c.77-.53 6.93-4.62 7.74-5.27z" fill="#ffa722"></path><path d="M99.22 65.16s3.54-23.47-17.6-29.03C58.67 30.09 53.29 51.4 53.29 51.4s-6.68-1.82-12.85 3.14c-4.83 3.88-5.66 10.72-5.66 10.72s-9.41-.32-13.45 6.17c-3.84 6.17 0 10.22 0 10.22l55.54-2.23l34.19.2s2.47-6.42-2.28-10.87c-4.76-4.44-9.56-3.59-9.56-3.59z" fill="#e2ebee"></path><path d="M61.29 67.49s4.25 4.25 15.38 3.54s16.99-4.65 18.31-5.26c1.32-.61 2.83-2.02 3.34-1.01c.51 1.01-.61 3.84-2.12 5.87c-1.52 2.02-2.37 3.25-2.63 4.15c-.2.71 3.14 1.72 9.41 2.02c5.36.26 8.74-.82 8.74-.82s.15 3.37-1.16 6c-1.22 2.43-2.49 3.22-4.51 3.63c-1.04.21-20.67.2-37.56.6c-16.89.4-38.95 1.11-42.69-.1s-4.66-3.58-5.14-4.5c-.84-1.58-1.02-4.05-1.02-4.05s4.14 2.08 10.01 1.27s9-3.84 9.81-4.15c.81-.3 4.65 1.62 10.72.1c8.48-2.13 11.11-7.29 11.11-7.29z" fill="#b9ced3"></path><path d="M47.26 90.91c-1.32-.48-7.05 3.63-9.11 9.11c-3.04 8.09 7.79 10.79 10.07 3c.87-2.96.86-11.45-.96-12.11z" fill="#4fc2f7"></path><path d="M90.07 96.81c-1.17-.52-5.82 3.02-7.93 5.99c-2.02 2.84-3.82 7.64 1.14 10.1c5.41 2.67 7.87-3.14 8.1-7.36c.21-3.82-.28-8.27-1.31-8.73z" fill="#4fc2f7"></path><path d="M66.52 106.4c-1.47-.35-7.11 4.23-9.13 8.5c-4.05 8.56 8.39 11.58 9.93 3.37c.98-5.21.4-11.59-.8-11.87z" fill="#4fc2f7"></path><path d="M61.24 113.05c-1.17-.47-3.45 2.4-3.2 4.95c.26 2.55 2.36 2.78 3.36 1.37c1.34-1.87 1-5.86-.16-6.32z" fill="#afe6f8"></path><path d="M41.68 97.56c-1.11-.52-3.01 2.52-2.99 4.09c.05 3.2 2.41 3.41 3.51 1.83c1.1-1.57 1.05-5.18-.52-5.92z" fill="#afe6f8"></path><path d="M84.83 103.77c-1.32-.63-3.59 2.28-3.42 4.39c.3 3.64 3.19 3.42 4.16 1.43s.45-5.25-.74-5.82z" fill="#afe6f8"></path></svg> \ No newline at end of file
diff --git a/examples/quick/quickshapes/weatherforecast/assets/sun-behind-small-cloud-svgrepo-com.svg b/examples/quick/quickshapes/weatherforecast/assets/sun-behind-small-cloud-svgrepo-com.svg
new file mode 100644
index 0000000000..d9f0a6bcc4
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/assets/sun-behind-small-cloud-svgrepo-com.svg
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
+<svg width="800px" height="800px" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--noto" preserveAspectRatio="xMidYMid meet"><path d="M33.58 45.38c-8.27 10.63-8.13 29.53 2.44 38.89c12.01 10.63 28.9 10.52 39.53.74c12.75-11.72 12.01-31.24.75-42.29c-11.32-11.11-31.56-11.69-42.72 2.66z" fill="#fcc11a"></path><path d="M46.87 41.73c-3.27-1.45-6.85 2.49-8.41 5.19c-1.56 2.7-3.01 8 .31 9.35c3.32 1.35 5.71-.93 8.1-4.88s3.74-8 0-9.66z" fill="#fee269"></path><path d="M55.39 26.91c-.79 1.49-.52 2.62 1.05 3c1.57.37 11.39 1.97 12.21 2.02c1.2.07 1.65-.82 1.5-1.87c-.15-1.05-2.55-15.74-2.77-17.08s-1.65-2.7-3-.9c-1.35 1.79-8.39 13.71-8.99 14.83z" fill="#ffa722"></path><path d="M79.23 37.03c-1.48.64-1.33 1.58-.38 2.68s7.56 9.12 8.14 9.66c.59.54 1.5.59 2.14-.39s8.52-15.03 9.11-15.92c.97-1.46.15-2.8-1.52-2.17c-1.26.49-16.56 5.74-17.49 6.14z" fill="#ffa722"></path><path d="M80.19 86.84c1.19-.64 2.25-.15 2.55 1.2c.3 1.35 3.6 15.13 4.12 17.68c.26 1.28-1.2 2.32-2.4 1.57c-1.2-.75-14.22-9.83-15.06-10.56c-1.2-1.05-.37-2.14.22-2.7c1.2-1.12 9.44-6.59 10.57-7.19z" fill="#ffa722"></path><path d="M43.93 94.41c-1.51-.14-1.95 1.2-1.72 2.4c.22 1.2 2.47 16.4 2.62 17.53c.22 1.65 1.95 2.32 3.07.67c1.12-1.65 8.82-13.98 9.44-15.13c1.12-2.1.3-2.55-.82-3.07c-1.13-.53-11.02-2.25-12.59-2.4z" fill="#ffa722"></path><path d="M22.35 76.95c1.05-1.72 2.4-1.27 3.37.37c.67 1.13 6.29 8.69 6.82 9.51c.52.82.75 2.4-.9 2.77c-1.65.37-15.06 3.9-17.16 4.27s-3.3-1.27-1.95-3.07c.79-1.04 9.23-12.87 9.82-13.85z" fill="#ffa722"></path><path d="M19.5 63.92c1.92.85 2.82.54 3.22-.82c.52-1.8 2.1-10.04 2.17-11.91c.05-1.22-.45-2.4-2.32-2.1S7.22 51.26 5.5 51.86c-2 .7-1.86 2.9-.52 3.6c1.56.82 13.18 7.86 14.52 8.46z" fill="#ffa722"></path><path d="M42.8 32.45c1.08-.86.75-2.1-.22-2.77c-.97-.67-13.01-9.38-14.53-10.56c-1.35-1.05-3-.67-2.55 1.72c.32 1.72 4.16 16.79 4.42 17.83c.3 1.2 1.2 1.8 2.25 1.05s9.51-6.37 10.63-7.27z" fill="#ffa722"></path><path d="M112.86 68.59c.01-.65 2.21-23.08-17.49-27.23c-19.04-4.02-24.03 13.82-24.03 13.82s-6.75-.83-11.7 2.93c-4.95 3.77-5.23 9.98-5.23 9.98s-7.96-.3-11.71 4.13c-3.39 4-2.26 7.61-2.26 7.61l21.97 5.57l55.53-1.49l6.37-3.86s.36-5.05-2.93-8.25c-4.54-4.4-8.52-3.21-8.52-3.21z" fill="#e2ebee"></path><path d="M61.29 77.3s-6.09 2.68-13.63 2.02c-4.48-.39-7.34-1.72-7.34-1.72s-.77 5.18 3.3 7.73c3.05 1.91 5.96 2.2 11.38 2.18s54.74-.12 58.29-.16c3.56-.04 6.94-.67 8.67-2.28c2.18-2.03 2.34-5.02 2.34-5.02s-3.42 1.02-8.18.4c-4.74-.62-7.5-2.74-7.5-2.74s-3.41 2.91-21.04 3.23c-19.02.35-26.29-3.64-26.29-3.64z" fill="#bacdd2"></path></svg> \ No newline at end of file
diff --git a/examples/quick/quickshapes/weatherforecast/assets/sun-svgrepo-com.svg b/examples/quick/quickshapes/weatherforecast/assets/sun-svgrepo-com.svg
new file mode 100644
index 0000000000..b5a51c8b21
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/assets/sun-svgrepo-com.svg
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
+
+<svg
+ width="800px"
+ height="800px"
+ viewBox="0 0 128 128"
+ aria-hidden="true"
+ role="img"
+ class="iconify iconify--noto"
+ preserveAspectRatio="xMidYMid meet"
+ version="1.1"
+ id="svg1524"
+ sodipodi:docname="sun-svgrepo-com.svg"
+ inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs1528" />
+ <sodipodi:namedview
+ id="namedview1526"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ showgrid="false"
+ inkscape:zoom="0.805"
+ inkscape:cx="399.37888"
+ inkscape:cy="400"
+ inkscape:window-width="3840"
+ inkscape:window-height="2065"
+ inkscape:window-x="1200"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg1524" />
+ <path
+ d="M37.41 41.95c-9.71 12.48-9.54 34.65 2.87 45.64c14.09 12.47 33.92 12.34 46.39.87c14.95-13.76 14.09-36.66.87-49.63c-13.29-13.04-37.04-13.72-50.13 3.12z"
+ fill="#fcc11a"
+ id="path1504"
+ style="stroke:#b0ab9d;stroke-opacity:1;stroke-width:0.888;stroke-miterlimit:4;stroke-dasharray:none" />
+ <path
+ d="M53 37.67c-3.84-1.7-8.04 2.93-9.87 6.09c-1.83 3.17-3.53 9.38.37 10.97c3.9 1.58 6.7-1.1 9.51-5.73c2.79-4.63 4.38-9.38-.01-11.33z"
+ fill="#fee269"
+ id="path1506" />
+ <path
+ d="M63 20.27c-.93 1.74-.62 3.08 1.23 3.52c1.85.44 13.36 2.31 14.33 2.37c1.41.09 1.93-.97 1.76-2.2c-.18-1.23-2.99-18.46-3.25-20.04S75.14.76 73.55 2.87S63.7 18.96 63 20.27z"
+ fill="#ffa722"
+ id="path1508"
+ style="stroke:#b0ab9d;stroke-opacity:1;stroke-width:0.888;stroke-miterlimit:4;stroke-dasharray:none" />
+ <path
+ d="M92.8 32.23c-1.81.56-1.76 1.67-.79 3.08c.97 1.41 7.65 11.6 8.26 12.31c.62.7 1.67.88 2.55-.18c.88-1.05 11.86-16.45 12.66-17.41c1.32-1.58.53-3.25-1.49-2.73c-1.54.41-20.05 4.58-21.19 4.93z"
+ fill="#ffa722"
+ id="path1510"
+ style="stroke:#b0ab9d;stroke-opacity:1;stroke-width:0.888;stroke-miterlimit:4;stroke-dasharray:none" />
+ <path
+ d="M106.6 61.86c-1.3-.74-2.99-.53-3.43 1.14c-.44 1.67-2.37 13.8-2.55 14.86s.62 2.11 1.93 1.85s19.45-2.95 20.66-3.25c2.11-.53 2.81-2.64.62-4.22c-1.42-1.03-16-9.68-17.23-10.38z"
+ fill="#ffa722"
+ id="path1512"
+ style="stroke:#b0ab9d;stroke-opacity:1;stroke-width:0.888;stroke-miterlimit:4;stroke-dasharray:none" />
+ <path
+ d="M92.09 90.6c1.4-.75 2.64-.18 2.99 1.41c.35 1.58 4.22 17.76 4.84 20.75c.31 1.5-1.41 2.73-2.81 1.85c-1.41-.88-16.69-11.53-17.67-12.4c-1.41-1.23-.43-2.51.26-3.16c1.4-1.33 11.07-7.74 12.39-8.45z"
+ fill="#ffa722"
+ id="path1514"
+ style="stroke:#b0ab9d;stroke-opacity:1;stroke-width:0.888;stroke-miterlimit:4;stroke-dasharray:none" />
+ <path
+ d="M49.54 99.48c-1.77-.17-2.29 1.41-2.02 2.81c.26 1.41 2.9 19.24 3.08 20.57c.26 1.93 2.29 2.73 3.6.79s10.35-16.4 11.08-17.76c1.32-2.46.35-2.99-.97-3.6c-1.31-.61-12.92-2.63-14.77-2.81z"
+ fill="#ffa722"
+ id="path1516"
+ style="stroke:#b0ab9d;stroke-opacity:1;stroke-width:0.888;stroke-miterlimit:4;stroke-dasharray:none" />
+ <path
+ d="M24.23 79c1.23-2.02 2.81-1.49 3.96.44c.78 1.32 7.38 10.2 8 11.16c.62.97.88 2.81-1.05 3.25c-1.95.45-17.68 4.58-20.14 5.02c-2.46.44-3.87-1.49-2.29-3.6c.92-1.24 10.82-15.12 11.52-16.27z"
+ fill="#ffa722"
+ id="path1518"
+ style="stroke:#b0ab9d;stroke-opacity:1;stroke-width:0.888;stroke-miterlimit:4;stroke-dasharray:none" />
+ <path
+ d="M20.89 63.7c2.25 1 3.31.64 3.78-.97c.62-2.11 2.46-11.78 2.55-13.98c.06-1.43-.53-2.81-2.73-2.46S6.47 48.85 4.45 49.55c-2.35.82-2.18 3.4-.62 4.22c1.85.97 15.47 9.23 17.06 9.93z"
+ fill="#ffa722"
+ id="path1520"
+ style="stroke:#b0ab9d;stroke-opacity:1;stroke-width:0.888;stroke-miterlimit:4;stroke-dasharray:none" />
+ <path
+ d="M48.23 26.78c1.27-1.01.88-2.46-.26-3.25c-1.14-.79-15.26-11-17.05-12.4c-1.58-1.23-3.52-.79-2.99 2.02c.38 2.02 4.88 19.7 5.19 20.92c.35 1.41 1.41 2.11 2.64 1.23c1.21-.87 11.15-7.46 12.47-8.52z"
+ fill="#ffa722"
+ id="path1522"
+ style="stroke:#b0ab9d;stroke-opacity:1;stroke-width:0.888;stroke-miterlimit:4;stroke-dasharray:none" />
+</svg>
diff --git a/examples/quick/quickshapes/weatherforecast/doc/images/qml-weatherforecast-example.png b/examples/quick/quickshapes/weatherforecast/doc/images/qml-weatherforecast-example.png
new file mode 100644
index 0000000000..2ebd68f768
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/doc/images/qml-weatherforecast-example.png
Binary files differ
diff --git a/examples/quick/quickshapes/weatherforecast/doc/images/settings.png b/examples/quick/quickshapes/weatherforecast/doc/images/settings.png
new file mode 100644
index 0000000000..80788dda6d
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/doc/images/settings.png
Binary files differ
diff --git a/examples/quick/quickshapes/weatherforecast/doc/images/zoomed.png b/examples/quick/quickshapes/weatherforecast/doc/images/zoomed.png
new file mode 100644
index 0000000000..22bb3b9e24
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/doc/images/zoomed.png
Binary files differ
diff --git a/examples/quick/quickshapes/weatherforecast/doc/src/weatherforecast.qdoc b/examples/quick/quickshapes/weatherforecast/doc/src/weatherforecast.qdoc
new file mode 100644
index 0000000000..acc625ece1
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/doc/src/weatherforecast.qdoc
@@ -0,0 +1,125 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+/*!
+ \title Weather Forecast Example
+ \example quickshapes/weatherforecast
+ \image qml-weatherforecast-example.png
+ \brief A Qt Quick Shapes example demonstrating different ways to uses shapes in an application.
+ \ingroup qtquickexamples
+ \examplecategory {Graphics}
+
+ This example is designed to look like a weather forecast app for Europe. It demonstrates
+ a few different ways the \l{QtQuick.Shapes} API might be useful in an application, and how
+ different properties can affect the quality and performance of the rendering.
+
+ All graphics in the example originated as \c .svg files which were converted to QML
+ using the \l{svgtoqml} tool.
+
+ \section1 Different Types of Shapes
+
+ The \l{QtQuick.Shapes} module provides APIs to render vector graphics in a Qt Quick
+ application. This is an alternative to using a raster \l{Image} for 2D graphics and is useful
+ if the target size of the image is not known up front. With an \l{Image}, the rasterized pixmap
+ is precreated at a specific size and scaling the image will either add or subtract information.
+ This will result in pixelation or blurring, depending on whether its \c smooth property is set.
+
+ With \l{QtQuick.Shapes} the shapes are described mathematically, as a set of curves and line
+ segments, and thus they can be scaled arbitrarily without introducing artifacts.
+
+ \image qml-weatherforecast-example.png
+
+ In the Weather Forecast example, there are three main uses of shapes:
+
+ \list
+ \li User interface icons, such as weather symbols and the cog wheel on the "Settings" button.
+ \li The overview map of Europe.
+ \li Country name labels visible when zooming into the map.
+ \endlist
+
+ \section2 User Interface Icons
+
+ While using appropriately sized raster images for icons is usually preferred for performance
+ reasons, it may be inconvenient if the same application is targeting many different screen
+ sizes. In order for the icons to look crisp on all screens, you have to pregenerate a large
+ set of different sizes. \l{QtQuick.Shapes} makes it possible for the application to do this
+ adaptation at runtime, by including the icons as shapes and rendering them at a size appropriate
+ for the current screen size.
+
+ When running the Weather Forecast example on a desktop system, this can be seen by making the
+ application window larger or smaller. The weather symbols adapt to the window size without
+ reducing quality.
+
+ In addition, animated effects, such as zooms, can be added without quality loss. This can be
+ seen by hovering over the weather symbols.
+
+ So for any use case where the target size is unknown, or the number of possibilities is so large
+ that creating specific pixmaps for all would be impractical, using shapes for icons can be
+ useful and worth the performance cost of rasterizing the shapes at runtime.
+
+ \section2 Map of Europe
+
+ The Weather Forecast example also uses a vectorized map of Europe. This makes it easy to
+ create effects such as zooming into the map when we want to emphasize a specific country. In
+ addition, since each country is a separate sub-shape, we can apply different fills and strokes
+ to them independently.
+
+ Click on the map to zoom into a country. The scale will be adjusted so that the country shape
+ fills the window and the fill color will be slightly darker.
+
+ \image zoomed.png
+
+ \note The weather symbols on the zoomed map are the same assets as in the original view, but at
+ a much larger size.
+
+ \section2 Country Name Labels
+
+ When zooming on a country, its name appears across the country shape. This label is also created
+ with \l{QtQuick.Shapes}, by using the \l{PathText} component type which converts a string into
+ renderable shape.
+
+ This is not the typical way to create text labels in Qt Quick. For most purposes, using the
+ \l{Text} element is the most efficient and convenient approach. However, there are certain
+ visualization effects supported by \l{QtQuick.Shapes} which is not supported by the regular
+ \l{Text} element. Fill gradients is one such effect.
+
+ \snippet quickshapes/weatherforecast/main.qml textShape
+
+ To illustrate this, the Weather Forecast example applies a subtle radial gradient to the opacity
+ of the country labels, making them seem to blend into the map on the edges.
+
+ \section1 Different Types of Renderers
+
+ The Weather Forecast example illustrates multiple different use cases for \l{QtQuick.Shapes}.
+ In addition, it can be used to see the upsides and downsides of the different renderers the
+ module supports.
+
+ Click on the cog wheel in the upper left corner to open a settings panel, where different
+ approaches to rasterization can be selected.
+
+ \image settings.png
+
+ \l{QtQuick.Shapes} supports two different renderers, selectable using the
+ \l{ QtQuick.Shapes::Shape::preferredRendererType}{preferredRendererType} property. The preferred
+ renderer in the example is \c CurveRenderer. This supports hardware-accelerated curves and
+ built-in antialiasing. It is not the default renderer in \l{QtQuick.Shapes}, but in the example
+ it is automatically selected on startup.
+
+ The default renderer in Qt Quick Shapes is the \c GeometryRenderer. This flattens the curves of
+ the shape into very small straight lines and draws the shape as a polygon. Redrawing the shape
+ is more efficient than with the \c CurveRenderer, but at certain scales, the fact that curves
+ are approximated by lines will be visible.
+
+ In addition, the \c GeometryRenderer does not support antialiasing, so you will typically want
+ to enable multi-sampling when using it. This can be done by rendering the shapes into layers and
+ enabling multi-sampling on these. Since we will render the shapes into off-screen buffers in
+ this mode, it consumes additional graphics memory as well as an additional rendering pass for
+ each shape.
+
+ \snippet quickshapes/weatherforecast/main.qml msaa
+
+ The settings panel also provides the option to use the \c GeometryRenderer together with 4x
+ multi-sampling, so that the quality of this can be compared to the built-in antialiasing of
+ the \c CurveRenderer.
+
+ \include examples-run.qdocinc
+*/
diff --git a/examples/quick/quickshapes/weatherforecast/main.cpp b/examples/quick/quickshapes/weatherforecast/main.cpp
new file mode 100644
index 0000000000..52264b8a6e
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/main.cpp
@@ -0,0 +1,25 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include <QGuiApplication>
+#include <QQmlApplicationEngine>
+
+int main(int argc, char *argv[])
+{
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+ QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+#endif
+ QGuiApplication app(argc, argv);
+ app.setOrganizationName("QtProject");
+
+ QQmlApplicationEngine engine;
+ const QUrl url(QStringLiteral("qrc:/qt/qml/weatherforecast/main.qml"));
+ QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
+ &app, [url](QObject *obj, const QUrl &objUrl) {
+ if (!obj && url == objUrl)
+ QCoreApplication::exit(-1);
+ }, Qt::QueuedConnection);
+ engine.load(url);
+
+ return app.exec();
+}
diff --git a/examples/quick/quickshapes/weatherforecast/main.qml b/examples/quick/quickshapes/weatherforecast/main.qml
new file mode 100644
index 0000000000..5ba8ad5c2a
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/main.qml
@@ -0,0 +1,358 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Shapes
+import QtQuick.Controls
+import QtQuick.Layouts
+
+Window {
+ id: mainWindow
+
+ property real designWindowWidthRatio: topLevel.zoomRect.width / 997
+ property real designWindowHeightRatio: topLevel.zoomRect.height / 1024
+ property int preferredRendererType: curveRendererCheckBox.checked ? Shape.CurveRenderer : Shape.GeometryRenderer
+
+ title: qsTr("Weather Forecast")
+ width: 1280
+ height: 960
+ visible: true
+ color: "white"
+
+
+ FontLoader {
+ id: workSansRegular
+ source: "assets/WorkSans-Regular.ttf"
+ }
+
+ Rectangle {
+ id: bgFill
+ color: "#9FCBF9"
+ anchors.fill: parent
+ }
+
+ Item {
+ id: mapContainer
+ anchors.left: !settingsDrawer.isLandscape ? parent.left : settingsDrawer.right
+ anchors.top: !settingsDrawer.isLandscape ? settingsDrawer.bottom : parent.top
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ layer.enabled: msaaCheckBox.checked
+ layer.samples: 4
+
+ Item {
+ property rect selectedRect
+ property rect zoomTarget: Qt.rect(0, 0, mapshape.width, mapshape.height)
+ property rect zoomRect: zoomTarget
+ property real zoomScale: Math.min(width / zoomRect.width, height / zoomRect.height)
+ property real subScale: 1
+ property rect overlayRect
+ property real overlayRotation: 0
+
+ anchors.fill: parent
+ anchors.margins: 10
+ id: topLevel
+ transformOrigin: Item.TopLeft
+ scale: zoomScale > 0 ? zoomScale : 1
+ Behavior on zoomRect { PropertyAnimation { duration: 500 } }
+
+ Europe {
+ id: mapshape
+ x: (topLevel.width / topLevel.scale - topLevel.zoomRect.width) / 2 - topLevel.zoomRect.x
+ y: (topLevel.height / topLevel.scale - topLevel.zoomRect.height) / 2 - topLevel.zoomRect.y
+ onZoomTo: (child, name, childRect, textRect) => {
+ if (!child) {
+ topLevel.zoomTarget = Qt.rect(0, 0, mapshape.width, mapshape.height)
+ return
+ }
+ let x_in = childRect.x
+ let y_in = childRect.y
+ let w_in = childRect.width
+ let h_in = childRect.height
+
+ // try to center the target in the map
+ var x, y, w, h
+ let ar_in = h_in / w_in
+ let ar = height / width
+ if (ar_in < ar) {
+ // in rect too short
+ h = w_in * ar
+ y = y_in - (h - h_in) / 2
+ x = x_in
+ w = w_in
+ } else {
+ // in rect too narrow
+ w = h_in / ar
+ x = x_in - (w - w_in) / 2
+ y = y_in
+ h = h_in
+ }
+ topLevel.selectedRect = Qt.rect(x_in, y_in, w_in, h_in)
+ topLevel.subScale = Math.min(mapshape.width / w, mapshape.height / h)
+ topLevel.zoomTarget = Qt.rect(x, y, w, h)
+ if (textRect) {
+ topLevel.overlayRect = Qt.rect(textRect.x, textRect.y, textRect.width, textRect.height)
+ topLevel.overlayRotation = textRect.rotation
+ } else {
+ topLevel.overlayRect = topLevel.zoomTarget
+ topLevel.overlayRotation = 0
+ }
+ textLayer.label = name
+ }
+ Item {
+ id: globalLayer
+ anchors.fill: parent
+ opacity: mapshape.zoomedIn ? 0 : 1
+ z: 2
+ Behavior on opacity {
+ NumberAnimation { duration: 500 }
+ }
+
+ Repeater {
+ model: ListModel {
+ ListElement {
+ itemSource: "Cloud.qml"
+ temperature: 22
+ placeName: "Oslo"
+ itemX: 0.440
+ itemY: 0.320
+ }
+
+ ListElement {
+ itemSource: "CloudWithLightning.qml"
+ placeName: "Helsinki"
+ temperature: 20
+ itemX: 0.615
+ itemY: 0.300
+ }
+
+ ListElement {
+ itemSource: "SunBehindCloud.qml"
+ placeName: "Berlin"
+ temperature: 24
+ itemX: 0.490
+ itemY: 0.540
+ }
+
+ ListElement {
+ itemSource: "SunBehindCloud.qml"
+ placeName: "London"
+ temperature: 22
+ itemX: 0.249
+ itemY: 0.550
+ }
+ ListElement {
+ itemSource: "SunBehindCloud.qml"
+ placeName: "Paris"
+ temperature: 22
+ itemX: 0.293
+ itemY: 0.630
+ }
+ ListElement {
+ itemSource: "SunBehindCloud.qml"
+ placeName: "Rome"
+ temperature: 22
+ itemX: 0.496
+ itemY: 0.827
+ }
+ ListElement {
+ itemSource: "SunBehindCloud.qml"
+ placeName: "Budapest"
+ temperature: 22
+ itemX: 0.612
+ itemY: 0.666
+ }
+ ListElement {
+ itemSource: "SunBehindCloud.qml"
+ placeName: "Sofia"
+ temperature: 22
+ itemX: 0.719
+ itemY: 0.781
+ }
+ ListElement {
+ itemSource: "SunBehindCloud.qml"
+ placeName: "Kyiv"
+ temperature: 22
+ itemX: 0.796
+ itemY: 0.543
+ }
+
+
+ ListElement {
+ itemSource: "Sun.qml"
+ placeName: "Madrid"
+ temperature: 28
+ itemX: 0.140
+ itemY: 0.830
+ }
+
+ ListElement {
+ itemSource: "CloudWithSnow.qml"
+ placeName: "Reykjavik"
+ temperature: 12
+ itemX: 0.050
+ itemY: 0.120
+ }
+ }
+
+ delegate: BouncyShape {
+ x: itemX * mapshape.width
+ y: itemY * mapshape.height
+ amount: 1.5
+ MapLabel {
+ iconSource: itemSource
+ label: placeName
+ degrees: temperature
+ }
+ }
+ }
+
+ } // end globalLayer
+ } // end Europe
+
+ Item {
+ id: textLayer
+ opacity: mapshape.zoomedIn ? 1 : 0
+ z: 2
+ x: mapshape.x + topLevel.overlayRect.x
+ y: mapshape.y + topLevel.overlayRect.y
+ width: topLevel.overlayRect.width
+ height: topLevel.overlayRect.height
+ rotation: topLevel.overlayRotation
+ property string label: ""
+ property real localScale: 10 / topLevel.subScale
+
+ Behavior on opacity {
+ NumberAnimation { duration: 800}
+ }
+
+ Item {
+ anchors.fill: parent
+ DemoShape {
+ id: textShape
+ property real s: Math.min(parent.width / boundingRect.width,
+ parent.height / boundingRect.height)
+
+ anchors.centerIn: parent
+ scale: Number.isNaN(s) ? 1 : 0.5 * s
+
+//! [textShape]
+ ShapePath {
+ strokeColor: "transparent"
+ strokeWidth: 1
+ joinStyle: ShapePath.RoundJoin
+ fillRule: ShapePath.WindingFill
+
+ fillGradient: RadialGradient {
+ centerX: textShape.width / 2
+ centerY: textShape.height / 2
+ centerRadius: textShape.width / 2
+ focalX: centerX; focalY: centerY
+ GradientStop { position: 0; color: "#b0ab9d7f" }
+ GradientStop { position: 1; color: "#5cab9d7f" }
+ }
+ PathText {
+ id: textPath
+ text: textLayer.label
+ font.family: workSansRegular.font.family
+ font.pixelSize: 64
+ }
+ }
+//! [textShape]
+ }
+ }
+ }
+ Item {
+ id: localLayer
+ property real localScale: 10 / topLevel.subScale
+
+ opacity: mapshape.zoomedIn ? 1 : 0
+ z: 2
+ x: mapshape.x + topLevel.selectedRect.x
+ y: mapshape.y + topLevel.selectedRect.y
+ width: topLevel.selectedRect.width
+ height: topLevel.selectedRect.height
+
+ Item {
+ scale: localLayer.localScale
+ x: 2 * parent.width / 3
+ y: 2 * parent.height / 3
+ BouncyShape {
+ hoverEnabled: mapshape.zoomedIn
+ Sun {
+ width: 10
+ height: 10
+ }
+ }
+ }
+ Item {
+ scale: localLayer.localScale
+ x: parent.width / 10
+ y: parent.height / 10
+ BouncyShape {
+ hoverEnabled: mapshape.zoomedIn
+ CloudWithLightning {
+ width: 10
+ height: 10
+ }
+ }
+ }
+ Behavior on opacity { NumberAnimation{ duration: 800 } }
+ }
+ }
+ }
+
+ Rectangle {
+ id: gear
+ anchors.top: mapContainer.top
+ anchors.left: mapContainer.left
+ anchors.leftMargin: 30
+ anchors.topMargin: 30
+ radius: 8
+ width: 44
+ height: width
+ color: Qt.rgba(0, 0, 0, hoverHandler.hovered ? 0.21 : 0.07)
+//! [msaa]
+ layer.enabled: msaaCheckBox.checked
+ layer.samples: 4
+//! [msaa]
+
+ Gear {
+ anchors.centerIn: parent
+ width: 24
+ height: width
+ }
+
+ HoverHandler {
+ id: hoverHandler
+ }
+
+ TapHandler {
+ onTapped: (eventPoint, button) => {
+ settingsDrawer.isOpen = !settingsDrawer.isOpen
+ }
+ }
+ }
+
+ SettingsDrawer {
+ id: settingsDrawer
+ isLandscape: mainWindow.width > mainWindow.height
+ width: isLandscape ? implicitWidth : mainWindow.width
+ height: isLandscape ? mainWindow.height : mainWindow.height * 0.33
+
+ RadioButton {
+ id: curveRendererCheckBox
+ text: qsTr("Curve Renderer")
+ checked: true
+ }
+
+ RadioButton {
+ id: geometryRendererCheckBox
+ text: qsTr("Geometry Renderer")
+ }
+ RadioButton {
+ id: msaaCheckBox
+ text: qsTr("Geometry Renderer 4x MSAA")
+ }
+ }
+}
diff --git a/examples/quick/quickshapes/weatherforecast/qt_attribution.json b/examples/quick/quickshapes/weatherforecast/qt_attribution.json
new file mode 100644
index 0000000000..6ea84fb1b0
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/qt_attribution.json
@@ -0,0 +1,55 @@
+[
+ {
+ "Id": "weather-icons",
+ "Name": "Weather icons from the Noto Emoji collection",
+ "QDocModule": "qtquick",
+ "QtUsage": "Used in the Weather Forecast Example",
+ "QtParts": [ "examples" ],
+ "Files": [ "assets/cloud-with-snow-svgrepo-com.svg", "CloudWithSnow_generated.qml",
+ "assets/cloud-svgrepo-com.svg", "Cloud_generated.qml",
+ "assets/cloud-with-lightning-and-rain-svgrepo-com.svg", "CloudWithLightningAndRain_generated.qml",
+ "assets/cloud-with-lightning-svgrepo-com.svg", "CloudWithLightning_generated.qml",
+ "assets/cloud-with-rain-svgrepo-com.svg", "CloudWithRain_generated.qml",
+ "assets/sun-svgrepo-com.svg", "Sun_generated.qml",
+ "assets/sun-behind-cloud-svgrepo-com.svg", "SunBehindCloud_generated.qml",
+ "assets/sun-behind-large-cloud-svgrepo-com.svg", "SunBehindLargeCloud_generated.qml",
+ "assets/sun-behind-rain-cloud-svgrepo-com.svg", "SunBehindRainCloud_generated.qml",
+ "assets/sun-behind-small-cloud-svgrepo-com.svg", "SunBehindSmallCloud_generated.qml" ],
+ "LicenseId": "Apache-2.0",
+ "License": "Apache License 2.0",
+ "Copyright": "Copyright (C) 2023 Googlefonts"
+ },
+ {
+ "Id": "map-of-europe",
+ "Name": "Map of Europe from Wikipedia",
+ "QDocModule": "qtquick",
+ "QtUsage": "Used in the Weather Forecast Example",
+ "QtParts": [ "examples" ],
+ "Files": [ "assets/Europe.svg", "Europe_generated.qml" ],
+ "LicenseId": "CC-BY-3.0",
+ "License": "Creative Commons Attribution 3.0 Unported",
+ "Copyright": "Copyright (C) 2010 Kolja21"
+ },
+ {
+ "Id": "work-sans-font",
+ "Name": "Work Sans font by Wei Huang",
+ "QDocModule": "qtquick",
+ "QtUsage": "Used in the Weather Forecast Example",
+ "QtParts": [ "examples" ],
+ "Files": "assets/WorkSans-Regular.ttf",
+ "LicenseId": "OFL-1.1",
+ "License": "SIL Open Font License 1.1",
+ "Copyright": "Copyright (C) 2020 Wei Huang"
+ },
+ {
+ "Id": "gear-icon",
+ "Name": "Gear Icon",
+ "QDocModule": "qtquick",
+ "QtUsage": "Used in the Weather Forecast Example",
+ "QtParts": [ "examples" ],
+ "Files": [ "assets/gear-alt-stroke.svg", "Gear_generated.qml" ],
+ "LicenseId": "MIT",
+ "License": "MIT License",
+ "Copyright": "Copyright (C) 2023 Framework7"
+ }
+]
diff --git a/examples/quick/quickshapes/weatherforecast/qtquickcontrols2.conf b/examples/quick/quickshapes/weatherforecast/qtquickcontrols2.conf
new file mode 100644
index 0000000000..b6c7c87ea1
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/qtquickcontrols2.conf
@@ -0,0 +1,2 @@
+[Controls]
+Style=Material
diff --git a/examples/quick/quickshapes/weatherforecast/weatherforecast.pro b/examples/quick/quickshapes/weatherforecast/weatherforecast.pro
new file mode 100644
index 0000000000..6279bc7794
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/weatherforecast.pro
@@ -0,0 +1,10 @@
+TEMPLATE = app
+
+QT += quick qml
+SOURCES += main.cpp
+RESOURCES += \
+ weatherforecast.qrc \
+ ../../shared/shared.qrc
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/quickshapes/weatherforecast
+INSTALLS += target
diff --git a/examples/quick/quickshapes/weatherforecast/weatherforecast.qrc b/examples/quick/quickshapes/weatherforecast/weatherforecast.qrc
new file mode 100644
index 0000000000..ccbdb417a1
--- /dev/null
+++ b/examples/quick/quickshapes/weatherforecast/weatherforecast.qrc
@@ -0,0 +1,33 @@
+<RCC>
+ <qresource prefix="/qt/qml/weatherforecast">
+ <file>main.qml</file>
+ <file>Europe.qml</file>
+ <file>Europe_generated.qml</file>
+ <file>BouncyShape.qml</file>
+ <file>Cloud.qml</file>
+ <file>Cloud_generated.qml</file>
+ <file>CloudWithLightning.qml</file>
+ <file>CloudWithLightning_generated.qml</file>
+ <file>CloudWithRain.qml</file>
+ <file>CloudWithRain_generated.qml</file>
+ <file>CloudWithSnow.qml</file>
+ <file>CloudWithSnow_generated.qml</file>
+ <file>Gear.qml</file>
+ <file>Gear_generated.qml</file>
+ <file>MapLabel.qml</file>
+ <file>SettingsDrawer.qml</file>
+ <file>Sun.qml</file>
+ <file>Sun_generated.qml</file>
+ <file>SunBehindCloud.qml</file>
+ <file>SunBehindCloud_generated.qml</file>
+ <file>SunBehindRainCloud.qml</file>
+ <file>SunBehindRainCloud_generated.qml</file>
+ <file>SunBehindSmallCloud.qml</file>
+ <file>SunBehindSmallCloud_generated.qml</file>
+ <file>DemoShape.qml</file>
+ <file>assets/WorkSans-Regular.ttf</file>
+ </qresource>
+ <qresource prefix="/">
+ <file>qtquickcontrols2.conf</file>
+ </qresource>
+</RCC>
diff --git a/examples/quick/quickwidgets/CMakeLists.txt b/examples/quick/quickwidgets/CMakeLists.txt
index 637e8a50eb..f205e23600 100644
--- a/examples/quick/quickwidgets/CMakeLists.txt
+++ b/examples/quick/quickwidgets/CMakeLists.txt
@@ -1,4 +1,2 @@
-# Generated from quickwidgets.pro.
-
-add_subdirectory(quickwidget)
-add_subdirectory(qquickviewcomparison)
+qt_internal_add_example(quickwidget)
+qt_internal_add_example(qquickwidgetversuswindow_opengl)
diff --git a/examples/quick/quickwidgets/qquickviewcomparison/CMakeLists.txt b/examples/quick/quickwidgets/qquickviewcomparison/CMakeLists.txt
deleted file mode 100644
index 408bfb0ad2..0000000000
--- a/examples/quick/quickwidgets/qquickviewcomparison/CMakeLists.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-# Generated from qquickviewcomparison.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(qquickviewcomparison LANGUAGES CXX)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/quickwidgets/qquickviewcomparison")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Widgets)
-find_package(Qt6 COMPONENTS QuickWidgets)
-
-qt_add_executable(qquickviewcomparison
- fbitem.cpp fbitem.h
- logo.cpp logo.h
- main.cpp
- mainwindow.cpp mainwindow.h
-)
-set_target_properties(qquickviewcomparison PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(qquickviewcomparison PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Quick
- Qt::QuickWidgets
- Qt::Widgets
-)
-
-
-# Resources:
-set(qquickviewcomparison_resource_files
- "test.qml"
-)
-
-qt6_add_resources(qquickviewcomparison "qquickviewcomparison"
- PREFIX
- "/qquickviewcomparison"
- FILES
- ${qquickviewcomparison_resource_files}
-)
-
-install(TARGETS qquickviewcomparison
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
-
-set_target_properties(qquickviewcomparison PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI fbitem
-)
-
-qt6_qml_type_registration(qquickviewcomparison)
diff --git a/examples/quick/quickwidgets/qquickviewcomparison/fbitem.h b/examples/quick/quickwidgets/qquickviewcomparison/fbitem.h
deleted file mode 100644
index 6270e7adff..0000000000
--- a/examples/quick/quickwidgets/qquickviewcomparison/fbitem.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-#ifndef FBITEM_H
-#define FBITEM_H
-
-#include <QQuickFramebufferObject>
-#include <QOpenGLVertexArrayObject>
-#include <QOpenGLBuffer>
-#include <QOpenGLShaderProgram>
-#include <QVector3D>
-#include "logo.h"
-
-struct StateBinder;
-
-class FbItemRenderer : public QQuickFramebufferObject::Renderer
-{
-public:
- FbItemRenderer(bool multisample);
- void synchronize(QQuickFramebufferObject *item) override;
- void render() override;
- QOpenGLFramebufferObject *createFramebufferObject(const QSize &size) override;
-
-private:
- void ensureInit();
- void initBuf();
- void setupVertexAttribs();
- void initProgram();
- void updateDirtyUniforms();
-
- bool m_inited;
- bool m_multisample;
- QMatrix4x4 m_proj;
- QMatrix4x4 m_camera;
- QMatrix4x4 m_baseWorld;
- QMatrix4x4 m_world;
- QOpenGLVertexArrayObject m_vao;
- QOpenGLBuffer m_logoVbo;
- Logo m_logo;
- QScopedPointer<QOpenGLShaderProgram> m_program;
- int m_projMatrixLoc;
- int m_camMatrixLoc;
- int m_worldMatrixLoc;
- int m_normalMatrixLoc;
- int m_lightPosLoc;
- QVector3D m_rotation;
-
- enum Dirty {
- DirtyProjection = 0x01,
- DirtyCamera = 0x02,
- DirtyWorld = 0x04,
- DirtyLight = 0x08,
- DirtyAll = 0xFF
- };
- int m_dirty;
-
- friend struct StateBinder;
-};
-
-class FbItem : public QQuickFramebufferObject
-{
- Q_OBJECT
- Q_PROPERTY(QVector3D eye READ eye WRITE setEye)
- Q_PROPERTY(QVector3D target READ target WRITE setTarget)
- Q_PROPERTY(QVector3D rotation READ rotation WRITE setRotation)
- Q_PROPERTY(bool multisample READ multisample WRITE setMultisample)
- QML_ELEMENT
-
-public:
- explicit FbItem(QQuickItem *parent = 0);
-
- QQuickFramebufferObject::Renderer *createRenderer() const override;
-
- QVector3D eye() const { return m_eye; }
- void setEye(const QVector3D &v);
- QVector3D target() const { return m_target; }
- void setTarget(const QVector3D &v);
-
- QVector3D rotation() const { return m_rotation; }
- void setRotation(const QVector3D &v);
-
- enum SyncState {
- CameraNeedsSync = 0x01,
- RotationNeedsSync = 0x02,
- AllNeedsSync = 0xFF
- };
- int swapSyncState();
-
- bool multisample() const { return m_multisample; }
- void setMultisample(bool m) { m_multisample = m; }
-
-private:
- QVector3D m_eye;
- QVector3D m_target;
- QVector3D m_rotation;
- int m_syncState;
- bool m_multisample;
-};
-
-#endif // FBITEM_H
diff --git a/examples/quick/quickwidgets/qquickviewcomparison/logo.h b/examples/quick/quickwidgets/qquickviewcomparison/logo.h
deleted file mode 100644
index 7e58bbb7b7..0000000000
--- a/examples/quick/quickwidgets/qquickviewcomparison/logo.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-#ifndef LOGO_H
-#define LOGO_H
-
-#include <qopengl.h>
-#include <QList>
-#include <QVector3D>
-
-class Logo
-{
-public:
- Logo();
- const GLfloat *constData() const { return m_data.constData(); }
- int count() const { return m_count; }
- int vertexCount() const { return m_count / 6; }
-
-private:
- void quad(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2, GLfloat x3, GLfloat y3, GLfloat x4, GLfloat y4);
- void extrude(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
- void add(const QVector3D &v, const QVector3D &n);
-
- QList<GLfloat> m_data;
- int m_count;
-};
-
-#endif // LOGO_H
diff --git a/examples/quick/quickwidgets/qquickviewcomparison/main.cpp b/examples/quick/quickwidgets/qquickviewcomparison/main.cpp
deleted file mode 100644
index e40c509829..0000000000
--- a/examples/quick/quickwidgets/qquickviewcomparison/main.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-#include <QApplication>
-#include <QCommandLineParser>
-#include <QCommandLineOption>
-
-#include "mainwindow.h"
-
-int main(int argc, char **argv)
-{
- qputenv("QML_BAD_GUI_RENDER_LOOP", "1"); // QTBUG-39507
-
- QApplication app(argc, argv);
-
- // this example and QQuickWidget are only functional when rendering with OpenGL
- QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi);
-
- QCoreApplication::setApplicationName("Qt QQuickView/QQuickWidget Comparison Example");
- QCoreApplication::setOrganizationName("QtProject");
- QCoreApplication::setApplicationVersion(QT_VERSION_STR);
- QCommandLineParser parser;
- parser.setApplicationDescription(QCoreApplication::applicationName());
- parser.addHelpOption();
- parser.addVersionOption();
- QCommandLineOption noRenderAlphaOption("no-render-alpha", "Do not render Alpha");
- parser.addOption(noRenderAlphaOption);
- QCommandLineOption transparentOption("transparent", "Transparent window");
- parser.addOption(transparentOption);
-
- parser.process(app);
-
- const bool transparency = parser.isSet(transparentOption);
- MainWindow widgetWindow(transparency, parser.isSet(noRenderAlphaOption));
- if (transparency) {
- widgetWindow.setAttribute(Qt::WA_TranslucentBackground);
- widgetWindow.setAttribute(Qt::WA_NoSystemBackground, false);
- }
-
- widgetWindow.resize(1024, 768);
- widgetWindow.show();
-
- return app.exec();
-}
diff --git a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h b/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h
deleted file mode 100644
index d182b70960..0000000000
--- a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-#ifndef MAINWINDOW_H
-#define MAINWINDOW_H
-
-#include <QWidget>
-#include <QQuickWidget>
-#include <QQuickView>
-
-QT_FORWARD_DECLARE_CLASS(QRadioButton)
-QT_FORWARD_DECLARE_CLASS(QCheckBox)
-QT_FORWARD_DECLARE_CLASS(QLabel)
-QT_FORWARD_DECLARE_CLASS(QLayout)
-
-class MainWindow : public QWidget
-{
-public:
- explicit MainWindow(bool transparency, bool noRenderAlpha);
-
-protected:
- void resizeEvent(QResizeEvent*);
-
-private slots:
- void updateView();
- void onStatusChangedView(QQuickView::Status status);
- void onStatusChangedWidget(QQuickWidget::Status status);
- void onSceneGraphError(QQuickWindow::SceneGraphError error, const QString &message);
-
-private:
- void switchTo(QWidget *view);
-
- QRadioButton *m_radioView;
- QRadioButton *m_radioWidget;
- QCheckBox *m_checkboxMultiSample;
- QLabel *m_labelStatus;
- QLayout *m_containerLayout;
- QWidget *m_currentView;
- QObject *m_currentRootObject;
- QLabel *m_overlayLabel;
- QCheckBox *m_checkboxOverlayVisible;
-
- enum State {
- Unknown,
- UseWidget,
- UseWindow
- } m_state;
-
- QSurfaceFormat m_format;
-
- bool m_transparent;
- bool m_noRenderAlpha;
-};
-
-#endif
diff --git a/examples/quick/quickwidgets/qquickviewcomparison/qquickviewcomparison.qrc b/examples/quick/quickwidgets/qquickviewcomparison/qquickviewcomparison.qrc
deleted file mode 100644
index 2b259fdeec..0000000000
--- a/examples/quick/quickwidgets/qquickviewcomparison/qquickviewcomparison.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<RCC>
- <qresource prefix="/qquickviewcomparison">
- <file>test.qml</file>
- </qresource>
-</RCC>
diff --git a/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/CMakeLists.txt b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/CMakeLists.txt
new file mode 100644
index 0000000000..aa1cd2f0cc
--- /dev/null
+++ b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/CMakeLists.txt
@@ -0,0 +1,57 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(qquickwidgetversuswindow_opengl LANGUAGES CXX)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Quick QuickWidgets ShaderTools Widgets)
+
+qt_standard_project_setup(REQUIRES 6.5)
+
+qt_add_executable(qquickwidgetversuswindow_opengl
+ WIN32
+ MACOSX_BUNDLE
+ fbitem.cpp fbitem.h
+ logo.cpp logo.h
+ main.cpp
+ mainwindow.cpp mainwindow.h
+)
+
+target_link_libraries(qquickwidgetversuswindow_opengl PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Quick
+ Qt6::QuickWidgets
+ Qt6::Widgets
+)
+
+qt_add_qml_module(qquickwidgetversuswindow_opengl
+ URI fbitem
+ QML_FILES test.qml
+ RESOURCE_PREFIX /qquickwidgetversuswindow_opengl
+ NO_RESOURCE_TARGET_PATH
+)
+
+qt6_add_shaders(qquickwidgetversuswindow_opengl "shaders"
+ PRECOMPILE
+ OPTIMIZED
+ PREFIX
+ "/qquickwidgetversuswindow_opengl"
+ FILES
+ "wobble.frag"
+)
+
+install(TARGETS qquickwidgetversuswindow_opengl
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET qquickwidgetversuswindow_opengl
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/doc/images/qquickwidgetversuswindow-opengl-example.jpg b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/doc/images/qquickwidgetversuswindow-opengl-example.jpg
new file mode 100644
index 0000000000..584ac4ed69
--- /dev/null
+++ b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/doc/images/qquickwidgetversuswindow-opengl-example.jpg
Binary files differ
diff --git a/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/doc/src/qquickwidgetversuswindow_opengl.qdoc b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/doc/src/qquickwidgetversuswindow_opengl.qdoc
new file mode 100644
index 0000000000..ced0eb2d34
--- /dev/null
+++ b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/doc/src/qquickwidgetversuswindow_opengl.qdoc
@@ -0,0 +1,39 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+
+/*!
+ \title QQuickWidget - QQuickView Comparison Example
+ \example quickwidgets/qquickwidgetversuswindow_opengl
+ \brief Demonstrates the benefits of QQuickWidget over a QQuickView embedded as a native window.
+ \examplecategory {User Interface Components}
+ \image qquickwidgetversuswindow-opengl-example.jpg
+
+ The example allows showing the same Qt Quick scene within the same
+ QWidget-based user interface using two different approaches: one is using a
+ QQuickView and using it as a child window and
+ QWidget::createWindowContainer(). The other is using QQuickWidget which
+ acts as a true QWidget and supports, among others, better clipping and
+ stacking, as is expected from a true QWidget.
+
+ The Qt Quick scene also uses direct OpenGL rendering, proving that with
+ QQuickWidget the rendering still happens using the accelerated 3D API. The
+ implication of this is that the example is tied to OpenGL and will not work
+ with other graphics APIs (Vulkan, Metal, Direct 3D).
+
+ Clicking on the Show Overlay checkbox demonstrates a widget stacking case
+ that is not rendering as expected when embedding a native window, while
+ QQuickWidget makes it render as expected.
+
+ Multisample antialiasing can also be exercised. When enabling it via the
+ corresponding checkbox, QQuickWidget will internally render into a
+ multisample renderbuffer, which is then resolved into a regular,
+ non-multisample 2D texture after each render pass, thus enabling
+ multisampling for the Qt Quick content without affecting the rest of the
+ QWidget UI. With QQuickView the native window will request multisampling
+ for its corresponding window surface, bringing similar results, if
+ supported by the platform.
+
+ The Qt Quick scene is interactive: typing into the text field is possible
+ regardless of which embedding technology is used. QQuickWidget takes care
+ of forwarding input events to the underlying Qt Quick scene automatically.
+*/
diff --git a/examples/quick/quickwidgets/qquickviewcomparison/fbitem.cpp b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/fbitem.cpp
index 139fcbae5c..3c680095c9 100644
--- a/examples/quick/quickwidgets/qquickviewcomparison/fbitem.cpp
+++ b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/fbitem.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "fbitem.h"
#include <QOpenGLFramebufferObject>
diff --git a/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/fbitem.h b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/fbitem.h
new file mode 100644
index 0000000000..d8c168d9d1
--- /dev/null
+++ b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/fbitem.h
@@ -0,0 +1,100 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#ifndef FBITEM_H
+#define FBITEM_H
+
+#include <QQuickFramebufferObject>
+#include <QOpenGLVertexArrayObject>
+#include <QOpenGLBuffer>
+#include <QOpenGLShaderProgram>
+#include <QVector3D>
+#include "logo.h"
+
+struct StateBinder;
+
+class FbItemRenderer : public QQuickFramebufferObject::Renderer
+{
+public:
+ FbItemRenderer(bool multisample);
+ void synchronize(QQuickFramebufferObject *item) override;
+ void render() override;
+ QOpenGLFramebufferObject *createFramebufferObject(const QSize &size) override;
+
+private:
+ void ensureInit();
+ void initBuf();
+ void setupVertexAttribs();
+ void initProgram();
+ void updateDirtyUniforms();
+
+ bool m_inited;
+ bool m_multisample;
+ QMatrix4x4 m_proj;
+ QMatrix4x4 m_camera;
+ QMatrix4x4 m_baseWorld;
+ QMatrix4x4 m_world;
+ QOpenGLVertexArrayObject m_vao;
+ QOpenGLBuffer m_logoVbo;
+ Logo m_logo;
+ QScopedPointer<QOpenGLShaderProgram> m_program;
+ int m_projMatrixLoc;
+ int m_camMatrixLoc;
+ int m_worldMatrixLoc;
+ int m_normalMatrixLoc;
+ int m_lightPosLoc;
+ QVector3D m_rotation;
+
+ enum Dirty {
+ DirtyProjection = 0x01,
+ DirtyCamera = 0x02,
+ DirtyWorld = 0x04,
+ DirtyLight = 0x08,
+ DirtyAll = 0xFF
+ };
+ int m_dirty;
+
+ friend struct StateBinder;
+};
+
+class FbItem : public QQuickFramebufferObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QVector3D eye READ eye WRITE setEye)
+ Q_PROPERTY(QVector3D target READ target WRITE setTarget)
+ Q_PROPERTY(QVector3D rotation READ rotation WRITE setRotation)
+ Q_PROPERTY(bool multisample READ multisample WRITE setMultisample)
+ QML_ELEMENT
+
+public:
+ explicit FbItem(QQuickItem *parent = nullptr);
+
+ QQuickFramebufferObject::Renderer *createRenderer() const override;
+
+ QVector3D eye() const { return m_eye; }
+ void setEye(const QVector3D &v);
+ QVector3D target() const { return m_target; }
+ void setTarget(const QVector3D &v);
+
+ QVector3D rotation() const { return m_rotation; }
+ void setRotation(const QVector3D &v);
+
+ enum SyncState {
+ CameraNeedsSync = 0x01,
+ RotationNeedsSync = 0x02,
+ AllNeedsSync = 0xFF
+ };
+ int swapSyncState();
+
+ bool multisample() const { return m_multisample; }
+ void setMultisample(bool m) { m_multisample = m; }
+
+private:
+ QVector3D m_eye;
+ QVector3D m_target;
+ QVector3D m_rotation;
+ int m_syncState;
+ bool m_multisample;
+};
+
+#endif // FBITEM_H
diff --git a/examples/quick/quickwidgets/qquickviewcomparison/logo.cpp b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/logo.cpp
index b11c326034..ce74d82911 100644
--- a/examples/quick/quickwidgets/qquickviewcomparison/logo.cpp
+++ b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/logo.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "logo.h"
#include <qmath.h>
diff --git a/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/logo.h b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/logo.h
new file mode 100644
index 0000000000..25479de14d
--- /dev/null
+++ b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/logo.h
@@ -0,0 +1,28 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#ifndef LOGO_H
+#define LOGO_H
+
+#include <qopengl.h>
+#include <QList>
+#include <QVector3D>
+
+class Logo
+{
+public:
+ Logo();
+ const GLfloat *constData() const { return m_data.constData(); }
+ int count() const { return m_count; }
+ int vertexCount() const { return m_count / 6; }
+
+private:
+ void quad(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2, GLfloat x3, GLfloat y3, GLfloat x4, GLfloat y4);
+ void extrude(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
+ void add(const QVector3D &v, const QVector3D &n);
+
+ QList<GLfloat> m_data;
+ int m_count;
+};
+
+#endif // LOGO_H
diff --git a/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/main.cpp b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/main.cpp
new file mode 100644
index 0000000000..8d8e4236b9
--- /dev/null
+++ b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/main.cpp
@@ -0,0 +1,42 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include <QApplication>
+#include <QCommandLineParser>
+#include <QCommandLineOption>
+
+#include "mainwindow.h"
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ // this example and QQuickWidget are only functional when rendering with OpenGL
+ QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL);
+
+ QCoreApplication::setApplicationName("Qt QQuickView/QQuickWidget Comparison Example");
+ QCoreApplication::setOrganizationName("QtProject");
+ QCoreApplication::setApplicationVersion(QT_VERSION_STR);
+ QCommandLineParser parser;
+ parser.setApplicationDescription(QCoreApplication::applicationName());
+ parser.addHelpOption();
+ parser.addVersionOption();
+ QCommandLineOption noRenderAlphaOption("no-render-alpha", "Do not render Alpha");
+ parser.addOption(noRenderAlphaOption);
+ QCommandLineOption transparentOption("transparent", "Transparent window");
+ parser.addOption(transparentOption);
+
+ parser.process(app);
+
+ const bool transparency = parser.isSet(transparentOption);
+ MainWindow widgetWindow(transparency, parser.isSet(noRenderAlphaOption));
+ if (transparency) {
+ widgetWindow.setAttribute(Qt::WA_TranslucentBackground);
+ widgetWindow.setAttribute(Qt::WA_NoSystemBackground, false);
+ }
+
+ widgetWindow.resize(1024, 768);
+ widgetWindow.show();
+
+ return app.exec();
+}
diff --git a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/mainwindow.cpp
index 2e45bc2df6..18bc393ddd 100644
--- a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp
+++ b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/mainwindow.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "mainwindow.h"
#include "fbitem.h"
@@ -63,10 +16,10 @@ MainWindow::MainWindow(bool transparency, bool noRenderAlpha)
m_transparent(transparency),
m_noRenderAlpha(noRenderAlpha)
{
- QVBoxLayout *layout = new QVBoxLayout;
+ auto *layout = new QVBoxLayout;
QGroupBox *groupBox = new QGroupBox(tr("Type"));
- QVBoxLayout *vbox = new QVBoxLayout;
+ auto *vbox = new QVBoxLayout;
m_radioView = new QRadioButton(tr("QQuickView in a window container (direct)"));
m_radioWidget = new QRadioButton(tr("QQuickWidget (indirect through framebuffer objects)"));
vbox->addWidget(m_radioWidget);
@@ -158,10 +111,10 @@ void MainWindow::updateView()
? m_currentRootObject->property("currentText").toString()
: QStringLiteral("Hello Qt");
- QUrl source("qrc:qquickviewcomparison/test.qml");
+ QUrl source("qrc:qquickwidgetversuswindow_opengl/test.qml");
if (m_state == UseWindow) {
- QQuickView *quickView = new QQuickView;
+ auto *quickView = new QQuickView;
// m_transparent is not supported here since many systems have problems with semi-transparent child windows
quickView->setFormat(m_format);
quickView->setResizeMode(QQuickView::SizeRootObjectToView);
@@ -171,7 +124,7 @@ void MainWindow::updateView()
m_currentRootObject = quickView->rootObject();
switchTo(QWidget::createWindowContainer(quickView));
} else if (m_state == UseWidget) {
- QQuickWidget *quickWidget = new QQuickWidget;
+ auto *quickWidget = new QQuickWidget;
if (m_transparent)
quickWidget->setClearColor(Qt::transparent);
quickWidget->setFormat(m_format);
diff --git a/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/mainwindow.h b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/mainwindow.h
new file mode 100644
index 0000000000..24d8bf3b35
--- /dev/null
+++ b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/mainwindow.h
@@ -0,0 +1,55 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QWidget>
+#include <QQuickWidget>
+#include <QQuickView>
+
+QT_FORWARD_DECLARE_CLASS(QRadioButton)
+QT_FORWARD_DECLARE_CLASS(QCheckBox)
+QT_FORWARD_DECLARE_CLASS(QLabel)
+QT_FORWARD_DECLARE_CLASS(QLayout)
+
+class MainWindow : public QWidget
+{
+public:
+ explicit MainWindow(bool transparency, bool noRenderAlpha);
+
+protected:
+ void resizeEvent(QResizeEvent*);
+
+private slots:
+ void updateView();
+ void onStatusChangedView(QQuickView::Status status);
+ void onStatusChangedWidget(QQuickWidget::Status status);
+ void onSceneGraphError(QQuickWindow::SceneGraphError error, const QString &message);
+
+private:
+ void switchTo(QWidget *view);
+
+ QRadioButton *m_radioView;
+ QRadioButton *m_radioWidget;
+ QCheckBox *m_checkboxMultiSample;
+ QLabel *m_labelStatus;
+ QLayout *m_containerLayout;
+ QWidget *m_currentView;
+ QObject *m_currentRootObject;
+ QLabel *m_overlayLabel;
+ QCheckBox *m_checkboxOverlayVisible;
+
+ enum State {
+ Unknown,
+ UseWidget,
+ UseWindow
+ } m_state;
+
+ QSurfaceFormat m_format;
+
+ bool m_transparent;
+ bool m_noRenderAlpha;
+};
+
+#endif
diff --git a/examples/quick/quickwidgets/qquickviewcomparison/qquickviewcomparison.pro b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/qquickwidgetversuswindow_opengl.pro
index 7809c20b3a..42930b1ecd 100644
--- a/examples/quick/quickwidgets/qquickviewcomparison/qquickviewcomparison.pro
+++ b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/qquickwidgetversuswindow_opengl.pro
@@ -1,5 +1,5 @@
TEMPLATE = app
-TARGET = qquickviewcomparison
+TARGET = qquickwidgetversuswindow_opengl
CONFIG += qmltypes
QML_IMPORT_NAME = fbitem
@@ -16,9 +16,9 @@ HEADERS += mainwindow.h \
logo.h \
fbitem.h
-RESOURCES += qquickviewcomparison.qrc
+RESOURCES += qquickwidgetversuswindow_opengl.qrc
OTHER_FILES += test.qml
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/quickwidgets/qquickviewcomparison
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/quickwidgets/qquickwidgetversuswindow_opengl
INSTALLS += target
diff --git a/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/qquickwidgetversuswindow_opengl.qrc b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/qquickwidgetversuswindow_opengl.qrc
new file mode 100644
index 0000000000..4650ef97e8
--- /dev/null
+++ b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/qquickwidgetversuswindow_opengl.qrc
@@ -0,0 +1,6 @@
+<RCC>
+ <qresource prefix="/qquickwidgetversuswindow_opengl">
+ <file>test.qml</file>
+ <file>wobble.frag.qsb</file>
+ </qresource>
+</RCC>
diff --git a/examples/quick/quickwidgets/qquickviewcomparison/test.qml b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/test.qml
index e142add084..a7e30e8917 100644
--- a/examples/quick/quickwidgets/qquickviewcomparison/test.qml
+++ b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/test.qml
@@ -1,56 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.2
-import QtQuick.Particles 2.0
-import fbitem 1.0
+import QtQuick
+import QtQuick.Particles
+import fbitem
Rectangle {
id: root
@@ -213,16 +166,6 @@ Rectangle {
property real frequency: 10
property real time: 0
NumberAnimation on time { loops: Animation.Infinite; from: 0; to: Math.PI * 2; duration: 1000 }
- fragmentShader:
- "uniform lowp float qt_Opacity;" +
- "uniform highp float amplitude;" +
- "uniform highp float frequency;" +
- "uniform highp float time;" +
- "uniform sampler2D source;" +
- "varying highp vec2 qt_TexCoord0;" +
- "void main() {" +
- " highp vec2 p = sin(time + frequency * qt_TexCoord0);" +
- " gl_FragColor = texture2D(source, qt_TexCoord0 + amplitude * vec2(p.y, -p.x)) * qt_Opacity;" +
- "}"
+ fragmentShader: "wobble.frag.qsb"
}
}
diff --git a/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/wobble.frag b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/wobble.frag
new file mode 100644
index 0000000000..6aadad661f
--- /dev/null
+++ b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/wobble.frag
@@ -0,0 +1,23 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#version 440
+
+layout(location = 0) in vec2 qt_TexCoord0;
+layout(location = 0) out vec4 fragColor;
+
+layout(binding = 1) uniform sampler2D source;
+
+layout(std140, binding = 0) uniform buf {
+ mat4 qt_Matrix;
+ float qt_Opacity;
+ float amplitude;
+ float frequency;
+ float time;
+};
+
+void main()
+{
+ vec2 p = sin(time + frequency * qt_TexCoord0);
+ fragColor = texture(source, qt_TexCoord0 + amplitude * vec2(p.y, -p.x)) * qt_Opacity;
+}
diff --git a/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/wobble.frag.qsb b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/wobble.frag.qsb
new file mode 100644
index 0000000000..ab764e8326
--- /dev/null
+++ b/examples/quick/quickwidgets/qquickwidgetversuswindow_opengl/wobble.frag.qsb
Binary files differ
diff --git a/examples/quick/quickwidgets/quickwidget/CMakeLists.txt b/examples/quick/quickwidgets/quickwidget/CMakeLists.txt
index 5cd4b9445a..7a878a2b28 100644
--- a/examples/quick/quickwidgets/quickwidget/CMakeLists.txt
+++ b/examples/quick/quickwidgets/quickwidget/CMakeLists.txt
@@ -1,66 +1,46 @@
-# Generated from quickwidget.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(quickwidget LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Quick QuickWidgets Widgets)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/quickwidgets/quickwidget")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Widgets)
-find_package(Qt6 COMPONENTS QuickWidgets)
+qt_standard_project_setup(REQUIRES 6.5)
qt_add_executable(quickwidget
- fbitem.cpp fbitem.h
+ WIN32
+ MACOSX_BUNDLE
main.cpp
)
-set_target_properties(quickwidget PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(quickwidget PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Quick
- Qt::QuickWidgets
- Qt::Widgets
-)
-
-# Resources:
-set(quickwidget_resource_files
- "customgl.qml"
- "rotatingsquare.qml"
- "rotatingsquaretab.qml"
+target_link_libraries(quickwidget PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Quick
+ Qt6::QuickWidgets
+ Qt6::Widgets
)
-qt6_add_resources(quickwidget "quickwidget"
- PREFIX
- "/quickwidget"
- FILES
- ${quickwidget_resource_files}
+qt_add_qml_module(quickwidget
+ URI QuickWidgetExample
+ QML_FILES
+ rotatingsquare.qml
+ RESOURCE_PREFIX /quickwidget
+ NO_RESOURCE_TARGET_PATH
)
install(TARGETS quickwidget
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-set_target_properties(quickwidget PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI QuickWidgetExample
+qt_generate_deploy_qml_app_script(
+ TARGET quickwidget
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
-
-qt6_qml_type_registration(quickwidget)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/quickwidgets/quickwidget/customgl.qml b/examples/quick/quickwidgets/quickwidget/customgl.qml
deleted file mode 100644
index 577f006bd7..0000000000
--- a/examples/quick/quickwidgets/quickwidget/customgl.qml
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QuickWidgetExample 1.0
-
-Rectangle {
- color: "lightGray"
-
- FbItem {
- anchors.fill: parent
- anchors.margins: 10
- }
-
- Text {
- anchors.left: parent.left
- anchors.bottom: parent.bottom
- anchors.margins: 15
- text: "QQuickFramebufferObject with animated clear color"
- color: "white"
- }
-}
diff --git a/examples/quick/quickwidgets/quickwidget/doc/src/quickwidget.qdoc b/examples/quick/quickwidgets/quickwidget/doc/src/quickwidget.qdoc
index 9328c562b4..0a80b32c4a 100644
--- a/examples/quick/quickwidgets/quickwidget/doc/src/quickwidget.qdoc
+++ b/examples/quick/quickwidgets/quickwidget/doc/src/quickwidget.qdoc
@@ -1,34 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Qt Quick Widgets Example
\example quickwidgets/quickwidget
\brief Demonstrates how to mix QML with a Qt Widgets application using the QQuickWidget class.
+ \examplecategory {User Interface Components}
+
\image qtquickwidgets-example.png
*/
diff --git a/examples/quick/quickwidgets/quickwidget/fbitem.cpp b/examples/quick/quickwidgets/quickwidget/fbitem.cpp
deleted file mode 100644
index 3e98168dcf..0000000000
--- a/examples/quick/quickwidgets/quickwidget/fbitem.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-#include "fbitem.h"
-#include <QOpenGLFramebufferObject>
-#include <QOpenGLContext>
-#include <QOpenGLFunctions>
-#include <QtCore/QDebug>
-
-#if QT_CONFIG(opengl)
-class FbRenderer : public QQuickFramebufferObject::Renderer
-{
-public:
- FbRenderer() { }
-
- // The lifetime of the FBO and this class depends on how QQuickWidget
- // manages the scenegraph and context when it comes to showing and hiding
- // the widget. The actual behavior is proven by the debug prints.
- ~FbRenderer() override {
- qDebug("FbRenderer destroyed");
- }
-
- void render() override {
- QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions();
- f->glClearColor(c, 0, 0, 1);
- f->glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
- c += 0.01f * dir;
- if (c >= 1.0f || c <= 0.0f)
- dir *= -1;
- update();
- }
-
- QOpenGLFramebufferObject *createFramebufferObject(const QSize &size) override {
- qDebug() << "Creating FBO" << size;
- QOpenGLFramebufferObjectFormat format;
- format.setAttachment(QOpenGLFramebufferObject::CombinedDepthStencil);
- return new QOpenGLFramebufferObject(size, format);
- }
-
-private:
- float c = 0;
- int dir = 1;
-};
-#endif
-
-QQuickFramebufferObject::Renderer *FbItem::createRenderer() const
-{
-#if QT_CONFIG(opengl)
- return new FbRenderer;
-#else
- return nullptr;
-#endif
-}
diff --git a/examples/quick/quickwidgets/quickwidget/fbitem.h b/examples/quick/quickwidgets/quickwidget/fbitem.h
deleted file mode 100644
index c1fb866c9a..0000000000
--- a/examples/quick/quickwidgets/quickwidget/fbitem.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-#ifndef FBITEM_H
-#define FBITEM_H
-
-#include <QtQuick/QQuickFramebufferObject>
-
-class FbItem : public QQuickFramebufferObject
-{
- Q_OBJECT
- QML_ELEMENT
-public:
- Renderer *createRenderer() const;
-};
-
-#endif
diff --git a/examples/quick/quickwidgets/quickwidget/main.cpp b/examples/quick/quickwidgets/quickwidget/main.cpp
index 1c8b21f790..f8e0b78844 100644
--- a/examples/quick/quickwidgets/quickwidget/main.cpp
+++ b/examples/quick/quickwidgets/quickwidget/main.cpp
@@ -1,61 +1,18 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+#include <QApplication>
+#include <QCommandLineParser>
#include <QQuickWidget>
#include <QQuickItem>
#include <QQmlError>
-#include <QtWidgets>
-#include "fbitem.h"
-
-static bool optMultipleSample = false;
-static bool optCoreProfile = false;
+#include <QMdiArea>
+#include <QLCDNumber>
+#include <QFileDialog>
+#include <QStatusBar>
+#include <QMainWindow>
+#include <QMenuBar>
+#include <QPushButton>
class MainWindow : public QMainWindow {
Q_OBJECT
@@ -74,14 +31,12 @@ private:
QQuickWidget *m_quickWidget;
};
+static bool optMultipleSample = false;
+
MainWindow::MainWindow()
: m_quickWidget(new QQuickWidget)
{
QSurfaceFormat format;
- if (optCoreProfile) {
- format.setVersion(4, 4);
- format.setProfile(QSurfaceFormat::CoreProfile);
- }
if (optMultipleSample)
format.setSamples(4);
m_quickWidget->setFormat(format);
@@ -108,35 +63,67 @@ MainWindow::MainWindow()
setCentralWidget(centralWidget);
QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
- fileMenu->addAction(tr("Grab framebuffer"), this, &MainWindow::grabFramebuffer);
- fileMenu->addAction(tr("Render to pixmap"), this, &MainWindow::renderToPixmap);
- fileMenu->addAction(tr("Grab via grabToImage"), this, &MainWindow::grabToImage);
+ auto grabAction = fileMenu->addAction(tr("Grab framebuffer"), this, &MainWindow::grabFramebuffer);
+ auto renderAction = fileMenu->addAction(tr("Render to pixmap"), this, &MainWindow::renderToPixmap);
+ auto grabToImageAction = fileMenu->addAction(tr("Grab via grabToImage"), this, &MainWindow::grabToImage);
fileMenu->addAction(tr("Quit"), qApp, &QCoreApplication::quit);
QMenu *windowMenu = menuBar()->addMenu(tr("&Window"));
windowMenu->addAction(tr("Add tab widget"), this,
[this, centralWidget] { createQuickWidgetsInTabs(centralWidget); });
+
+ connect(m_quickWidget, &QObject::destroyed, this,
+ [this, grabAction, renderAction, grabToImageAction] {
+ m_quickWidget = nullptr;
+ grabAction->setEnabled(false);
+ renderAction->setEnabled(false);
+ grabToImageAction->setEnabled(false);
+ });
}
void MainWindow::createQuickWidgetsInTabs(QMdiArea *mdiArea)
{
- QTabWidget *tabWidget = new QTabWidget;
+ // A QQuickWidget should work like any other widget when it comes to being
+ // in layouts, in tab widgets, MDI areas, etc. It can also be freely
+ // reparented and made top-level.
+ QTabWidget *tabWidget = new QTabWidget;
const QSize size(400, 400);
-
- QQuickWidget *w = new QQuickWidget;
- w->resize(size);
- w->setResizeMode(QQuickWidget::SizeRootObjectToView);
- w->setSource(QUrl("qrc:quickwidget/rotatingsquaretab.qml"));
-
- tabWidget->addTab(w, tr("Plain Quick content"));
-
- w = new QQuickWidget;
- w->resize(size);
- w->setResizeMode(QQuickWidget::SizeRootObjectToView);
- w->setSource(QUrl("qrc:quickwidget/customgl.qml"));
-
- tabWidget->addTab(w, tr("Custom OpenGL drawing"));
+ const QString msgToTopLevel = QLatin1String("Break out to top-level window");
+ const QString msgFromTopLevel = QLatin1String("Move back under tab widget");
+
+ static const int N = 4;
+ static const QColor colorTab[N] = { Qt::green, Qt::blue, Qt::yellow, Qt::magenta };
+ for (int i = 0; i < N; ++i) {
+ QQuickWidget *widget = new QQuickWidget;
+ widget->resize(size);
+ widget->setResizeMode(QQuickWidget::SizeRootObjectToView);
+ QObject::connect(widget, &QQuickWidget::statusChanged, widget, [widget, i] {
+ if (widget->status() == QQuickWidget::Ready) {
+ if (QQuickItem *rootItem = widget->rootObject()) {
+ rootItem->setProperty("rectColor", colorTab[i]);
+ }
+ }
+ });
+ widget->setSource(QUrl("qrc:quickwidget/rotatingsquare.qml"));
+ widget->setWindowTitle(QString::asprintf("Tab %d", i + 1));
+ QPushButton *btn = new QPushButton(msgToTopLevel, widget);
+ connect(btn, &QPushButton::clicked, widget, [=] {
+ if (widget->parent()) {
+ widget->setAttribute(Qt::WA_DeleteOnClose, true);
+ widget->setParent(nullptr);
+ connect(this, &QObject::destroyed, widget, &QWidget::close);
+ widget->show();
+ btn->setText(msgFromTopLevel);
+ } else {
+ widget->setAttribute(Qt::WA_DeleteOnClose, false);
+ disconnect(this, &QObject::destroyed, widget, &QWidget::close);
+ tabWidget->addTab(widget, widget->windowTitle());
+ btn->setText(msgToTopLevel);
+ }
+ });
+ tabWidget->addTab(widget, QString::asprintf("Tab %d", i + 1));
+ }
mdiArea->addSubWindow(tabWidget);
tabWidget->show();
@@ -146,6 +133,7 @@ void MainWindow::quickWidgetStatusChanged(QQuickWidget::Status status)
{
if (status == QQuickWidget::Error) {
QStringList errors;
+ Q_ASSERT(m_quickWidget);
const auto widgetErrors = m_quickWidget->errors();
for (const QQmlError &error : widgetErrors)
errors.append(error.toString());
@@ -170,12 +158,14 @@ template<class T> void saveToFile(QWidget *parent, T *saveable)
void MainWindow::grabFramebuffer()
{
+ Q_ASSERT(m_quickWidget);
QImage image = m_quickWidget->grabFramebuffer();
saveToFile(this, &image);
}
void MainWindow::renderToPixmap()
{
+ Q_ASSERT(m_quickWidget);
QPixmap pixmap(m_quickWidget->size());
m_quickWidget->render(&pixmap);
saveToFile(this, &pixmap);
@@ -188,6 +178,7 @@ void MainWindow::grabToImage()
fd.setDefaultSuffix("png");
fd.selectFile("test_grabToImage.png");
if (fd.exec() == QDialog::Accepted) {
+ Q_ASSERT(m_quickWidget);
QMetaObject::invokeMethod(m_quickWidget->rootObject(), "performLayerBasedGrab",
Q_ARG(QVariant, fd.selectedFiles().first()));
}
@@ -197,28 +188,24 @@ int main(int argc, char **argv)
{
QApplication app(argc, argv);
- // this example and QQuickWidget are only functional when rendering with OpenGL
- QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi);
-
QCoreApplication::setApplicationName("Qt QQuickWidget Example");
QCoreApplication::setOrganizationName("QtProject");
QCoreApplication::setApplicationVersion(QT_VERSION_STR);
+
QCommandLineParser parser;
parser.setApplicationDescription(QCoreApplication::applicationName());
parser.addHelpOption();
parser.addVersionOption();
QCommandLineOption multipleSampleOption("multisample", "Multisampling");
parser.addOption(multipleSampleOption);
- QCommandLineOption coreProfileOption("coreprofile", "Use core profile");
- parser.addOption(coreProfileOption);
parser.process(app);
optMultipleSample = parser.isSet(multipleSampleOption);
- optCoreProfile = parser.isSet(coreProfileOption);
- MainWindow mainWindow;
- mainWindow.show();
+ MainWindow *mainWindow = new MainWindow;
+ mainWindow->setAttribute(Qt::WA_DeleteOnClose, true);
+ mainWindow->show();
return app.exec();
}
diff --git a/examples/quick/quickwidgets/quickwidget/quickwidget.pro b/examples/quick/quickwidgets/quickwidget/quickwidget.pro
index b824c520f5..9c31ac28f3 100644
--- a/examples/quick/quickwidgets/quickwidget/quickwidget.pro
+++ b/examples/quick/quickwidgets/quickwidget/quickwidget.pro
@@ -7,8 +7,7 @@ CONFIG += qmltypes
QML_IMPORT_NAME = QuickWidgetExample
QML_IMPORT_MAJOR_VERSION = 1
-SOURCES += main.cpp fbitem.cpp
-HEADERS += fbitem.h
+SOURCES += main.cpp
RESOURCES += quickwidget.qrc
diff --git a/examples/quick/quickwidgets/quickwidget/quickwidget.qrc b/examples/quick/quickwidgets/quickwidget/quickwidget.qrc
index 85a49b75ca..c073b7b80d 100644
--- a/examples/quick/quickwidgets/quickwidget/quickwidget.qrc
+++ b/examples/quick/quickwidgets/quickwidget/quickwidget.qrc
@@ -1,7 +1,5 @@
<RCC>
<qresource prefix="/quickwidget">
<file>rotatingsquare.qml</file>
- <file>rotatingsquaretab.qml</file>
- <file>customgl.qml</file>
</qresource>
</RCC>
diff --git a/examples/quick/quickwidgets/quickwidget/rotatingsquare.qml b/examples/quick/quickwidgets/quickwidget/rotatingsquare.qml
index 5d3bb72fbe..7fdc1978ce 100644
--- a/examples/quick/quickwidgets/quickwidget/rotatingsquare.qml
+++ b/examples/quick/quickwidgets/quickwidget/rotatingsquare.qml
@@ -1,57 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
Rectangle {
id: root
+ property color rectColor: "red"
Rectangle {
property int d: 100
@@ -59,13 +13,37 @@ Rectangle {
width: d
height: d
anchors.centerIn: parent
- color: "red"
+ color: root.rectColor
NumberAnimation on rotation { from: 0; to: 360; duration: 2000; loops: Animation.Infinite; }
}
Text {
+ id: text
anchors.centerIn: parent
- text: "Qt Quick running in a widget"
+ property string api
+ Connections {
+ target: text.GraphicsInfo
+ function onApiChanged() {
+ var api = text.GraphicsInfo.api;
+ if (api === GraphicsInfo.Software)
+ text.api = "Software";
+ else if (api === GraphicsInfo.OpenGL)
+ text.api = "OpenGL on QRhi";
+ else if (api === GraphicsInfo.Direct3D11)
+ text.api = "D3D11 on QRhi";
+ else if (api === GraphicsInfo.Direct3D12)
+ text.api = "D3D12 on QRhi";
+ else if (api === GraphicsInfo.Vulkan)
+ text.api = "Vulkan on QRhi";
+ else if (api === GraphicsInfo.Metal)
+ text.api = "Metal on QRhi";
+ else if (api === GraphicsInfo.Null)
+ text.api = "Null on QRhi";
+ else
+ text.api = "Unknown API";
+ }
+ }
+ text: "Qt Quick running in a widget\nGraphicsInfo.api says: " + api
}
function performLayerBasedGrab(fn) {
diff --git a/examples/quick/quickwidgets/quickwidget/rotatingsquaretab.qml b/examples/quick/quickwidgets/quickwidget/rotatingsquaretab.qml
deleted file mode 100644
index 116a8f8729..0000000000
--- a/examples/quick/quickwidgets/quickwidget/rotatingsquaretab.qml
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Rectangle {
- gradient: Gradient {
- GradientStop { position: 0; color: "steelblue" }
- GradientStop { position: 1; color: "black" }
- }
-
- Rectangle {
- property int d: 100
- id: square
- width: d
- height: d
- anchors.centerIn: parent
- color: "green"
- NumberAnimation on rotation { from: 360; to: 0; duration: 4000; loops: Animation.Infinite; }
- }
-
- Text {
- anchors.centerIn: parent
- text: "Qt Quick running in a tab widget"
- color: "purple"
- font.bold: true
- font.pointSize: 14
- }
-}
diff --git a/examples/quick/quickwidgets/quickwidgets.pro b/examples/quick/quickwidgets/quickwidgets.pro
index be932f33d0..14d1893776 100644
--- a/examples/quick/quickwidgets/quickwidgets.pro
+++ b/examples/quick/quickwidgets/quickwidgets.pro
@@ -1,3 +1,3 @@
TEMPLATE = subdirs
SUBDIRS = quickwidget \
- qquickviewcomparison
+ qquickwidgetversuswindow_opengl
diff --git a/examples/quick/rendercontrol/.prev_CMakeLists.txt b/examples/quick/rendercontrol/.prev_CMakeLists.txt
deleted file mode 100644
index 53924b33ce..0000000000
--- a/examples/quick/rendercontrol/.prev_CMakeLists.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-# Generated from rendercontrol.pro.
-
-add_subdirectory(rendercontrol_opengl)
-if(WIN32 AND NOT MINGW)
- add_subdirectory(rendercontrol_d3d11)
-endif()
diff --git a/examples/quick/rendercontrol/CMakeLists.txt b/examples/quick/rendercontrol/CMakeLists.txt
index 53924b33ce..d58899ae69 100644
--- a/examples/quick/rendercontrol/CMakeLists.txt
+++ b/examples/quick/rendercontrol/CMakeLists.txt
@@ -1,6 +1,10 @@
-# Generated from rendercontrol.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-add_subdirectory(rendercontrol_opengl)
-if(WIN32 AND NOT MINGW)
- add_subdirectory(rendercontrol_d3d11)
+qt_internal_add_example(rendercontrol_opengl)
+if(WIN32)
+ qt_internal_add_example(rendercontrol_d3d11)
+endif()
+if(TARGET Qt6::Widgets)
+ qt_internal_add_example(rendercontrol_rhi)
endif()
diff --git a/examples/quick/rendercontrol/rendercontrol.pro b/examples/quick/rendercontrol/rendercontrol.pro
index 9922e1e077..d49be63c50 100644
--- a/examples/quick/rendercontrol/rendercontrol.pro
+++ b/examples/quick/rendercontrol/rendercontrol.pro
@@ -3,7 +3,7 @@ TEMPLATE = subdirs
SUBDIRS += \
rendercontrol_opengl
-win32:!mingw {
+win32 {
SUBDIRS += \
rendercontrol_d3d11
}
diff --git a/examples/quick/rendercontrol/rendercontrol_d3d11/CMakeLists.txt b/examples/quick/rendercontrol/rendercontrol_d3d11/CMakeLists.txt
index 949c609af1..ac124d3fa5 100644
--- a/examples/quick/rendercontrol/rendercontrol_d3d11/CMakeLists.txt
+++ b/examples/quick/rendercontrol/rendercontrol_d3d11/CMakeLists.txt
@@ -1,59 +1,50 @@
-# Generated from rendercontrol_d3d11.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(rendercontrol_d3d11 LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/rendercontrol/rendercontrol_d3d11")
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
+qt_standard_project_setup(REQUIRES 6.5)
-qt_add_executable(rendercontrol_d3d11
+qt_add_executable(rendercontrol_d3d11example WIN32 MACOSX_BUNDLE
engine.cpp engine.h
main.cpp
window.cpp window.h
)
-set_target_properties(rendercontrol_d3d11 PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(rendercontrol_d3d11 PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
+
+target_link_libraries(rendercontrol_d3d11example PUBLIC
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
d3d11
dxgi
dxguid
+ uuid
)
-
# Resources:
-set(rendercontrol_resource_files
- "demo.qml"
+qt_add_qml_module(rendercontrol_d3d11example
+ URI rendercontrol
+ QML_FILES
+ "demo.qml"
)
-qt6_add_resources(rendercontrol_d3d11 "rendercontrol"
- PREFIX
- "/rendercontrol"
- FILES
- ${rendercontrol_resource_files}
+install(TARGETS rendercontrol_d3d11example
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-install(TARGETS rendercontrol_d3d11
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+qt_generate_deploy_qml_app_script(
+ TARGET rendercontrol_d3d11example
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/rendercontrol/rendercontrol_d3d11/demo.qml b/examples/quick/rendercontrol/rendercontrol_d3d11/demo.qml
index 32e2f423d1..ef1fe3507a 100644
--- a/examples/quick/rendercontrol/rendercontrol_d3d11/demo.qml
+++ b/examples/quick/rendercontrol/rendercontrol_d3d11/demo.qml
@@ -1,61 +1,15 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
Rectangle {
id: root
+ property bool keyDown: false
gradient: Gradient {
- GradientStop { position: 0; color: mouse.pressed ? "lightsteelblue" : "steelblue" }
+ GradientStop { position: 0; color: mouse.pressed ? "lightsteelblue" : (root.keyDown ? "blue" : "steelblue") }
GradientStop { position: 1; color: "black" }
}
@@ -205,4 +159,7 @@ Rectangle {
id: mouse
anchors.fill: parent
}
+
+ Keys.onPressed: keyDown = true
+ Keys.onReleased: keyDown = false
}
diff --git a/examples/quick/rendercontrol/rendercontrol_d3d11/doc/src/rendercontrol_d3d11.qdoc b/examples/quick/rendercontrol/rendercontrol_d3d11/doc/src/rendercontrol_d3d11.qdoc
index 63f5477ff4..03c8816033 100644
--- a/examples/quick/rendercontrol/rendercontrol_d3d11/doc/src/rendercontrol_d3d11.qdoc
+++ b/examples/quick/rendercontrol/rendercontrol_d3d11/doc/src/rendercontrol_d3d11.qdoc
@@ -1,33 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title QQuickRenderControl D3D11 Example
\example rendercontrol/rendercontrol_d3d11
\brief Shows how to render a Qt Quick scene into a texture that is then used by a non-Quick based Direct3D 11 renderer.
+ \examplecategory {Graphics}
+
\image rendercontrol-d3d11-example.jpg
*/
diff --git a/examples/quick/rendercontrol/rendercontrol_d3d11/engine.cpp b/examples/quick/rendercontrol/rendercontrol_d3d11/engine.cpp
index 99f65f6200..93fcae5e4a 100644
--- a/examples/quick/rendercontrol/rendercontrol_d3d11/engine.cpp
+++ b/examples/quick/rendercontrol/rendercontrol_d3d11/engine.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "engine.h"
#include <QLibrary>
@@ -85,7 +38,6 @@ bool Engine::create()
return false;
}
- ID3D11DeviceContext *ctx = nullptr;
uint flags = 0;
#ifdef ENABLE_DEBUG_LAYER
flags |= D3D11_CREATE_DEVICE_DEBUG;
@@ -93,19 +45,12 @@ bool Engine::create()
// use the default hardware adapter
HRESULT hr = D3D11CreateDevice(nullptr, D3D_DRIVER_TYPE_HARDWARE, nullptr, flags,
nullptr, 0, D3D11_SDK_VERSION,
- &m_device, &m_featureLevel, &ctx);
+ &m_device, &m_featureLevel, &m_context);
if (FAILED(hr)) {
qWarning("Failed to create D3D11 device and context: %s", qPrintable(comErrorMessage(hr)));
return false;
}
- if (SUCCEEDED(ctx->QueryInterface(IID_ID3D11DeviceContext1, reinterpret_cast<void **>(&m_context)))) {
- ctx->Release();
- } else {
- qWarning("ID3D11DeviceContext1 not supported");
- return false;
- }
-
return true;
}
diff --git a/examples/quick/rendercontrol/rendercontrol_d3d11/engine.h b/examples/quick/rendercontrol/rendercontrol_d3d11/engine.h
index 8b1b3ebf39..02f0fa9049 100644
--- a/examples/quick/rendercontrol/rendercontrol_d3d11/engine.h
+++ b/examples/quick/rendercontrol/rendercontrol_d3d11/engine.h
@@ -1,57 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef ENGINE_H
#define ENGINE_H
#include <QWindow>
+#include <QtCore/qt_windows.h> // suppress windows.h include coming from d3d11_1.h
#include <d3d11_1.h>
#include <dxgi1_3.h>
@@ -81,14 +35,14 @@ public:
Swapchain createSwapchain(QWindow *window);
void resizeSwapchain(Swapchain *sc, QWindow *window);
ID3D11Device *device() { return m_device; }
- ID3D11DeviceContext1 *context() { return m_context; }
+ ID3D11DeviceContext *context() { return m_context; }
private:
void createSwapchainBuffers(Swapchain *sc);
IDXGIFactory1 *m_dxgiFactory = nullptr;
ID3D11Device *m_device = nullptr;
- ID3D11DeviceContext1 *m_context = nullptr;
+ ID3D11DeviceContext *m_context = nullptr;
D3D_FEATURE_LEVEL m_featureLevel;
};
diff --git a/examples/quick/rendercontrol/rendercontrol_d3d11/main.cpp b/examples/quick/rendercontrol/rendercontrol_d3d11/main.cpp
index 119b289500..99b694c107 100644
--- a/examples/quick/rendercontrol/rendercontrol_d3d11/main.cpp
+++ b/examples/quick/rendercontrol/rendercontrol_d3d11/main.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
// This example is only functional on Windows with Direct 3D 11.
@@ -64,7 +17,7 @@ int main(int argc, char **argv)
QCoreApplication::setApplicationVersion(QT_VERSION_STR);
// only functional when Qt Quick is also using D3D11
- QQuickWindow::setGraphicsApi(QSGRendererInterface::Direct3D11Rhi);
+ QQuickWindow::setGraphicsApi(QSGRendererInterface::Direct3D11);
Engine engine;
if (!engine.create())
diff --git a/examples/quick/rendercontrol/rendercontrol_d3d11/quad.frag b/examples/quick/rendercontrol/rendercontrol_d3d11/quad.frag
index 09914ccdbe..a72c43db0f 100644
--- a/examples/quick/rendercontrol/rendercontrol_d3d11/quad.frag
+++ b/examples/quick/rendercontrol/rendercontrol_d3d11/quad.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
struct PSIn
{
float2 coord : TEXCOORD0;
diff --git a/examples/quick/rendercontrol/rendercontrol_d3d11/rendercontrol.qrc b/examples/quick/rendercontrol/rendercontrol_d3d11/rendercontrol.qrc
index 2246eeb842..9a410038a5 100644
--- a/examples/quick/rendercontrol/rendercontrol_d3d11/rendercontrol.qrc
+++ b/examples/quick/rendercontrol/rendercontrol_d3d11/rendercontrol.qrc
@@ -1,5 +1,5 @@
<RCC>
- <qresource prefix="/rendercontrol">
+ <qresource prefix="/qt/qml/rendercontrol">
<file>demo.qml</file>
</qresource>
</RCC>
diff --git a/examples/quick/rendercontrol/rendercontrol_d3d11/rendercontrol_d3d11.pro b/examples/quick/rendercontrol/rendercontrol_d3d11/rendercontrol_d3d11.pro
index 29cee7580b..0a65dec88a 100644
--- a/examples/quick/rendercontrol/rendercontrol_d3d11/rendercontrol_d3d11.pro
+++ b/examples/quick/rendercontrol/rendercontrol_d3d11/rendercontrol_d3d11.pro
@@ -13,7 +13,7 @@ HEADERS += \
RESOURCES += rendercontrol.qrc
-LIBS += -ld3d11 -ldxgi -ldxguid
+LIBS += -ld3d11 -ldxgi -ldxguid -luuid
target.path = $$[QT_INSTALL_EXAMPLES]/quick/rendercontrol/rendercontrol_d3d11
INSTALLS += target
diff --git a/examples/quick/rendercontrol/rendercontrol_d3d11/window.cpp b/examples/quick/rendercontrol/rendercontrol_d3d11/window.cpp
index 918698effe..33f16a9760 100644
--- a/examples/quick/rendercontrol/rendercontrol_d3d11/window.cpp
+++ b/examples/quick/rendercontrol/rendercontrol_d3d11/window.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "window.h"
#include <QCoreApplication>
@@ -118,7 +71,8 @@ Window::Window(Engine *engine)
m_quickWindow = new QQuickWindow(m_renderControl);
m_qmlEngine = new QQmlEngine;
- m_qmlComponent = new QQmlComponent(m_qmlEngine, QUrl(QLatin1String("qrc:/rendercontrol/demo.qml")));
+ m_qmlComponent = new QQmlComponent(
+ m_qmlEngine, QUrl(QLatin1String("qrc:/qt/qml/rendercontrol/demo.qml")));
if (m_qmlComponent->isError()) {
for (const QQmlError &error : m_qmlComponent->errors())
qWarning() << error.url() << error.line() << error;
@@ -130,12 +84,12 @@ Window::Window(Engine *engine)
qWarning() << error.url() << error.line() << error;
}
- QQuickItem *rootItem = qobject_cast<QQuickItem *>(rootObject);
- rootItem->setSize(QSize(QML_WIDTH, QML_HEIGHT));
- m_quickWindow->contentItem()->setSize(rootItem->size());
- m_quickWindow->setGeometry(0, 0, rootItem->width(), rootItem->height());
+ m_rootItem = qobject_cast<QQuickItem *>(rootObject);
+ m_rootItem->setSize(QSize(QML_WIDTH, QML_HEIGHT));
+ m_quickWindow->contentItem()->setSize(m_rootItem->size());
+ m_quickWindow->setGeometry(0, 0, m_rootItem->width(), m_rootItem->height());
- rootItem->setParentItem(m_quickWindow->contentItem());
+ m_rootItem->setParentItem(m_quickWindow->contentItem());
}
Window::~Window()
@@ -185,6 +139,16 @@ void Window::mouseReleaseEvent(QMouseEvent *e)
QCoreApplication::sendEvent(m_quickWindow, &mappedEvent);
}
+void Window::keyPressEvent(QKeyEvent *e)
+{
+ QCoreApplication::sendEvent(m_quickWindow, e);
+}
+
+void Window::keyReleaseEvent(QKeyEvent *e)
+{
+ QCoreApplication::sendEvent(m_quickWindow, e);
+}
+
bool Window::event(QEvent *e)
{
switch (e->type()) {
@@ -316,7 +280,7 @@ void Window::render()
updateQuick();
// now onto our own drawing, targeting the window
- ID3D11DeviceContext1 *ctx = m_engine->context();
+ ID3D11DeviceContext *ctx = m_engine->context();
const QSize viewSize = m_swapchain.pixelSize;
const float clearColor[] = { 0.4f, 0.7f, 0.0f, 1.0f };
@@ -372,6 +336,9 @@ void Window::updateQuick()
QSize(QML_WIDTH, QML_HEIGHT),
SAMPLE_COUNT));
+ // Ensure key events are received by the root Rectangle.
+ m_rootItem->forceActiveFocus();
+
m_quickInitialized = true;
}
diff --git a/examples/quick/rendercontrol/rendercontrol_d3d11/window.h b/examples/quick/rendercontrol/rendercontrol_d3d11/window.h
index 4a102bd4dd..9a896f954a 100644
--- a/examples/quick/rendercontrol/rendercontrol_d3d11/window.h
+++ b/examples/quick/rendercontrol/rendercontrol_d3d11/window.h
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef WINDOW_H
#define WINDOW_H
@@ -57,6 +10,7 @@
QT_BEGIN_NAMESPACE
class QQuickRenderControl;
class QQuickWindow;
+class QQuickItem;
class QQmlEngine;
class QQmlComponent;
QT_END_NAMESPACE
@@ -71,6 +25,8 @@ protected:
void exposeEvent(QExposeEvent *e) override;
void mousePressEvent(QMouseEvent *e) override;
void mouseReleaseEvent(QMouseEvent *e) override;
+ void keyPressEvent(QKeyEvent *e) override;
+ void keyReleaseEvent(QKeyEvent *e) override;
bool event(QEvent *e) override;
private:
@@ -84,6 +40,7 @@ private:
QQuickWindow *m_quickWindow;
QQmlEngine *m_qmlEngine;
QQmlComponent *m_qmlComponent;
+ QQuickItem *m_rootItem;
bool m_quickInitialized = false;
bool m_quickDirty = true;
diff --git a/examples/quick/rendercontrol/rendercontrol_opengl/CMakeLists.txt b/examples/quick/rendercontrol/rendercontrol_opengl/CMakeLists.txt
index 3445fd00cb..4ea0551c12 100644
--- a/examples/quick/rendercontrol/rendercontrol_opengl/CMakeLists.txt
+++ b/examples/quick/rendercontrol/rendercontrol_opengl/CMakeLists.txt
@@ -1,58 +1,45 @@
-# Generated from rendercontrol_opengl.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(rendercontrol_opengl LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL Qml Quick)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup(REQUIRES 6.5)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/rendercontrol/rendercontrol_opengl")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS OpenGL)
-
-qt_add_executable(rendercontrol_opengl
+qt_add_executable(rendercontrol_openglexample WIN32 MACOSX_BUNDLE
cuberenderer.cpp cuberenderer.h
main.cpp
window_singlethreaded.cpp window_singlethreaded.h
)
-set_target_properties(rendercontrol_opengl PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(rendercontrol_opengl PUBLIC
- Qt::Core
- Qt::Gui
- Qt::OpenGL
- Qt::Qml
- Qt::Quick
-)
+target_link_libraries(rendercontrol_openglexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::OpenGL
+ Qt6::Qml
+ Qt6::Quick
+)
# Resources:
-set(rendercontrol_resource_files
- "demo.qml"
+qt_add_qml_module(rendercontrol_openglexample
+ URI rendercontrol
+ QML_FILES
+ "demo.qml"
)
-qt6_add_resources(rendercontrol_opengl "rendercontrol"
- PREFIX
- "/rendercontrol"
- FILES
- ${rendercontrol_resource_files}
+install(TARGETS rendercontrol_openglexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-install(TARGETS rendercontrol_opengl
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+qt_generate_deploy_qml_app_script(
+ TARGET rendercontrol_openglexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/rendercontrol/rendercontrol_opengl/cuberenderer.cpp b/examples/quick/rendercontrol/rendercontrol_opengl/cuberenderer.cpp
index f3ecfc2566..266b176e86 100644
--- a/examples/quick/rendercontrol/rendercontrol_opengl/cuberenderer.cpp
+++ b/examples/quick/rendercontrol/rendercontrol_opengl/cuberenderer.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "cuberenderer.h"
#include <QOpenGLContext>
@@ -92,7 +45,6 @@ void CubeRenderer::init(QWindow *w, QOpenGLContext *share)
return;
QOpenGLFunctions *f = m_context->functions();
- f->glClearColor(0.0f, 0.1f, 0.25f, 1.0f);
f->glViewport(0, 0, w->width() * w->devicePixelRatio(), w->height() * w->devicePixelRatio());
static const char *vertexShaderSource =
@@ -195,6 +147,7 @@ void CubeRenderer::render(QWindow *w, QOpenGLContext *share, uint texture)
return;
QOpenGLFunctions *f = m_context->functions();
+ f->glClearColor(0.0f, 0.1f, 0.25f, 1.0f);
f->glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
if (texture) {
diff --git a/examples/quick/rendercontrol/rendercontrol_opengl/cuberenderer.h b/examples/quick/rendercontrol/rendercontrol_opengl/cuberenderer.h
index c7655a3c8e..a0a8951442 100644
--- a/examples/quick/rendercontrol/rendercontrol_opengl/cuberenderer.h
+++ b/examples/quick/rendercontrol/rendercontrol_opengl/cuberenderer.h
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef CUBERENDERER_H
#define CUBERENDERER_H
diff --git a/examples/quick/rendercontrol/rendercontrol_opengl/demo.qml b/examples/quick/rendercontrol/rendercontrol_opengl/demo.qml
index 0312c2ec1c..ca6ba7b2b4 100644
--- a/examples/quick/rendercontrol/rendercontrol_opengl/demo.qml
+++ b/examples/quick/rendercontrol/rendercontrol_opengl/demo.qml
@@ -1,61 +1,15 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
Rectangle {
id: root
+ property bool keyDown: false
gradient: Gradient {
- GradientStop { position: 0; color: mouse.pressed ? "lightsteelblue" : "steelblue" }
+ GradientStop { position: 0; color: mouse.pressed ? "lightsteelblue" : (root.keyDown ? "blue" : "steelblue") }
GradientStop { position: 1; color: "black" }
}
@@ -205,4 +159,7 @@ Rectangle {
id: mouse
anchors.fill: parent
}
+
+ Keys.onPressed: keyDown = true
+ Keys.onReleased: keyDown = false
}
diff --git a/examples/quick/rendercontrol/rendercontrol_opengl/doc/src/rendercontrol_opengl.qdoc b/examples/quick/rendercontrol/rendercontrol_opengl/doc/src/rendercontrol_opengl.qdoc
index a4a648e5de..d4dc328081 100644
--- a/examples/quick/rendercontrol/rendercontrol_opengl/doc/src/rendercontrol_opengl.qdoc
+++ b/examples/quick/rendercontrol/rendercontrol_opengl/doc/src/rendercontrol_opengl.qdoc
@@ -1,33 +1,26 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title QQuickRenderControl OpenGL Example
\example rendercontrol/rendercontrol_opengl
\brief Shows how to render a Qt Quick scene into a texture that is then used by a non-Quick based OpenGL renderer.
+ \examplecategory {Graphics}
+
\image rendercontrol-opengl-example.jpg
+
+ The Qt Quick scene is managed by a QQuickWindow that is not visible
+ on-screen. Rather, rendering targets an OpenGL texture and is controlled
+ through QQuickRenderControl.
+
+ The cube is rendered directly with OpenGL, using Qt Gui enablers such as
+ QWindow, QOpenGLContext, QOpenGLShaderProgram, and QOpenGLFunctions. The
+ cube is textured with the texture that the Qt Quick render pass outputs to.
+
+ In addition, basic input event forwarding is also demonstrated. When holding
+ down the left mouse button, the background \l Rectangle color is altered via
+ QML bindings. Similarly, holding down a key on the keyboard changes the
+ color as well. This proves that the "fake" events sent from the application
+ (generated based on events from the on-screen QWindow) are forwarded and
+ processed within the Qt Quick scene.
*/
diff --git a/examples/quick/rendercontrol/rendercontrol_opengl/main.cpp b/examples/quick/rendercontrol/rendercontrol_opengl/main.cpp
index 11db82773b..849d9d38d6 100644
--- a/examples/quick/rendercontrol/rendercontrol_opengl/main.cpp
+++ b/examples/quick/rendercontrol/rendercontrol_opengl/main.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QGuiApplication>
#include <QQuickWindow>
@@ -57,7 +10,7 @@ int main(int argc, char **argv)
QGuiApplication app(argc, argv);
// only functional when Qt Quick is also using OpenGL
- QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi);
+ QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL);
WindowSingleThreaded window;
window.resize(1024, 768);
diff --git a/examples/quick/rendercontrol/rendercontrol_opengl/rendercontrol.qrc b/examples/quick/rendercontrol/rendercontrol_opengl/rendercontrol.qrc
index 2246eeb842..9a410038a5 100644
--- a/examples/quick/rendercontrol/rendercontrol_opengl/rendercontrol.qrc
+++ b/examples/quick/rendercontrol/rendercontrol_opengl/rendercontrol.qrc
@@ -1,5 +1,5 @@
<RCC>
- <qresource prefix="/rendercontrol">
+ <qresource prefix="/qt/qml/rendercontrol">
<file>demo.qml</file>
</qresource>
</RCC>
diff --git a/examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.cpp b/examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.cpp
index 8316772d3c..6b8e1d9077 100644
--- a/examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.cpp
+++ b/examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "window_singlethreaded.h"
#include "cuberenderer.h"
@@ -253,6 +206,9 @@ void WindowSingleThreaded::run()
// Update item and rendering related geometries.
updateSizes();
+ // Ensure key events are received by the root Rectangle.
+ m_rootItem->forceActiveFocus();
+
// Initialize the render control and our OpenGL resources.
m_context->makeCurrent(m_offscreenSurface);
m_quickWindow->setGraphicsDevice(QQuickGraphicsDevice::fromOpenGLContext(m_context));
@@ -285,7 +241,7 @@ void WindowSingleThreaded::exposeEvent(QExposeEvent *)
if (isExposed()) {
if (!m_quickInitialized) {
m_cubeRenderer->render(this, m_context, m_quickReady ? m_textureId : 0);
- startQuick(QStringLiteral("qrc:/rendercontrol/demo.qml"));
+ startQuick(QStringLiteral("qrc:/qt/qml/rendercontrol/demo.qml"));
}
}
}
@@ -331,3 +287,13 @@ void WindowSingleThreaded::mouseReleaseEvent(QMouseEvent *e)
QMouseEvent mappedEvent(e->type(), e->position(), e->globalPosition(), e->button(), e->buttons(), e->modifiers());
QCoreApplication::sendEvent(m_quickWindow, &mappedEvent);
}
+
+void WindowSingleThreaded::keyPressEvent(QKeyEvent *e)
+{
+ QCoreApplication::sendEvent(m_quickWindow, e);
+}
+
+void WindowSingleThreaded::keyReleaseEvent(QKeyEvent *e)
+{
+ QCoreApplication::sendEvent(m_quickWindow, e);
+}
diff --git a/examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.h b/examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.h
index ad53d5c8a5..6b89ca20b3 100644
--- a/examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.h
+++ b/examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.h
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef WINDOW_SINGLETHREADED_H
#define WINDOW_SINGLETHREADED_H
@@ -81,6 +34,8 @@ protected:
void resizeEvent(QResizeEvent *e) override;
void mousePressEvent(QMouseEvent *e) override;
void mouseReleaseEvent(QMouseEvent *e) override;
+ void keyPressEvent(QKeyEvent *e) override;
+ void keyReleaseEvent(QKeyEvent *e) override;
private slots:
void run();
diff --git a/examples/quick/rendercontrol/rendercontrol_rhi/CMakeLists.txt b/examples/quick/rendercontrol/rendercontrol_rhi/CMakeLists.txt
new file mode 100644
index 0000000000..c38f26fcca
--- /dev/null
+++ b/examples/quick/rendercontrol/rendercontrol_rhi/CMakeLists.txt
@@ -0,0 +1,44 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(rendercontrol_rhi LANGUAGES CXX)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Quick Widgets)
+
+qt_standard_project_setup(REQUIRES 6.5)
+
+qt_add_executable(rendercontrol_rhi WIN32 MACOSX_BUNDLE
+ main.cpp
+)
+
+target_link_libraries(rendercontrol_rhi PRIVATE
+ Qt6::Core
+ Qt6::GuiPrivate
+ Qt6::Quick
+ Qt6::Widgets
+)
+
+qt_add_qml_module(rendercontrol_rhi
+ URI rendercontrolrhiexample
+ QML_FILES
+ "demo.qml"
+ RESOURCE_PREFIX
+ "/"
+ NO_RESOURCE_TARGET_PATH
+)
+
+install(TARGETS rendercontrol_rhi
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET rendercontrol_rhi
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/rendercontrol/rendercontrol_rhi/demo.qml b/examples/quick/rendercontrol/rendercontrol_rhi/demo.qml
new file mode 100644
index 0000000000..707d9cb3a4
--- /dev/null
+++ b/examples/quick/rendercontrol/rendercontrol_rhi/demo.qml
@@ -0,0 +1,156 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+Rectangle {
+ id: root
+
+ gradient: Gradient {
+ GradientStop { position: 0; color: "steelblue" }
+ GradientStop { position: 1; color: "black" }
+ }
+
+ Text {
+ anchors.centerIn: parent
+ text: "Qt Quick in a texture"
+ font.pointSize: 40
+ color: "white"
+
+ SequentialAnimation on rotation {
+ PauseAnimation { duration: 2500 }
+ NumberAnimation { from: 0; to: 360; duration: 5000; easing.type: Easing.InOutCubic }
+ loops: Animation.Infinite
+ }
+ }
+
+ ParticleSystem {
+ id: particles
+ anchors.fill: parent
+
+ ImageParticle {
+ id: smoke
+ system: particles
+ anchors.fill: parent
+ groups: ["A", "B"]
+ source: "qrc:///particleresources/glowdot.png"
+ colorVariation: 0
+ color: "#00111111"
+ }
+ ImageParticle {
+ id: flame
+ anchors.fill: parent
+ system: particles
+ groups: ["C", "D"]
+ source: "qrc:///particleresources/glowdot.png"
+ colorVariation: 0.1
+ color: "#00ff400f"
+ }
+
+ Emitter {
+ id: fire
+ system: particles
+ group: "C"
+
+ y: parent.height
+ width: parent.width
+
+ emitRate: 350
+ lifeSpan: 3500
+
+ acceleration: PointDirection { y: -17; xVariation: 3 }
+ velocity: PointDirection {xVariation: 3}
+
+ size: 24
+ sizeVariation: 8
+ endSize: 4
+ }
+
+ TrailEmitter {
+ id: fireSmoke
+ group: "B"
+ system: particles
+ follow: "C"
+ width: root.width
+ height: root.height - 68
+
+ emitRatePerParticle: 1
+ lifeSpan: 2000
+
+ velocity: PointDirection {y:-17*6; yVariation: -17; xVariation: 3}
+ acceleration: PointDirection {xVariation: 3}
+
+ size: 36
+ sizeVariation: 8
+ endSize: 16
+ }
+
+ TrailEmitter {
+ id: fireballFlame
+ anchors.fill: parent
+ system: particles
+ group: "D"
+ follow: "E"
+
+ emitRatePerParticle: 120
+ lifeSpan: 180
+ emitWidth: TrailEmitter.ParticleSize
+ emitHeight: TrailEmitter.ParticleSize
+ emitShape: EllipseShape{}
+
+ size: 16
+ sizeVariation: 4
+ endSize: 4
+ }
+
+ TrailEmitter {
+ id: fireballSmoke
+ anchors.fill: parent
+ system: particles
+ group: "A"
+ follow: "E"
+
+ emitRatePerParticle: 128
+ lifeSpan: 2400
+ emitWidth: TrailEmitter.ParticleSize
+ emitHeight: TrailEmitter.ParticleSize
+ emitShape: EllipseShape{}
+
+ velocity: PointDirection {yVariation: 16; xVariation: 16}
+ acceleration: PointDirection {y: -16}
+
+ size: 24
+ sizeVariation: 8
+ endSize: 8
+ }
+
+ Emitter {
+ id: balls
+ system: particles
+ group: "E"
+
+ y: parent.height
+ width: parent.width
+
+ emitRate: 2
+ lifeSpan: 7000
+
+ velocity: PointDirection {y:-17*4*2; xVariation: 6*6}
+ acceleration: PointDirection {y: 17*2; xVariation: 6*6}
+
+ size: 8
+ sizeVariation: 4
+ }
+
+ Turbulence { //A bit of turbulence makes the smoke look better
+ anchors.fill: parent
+ groups: ["A","B"]
+ strength: 32
+ system: particles
+ }
+ }
+
+ onWidthChanged: particles.reset()
+ onHeightChanged: particles.reset()
+}
diff --git a/examples/quick/rendercontrol/rendercontrol_rhi/doc/images/rendercontrol-rhi-example.jpg b/examples/quick/rendercontrol/rendercontrol_rhi/doc/images/rendercontrol-rhi-example.jpg
new file mode 100644
index 0000000000..369f1edf84
--- /dev/null
+++ b/examples/quick/rendercontrol/rendercontrol_rhi/doc/images/rendercontrol-rhi-example.jpg
Binary files differ
diff --git a/examples/quick/rendercontrol/rendercontrol_rhi/doc/src/rendercontrol_rhi.qdoc b/examples/quick/rendercontrol/rendercontrol_rhi/doc/src/rendercontrol_rhi.qdoc
new file mode 100644
index 0000000000..521dee3abc
--- /dev/null
+++ b/examples/quick/rendercontrol/rendercontrol_rhi/doc/src/rendercontrol_rhi.qdoc
@@ -0,0 +1,140 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+
+/*!
+ \title QQuickRenderControl RHI Example
+ \example rendercontrol/rendercontrol_rhi
+ \brief Shows how to render a Qt Quick scene into a QRhiTexture.
+ \examplecategory {Graphics}
+ \image rendercontrol-rhi-example.jpg
+
+ This example demonstrates how to set up a Qt Quick scene that has its
+ rendering redirected into a \l QRhiTexture. The application is then free to
+ do whatever it wants with the resulting texture from each frame.
+ This example is a QWidget-based application that performs a readback of the
+ image data, and then displays the collected per-frame renders with CPU and
+ GPU-based timing information for each.
+
+ By using Qt's 3D graphics API abstraction, this example is not tied to any
+ particular graphics API. At startup, a dialog is shown with the platforms'
+ potentially supported 3D APIs.
+
+ \snippet rendercontrol/rendercontrol_rhi/main.cpp apiselect
+
+ \note It is not guaranteed that all selections will be functional on a given
+ platform.
+
+ Once a selection is made, a QML file is loaded. However, we will not simply
+ create a \l QQuickView instance and \l{QQuickView::show()}{show()} it.
+ Rather, the \l QQuickWindow that manages the Qt Quick scene is never shown
+ on-screen. Instead, the application takes control over when and to where
+ render, via \l QQuickRenderControl.
+
+ \snippet rendercontrol/rendercontrol_rhi/main.cpp load-1
+
+ Once the object tree is instantiated, the root item (a \l Rectangle) is
+ queried, its size is ensured to be valid and then propagated.
+
+ \note Scenes that use the \l Window element within the object tree are not
+ supported.
+
+ \snippet rendercontrol/rendercontrol_rhi/main.cpp load-instantiate
+
+ At this point there are no rendering resources initialized, i.e., nothing has
+ been done with the native 3D graphics API yet. A \l QRhi is instantiated
+ only in the next step, and that is what triggers setting up the Vulkan,
+ Metal, Direct 3D, etc. rendering system under the hood.
+
+ \snippet rendercontrol/rendercontrol_rhi/main.cpp load-graphicsinit
+
+ \note This application uses a model where Qt creates an instance of QRhi.
+ This is not the only possible approach: if the application maintains its own
+ QRhi (and so OpenGL context, Vulkan device, etc.), then Qt Quick can be
+ requested to adopt and use that existing QRhi. That is done via passing a \l
+ QQuickGraphicsDevice created by \l{QQuickGraphicsDevice::fromRhi()} to
+ \l QQuickWindow, similarly to how \l QQuickGraphicsConfiguration is set in
+ the snippet above. Consider for example the case of wanting to use the Qt
+ Quick rendered textures in a QRhiWidget: in that case the QRhiWidget's QRhi
+ will need to passed on to Qt Quick, instead of letting Qt Quick create its
+ own.
+
+ Once \l QQuickRenderControl::initialize() succeeds, the renderer is live and
+ ready to go. For that, we need a color buffer to render into.
+
+ \l QQuickRenderTarget is a lightweight implicitly-shared class that carries
+ (but those not own) various sets of native or QRhi objects that describe
+ textures, render targets, or similar. Calling
+ \l{QQuickWindow::setRenderTarget()}{setRenderTarget()} on the \l
+ QQuickWindow (remember that we have a QQuickWindow that is not visible
+ on-screen) is what triggers redirecting the Qt Quick scene graph's rendering
+ into the texture provided by the application. When working with \l QRhi (and
+ not with native 3D API objects such as OpenGL texture IDs or VkImage
+ objects), the application should set up a \l QRhiTextureRenderTarget and
+ then pass it to Qt Quick via \l QQuickRenderTarget::fromRhiRenderTarget().
+
+ \snippet rendercontrol/rendercontrol_rhi/main.cpp texture-setup
+
+ \note Always provide a depth-stencil buffer for Qt Quick since both of these
+ buffers and the depth and stencil test may get utilized by the Qt Quick
+ scenegraph when rendering.
+
+ The main render loop is the following. This also shows how to perform
+ GPU->CPU readbacks of images. Once a QImage is available, the
+ QWidget-based user interface updates accordingly. We will omit diving
+ into the details for that here.
+
+ The example also demonstrates a simple way of measuring the cost of
+ rendering a frame on the CPU and the GPU. Offscreen-rendered frames are well
+ suited for this due to certain internal QRhi behavior, which implies that
+ operations that otherwise are asynchronous (in the sense that they complete
+ only when rendering a subsequent frame), are guaranteed to be ready once \l
+ QRhi::endOffscreenFrame() (i.e., QQuickRenderControl::endFrame()) returns.
+ We use this knowledge when reading back the texture, and it applies also to
+ GPU timestamps as well. That is why the application can display the GPU time
+ for each frame, while guaranteeing that the time actually refers to that
+ particular frame (not an earlier one). See
+ \l{QRhiCommandBuffer::lastCompletedGpuTime()}{lastCompletedGpuTime()} for
+ details around GPU timings. The CPU side timings are taken using
+ \l QElapsedTimer.
+
+ \snippet rendercontrol/rendercontrol_rhi/main.cpp render-core
+
+ One important piece is the stepping of Qt Quick animations. As we do not
+ have an on-screen window that can drive the animation system either via
+ measuring elapsed time, an ordinary timer, or presentation rate-based
+ throttling, redirecting the Qt Quick rendering often implies that the
+ driving of animations needs to be taken over by the application. Otherwise,
+ animations function based on a plain system timer, but the actual elapsed
+ time will often have nothing to do with what the offscreen-rendered scene is
+ expected to perceive. Consider rendering 5 frames in a row, in a tight loop.
+ How the animations in those 5 frames move depends on the speed with which
+ the CPU executes the loop iterations. That is almost never ideal. To ensure
+ consistent animations, install a custom QAnimationDriver. While this is
+ an undocumented (but public) API meant for advanced users, the example here
+ provides a simple example of using it.
+
+ \snippet rendercontrol/rendercontrol_rhi/main.cpp anim-driver
+
+ The application has a \l QSlider that can be used to change the animation
+ step value from the default 16 milliseconds to something else. Note the call
+ to the setStep() function of our QAnimationDriver subclass.
+
+ \snippet rendercontrol/rendercontrol_rhi/main.cpp anim-slider
+
+ \note Installing the custom animation driver is made optional via the
+ \c animCheckBox check box. This allows comparing the effect of having and
+ not having a custom animation driver installed. In addition, on some
+ platforms (and perhaps depending on the theme), having the custom driver
+ enabled may lead to lags in widget drawing. This is as expected, because if
+ some widget animation (e.g. highlight of a QPushButton or QCheckBox) is
+ managed via \l QPropertyAnimation and similar, then those animation are
+ driven by the same QAnimationDriver, and that does not advance until a new
+ frame is requested by clicking on the buttons.
+
+ Advancing the animations is done before each frame (i.e., before the
+ QQuickRenderControl::beginFrame() call) by simply calling advance():
+
+ \snippet rendercontrol/rendercontrol_rhi/main.cpp anim-step
+
+ \sa QRhi, QQuickRenderControl, QQuickWindow
+*/
diff --git a/examples/quick/rendercontrol/rendercontrol_rhi/main.cpp b/examples/quick/rendercontrol/rendercontrol_rhi/main.cpp
new file mode 100644
index 0000000000..76f2ade0a9
--- /dev/null
+++ b/examples/quick/rendercontrol/rendercontrol_rhi/main.cpp
@@ -0,0 +1,640 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include <QMainWindow>
+#include <QApplication>
+#include <QVBoxLayout>
+#include <QHBoxLayout>
+#include <QMenuBar>
+#include <QStatusBar>
+#include <QFileDialog>
+#include <QMessageBox>
+#include <QLabel>
+#include <QScrollArea>
+#include <QGridLayout>
+#include <QPushButton>
+#include <QSlider>
+#include <QCheckBox>
+#include <QScrollBar>
+#include <QListWidget>
+#include <QPainter>
+
+#include <QQuickWindow>
+#include <QQuickRenderControl>
+#include <QQuickRenderTarget>
+#include <QQuickGraphicsDevice>
+#include <QQuickGraphicsConfiguration>
+#include <QQuickItem>
+#include <QQmlEngine>
+#include <QQmlComponent>
+
+#include <QAnimationDriver>
+#include <QElapsedTimer>
+
+#include <rhi/qrhi.h>
+
+//! [anim-driver]
+class AnimationDriver : public QAnimationDriver
+{
+public:
+ AnimationDriver(QObject *parent = nullptr)
+ : QAnimationDriver(parent),
+ m_step(16)
+ {
+ }
+
+ void setStep(int milliseconds)
+ {
+ m_step = milliseconds;
+ }
+
+ void advance() override
+ {
+ m_elapsed += m_step;
+ advanceAnimation();
+ }
+
+ qint64 elapsed() const override
+ {
+ return m_elapsed;
+ }
+
+private:
+ int m_step;
+ qint64 m_elapsed = 0;
+};
+//! [anim-driver]
+
+class ImageLabel;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+ ~MainWindow();
+
+ void load(const QString &filename);
+ void render();
+
+private slots:
+ void openRequested();
+
+private:
+ void reset();
+ void stepAnimations();
+
+ AnimationDriver *m_animationDriver = nullptr;
+
+ std::unique_ptr<QQuickRenderControl> m_renderControl;
+ std::unique_ptr<QQuickWindow> m_scene;
+ std::unique_ptr<QQmlEngine> m_qmlEngine;
+ std::unique_ptr<QQmlComponent> m_qmlComponent;
+
+ std::unique_ptr<QRhiTexture> m_texture;
+ std::unique_ptr<QRhiRenderBuffer> m_ds;
+ std::unique_ptr<QRhiTextureRenderTarget> m_rt;
+ std::unique_ptr<QRhiRenderPassDescriptor> m_rpDesc;
+
+ qint64 m_frameCount = 0;
+ QSize m_thumbnailSize;
+ QVector<double> m_cpuTimes;
+ QVector<double> m_gpuTimes;
+
+ QLabel *m_apiMsg;
+ QLabel *m_statusMsg;
+ QLabel *m_avgCpuMsg;
+ QLabel *m_avgGpuMsg;
+ QLabel *m_driverInfoMsg;
+
+ QScrollArea *m_scrollArea;
+ QGridLayout *m_grid;
+ QVector<QWidget *> m_gridWidgets;
+
+public:
+#if QT_CONFIG(vulkan)
+ QVulkanInstance *m_vulkanInstance = nullptr;
+#endif
+
+ ImageLabel *m_focus = nullptr;
+ QLabel *m_fullSizeViewerWindow = nullptr;
+ QVector<QImage> m_frames;
+
+ bool m_mirrorVertically = false;
+};
+
+MainWindow::MainWindow()
+{
+ QWidget *centralWidget = new QWidget(this);
+ QVBoxLayout *vlayout = new QVBoxLayout(centralWidget);
+ QHBoxLayout *controlLayout = new QHBoxLayout;
+ vlayout->addLayout(controlLayout);
+
+ QPushButton *btn = new QPushButton(tr("Next frame"));
+ QObject::connect(btn, &QPushButton::clicked, btn, [this] {
+ render();
+ });
+ controlLayout->addWidget(btn);
+
+ QPushButton *btnMulti = new QPushButton(tr("Next 10 frames"));
+ QObject::connect(btnMulti, &QPushButton::clicked, btn, [this] {
+ for (int i = 0; i < 10; ++i)
+ QMetaObject::invokeMethod(this, &MainWindow::render, Qt::QueuedConnection);
+ });
+ controlLayout->addWidget(btnMulti);
+
+//! [anim-slider]
+ QSlider *animSlider = new QSlider;
+ animSlider->setOrientation(Qt::Horizontal);
+ animSlider->setMinimum(1);
+ animSlider->setMaximum(1000);
+ QLabel *animLabel = new QLabel;
+ QObject::connect(animSlider, &QSlider::valueChanged, animSlider, [this, animLabel, animSlider] {
+ if (m_animationDriver)
+ m_animationDriver->setStep(animSlider->value());
+ animLabel->setText(tr("Simulated elapsed time per frame: %1 ms").arg(animSlider->value()));
+ });
+ animSlider->setValue(16);
+ QCheckBox *animCheckBox = new QCheckBox(tr("Custom animation driver"));
+ animCheckBox->setToolTip(tr("Note: Installing the custom animation driver makes widget drawing unreliable, depending on the platform.\n"
+ "This is due to widgets themselves relying on QPropertyAnimation and similar, which are driven by the same QAnimationDriver.\n"
+ "In any case, the functionality of the widgets are not affected, just the rendering may lag behind.\n"
+ "When not checked, Qt Quick animations advance based on the system time, i.e. the time elapsed since the last press of the Next button."));
+ QObject::connect(animCheckBox, &QCheckBox::stateChanged, animCheckBox, [this, animCheckBox, animSlider, animLabel] {
+ if (animCheckBox->isChecked()) {
+ animSlider->setEnabled(true);
+ animLabel->setEnabled(true);
+ m_animationDriver = new AnimationDriver(this);
+ m_animationDriver->install();
+ m_animationDriver->setStep(animSlider->value());
+ } else {
+ animSlider->setEnabled(false);
+ animLabel->setEnabled(false);
+ delete m_animationDriver;
+ m_animationDriver = nullptr;
+ }
+ });
+ animSlider->setEnabled(false);
+ animLabel->setEnabled(false);
+ controlLayout->addWidget(animCheckBox);
+ controlLayout->addWidget(animLabel);
+ controlLayout->addWidget(animSlider);
+//! [anim-slider]
+
+ QCheckBox *mirrorCheckBox = new QCheckBox(tr("Mirror vertically"));
+ QObject::connect(mirrorCheckBox, &QCheckBox::stateChanged, mirrorCheckBox, [this, mirrorCheckBox] {
+ m_mirrorVertically = mirrorCheckBox->isChecked();
+ });
+ controlLayout->addWidget(mirrorCheckBox);
+
+ QGridLayout *gridLayout = new QGridLayout;
+ vlayout->addLayout(gridLayout);
+
+ QWidget *viewport = new QWidget;
+ m_grid = new QGridLayout(viewport);
+ m_scrollArea = new QScrollArea;
+ m_scrollArea->setWidgetResizable(true);
+ m_scrollArea->setWidget(viewport);
+ QObject::connect(m_scrollArea->verticalScrollBar(), &QScrollBar::rangeChanged, this, [this] {
+ m_scrollArea->verticalScrollBar()->setSliderPosition(m_scrollArea->verticalScrollBar()->maximum());
+ });
+
+ gridLayout->addWidget(m_scrollArea);
+ setCentralWidget(centralWidget);
+
+ QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(tr("&Open"), this, &MainWindow::openRequested);
+ fileMenu->addAction(tr("E&xit"), qApp, &QCoreApplication::quit);
+
+ m_statusMsg = new QLabel;
+ statusBar()->addWidget(m_statusMsg);
+ m_avgCpuMsg = new QLabel;
+ statusBar()->addWidget(m_avgCpuMsg);
+ m_avgGpuMsg = new QLabel;
+ statusBar()->addWidget(m_avgGpuMsg);
+ m_apiMsg = new QLabel;
+ statusBar()->addWidget(m_apiMsg);
+ m_driverInfoMsg = new QLabel;
+ statusBar()->addWidget(m_driverInfoMsg);
+}
+
+MainWindow::~MainWindow()
+{
+ delete m_fullSizeViewerWindow;
+}
+
+void MainWindow::openRequested()
+{
+ QString filename = QFileDialog::getOpenFileName(this, tr("Open file"), QString(), tr("QML files (*.qml);;All files (*.*)"));
+ if (!filename.isEmpty())
+ load(filename);
+}
+
+void MainWindow::reset()
+{
+ m_rpDesc.reset();
+ m_rt.reset();
+ m_ds.reset();
+ m_texture.reset();
+
+ m_qmlComponent.reset();
+ m_qmlEngine.reset();
+ m_scene.reset();
+ m_renderControl.reset();
+
+ m_apiMsg->setText(QString());
+ m_statusMsg->setText(QString());
+ m_avgCpuMsg->setText(QString());
+ m_avgGpuMsg->setText(QString());
+ m_driverInfoMsg->setText(QString());
+
+ m_frameCount = 0;
+
+ qDeleteAll(m_gridWidgets);
+ m_gridWidgets.clear();
+
+ delete m_fullSizeViewerWindow;
+ m_fullSizeViewerWindow = nullptr;
+ m_focus = nullptr;
+}
+
+//! [load-1]
+void MainWindow::load(const QString &filename)
+{
+ reset();
+
+ m_renderControl.reset(new QQuickRenderControl);
+ m_scene.reset(new QQuickWindow(m_renderControl.get()));
+
+ // enable lastCompletedGpuTime() on QRhiCommandBuffer, if supported by the underlying 3D API
+ QQuickGraphicsConfiguration config;
+ config.setTimestamps(true);
+ m_scene->setGraphicsConfiguration(config);
+
+#if QT_CONFIG(vulkan)
+ if (m_scene->graphicsApi() == QSGRendererInterface::Vulkan)
+ m_scene->setVulkanInstance(m_vulkanInstance);
+#endif
+
+ m_qmlEngine.reset(new QQmlEngine);
+ m_qmlComponent.reset(new QQmlComponent(m_qmlEngine.get(), QUrl::fromLocalFile(filename)));
+ if (m_qmlComponent->isError()) {
+ for (const QQmlError &error : m_qmlComponent->errors())
+ qWarning() << error.url() << error.line() << error;
+ QMessageBox::critical(this, tr("Cannot load QML scene"), tr("Failed to load %1").arg(filename));
+ reset();
+ return;
+ }
+//! [load-1]
+
+//! [load-instantiate]
+ QObject *rootObject = m_qmlComponent->create();
+ if (m_qmlComponent->isError()) {
+ for (const QQmlError &error : m_qmlComponent->errors())
+ qWarning() << error.url() << error.line() << error;
+ QMessageBox::critical(this, tr("Cannot load QML scene"), tr("Failed to create component"));
+ reset();
+ return;
+ }
+
+ QQuickItem *rootItem = qobject_cast<QQuickItem *>(rootObject);
+ if (!rootItem) {
+ // Get rid of the on-screen window, if the root object was a Window
+ if (QQuickWindow *w = qobject_cast<QQuickWindow *>(rootObject))
+ delete w;
+ QMessageBox::critical(this,
+ tr("Invalid root item in QML scene"),
+ tr("Root object is not a QQuickItem. If this is a scene with Window in it, note that such scenes are not supported."));
+ reset();
+ return;
+ }
+
+ if (rootItem->size().width() < 16)
+ rootItem->setSize(QSizeF(640, 360));
+
+ m_scene->contentItem()->setSize(rootItem->size());
+ m_scene->setGeometry(0, 0, rootItem->width(), rootItem->height());
+
+ rootItem->setParentItem(m_scene->contentItem());
+
+ m_statusMsg->setText(tr("QML scene loaded"));
+//! [load-instantiate]
+
+//! [load-graphicsinit]
+ const bool initSuccess = m_renderControl->initialize();
+ if (!initSuccess) {
+ QMessageBox::critical(this, tr("Cannot initialize renderer"), tr("QQuickRenderControl::initialize() failed"));
+ reset();
+ return;
+ }
+
+ const QSGRendererInterface::GraphicsApi api = m_scene->rendererInterface()->graphicsApi();
+ switch (api) {
+ case QSGRendererInterface::OpenGL:
+ m_apiMsg->setText(tr("OpenGL"));
+ break;
+ case QSGRendererInterface::Direct3D11:
+ m_apiMsg->setText(tr("D3D11"));
+ break;
+ case QSGRendererInterface::Direct3D12:
+ m_apiMsg->setText(tr("D3D12"));
+ break;
+ case QSGRendererInterface::Vulkan:
+ m_apiMsg->setText(tr("Vulkan"));
+ break;
+ case QSGRendererInterface::Metal:
+ m_apiMsg->setText(tr("Metal"));
+ break;
+ default:
+ m_apiMsg->setText(tr("Unknown 3D API"));
+ break;
+ }
+
+ QRhi *rhi = m_renderControl->rhi();
+ if (!rhi) {
+ QMessageBox::critical(this, tr("Cannot render"), tr("No QRhi from QQuickRenderControl"));
+ reset();
+ return;
+ }
+
+ m_driverInfoMsg->setText(QString::fromUtf8(rhi->driverInfo().deviceName));
+//! [load-graphicsinit]
+
+//! [texture-setup]
+ const QSize pixelSize = rootItem->size().toSize(); // no scaling, i.e. the item size is in pixels
+
+ m_texture.reset(rhi->newTexture(QRhiTexture::RGBA8, pixelSize, 1,
+ QRhiTexture::RenderTarget | QRhiTexture::UsedAsTransferSource));
+ if (!m_texture->create()) {
+ QMessageBox::critical(this, tr("Cannot render"), tr("Cannot create texture object"));
+ reset();
+ return;
+ }
+
+ m_ds.reset(rhi->newRenderBuffer(QRhiRenderBuffer::DepthStencil, pixelSize, 1));
+ if (!m_ds->create()) {
+ QMessageBox::critical(this, tr("Cannot render"), tr("Cannot create depth-stencil buffer"));
+ reset();
+ return;
+ }
+
+ QRhiTextureRenderTargetDescription rtDesc(QRhiColorAttachment(m_texture.get()));
+ rtDesc.setDepthStencilBuffer(m_ds.get());
+ m_rt.reset(rhi->newTextureRenderTarget(rtDesc));
+ m_rpDesc.reset(m_rt->newCompatibleRenderPassDescriptor());
+ m_rt->setRenderPassDescriptor(m_rpDesc.get());
+ if (!m_rt->create()) {
+ QMessageBox::critical(this, tr("Cannot render"), tr("Cannot create render target"));
+ reset();
+ return;
+ }
+
+ m_scene->setRenderTarget(QQuickRenderTarget::fromRhiRenderTarget(m_rt.get()));
+//! [texture-setup]
+
+ render();
+}
+
+class ImageLabel : public QLabel
+{
+public:
+ ImageLabel(MainWindow *mw, int frameIndex)
+ : m_mainWindow(mw),
+ m_frameIndex(frameIndex)
+ {
+ }
+
+ void mousePressEvent(QMouseEvent *) override {
+ if (m_mainWindow->m_focus != this) {
+ ImageLabel *oldFocus = m_mainWindow->m_focus;
+ m_mainWindow->m_focus = this;
+ if (oldFocus)
+ oldFocus->update();
+ update();
+ }
+ }
+
+ void paintEvent(QPaintEvent *e) override {
+
+ if (m_mainWindow->m_focus == this) {
+ QPainter p(this);
+ p.fillRect(0, 0, width(), height(), Qt::blue);
+ p.end();
+ QLabel::paintEvent(e);
+ p.begin(this);
+ p.setOpacity(0.5);
+ p.fillRect(0, 0, width(), height(), Qt::blue);
+ } else {
+ QLabel::paintEvent(e);
+ }
+ }
+
+ void mouseDoubleClickEvent(QMouseEvent *) override {
+ QLabel *&w(m_mainWindow->m_fullSizeViewerWindow);
+ if (!w)
+ w = new QLabel;
+ const QImage &image(m_mainWindow->m_frames[m_frameIndex]);
+ w->resize(image.width(), image.height());
+ w->setPixmap(QPixmap::fromImage(image));
+ w->show();
+ w->activateWindow();
+ }
+
+ MainWindow *m_mainWindow;
+ int m_frameIndex;
+};
+
+void MainWindow::render()
+{
+ if (!m_renderControl)
+ return;
+
+ if (m_frameCount > 0)
+ stepAnimations();
+
+ // this is only here to communicate the possibly changed mirrorVertically flag
+ QQuickRenderTarget quickRt = QQuickRenderTarget::fromRhiRenderTarget(m_rt.get());
+ quickRt.setMirrorVertically(m_mirrorVertically);
+ m_scene->setRenderTarget(quickRt);
+
+//! [render-core]
+ QElapsedTimer cpuTimer;
+ cpuTimer.start();
+
+ m_renderControl->polishItems();
+
+ m_renderControl->beginFrame();
+
+ m_renderControl->sync();
+ m_renderControl->render();
+
+ QRhi *rhi = m_renderControl->rhi();
+ QRhiReadbackResult readResult;
+ QRhiResourceUpdateBatch *readbackBatch = rhi->nextResourceUpdateBatch();
+ readbackBatch->readBackTexture(m_texture.get(), &readResult);
+ m_renderControl->commandBuffer()->resourceUpdate(readbackBatch);
+
+ m_renderControl->endFrame();
+
+ const double gpuRenderTimeMs = m_renderControl->commandBuffer()->lastCompletedGpuTime() * 1000.0;
+ const double cpuRenderTimeMs = cpuTimer.nsecsElapsed() / 1000000.0;
+
+ // m_renderControl->begin/endFrame() is based on QRhi's
+ // begin/endOffscreenFrame() under the hood, meaning it does not do
+ // pipelining, unlike swapchain-based frames, and therefore the readback is
+ // guaranteed to complete once endFrame() returns.
+ QImage wrapperImage(reinterpret_cast<const uchar *>(readResult.data.constData()),
+ readResult.pixelSize.width(), readResult.pixelSize.height(),
+ QImage::Format_RGBA8888_Premultiplied);
+ QImage result;
+ if (rhi->isYUpInFramebuffer())
+ result = wrapperImage.mirrored();
+ else
+ result = wrapperImage.copy();
+
+//! [render-core]
+
+ m_gpuTimes.append(gpuRenderTimeMs);
+ m_cpuTimes.append(cpuRenderTimeMs);
+
+ m_frames.append(result);
+
+ if (m_thumbnailSize.isEmpty())
+ m_thumbnailSize = size() / 4;
+
+ const QImage thumbnail = result.scaled(m_thumbnailSize, Qt::KeepAspectRatio);
+
+ ImageLabel *image = new ImageLabel(this, m_frames.count() - 1);
+ image->setPixmap(QPixmap::fromImage(thumbnail));
+ image->setAlignment(Qt::AlignCenter);
+
+ QLabel *label = new QLabel(tr("Frame %1\nCPU: %2 ms GPU: %3 ms").arg(m_frameCount).arg(cpuRenderTimeMs, 0, 'f', 4).arg(gpuRenderTimeMs, 0, 'f', 4));
+ label->setAlignment(Qt::AlignCenter);
+ QWidget *container = new QWidget;
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(image);
+ layout->addWidget(label);
+ container->setLayout(layout);
+ m_grid->addWidget(container, m_frameCount / 3, m_frameCount % 3);
+ m_gridWidgets.append(container);
+
+ m_scrollArea->verticalScrollBar()->setSliderPosition(m_scrollArea->verticalScrollBar()->maximum());
+
+ m_frameCount += 1;
+
+ double v = 0;
+ for (double t : m_cpuTimes)
+ v += t;
+ v /= m_cpuTimes.count();
+ m_avgCpuMsg->setText(tr("Avg. CPU render time: %1 ms").arg(v, 0, 'f', 4));
+ if (m_cpuTimes.count() > 64) {
+ m_cpuTimes.clear();
+ m_cpuTimes.append(v);
+ }
+ v = 0;
+ for (double t : m_gpuTimes)
+ v += t;
+ v /= m_gpuTimes.count();
+ m_avgGpuMsg->setText(tr("Avg. GPU render time: %1 ms").arg(v, 0, 'f', 4));
+ if (m_gpuTimes.count() > 64) {
+ m_gpuTimes.clear();
+ m_gpuTimes.append(v);
+ }
+}
+
+//! [anim-step]
+void MainWindow::stepAnimations()
+{
+ if (m_animationDriver) {
+ // Now the Qt Quick scene will think that <slider value> milliseconds have
+ // elapsed and update animations accordingly when doing the next frame.
+ m_animationDriver->advance();
+ }
+}
+//! [anim-step]
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+#if QT_CONFIG(vulkan)
+ QVulkanInstance vulkanInstance;
+#endif
+
+ MainWindow mainWindow;
+
+//! [apiselect]
+ QDialog apiSelect;
+ QVBoxLayout *selLayout = new QVBoxLayout;
+ selLayout->addWidget(new QLabel(QObject::tr("Select graphics API to use")));
+ QListWidget *apiList = new QListWidget;
+ QVarLengthArray<QSGRendererInterface::GraphicsApi, 5> apiValues;
+#ifdef Q_OS_WIN
+ apiList->addItem("Direct3D 11");
+ apiValues.append(QSGRendererInterface::Direct3D11);
+ apiList->addItem("Direct3D 12");
+ apiValues.append(QSGRendererInterface::Direct3D12);
+#endif
+#if QT_CONFIG(metal)
+ apiList->addItem("Metal");
+ apiValues.append(QSGRendererInterface::Metal);
+#endif
+#if QT_CONFIG(vulkan)
+ apiList->addItem("Vulkan");
+ apiValues.append(QSGRendererInterface::Vulkan);
+#endif
+#if QT_CONFIG(opengl)
+ apiList->addItem("OpenGL / OpenGL ES");
+ apiValues.append(QSGRendererInterface::OpenGL);
+#endif
+ if (apiValues.isEmpty()) {
+ QMessageBox::critical(nullptr, QObject::tr("No 3D graphics API"), QObject::tr("No 3D graphics APIs are supported in this Qt build"));
+ return 1;
+ }
+//! [apiselect]
+ apiList->setCurrentRow(0);
+ selLayout->addWidget(apiList);
+ QPushButton *okBtn = new QPushButton("Ok");
+ okBtn->setDefault(true);
+ selLayout->addWidget(okBtn);
+ apiSelect.setLayout(selLayout);
+ apiSelect.resize(320, 200);
+ apiSelect.show();
+
+ QObject::connect(okBtn, &QPushButton::clicked, okBtn, [apiList, &apiSelect, &apiValues, &mainWindow
+#if QT_CONFIG(vulkan)
+ , &vulkanInstance
+#endif
+ ] {
+ const QSGRendererInterface::GraphicsApi api = apiValues[apiList->currentRow()];
+ QQuickWindow::setGraphicsApi(api);
+
+#if QT_CONFIG(vulkan)
+ if (api == QSGRendererInterface::Vulkan) {
+ vulkanInstance.setExtensions(QQuickGraphicsConfiguration::preferredInstanceExtensions());
+ if (!vulkanInstance.create()) {
+ QMessageBox::critical(nullptr, QObject::tr("Cannot initialize Vulkan"), QObject::tr("Failed to create VkInstance"));
+ return;
+ }
+ mainWindow.m_vulkanInstance = &vulkanInstance;
+ }
+#endif
+
+ mainWindow.resize(1280, 720);
+ mainWindow.show();
+ mainWindow.load(QLatin1String(":/demo.qml"));
+ // load() renders one frame, add 19 more
+ for (int i = 1; i <= 19; ++i) {
+ mainWindow.render();
+ // have to process events, e.g. to get queued metacalls delivered
+ QCoreApplication::processEvents();
+ }
+
+ apiSelect.close();
+ });
+
+ return app.exec();
+}
+
+#include "main.moc"
diff --git a/examples/quick/rendercontrol/rendercontrol_rhi/rendercontrol_rhi.pro b/examples/quick/rendercontrol/rendercontrol_rhi/rendercontrol_rhi.pro
new file mode 100644
index 0000000000..cd397f4451
--- /dev/null
+++ b/examples/quick/rendercontrol/rendercontrol_rhi/rendercontrol_rhi.pro
@@ -0,0 +1,10 @@
+TEMPLATE = app
+
+QT += gui-private widgets qml quick
+
+SOURCES += main.cpp
+
+RESOURCES += rendercontrol_rhi.qrc
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/rendercontrol/rendercontrol_rhi
+INSTALLS += target
diff --git a/examples/quick/delegatechooser/qml.qrc b/examples/quick/rendercontrol/rendercontrol_rhi/rendercontrol_rhi.qrc
index 0788f84c64..6d9c32d786 100644
--- a/examples/quick/delegatechooser/qml.qrc
+++ b/examples/quick/rendercontrol/rendercontrol_rhi/rendercontrol_rhi.qrc
@@ -1,5 +1,5 @@
<RCC>
<qresource prefix="/">
- <file>delegatechooser.qml</file>
+ <file>demo.qml</file>
</qresource>
</RCC>
diff --git a/examples/quick/responsivelayouts/CMakeLists.txt b/examples/quick/responsivelayouts/CMakeLists.txt
new file mode 100644
index 0000000000..699e71a433
--- /dev/null
+++ b/examples/quick/responsivelayouts/CMakeLists.txt
@@ -0,0 +1,47 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(responsivelayouts LANGUAGES CXX)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
+
+qt_standard_project_setup(REQUIRES 6.5)
+
+qt_add_executable(responsivelayoutsexample
+ WIN32
+ MACOSX_BUNDLE
+ main.cpp
+)
+
+qt_add_qml_module(responsivelayoutsexample
+ URI responsivelayouts
+ QML_FILES
+ "responsivelayouts.qml"
+ RESOURCES
+ "icons/grid.svg"
+ "icons/text.svg"
+ "icons/settings.svg"
+)
+
+target_link_libraries(responsivelayoutsexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
+
+install(TARGETS responsivelayoutsexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET responsivelayoutsexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/responsivelayouts/doc/images/qtquicklayouts-example-responsivelayouts.png b/examples/quick/responsivelayouts/doc/images/qtquicklayouts-example-responsivelayouts.png
new file mode 100644
index 0000000000..4cc8c14098
--- /dev/null
+++ b/examples/quick/responsivelayouts/doc/images/qtquicklayouts-example-responsivelayouts.png
Binary files differ
diff --git a/examples/quick/responsivelayouts/doc/src/qtquickresponsiveLayouts-examples.qdoc b/examples/quick/responsivelayouts/doc/src/qtquickresponsiveLayouts-examples.qdoc
new file mode 100644
index 0000000000..7c204fc5b4
--- /dev/null
+++ b/examples/quick/responsivelayouts/doc/src/qtquickresponsiveLayouts-examples.qdoc
@@ -0,0 +1,67 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+/*!
+ \title Qt Quick Layouts - Responsive Layout Example
+ \example responsivelayouts
+ \brief Demonstrates how to use LayoutItemProxy to make a responsive UI.
+ \ingroup qtquickexamples
+ \examplecategory {User Interface Components}
+
+ This example shows how to use LayoutProxyItems in combination with
+ \l{Qt Quick Layouts}{layouts} to create responsive layouts.
+
+ \include examples-run.qdocinc
+
+ \section1 Creating items
+
+ The \l {LayoutItemProxy} type allows to use the same item in different
+ layouts, although only one layout can be visible at the same time. This
+ can be used to create responsive layouts that adapt to the window or
+ screen size.
+
+ \image qtquicklayouts-example-responsivelayouts.png
+
+
+ First we need to define all items that should appear in or UI at some point.
+ We use a AnnotatedRect, which is a simple Rectangle with some added text.
+
+ \snippet responsivelayouts/responsivelayouts.qml item definition
+
+ \section1 Creating layouts
+
+ We can now declare various layouts using \l {LayoutItemProxy}{LayoutItemProxies},
+ targeting the previously declare items. A single layout can be defined as follows.
+
+ \snippet responsivelayouts/responsivelayouts.qml first layout
+
+ This snippet shows multiple ways to use the \l {LayoutItemProxy}.
+ The simplest method is to add \l {LayoutItemProxy}{LayoutItemProxies}
+ to a Layout like the RowLayout here. In addition we set an additional
+ \l {Layout} attached property to the LayoutProxyItem that will affect
+ the target item only in this particular layout. Further, we see that the
+ item \c {d} is not used in the first layout. Then it is automatically
+ hidden by the \l {LayoutItemProxy} in the second layout.
+ Another way of using it is shown by setting a \l {LayoutItemProxy} as
+ the content of a \l {Flickable}.
+
+ Another layout is declared as follows.
+
+ \snippet responsivelayouts/responsivelayouts.qml second layout
+
+ Here we show that \l {LayoutItemProxy}{LayoutItemProxies} can be used
+ together with real \l {Item}{Items} on the same hierarchy level. Generally,
+ the \l {LayoutItemProxy} is flexible and allows nested structures of
+ items and layouts.
+
+ \section1 Setting the layout
+
+ After two layouts, \c {smallLayout} and \c {largeLayout} are defined,
+ we can continue with setting the layout that fits to the current size of
+ the application. We define a new function for this code that we call
+ when the window is initialized and whenever the width changes:
+
+ \snippet responsivelayouts/responsivelayouts.qml setting the layout
+
+ Alternatively to calling this function after initialization we can hide all
+ but the correct layout for the initial size in the declarative code.
+*/
diff --git a/examples/quick/responsivelayouts/icons/grid.svg b/examples/quick/responsivelayouts/icons/grid.svg
new file mode 100644
index 0000000000..fd542d7dc4
--- /dev/null
+++ b/examples/quick/responsivelayouts/icons/grid.svg
@@ -0,0 +1,4 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M4 13C2.89543 13 2 13.8954 2 15V20C2 21.1046 2.89543 22 4 22H9C10.1046 22 11 21.1046 11 20V15C11 13.8954 10.1046 13 9 13H4ZM15 13C13.8954 13 13 13.8954 13 15V20C13 21.1046 13.8954 22 15 22H20C21.1046 22 22 21.1046 22 20V15C22 13.8954 21.1046 13 20 13H15Z" fill="#0D0D0D"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M4 2C2.89543 2 2 2.89543 2 4V9C2 10.1046 2.89543 11 4 11H9C10.1046 11 11 10.1046 11 9V4C11 2.89543 10.1046 2 9 2H4ZM15 2C13.8954 2 13 2.89543 13 4V9C13 10.1046 13.8954 11 15 11H20C21.1046 11 22 10.1046 22 9V4C22 2.89543 21.1046 2 20 2H15Z" fill="#0D0D0D"/>
+</svg>
diff --git a/examples/quick/responsivelayouts/icons/settings.svg b/examples/quick/responsivelayouts/icons/settings.svg
new file mode 100644
index 0000000000..3a13ccae16
--- /dev/null
+++ b/examples/quick/responsivelayouts/icons/settings.svg
@@ -0,0 +1,4 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M8.84998 4C8.84998 2.89543 9.74541 2 10.85 2H13.1222C14.2268 2 15.1222 2.89543 15.1222 4V4.59509C15.1229 4.59732 15.125 4.6023 15.1306 4.61031C15.1434 4.62838 15.1691 4.65242 15.2077 4.66935C15.852 4.95163 16.4515 5.31609 16.9931 5.74921C17.0261 5.77554 17.0594 5.787 17.0815 5.78982C17.0912 5.79106 17.0966 5.79055 17.0989 5.79008L17.9363 5.33741C18.8691 4.8332 20.0332 5.14455 20.5897 6.04706L21.6744 7.80604C22.2777 8.78435 21.9342 10.0686 20.9231 10.6152L19.9875 11.1209C19.9859 11.1226 19.9824 11.1269 19.9781 11.1358C19.9683 11.156 19.9595 11.1904 19.9636 11.2327C19.9877 11.4855 20 11.7414 20 12C20 12.2586 19.9877 12.5145 19.9636 12.7673C19.9595 12.8096 19.9683 12.844 19.9781 12.8642C19.9824 12.8732 19.9859 12.8774 19.9875 12.8791L20.923 13.3848C21.9341 13.9314 22.2776 15.2157 21.6743 16.194L20.5897 17.9529C20.0331 18.8554 18.869 19.1668 17.9362 18.6626L17.0989 18.2099C17.0966 18.2095 17.0912 18.209 17.0815 18.2102C17.0594 18.213 17.026 18.2245 16.9931 18.2508C16.4515 18.6839 15.852 19.0484 15.2077 19.3306C15.1691 19.3476 15.1434 19.3716 15.1306 19.3897C15.125 19.3977 15.1229 19.4027 15.1222 19.4049V20C15.1222 21.1046 14.2268 22 13.1222 22H10.85C9.74541 22 8.84998 21.1046 8.84998 20V19.3928C8.84931 19.3906 8.84725 19.3857 8.84163 19.3777C8.82894 19.3597 8.80351 19.3357 8.76508 19.3187C8.12675 19.0362 7.53272 18.6729 6.99586 18.242C6.96292 18.2156 6.92951 18.2041 6.90737 18.2012C6.89759 18.2 6.8922 18.2005 6.8899 18.201L6.03592 18.6626C5.10317 19.1668 3.93904 18.8554 3.38251 17.9529L2.29784 16.194C1.69457 15.2156 2.03805 13.9314 3.04914 13.3848L4.01099 12.8649C4.01265 12.8632 4.01607 12.859 4.02042 12.85C4.03023 12.8299 4.03897 12.7956 4.03503 12.7534C4.0118 12.5051 3.99995 12.2538 3.99995 12C3.99995 11.7462 4.0118 11.4949 4.03503 11.2466C4.03897 11.2045 4.03022 11.1701 4.02042 11.15C4.01607 11.1411 4.01265 11.1368 4.01098 11.1352L3.04909 10.6152C2.038 10.0686 1.69452 8.78435 2.29779 7.80604L3.38245 6.04707C3.93898 5.14456 5.10312 4.83322 6.03587 5.33742L6.88988 5.79907C6.89218 5.79953 6.89757 5.80005 6.90735 5.79879C6.92949 5.79594 6.9629 5.78441 6.99584 5.75797C7.53271 5.32709 8.12674 4.96379 8.76508 4.68128C8.80351 4.66427 8.82894 4.64029 8.84163 4.62231C8.84725 4.61434 8.84931 4.60938 8.84998 4.60716V4ZM8.85024 4.60578C8.85029 4.60578 8.85026 4.60619 8.85001 4.60703L8.85024 4.60578ZM6.88852 5.79864C6.88854 5.7986 6.88898 5.79869 6.88977 5.79904L6.88852 5.79864ZM4.00988 11.1343C4.00991 11.1342 4.01026 11.1344 4.0109 11.1351L4.00988 11.1343ZM4.00989 12.8658C4.00988 12.8657 4.01021 12.8654 4.01091 12.865L4.00989 12.8658ZM6.88854 18.2014C6.88851 18.2013 6.8889 18.2012 6.88979 18.201L6.88854 18.2014ZM19.9886 12.88C19.9885 12.88 19.9881 12.8797 19.9876 12.8792L19.9886 12.88ZM19.9886 11.12C19.9887 11.12 19.9883 11.1204 19.9876 11.1208L19.9886 11.12ZM17.1003 5.78965C17.1003 5.78968 17.0999 5.78986 17.099 5.79006L17.1003 5.78965ZM15.122 4.5937C15.122 4.59371 15.1221 4.59414 15.1222 4.59496L15.122 4.5937ZM13.1222 4L10.85 4V4.60808C10.85 5.49562 10.2774 6.19908 9.57449 6.51017C9.09654 6.7217 8.65096 6.99408 8.24769 7.31774C7.63839 7.80676 6.73261 7.98755 5.93958 7.55888L5.08481 7.09682L4.00015 8.8558L4.9628 9.37617C5.7538 9.80375 6.09888 10.6574 6.02633 11.4329C6.00889 11.6193 5.99995 11.8085 5.99995 12C5.99995 12.1915 6.00889 12.3807 6.02633 12.5671C6.09889 13.3426 5.75381 14.1963 4.9628 14.6239L4.0002 15.1442L5.08486 16.9032L5.9396 16.4411C6.73263 16.0125 7.63841 16.1933 8.2477 16.6823C8.65097 17.0059 9.09654 17.2783 9.57449 17.4898C10.2774 17.8009 10.85 18.5044 10.85 19.3919V20H13.1222V19.404C13.1222 18.5133 13.6987 17.8083 14.4051 17.4988C14.8875 17.2874 15.3372 17.0142 15.744 16.6889C16.3532 16.2017 17.2575 16.0222 18.0492 16.4501L18.8873 16.9032L19.972 15.1442L19.0357 14.6381C18.2434 14.2098 17.8986 13.3541 17.9726 12.5776C17.9907 12.3878 18 12.1951 18 12C18 11.8049 17.9907 11.6123 17.9726 11.4224C17.8986 10.6459 18.2434 9.79023 19.0357 9.36192L19.972 8.85579L18.8874 7.09681L18.0492 7.54989C17.2575 7.97786 16.3532 7.79836 15.744 7.31116C15.3372 6.98582 14.8875 6.71259 14.4051 6.50124C13.6987 6.19173 13.1222 5.48675 13.1222 4.596L13.1222 4Z" fill="#0D0D0D"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M12 14C13.1046 14 14 13.1046 14 12C14 10.8954 13.1046 10 12 10C10.8954 10 10 10.8954 10 12C10 13.1046 10.8954 14 12 14ZM12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z" fill="#0D0D0D"/>
+</svg>
diff --git a/examples/quick/responsivelayouts/icons/text.svg b/examples/quick/responsivelayouts/icons/text.svg
new file mode 100644
index 0000000000..a5066b7aff
--- /dev/null
+++ b/examples/quick/responsivelayouts/icons/text.svg
@@ -0,0 +1,4 @@
+<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 11C3.94772 11 3.5 11.4477 3.5 12C3.5 12.5523 3.94772 13 4.5 13H20.5C21.0523 13 21.5 12.5523 21.5 12C21.5 11.4477 21.0523 11 20.5 11H4.5ZM3.5 16C3.5 15.4477 3.94772 15 4.5 15H20.5C21.0523 15 21.5 15.4477 21.5 16C21.5 16.5523 21.0523 17 20.5 17H4.5C3.94772 17 3.5 16.5523 3.5 16ZM3.5 20C3.5 19.4477 3.94772 19 4.5 19H20.5C21.0523 19 21.5 19.4477 21.5 20C21.5 20.5523 21.0523 21 20.5 21H4.5C3.94772 21 3.5 20.5523 3.5 20Z" fill="#0D0D0D"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 3C3.94772 3 3.5 3.44772 3.5 4C3.5 4.55228 3.94772 5 4.5 5H20.5C21.0523 5 21.5 4.55228 21.5 4C21.5 3.44772 21.0523 3 20.5 3H4.5ZM4.5 7C3.94772 7 3.5 7.44772 3.5 8C3.5 8.55228 3.94772 9 4.5 9H20.5C21.0523 9 21.5 8.55228 21.5 8C21.5 7.44772 21.0523 7 20.5 7H4.5Z" fill="#0D0D0D"/>
+</svg>
diff --git a/examples/quick/responsivelayouts/main.cpp b/examples/quick/responsivelayouts/main.cpp
new file mode 100644
index 0000000000..9eb03f16eb
--- /dev/null
+++ b/examples/quick/responsivelayouts/main.cpp
@@ -0,0 +1,15 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include <QGuiApplication>
+#include <QQmlApplicationEngine>
+
+int main(int argc, char* argv[])
+{
+ QGuiApplication app(argc, argv);
+
+ QQmlApplicationEngine engine;
+ engine.load(QUrl(QStringLiteral("qrc:/qt/qml/responsivelayouts/responsivelayouts.qml")));
+
+ return app.exec();
+}
diff --git a/examples/quick/responsivelayouts/responsivelayouts.pro b/examples/quick/responsivelayouts/responsivelayouts.pro
new file mode 100644
index 0000000000..5450a6585a
--- /dev/null
+++ b/examples/quick/responsivelayouts/responsivelayouts.pro
@@ -0,0 +1,14 @@
+TEMPLATE = app
+
+QT += qml quick
+
+SOURCES += main.cpp
+
+RESOURCES += \
+ responsivelayouts.qrc
+EXAMPLE_FILES = \
+ responsivelayouts.qml
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/responsivelayouts
+INSTALLS += target
+
diff --git a/examples/quick/responsivelayouts/responsivelayouts.qml b/examples/quick/responsivelayouts/responsivelayouts.qml
new file mode 100644
index 0000000000..f9ef99612d
--- /dev/null
+++ b/examples/quick/responsivelayouts/responsivelayouts.qml
@@ -0,0 +1,160 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
+
+Window {
+ id: appWindow
+
+ visible: true
+ title: qsTr("Responsive layouts with LayoutItemProxy")
+
+ minimumHeight: 500
+ minimumWidth: 250
+
+ //! [item definition]
+ Rectangle {
+ id: contentItem
+ Layout.fillWidth: true
+ implicitHeight: grid.implicitHeight
+ implicitWidth: grid.implicitWidth
+ color: "#00414A"
+
+ GridLayout {
+ anchors.fill: parent
+ id: grid
+ columns: 2
+ anchors.margins: 8
+ Repeater {
+ model: 18
+ Rectangle {
+ Layout.fillWidth: true
+ Layout.margins: 8
+ implicitWidth: 200
+ implicitHeight: width
+ radius: width / 10
+ gradient: Gradient {
+ GradientStop { position: -0.2; color: "#2CDE85" }
+ GradientStop { position: 1.2; color: "#00414A" }
+ }
+ Text {
+ color: "#ffffff"
+ font.pointSize: 22
+ anchors.centerIn: parent
+ text: index
+ }
+ }
+ }
+ }
+ }
+
+ Button {
+ id: a
+ text: "Text"
+ icon.source: "./icons/text.svg"
+ Layout.fillWidth: true
+ Layout.margins: 3
+ }
+
+ Button {
+ id: b
+ text: "Grid 1"
+ icon.source: "./icons/grid.svg"
+ Layout.fillWidth: true
+ Layout.margins: 3
+ }
+
+ Button {
+ id: c
+ text: "Grid 2"
+ icon.source: "./icons/grid.svg"
+ Layout.fillWidth: true
+ Layout.margins: 3
+ }
+
+ Button {
+ id: d
+ text: "Settings"
+ icon.source: "./icons/settings.svg"
+ Layout.fillWidth: true
+ Layout.margins: 3
+ }
+ //! [item definition]
+
+ //! [first layout]
+ ColumnLayout {
+ id: smallLayout
+ anchors.fill: parent
+
+ //! [proxy in flickable]
+ Flickable {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ contentWidth: width
+ contentHeight: gl.implicitHeight
+ clip: true
+ ScrollIndicator.vertical: ScrollIndicator { }
+ LayoutItemProxy {
+ id: gl
+ width: parent.width
+ height: implicitHeight
+ target: contentItem
+ }
+ }
+ //! [proxy in flickable]
+
+ //! [proxy in layout]
+ RowLayout {
+ Layout.fillHeight: false
+ Layout.fillWidth: true
+ Layout.margins: 5
+ //! [layout property on proxy]
+ LayoutItemProxy{ target: a; }
+ //! [layout property on proxy]
+ LayoutItemProxy{ target: b; }
+ LayoutItemProxy{ target: c; }
+ }
+ //! [proxy in layout]
+ }
+ //! [first layout]
+
+ //! [second layout]
+ RowLayout {
+ id: largeLayout
+ anchors.fill: parent
+ ColumnLayout {
+ Layout.minimumWidth: 100
+ Layout.margins: 2
+ LayoutItemProxy{ target: a }
+ LayoutItemProxy{ target: b }
+ LayoutItemProxy{ target: c }
+ //! [spacer item]
+ Item { Layout.fillHeight: true }
+ //! [spacer item]
+ LayoutItemProxy{ target: d }
+ }
+
+ LayoutItemProxy {
+ Layout.fillHeight: true
+ Layout.fillWidth: false
+ target: contentItem
+ }
+ }
+ //! [second layout]
+
+ //! [setting the layout]
+ function setFittingLayout() {
+ if (width < 450) {
+ smallLayout.visible = true
+ largeLayout.visible = false
+ } else {
+ smallLayout.visible = false
+ largeLayout.visible = true
+ }
+ }
+ onWidthChanged: setFittingLayout()
+ Component.onCompleted: setFittingLayout()
+ //! [setting the layout]
+}
diff --git a/examples/quick/responsivelayouts/responsivelayouts.qrc b/examples/quick/responsivelayouts/responsivelayouts.qrc
new file mode 100644
index 0000000000..76c435692a
--- /dev/null
+++ b/examples/quick/responsivelayouts/responsivelayouts.qrc
@@ -0,0 +1,8 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/qt/qml/responsivelayouts">
+ <file>responsivelayouts.qml</file>
+ <file>icons/grid.svg</file>
+ <file>icons/text.svg</file>
+ <file>icons/settings.svg</file>
+</qresource>
+</RCC>
diff --git a/examples/quick/righttoleft/CMakeLists.txt b/examples/quick/righttoleft/CMakeLists.txt
deleted file mode 100644
index 5faf4bda61..0000000000
--- a/examples/quick/righttoleft/CMakeLists.txt
+++ /dev/null
@@ -1,128 +0,0 @@
-# Generated from righttoleft.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(righttoleft LANGUAGES CXX)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/righttoleft")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(righttoleft
- main.cpp
-)
-set_target_properties(righttoleft PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(righttoleft PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-
-# Resources:
-set(righttoleft_resource_files
- "layoutdirection/layoutdirection.qml"
- "layoutmirroring/layoutmirroring.qml"
- "righttoleft.qml"
- "textalignment/textalignment.qml"
-)
-
-qt6_add_resources(righttoleft "righttoleft"
- PREFIX
- "/righttoleft"
- FILES
- ${righttoleft_resource_files}
-)
-set_source_files_properties("../shared/Button.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Button.qml"
-)
-set_source_files_properties("../shared/CheckBox.qml"
- PROPERTIES QT_RESOURCE_ALIAS "CheckBox.qml"
-)
-set_source_files_properties("../shared/FlickrRssModel.qml"
- PROPERTIES QT_RESOURCE_ALIAS "FlickrRssModel.qml"
-)
-set_source_files_properties("../shared/Label.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Label.qml"
-)
-set_source_files_properties("../shared/LauncherList.qml"
- PROPERTIES QT_RESOURCE_ALIAS "LauncherList.qml"
-)
-set_source_files_properties("../shared/SimpleLauncherDelegate.qml"
- PROPERTIES QT_RESOURCE_ALIAS "SimpleLauncherDelegate.qml"
-)
-set_source_files_properties("../shared/Slider.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Slider.qml"
-)
-set_source_files_properties("../shared/TabSet.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TabSet.qml"
-)
-set_source_files_properties("../shared/TextField.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TextField.qml"
-)
-set_source_files_properties("../shared/images/back.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/back.png"
-)
-set_source_files_properties("../shared/images/checkmark.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/checkmark.png"
-)
-set_source_files_properties("../shared/images/next.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/next.png"
-)
-set_source_files_properties("../shared/images/qt-logo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/qt-logo.png"
-)
-set_source_files_properties("../shared/images/slider_handle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/slider_handle.png"
-)
-set_source_files_properties("../shared/images/tab.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/tab.png"
-)
-set(shared_resource_files
- "Button.qml"
- "CheckBox.qml"
- "FlickrRssModel.qml"
- "Label.qml"
- "LauncherList.qml"
- "SimpleLauncherDelegate.qml"
- "Slider.qml"
- "TabSet.qml"
- "TextField.qml"
- "images/back.png"
- "images/checkmark.png"
- "images/next.png"
- "images/qt-logo.png"
- "images/slider_handle.png"
- "images/tab.png"
-)
-
-qt6_add_resources(righttoleft "shared"
- PREFIX
- "/shared"
- BASE
- "../shared"
- FILES
- ${shared_resource_files}
-)
-
-install(TARGETS righttoleft
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
diff --git a/examples/quick/righttoleft/doc/images/qml-righttoleft-example.png b/examples/quick/righttoleft/doc/images/qml-righttoleft-example.png
deleted file mode 100644
index 03c3c48f10..0000000000
--- a/examples/quick/righttoleft/doc/images/qml-righttoleft-example.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/righttoleft/doc/src/righttoleft.qdoc b/examples/quick/righttoleft/doc/src/righttoleft.qdoc
deleted file mode 100644
index adc67de6f4..0000000000
--- a/examples/quick/righttoleft/doc/src/righttoleft.qdoc
+++ /dev/null
@@ -1,48 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-/*!
- \title Qt Quick Examples - Right to Left
- \example righttoleft
- \brief This is a collection of QML Right to Left examples.
- \image qml-righttoleft-example.png
- \ingroup qtquickexamples
-
- \e{Right to Left} is a collection of small QML examples relating to
- right to left (RTL) localization support. For more information,
- visit \l{Right-to-left User Interfaces}.
-
- These are the examples in Right to Left:
- \list
- \li \e{Layout Direction} - shows RTL layout direction
- \li \e{Layout Mirroring} - shows automatic mirroring of horizontal layouts
- in RTL locales
- \li \e{Text Alignment} - shows automatic mirroring of text alignment in RTL
- locales
- \endlist
-
- \include examples-run.qdocinc
-*/
diff --git a/examples/quick/righttoleft/layoutdirection/layoutdirection.qml b/examples/quick/righttoleft/layoutdirection/layoutdirection.qml
deleted file mode 100644
index de111ea025..0000000000
--- a/examples/quick/righttoleft/layoutdirection/layoutdirection.qml
+++ /dev/null
@@ -1,265 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Rectangle {
- id: root
- property bool mirror
- property int direction: Qt.application.layoutDirection
- LayoutMirroring.enabled: mirror
- LayoutMirroring.childrenInherit: true
- width: 320
- height: 480
- Column {
- id: columnA
- spacing: 10
- x: 10
- y: 10
- width: 140
-
- Item {
- id: rowCell
- }
- Text {
- text: "Row"
- anchors.horizontalCenter: parent.horizontalCenter
- }
-
- Row {
- layoutDirection: root.direction
- spacing: 10
- move: Transition {
- NumberAnimation {
- properties: "x"
- }
- }
- Repeater {
- model: 3
- Loader {
- required property int index
- sourceComponent: PositionerDelegate {}
- }
- }
- }
-
- Text {
- text: "Grid"
- anchors.horizontalCenter: parent.horizontalCenter
- }
-
- Grid {
- layoutDirection: root.direction
- spacing: 10; columns: 3
- move: Transition {
- NumberAnimation {
- properties: "x"
- }
- }
- Repeater {
- model: 8
- Loader {
- required property int index
- sourceComponent: PositionerDelegate {}
- }
- }
- }
-
- Text {
- text: "Flow"
- anchors.horizontalCenter: parent.horizontalCenter
- }
-
- Flow {
- layoutDirection: root.direction
- spacing: 10; width: parent.width
- move: Transition {
- NumberAnimation {
- properties: "x"
- }
- }
- Repeater {
- model: 8
- Loader {
- required property int index
- sourceComponent: PositionerDelegate {}
- }
- }
- }
- }
- Column {
- id: columnB
- spacing: 10
- x: 160
- y: 10
-
- Text {
- text: "ListView"
- anchors.horizontalCenter: parent.horizontalCenter
- }
-
- ListView {
- id: listView
- clip: true
- width: parent.width; height: 40
- layoutDirection: root.direction
- orientation: Qt.Horizontal
- model: 48
- delegate: ViewDelegate {}
- }
-
- Text {
- text: "GridView"
- anchors.horizontalCenter: parent.horizontalCenter
- }
-
- GridView {
- clip: true
- width: 150; height: 160
- cellWidth: 50; cellHeight: 50
- layoutDirection: root.direction
- model: 48
- delegate: ViewDelegate {}
- }
-
- Rectangle {
- height: 50; width: parent.width
- color: mouseArea.pressed ? "black" : "gray"
- Column {
- anchors.centerIn: parent
- Text {
- text: root.direction ? "Right to left" : "Left to right"
- color: "white"
- font.pixelSize: 16
- anchors.horizontalCenter: parent.horizontalCenter
- }
- Text {
- text: "(click here to toggle)"
- color: "white"
- font.pixelSize: 10
- font.italic: true
- anchors.horizontalCenter: parent.horizontalCenter
- }
- }
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- onClicked: {
- if (root.direction == Qt.LeftToRight) {
- root.direction = Qt.RightToLeft;
- } else {
- root.direction = Qt.LeftToRight;
- }
- }
- }
- }
-
- Rectangle {
- height: 50; width: parent.width
- color: mouseArea2.pressed ? "black" : "gray"
- Column {
- anchors.centerIn: parent
- Text {
- text: root.mirror ? "Mirrored" : "Not mirrored"
- color: "white"
- font.pixelSize: 16
- anchors.horizontalCenter: parent.horizontalCenter
- }
- Text {
- text: "(click here to toggle)"
- color: "white"
- font.pixelSize: 10
- font.italic: true
- anchors.horizontalCenter: parent.horizontalCenter
- }
- }
- MouseArea {
- id: mouseArea2
- anchors.fill: parent
- onClicked: {
- root.mirror = !root.mirror;
- }
- }
- }
- }
-
- component PositionerDelegate : Rectangle {
- width: 40
- height: 40
- property int lightness: parent.index + 1;
- color: Qt.rgba(0.8 / lightness, 0.8 / lightness, 0.8 / lightness, 1.0)
- Text {
- text: parent.lightness
- color: "white"
- font.pixelSize: 18
- anchors.centerIn: parent
- }
- }
-
- component ViewDelegate : Item {
- id: delegateItem
- required property int index
- width: (listView.effectiveLayoutDirection == Qt.LeftToRight ? (index == 48 - 1) : (index == 0)) ? 40 : 50
- Rectangle {
- width: 40; height: 40
- color: Qt.rgba(0.5 + (48 - delegateItem.index) * Math.random() / 48,
- 0.3 + delegateItem.index * Math.random() / 48,
- 0.3 * Math.random(),
- 1.0)
- Text {
- text: delegateItem.index + 1
- color: "white"
- font.pixelSize: 18
- anchors.centerIn: parent
- }
- }
- }
-}
-
diff --git a/examples/quick/righttoleft/layoutdirection/layoutdirection.qmlproject b/examples/quick/righttoleft/layoutdirection/layoutdirection.qmlproject
deleted file mode 100644
index 33cbb3c9e2..0000000000
--- a/examples/quick/righttoleft/layoutdirection/layoutdirection.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "layoutdirection.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/quick/righttoleft/layoutmirroring/layoutmirroring.qml b/examples/quick/righttoleft/layoutmirroring/layoutmirroring.qml
deleted file mode 100644
index 04d912eaa6..0000000000
--- a/examples/quick/righttoleft/layoutmirroring/layoutmirroring.qml
+++ /dev/null
@@ -1,213 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Rectangle {
- id: root
- property bool mirror: Qt.application.layoutDirection == Qt.RightToLeft
- LayoutMirroring.enabled: mirror
- LayoutMirroring.childrenInherit: true
- width: 320
- height: 480
- color: "lightsteelblue"
-
- Column {
- spacing: 10
- anchors { left: parent.left; right: parent.right; top: parent.top; margins: 10 }
-
- Text {
- text: "Text alignment"
- anchors.left: parent.left
- }
-
- Rectangle {
- id: textStrings
- width: 148
- height: 85
- color: "white"
- anchors.left: parent.left
- Column {
- spacing: 5
- width: parent.width
- anchors { fill: parent; margins: 5 }
- Text {
- id: englishText
- width: parent.width
- text: "English text"
- }
- Text {
- id: arabicText
- width: parent.width
- text: "النص العربي"
- }
- Text {
- id: leftAlignedText
- width: parent.width
- text: "Text aligned to left"
- horizontalAlignment: Text.AlignLeft
- }
- Text {
- id: rightAlignedText
- width: parent.width
- text: "Text aligned to right"
- horizontalAlignment: Text.AlignRight
- }
- }
- }
-
- Text {
- text: "Item x"
- anchors.left: parent.left
- }
- Rectangle {
- id: items
- color: Qt.rgba(0.2, 0.2, 0.2, 0.6)
- width: 275; height: 95
- anchors.left: parent.left
- Rectangle {
- y: 5; x: 5
- width: 130; height: 40
- Text {
- text: "Item with x: 5\n(not mirrored)"
- anchors.centerIn: parent
- }
- }
- Rectangle {
- color: Qt.rgba(0.7, 0.7, 0.7)
- y: 50; x: mirror(5)
- width: 130; height: 40
- function mirror(value) {
- return LayoutMirroring.enabled ? (parent.width - width - value) : value;
- }
- Text {
- text: "Item with x: " + parent.x + "\n(manually mirrored)"
- anchors.centerIn: parent
- }
- }
- }
- Text {
- text: "Item anchors"
- anchors.left: parent.left
- }
-
- Rectangle {
- id: anchoredItems
- color: Qt.rgba(0.2, 0.2, 0.2, 0.6)
- width: 270; height: 170
- anchors.left: parent.left
- Rectangle {
- id: blackRectangle
- color: "black"
- width: 180; height: 90
- anchors { horizontalCenter: parent.horizontalCenter; horizontalCenterOffset: 30 }
- Text {
- text: "Horizontal center anchored\nwith offset 30\nto the horizontal center\nof the parent."
- color: "white"
- anchors.centerIn: parent
- }
- }
- Rectangle {
- id: whiteRectangle
- color: "white"
- width: 120; height: 70
- anchors { left: parent.left; bottom: parent.bottom }
- Text {
- text: "Left side anchored\nto the left side\nof the parent."
- color: "black"
- anchors.centerIn: parent
- }
- }
- Rectangle {
- id: grayRectangle
- color: Qt.rgba(0.7, 0.7, 0.7)
- width: 140; height: 90
- anchors { right: parent.right; bottom: parent.bottom }
- Text {
- text: "Right side anchored\nto the right side\nof the parent."
- anchors.centerIn: parent
- }
- }
- }
- }
-
- Rectangle {
- id: mirrorButton
- color: mouseArea2.pressed ? "black" : "gray"
- height: 50; width: 160
- anchors.right: parent.right
- anchors.top: parent.top
- anchors.margins: 10
- Column {
- anchors.centerIn: parent
- Text {
- text: root.mirror ? "Mirrored" : "Not mirrored"
- color: "white"
- font.pixelSize: 16
- anchors.horizontalCenter: parent.horizontalCenter
- }
- Text {
- text: "(click here to toggle)"
- color: "white"
- font.pixelSize: 10
- font.italic: true
- anchors.horizontalCenter: parent.horizontalCenter
- }
- }
- MouseArea {
- id: mouseArea2
- anchors.fill: parent
- onClicked: {
- root.mirror = !root.mirror;
- }
- }
- }
-}
-
diff --git a/examples/quick/righttoleft/layoutmirroring/layoutmirroring.qmlproject b/examples/quick/righttoleft/layoutmirroring/layoutmirroring.qmlproject
deleted file mode 100644
index 72bc04a8a9..0000000000
--- a/examples/quick/righttoleft/layoutmirroring/layoutmirroring.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "layoutmirroring.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/quick/righttoleft/main.cpp b/examples/quick/righttoleft/main.cpp
deleted file mode 100644
index 2b658a0a62..0000000000
--- a/examples/quick/righttoleft/main.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-#include "../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(righttoleft/righttoleft)
diff --git a/examples/quick/righttoleft/righttoleft.pro b/examples/quick/righttoleft/righttoleft.pro
deleted file mode 100644
index 248564e07f..0000000000
--- a/examples/quick/righttoleft/righttoleft.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-TEMPLATE = app
-
-QT += quick qml
-SOURCES += main.cpp
-RESOURCES += \
- righttoleft.qrc \
- ../shared/shared.qrc
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/righttoleft
-INSTALLS += target
diff --git a/examples/quick/righttoleft/righttoleft.qml b/examples/quick/righttoleft/righttoleft.qml
deleted file mode 100644
index a9d8584835..0000000000
--- a/examples/quick/righttoleft/righttoleft.qml
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import "../shared" as Examples
-
-Item {
- height: 480
- width: 320
- Examples.LauncherList {
- id: ll
- anchors.fill: parent
- Component.onCompleted: {
- addExample("Layout Direction", "Shows RTL layouting in positioners and views", Qt.resolvedUrl("layoutdirection/layoutdirection.qml"));
- addExample("Layout Mirroring", "Shows RTL layouting in basic text and anchors", Qt.resolvedUrl("layoutmirroring/layoutmirroring.qml"));
- addExample("Text Alignment", "Shows RTL layouting in various text elements", Qt.resolvedUrl("textalignment/textalignment.qml"));
- }
- }
-}
diff --git a/examples/quick/righttoleft/righttoleft.qmlproject b/examples/quick/righttoleft/righttoleft.qmlproject
deleted file mode 100644
index f394d9030e..0000000000
--- a/examples/quick/righttoleft/righttoleft.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "righttoleft.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/quick/righttoleft/righttoleft.qrc b/examples/quick/righttoleft/righttoleft.qrc
deleted file mode 100644
index 1d9f068a1e..0000000000
--- a/examples/quick/righttoleft/righttoleft.qrc
+++ /dev/null
@@ -1,8 +0,0 @@
-<RCC>
- <qresource prefix="/righttoleft">
- <file>righttoleft.qml</file>
- <file>layoutdirection/layoutdirection.qml</file>
- <file>layoutmirroring/layoutmirroring.qml</file>
- <file>textalignment/textalignment.qml</file>
- </qresource>
-</RCC>
diff --git a/examples/quick/righttoleft/textalignment/textalignment.qml b/examples/quick/righttoleft/textalignment/textalignment.qml
deleted file mode 100644
index 698917a3c0..0000000000
--- a/examples/quick/righttoleft/textalignment/textalignment.qml
+++ /dev/null
@@ -1,468 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Rectangle {
- id: root
- color: "white"
- //width: containerColumn.width
- //height: containerColumn.height + containerColumn.anchors.topMargin
- width: 320
- height: 480
-
- property bool mirror: false
- property int pxSz: 18
- property variant horizontalAlignment: undefined
-
- property variant editorType: ["Plain Text", "Styled Text", "Plain Rich Text", "Italic Rich Text", "Plain TextEdit", "Italic TextEdit", "TextInput"]
- property variant text: ["", " ", "Hello world!", "مرحبا العالم!", "Hello world! Hello!\nHello world! Hello!", "مرحبا العالم! مرحبا! مرحبا العالم! مرحبا!" ,"مرحبا العالم! مرحبا! مرحبا Hello world!\nالعالم! مرحبا!"]
- property variant description: ["empty text", "white-space-only text", "left-to-right text", "right-to-left text", "multi-line left-to-right text", "multi-line right-to-left text", "multi-line bidi text"]
- property variant textComponents: [plainTextComponent, styledTextComponent, richTextComponent, italicRichTextComponent, plainTextEdit, italicTextEdit, textInput]
-
- function shortText(horizontalAlignment) {
-
- // all the different QML editors have
- // the same alignment values
- switch (horizontalAlignment) {
- case Text.AlignLeft:
- return "L";
- case Text.AlignRight:
- return "R";
- case Text.AlignHCenter:
- return "C";
- case Text.AlignJustify:
- return "J";
- default:
- return "Error";
- }
- }
- Column {
- id: containerColumn
- spacing: 10
- width: editorTypeRow.width
- anchors { top: parent.top; topMargin: 5 }
- ListView {
- width: 320
- height: 320
- id: editorTypeRow
- model: root.editorType.length
- orientation: ListView.Horizontal
- cacheBuffer: 1000//Load the really expensive ones async if possible
- delegate: Item {
- id: delegate
-
- width: editorColumn.width
- height: editorColumn.height
-
- required property int index
-
- Column {
- id: editorColumn
- spacing: 5
- width: textColumn.width+10
- Text {
- text: root.editorType[delegate.index]
- font.pixelSize: 16
- anchors.horizontalCenter: parent.horizontalCenter
- }
- Column {
- id: textColumn
- spacing: 5
- anchors.horizontalCenter: parent.horizontalCenter
- Repeater {
- model: root.textComponents.length
- delegate: root.textComponents[delegate.index]
- }
- }
- }
- }
- }
- Column {
- spacing: 2
- width: parent.width
- Rectangle {
- // button
- height: 50; width: parent.width
- color: mouseArea.pressed ? "black" : "lightgray"
- Column {
- anchors.centerIn: parent
- Text {
- text: root.mirror ? "Mirrored" : "Not mirrored"
- color: "white"
- font.pixelSize: 16
- anchors.horizontalCenter: parent.horizontalCenter
- }
- Text {
- text: "(click here to toggle)"
- color: "white"
- font.pixelSize: 10
- font.italic: true
- anchors.horizontalCenter: parent.horizontalCenter
- }
- }
- MouseArea {
- id: mouseArea
- property int index: 0
- anchors.fill: parent
- onClicked: root.mirror = !root.mirror
- }
- }
- Rectangle {
- // button
- height: 50; width: parent.width
- color: mouseArea2.pressed ? "black" : "gray"
- Column {
- anchors.centerIn: parent
- Text {
- text: {
- if (root.horizontalAlignment == undefined)
- return "Implict alignment";
- switch (root.horizontalAlignment) {
- case Text.AlignLeft:
- return "Left alignment";
- case Text.AlignRight:
- return "Right alignment";
- case Text.AlignHCenter:
- return "Center alignment";
- case Text.AlignJustify:
- return "Justify alignment";
- }
- }
- color: "white"
- font.pixelSize: 16
- anchors.horizontalCenter: parent.horizontalCenter
- }
- Text {
- text: "(click here to toggle)"
- color: "white"
- font.pixelSize: 10
- font.italic: true
- anchors.horizontalCenter: parent.horizontalCenter
- }
- }
- MouseArea {
- id: mouseArea2
- property int index: 0
- anchors.fill: parent
- onClicked: {
- if (index < 0) {
- root.horizontalAlignment = undefined;
- } else {
- root.horizontalAlignment = Math.pow(2, index);
- }
- index = (index + 2) % 5 - 1;
- }
- }
- }
- }
- }
-
- Component {
- id: plainTextComponent
- Text {
- required property int index
-
- width: 180
- text: root.text[index]
- font.pixelSize: root.pxSz
- wrapMode: Text.WordWrap
- horizontalAlignment: root.horizontalAlignment
- LayoutMirroring.enabled: root.mirror
- textFormat: Text.RichText
- Rectangle {
- z: -1
- color: Qt.rgba(0.8, 0.2, 0.2, 0.3)
- anchors.fill: parent
- }
- Text {
- text: root.description[parent.index]
- color: Qt.rgba(1,1,1,1.0)
- anchors.centerIn: parent
- font.pixelSize: root.pxSz - 2
- Rectangle {
- z: -1
- color: Qt.rgba(0.3, 0, 0, 0.3)
- anchors { fill: parent; margins: -3 }
- }
- }
- Text {
- color: "white"
- text: root.shortText(parent.horizontalAlignment)
- anchors { top: parent.top; right: parent.right; margins: 2 }
- }
- }
- }
-
- Component {
- id: styledTextComponent
- Text {
- required property int index
-
- width: 180
- text: root.text[index]
- font.pixelSize: root.pxSz
- wrapMode: Text.WordWrap
- horizontalAlignment: root.horizontalAlignment
- LayoutMirroring.enabled: root.mirror
- textFormat: Text.RichText
- style: Text.Sunken
- styleColor: "white"
- Rectangle {
- z: -1
- color: Qt.rgba(0.8, 0.2, 0.2, 0.3)
- anchors.fill: parent
- }
- Text {
- text: root.description[parent.index]
- color: Qt.rgba(1,1,1,1.0)
- anchors.centerIn: parent
- font.pixelSize: root.pxSz - 2
- Rectangle {
- z: -1
- color: Qt.rgba(0.3, 0, 0, 0.3)
- anchors { fill: parent; margins: -3 }
- }
- }
- Text {
- color: "white"
- text: root.shortText(parent.horizontalAlignment)
- anchors { top: parent.top; right: parent.right; margins: 2 }
- }
- }
- }
-
- Component {
- id: richTextComponent
- Text {
- required property int index
-
- width: 180
- text: root.text[index]
- font.pixelSize: root.pxSz
- wrapMode: Text.WordWrap
- horizontalAlignment: root.horizontalAlignment
- LayoutMirroring.enabled: root.mirror
- textFormat: Text.RichText
- Rectangle {
- z: -1
- color: Qt.rgba(0.8, 0.2, 0.2, 0.3)
- anchors.fill: parent
- }
- Text {
- text: root.description[parent.index]
- color: Qt.rgba(1,1,1,1.0)
- anchors.centerIn: parent
- font.pixelSize: root.pxSz - 2
- Rectangle {
- z: -1
- color: Qt.rgba(0.3, 0, 0, 0.3)
- anchors { fill: parent; margins: -3 }
- }
- }
- Text {
- color: "white"
- text: root.shortText(parent.horizontalAlignment)
- anchors { top: parent.top; right: parent.right; margins: 2 }
- }
- }
- }
-
- Component {
- id: italicRichTextComponent
- Text {
- required property int index
-
- width: 180
- text: "<i>" + root.text[index] + "</i>"
- font.pixelSize: root.pxSz
- wrapMode: Text.WordWrap
- horizontalAlignment: root.horizontalAlignment
- LayoutMirroring.enabled: root.mirror
- textFormat: Text.RichText
- property variant backgroundColor: Qt.rgba(0.8, 0.2, 0.2, 0.3)
- Rectangle {
- z: -1
- color: parent.backgroundColor
- anchors.fill: parent
- }
- Text {
- text: root.description[parent.index]
- color: Qt.rgba(1,1,1,1.0)
- anchors.centerIn: parent
- font.pixelSize: root.pxSz - 2
- Rectangle {
- z: -1
- color: Qt.rgba(0.3, 0, 0, 0.3)
- anchors { fill: parent; margins: -3 }
- }
- }
- Text {
- color: "white"
- text: root.shortText(parent.horizontalAlignment)
- anchors { top: parent.top; right: parent.right; margins: 2 }
- }
- }
- }
-
- Component {
- id: plainTextEdit
- TextEdit {
- required property int index
-
- width: 180
- text: root.text[index]
- font.pixelSize: root.pxSz
- cursorVisible: true
- wrapMode: TextEdit.WordWrap
- horizontalAlignment: root.horizontalAlignment
- LayoutMirroring.enabled: root.mirror
- Rectangle {
- z: -1
- color: Qt.rgba(0.5, 0.5, 0.2, 0.3)
- anchors.fill: parent
- }
- Text {
- text: root.description[parent.index]
- color: Qt.rgba(1,1,1,1.0)
- anchors.centerIn: parent
- font.pixelSize: root.pxSz - 2
- Rectangle {
- z: -1
- color: Qt.rgba(0.3, 0, 0, 0.3)
- anchors { fill: parent; margins: -3 }
- }
- }
- Text {
- color: "white"
- text: root.shortText(parent.horizontalAlignment)
- anchors { top: parent.top; right: parent.right; margins: 2 }
- }
- }
- }
-
- Component {
- id: italicTextEdit
- TextEdit {
- required property int index
-
- width: 180
- text: "<i>" + root.text[index] + "<i>"
- font.pixelSize: root.pxSz
- cursorVisible: true
- wrapMode: TextEdit.WordWrap
- textFormat: TextEdit.RichText
- horizontalAlignment: root.horizontalAlignment
- LayoutMirroring.enabled: root.mirror
- Rectangle {
- z: -1
- color: Qt.rgba(0.5, 0.5, 0.2, 0.3)
- anchors.fill: parent
- }
- Text {
- text: root.description[parent.index]
- color: Qt.rgba(1,1,1,1.0)
- anchors.centerIn: parent
- font.pixelSize: root.pxSz - 2
- Rectangle {
- z: -1
- color: Qt.rgba(0.3, 0, 0, 0.3)
- anchors { fill: parent; margins: -3 }
- }
- }
- Text {
- color: "white"
- text: root.shortText(parent.horizontalAlignment)
- anchors { top: parent.top; right: parent.right; margins: 2 }
- }
- }
- }
-
- Component {
- id: textInput
- Item {
- id: textDelegate
- required property int index
- width: 180
- height: textInput.text.length > 20 ? 3*textInput.height : textInput.height
- TextInput {
- id: textInput
- width: 180
- text: root.text[textDelegate.index]
- font.pixelSize: root.pxSz
- cursorVisible: true
- horizontalAlignment: root.horizontalAlignment
- LayoutMirroring.enabled: root.mirror
- Rectangle {
- z: -1
- color: Qt.rgba(0.6, 0.4, 0.2, 0.3)
- anchors.fill: parent
- }
- Text {
- text: root.description[textDelegate.index]
- color: Qt.rgba(1,1,1,1.0)
- anchors.centerIn: parent
- font.pixelSize: root.pxSz - 2
- Rectangle {
- z: -1
- color: Qt.rgba(0.3, 0, 0, 0.3)
- anchors { fill: parent; margins: -3 }
- }
- }
- Text {
- color: "white"
- text: root.shortText(parent.horizontalAlignment)
- anchors { top: parent.top; right: parent.right; margins: 2 }
- }
- }
- }
- }
-}
-
diff --git a/examples/quick/righttoleft/textalignment/textalignment.qmlproject b/examples/quick/righttoleft/textalignment/textalignment.qmlproject
deleted file mode 100644
index e4b5061364..0000000000
--- a/examples/quick/righttoleft/textalignment/textalignment.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "textalignment.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/quick/scenegraph/.prev_CMakeLists.txt b/examples/quick/scenegraph/.prev_CMakeLists.txt
deleted file mode 100644
index a0619410b0..0000000000
--- a/examples/quick/scenegraph/.prev_CMakeLists.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-# Generated from scenegraph.pro.
-
-add_subdirectory(customgeometry)
-add_subdirectory(custommaterial)
-add_subdirectory(graph)
-add_subdirectory(threadedanimation)
-add_subdirectory(twotextureproviders)
-if(QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3)
- add_subdirectory(fboitem)
- add_subdirectory(openglunderqml)
-endif()
-if(IOS OR MACOS)
- add_subdirectory(metalunderqml)
- add_subdirectory(metaltextureimport)
-endif()
-if(WIN32)
- add_subdirectory(d3d11underqml)
-endif()
-if(QT_FEATURE_vulkan)
- add_subdirectory(vulkanunderqml)
- add_subdirectory(vulkantextureimport)
-endif()
diff --git a/examples/quick/scenegraph/CMakeLists.txt b/examples/quick/scenegraph/CMakeLists.txt
index a0619410b0..19ab9fc73d 100644
--- a/examples/quick/scenegraph/CMakeLists.txt
+++ b/examples/quick/scenegraph/CMakeLists.txt
@@ -1,22 +1,25 @@
-# Generated from scenegraph.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-add_subdirectory(customgeometry)
-add_subdirectory(custommaterial)
-add_subdirectory(graph)
-add_subdirectory(threadedanimation)
-add_subdirectory(twotextureproviders)
+qt_internal_add_example(customgeometry)
+qt_internal_add_example(custommaterial)
+qt_internal_add_example(graph)
+qt_internal_add_example(threadedanimation)
+qt_internal_add_example(twotextureproviders)
+qt_internal_add_example(customrendernode)
+qt_internal_add_example(rhiunderqml)
+qt_internal_add_example(rhitextureitem)
if(QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3)
- add_subdirectory(fboitem)
- add_subdirectory(openglunderqml)
+ qt_internal_add_example(openglunderqml)
endif()
if(IOS OR MACOS)
- add_subdirectory(metalunderqml)
- add_subdirectory(metaltextureimport)
+ qt_internal_add_example(metalunderqml)
+ qt_internal_add_example(metaltextureimport)
endif()
if(WIN32)
- add_subdirectory(d3d11underqml)
+ qt_internal_add_example(d3d11underqml)
endif()
if(QT_FEATURE_vulkan)
- add_subdirectory(vulkanunderqml)
- add_subdirectory(vulkantextureimport)
+ qt_internal_add_example(vulkanunderqml)
+ qt_internal_add_example(vulkantextureimport)
endif()
diff --git a/examples/quick/scenegraph/customgeometry/.prev_CMakeLists.txt b/examples/quick/scenegraph/customgeometry/.prev_CMakeLists.txt
deleted file mode 100644
index 28613e67a3..0000000000
--- a/examples/quick/scenegraph/customgeometry/.prev_CMakeLists.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-# Generated from customgeometry.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(customgeometry LANGUAGES CXX)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/scenegraph/customgeometry")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-
-qt_add_executable(customgeometry
- beziercurve.cpp beziercurve.h
- main.cpp
-)
-set_target_properties(customgeometry PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(customgeometry PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Quick
-)
-
-
-# Resources:
-set(customgeometry_resource_files
- "main.qml"
-)
-
-qt6_add_resources(customgeometry "customgeometry"
- PREFIX
- "/scenegraph/customgeometry"
- FILES
- ${customgeometry_resource_files}
-)
-
-install(TARGETS customgeometry
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
-
-set_target_properties(customgeometry PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI CustomGeometry
-)
-
-qt6_qml_type_registration(customgeometry)
diff --git a/examples/quick/scenegraph/customgeometry/CMakeLists.txt b/examples/quick/scenegraph/customgeometry/CMakeLists.txt
index 0e54c00d24..14b585aa0d 100644
--- a/examples/quick/scenegraph/customgeometry/CMakeLists.txt
+++ b/examples/quick/scenegraph/customgeometry/CMakeLists.txt
@@ -1,60 +1,42 @@
-# Generated from customgeometry.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
-project(customgeometry_declarative LANGUAGES CXX) # special case
+cmake_minimum_required(VERSION 3.16)
+project(customgeometry_declarative LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Quick)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup()
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/scenegraph/customgeometry")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-
-qt_add_executable(customgeometry_declarative # special case
+qt_add_executable(customgeometry_declarative WIN32 MACOSX_BUNDLE
beziercurve.cpp beziercurve.h
main.cpp
)
-set_target_properties(customgeometry_declarative PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(customgeometry_declarative PUBLIC # special case
- Qt::Core
- Qt::Gui
- Qt::Quick
-)
-
-# Resources:
-set(customgeometry_resource_files
- "main.qml"
+target_link_libraries(customgeometry_declarative PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Quick
)
-qt6_add_resources(customgeometry_declarative "customgeometry" # special case
- PREFIX
- "/scenegraph/customgeometry"
- FILES
- ${customgeometry_resource_files}
+qt_add_qml_module(customgeometry_declarative
+ URI CustomGeometry
+ QML_FILES main.qml
+ RESOURCE_PREFIX /scenegraph/customgeometry
+ NO_RESOURCE_TARGET_PATH
)
-install(TARGETS customgeometry_declarative # special case
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+install(TARGETS customgeometry_declarative
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-set_target_properties(customgeometry_declarative PROPERTIES # special case
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI CustomGeometry
+qt_generate_deploy_qml_app_script(
+ TARGET customgeometry_declarative
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
-
-qt6_qml_type_registration(customgeometry_declarative) # special case
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/scenegraph/customgeometry/beziercurve.cpp b/examples/quick/scenegraph/customgeometry/beziercurve.cpp
index 72fc7e6f1b..69d3d5f2e1 100644
--- a/examples/quick/scenegraph/customgeometry/beziercurve.cpp
+++ b/examples/quick/scenegraph/customgeometry/beziercurve.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "beziercurve.h"
@@ -67,9 +20,7 @@ BezierCurve::BezierCurve(QQuickItem *parent)
//! [1]
//! [2]
-BezierCurve::~BezierCurve()
-{
-}
+BezierCurve::~BezierCurve() = default;
//! [2]
//! [3]
@@ -139,7 +90,7 @@ QSGNode *BezierCurve::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *)
node->setGeometry(geometry);
node->setFlag(QSGNode::OwnsGeometry);
//! [5] //! [6]
- QSGFlatColorMaterial *material = new QSGFlatColorMaterial;
+ auto *material = new QSGFlatColorMaterial;
material->setColor(QColor(255, 0, 0));
node->setMaterial(material);
node->setFlag(QSGNode::OwnsMaterial);
diff --git a/examples/quick/scenegraph/customgeometry/beziercurve.h b/examples/quick/scenegraph/customgeometry/beziercurve.h
index fd0085a08e..fa1eae6712 100644
--- a/examples/quick/scenegraph/customgeometry/beziercurve.h
+++ b/examples/quick/scenegraph/customgeometry/beziercurve.h
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef BEZIERCURVE_H
#define BEZIERCURVE_H
@@ -69,11 +22,11 @@ class BezierCurve : public QQuickItem
//! [3]
public:
- BezierCurve(QQuickItem *parent = 0);
+ BezierCurve(QQuickItem *parent = nullptr);
~BezierCurve();
//! [2]
- QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *);
+ QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;
//! [2]
QPointF p1() const { return m_p1; }
diff --git a/examples/quick/scenegraph/customgeometry/doc/src/customgeometry.qdoc b/examples/quick/scenegraph/customgeometry/doc/src/customgeometry.qdoc
index 68b041b3ca..3ac09dd367 100644
--- a/examples/quick/scenegraph/customgeometry/doc/src/customgeometry.qdoc
+++ b/examples/quick/scenegraph/customgeometry/doc/src/customgeometry.qdoc
@@ -1,39 +1,16 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\example scenegraph/customgeometry
\title Scene Graph - Custom Geometry
+ \examplecategory {Graphics}
\ingroup qtquickexamples
\brief Shows how to implement a custom geometry in the Qt Quick Scene Graph.
- The custom geometry example shows how to create a QQuickItem which
+ The custom geometry example shows how to create a \l QQuickItem that
uses the scene graph API to build a custom geometry for the scene
- graph. It does this by creating a BezierCurve item which is made
+ graph. It does this by creating a \c BezierCurve item, which is made
part of the CustomGeometry module and makes use of this in a QML
file.
@@ -138,7 +115,7 @@
\snippet scenegraph/customgeometry/beziercurve.cpp 6
The scene graph API provides a few commonly used material
- implementations. In this example we use the QSGFlatColorMaterial
+ implementations. In this example we use the QSGFlatColorMaterial,
which will fill the shape defined by the geometry with a solid
color. Again we pass the ownership of the material to the node, so
it can be cleaned up by the scene graph.
@@ -153,7 +130,7 @@
\snippet scenegraph/customgeometry/beziercurve.cpp 8
- To fill the geometry, we first extract the vertex array from
+ To fill the geometry we first extract the vertex array from
it. Since we are using one of the default attribute sets, we can
use the convenience function QSGGeometry::vertexDataAsPoint2D().
Then we go through each segment and calculate its position and
@@ -161,7 +138,7 @@
\snippet scenegraph/customgeometry/beziercurve.cpp 9
- In the end of the function, we return the node so the scene graph
+ At the end of the function we return the node so the scene graph
can render it.
\section1 Application Entry-Point
@@ -176,9 +153,26 @@
To make use of the BezierCurve item, we need to register it in the QML
engine, using the QML_ELEMENT macro. This gives it the name
BezierCurve and makes it part of the \c {CustomGeometry 1.0}
- module as defined in the customgeometry.pro file:
-
- \quotefile scenegraph/customgeometry/customgeometry.pro
+ module as defined in the project's build files:
+
+ \if defined(onlinedocs)
+ \tab {build-qt-app}{tab-cmake}{CMake}{checked}
+ \tab {build-qt-app}{tab-qmake}{qmake}{}
+ \tabcontent {tab-cmake}
+ \else
+ \section1 Using CMake
+ \endif
+ \quotefile scenegraph/customgeometry/CMakeLists.txt
+ \if defined(onlinedocs)
+ \endtabcontent
+ \tabcontent {tab-qmake}
+ \else
+ \section1 Using qmake
+ \endif
+ \quotefile scenegraph/customgeometry/customgeometry.pro
+ \if defined(onlinedocs)
+ \endtabcontent
+ \endif
As the bezier curve is drawn as line strips, we specify that
the view should be multisampled to get antialiasing. This is not
diff --git a/examples/quick/scenegraph/customgeometry/main.cpp b/examples/quick/scenegraph/customgeometry/main.cpp
index 15310d279f..302dac6bb3 100644
--- a/examples/quick/scenegraph/customgeometry/main.cpp
+++ b/examples/quick/scenegraph/customgeometry/main.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QtGui>
#include <QtQuick>
diff --git a/examples/quick/scenegraph/customgeometry/main.qml b/examples/quick/scenegraph/customgeometry/main.qml
index 6158b6554f..472a618237 100644
--- a/examples/quick/scenegraph/customgeometry/main.qml
+++ b/examples/quick/scenegraph/customgeometry/main.qml
@@ -1,56 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//! [1]
-import QtQuick 2.0
-import CustomGeometry 1.0
+import QtQuick
+import CustomGeometry
//! [1] //! [2]
Item {
width: 300
@@ -79,7 +32,7 @@ Item {
width: parent.width - 40
wrapMode: Text.WordWrap
- text: "This curve is a custom scene graph item, implemented using line strips"
+ text: qsTr("This curve is a custom scene graph item, implemented using line strips")
}
}
//! [4]
diff --git a/examples/quick/scenegraph/custommaterial/.prev_CMakeLists.txt b/examples/quick/scenegraph/custommaterial/.prev_CMakeLists.txt
deleted file mode 100644
index 6acf1a858b..0000000000
--- a/examples/quick/scenegraph/custommaterial/.prev_CMakeLists.txt
+++ /dev/null
@@ -1,64 +0,0 @@
-# Generated from custommaterial.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(custommaterial LANGUAGES CXX)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/scenegraph/custommaterial")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Quick)
-
-qt_add_executable(custommaterial
- customitem.cpp customitem.h
- main.cpp
-)
-set_target_properties(custommaterial PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(custommaterial PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-
-# Resources:
-set(custommaterial_resource_files
- "main.qml"
- "shaders/mandelbrot.frag.qsb"
- "shaders/mandelbrot.vert.qsb"
-)
-
-qt6_add_resources(custommaterial "custommaterial"
- PREFIX
- "/scenegraph/custommaterial"
- FILES
- ${custommaterial_resource_files}
-)
-
-install(TARGETS custommaterial
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
-
-set_target_properties(custommaterial PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI ExampleCustomMaterial
-)
-
-qt6_qml_type_registration(custommaterial)
diff --git a/examples/quick/scenegraph/custommaterial/CMakeLists.txt b/examples/quick/scenegraph/custommaterial/CMakeLists.txt
index 46cb238af8..8fe276d248 100644
--- a/examples/quick/scenegraph/custommaterial/CMakeLists.txt
+++ b/examples/quick/scenegraph/custommaterial/CMakeLists.txt
@@ -1,64 +1,55 @@
-# Generated from custommaterial.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
-project(custommaterial_declarative LANGUAGES CXX) # special case
+cmake_minimum_required(VERSION 3.16)
+project(custommaterial_declarative LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick ShaderTools)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup()
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/scenegraph/custommaterial")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Quick)
-
-qt_add_executable(custommaterial_declarative # special case
+qt_add_executable(custommaterial_declarative WIN32 MACOSX_BUNDLE
customitem.cpp customitem.h
main.cpp
)
-set_target_properties(custommaterial_declarative PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(custommaterial_declarative PUBLIC # special case
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
+target_link_libraries(custommaterial_declarative PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
-# Resources:
-set(custommaterial_resource_files
- "main.qml"
- "shaders/mandelbrot.frag.qsb"
- "shaders/mandelbrot.vert.qsb"
+qt_add_qml_module(custommaterial_declarative
+ URI ExampleCustomMaterial
+ QML_FILES
+ main.qml
+ RESOURCE_PREFIX /scenegraph/custommaterial
+ NO_RESOURCE_TARGET_PATH
)
-qt6_add_resources(custommaterial_declarative "custommaterial" # special case
+qt6_add_shaders(custommaterial_declarative "shaders"
+ BATCHABLE
+ PRECOMPILE
+ OPTIMIZED
PREFIX
"/scenegraph/custommaterial"
FILES
- ${custommaterial_resource_files}
+ "shaders/mandelbrot.vert"
+ "shaders/mandelbrot.frag"
)
-install(TARGETS custommaterial_declarative # special case
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+install(TARGETS custommaterial_declarative
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-set_target_properties(custommaterial_declarative PROPERTIES # special case
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI ExampleCustomMaterial
+qt_generate_deploy_qml_app_script(
+ TARGET custommaterial_declarative
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
-
-qt6_qml_type_registration(custommaterial_declarative) # special case
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/scenegraph/custommaterial/customitem.cpp b/examples/quick/scenegraph/custommaterial/customitem.cpp
index 62dc962455..4e79d7c2f4 100644
--- a/examples/quick/scenegraph/custommaterial/customitem.cpp
+++ b/examples/quick/scenegraph/custommaterial/customitem.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "customitem.h"
diff --git a/examples/quick/scenegraph/custommaterial/customitem.h b/examples/quick/scenegraph/custommaterial/customitem.h
index 5cc1fa09f4..edd6a4642d 100644
--- a/examples/quick/scenegraph/custommaterial/customitem.h
+++ b/examples/quick/scenegraph/custommaterial/customitem.h
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef CUSTOMITEM_H
#define CUSTOMITEM_H
@@ -65,7 +18,7 @@ class CustomItem : public QQuickItem
QML_ELEMENT
public:
- explicit CustomItem(QQuickItem *parent = 0);
+ explicit CustomItem(QQuickItem *parent = nullptr);
qreal zoom() const
{
diff --git a/examples/quick/scenegraph/custommaterial/doc/src/custommaterial.qdoc b/examples/quick/scenegraph/custommaterial/doc/src/custommaterial.qdoc
index 5cb7b38ab0..2bbcbbe263 100644
--- a/examples/quick/scenegraph/custommaterial/doc/src/custommaterial.qdoc
+++ b/examples/quick/scenegraph/custommaterial/doc/src/custommaterial.qdoc
@@ -1,33 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\example scenegraph/custommaterial
\title Scene Graph - Custom Material
+ \examplecategory {Graphics}
\ingroup qtquickexamples
\brief Shows how to implement a custom material in the Qt Quick Scene Graph.
diff --git a/examples/quick/scenegraph/custommaterial/main.cpp b/examples/quick/scenegraph/custommaterial/main.cpp
index ce1bcd9dfe..1e68cdc9a1 100644
--- a/examples/quick/scenegraph/custommaterial/main.cpp
+++ b/examples/quick/scenegraph/custommaterial/main.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QGuiApplication>
diff --git a/examples/quick/scenegraph/custommaterial/main.qml b/examples/quick/scenegraph/custommaterial/main.qml
index e552c4ee48..ce22f9c8e9 100644
--- a/examples/quick/scenegraph/custommaterial/main.qml
+++ b/examples/quick/scenegraph/custommaterial/main.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.2
-import ExampleCustomMaterial 1.0
+import QtQuick
+import ExampleCustomMaterial
Item {
id: root
@@ -92,8 +45,8 @@ Item {
anchors.bottom: parent.bottom
anchors.margins: 20
wrapMode: Text.WordWrap
- text: "This example shows how to create a custom material in C++ and use it in QML.\n"
+ text: qsTr("This example shows how to create a custom material in C++ and use it in QML.\n"
+ "The custom material uses a fragment shader that calculates the Mandelbrot set,"
- + " and exposes the shader uniforms as QML properties."
+ + " and exposes the shader uniforms as QML properties.")
}
}
diff --git a/examples/quick/scenegraph/custommaterial/shaders/mandelbrot.frag b/examples/quick/scenegraph/custommaterial/shaders/mandelbrot.frag
index 0e5f63e7a8..72d63bb32c 100644
--- a/examples/quick/scenegraph/custommaterial/shaders/mandelbrot.frag
+++ b/examples/quick/scenegraph/custommaterial/shaders/mandelbrot.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
//! [1]
#version 440
@@ -27,21 +30,30 @@ void main()
c.x = (vTexCoord.x - 0.5) / ubuf.zoom + ubuf.center.x;
c.y = aspect_ratio * (vTexCoord.y - 0.5) / ubuf.zoom + ubuf.center.y;
- int i;
+ int iLast;
z = c;
- for (i = 0; i < ubuf.limit; i++) {
+ for (int i = 0; i < 1000000; i++) {
+ if (i >= ubuf.limit)
+ {
+ iLast = i;
+ break;
+ }
float x = (z.x * z.x - z.y * z.y) + c.x;
float y = (z.y * z.x + z.x * z.y) + c.y;
- if ((x * x + y * y) > 4.0) break;
+ if ((x * x + y * y) > 4.0)
+ {
+ iLast = i;
+ break;
+ }
z.x = x;
z.y = y;
}
- if (i == ubuf.limit) {
+ if (iLast == ubuf.limit) {
fragColor = vec4(0.0, 0.0, 0.0, 1.0);
} else {
- float f = (i * 1.0) / ubuf.limit;
+ float f = (iLast * 1.0) / ubuf.limit;
fragColor = mix(color1, color2, sqrt(f));
}
}
diff --git a/examples/quick/scenegraph/custommaterial/shaders/mandelbrot.frag.qsb b/examples/quick/scenegraph/custommaterial/shaders/mandelbrot.frag.qsb
index 550c0377ae..97ec1c2633 100644
--- a/examples/quick/scenegraph/custommaterial/shaders/mandelbrot.frag.qsb
+++ b/examples/quick/scenegraph/custommaterial/shaders/mandelbrot.frag.qsb
Binary files differ
diff --git a/examples/quick/scenegraph/custommaterial/shaders/mandelbrot.vert.qsb b/examples/quick/scenegraph/custommaterial/shaders/mandelbrot.vert.qsb
index ba2904d1c9..37105cfe60 100644
--- a/examples/quick/scenegraph/custommaterial/shaders/mandelbrot.vert.qsb
+++ b/examples/quick/scenegraph/custommaterial/shaders/mandelbrot.vert.qsb
Binary files differ
diff --git a/examples/quick/scenegraph/customrendernode/CMakeLists.txt b/examples/quick/scenegraph/customrendernode/CMakeLists.txt
new file mode 100644
index 0000000000..c00f019839
--- /dev/null
+++ b/examples/quick/scenegraph/customrendernode/CMakeLists.txt
@@ -0,0 +1,54 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(customrendernode LANGUAGES CXX)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick ShaderTools)
+
+qt_standard_project_setup()
+
+qt_add_executable(customrendernode WIN32 MACOSX_BUNDLE
+ main.cpp
+ customrender.cpp customrender.h
+)
+
+target_link_libraries(customrendernode PRIVATE
+ Qt6::Core
+ Qt6::GuiPrivate
+ Qt6::Qml
+ Qt6::Quick
+)
+
+qt_add_qml_module(customrendernode
+ URI SceneGraphRendering
+ QML_FILES
+ main.qml
+ RESOURCE_PREFIX /scenegraph/customrendernode
+ NO_RESOURCE_TARGET_PATH
+)
+
+qt6_add_shaders(customrendernode "shaders"
+ # gl_VertexId is in earliest OpenGL ES 3.00, and GLSL 130
+ GLSL "300 es,130"
+ PREFIX
+ "/scenegraph/customrendernode"
+ FILES
+ "shaders/customrender.vert"
+ "shaders/customrender.frag"
+)
+
+install(TARGETS customrendernode
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET customrendernode
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/scenegraph/customrendernode/customrender.cpp b/examples/quick/scenegraph/customrendernode/customrender.cpp
new file mode 100644
index 0000000000..ff5274c163
--- /dev/null
+++ b/examples/quick/scenegraph/customrendernode/customrender.cpp
@@ -0,0 +1,214 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include "customrender.h"
+#include <QSGTextureProvider>
+#include <QSGRenderNode>
+#include <QSGTransformNode>
+#include <QQuickWindow>
+#include <QFile>
+
+#include <rhi/qrhi.h>
+
+//![node]
+class CustomRenderNode : public QSGRenderNode
+{
+public:
+ CustomRenderNode(QQuickWindow *window);
+
+ void setVertices(const QList<QVector2D> &vertices);
+
+ void prepare() override;
+ void render(const RenderState *state) override;
+ void releaseResources() override;
+ RenderingFlags flags() const override;
+ QSGRenderNode::StateFlags changedStates() const override;
+
+protected:
+ QQuickWindow *m_window;
+ std::unique_ptr<QRhiBuffer> m_vertexBuffer;
+ std::unique_ptr<QRhiBuffer> m_uniformBuffer;
+ std::unique_ptr<QRhiShaderResourceBindings> m_resourceBindings;
+ std::unique_ptr<QRhiGraphicsPipeline> m_pipeline;
+ QList<QRhiShaderStage> m_shaders;
+ bool m_verticesDirty = true;
+ QList<QVector2D> m_vertices;
+};
+//![node]
+
+CustomRenderNode::CustomRenderNode(QQuickWindow *window)
+ : m_window(window)
+{
+ QFile file;
+ file.setFileName(":/scenegraph/customrendernode/shaders/customrender.vert.qsb");
+ if (!file.open(QFile::ReadOnly))
+ qFatal("Failed to load vertex shader");
+ m_shaders.append(QRhiShaderStage(QRhiShaderStage::Vertex, QShader::fromSerialized(file.readAll())));
+
+ file.close();
+ file.setFileName(":/scenegraph/customrendernode/shaders/customrender.frag.qsb");
+ if (!file.open(QFile::ReadOnly))
+ qFatal("Failed to load fragment shader");
+ m_shaders.append(QRhiShaderStage(QRhiShaderStage::Fragment, QShader::fromSerialized(file.readAll())));
+}
+
+void CustomRenderNode::setVertices(const QList<QVector2D> &vertices)
+{
+ if (m_vertices == vertices)
+ return;
+
+ m_verticesDirty = true;
+ m_vertices = vertices;
+
+ markDirty(QSGNode::DirtyGeometry);
+}
+
+//![node-release]
+void CustomRenderNode::releaseResources()
+{
+ m_vertexBuffer.reset();
+ m_uniformBuffer.reset();
+ m_pipeline.reset();
+ m_resourceBindings.reset();
+}
+//![node-release]
+
+//![node-flags]
+QSGRenderNode::RenderingFlags CustomRenderNode::flags() const
+{
+ // We are rendering 2D content directly into the scene graph using QRhi, no
+ // direct usage of a 3D API. Hence NoExternalRendering. This is a minor
+ // optimization.
+
+ // Additionally, the node takes the item transform into account by relying
+ // on projectionMatrix() and matrix() (see prepare()) and never rendering at
+ // other Z coordinates. Hence DepthAwareRendering. This is a potentially
+ // bigger optimization.
+
+ return QSGRenderNode::NoExternalRendering | QSGRenderNode::DepthAwareRendering;
+}
+//![node-flags]
+
+QSGRenderNode::StateFlags CustomRenderNode::changedStates() const
+{
+ // In Qt 6 only ViewportState and ScissorState matter, the rest is ignored.
+ return QSGRenderNode::StateFlag::ViewportState | QSGRenderNode::StateFlag::CullState;
+}
+
+//![node-prepare]
+void CustomRenderNode::prepare()
+{
+ QRhi *rhi = m_window->rhi();
+ QRhiResourceUpdateBatch *resourceUpdates = rhi->nextResourceUpdateBatch();
+
+ if (m_verticesDirty) {
+ m_vertexBuffer.reset();
+ m_verticesDirty = false;
+ }
+
+ if (!m_vertexBuffer) {
+ m_vertexBuffer.reset(rhi->newBuffer(QRhiBuffer::Immutable, QRhiBuffer::VertexBuffer,
+ m_vertices.count() * sizeof(QVector2D)));
+ m_vertexBuffer->create();
+ resourceUpdates->uploadStaticBuffer(m_vertexBuffer.get(), m_vertices.constData());
+ }
+//![node-prepare]
+ if (!m_uniformBuffer) {
+ m_uniformBuffer.reset(rhi->newBuffer(QRhiBuffer::Dynamic, QRhiBuffer::UniformBuffer, 68));
+ m_uniformBuffer->create();
+ }
+
+ if (!m_resourceBindings) {
+ m_resourceBindings.reset(rhi->newShaderResourceBindings());
+ m_resourceBindings->setBindings({ QRhiShaderResourceBinding::uniformBuffer(
+ 0,
+ QRhiShaderResourceBinding::VertexStage | QRhiShaderResourceBinding::FragmentStage,
+ m_uniformBuffer.get()) });
+ m_resourceBindings->create();
+ }
+
+ if (!m_pipeline) {
+ m_pipeline.reset(rhi->newGraphicsPipeline());
+
+ // If layer.enabled == true on our QQuickItem, the rendering face is flipped for
+ // backends with isYUpInFrameBuffer == true (OpenGL). This does not happen with
+ // RHI backends with isYUpInFrameBuffer == false. We swap the triangle winding
+ // order to work around this.
+ m_pipeline->setFrontFace(renderTarget()->resourceType() == QRhiResource::TextureRenderTarget
+ && rhi->isYUpInFramebuffer()
+ ? QRhiGraphicsPipeline::CW
+ : QRhiGraphicsPipeline::CCW);
+ m_pipeline->setCullMode(QRhiGraphicsPipeline::Back);
+ m_pipeline->setTopology(QRhiGraphicsPipeline::TriangleStrip);
+ QRhiGraphicsPipeline::TargetBlend blend;
+ blend.enable = true;
+ m_pipeline->setTargetBlends({ blend });
+ m_pipeline->setShaderResourceBindings(m_resourceBindings.get());
+ m_pipeline->setShaderStages(m_shaders.cbegin(), m_shaders.cend());
+ m_pipeline->setDepthTest(true);
+ QRhiVertexInputLayout inputLayout;
+ inputLayout.setBindings({ { 2 * sizeof(float) } });
+ inputLayout.setAttributes({ { 0, 0, QRhiVertexInputAttribute::Float2, 0 } });
+ m_pipeline->setVertexInputLayout(inputLayout);
+ m_pipeline->setRenderPassDescriptor(renderTarget()->renderPassDescriptor());
+ m_pipeline->create();
+ }
+
+ const QMatrix4x4 mvp = *projectionMatrix() * *matrix();
+ const float opacity = inheritedOpacity();
+
+ resourceUpdates->updateDynamicBuffer(m_uniformBuffer.get(), 0, 64, mvp.constData());
+ resourceUpdates->updateDynamicBuffer(m_uniformBuffer.get(), 64, 4, &opacity);
+ commandBuffer()->resourceUpdate(resourceUpdates);
+}
+
+//![node-render]
+void CustomRenderNode::render(const RenderState *)
+{
+ QRhiCommandBuffer *cb = commandBuffer();
+ cb->setGraphicsPipeline(m_pipeline.get());
+ QSize renderTargetSize = renderTarget()->pixelSize();
+ cb->setViewport(QRhiViewport(0, 0, renderTargetSize.width(), renderTargetSize.height()));
+ cb->setShaderResources();
+ QRhiCommandBuffer::VertexInput vertexBindings[] = { { m_vertexBuffer.get(), 0 } };
+ cb->setVertexInput(0, 1, vertexBindings);
+ cb->draw(m_vertices.count());
+}
+//![node-render]
+
+//![item-ctor]
+CustomRender::CustomRender(QQuickItem *parent)
+ : QQuickItem(parent)
+{
+ setFlag(ItemHasContents, true);
+ connect(this, &CustomRender::verticesChanged, this, &CustomRender::update);
+}
+//![item-ctor]
+
+QList<QVector2D> CustomRender::vertices() const
+{
+ return m_vertices;
+}
+
+void CustomRender::setVertices(const QList<QVector2D> &newVertices)
+{
+ if (m_vertices == newVertices)
+ return;
+
+ m_vertices = newVertices;
+ emit verticesChanged();
+}
+
+//![item-update]
+QSGNode *CustomRender::updatePaintNode(QSGNode *old, UpdatePaintNodeData *)
+{
+ CustomRenderNode *node = static_cast<CustomRenderNode *>(old);
+
+ if (!node)
+ node = new CustomRenderNode(window());
+
+ node->setVertices(m_vertices);
+
+ return node;
+}
+//![item-update]
diff --git a/examples/quick/scenegraph/customrendernode/customrender.h b/examples/quick/scenegraph/customrendernode/customrender.h
new file mode 100644
index 0000000000..530e692678
--- /dev/null
+++ b/examples/quick/scenegraph/customrendernode/customrender.h
@@ -0,0 +1,34 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#ifndef CUSTOMRENDER_H
+#define CUSTOMRENDER_H
+
+#include <QQuickItem>
+#include <QVector2D>
+
+//![item]
+class CustomRender : public QQuickItem
+{
+ Q_OBJECT
+ Q_PROPERTY(QList<QVector2D> vertices READ vertices WRITE setVertices NOTIFY verticesChanged)
+ QML_ELEMENT
+
+public:
+ explicit CustomRender(QQuickItem *parent = nullptr);
+
+ QList<QVector2D> vertices() const;
+ void setVertices(const QList<QVector2D> &newVertices);
+
+signals:
+ void verticesChanged();
+
+protected:
+ QSGNode *updatePaintNode(QSGNode *old, UpdatePaintNodeData *) override;
+
+private:
+ QList<QVector2D> m_vertices;
+};
+//![item]
+
+#endif // CUSTOMRENDER_H
diff --git a/examples/quick/scenegraph/customrendernode/doc/images/customrendernode-example.jpg b/examples/quick/scenegraph/customrendernode/doc/images/customrendernode-example.jpg
new file mode 100644
index 0000000000..db4b50bbc0
--- /dev/null
+++ b/examples/quick/scenegraph/customrendernode/doc/images/customrendernode-example.jpg
Binary files differ
diff --git a/examples/quick/scenegraph/customrendernode/doc/src/customrendernode.qdoc b/examples/quick/scenegraph/customrendernode/doc/src/customrendernode.qdoc
new file mode 100644
index 0000000000..3e3dd7d023
--- /dev/null
+++ b/examples/quick/scenegraph/customrendernode/doc/src/customrendernode.qdoc
@@ -0,0 +1,128 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+
+/*!
+ \example scenegraph/customrendernode
+ \title Scene Graph - Custom QSGRenderNode
+ \examplecategory {Graphics}
+ \ingroup qtquickexamples
+ \brief Shows how to use QSGRenderNode to implement custom rendering in the Qt Quick scenegraph.
+
+ The custom render node example shows how to implement a QQuickItem subclass
+ that is backed by a scene graph node derived from QSGRenderNode, providing
+ it's own QRhi-based rendering.
+
+ \image customrendernode-example.jpg
+
+ \note This example demonstrates advanced, low-level functionality performing
+ portable, cross-platform 3D rendering, while relying on APIs with limited
+ compatibility guarantee from the Qt Gui module. To be able to use the QRhi
+ APIs, the application links to \c{Qt::GuiPrivate} and includes
+ \c{<rhi/qrhi.h>}.
+
+ QSGRenderNode allows direct access to the Render Hardware Interface (RHI)
+ within the scenegraph. This example demonstrates how to create QSGRenderNode
+ based render node and manage it with a custom item. The render node creates
+ an RHI pipeline, updates vertex and uniform buffers, and renders into the
+ RHI command buffer.
+
+ In practice this is a portable, cross-platform approach to perform custom
+ rendering inline with the scenegraph's own rendering, without resorting to a
+ native 3D API such as OpenGL, Metal, or Vulkan. Rather, the application uses
+ Qt's graphics and shader abstraction layer.
+
+ QSGRenderNode is the enabler for one of the three ways to integrate custom
+ 2D/3D rendering into a Qt Quick scene. The other two options are to perform
+ the rendering \c before or \c after the Qt Quick scene's own rendering,
+ or to generate a whole separate render pass targeting a dedicated render
+ target (a texture) and then have an item in the scene display the texture.
+ The QSGRenderNode-based approach is similar to the former, in the sense
+ that no additional render passes or render targets are involved, and allows
+ injecting custom rendering commands "inline" with the Qt Quick scene's
+ own rendering.
+
+ Refer to the following examples for these three approaches:
+
+ \list
+
+ \li \l{Scene Graph - RHI Under QML} - Demonstrates an "underlay" approach
+ based on the \l{QQuickWindow::beforeRendering()} signal. No additional
+ render pass and resources are needed, but composition and blending with the
+ rest of the Qt Quick scene is quite limited. Rendering "under" or "over" the
+ Qt Quick scene is the simplest approach.
+
+ \li \l{Scene Graph - RHI Texture Item} - Demonstrates creating a custom
+ QQuickItem that renders into a texture and displays a quad textured with the
+ generated content. This is very flexible and allows complete blending and
+ composition of the resulting 2D image with the rest of the Qt Quick scene.
+ That comes at the expense of an additional render pass and render target.
+
+ \li This example - Demonstrates the "inline" approach, where the Qt Quick
+ scene graph calls into the custom item and node implementation during the
+ main render pass. This approach can be great for performance (no extra
+ render passes, texturing, and blending are involved), but has potential
+ pitfalls and is the most complicated method.
+
+ \endlist
+
+ The custom item derives from QQuickItem. Most importantly, it reimplements
+ \l{QQuickItem::}{updatePaintNode()}.
+
+ \snippet scenegraph/customrendernode/customrender.h item
+
+ The constructor sets the \l{QQuickItem::}{ItemHasContents} flag to indicate
+ that this is a visual item.
+
+ \snippet scenegraph/customrendernode/customrender.cpp item-ctor
+
+ The updatePaintNode() implementation creates an instance of the custom
+ scenegraph node, if not yet done. The backing QSGNode tree for this item
+ consists of a single node, an instance of a QSGRenderNode-derived class.
+ When Qt Quick's threaded rendering model is in use, this function is called
+ on the render thread with the main thread blocked. That is why it is safe to
+ access main thread data (such as data stored in QQuickItems). The node, the
+ instance of the QSGRenderNode subclass, is going to "live on" the render
+ thread.
+
+ \snippet scenegraph/customrendernode/customrender.cpp item-update
+
+ The \c CustomRenderNode class derives from QSGRenderNode, reimplementing a
+ number of virtual functions. To manage QRhi resources (buffers, pipelines,
+ etc.), smart pointers are quite useful in this case, because the node is
+ destroyed by the scene graph together with the rest of the scene on the
+ render thread (if there is one) while the QRhi is still available, and
+ therefore releasing resources from the destructor or via smart pointers is
+ legal and safe.
+
+ \snippet scenegraph/customrendernode/customrender.cpp node
+
+ Well-behaving QSGRenderNode subclasses also reimplement
+ \l{QSGRenderNode::}{releaseResources()}, which in this case can be a simple
+ set of reset() calls.
+
+ \snippet scenegraph/customrendernode/customrender.cpp node-release
+
+ This QSGRenderNode is performing its rendering through the QRhi APIs (and
+ not directly through OpenGL, Vulkan, Metal, etc.), and it takes the item
+ transform into account (as it only really does 2D rendering). Hence
+ specifying the appropriate flags, which may bring a small performance
+ improvement.
+
+ \snippet scenegraph/customrendernode/customrender.cpp node-flags
+
+ The prepare() and render() functions are called every time the Qt Quick
+ scene renders. The first is called when preparing (but not yet recording)
+ the render pass. This typically creates resources, such as buffers,
+ textures, and graphics pipelines, if not yet done, and enqueues uploading
+ data to them.
+
+ \snippet scenegraph/customrendernode/customrender.cpp node-prepare
+
+ The render() function is called while the recording of a render pass,
+ targeting either the QQuickWindow's swapchain, or a texture (in case of
+ layered items, or when within a ShaderEffectSource), is active.
+
+ \snippet scenegraph/customrendernode/customrender.cpp node-render
+
+ \sa QSGRenderNode, QRhi, {Scene Graph - RHI Under QML}, {Scene Graph - RHI Texture Item}, {Qt Quick Scene Graph}
+*/
diff --git a/examples/quick/scenegraph/customrendernode/main.cpp b/examples/quick/scenegraph/customrendernode/main.cpp
new file mode 100644
index 0000000000..0ad93ec1de
--- /dev/null
+++ b/examples/quick/scenegraph/customrendernode/main.cpp
@@ -0,0 +1,56 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include <QGuiApplication>
+#include <QQuickView>
+#include <QSurfaceFormat>
+
+int main(int argc, char **argv)
+{
+ QGuiApplication app(argc, argv);
+
+ // On macOS, request a core profile context in the unlikely case of using OpenGL.
+#ifdef Q_OS_MACOS
+ QSurfaceFormat format = QSurfaceFormat::defaultFormat();
+ format.setMajorVersion(4);
+ format.setMinorVersion(1);
+ format.setProfile(QSurfaceFormat::CoreProfile);
+ QSurfaceFormat::setDefaultFormat(format);
+#endif
+
+ QQuickView view;
+
+ view.setResizeMode(QQuickView::SizeRootObjectToView);
+ view.setSource(QUrl("qrc:///scenegraph/customrendernode/main.qml"));
+ view.setColor(Qt::black);
+ view.show();
+
+ QString api;
+ switch (view.graphicsApi()) {
+ case QSGRendererInterface::OpenGL:
+ api = "RHI OpenGL";
+ break;
+ case QSGRendererInterface::Direct3D11:
+ api = "RHI Direct 3D 11";
+ break;
+ case QSGRendererInterface::Direct3D12:
+ api = "RHI Direct 3D 12";
+ break;
+ case QSGRendererInterface::Vulkan:
+ api = "RHI Vulkan";
+ break;
+ case QSGRendererInterface::Metal:
+ api = "RHI Metal";
+ break;
+ case QSGRendererInterface::Null:
+ api = "RHI Null";
+ break;
+ default:
+ api = "unknown";
+ break;
+ }
+
+ view.setTitle(QStringLiteral("Custom QSGRenderNode - ") + api);
+
+ return app.exec();
+}
diff --git a/examples/quick/scenegraph/customrendernode/main.qml b/examples/quick/scenegraph/customrendernode/main.qml
new file mode 100644
index 0000000000..6a098e47f7
--- /dev/null
+++ b/examples/quick/scenegraph/customrendernode/main.qml
@@ -0,0 +1,132 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import SceneGraphRendering
+
+Item {
+
+ id: root
+ width: 640
+ height: 480
+
+ SplitView {
+ anchors.fill: parent
+
+ Text {
+ text: qsTr("Direct")
+ color: 'white'
+ SplitView.preferredWidth: root.width/2
+
+ Loader {
+ anchors.fill: parent
+ sourceComponent: customComponent
+ }
+ }
+
+ Text {
+ text: qsTr("Layer")
+ color: 'white'
+ SplitView.preferredWidth: root.width/2
+
+ Loader {
+ anchors.fill: parent
+ sourceComponent: customComponent
+ onLoaded: item.custom.layer.enabled=true
+ }
+ }
+ }
+
+ Text {
+ id: description
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ anchors.margins: 20
+ wrapMode: Text.WordWrap
+ text: qsTr("This example creates a custom QQuickItem backed by a QSGRenderNode in the scene graph. " +
+ "The render node is placed in front of a red rectangle, and behind a white rectangle. " +
+ "Rendering is demonstrated directly into the scenegraph, and as a layered, texture-backed item (layer.enabled set to true). " +
+ "Opacity and rotation transform changes are exercised as well.")
+
+ Rectangle {
+ z:-1
+ anchors.fill: parent
+ anchors.margins: -10
+ color: 'white'
+ opacity: 0.5
+ radius: 10
+ }
+ }
+
+ Component {
+ id: customComponent
+
+ Item {
+ id: componentRoot
+ property alias custom: custom
+
+ Rectangle {
+ width: parent.width/5
+ height: parent.height/5
+ anchors.centerIn: parent
+ color: '#ff0000'
+ }
+
+ SequentialAnimation {
+ running: true
+ loops: Animation.Infinite
+
+ OpacityAnimator {
+ target: custom
+ from: 0
+ to: 1
+ duration: 3500
+ }
+ OpacityAnimator {
+ target: custom
+ from: 1
+ to: 0
+ duration: 3500
+ }
+ }
+
+ RotationAnimation {
+ target: custom
+ from: 0
+ to: 360
+ running: true
+ loops: Animation.Infinite
+ duration: 11000
+ }
+
+
+ Button {
+ text: qsTr("Toggle custom item visibility")
+ onClicked: custom.visible = !custom.visible
+ }
+
+ CustomRender {
+ id: custom
+ width: Math.min(parent.width, parent.height)
+ height: width
+ anchors.centerIn: parent
+
+ property real a: width/2
+ property real b: Math.sqrt(3.0)*a/2;
+ vertices: [Qt.vector2d(width/2 - a/2, height/2 + b/3),
+ Qt.vector2d(width/2 + a/2, height/2 + b/3),
+ Qt.vector2d(width/2, height/2 - b*2/3)]
+
+ }
+
+ Rectangle {
+ width: parent.width/10
+ height: parent.height/10
+ anchors.centerIn: parent
+ color: '#ffffff'
+ }
+ }
+ }
+}
diff --git a/examples/quick/scenegraph/customrendernode/shaders/customrender.frag b/examples/quick/scenegraph/customrendernode/shaders/customrender.frag
new file mode 100644
index 0000000000..d9586ba90e
--- /dev/null
+++ b/examples/quick/scenegraph/customrendernode/shaders/customrender.frag
@@ -0,0 +1,18 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#version 440
+
+layout(location = 0) in vec3 color;
+
+layout(location = 0) out vec4 fragColor;
+
+layout(std140, binding = 0) uniform buf {
+ mat4 qt_Matrix;
+ float qt_Opacity;
+};
+
+void main()
+{
+ fragColor = vec4(color, 1.0)*qt_Opacity;
+}
diff --git a/examples/quick/scenegraph/customrendernode/shaders/customrender.vert b/examples/quick/scenegraph/customrendernode/shaders/customrender.vert
new file mode 100644
index 0000000000..a61d6e2d71
--- /dev/null
+++ b/examples/quick/scenegraph/customrendernode/shaders/customrender.vert
@@ -0,0 +1,31 @@
+#version 440
+
+layout(location = 0) in vec2 vertex;
+
+layout(location = 0) out vec3 color;
+
+layout(std140, binding = 0) uniform buf {
+ mat4 qt_Matrix;
+ float qt_Opacity;
+};
+
+out gl_PerVertex { vec4 gl_Position; };
+
+void main()
+{
+
+ switch (gl_VertexIndex%3) {
+ case 0:
+ color = vec3(1.0, 0.0, 0.0);
+ break;
+ case 1:
+ color = vec3(0.0, 1.0, 0.0);
+ break;
+ case 2:
+ color = vec3(0.0, 0.0, 1.0);
+ break;
+ }
+
+ gl_Position = qt_Matrix * vec4(vertex, 0.0, 1.0);
+
+}
diff --git a/examples/quick/scenegraph/d3d11underqml/CMakeLists.txt b/examples/quick/scenegraph/d3d11underqml/CMakeLists.txt
index b443ffb29f..dec029d8da 100644
--- a/examples/quick/scenegraph/d3d11underqml/CMakeLists.txt
+++ b/examples/quick/scenegraph/d3d11underqml/CMakeLists.txt
@@ -1,66 +1,54 @@
-# Generated from d3d11underqml.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(d3d11underqml LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/scenegraph/d3d11underqml")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Quick)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
qt_add_executable(d3d11underqml
d3d11squircle.cpp d3d11squircle.h
main.cpp
)
+
set_target_properties(d3d11underqml PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(d3d11underqml PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
d3d11
d3dcompiler
)
-
-# Resources:
-set(d3d11underqml_resource_files
- "main.qml"
- "squircle.frag"
- "squircle.vert"
-)
-
-qt6_add_resources(d3d11underqml "d3d11underqml"
- PREFIX
- "/scenegraph/d3d11underqml"
- FILES
- ${d3d11underqml_resource_files}
+qt_add_qml_module(d3d11underqml
+ URI D3D11UnderQML
+ QML_FILES
+ main.qml
+ RESOURCES
+ squircle.frag
+ squircle.vert
+ RESOURCE_PREFIX /scenegraph/d3d11underqml
+ NO_RESOURCE_TARGET_PATH
)
install(TARGETS d3d11underqml
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-set_target_properties(d3d11underqml PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI D3D11UnderQML
+qt_generate_deploy_qml_app_script(
+ TARGET d3d11underqml
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
-
-qt6_qml_type_registration(d3d11underqml)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/scenegraph/d3d11underqml/d3d11squircle.cpp b/examples/quick/scenegraph/d3d11underqml/d3d11squircle.cpp
index 9acfbfff23..eb2eea85b4 100644
--- a/examples/quick/scenegraph/d3d11underqml/d3d11squircle.cpp
+++ b/examples/quick/scenegraph/d3d11underqml/d3d11squircle.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "d3d11squircle.h"
#include <QtCore/QFile>
@@ -210,7 +163,7 @@ void SquircleRenderer::frameStart()
QSGRendererInterface *rif = m_window->rendererInterface();
// We are not prepared for anything other than running with the RHI and its D3D11 backend.
- Q_ASSERT(rif->graphicsApi() == QSGRendererInterface::Direct3D11Rhi);
+ Q_ASSERT(rif->graphicsApi() == QSGRendererInterface::Direct3D11);
m_device = reinterpret_cast<ID3D11Device *>(rif->getResource(m_window, QSGRendererInterface::DeviceResource));
Q_ASSERT(m_device);
diff --git a/examples/quick/scenegraph/d3d11underqml/d3d11squircle.h b/examples/quick/scenegraph/d3d11underqml/d3d11squircle.h
index f009dd4248..211ebf68f8 100644
--- a/examples/quick/scenegraph/d3d11underqml/d3d11squircle.h
+++ b/examples/quick/scenegraph/d3d11underqml/d3d11squircle.h
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef D3D11SQUIRCLE_H
#define D3D11SQUIRCLE_H
diff --git a/examples/quick/scenegraph/d3d11underqml/doc/src/d3d11underqml.qdoc b/examples/quick/scenegraph/d3d11underqml/doc/src/d3d11underqml.qdoc
index 1f0c15e1c6..3d5a171d49 100644
--- a/examples/quick/scenegraph/d3d11underqml/doc/src/d3d11underqml.qdoc
+++ b/examples/quick/scenegraph/d3d11underqml/doc/src/d3d11underqml.qdoc
@@ -1,33 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\example scenegraph/d3d11underqml
\title Scene Graph - Direct3D 11 Under QML
+ \examplecategory {Graphics}
\ingroup qtquickexamples
\brief Shows how to render directly with Direct3D 11 under a Qt Quick scene.
diff --git a/examples/quick/scenegraph/d3d11underqml/main.cpp b/examples/quick/scenegraph/d3d11underqml/main.cpp
index f2a224c1a2..f26f9b5fc2 100644
--- a/examples/quick/scenegraph/d3d11underqml/main.cpp
+++ b/examples/quick/scenegraph/d3d11underqml/main.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QGuiApplication>
#include <QtQuick/QQuickView>
@@ -56,12 +9,12 @@ int main(int argc, char **argv)
{
QGuiApplication app(argc, argv);
- QQuickWindow::setGraphicsApi(QSGRendererInterface::Direct3D11Rhi);
+ QQuickWindow::setGraphicsApi(QSGRendererInterface::Direct3D11);
QQuickView view;
view.setResizeMode(QQuickView::SizeRootObjectToView);
view.setSource(QUrl("qrc:///scenegraph/d3d11underqml/main.qml"));
view.show();
- return app.exec();
+ return QGuiApplication::exec();
}
diff --git a/examples/quick/scenegraph/d3d11underqml/main.qml b/examples/quick/scenegraph/d3d11underqml/main.qml
index da128bead6..939f42cd26 100644
--- a/examples/quick/scenegraph/d3d11underqml/main.qml
+++ b/examples/quick/scenegraph/d3d11underqml/main.qml
@@ -1,56 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//! [1]
-import QtQuick 2.0
-import D3D11UnderQML 1.0
+import QtQuick
+import D3D11UnderQML
Item {
diff --git a/examples/quick/scenegraph/d3d11underqml/squircle.frag b/examples/quick/scenegraph/d3d11underqml/squircle.frag
index a907c84e58..713b2d89f2 100644
--- a/examples/quick/scenegraph/d3d11underqml/squircle.frag
+++ b/examples/quick/scenegraph/d3d11underqml/squircle.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
cbuffer buf : register(b0)
{
float ubuf_t : packoffset(c0);
diff --git a/examples/quick/scenegraph/fboitem/CMakeLists.txt b/examples/quick/scenegraph/fboitem/CMakeLists.txt
deleted file mode 100644
index a9c460b228..0000000000
--- a/examples/quick/scenegraph/fboitem/CMakeLists.txt
+++ /dev/null
@@ -1,68 +0,0 @@
-# Generated from fboitem.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(fboitem LANGUAGES CXX)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/scenegraph/fboitem")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Quick)
-
-qt_add_executable(fboitem
- ../shared/logorenderer.cpp ../shared/logorenderer.h
- fboinsgrenderer.cpp fboinsgrenderer.h
- main.cpp
-)
-set_target_properties(fboitem PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_include_directories(fboitem PUBLIC
- ../shared
-)
-
-target_link_libraries(fboitem PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-
-# Resources:
-set(fboitem_resource_files
- "main.qml"
- "shaders/checker.frag.qsb"
-)
-
-qt6_add_resources(fboitem "fboitem"
- PREFIX
- "/scenegraph/fboitem"
- FILES
- ${fboitem_resource_files}
-)
-
-install(TARGETS fboitem
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
-
-set_target_properties(fboitem PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI SceneGraphRendering
-)
-
-qt6_qml_type_registration(fboitem)
diff --git a/examples/quick/scenegraph/fboitem/doc/images/fboitem-example.jpg b/examples/quick/scenegraph/fboitem/doc/images/fboitem-example.jpg
deleted file mode 100644
index 306b8bab20..0000000000
--- a/examples/quick/scenegraph/fboitem/doc/images/fboitem-example.jpg
+++ /dev/null
Binary files differ
diff --git a/examples/quick/scenegraph/fboitem/doc/src/fboitem.qdoc b/examples/quick/scenegraph/fboitem/doc/src/fboitem.qdoc
deleted file mode 100644
index b5add02991..0000000000
--- a/examples/quick/scenegraph/fboitem/doc/src/fboitem.qdoc
+++ /dev/null
@@ -1,36 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \example scenegraph/fboitem
- \title Scene Graph - Rendering FBOs
- \ingroup qtquickexamples
-
- \brief Shows how to use FramebufferObjects with Qt Quick.
-
- \image fboitem-example.jpg
- */
diff --git a/examples/quick/scenegraph/fboitem/fboinsgrenderer.cpp b/examples/quick/scenegraph/fboitem/fboinsgrenderer.cpp
deleted file mode 100644
index 1c7be258be..0000000000
--- a/examples/quick/scenegraph/fboitem/fboinsgrenderer.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-#include "fboinsgrenderer.h"
-#include "logorenderer.h"
-
-#include <QOpenGLFramebufferObject>
-
-#include <QtQuick/QQuickWindow>
-#include <qsgsimpletexturenode.h>
-
-class LogoInFboRenderer : public QQuickFramebufferObject::Renderer
-{
-public:
- LogoInFboRenderer()
- {
- logo.initialize();
- }
-
- void render() override {
- logo.render();
- update();
- }
-
- QOpenGLFramebufferObject *createFramebufferObject(const QSize &size) override {
- QOpenGLFramebufferObjectFormat format;
- format.setAttachment(QOpenGLFramebufferObject::CombinedDepthStencil);
- format.setSamples(4);
- return new QOpenGLFramebufferObject(size, format);
- }
-
- LogoRenderer logo;
-};
-
-QQuickFramebufferObject::Renderer *FboInSGRenderer::createRenderer() const
-{
- return new LogoInFboRenderer();
-}
diff --git a/examples/quick/scenegraph/fboitem/fboinsgrenderer.h b/examples/quick/scenegraph/fboitem/fboinsgrenderer.h
deleted file mode 100644
index 1b92b56851..0000000000
--- a/examples/quick/scenegraph/fboitem/fboinsgrenderer.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-#ifndef FBOINSGRENDERER_H
-#define FBOINSGRENDERER_H
-
-#include <QtQuick/QQuickFramebufferObject>
-
-class LogoRenderer;
-
-class FboInSGRenderer : public QQuickFramebufferObject
-{
- Q_OBJECT
- QML_NAMED_ELEMENT(Renderer)
-public:
- Renderer *createRenderer() const;
-};
-
-#endif
diff --git a/examples/quick/scenegraph/fboitem/fboitem.pro b/examples/quick/scenegraph/fboitem/fboitem.pro
deleted file mode 100644
index 180c2288e2..0000000000
--- a/examples/quick/scenegraph/fboitem/fboitem.pro
+++ /dev/null
@@ -1,20 +0,0 @@
-QT += qml quick
-
-CONFIG += qmltypes
-QML_IMPORT_NAME = SceneGraphRendering
-QML_IMPORT_MAJOR_VERSION = 1
-
-HEADERS += fboinsgrenderer.h
-SOURCES += fboinsgrenderer.cpp main.cpp
-
-INCLUDEPATH += ../shared
-HEADERS += ../shared/logorenderer.h
-SOURCES += ../shared/logorenderer.cpp
-
-RESOURCES += fboitem.qrc
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/scenegraph/fboitem
-INSTALLS += target
-
-OTHER_FILES += \
- main.qml
diff --git a/examples/quick/scenegraph/fboitem/fboitem.qrc b/examples/quick/scenegraph/fboitem/fboitem.qrc
deleted file mode 100644
index 1782429798..0000000000
--- a/examples/quick/scenegraph/fboitem/fboitem.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<RCC>
- <qresource prefix="/scenegraph/fboitem">
- <file>main.qml</file>
- <file>shaders/checker.frag.qsb</file>
- </qresource>
-</RCC>
diff --git a/examples/quick/scenegraph/fboitem/main.cpp b/examples/quick/scenegraph/fboitem/main.cpp
deleted file mode 100644
index 61510cdb93..0000000000
--- a/examples/quick/scenegraph/fboitem/main.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-#include <QGuiApplication>
-
-#include <QtQuick/QQuickView>
-
-#include "fboinsgrenderer.h"
-
-int main(int argc, char **argv)
-{
- QGuiApplication app(argc, argv);
-
- QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi);
-
- QQuickView view;
- view.setResizeMode(QQuickView::SizeRootObjectToView);
- view.setSource(QUrl("qrc:///scenegraph/fboitem/main.qml"));
- view.show();
-
- return app.exec();
-}
diff --git a/examples/quick/scenegraph/fboitem/main.qml b/examples/quick/scenegraph/fboitem/main.qml
deleted file mode 100644
index 02a2ae22d6..0000000000
--- a/examples/quick/scenegraph/fboitem/main.qml
+++ /dev/null
@@ -1,129 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-import SceneGraphRendering 1.0
-
-Item {
- width: 400
- height: 400
-
- // The checkers background
- ShaderEffect {
- id: tileBackground
- anchors.fill: parent
-
- property real tileSize: 16
- property color color1: Qt.rgba(0.9, 0.9, 0.9, 1);
- property color color2: Qt.rgba(0.85, 0.85, 0.85, 1);
-
- property size pixelSize: Qt.size(width / tileSize, height / tileSize);
-
- fragmentShader: "qrc:/scenegraph/fboitem/shaders/checker.frag.qsb"
- }
-
- Renderer {
- id: renderer
- anchors.fill: parent
- anchors.margins: 10
-
- // The transform is just to show something interesting..
- transform: [
- Rotation { id: rotation; axis.x: 0; axis.z: 0; axis.y: 1; angle: 0; origin.x: renderer.width / 2; origin.y: renderer.height / 2; },
- Translate { id: txOut; x: -renderer.width / 2; y: -renderer.height / 2 },
- Scale { id: scale; },
- Translate { id: txIn; x: renderer.width / 2; y: renderer.height / 2 }
- ]
- }
-
- // Just to show something interesting
- SequentialAnimation {
- PauseAnimation { duration: 5000 }
- ParallelAnimation {
- NumberAnimation { target: scale; property: "xScale"; to: 0.6; duration: 1000; easing.type: Easing.InOutBack }
- NumberAnimation { target: scale; property: "yScale"; to: 0.6; duration: 1000; easing.type: Easing.InOutBack }
- }
- NumberAnimation { target: rotation; property: "angle"; to: 80; duration: 1000; easing.type: Easing.InOutCubic }
- NumberAnimation { target: rotation; property: "angle"; to: -80; duration: 1000; easing.type: Easing.InOutCubic }
- NumberAnimation { target: rotation; property: "angle"; to: 0; duration: 1000; easing.type: Easing.InOutCubic }
- NumberAnimation { target: renderer; property: "opacity"; to: 0.5; duration: 1000; easing.type: Easing.InOutCubic }
- PauseAnimation { duration: 1000 }
- NumberAnimation { target: renderer; property: "opacity"; to: 0.8; duration: 1000; easing.type: Easing.InOutCubic }
- ParallelAnimation {
- NumberAnimation { target: scale; property: "xScale"; to: 1; duration: 1000; easing.type: Easing.InOutBack }
- NumberAnimation { target: scale; property: "yScale"; to: 1; duration: 1000; easing.type: Easing.InOutBack }
- }
- running: true
- loops: Animation.Infinite
- }
-
- Rectangle {
- id: labelFrame
- anchors.margins: -10
- radius: 5
- color: "white"
- border.color: "black"
- opacity: 0.8
- anchors.fill: label
- }
-
- Text {
- id: label
- anchors.bottom: renderer.bottom
- anchors.left: renderer.left
- anchors.right: renderer.right
- anchors.margins: 20
- wrapMode: Text.WordWrap
- text: "The blue rectangle with the vintage 'Q' is an FBO, rendered by the application on the scene graph rendering thread. The FBO is managed and displayed using the QQuickFramebufferObject convenience class."
- }
-
-
-}
diff --git a/examples/quick/scenegraph/fboitem/shaders/checker.frag b/examples/quick/scenegraph/fboitem/shaders/checker.frag
deleted file mode 100644
index 1e4131d026..0000000000
--- a/examples/quick/scenegraph/fboitem/shaders/checker.frag
+++ /dev/null
@@ -1,22 +0,0 @@
-#version 440
-
-layout(std140, binding = 0) uniform buf {
- mat4 qt_Matrix;
- float qt_Opacity;
-
- vec4 color1;
- vec4 color2;
- vec2 pixelSize;
-} ubuf;
-
-layout(location = 0) in vec2 qt_TexCoord0;
-layout(location = 0) out vec4 fragColor;
-
-void main()
-{
- vec2 tc = sign(sin(3.14159265358979323846 * qt_TexCoord0 * ubuf.pixelSize));
- if (tc.x != tc.y)
- fragColor = ubuf.color1;
- else
- fragColor = ubuf.color2;
-}
diff --git a/examples/quick/scenegraph/fboitem/shaders/checker.frag.qsb b/examples/quick/scenegraph/fboitem/shaders/checker.frag.qsb
deleted file mode 100644
index 77cbf0b867..0000000000
--- a/examples/quick/scenegraph/fboitem/shaders/checker.frag.qsb
+++ /dev/null
Binary files differ
diff --git a/examples/quick/scenegraph/graph/CMakeLists.txt b/examples/quick/scenegraph/graph/CMakeLists.txt
index 6066a58499..36d8c34f19 100644
--- a/examples/quick/scenegraph/graph/CMakeLists.txt
+++ b/examples/quick/scenegraph/graph/CMakeLists.txt
@@ -1,67 +1,56 @@
-# Generated from graph.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(graph LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Quick)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup()
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/scenegraph/graph")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-
-qt_add_executable(graph
+qt_add_executable(graph WIN32 MACOSX_BUNDLE
graph.cpp graph.h
gridnode.cpp gridnode.h
linenode.cpp linenode.h
main.cpp
noisynode.cpp noisynode.h
)
+
set_target_properties(graph PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
+ # Prevent name clash with build subdirectory on case-insensitive file systems
+ OUTPUT_NAME graphapp
)
-target_link_libraries(graph PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Quick
-)
-
-# Resources:
-set(graph_resource_files
- "main.qml"
- "shaders/line.frag.qsb"
- "shaders/line.vert.qsb"
- "shaders/noisy.frag.qsb"
- "shaders/noisy.vert.qsb"
+target_link_libraries(graph PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Quick
)
-qt6_add_resources(graph "graph"
- PREFIX
- "/scenegraph/graph"
- FILES
- ${graph_resource_files}
+qt_add_qml_module(graph
+ URI Graph
+ QML_FILES
+ main.qml
+ RESOURCES
+ shaders/line.frag.qsb
+ shaders/line.vert.qsb
+ shaders/noisy.frag.qsb
+ shaders/noisy.vert.qsb
+ RESOURCE_PREFIX /scenegraph/graph
+ NO_RESOURCE_TARGET_PATH
)
install(TARGETS graph
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-set_target_properties(graph PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI Graph
+qt_generate_deploy_qml_app_script(
+ TARGET graph
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
-
-qt6_qml_type_registration(graph)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/scenegraph/graph/doc/src/graph.qdoc b/examples/quick/scenegraph/graph/doc/src/graph.qdoc
index dbf3391209..a76652498c 100644
--- a/examples/quick/scenegraph/graph/doc/src/graph.qdoc
+++ b/examples/quick/scenegraph/graph/doc/src/graph.qdoc
@@ -1,33 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\example scenegraph/graph
\title Scene Graph - Graph
+ \examplecategory {Graphics}
\ingroup qtquickexamples
\brief Demonstrates how one can combine custom materials and geometries
diff --git a/examples/quick/scenegraph/graph/graph.cpp b/examples/quick/scenegraph/graph/graph.cpp
index 2df1aca91b..b0ab519b12 100644
--- a/examples/quick/scenegraph/graph/graph.cpp
+++ b/examples/quick/scenegraph/graph/graph.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "graph.h"
diff --git a/examples/quick/scenegraph/graph/graph.h b/examples/quick/scenegraph/graph/graph.h
index 428f877049..50313f529a 100644
--- a/examples/quick/scenegraph/graph/graph.h
+++ b/examples/quick/scenegraph/graph/graph.h
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef GRAPH_H
#define GRAPH_H
diff --git a/examples/quick/scenegraph/graph/gridnode.cpp b/examples/quick/scenegraph/graph/gridnode.cpp
index 3597247cd4..8e434fe4ab 100644
--- a/examples/quick/scenegraph/graph/gridnode.cpp
+++ b/examples/quick/scenegraph/graph/gridnode.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "gridnode.h"
diff --git a/examples/quick/scenegraph/graph/gridnode.h b/examples/quick/scenegraph/graph/gridnode.h
index fa892d9169..7db26a3a8d 100644
--- a/examples/quick/scenegraph/graph/gridnode.h
+++ b/examples/quick/scenegraph/graph/gridnode.h
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef GRIDNODE_H
#define GRIDNODE_H
diff --git a/examples/quick/scenegraph/graph/linenode.cpp b/examples/quick/scenegraph/graph/linenode.cpp
index 74161c8040..751b78ef3d 100644
--- a/examples/quick/scenegraph/graph/linenode.cpp
+++ b/examples/quick/scenegraph/graph/linenode.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "linenode.h"
@@ -123,10 +76,8 @@ bool LineShader::updateUniformData(RenderState &state, QSGMaterial *newMaterial,
}
LineMaterial *mat = static_cast<LineMaterial *>(newMaterial);
- float c[4] = { float(mat->state.color.redF()),
- float(mat->state.color.greenF()),
- float(mat->state.color.blueF()),
- float(mat->state.color.alphaF()) };
+ float c[4];
+ mat->state.color.getRgbF(&c[0], &c[1], &c[2], &c[3]);
memcpy(buf->data() + 64, c, 16);
memcpy(buf->data() + 84, &mat->state.size, 4);
memcpy(buf->data() + 88, &mat->state.spread, 4);
diff --git a/examples/quick/scenegraph/graph/linenode.h b/examples/quick/scenegraph/graph/linenode.h
index e1c818a1d5..5add6f9667 100644
--- a/examples/quick/scenegraph/graph/linenode.h
+++ b/examples/quick/scenegraph/graph/linenode.h
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef LINENODE_H
#define LINENODE_H
diff --git a/examples/quick/scenegraph/graph/main.cpp b/examples/quick/scenegraph/graph/main.cpp
index 95c310131b..7070196a79 100644
--- a/examples/quick/scenegraph/graph/main.cpp
+++ b/examples/quick/scenegraph/graph/main.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QGuiApplication>
#include <QQuickView>
@@ -56,8 +9,6 @@
int main(int argc, char *argv[])
{
- qputenv("QSG_RHI", "1"); // ### Qt 6 remove, this will be the default anyway
-
QGuiApplication a(argc, argv);
QQuickView view;
@@ -66,5 +17,5 @@ int main(int argc, char *argv[])
view.setSource(QUrl("qrc:///scenegraph/graph/main.qml"));
view.show();
- return a.exec();
+ return QGuiApplication::exec();
}
diff --git a/examples/quick/scenegraph/graph/main.qml b/examples/quick/scenegraph/graph/main.qml
index e3e23d760e..5f2abbbd58 100644
--- a/examples/quick/scenegraph/graph/main.qml
+++ b/examples/quick/scenegraph/graph/main.qml
@@ -1,56 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
-import Graph 1.0
+import Graph
Item {
width: 800
@@ -62,27 +15,23 @@ Item {
anchors.margins: 100
function newSample(i) {
- return (Math.sin(i / 100.0 * Math.PI * 2) + 1) * 0.4 + Math.random() * 0.05;
+ return (Math.sin(i / 200.0 * Math.PI * 2) + 1) * 0.4 + Math.random() * 0.05;
}
Component.onCompleted: {
- for (var i=0; i<100; ++i)
+ for (var i=0; i<graph.offset; ++i)
appendSample(newSample(i));
}
- property int offset: 100;
+ property int offset: 200
}
- Timer {
- id: timer
- interval: 500
- repeat: true
+ FrameAnimation {
running: true
onTriggered: {
graph.removeFirstSample();
graph.appendSample(graph.newSample(++graph.offset));
}
-
}
Rectangle {
diff --git a/examples/quick/scenegraph/graph/noisynode.cpp b/examples/quick/scenegraph/graph/noisynode.cpp
index f8b72bfe67..8f5d93dc35 100644
--- a/examples/quick/scenegraph/graph/noisynode.cpp
+++ b/examples/quick/scenegraph/graph/noisynode.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "noisynode.h"
@@ -131,10 +84,8 @@ bool NoisyShader::updateUniformData(RenderState &state, QSGMaterial *newMaterial
}
NoisyMaterial *mat = static_cast<NoisyMaterial *>(newMaterial);
- float c[4] = { float(mat->state.color.redF()),
- float(mat->state.color.greenF()),
- float(mat->state.color.blueF()),
- float(mat->state.color.alphaF()) };
+ float c[4];
+ mat->state.color.getRgbF(&c[0], &c[1], &c[2], &c[3]);
memcpy(buf->data() + 64, c, 16);
const QSize s = mat->state.texture->textureSize();
@@ -151,6 +102,7 @@ void NoisyShader::updateSampledImage(RenderState &state, int binding, QSGTexture
Q_UNUSED(binding);
NoisyMaterial *mat = static_cast<NoisyMaterial *>(newMaterial);
+ mat->state.texture->commitTextureOperations(state.rhi(), state.resourceUpdateBatch());
*texture = mat->state.texture;
}
diff --git a/examples/quick/scenegraph/graph/noisynode.h b/examples/quick/scenegraph/graph/noisynode.h
index eb7d835432..512265646d 100644
--- a/examples/quick/scenegraph/graph/noisynode.h
+++ b/examples/quick/scenegraph/graph/noisynode.h
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef NOISYNODE_H
#define NOISYNODE_H
diff --git a/examples/quick/scenegraph/graph/shaders/compile.bat b/examples/quick/scenegraph/graph/shaders/compile.bat
index 4ec3f2ec8e..82bbf6444f 100644
--- a/examples/quick/scenegraph/graph/shaders/compile.bat
+++ b/examples/quick/scenegraph/graph/shaders/compile.bat
@@ -1,52 +1,5 @@
-:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-::
:: Copyright (C) 2019 The Qt Company Ltd.
-:: Contact: https://www.qt.io/licensing/
-::
-:: This file is part of the examples of the Qt Toolkit.
-::
-:: $QT_BEGIN_LICENSE:BSD$
-:: Commercial License Usage
-:: Licensees holding valid commercial Qt licenses may use this file in
-:: accordance with the commercial license agreement provided with the
-:: Software or, alternatively, in accordance with the terms contained in
-:: a written agreement between you and The Qt Company. For licensing terms
-:: and conditions see https://www.qt.io/terms-conditions. For further
-:: information use the contact form at https://www.qt.io/contact-us.
-::
-:: BSD License Usage
-:: Alternatively, 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$
-::
-:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:: SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
qsb -b --glsl "150,120,100 es" --hlsl 50 --msl 12 -o noisy.vert.qsb noisy.vert
qsb --glsl "150,120,100 es" --hlsl 50 --msl 12 -o noisy.frag.qsb noisy.frag
diff --git a/examples/quick/scenegraph/graph/shaders/line.frag b/examples/quick/scenegraph/graph/shaders/line.frag
index 44b5b24c94..b9531cede6 100644
--- a/examples/quick/scenegraph/graph/shaders/line.frag
+++ b/examples/quick/scenegraph/graph/shaders/line.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#version 440
layout(location = 0) in float vT;
diff --git a/examples/quick/scenegraph/graph/shaders/noisy.frag b/examples/quick/scenegraph/graph/shaders/noisy.frag
index 8cea9de02b..0b7cb1306b 100644
--- a/examples/quick/scenegraph/graph/shaders/noisy.frag
+++ b/examples/quick/scenegraph/graph/shaders/noisy.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#version 440
layout(location = 0) in vec2 vTexCoord;
diff --git a/examples/quick/scenegraph/metaltextureimport/CMakeLists.txt b/examples/quick/scenegraph/metaltextureimport/CMakeLists.txt
index d01ee2a3df..f76489116a 100644
--- a/examples/quick/scenegraph/metaltextureimport/CMakeLists.txt
+++ b/examples/quick/scenegraph/metaltextureimport/CMakeLists.txt
@@ -1,54 +1,32 @@
-# Generated from metaltextureimport.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(metaltextureimport LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/scenegraph/metaltextureimport")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Quick)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
qt_add_executable(metaltextureimport
main.cpp
metaltextureimport.h metaltextureimport.mm
)
+
set_target_properties(metaltextureimport PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
-)
-target_link_libraries(metaltextureimport PUBLIC
- "-framework Metal"
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-# Resources:
-set(metaltextureimport_resource_files
- "main.qml"
- "squircle.frag"
- "squircle.vert"
+ # Prevent name clash with build subdirectory on case-insensitive file systems
+ OUTPUT_NAME metaltextureimportapp
)
-qt6_add_resources(metaltextureimport "metaltextureimport"
- PREFIX
- "/scenegraph/metaltextureimport"
- FILES
- ${metaltextureimport_resource_files}
+target_link_libraries(metaltextureimport PUBLIC
+ "-framework Metal"
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
if(MACOS)
@@ -57,15 +35,28 @@ if(MACOS)
)
endif()
-install(TARGETS metaltextureimport
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+qt_add_qml_module(metaltextureimport
+ URI MetalTextureImport
+ QML_FILES
+ main.qml
+ RESOURCES
+ squircle.frag
+ squircle.vert
+ RESOURCE_PREFIX /scenegraph/metaltextureimport
+ NO_RESOURCE_TARGET_PATH
)
-set_target_properties(metaltextureimport PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI MetalTextureImport
+install(TARGETS metaltextureimport
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-qt6_qml_type_registration(metaltextureimport)
+qt_generate_deploy_qml_app_script(
+ TARGET metaltextureimport
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/scenegraph/metaltextureimport/doc/src/metaltextureimport.qdoc b/examples/quick/scenegraph/metaltextureimport/doc/src/metaltextureimport.qdoc
index 3fb2cd357e..3b4912829e 100644
--- a/examples/quick/scenegraph/metaltextureimport/doc/src/metaltextureimport.qdoc
+++ b/examples/quick/scenegraph/metaltextureimport/doc/src/metaltextureimport.qdoc
@@ -1,33 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\example scenegraph/metaltextureimport
\title Scene Graph - Metal Texture Import
+ \examplecategory {Graphics}
\ingroup qtquickexamples
\brief Shows how to use a texture created directly with Metal.
@@ -87,9 +64,8 @@
After copying the values we need, sync() also performs some graphics
resource initialization. The MTLDevice is queried from the scenegraph. Once
a MTLTexture is available, a QSGTexture wrapping (not owning) it is created
- via QQuickWindow::createTextureFromNativeObject(). This function is a
- modern equivalent to QQuickWindow::createTextureFromId() that is not tied
- to OpenGL. Finally, the QSGTexture is associated with the underlying
+ via \l QNativeInterface::QSGOpenGLTexture::fromNative().
+ Finally, the QSGTexture is associated with the underlying
materials by calling the base class' setTexture() function.
\snippet scenegraph/metaltextureimport/metaltextureimport.mm 6
diff --git a/examples/quick/scenegraph/metaltextureimport/main.cpp b/examples/quick/scenegraph/metaltextureimport/main.cpp
index 2abc1c5671..d5b7725db4 100644
--- a/examples/quick/scenegraph/metaltextureimport/main.cpp
+++ b/examples/quick/scenegraph/metaltextureimport/main.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QGuiApplication>
#include <QtQuick/QQuickView>
@@ -54,7 +7,7 @@
int main(int argc, char **argv)
{
QGuiApplication app(argc, argv);
- QQuickWindow::setGraphicsApi(QSGRendererInterface::MetalRhi);
+ QQuickWindow::setGraphicsApi(QSGRendererInterface::Metal);
QQuickView view;
view.setResizeMode(QQuickView::SizeRootObjectToView);
diff --git a/examples/quick/scenegraph/metaltextureimport/main.qml b/examples/quick/scenegraph/metaltextureimport/main.qml
index facab4e440..dfc6252910 100644
--- a/examples/quick/scenegraph/metaltextureimport/main.qml
+++ b/examples/quick/scenegraph/metaltextureimport/main.qml
@@ -1,56 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
//! [1]
-import MetalTextureImport 1.0
+import MetalTextureImport
//! [1]
Rectangle {
diff --git a/examples/quick/scenegraph/metaltextureimport/metaltextureimport.h b/examples/quick/scenegraph/metaltextureimport/metaltextureimport.h
index 3ed7c548d7..45f65193fb 100644
--- a/examples/quick/scenegraph/metaltextureimport/metaltextureimport.h
+++ b/examples/quick/scenegraph/metaltextureimport/metaltextureimport.h
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef METALTEXTUREIMPORT_H
#define METALTEXTUREIMPORT_H
diff --git a/examples/quick/scenegraph/metaltextureimport/metaltextureimport.mm b/examples/quick/scenegraph/metaltextureimport/metaltextureimport.mm
index 9698b16f0b..307d7e9aa1 100644
--- a/examples/quick/scenegraph/metaltextureimport/metaltextureimport.mm
+++ b/examples/quick/scenegraph/metaltextureimport/metaltextureimport.mm
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "metaltextureimport.h"
#include <QtGui/QScreen>
diff --git a/examples/quick/scenegraph/metaltextureimport/squircle.frag b/examples/quick/scenegraph/metaltextureimport/squircle.frag
index 15f34624fe..8303e97006 100644
--- a/examples/quick/scenegraph/metaltextureimport/squircle.frag
+++ b/examples/quick/scenegraph/metaltextureimport/squircle.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#include <metal_stdlib>
#include <simd/simd.h>
diff --git a/examples/quick/scenegraph/metalunderqml/CMakeLists.txt b/examples/quick/scenegraph/metalunderqml/CMakeLists.txt
index 1cbff4c7f5..21c7b5c763 100644
--- a/examples/quick/scenegraph/metalunderqml/CMakeLists.txt
+++ b/examples/quick/scenegraph/metalunderqml/CMakeLists.txt
@@ -1,54 +1,29 @@
-# Generated from metalunderqml.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(metalunderqml LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/scenegraph/metalunderqml")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Quick)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
qt_add_executable(metalunderqml
main.cpp
metalsquircle.h metalsquircle.mm
)
+
set_target_properties(metalunderqml PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(metalunderqml PUBLIC
"-framework Metal"
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-
-# Resources:
-set(metalunderqml_resource_files
- "main.qml"
- "squircle.frag"
- "squircle.vert"
-)
-
-qt6_add_resources(metalunderqml "metalunderqml"
- PREFIX
- "/scenegraph/metalunderqml"
- FILES
- ${metalunderqml_resource_files}
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
if(MACOS)
@@ -57,15 +32,28 @@ if(MACOS)
)
endif()
+qt_add_qml_module(metalunderqml
+ URI MetalUnderQML
+ QML_FILES
+ main.qml
+ RESOURCES
+ squircle.frag
+ squircle.vert
+ RESOURCE_PREFIX /scenegraph/metalunderqml
+ NO_RESOURCE_TARGET_PATH
+ )
+
install(TARGETS metalunderqml
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-set_target_properties(metalunderqml PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI MetalUnderQML
+qt_generate_deploy_qml_app_script(
+ TARGET metalunderqml
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
-
-qt6_qml_type_registration(metalunderqml)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/scenegraph/metalunderqml/doc/src/metalunderqml.qdoc b/examples/quick/scenegraph/metalunderqml/doc/src/metalunderqml.qdoc
index fb28270315..fa41ca489f 100644
--- a/examples/quick/scenegraph/metalunderqml/doc/src/metalunderqml.qdoc
+++ b/examples/quick/scenegraph/metalunderqml/doc/src/metalunderqml.qdoc
@@ -1,33 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\example scenegraph/metalunderqml
\title Scene Graph - Metal Under QML
+ \examplecategory {Graphics}
\ingroup qtquickexamples
\brief Shows how to render directly with Metal under a Qt Quick scene.
diff --git a/examples/quick/scenegraph/metalunderqml/main.cpp b/examples/quick/scenegraph/metalunderqml/main.cpp
index 4a657a6bf4..c18c3c5ea0 100644
--- a/examples/quick/scenegraph/metalunderqml/main.cpp
+++ b/examples/quick/scenegraph/metalunderqml/main.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QGuiApplication>
#include <QtQuick/QQuickView>
@@ -56,12 +9,12 @@ int main(int argc, char **argv)
{
QGuiApplication app(argc, argv);
- QQuickWindow::setGraphicsApi(QSGRendererInterface::MetalRhi);
+ QQuickWindow::setGraphicsApi(QSGRendererInterface::Metal);
QQuickView view;
view.setResizeMode(QQuickView::SizeRootObjectToView);
view.setSource(QUrl("qrc:///scenegraph/metalunderqml/main.qml"));
view.show();
- return app.exec();
+ return QGuiApplication::exec();
}
diff --git a/examples/quick/scenegraph/metalunderqml/main.qml b/examples/quick/scenegraph/metalunderqml/main.qml
index d41a0b8e81..3329822eb1 100644
--- a/examples/quick/scenegraph/metalunderqml/main.qml
+++ b/examples/quick/scenegraph/metalunderqml/main.qml
@@ -1,56 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//! [1]
-import QtQuick 2.0
-import MetalUnderQML 1.0
+import QtQuick
+import MetalUnderQML
Item {
diff --git a/examples/quick/scenegraph/metalunderqml/metalsquircle.h b/examples/quick/scenegraph/metalunderqml/metalsquircle.h
index 6b3af6994c..56da89be56 100644
--- a/examples/quick/scenegraph/metalunderqml/metalsquircle.h
+++ b/examples/quick/scenegraph/metalunderqml/metalsquircle.h
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef METALSQUIRCLE_H
#define METALSQUIRCLE_H
diff --git a/examples/quick/scenegraph/metalunderqml/metalsquircle.mm b/examples/quick/scenegraph/metalunderqml/metalsquircle.mm
index 4acedcab02..6276c990a0 100644
--- a/examples/quick/scenegraph/metalunderqml/metalsquircle.mm
+++ b/examples/quick/scenegraph/metalunderqml/metalsquircle.mm
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "metalsquircle.h"
#include <QtCore/QRunnable>
@@ -205,7 +158,7 @@ void SquircleRenderer::frameStart()
QSGRendererInterface *rif = m_window->rendererInterface();
// We are not prepared for anything other than running with the RHI and its Metal backend.
- Q_ASSERT(rif->graphicsApi() == QSGRendererInterface::MetalRhi);
+ Q_ASSERT(rif->graphicsApi() == QSGRendererInterface::Metal);
m_device = (id<MTLDevice>) rif->getResource(m_window, QSGRendererInterface::DeviceResource);
Q_ASSERT(m_device);
diff --git a/examples/quick/scenegraph/metalunderqml/squircle.frag b/examples/quick/scenegraph/metalunderqml/squircle.frag
index 15f34624fe..8303e97006 100644
--- a/examples/quick/scenegraph/metalunderqml/squircle.frag
+++ b/examples/quick/scenegraph/metalunderqml/squircle.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#include <metal_stdlib>
#include <simd/simd.h>
diff --git a/examples/quick/scenegraph/openglunderqml/CMakeLists.txt b/examples/quick/scenegraph/openglunderqml/CMakeLists.txt
index 0772c05259..8a95221811 100644
--- a/examples/quick/scenegraph/openglunderqml/CMakeLists.txt
+++ b/examples/quick/scenegraph/openglunderqml/CMakeLists.txt
@@ -1,62 +1,49 @@
-# Generated from openglunderqml.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(openglunderqml LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup()
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/scenegraph/openglunderqml")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Quick)
-
-qt_add_executable(openglunderqml
+qt_add_executable(openglunderqml WIN32 MACOSX_BUNDLE
main.cpp
squircle.cpp squircle.h
)
+
set_target_properties(openglunderqml PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(openglunderqml PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
+ # Prevent name clash with build subdirectory on case-insensitive file systems
+ OUTPUT_NAME openglunderqmlapp
+)
-# Resources:
-set(openglunderqml_resource_files
- "main.qml"
+target_link_libraries(openglunderqml PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
-qt6_add_resources(openglunderqml "openglunderqml"
- PREFIX
- "/scenegraph/openglunderqml"
- FILES
- ${openglunderqml_resource_files}
+qt_add_qml_module(openglunderqml
+ URI OpenGLUnderQML
+ QML_FILES main.qml
+ RESOURCE_PREFIX /scenegraph/openglunderqml
+ NO_RESOURCE_TARGET_PATH
)
install(TARGETS openglunderqml
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-set_target_properties(openglunderqml PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI OpenGLUnderQML
+qt_generate_deploy_qml_app_script(
+ TARGET openglunderqml
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
-
-qt6_qml_type_registration(openglunderqml)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/scenegraph/openglunderqml/doc/src/openglunderqml.qdoc b/examples/quick/scenegraph/openglunderqml/doc/src/openglunderqml.qdoc
index c2944970a5..aba95b471a 100644
--- a/examples/quick/scenegraph/openglunderqml/doc/src/openglunderqml.qdoc
+++ b/examples/quick/scenegraph/openglunderqml/doc/src/openglunderqml.qdoc
@@ -1,34 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\example scenegraph/openglunderqml
\title Scene Graph - OpenGL Under QML
+ \examplecategory {Graphics}
\ingroup qtquickexamples
+ \examplecategory {Mobile}
\brief Shows how to render OpenGL under a Qt Quick scene.
\image openglunderqml-example.jpg
diff --git a/examples/quick/scenegraph/openglunderqml/main.cpp b/examples/quick/scenegraph/openglunderqml/main.cpp
index d92cbb2d80..3c32376e4e 100644
--- a/examples/quick/scenegraph/openglunderqml/main.cpp
+++ b/examples/quick/scenegraph/openglunderqml/main.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QGuiApplication>
@@ -59,13 +12,13 @@ int main(int argc, char **argv)
{
QGuiApplication app(argc, argv);
- QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi);
+ QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL);
QQuickView view;
view.setResizeMode(QQuickView::SizeRootObjectToView);
view.setSource(QUrl("qrc:///scenegraph/openglunderqml/main.qml"));
view.show();
- return app.exec();
+ return QGuiApplication::exec();
}
//! [1]
diff --git a/examples/quick/scenegraph/openglunderqml/main.qml b/examples/quick/scenegraph/openglunderqml/main.qml
index 368d59a0e2..1cb088b538 100644
--- a/examples/quick/scenegraph/openglunderqml/main.qml
+++ b/examples/quick/scenegraph/openglunderqml/main.qml
@@ -1,56 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//! [1]
-import QtQuick 2.0
-import OpenGLUnderQML 1.0
+import QtQuick
+import OpenGLUnderQML
Item {
@@ -79,7 +32,7 @@ Item {
id: label
color: "black"
wrapMode: Text.WordWrap
- text: "The background here is a squircle rendered with raw OpenGL using the 'beforeRender()' signal in QQuickWindow. This text label and its border is rendered using QML"
+ text: qsTr("The background here is a squircle rendered with raw OpenGL using the 'beforeRender()' signal in QQuickWindow. This text label and its border is rendered using QML")
anchors.right: parent.right
anchors.left: parent.left
anchors.bottom: parent.bottom
diff --git a/examples/quick/scenegraph/openglunderqml/squircle.cpp b/examples/quick/scenegraph/openglunderqml/squircle.cpp
index d80309cbfb..13f3075a28 100644
--- a/examples/quick/scenegraph/openglunderqml/squircle.cpp
+++ b/examples/quick/scenegraph/openglunderqml/squircle.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "squircle.h"
@@ -137,7 +90,7 @@ void SquircleRenderer::init()
{
if (!m_program) {
QSGRendererInterface *rif = m_window->rendererInterface();
- Q_ASSERT(rif->graphicsApi() == QSGRendererInterface::OpenGL || rif->graphicsApi() == QSGRendererInterface::OpenGLRhi);
+ Q_ASSERT(rif->graphicsApi() == QSGRendererInterface::OpenGL);
initializeOpenGLFunctions();
diff --git a/examples/quick/scenegraph/openglunderqml/squircle.h b/examples/quick/scenegraph/openglunderqml/squircle.h
index c0a8712603..2112d658b0 100644
--- a/examples/quick/scenegraph/openglunderqml/squircle.h
+++ b/examples/quick/scenegraph/openglunderqml/squircle.h
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef SQUIRCLE_H
#define SQUIRCLE_H
@@ -63,7 +16,6 @@ class SquircleRenderer : public QObject, protected QOpenGLFunctions
{
Q_OBJECT
public:
- SquircleRenderer() : m_t(0), m_program(0) { }
~SquircleRenderer();
void setT(qreal t) { m_t = t; }
@@ -76,9 +28,9 @@ public slots:
private:
QSize m_viewportSize;
- qreal m_t;
- QOpenGLShaderProgram *m_program;
- QQuickWindow *m_window;
+ qreal m_t = 0.0;
+ QOpenGLShaderProgram *m_program = nullptr;
+ QQuickWindow *m_window = nullptr;
};
//! [1]
diff --git a/examples/quick/scenegraph/rhitextureitem/CMakeLists.txt b/examples/quick/scenegraph/rhitextureitem/CMakeLists.txt
new file mode 100644
index 0000000000..9440c7b25b
--- /dev/null
+++ b/examples/quick/scenegraph/rhitextureitem/CMakeLists.txt
@@ -0,0 +1,77 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(rhitextureitem LANGUAGES CXX)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick ShaderTools)
+
+qt_standard_project_setup()
+
+qt_add_executable(rhitextureitem WIN32 MACOSX_BUNDLE
+ rhitextureitem.cpp rhitextureitem.h
+ main.cpp
+)
+
+target_include_directories(rhitextureitem PUBLIC
+ ../shared
+)
+
+target_link_libraries(rhitextureitem PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::GuiPrivate
+ Qt6::Qml
+ Qt6::Quick
+)
+
+qt_add_qml_module(rhitextureitem
+ URI
+ SceneGraphRendering
+ QML_FILES
+ main.qml
+ SettingsDrawer.qml
+ RESOURCE_PREFIX
+ /scenegraph/rhitextureitem
+ RESOURCES
+ icon_settings.png
+ icon_settings@2x.png
+ icon_settings@3x.png
+ icon_settings@4x.png
+ NO_RESOURCE_TARGET_PATH
+)
+
+qt_add_shaders(rhitextureitem "rhitextureitem_shaders"
+ PRECOMPILE
+ OPTIMIZED
+ PREFIX
+ /scenegraph/rhitextureitem
+ FILES
+ shaders/color.vert
+ shaders/color.frag
+)
+
+qt_add_shaders(rhitextureitem "rhitextureitem_effect_shaders"
+ BATCHABLE
+ PRECOMPILE
+ OPTIMIZED
+ PREFIX
+ /scenegraph/rhitextureitem
+ FILES
+ shaders/checker.frag
+)
+
+install(TARGETS rhitextureitem
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET rhitextureitem
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/scenegraph/rhitextureitem/SettingsDrawer.qml b/examples/quick/scenegraph/rhitextureitem/SettingsDrawer.qml
new file mode 100644
index 0000000000..2b7e146c43
--- /dev/null
+++ b/examples/quick/scenegraph/rhitextureitem/SettingsDrawer.qml
@@ -0,0 +1,117 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Layouts
+import QtQuick.Controls
+
+Page {
+ id: settingsDrawer
+ default property alias content: contentLayout.children
+ required property bool isLandscape
+ readonly property bool isMobile: Qt.platform.os === "android" || Qt.platform.os === "ios"
+ property bool isOpen: isMobile ? false : true
+
+ title: "Settings"
+
+ onIsLandscapeChanged: updateState();
+ Component.onCompleted: updateState();
+ onIsOpenChanged: updateState();
+ x: 0
+ y: 0
+
+ function updateState() {
+ if (isOpen)
+ if (isLandscape)
+ settingsDrawer.state = "Landscape_Visible"
+ else
+ settingsDrawer.state = "Portrait_Visible"
+ else
+ if (isLandscape)
+ settingsDrawer.state = "Landscape_Hidden"
+ else
+ settingsDrawer.state = "Portrait_Hidden"
+ }
+
+ states: [
+ State {
+ name: "Landscape_Visible"
+ PropertyChanges {
+ settingsDrawer.x: 0
+ }
+ },
+ State {
+ name: "Landscape_Hidden"
+ PropertyChanges {
+ settingsDrawer.x: -settingsDrawer.width
+ }
+ },
+ State {
+ name: "Portrait_Visible"
+ PropertyChanges {
+ settingsDrawer.y: 0
+ }
+ },
+ State {
+ name: "Portrait_Hidden"
+ PropertyChanges {
+ settingsDrawer.y: -settingsDrawer.height
+ }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ from: "Landscape_Visible"
+ to: "Landscape_Hidden"
+ NumberAnimation {
+ duration: 400
+ property: "x"
+ easing.type: Easing.InOutQuad
+ }
+ },
+ Transition {
+ from: "Landscape_Hidden"
+ to: "Landscape_Visible"
+ NumberAnimation {
+ duration: 400
+ property: "x"
+ easing.type: Easing.InOutQuad
+ }
+ },
+ Transition {
+ from: "Portrait_Visible"
+ to: "Portrait_Hidden"
+ NumberAnimation {
+ duration: 400
+ property: "y"
+ easing.type: Easing.InOutQuad
+ }
+ },
+ Transition {
+ from: "Portrait_Hidden"
+ to: "Portrait_Visible"
+ NumberAnimation {
+ duration: 400
+ property: "y"
+ easing.type: Easing.InOutQuad
+ }
+ }
+ ]
+
+ header: Label {
+ text: settingsDrawer.title
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ font.pointSize: 20
+ }
+
+ ScrollView {
+ anchors.fill: parent
+ padding: 10
+
+ ColumnLayout {
+ id: contentLayout
+ }
+ }
+}
diff --git a/examples/quick/scenegraph/rhitextureitem/doc/images/rhitextureitem-example.jpg b/examples/quick/scenegraph/rhitextureitem/doc/images/rhitextureitem-example.jpg
new file mode 100644
index 0000000000..909d0619fe
--- /dev/null
+++ b/examples/quick/scenegraph/rhitextureitem/doc/images/rhitextureitem-example.jpg
Binary files differ
diff --git a/examples/quick/scenegraph/rhitextureitem/doc/src/rhitextureitem.qdoc b/examples/quick/scenegraph/rhitextureitem/doc/src/rhitextureitem.qdoc
new file mode 100644
index 0000000000..ee4031a7d9
--- /dev/null
+++ b/examples/quick/scenegraph/rhitextureitem/doc/src/rhitextureitem.qdoc
@@ -0,0 +1,106 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+
+/*!
+ \example scenegraph/rhitextureitem
+ \title Scene Graph - RHI Texture Item
+ \examplecategory {Graphics}
+ \ingroup qtquickexamples
+
+ \brief Shows how to implement a custom QQuickItem that displays a QRhi-rendered texture.
+
+ \image rhitextureitem-example.jpg
+
+ This example shows how to implement an item that performs cross-platform,
+ portable 3D rendering into a texture using the QRhi APIs and then displays
+ that image.
+
+ \note This example demonstrates advanced, low-level functionality performing
+ portable, cross-platform 3D rendering, while relying on APIs with limited
+ compatibility guarantee from the Qt Gui module. To be able to use the QRhi
+ APIs, the application links to \c{Qt::GuiPrivate} and includes
+ \c{<rhi/qrhi.h>}.
+
+ \section2 Comparison with other approaches
+
+ The \l{Scene Graph - RHI Under QML}{RHI Under QML} example shows how to
+ implement portable, cross-platform 3D rendering with the \l QRhi APIs in a
+ manner where the custom rendering is issued before the Qt Quick scene
+ graph's own rendering, effectively providing an "underlay". That approach
+ is efficient since now additional render targets and render passes are
+ needed, the custom rendering is injected in the main render pass before the
+ scene graph's own draw calls.
+
+ In contrast, this example involves a separate render target, a QRhiTexture,
+ the \l{QRhiTexture::pixelSize()}{dimensions} of which match the
+ QQuickItem's size in the scene, and a whole render pass that is used to
+ clear and then draw into that texture. The texture is then sampled in the
+ main render pass and is used to texture a quad, effectively displaying a 2D
+ image.
+
+ Compared to the underlay/overlay approach, this allows displaying,
+ blending, and transforming the flattened 2D image of the 3D rendering
+ anywhere in the Qt Quick scene since here we have a true QQuickItem. This
+ comes at the expense of being more expensive in terms of resources and
+ performance since it involves rendering to a texture first.
+
+ \section2 Overview
+
+ The example is implemented using \l QQuickRhiItem and
+ \l QQuickRhiItemRenderer. QQuickRhiItem is a convenience class that can be
+ subclassed to easily and quickly get a fully featured, custom QQuickItem that
+ displays the contents of a QRhiTexture by using QSGSimpleTextureNode under the
+ hood. The contents of the texture is generated by the application-provided
+ logic implemented in its QQuickRhiItemRenderer subclass.
+
+ \c ExampleRhiItem is a QQuickRhiItem subclass that offers a few properties,
+ such as \c angle and \c backgroundAlpha. These are going to be read,
+ written, and animated from QML. In order to support Qt Quick's threaded
+ rendering model, the QQQuickRhiItemRenderer has a virtual
+ \l{QQuickRhiItemRenderer::synchronize()}{synchronize()} function that can
+ be reimplemented to safely perform copying of data between the
+ QQuickRhiItem (belonging to the main/GUI thread) and the
+ QQuickRhiItemRenderer (belonging to the render thread, if there is one).
+
+ \snippet scenegraph/rhitextureitem/rhitextureitem.cpp 0
+
+ \l{QQuickRhiItemRenderer::initialize()}{initialize()} is called at least
+ once before the first call to render(), but may in practice be invoked
+ multiple times: if the QQuickItem geometry changes (due to some layout
+ change, resizing the window, etc.), if QQuickRhiItem setting such as the
+ sample count and texture format change, or if the item is reparented so
+ that is belong to a new QQuickWindow, these all trigger calling
+ initialize() again because they imply that one or more of the resources
+ QQuickRhiItem-managed resources change, which is going to have implications
+ on the subclass as well. The example code here is prepared to handle these
+ special situations (changing QRhi, changing sample count, changing texture
+ format). (as it does not hold on to the texture used as the color buffer,
+ the case when the texture is recreated due to a different size needs no
+ special handling)
+
+ \snippet scenegraph/rhitextureitem/rhitextureitem.cpp 1
+
+ The rest if initialize() is straightforward QRhi-based code.
+
+ The 3D scene uses a perspective projection, which is calculated based on
+ the output size, queried from the QRhiRenderTarget for convenience (because
+ this works regardless of using multisampling or not, whereas accessing
+ \l{QQuickRhiItemRenderer::colorTexture()}{colorTexture()} and
+ \l{QQuickRhiItemRenderer::msaaColorBuffer()}{msaaColorBuffer()} would need
+ branching logic based on which of the objects happens to be valid)
+
+ Note the usage of \l QRhi::clipSpaceCorrMatrix() to cater for the
+ coordinate system differences between 3D graphics APIs.
+
+ \snippet scenegraph/rhitextureitem/rhitextureitem.cpp 2
+
+ The implementation of \l{QQuickRhiItemRenderer::render()}{render()} records
+ the drawing of a single triangle. The uniform buffer with the 4x4 matrix is
+ updated every time since we expect the rotation angle to change. The clear
+ color has the item-provided background alpha baked in. Remember the need to
+ premultiply the alpha value in the red, green, and blue components as well.
+
+ \snippet scenegraph/rhitextureitem/rhitextureitem.cpp 3
+
+ \sa QQuickRhiItem, {Scene Graph - RHI Under QML}, {Scene Graph - Custom QSGRenderNode}
+ */
diff --git a/examples/quick/scenegraph/rhitextureitem/icon_settings.png b/examples/quick/scenegraph/rhitextureitem/icon_settings.png
new file mode 100644
index 0000000000..943316040d
--- /dev/null
+++ b/examples/quick/scenegraph/rhitextureitem/icon_settings.png
Binary files differ
diff --git a/examples/quick/scenegraph/rhitextureitem/icon_settings@2x.png b/examples/quick/scenegraph/rhitextureitem/icon_settings@2x.png
new file mode 100644
index 0000000000..b3dbf8fa28
--- /dev/null
+++ b/examples/quick/scenegraph/rhitextureitem/icon_settings@2x.png
Binary files differ
diff --git a/examples/quick/scenegraph/rhitextureitem/icon_settings@3x.png b/examples/quick/scenegraph/rhitextureitem/icon_settings@3x.png
new file mode 100644
index 0000000000..0532debcfc
--- /dev/null
+++ b/examples/quick/scenegraph/rhitextureitem/icon_settings@3x.png
Binary files differ
diff --git a/examples/quick/scenegraph/rhitextureitem/icon_settings@4x.png b/examples/quick/scenegraph/rhitextureitem/icon_settings@4x.png
new file mode 100644
index 0000000000..3b6df374dc
--- /dev/null
+++ b/examples/quick/scenegraph/rhitextureitem/icon_settings@4x.png
Binary files differ
diff --git a/examples/quick/scenegraph/rhitextureitem/main.cpp b/examples/quick/scenegraph/rhitextureitem/main.cpp
new file mode 100644
index 0000000000..5092552691
--- /dev/null
+++ b/examples/quick/scenegraph/rhitextureitem/main.cpp
@@ -0,0 +1,18 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include <QGuiApplication>
+#include <QQuickView>
+#include "rhitextureitem.h"
+
+int main(int argc, char **argv)
+{
+ QGuiApplication app(argc, argv);
+
+ QQuickView view;
+ view.setResizeMode(QQuickView::SizeRootObjectToView);
+ view.setSource(QUrl("qrc:///scenegraph/rhitextureitem/main.qml"));
+ view.show();
+
+ return QGuiApplication::exec();
+}
diff --git a/examples/quick/scenegraph/rhitextureitem/main.qml b/examples/quick/scenegraph/rhitextureitem/main.qml
new file mode 100644
index 0000000000..dc386d2cf2
--- /dev/null
+++ b/examples/quick/scenegraph/rhitextureitem/main.qml
@@ -0,0 +1,259 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
+
+import SceneGraphRendering
+
+Item {
+ width: 800
+ height: 600
+
+ // The checkers background
+ ShaderEffect {
+ id: tileBackground
+ anchors.fill: parent
+
+ property real tileSize: 16
+ property color color1: Qt.rgba(0.9, 0.9, 0.9, 1);
+ property color color2: Qt.rgba(0.85, 0.85, 0.85, 1);
+
+ property size pixelSize: Qt.size(width / tileSize, height / tileSize);
+
+ fragmentShader: "qrc:/scenegraph/rhitextureitem/shaders/checker.frag.qsb"
+ }
+
+ //! [0]
+ ExampleRhiItem {
+ id: renderer
+ anchors.fill: parent
+ anchors.margins: 10
+
+ mirrorVertically: cbMirror.checked
+ sampleCount: cbMSAA.checked ? 4 : 1
+ fixedColorBufferWidth: cbSize.checked ? slSize.value.toFixed(0) : 0
+ fixedColorBufferHeight: cbSize.checked ? slSize.value.toFixed(0) : 0
+ alphaBlending: cbBlend.checked
+ colorBufferFormat: rdFormatRGBA8.checked ? ExampleRhiItem.TextureFormat.RGBA8
+ : rdFormatFP16.checked ? ExampleRhiItem.TextureFormat.RGBA16F
+ : rdFormatFP32.checked ? ExampleRhiItem.TextureFormat.RGBA32F
+ : ExampleRhiItem.TextureFormat.RGB10A2
+
+ // custom properties provided by the QQuickRhiItem subclass: angle, backgroundAlpha
+ NumberAnimation on angle {
+ from: 0
+ to: 360
+ duration: 5000
+ loops: Animation.Infinite
+ running: cbAnimate.checked
+ }
+
+ backgroundAlpha: slAlpha.value
+ //! [0]
+
+ // The transform is just to show something interesting..
+ transform: [
+ Rotation { id: rotation; axis.x: 0; axis.z: 0; axis.y: 1; angle: 0; origin.x: renderer.width / 2; origin.y: renderer.height / 2; },
+ Translate { id: txOut; x: -renderer.width / 2; y: -renderer.height / 2 },
+ Scale { id: scale; },
+ Translate { id: txIn; x: renderer.width / 2; y: renderer.height / 2 }
+ ]
+ }
+
+ // Just to show something interesting
+ SequentialAnimation {
+ PauseAnimation { duration: 5000 }
+ ParallelAnimation {
+ NumberAnimation { target: scale; property: "xScale"; to: 0.6; duration: 1000; easing.type: Easing.InOutBack }
+ NumberAnimation { target: scale; property: "yScale"; to: 0.6; duration: 1000; easing.type: Easing.InOutBack }
+ }
+ NumberAnimation { target: rotation; property: "angle"; to: 80; duration: 1000; easing.type: Easing.InOutCubic }
+ NumberAnimation { target: rotation; property: "angle"; to: -80; duration: 1000; easing.type: Easing.InOutCubic }
+ NumberAnimation { target: rotation; property: "angle"; to: 0; duration: 1000; easing.type: Easing.InOutCubic }
+ NumberAnimation { target: renderer; property: "opacity"; to: 0.5; duration: 1000; easing.type: Easing.InOutCubic }
+ PauseAnimation { duration: 1000 }
+ NumberAnimation { target: renderer; property: "opacity"; to: 1.0; duration: 1000; easing.type: Easing.InOutCubic }
+ ParallelAnimation {
+ NumberAnimation { target: scale; property: "xScale"; to: 1; duration: 1000; easing.type: Easing.InOutBack }
+ NumberAnimation { target: scale; property: "yScale"; to: 1; duration: 1000; easing.type: Easing.InOutBack }
+ }
+ running: cbAnimate.checked
+ loops: Animation.Infinite
+ }
+
+ Rectangle {
+ id: labelFrame
+ anchors.margins: -10
+ radius: 5
+ color: "white"
+ border.color: "black"
+ anchors.fill: label
+ }
+
+ Text {
+ id: label
+ anchors.bottom: renderer.bottom
+ anchors.left: renderer.left
+ anchors.right: renderer.right
+ anchors.margins: 20
+ wrapMode: Text.WordWrap
+ text: qsTr("The triangle on the blue background is rendered by working directly the QRhi APIs on the scene graph render thread. The custom QQuickItem subclasses QQuickRhiItem, and it in effect draws a quad textured with the QRhiTexture containing the custom 3D rendering. Thanks to being a true QQuickItem, 2D/2.5D transforms, blending/opacity, stacking, clipping, etc. all work as usual.")
+ }
+
+ RowLayout {
+ anchors.top: renderer.top
+ anchors.right: renderer.right
+ anchors.margins: 10
+ Item {
+ id: settingsButton
+ implicitWidth: 64
+ implicitHeight: 64
+ Image {
+ anchors.centerIn: parent
+ source: "icon_settings.png"
+ }
+ HoverHandler {
+ id: hoverHandler
+ }
+ }
+ Text {
+ Layout.alignment: Qt.AlignVCenter
+ text: settingsDrawer.title
+ color: "white"
+ font.pointSize: 16
+ }
+ TapHandler {
+ // qmllint disable signal-handler-parameters
+ onTapped: settingsDrawer.isOpen = !settingsDrawer.isOpen;
+ // qmllint enable signal-handler-parameters
+ }
+ }
+
+ SettingsDrawer {
+ id: settingsDrawer
+ title: qsTr("Settings")
+ isOpen: false
+ isLandscape: true
+ width: isLandscape ? implicitWidth * 1.2 : parent.width
+ height: isLandscape ? parent.height * 0.8 : parent.height * 0.33
+
+ CheckBox {
+ id: cbAnimate
+ text: qsTr("Animate")
+ checked: true
+ }
+
+ CheckBox {
+ id: cbMirror
+ text: qsTr("Mirror vertically")
+ checked: false
+ }
+
+ CheckBox {
+ id: cbMSAA
+ text: qsTr("Enable 4x MSAA")
+ checked: false
+ }
+
+ CheckBox {
+ id: cbSize
+ text: qsTr("Use fixed size")
+ checked: false
+ }
+ RowLayout {
+ Label {
+ text: qsTr("Texture size")
+ }
+ Slider {
+ id: slSize
+ enabled: cbSize.checked
+ from: 8
+ to: 2048
+ value: 128
+ Layout.fillWidth: false
+ }
+ }
+
+ Label {
+ text: qsTr("Backing texture size: %1x%2 pixels").arg(renderer.effectiveColorBufferSize.width).arg(renderer.effectiveColorBufferSize.height)
+ }
+
+ Label {
+ text: qsTr("Item logical size: %1x%2").arg(renderer.width).arg(renderer.height)
+ }
+
+ CheckBox {
+ id: cbBlend
+ text: qsTr("Force alpha blending\nregardless of item opacity")
+ checked: false
+ }
+ RowLayout {
+ Label {
+ text: qsTr("Background alpha")
+ }
+ Slider {
+ id: slAlpha
+ from: 0
+ to: 1.0
+ value: 1.0
+ Layout.fillWidth: false
+ }
+ }
+
+ Label {
+ text: qsTr("Background alpha: %1").arg(renderer.backgroundAlpha.toFixed(2))
+ }
+
+ Label {
+ text: qsTr("Item opacity: %1").arg(renderer.opacity.toFixed(2))
+ }
+
+ Label {
+ property string apiName:
+ if (GraphicsInfo.api === GraphicsInfo.OpenGL)
+ "OpenGL";
+ else if (GraphicsInfo.api === GraphicsInfo.Direct3D11)
+ "D3D11";
+ else if (GraphicsInfo.api === GraphicsInfo.Direct3D12)
+ "D3D12";
+ else if (GraphicsInfo.api === GraphicsInfo.Vulkan)
+ "Vulkan";
+ else if (GraphicsInfo.api === GraphicsInfo.Metal)
+ "Metal";
+ else if (GraphicsInfo.api === GraphicsInfo.Null)
+ "Null";
+ else
+ "Unknown API";
+ text: "The underlying graphics API is " + apiName
+ }
+
+ GroupBox {
+ title: qsTr("Texture format")
+ ColumnLayout {
+ RadioButton {
+ id: rdFormatRGBA8
+ text: qsTr("8-bit RGBA")
+ checked: true
+ Layout.fillWidth: false
+ }
+ RadioButton {
+ id: rdFormatFP16
+ text: qsTr("Half-float RGBA")
+ Layout.fillWidth: false
+ }
+ RadioButton {
+ id: rdFormatFP32
+ text: qsTr("Float RGBA")
+ Layout.fillWidth: false
+ }
+ RadioButton {
+ id: rdFormatRGB10A2
+ text: qsTr("10-bit RGB, 2-bit A")
+ Layout.fillWidth: false
+ }
+ }
+ }
+ }
+}
diff --git a/examples/quick/scenegraph/rhitextureitem/prebuilts_for_qmake/checker.frag.qsb b/examples/quick/scenegraph/rhitextureitem/prebuilts_for_qmake/checker.frag.qsb
new file mode 100644
index 0000000000..31ad25de20
--- /dev/null
+++ b/examples/quick/scenegraph/rhitextureitem/prebuilts_for_qmake/checker.frag.qsb
Binary files differ
diff --git a/examples/quick/scenegraph/rhitextureitem/prebuilts_for_qmake/color.frag.qsb b/examples/quick/scenegraph/rhitextureitem/prebuilts_for_qmake/color.frag.qsb
new file mode 100644
index 0000000000..10b0bbc436
--- /dev/null
+++ b/examples/quick/scenegraph/rhitextureitem/prebuilts_for_qmake/color.frag.qsb
Binary files differ
diff --git a/examples/quick/scenegraph/rhitextureitem/prebuilts_for_qmake/color.vert.qsb b/examples/quick/scenegraph/rhitextureitem/prebuilts_for_qmake/color.vert.qsb
new file mode 100644
index 0000000000..72a0574852
--- /dev/null
+++ b/examples/quick/scenegraph/rhitextureitem/prebuilts_for_qmake/color.vert.qsb
Binary files differ
diff --git a/examples/quick/scenegraph/rhitextureitem/rhitextureitem.cpp b/examples/quick/scenegraph/rhitextureitem/rhitextureitem.cpp
new file mode 100644
index 0000000000..2b96320869
--- /dev/null
+++ b/examples/quick/scenegraph/rhitextureitem/rhitextureitem.cpp
@@ -0,0 +1,141 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include "rhitextureitem.h"
+#include <QFile>
+
+//![0]
+QQuickRhiItemRenderer *ExampleRhiItem::createRenderer()
+{
+ return new ExampleRhiItemRenderer;
+}
+
+void ExampleRhiItem::setAngle(float a)
+{
+ if (m_angle == a)
+ return;
+
+ m_angle = a;
+ emit angleChanged();
+ update();
+}
+
+void ExampleRhiItem::setBackgroundAlpha(float a)
+{
+ if (m_alpha == a)
+ return;
+
+ m_alpha = a;
+ emit backgroundAlphaChanged();
+ update();
+}
+
+void ExampleRhiItemRenderer::synchronize(QQuickRhiItem *rhiItem)
+{
+ ExampleRhiItem *item = static_cast<ExampleRhiItem *>(rhiItem);
+ if (item->angle() != m_angle)
+ m_angle = item->angle();
+ if (item->backgroundAlpha() != m_alpha)
+ m_alpha = item->backgroundAlpha();
+}
+//![0]
+
+static QShader getShader(const QString &name)
+{
+ QFile f(name);
+ return f.open(QIODevice::ReadOnly) ? QShader::fromSerialized(f.readAll()) : QShader();
+}
+
+static float vertexData[] = {
+ 0.0f, 0.5f, 1.0f, 0.0f, 0.0f,
+ -0.5f, -0.5f, 0.0f, 1.0f, 0.0f,
+ 0.5f, -0.5f, 0.0f, 0.0f, 1.0f,
+};
+
+//![1]
+void ExampleRhiItemRenderer::initialize(QRhiCommandBuffer *cb)
+{
+ if (m_rhi != rhi()) {
+ m_rhi = rhi();
+ m_pipeline.reset();
+ }
+
+ if (m_sampleCount != renderTarget()->sampleCount()) {
+ m_sampleCount = renderTarget()->sampleCount();
+ m_pipeline.reset();
+ }
+
+ QRhiTexture *finalTex = m_sampleCount > 1 ? resolveTexture() : colorTexture();
+ if (m_textureFormat != finalTex->format()) {
+ m_textureFormat = finalTex->format();
+ m_pipeline.reset();
+ }
+//![1]
+//![2]
+ if (!m_pipeline) {
+ m_vbuf.reset(m_rhi->newBuffer(QRhiBuffer::Immutable, QRhiBuffer::VertexBuffer, sizeof(vertexData)));
+ m_vbuf->create();
+
+ m_ubuf.reset(m_rhi->newBuffer(QRhiBuffer::Dynamic, QRhiBuffer::UniformBuffer, 64));
+ m_ubuf->create();
+
+ m_srb.reset(m_rhi->newShaderResourceBindings());
+ m_srb->setBindings({
+ QRhiShaderResourceBinding::uniformBuffer(0, QRhiShaderResourceBinding::VertexStage, m_ubuf.get()),
+ });
+ m_srb->create();
+
+ m_pipeline.reset(m_rhi->newGraphicsPipeline());
+ m_pipeline->setShaderStages({
+ { QRhiShaderStage::Vertex, getShader(QLatin1String(":/scenegraph/rhitextureitem/shaders/color.vert.qsb")) },
+ { QRhiShaderStage::Fragment, getShader(QLatin1String(":/scenegraph/rhitextureitem/shaders/color.frag.qsb")) }
+ });
+ QRhiVertexInputLayout inputLayout;
+ inputLayout.setBindings({
+ { 5 * sizeof(float) }
+ });
+ inputLayout.setAttributes({
+ { 0, 0, QRhiVertexInputAttribute::Float2, 0 },
+ { 0, 1, QRhiVertexInputAttribute::Float3, 2 * sizeof(float) }
+ });
+ m_pipeline->setSampleCount(m_sampleCount);
+ m_pipeline->setVertexInputLayout(inputLayout);
+ m_pipeline->setShaderResourceBindings(m_srb.get());
+ m_pipeline->setRenderPassDescriptor(renderTarget()->renderPassDescriptor());
+ m_pipeline->create();
+
+ QRhiResourceUpdateBatch *resourceUpdates = m_rhi->nextResourceUpdateBatch();
+ resourceUpdates->uploadStaticBuffer(m_vbuf.get(), vertexData);
+ cb->resourceUpdate(resourceUpdates);
+ }
+
+ const QSize outputSize = renderTarget()->pixelSize();
+ m_viewProjection = m_rhi->clipSpaceCorrMatrix();
+ m_viewProjection.perspective(45.0f, outputSize.width() / (float) outputSize.height(), 0.01f, 1000.0f);
+ m_viewProjection.translate(0, 0, -4);
+//![2]
+}
+
+//![3]
+void ExampleRhiItemRenderer::render(QRhiCommandBuffer *cb)
+{
+ QRhiResourceUpdateBatch *resourceUpdates = m_rhi->nextResourceUpdateBatch();
+ QMatrix4x4 modelViewProjection = m_viewProjection;
+ modelViewProjection.rotate(m_angle, 0, 1, 0);
+ resourceUpdates->updateDynamicBuffer(m_ubuf.get(), 0, 64, modelViewProjection.constData());
+
+ // Qt Quick expects premultiplied alpha
+ const QColor clearColor = QColor::fromRgbF(0.5f * m_alpha, 0.5f * m_alpha, 0.7f * m_alpha, m_alpha);
+ cb->beginPass(renderTarget(), clearColor, { 1.0f, 0 }, resourceUpdates);
+
+ cb->setGraphicsPipeline(m_pipeline.get());
+ const QSize outputSize = renderTarget()->pixelSize();
+ cb->setViewport(QRhiViewport(0, 0, outputSize.width(), outputSize.height()));
+ cb->setShaderResources();
+ const QRhiCommandBuffer::VertexInput vbufBinding(m_vbuf.get(), 0);
+ cb->setVertexInput(0, 1, &vbufBinding);
+ cb->draw(3);
+
+ cb->endPass();
+}
+//![3]
diff --git a/examples/quick/scenegraph/rhitextureitem/rhitextureitem.h b/examples/quick/scenegraph/rhitextureitem/rhitextureitem.h
new file mode 100644
index 0000000000..745cc3bf12
--- /dev/null
+++ b/examples/quick/scenegraph/rhitextureitem/rhitextureitem.h
@@ -0,0 +1,57 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#ifndef RHITEXTUREITEM_H
+#define RHITEXTUREITEM_H
+
+#include <QQuickRhiItem>
+#include <rhi/qrhi.h>
+
+class ExampleRhiItemRenderer : public QQuickRhiItemRenderer
+{
+public:
+ void initialize(QRhiCommandBuffer *cb) override;
+ void synchronize(QQuickRhiItem *item) override;
+ void render(QRhiCommandBuffer *cb) override;
+
+private:
+ QRhi *m_rhi = nullptr;
+ int m_sampleCount = 1;
+ QRhiTexture::Format m_textureFormat = QRhiTexture::RGBA8;
+
+ std::unique_ptr<QRhiBuffer> m_vbuf;
+ std::unique_ptr<QRhiBuffer> m_ubuf;
+ std::unique_ptr<QRhiShaderResourceBindings> m_srb;
+ std::unique_ptr<QRhiGraphicsPipeline> m_pipeline;
+
+ QMatrix4x4 m_viewProjection;
+ float m_angle = 0.0f;
+ float m_alpha = 1.0f;
+};
+
+class ExampleRhiItem : public QQuickRhiItem
+{
+ Q_OBJECT
+ QML_NAMED_ELEMENT(ExampleRhiItem)
+ Q_PROPERTY(float angle READ angle WRITE setAngle NOTIFY angleChanged)
+ Q_PROPERTY(float backgroundAlpha READ backgroundAlpha WRITE setBackgroundAlpha NOTIFY backgroundAlphaChanged)
+
+public:
+ QQuickRhiItemRenderer *createRenderer() override;
+
+ float angle() const { return m_angle; }
+ void setAngle(float a);
+
+ float backgroundAlpha() const { return m_alpha; }
+ void setBackgroundAlpha(float a);
+
+signals:
+ void angleChanged();
+ void backgroundAlphaChanged();
+
+private:
+ float m_angle = 0.0f;
+ float m_alpha = 1.0f;
+};
+
+#endif
diff --git a/examples/quick/scenegraph/rhitextureitem/rhitextureitem.pro b/examples/quick/scenegraph/rhitextureitem/rhitextureitem.pro
new file mode 100644
index 0000000000..4d5c132a42
--- /dev/null
+++ b/examples/quick/scenegraph/rhitextureitem/rhitextureitem.pro
@@ -0,0 +1,16 @@
+QT += gui-private qml quick
+
+CONFIG += qmltypes
+QML_IMPORT_NAME = SceneGraphRendering
+QML_IMPORT_MAJOR_VERSION = 1
+
+HEADERS += rhitextureitem.h
+SOURCES += rhitextureitem.cpp main.cpp
+
+RESOURCES += rhitextureitem.qrc
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/scenegraph/rhitextureitem
+INSTALLS += target
+
+OTHER_FILES += \
+ main.qml
diff --git a/examples/quick/scenegraph/rhitextureitem/rhitextureitem.qrc b/examples/quick/scenegraph/rhitextureitem/rhitextureitem.qrc
new file mode 100644
index 0000000000..ad996ef3f2
--- /dev/null
+++ b/examples/quick/scenegraph/rhitextureitem/rhitextureitem.qrc
@@ -0,0 +1,8 @@
+<RCC>
+ <qresource prefix="/scenegraph/rhitextureitem">
+ <file>main.qml</file>
+ <file alias="shaders/color.vert.qsb">prebuilts_for_qmake/color.vert.qsb</file>
+ <file alias="shaders/color.frag.qsb">prebuilts_for_qmake/color.frag.qsb</file>
+ <file alias="shaders/checker.frag.qsb">prebuilts_for_qmake/checker.frag.qsb</file>
+ </qresource>
+</RCC>
diff --git a/examples/quick/scenegraph/rhitextureitem/shaders/checker.frag b/examples/quick/scenegraph/rhitextureitem/shaders/checker.frag
new file mode 100644
index 0000000000..53f4a8aed1
--- /dev/null
+++ b/examples/quick/scenegraph/rhitextureitem/shaders/checker.frag
@@ -0,0 +1,26 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#version 440
+
+layout(std140, binding = 0) uniform buf {
+ // built-in Qt data
+ mat4 qt_Matrix;
+ float qt_Opacity;
+ // custom data
+ vec4 color1;
+ vec4 color2;
+ vec2 pixelSize;
+};
+
+layout(location = 0) in vec2 qt_TexCoord0;
+layout(location = 0) out vec4 fragColor;
+
+void main()
+{
+ vec2 tc = sign(sin(3.14159265358979323846 * qt_TexCoord0 * pixelSize));
+ if (tc.x != tc.y)
+ fragColor = color1;
+ else
+ fragColor = color2;
+}
diff --git a/examples/quick/scenegraph/rhitextureitem/shaders/color.frag b/examples/quick/scenegraph/rhitextureitem/shaders/color.frag
new file mode 100644
index 0000000000..b7e36638e3
--- /dev/null
+++ b/examples/quick/scenegraph/rhitextureitem/shaders/color.frag
@@ -0,0 +1,13 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#version 440
+
+layout(location = 0) in vec3 v_color;
+
+layout(location = 0) out vec4 fragColor;
+
+void main()
+{
+ fragColor = vec4(v_color, 1.0);
+}
diff --git a/examples/quick/scenegraph/rhitextureitem/shaders/color.vert b/examples/quick/scenegraph/rhitextureitem/shaders/color.vert
new file mode 100644
index 0000000000..e876f290e7
--- /dev/null
+++ b/examples/quick/scenegraph/rhitextureitem/shaders/color.vert
@@ -0,0 +1,16 @@
+#version 440
+
+layout(location = 0) in vec4 position;
+layout(location = 1) in vec3 color;
+
+layout(location = 0) out vec3 v_color;
+
+layout(std140, binding = 0) uniform buf {
+ mat4 mvp;
+};
+
+void main()
+{
+ v_color = color;
+ gl_Position = mvp * position;
+}
diff --git a/examples/quick/scenegraph/rhiunderqml/CMakeLists.txt b/examples/quick/scenegraph/rhiunderqml/CMakeLists.txt
new file mode 100644
index 0000000000..c1fdc114b6
--- /dev/null
+++ b/examples/quick/scenegraph/rhiunderqml/CMakeLists.txt
@@ -0,0 +1,61 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(rhiunderqml LANGUAGES CXX)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick ShaderTools)
+
+qt_standard_project_setup()
+
+qt_add_executable(rhiunderqml WIN32 MACOSX_BUNDLE
+ main.cpp
+ rhisquircle.cpp rhisquircle.h
+)
+
+set_target_properties(rhiunderqml PROPERTIES
+ # Prevent name clash with build subdirectory on case-insensitive file systems
+ OUTPUT_NAME rhiunderqmlapp
+)
+
+target_link_libraries(rhiunderqml PRIVATE
+ Qt6::Core
+ Qt6::GuiPrivate
+ Qt6::Qml
+ Qt6::Quick
+)
+
+qt_add_qml_module(rhiunderqml
+ URI RhiUnderQML
+ QML_FILES
+ main.qml
+ RESOURCE_PREFIX /scenegraph/rhiunderqml
+ NO_RESOURCE_TARGET_PATH
+)
+
+qt_add_shaders(rhiunderqml "rhiunderqml_shaders"
+ PRECOMPILE
+ OPTIMIZED
+ PREFIX
+ /scenegraph/rhiunderqml
+ BASE
+ ../shared
+ FILES
+ ../shared/squircle_rhi.vert
+ ../shared/squircle_rhi.frag
+)
+
+install(TARGETS rhiunderqml
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET rhiunderqml
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/scenegraph/rhiunderqml/doc/images/rhiunderqml-example.jpg b/examples/quick/scenegraph/rhiunderqml/doc/images/rhiunderqml-example.jpg
new file mode 100644
index 0000000000..e9c5bde3f0
--- /dev/null
+++ b/examples/quick/scenegraph/rhiunderqml/doc/images/rhiunderqml-example.jpg
Binary files differ
diff --git a/examples/quick/scenegraph/rhiunderqml/doc/src/rhiunderqml.qdoc b/examples/quick/scenegraph/rhiunderqml/doc/src/rhiunderqml.qdoc
new file mode 100644
index 0000000000..175148c9c0
--- /dev/null
+++ b/examples/quick/scenegraph/rhiunderqml/doc/src/rhiunderqml.qdoc
@@ -0,0 +1,236 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+
+/*!
+ \example scenegraph/rhiunderqml
+ \title Scene Graph - RHI Under QML
+ \examplecategory {Graphics}
+ \ingroup qtquickexamples
+ \brief Shows how to render directly with \l QRhi under a Qt Quick scene.
+
+ \image rhiunderqml-example.jpg
+
+ \section1 Introduction
+
+ The RHI Under QML example shows how an application can make use of the \l
+ QQuickWindow::beforeRendering() and \l
+ QQuickWindow::beforeRenderPassRecording() signals to draw custom \l{QRhi}-based
+ content under a Qt Quick scene.
+
+ Applications that wish to render \l QRhi content on top of the Qt Quick scene,
+ can do so by connecting to the \l QQuickWindow::afterRendering() and \l
+ QQuickWindow::afterRenderPassRecording() signals.
+
+ In this example, we will also see how it is possible to have values that
+ are exposed to QML which affect the QRhi-based rendering. We animate the
+ threshold value using a NumberAnimation in the QML file and this float
+ value is then passed on in a uniform buffer to the fragment shader.
+
+ The example is equivalent in most ways to the \l{Scene Graph - OpenGL Under
+ QML}{OpenGL Under QML}, \l{Scene Graph - Direct3D 11 Under QML}{Direct3D 11
+ Under QML}, \l{Scene Graph - Metal Under QML}{Metal Under QML}, and \l{Scene
+ Graph - Vulkan Under QML}{Vulkan Under QML} examples. Those examples render
+ the same content by directly using a 3D API. This example on the other hand
+ is fully cross-platform and portable, as it inherently supports operating
+ with all the 3D APIs supported by QRhi (such as, OpenGL, Vulkan, Metal,
+ Direct 3D 11 and 12).
+
+ \note This example demonstrates advanced, low-level functionality performing
+ portable, cross-platform 3D rendering, while relying on APIs with limited
+ compatibility guarantee from the Qt Gui module. To be able to use the QRhi
+ APIs, the application links to \c{Qt::GuiPrivate} and includes
+ \c{<rhi/qrhi.h>}.
+
+ Adding custom rendering as an underlay/overlay is one of the three ways to integrate
+ custom 2D/3D rendering into a Qt Quick scene. The other two options are to perform
+ the rendering "inline" with the Qt Quick scene's own rendering using QSGRenderNode,
+ or to generate a whole separate render pass targeting a dedicated render target
+ (a texture) and then have an item in the scene display the texture.
+ Refer to the \l{Scene Graph - RHI Texture Item} and the
+ \l{Scene Graph - Custom QSGRenderNode} examples regarding those approaches.
+
+ \section1 Core Concepts
+
+ The beforeRendering() signal is emitted at the start of every frame, before
+ the scene graph starts its rendering, thus any \l QRhi draw calls that are
+ made as a response to this signal, will stack under the Qt Quick items.
+ However, there are two signals that are relevant here: the application's own
+ \l QRhi commands should be recorded onto the same command buffer that is
+ used by the scene graph, and what's more, the commands should belong to the
+ same render pass. beforeRendering() on its own is not sufficient for this
+ because it gets emitted at the start of the frame, before starting to record
+ a render pass via \l QRhiCommandBuffer::beginPass(). By also connecting to
+ beforeRenderPassRecording(), the application's own commands and the scene
+ graph's own rendering will end up in the right order:
+
+ \list
+ \li The scene graph's render loop calls \l QRhi::beginFrame()
+ \li \l QQuickWindow::beforeRendering() is emitted - the application prepares resources for its custom rendering
+ \li The scene graph calls \l QRhiCommandBuffer::beginPass()
+ \li \l QQuickWindow::beforeRenderPassRecording() is emitted - the application records draw calls
+ \li The scene graph records draw calls
+ \endlist
+
+ \section1 Walkthrough
+
+ The custom rendering is encapsulated within a custom QQuickItem. \c
+ RhiSquircle derives from \l QQuickItem, and is exposed to QML (note the
+ \c{QML_ELEMENT}). The QML scene instantiates \c RhiSquircle. Note however
+ that this is not a visual item: the \l QQuickItem::ItemHasContents flag is
+ not set. Thus the item's position and size has no relevance and it does not
+ reimplement \l{QQuickItem::updatePaintNode()}{updatePaintNode()}.
+
+ \snippet scenegraph/rhiunderqml/rhisquircle.h 0
+
+ Instead, when the item gets associated with a \l QQuickWindow, it connects
+ to the \l{QQuickWindow::beforeSynchronizing()} signal. Using
+ Qt::DirectConnection is important since this signal is emitted on the Qt
+ Quick render thread, if there is one. We want the connected slot to be
+ invoked on this same thread.
+
+ \snippet scenegraph/rhiunderqml/rhisquircle.cpp init
+
+ In the scene graph's synchronizing phase, the rendering infrastructure is
+ created, if not yet done, and the data relevant for rendering is
+ synchronized, i.e. copied from the \c RhiSquircle item, that lives on the
+ main thread, to the \c SquircleRenderer object that lives on the render
+ thread. (if there is no render thread, then both objects live on the main
+ thread) Accessing data is safe because the main thread is blocked while the
+ render thread is executing its synchronize phase. See \l{Qt Quick Scene
+ Graph} for more information on the scene graph threading and rendering
+ model.
+
+ In addition to the value of \c t, the associated QQuickWindow pointer is
+ copied as well. While the \c SquircleRenderer could query
+ \l{QQuickItem::window()}{window()} on the \c RhiSquircle item even when
+ operating on the render thread, that is, in theory, not entirely safe. Hence
+ making a copy.
+
+ When setting up the \c SquircleRenderer, connections to the
+ \l{QQuickWindow::beforeRendering()}{beforeRendering()} and
+ \l{QQuickWindow::beforeRenderPassRecording()}{beforeRenderPassRecording()}
+ are made, which are the key to be able to act and inject the application's
+ custom 3D rendering commands at the appropriate time.
+
+ \snippet scenegraph/rhiunderqml/rhisquircle.cpp sync
+
+ When \l{QQuickWindow::beforeRendering()}{beforeRendering()} is emitted, the
+ QRhi resources needed for our custom rendering, such as \l QRhiBuffer, \l
+ QRhiGraphicsPipeline, and related objects, are created if not yet done.
+
+ The data in the buffers is updated (more precisely, the data update
+ operations are enqueued) using \l QRhiResourceUpdateBatch and \l
+ QRhiCommandBuffer::resourceUpdate(). The vertex buffer does not change its
+ contents once the initial set of vertices are uploaded to it. The uniform
+ buffer however is a \l{QRhiBuffer::Dynamic}{dynamic} buffer, as is typical
+ for such buffers. Its content, some regions at least, is updated for every
+ frame. Hence the unconditional call to
+ \l{QRhiResourceUpdateBatch::updateDynamicBuffer()}{updateDynamicBuffer()}
+ for offset 0 and a byte size of 4 (which is \c{sizeof(float)} since the C++
+ \c float type happens to match GLSL's 32-bit \c float). What is stored at
+ that position is the value of \c t, and that is updated in every frame,
+ meaning in every invocation of frameStart().
+
+ There is an additional float value in the buffer, starting at offset 4. This
+ is used to cater to the coordinate system differences of the 3D APIs: when
+ \l{QRhi::isYUpInNDC()}{isYUpInNDC()} returns \c false, which is the case
+ with Vulkan in particular, the value is set to -1.0 which leads to flipping
+ the Y value in the 2 component vector that is passed on (with interpolation)
+ to the fragment shader based on which the color is calculated. This way the
+ output on the screen is identical (i.e. the top-left corner is green-ish,
+ the bottom-left is red-ish), regardless of which 3D API is in use. This
+ value is updated only once in the uniform buffer, similarly to the vertex
+ buffer. This highlights an issue low-level rendering code that aims to be
+ portable often needs to deal with: the coordinate system differences in
+ normalized device coordinates (NDC) and in images and framebuffers. For
+ example, the NDC uses a origin-at-bottom-left system everywhere except
+ Vulkan. Whereas framebuffers use an origin-at-top-left system everywhere
+ except OpenGL. Typical renderers that work with a perspective projection can
+ often be oblivious to this problem by conveniently relying on
+ \l{QRhi::clipSpaceCorrMatrix()}, which is a matrix that can be multiplied in
+ to the projection matrix, and applies both an Y flip when needed, and also
+ caters to the fact that clip space depth runs \c{-1..1} with OpenGL but
+ \c{0..1} everywhere else. However, in some cases, such as in this example,
+ this is not applicable. Rather, the application and shader logic needs to
+ perform the necessary adjustment of vertex and UV positions as appropriate
+ based on querying \l QRhi::isYUpInNDC() and \l QRhi::isYUpInFramebuffer().
+
+ To gain access to the \l QRhi and \l QRhiSwapChain objects Qt Quick uses,
+ they can simply be queried from the \l QQuickWindow. Note that this assumes
+ that the QQuickWindow is a regular, on-screen window. If it used \l
+ QQuickRenderControl instead, e.g. to perform off-screen rendering into a
+ texture, querying the swapchain would be wrong since there is no swapchain
+ then.
+
+ Due to the signal being emitted after Qt Quick calls \l QRhi::beginFrame(),
+ it is already possible to query the command buffer and render target from
+ the swapchain. This is what allows to conveniently issue a \l
+ QRhiCommandBuffer::resourceUpdate() on the object returned from \l
+ QRhiSwapChain::currentFrameCommandBuffer(). When creating a graphics
+ pipeline, a QRhiRenderPassDescriptor can be retrieved from the
+ QRhiRenderTarget returned from \l QRhiSwapChain::currentFrameRenderTarget().
+ (note that this means the graphics pipeline built here is suitable only for
+ rendering to the swapchain, or at best another render target that is
+ \l{QRhiRenderPassDescriptor::isCompatible()}{compatible} with it; it is
+ likely that if we wanted to render to a texture, then a different
+ QRhiRenderPassDescriptor, and so a different graphics pipeline, would be
+ needed since the texture and swapchain formats may differ)
+
+ \snippet scenegraph/rhiunderqml/rhisquircle.cpp frame-start
+
+ Finally, upon \l QQuickWindow::beforeRenderPassRecording(), a draw call for
+ a triangle strip with 4 vertices is recorded. This example simply draws a
+ quad in practice, and calculates the pixel colors using the logic in the
+ fragment shaders, but applications are free to do more complicated drawing:
+ creating multiple graphics pipelines and recording multiple draw calls is
+ perfectly fine as well. The important thing to keep in mind is that whatever
+ is recorded on the \l QRhiCommandBuffer retrieved from the window's
+ \l{QRhiSwapChain}{swapchain}, it is effectively prepended before the Qt Quick
+ scene graph's own rendering within the main render pass.
+
+ \note This means that if depth buffer usage with depth testing and writing
+ out depth values is involved, then the Qt Quick content may be affected by
+ the values written to the depth buffer. See \l{Qt Quick Scene Graph Default
+ Renderer} for details on the scene graph's renderer, in particular the
+ sections about the handling of \e opaque and \e{alpha blended} primitives.
+
+ To get the window size in pixels, \l QRhiRenderTarget::pixelSize() is used.
+ This is convenient because this way the example does not need to calculate
+ the viewport size by other means and does not have to worry about applying
+ the \l{QWindow::devicePixelRatio()}{high DPI scale factor}, if there is any.
+
+ \snippet scenegraph/rhiunderqml/rhisquircle.cpp frame-render
+
+ The vertex and fragment shaders go through the standard QRhi shader
+ conditioning pipeline. Initially written as Vulkan-compatible GLSL, they get
+ compiled to SPIR-V and then transpiled to other shading languages by Qt's
+ tools. When using CMake, the example relies on the \c qt_add_shaders command
+ that makes it simple and convenient to bundle the shaders with the
+ application and perform the necessary processing at build time. See \l{Qt
+ Shader Tools Build System Integration} for details.
+
+ Specifying \c BASE helps removing the \c{../shared} prefix, while \c PREFIX
+ adds the intended \c{/scenegraph/rhiunderqml} prefix. Thus the final path is
+ \c{:/scenegraph/rhiunderqml/squircle_rhi.vert.qsb}.
+
+ \badcode
+ qt_add_shaders(rhiunderqml "rhiunderqml_shaders"
+ PRECOMPILE
+ OPTIMIZED
+ PREFIX
+ /scenegraph/rhiunderqml
+ BASE
+ ../shared
+ FILES
+ ../shared/squircle_rhi.vert
+ ../shared/squircle_rhi.frag
+ )
+ \endcode
+
+ To support qmake, the example still ships the \c{.qsb} files that would
+ normally be generated at build time, and lists them in the qrc file. This
+ approach is however not recommended for new applications that use CMake as
+ the build system.
+
+ \sa {Scene Graph - RHI Texture Item}, {Scene Graph - Custom QSGRenderNode}
+ */
diff --git a/examples/quick/scenegraph/rhiunderqml/main.cpp b/examples/quick/scenegraph/rhiunderqml/main.cpp
new file mode 100644
index 0000000000..51b8d18ddb
--- /dev/null
+++ b/examples/quick/scenegraph/rhiunderqml/main.cpp
@@ -0,0 +1,17 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include <QGuiApplication>
+#include <QtQuick/QQuickView>
+
+int main(int argc, char **argv)
+{
+ QGuiApplication app(argc, argv);
+
+ QQuickView view;
+ view.setResizeMode(QQuickView::SizeRootObjectToView);
+ view.setSource(QUrl("qrc:///scenegraph/rhiunderqml/main.qml"));
+ view.show();
+
+ return app.exec();
+}
diff --git a/examples/quick/scenegraph/rhiunderqml/main.qml b/examples/quick/scenegraph/rhiunderqml/main.qml
new file mode 100644
index 0000000000..3faa028457
--- /dev/null
+++ b/examples/quick/scenegraph/rhiunderqml/main.qml
@@ -0,0 +1,39 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import RhiUnderQML
+
+Item {
+ width: 320
+ height: 480
+
+ RhiSquircle {
+ SequentialAnimation on t {
+ NumberAnimation { to: 1; duration: 2500; easing.type: Easing.InQuad }
+ NumberAnimation { to: 0; duration: 2500; easing.type: Easing.OutQuad }
+ loops: Animation.Infinite
+ running: true
+ }
+ }
+
+ Rectangle {
+ color: Qt.rgba(1, 1, 1, 0.7)
+ radius: 10
+ border.width: 1
+ border.color: "white"
+ anchors.fill: label
+ anchors.margins: -10
+ }
+
+ Text {
+ id: label
+ color: "black"
+ wrapMode: Text.WordWrap
+ text: qsTr("The background here is a squircle rendered with QRhi using the beforeRendering() and beforeRenderPassRecording() signals in QQuickWindow. This text label and its border is rendered using QML")
+ anchors.right: parent.right
+ anchors.left: parent.left
+ anchors.bottom: parent.bottom
+ anchors.margins: 20
+ }
+}
diff --git a/examples/quick/scenegraph/rhiunderqml/prebuilts_for_qmake/squircle_rhi.frag.qsb b/examples/quick/scenegraph/rhiunderqml/prebuilts_for_qmake/squircle_rhi.frag.qsb
new file mode 100644
index 0000000000..077a31f945
--- /dev/null
+++ b/examples/quick/scenegraph/rhiunderqml/prebuilts_for_qmake/squircle_rhi.frag.qsb
Binary files differ
diff --git a/examples/quick/scenegraph/rhiunderqml/prebuilts_for_qmake/squircle_rhi.vert.qsb b/examples/quick/scenegraph/rhiunderqml/prebuilts_for_qmake/squircle_rhi.vert.qsb
new file mode 100644
index 0000000000..1e87cf09a7
--- /dev/null
+++ b/examples/quick/scenegraph/rhiunderqml/prebuilts_for_qmake/squircle_rhi.vert.qsb
Binary files differ
diff --git a/examples/quick/scenegraph/rhiunderqml/rhisquircle.cpp b/examples/quick/scenegraph/rhiunderqml/rhisquircle.cpp
new file mode 100644
index 0000000000..135cf128e3
--- /dev/null
+++ b/examples/quick/scenegraph/rhiunderqml/rhisquircle.cpp
@@ -0,0 +1,224 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include "rhisquircle.h"
+#include <QtQuick/QQuickWindow>
+#include <QtCore/QFile>
+#include <QtCore/QRunnable>
+
+#include <rhi/qrhi.h>
+
+class SquircleRenderer : public QObject
+{
+ Q_OBJECT
+public:
+ void setT(qreal t) { m_t = t; }
+ void setWindow(QQuickWindow *window) { m_window = window; }
+
+public slots:
+ void frameStart();
+ void mainPassRecordingStart();
+
+private:
+ qreal m_t = 0;
+ QQuickWindow *m_window;
+ QShader m_vertexShader;
+ QShader m_fragmentShader;
+ std::unique_ptr<QRhiBuffer> m_vertexBuffer;
+ std::unique_ptr<QRhiBuffer> m_uniformBuffer;
+ std::unique_ptr<QRhiShaderResourceBindings> m_srb;
+ std::unique_ptr<QRhiGraphicsPipeline> m_pipeline;
+};
+
+//! [init]
+RhiSquircle::RhiSquircle()
+{
+ connect(this, &QQuickItem::windowChanged, this, &RhiSquircle::handleWindowChanged);
+}
+
+void RhiSquircle::handleWindowChanged(QQuickWindow *win)
+{
+ if (win) {
+ connect(win, &QQuickWindow::beforeSynchronizing, this, &RhiSquircle::sync, Qt::DirectConnection);
+ connect(win, &QQuickWindow::sceneGraphInvalidated, this, &RhiSquircle::cleanup, Qt::DirectConnection);
+ // Ensure we start with cleared to black. The squircle's blend mode relies on this.
+ win->setColor(Qt::black);
+ }
+}
+//! [init]
+
+// The safe way to release custom graphics resources is to both connect to
+// sceneGraphInvalidated() and implement releaseResources(). To support
+// threaded render loops the latter performs the SquircleRenderer destruction
+// via scheduleRenderJob(). Note that the RhiSquircle may be gone by the time
+// the QRunnable is invoked.
+
+void RhiSquircle::cleanup()
+{
+ // This function is invoked on the render thread, if there is one.
+
+ delete m_renderer;
+ m_renderer = nullptr;
+}
+
+class CleanupJob : public QRunnable
+{
+public:
+ CleanupJob(SquircleRenderer *renderer) : m_renderer(renderer) { }
+ void run() override { delete m_renderer; }
+private:
+ SquircleRenderer *m_renderer;
+};
+
+void RhiSquircle::releaseResources()
+{
+ window()->scheduleRenderJob(new CleanupJob(m_renderer), QQuickWindow::BeforeSynchronizingStage);
+ m_renderer = nullptr;
+}
+
+void RhiSquircle::setT(qreal t)
+{
+ if (t == m_t)
+ return;
+ m_t = t;
+ emit tChanged();
+ if (window())
+ window()->update();
+}
+
+//! [sync]
+void RhiSquircle::sync()
+{
+ // This function is invoked on the render thread, if there is one.
+
+ if (!m_renderer) {
+ m_renderer = new SquircleRenderer;
+ // Initializing resources is done before starting to record the
+ // renderpass, regardless of wanting an underlay or overlay.
+ connect(window(), &QQuickWindow::beforeRendering, m_renderer, &SquircleRenderer::frameStart, Qt::DirectConnection);
+ // Here we want an underlay and therefore connect to
+ // beforeRenderPassRecording. Changing to afterRenderPassRecording
+ // would render the squircle on top (overlay).
+ connect(window(), &QQuickWindow::beforeRenderPassRecording, m_renderer, &SquircleRenderer::mainPassRecordingStart, Qt::DirectConnection);
+ }
+ m_renderer->setT(m_t);
+ m_renderer->setWindow(window());
+}
+//! [sync]
+
+static QShader getShader(const QString &name)
+{
+ QFile f(name);
+ if (f.open(QIODevice::ReadOnly))
+ return QShader::fromSerialized(f.readAll());
+
+ return QShader();
+}
+
+static const float vertices[] = {
+ -1, -1,
+ 1, -1,
+ -1, 1,
+ 1, 1
+};
+
+//! [frame-start]
+void SquircleRenderer::frameStart()
+{
+ // This function is invoked on the render thread, if there is one.
+
+ QRhi *rhi = m_window->rhi();
+ if (!rhi) {
+ qWarning("QQuickWindow is not using QRhi for rendering");
+ return;
+ }
+ QRhiSwapChain *swapChain = m_window->swapChain();
+ if (!swapChain) {
+ qWarning("No QRhiSwapChain?");
+ return;
+ }
+ QRhiResourceUpdateBatch *resourceUpdates = rhi->nextResourceUpdateBatch();
+
+ if (!m_pipeline) {
+ m_vertexShader = getShader(QLatin1String(":/scenegraph/rhiunderqml/squircle_rhi.vert.qsb"));
+ if (!m_vertexShader.isValid())
+ qWarning("Failed to load vertex shader; rendering will be incorrect");
+
+ m_fragmentShader = getShader(QLatin1String(":/scenegraph/rhiunderqml/squircle_rhi.frag.qsb"));
+ if (!m_fragmentShader.isValid())
+ qWarning("Failed to load fragment shader; rendering will be incorrect");
+
+ m_vertexBuffer.reset(rhi->newBuffer(QRhiBuffer::Immutable, QRhiBuffer::VertexBuffer, sizeof(vertices)));
+ m_vertexBuffer->create();
+ resourceUpdates->uploadStaticBuffer(m_vertexBuffer.get(), vertices);
+
+ const quint32 UBUF_SIZE = 4 + 4; // 2 floats
+ m_uniformBuffer.reset(rhi->newBuffer(QRhiBuffer::Dynamic, QRhiBuffer::UniformBuffer, UBUF_SIZE));
+ m_uniformBuffer->create();
+
+ float yDir = rhi->isYUpInNDC() ? 1.0f : -1.0f;
+ resourceUpdates->updateDynamicBuffer(m_uniformBuffer.get(), 4, 4, &yDir);
+
+ m_srb.reset(rhi->newShaderResourceBindings());
+ const auto visibleToAll = QRhiShaderResourceBinding::VertexStage | QRhiShaderResourceBinding::FragmentStage;
+ m_srb->setBindings({
+ QRhiShaderResourceBinding::uniformBuffer(0, visibleToAll, m_uniformBuffer.get())
+ });
+ m_srb->create();
+
+ QRhiVertexInputLayout inputLayout;
+ inputLayout.setBindings({
+ { 2 * sizeof(float) }
+ });
+ inputLayout.setAttributes({
+ { 0, 0, QRhiVertexInputAttribute::Float2, 0 }
+ });
+
+ m_pipeline.reset(rhi->newGraphicsPipeline());
+ m_pipeline->setTopology(QRhiGraphicsPipeline::TriangleStrip);
+ QRhiGraphicsPipeline::TargetBlend blend;
+ blend.enable = true;
+ blend.srcColor = QRhiGraphicsPipeline::SrcAlpha;
+ blend.srcAlpha = QRhiGraphicsPipeline::SrcAlpha;
+ blend.dstColor = QRhiGraphicsPipeline::One;
+ blend.dstAlpha = QRhiGraphicsPipeline::One;
+ m_pipeline->setTargetBlends({ blend });
+ m_pipeline->setShaderStages({
+ { QRhiShaderStage::Vertex, m_vertexShader },
+ { QRhiShaderStage::Fragment, m_fragmentShader }
+ });
+ m_pipeline->setVertexInputLayout(inputLayout);
+ m_pipeline->setShaderResourceBindings(m_srb.get());
+ m_pipeline->setRenderPassDescriptor(swapChain->currentFrameRenderTarget()->renderPassDescriptor());
+ m_pipeline->create();
+ }
+
+ float t = m_t;
+ resourceUpdates->updateDynamicBuffer(m_uniformBuffer.get(), 0, 4, &t);
+
+ swapChain->currentFrameCommandBuffer()->resourceUpdate(resourceUpdates);
+}
+//! [frame-start]
+
+//! [frame-render]
+void SquircleRenderer::mainPassRecordingStart()
+{
+ // This function is invoked on the render thread, if there is one.
+
+ QRhi *rhi = m_window->rhi();
+ QRhiSwapChain *swapChain = m_window->swapChain();
+ if (!rhi || !swapChain)
+ return;
+
+ const QSize outputPixelSize = swapChain->currentFrameRenderTarget()->pixelSize();
+ QRhiCommandBuffer *cb = m_window->swapChain()->currentFrameCommandBuffer();
+ cb->setViewport({ 0.0f, 0.0f, float(outputPixelSize.width()), float(outputPixelSize.height()) });
+ cb->setGraphicsPipeline(m_pipeline.get());
+ cb->setShaderResources();
+ const QRhiCommandBuffer::VertexInput vbufBinding(m_vertexBuffer.get(), 0);
+ cb->setVertexInput(0, 1, &vbufBinding);
+ cb->draw(4);
+}
+//! [frame-render]
+
+#include "rhisquircle.moc"
diff --git a/examples/quick/scenegraph/rhiunderqml/rhisquircle.h b/examples/quick/scenegraph/rhiunderqml/rhisquircle.h
new file mode 100644
index 0000000000..507e7b930f
--- /dev/null
+++ b/examples/quick/scenegraph/rhiunderqml/rhisquircle.h
@@ -0,0 +1,43 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#ifndef RHISQUIRCLE_H
+#define RHISQUIRCLE_H
+
+#include <QtQuick/QQuickItem>
+#include <QtQuick/QQuickWindow>
+
+class SquircleRenderer;
+
+//! [0]
+class RhiSquircle : public QQuickItem
+{
+ Q_OBJECT
+ Q_PROPERTY(qreal t READ t WRITE setT NOTIFY tChanged)
+ QML_ELEMENT
+
+public:
+ RhiSquircle();
+
+ qreal t() const { return m_t; }
+ void setT(qreal t);
+
+signals:
+ void tChanged();
+
+public slots:
+ void sync();
+ void cleanup();
+
+private slots:
+ void handleWindowChanged(QQuickWindow *win);
+
+private:
+ void releaseResources() override;
+
+ qreal m_t = 0;
+ SquircleRenderer *m_renderer = nullptr;
+};
+//! [0]
+
+#endif
diff --git a/examples/quick/scenegraph/rhiunderqml/rhiunderqml.pro b/examples/quick/scenegraph/rhiunderqml/rhiunderqml.pro
new file mode 100644
index 0000000000..af85005e80
--- /dev/null
+++ b/examples/quick/scenegraph/rhiunderqml/rhiunderqml.pro
@@ -0,0 +1,11 @@
+QT += gui-private qml quick
+CONFIG += qmltypes
+QML_IMPORT_NAME = RhiUnderQML
+QML_IMPORT_MAJOR_VERSION = 1
+
+HEADERS += rhisquircle.h
+SOURCES += rhisquircle.cpp main.cpp
+RESOURCES += rhiunderqml.qrc
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/scenegraph/rhiunderqml
+INSTALLS += target
diff --git a/examples/quick/scenegraph/rhiunderqml/rhiunderqml.qrc b/examples/quick/scenegraph/rhiunderqml/rhiunderqml.qrc
new file mode 100644
index 0000000000..690cb36444
--- /dev/null
+++ b/examples/quick/scenegraph/rhiunderqml/rhiunderqml.qrc
@@ -0,0 +1,7 @@
+<RCC>
+ <qresource prefix="/scenegraph/rhiunderqml">
+ <file>main.qml</file>
+ <file alias="squircle_rhi.vert.qsb">prebuilts_for_qmake/squircle_rhi.vert.qsb</file>
+ <file alias="squircle_rhi.frag.qsb">prebuilts_for_qmake/squircle_rhi.frag.qsb</file>
+ </qresource>
+</RCC>
diff --git a/examples/quick/scenegraph/scenegraph.pro b/examples/quick/scenegraph/scenegraph.pro
index a438bb8341..c37e822680 100644
--- a/examples/quick/scenegraph/scenegraph.pro
+++ b/examples/quick/scenegraph/scenegraph.pro
@@ -2,8 +2,7 @@ TEMPLATE = subdirs
qtConfig(opengl(es1|es2)?) {
SUBDIRS += \
- fboitem \
- openglunderqml \
+ openglunderqml
}
SUBDIRS += \
@@ -11,7 +10,9 @@ SUBDIRS += \
custommaterial \
graph \
threadedanimation \
- twotextureproviders
+ twotextureproviders \
+ rhiunderqml \
+ rhitextureitem
macos|ios {
SUBDIRS += \
diff --git a/examples/quick/scenegraph/shared/logorenderer.cpp b/examples/quick/scenegraph/shared/logorenderer.cpp
deleted file mode 100644
index 0c34fb4402..0000000000
--- a/examples/quick/scenegraph/shared/logorenderer.cpp
+++ /dev/null
@@ -1,266 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-#include "logorenderer.h"
-#include <QPainter>
-#include <QPaintEngine>
-#include <qmath.h>
-
-LogoRenderer::LogoRenderer()
-{
-}
-
-LogoRenderer::~LogoRenderer()
-{
-}
-
-
-void LogoRenderer::paintQtLogo()
-{
- program1.enableAttributeArray(normalAttr1);
- program1.enableAttributeArray(vertexAttr1);
- program1.setAttributeArray(vertexAttr1, vertices.constData());
- program1.setAttributeArray(normalAttr1, normals.constData());
- glDrawArrays(GL_TRIANGLES, 0, vertices.size());
- program1.disableAttributeArray(normalAttr1);
- program1.disableAttributeArray(vertexAttr1);
-}
-
-
-void LogoRenderer::initialize()
-{
- initializeOpenGLFunctions();
-
- glClearColor(0.1f, 0.1f, 0.2f, 1.0f);
-
- const char *vsrc1 =
- "attribute highp vec4 vertex;\n"
- "attribute mediump vec3 normal;\n"
- "uniform mediump mat4 matrix;\n"
- "varying mediump vec4 color;\n"
- "void main(void)\n"
- "{\n"
- " vec3 toLight = normalize(vec3(0.0, 0.3, 1.0));\n"
- " float angle = max(dot(normal, toLight), 0.0);\n"
- " vec3 col = vec3(0.40, 1.0, 0.0);\n"
- " color = vec4(col * 0.2 + col * 0.8 * angle, 1.0);\n"
- " color = clamp(color, 0.0, 1.0);\n"
- " gl_Position = matrix * vertex;\n"
- "}\n";
-
- const char *fsrc1 =
- "varying mediump vec4 color;\n"
- "void main(void)\n"
- "{\n"
- " gl_FragColor = color;\n"
- "}\n";
-
- program1.addCacheableShaderFromSourceCode(QOpenGLShader::Vertex, vsrc1);
- program1.addCacheableShaderFromSourceCode(QOpenGLShader::Fragment, fsrc1);
- program1.link();
-
- vertexAttr1 = program1.attributeLocation("vertex");
- normalAttr1 = program1.attributeLocation("normal");
- matrixUniform1 = program1.uniformLocation("matrix");
-
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
-
- m_fAngle = 0;
- m_fScale = 1;
- createGeometry();
-}
-
-void LogoRenderer::render()
-{
- glDepthMask(true);
-
- glClearColor(0.5f, 0.5f, 0.7f, 1.0f);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
-
- glFrontFace(GL_CW);
- glCullFace(GL_FRONT);
- glEnable(GL_CULL_FACE);
- glEnable(GL_DEPTH_TEST);
-
- QMatrix4x4 modelview;
- modelview.rotate(m_fAngle, 0.0f, 1.0f, 0.0f);
- modelview.rotate(m_fAngle, 1.0f, 0.0f, 0.0f);
- modelview.rotate(m_fAngle, 0.0f, 0.0f, 1.0f);
- modelview.scale(m_fScale);
- modelview.translate(0.0f, -0.2f, 0.0f);
-
- program1.bind();
- program1.setUniformValue(matrixUniform1, modelview);
- paintQtLogo();
- program1.release();
-
- glDisable(GL_DEPTH_TEST);
- glDisable(GL_CULL_FACE);
-
- m_fAngle += 1.0f;
-}
-
-void LogoRenderer::createGeometry()
-{
- vertices.clear();
- normals.clear();
-
- qreal x1 = +0.06f;
- qreal y1 = -0.14f;
- qreal x2 = +0.14f;
- qreal y2 = -0.06f;
- qreal x3 = +0.08f;
- qreal y3 = +0.00f;
- qreal x4 = +0.30f;
- qreal y4 = +0.22f;
-
- quad(x1, y1, x2, y2, y2, x2, y1, x1);
- quad(x3, y3, x4, y4, y4, x4, y3, x3);
-
- extrude(x1, y1, x2, y2);
- extrude(x2, y2, y2, x2);
- extrude(y2, x2, y1, x1);
- extrude(y1, x1, x1, y1);
- extrude(x3, y3, x4, y4);
- extrude(x4, y4, y4, x4);
- extrude(y4, x4, y3, x3);
-
- const qreal Pi = M_PI;
- const int NumSectors = 100;
-
- for (int i = 0; i < NumSectors; ++i) {
- qreal angle1 = (i * 2 * Pi) / NumSectors;
- qreal x5 = 0.30 * sin(angle1);
- qreal y5 = 0.30 * cos(angle1);
- qreal x6 = 0.20 * sin(angle1);
- qreal y6 = 0.20 * cos(angle1);
-
- qreal angle2 = ((i + 1) * 2 * Pi) / NumSectors;
- qreal x7 = 0.20 * sin(angle2);
- qreal y7 = 0.20 * cos(angle2);
- qreal x8 = 0.30 * sin(angle2);
- qreal y8 = 0.30 * cos(angle2);
-
- quad(x5, y5, x6, y6, x7, y7, x8, y8);
-
- extrude(x6, y6, x7, y7);
- extrude(x8, y8, x5, y5);
- }
-
- for (int i = 0;i < vertices.size();i++)
- vertices[i] *= 2.0f;
-}
-
-void LogoRenderer::quad(qreal x1, qreal y1, qreal x2, qreal y2, qreal x3, qreal y3, qreal x4, qreal y4)
-{
- vertices << QVector3D(x1, y1, -0.05f);
- vertices << QVector3D(x2, y2, -0.05f);
- vertices << QVector3D(x4, y4, -0.05f);
-
- vertices << QVector3D(x3, y3, -0.05f);
- vertices << QVector3D(x4, y4, -0.05f);
- vertices << QVector3D(x2, y2, -0.05f);
-
- QVector3D n = QVector3D::normal
- (QVector3D(x2 - x1, y2 - y1, 0.0f), QVector3D(x4 - x1, y4 - y1, 0.0f));
-
- normals << n;
- normals << n;
- normals << n;
-
- normals << n;
- normals << n;
- normals << n;
-
- vertices << QVector3D(x4, y4, 0.05f);
- vertices << QVector3D(x2, y2, 0.05f);
- vertices << QVector3D(x1, y1, 0.05f);
-
- vertices << QVector3D(x2, y2, 0.05f);
- vertices << QVector3D(x4, y4, 0.05f);
- vertices << QVector3D(x3, y3, 0.05f);
-
- n = QVector3D::normal
- (QVector3D(x2 - x4, y2 - y4, 0.0f), QVector3D(x1 - x4, y1 - y4, 0.0f));
-
- normals << n;
- normals << n;
- normals << n;
-
- normals << n;
- normals << n;
- normals << n;
-}
-
-void LogoRenderer::extrude(qreal x1, qreal y1, qreal x2, qreal y2)
-{
- vertices << QVector3D(x1, y1, +0.05f);
- vertices << QVector3D(x2, y2, +0.05f);
- vertices << QVector3D(x1, y1, -0.05f);
-
- vertices << QVector3D(x2, y2, -0.05f);
- vertices << QVector3D(x1, y1, -0.05f);
- vertices << QVector3D(x2, y2, +0.05f);
-
- QVector3D n = QVector3D::normal
- (QVector3D(x2 - x1, y2 - y1, 0.0f), QVector3D(0.0f, 0.0f, -0.1f));
-
- normals << n;
- normals << n;
- normals << n;
-
- normals << n;
- normals << n;
- normals << n;
-}
diff --git a/examples/quick/scenegraph/shared/logorenderer.h b/examples/quick/scenegraph/shared/logorenderer.h
deleted file mode 100644
index e39a2db57d..0000000000
--- a/examples/quick/scenegraph/shared/logorenderer.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-#ifndef LOGORENDERER_H
-#define LOGORENDERER_H
-
-#include <QtGui/qvector3d.h>
-#include <QtGui/qmatrix4x4.h>
-#include <qopenglshaderprogram.h>
-#include <qopenglfunctions.h>
-
-#include <QTime>
-#include <QList>
-
-class LogoRenderer : protected QOpenGLFunctions
-{
-public:
- LogoRenderer();
- ~LogoRenderer();
-
- void render();
- void initialize();
-
-private:
-
- qreal m_fAngle;
- qreal m_fScale;
-
- void paintQtLogo();
- void createGeometry();
- void quad(qreal x1, qreal y1, qreal x2, qreal y2, qreal x3, qreal y3, qreal x4, qreal y4);
- void extrude(qreal x1, qreal y1, qreal x2, qreal y2);
-
- QList<QVector3D> vertices;
- QList<QVector3D> normals;
- QOpenGLShaderProgram program1;
- int vertexAttr1;
- int normalAttr1;
- int matrixUniform1;
-};
-#endif
diff --git a/examples/quick/scenegraph/shared/squircle_rhi.frag b/examples/quick/scenegraph/shared/squircle_rhi.frag
index 8da62b93e6..83669bdfaa 100644
--- a/examples/quick/scenegraph/shared/squircle_rhi.frag
+++ b/examples/quick/scenegraph/shared/squircle_rhi.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#version 440
layout(location = 0) in vec2 coords;
@@ -5,12 +8,13 @@ layout(location = 0) out vec4 fragColor;
layout(std140, binding = 0) uniform buf {
float t;
-} ubuf;
+ float y_dir;
+};
void main()
{
- float i = 1. - (pow(abs(coords.x), 4.) + pow(abs(coords.y), 4.));
- i = smoothstep(ubuf.t - 0.8, ubuf.t + 0.8, i);
- i = floor(i * 20.) / 20.;
- fragColor = vec4(coords * .5 + .5, i, i);
+ float i = 1.0 - (pow(abs(coords.x), 4.0) + pow(abs(coords.y), 4.0));
+ i = smoothstep(t - 0.8, t + 0.8, i);
+ i = floor(i * 20.0) / 20.0;
+ fragColor = vec4(coords * 0.5 + 0.5, i, i);
}
diff --git a/examples/quick/scenegraph/shared/squircle_rhi.vert b/examples/quick/scenegraph/shared/squircle_rhi.vert
index b57dfdfe10..bf079ab786 100644
--- a/examples/quick/scenegraph/shared/squircle_rhi.vert
+++ b/examples/quick/scenegraph/shared/squircle_rhi.vert
@@ -1,13 +1,16 @@
#version 440
layout(location = 0) in vec4 vertices;
-
layout(location = 0) out vec2 coords;
-out gl_PerVertex { vec4 gl_Position; };
+layout(std140, binding = 0) uniform buf {
+ float t;
+ float y_dir;
+};
void main()
{
gl_Position = vertices;
coords = vertices.xy;
+ coords.y *= y_dir;
}
diff --git a/examples/quick/scenegraph/threadedanimation/CMakeLists.txt b/examples/quick/scenegraph/threadedanimation/CMakeLists.txt
index de00297e69..0945a13c98 100644
--- a/examples/quick/scenegraph/threadedanimation/CMakeLists.txt
+++ b/examples/quick/scenegraph/threadedanimation/CMakeLists.txt
@@ -1,63 +1,44 @@
-# Generated from threadedanimation.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(threadedanimation LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup()
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/scenegraph/threadedanimation")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Quick)
-
-qt_add_executable(threadedanimation
+qt_add_executable(threadedanimation WIN32 MACOSX_BUNDLE
main.cpp
spinner.cpp spinner.h
)
-set_target_properties(threadedanimation PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(threadedanimation PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-# Resources:
-set(threadedanimation_resource_files
- "main.qml"
- "spinner.png"
+target_link_libraries(threadedanimation PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
-qt6_add_resources(threadedanimation "threadedanimation"
- PREFIX
- "/scenegraph/threadedanimation"
- FILES
- ${threadedanimation_resource_files}
+qt_add_qml_module(threadedanimation
+ URI Spinner
+ QML_FILES main.qml
+ RESOURCES spinner.png
+ RESOURCE_PREFIX /scenegraph/threadedanimation
+ NO_RESOURCE_TARGET_PATH
)
install(TARGETS threadedanimation
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-set_target_properties(threadedanimation PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI Spinner
+qt_generate_deploy_qml_app_script(
+ TARGET threadedanimation
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
-
-qt6_qml_type_registration(threadedanimation)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/scenegraph/threadedanimation/doc/images/threadedanimation-example.jpg b/examples/quick/scenegraph/threadedanimation/doc/images/threadedanimation-example.jpg
new file mode 100644
index 0000000000..42c886b7ab
--- /dev/null
+++ b/examples/quick/scenegraph/threadedanimation/doc/images/threadedanimation-example.jpg
Binary files differ
diff --git a/examples/quick/scenegraph/threadedanimation/doc/src/threadedanimation.qdoc b/examples/quick/scenegraph/threadedanimation/doc/src/threadedanimation.qdoc
new file mode 100644
index 0000000000..01b842d07a
--- /dev/null
+++ b/examples/quick/scenegraph/threadedanimation/doc/src/threadedanimation.qdoc
@@ -0,0 +1,33 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+
+/*!
+ \example scenegraph/threadedanimation
+ \title Scene Graph - Threaded Animation
+ \examplecategory {Graphics}
+ \ingroup qtquickexamples
+ \brief Shows benefits of custom items animating independently of the main thread while using the threaded render loop of Qt Quick.
+
+ \image threadedanimation-example.jpg
+
+ This example shows the fundamental concept behind the \l Animator types, by
+ implementing a custom item that effectively animates itself by not relying
+ on the standard Qt Quick animation framework driven on the main thread.
+
+ The left and right spinners should behave identically under normal
+ conditions. However, once the example blocks the main thread by peforming
+ some heavy operation, it will become noticeable that the left spinner is not
+ animating smoothly anymore.
+
+ \note This example should be run with the \c threaded render loop of Qt
+ Quick. This is the default in most cases. There are no positive effects when
+ using the \c basic render loop, because there everything, including all
+ rendering, happens on the main thread.
+
+ Applications without custom QQuickItem implementations can get the same
+ benefits by using one of the \l Animator types, such as \l XAnimator or \l
+ OpacityAnimator from QML. Whereas when building custom items, similar
+ results can be achieved by following the example's implementation.
+
+ \sa {Qt Quick Scene Graph}
+ */
diff --git a/examples/quick/scenegraph/threadedanimation/main.cpp b/examples/quick/scenegraph/threadedanimation/main.cpp
index 85ff486b16..9b2b82973e 100644
--- a/examples/quick/scenegraph/threadedanimation/main.cpp
+++ b/examples/quick/scenegraph/threadedanimation/main.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QGuiApplication>
#include <QtQuick/QQuickView>
@@ -61,5 +14,5 @@ int main(int argc, char **argv)
view.setSource(QUrl("qrc:///scenegraph/threadedanimation/main.qml"));
view.show();
- return app.exec();
+ return QGuiApplication::exec();
}
diff --git a/examples/quick/scenegraph/threadedanimation/main.qml b/examples/quick/scenegraph/threadedanimation/main.qml
index 279ffe5bd6..23def8fbcf 100644
--- a/examples/quick/scenegraph/threadedanimation/main.qml
+++ b/examples/quick/scenegraph/threadedanimation/main.qml
@@ -1,56 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//! [1]
-import QtQuick 2.0
-import Spinner 1.0
+import QtQuick
+import Spinner
Rectangle {
@@ -74,7 +27,7 @@ Rectangle {
Text {
id: blockingLabel
color: blocker.running ? "red" : "black"
- text: blocker.running ? "Blocked!" : "Not blocked"
+ text: blocker.running ? qsTr("Blocked!") : qsTr("Not blocked")
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 100
@@ -133,7 +86,7 @@ Rectangle {
id: label
color: "black"
wrapMode: Text.WordWrap
- text: "This application shows two spinners. The one to the right is animated on the scene graph thread (when applicable) and the left one is using the normal Qt Quick animation system."
+ text: qsTr("This application shows two spinners. The one to the right is animated on the scene graph thread (when applicable) and the left one is using the normal Qt Quick animation system.")
anchors.right: parent.right
anchors.left: parent.left
anchors.bottom: parent.bottom
diff --git a/examples/quick/scenegraph/threadedanimation/spinner.cpp b/examples/quick/scenegraph/threadedanimation/spinner.cpp
index c19354b3f5..befc40d98f 100644
--- a/examples/quick/scenegraph/threadedanimation/spinner.cpp
+++ b/examples/quick/scenegraph/threadedanimation/spinner.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "spinner.h"
diff --git a/examples/quick/scenegraph/threadedanimation/spinner.h b/examples/quick/scenegraph/threadedanimation/spinner.h
index fd3eaa7751..87e43e77e1 100644
--- a/examples/quick/scenegraph/threadedanimation/spinner.h
+++ b/examples/quick/scenegraph/threadedanimation/spinner.h
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef SPINNER_H
#define SPINNER_H
@@ -67,7 +20,7 @@ public:
void setSpinning(bool spinning);
protected:
- QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *);
+ QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;
signals:
void spinningChanged();
diff --git a/examples/quick/scenegraph/twotextureproviders/CMakeLists.txt b/examples/quick/scenegraph/twotextureproviders/CMakeLists.txt
index 5515a14b23..cf597d3f0b 100644
--- a/examples/quick/scenegraph/twotextureproviders/CMakeLists.txt
+++ b/examples/quick/scenegraph/twotextureproviders/CMakeLists.txt
@@ -1,65 +1,56 @@
-# Generated from twotextureproviders.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(twotextureproviders LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick ShaderTools)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup()
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/scenegraph/twotextureproviders")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Quick)
-
-qt_add_executable(twotextureproviders
+qt_add_executable(twotextureproviders WIN32 MACOSX_BUNDLE
main.cpp
xorblender.cpp xorblender.h
)
-set_target_properties(twotextureproviders PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(twotextureproviders PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
+target_link_libraries(twotextureproviders PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
-# Resources:
-set(twotextureproviders_resource_files
- "main.qml"
- "shaders/checker.frag.qsb"
- "shaders/xorblender.frag.qsb"
- "shaders/xorblender.vert.qsb"
+qt_add_qml_module(twotextureproviders
+ URI SceneGraphRendering
+ QML_FILES
+ main.qml
+ RESOURCE_PREFIX /scenegraph/twotextureproviders
+ NO_RESOURCE_TARGET_PATH
)
-qt6_add_resources(twotextureproviders "twotextureproviders"
+qt6_add_shaders(twotextureproviders "shaders"
+ BATCHABLE
+ PRECOMPILE
+ OPTIMIZED
PREFIX
"/scenegraph/twotextureproviders"
FILES
- ${twotextureproviders_resource_files}
+ "shaders/xorblender.vert"
+ "shaders/xorblender.frag"
+ "shaders/checker.frag"
)
install(TARGETS twotextureproviders
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-set_target_properties(twotextureproviders PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI SceneGraphRendering
+qt_generate_deploy_qml_app_script(
+ TARGET twotextureproviders
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
-
-qt6_qml_type_registration(twotextureproviders)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/scenegraph/twotextureproviders/doc/src/twotextureproviders.qdoc b/examples/quick/scenegraph/twotextureproviders/doc/src/twotextureproviders.qdoc
index ad0eb849e3..1bdd1ab551 100644
--- a/examples/quick/scenegraph/twotextureproviders/doc/src/twotextureproviders.qdoc
+++ b/examples/quick/scenegraph/twotextureproviders/doc/src/twotextureproviders.qdoc
@@ -1,33 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Gunnar Sletta <gunnar@sletta.org>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2014 Gunnar Sletta <gunnar@sletta.org>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\example scenegraph/twotextureproviders
\title Scene Graph - Two Texture Providers
+ \examplecategory {Graphics}
\ingroup qtquickexamples
\brief Shows how to combine two textures from two texture providers in a custom scene graph node.
diff --git a/examples/quick/scenegraph/twotextureproviders/main.cpp b/examples/quick/scenegraph/twotextureproviders/main.cpp
index 669b42cb40..e987147bbb 100644
--- a/examples/quick/scenegraph/twotextureproviders/main.cpp
+++ b/examples/quick/scenegraph/twotextureproviders/main.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Gunnar Sletta <gunnar@sletta.org>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2014 Gunnar Sletta <gunnar@sletta.org>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QGuiApplication>
@@ -65,5 +18,5 @@ int main(int argc, char **argv)
view.setSource(QUrl("qrc:///scenegraph/twotextureproviders/main.qml"));
view.show();
- return app.exec();
+ return QGuiApplication::exec();
}
diff --git a/examples/quick/scenegraph/twotextureproviders/main.qml b/examples/quick/scenegraph/twotextureproviders/main.qml
index e18cfd56e1..13d229631e 100644
--- a/examples/quick/scenegraph/twotextureproviders/main.qml
+++ b/examples/quick/scenegraph/twotextureproviders/main.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Gunnar Sletta <gunnar@sletta.org>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.2
-import SceneGraphRendering 1.0
+// Copyright (C) 2014 Gunnar Sletta <gunnar@sletta.org>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import SceneGraphRendering
Item {
id: root
@@ -98,7 +51,7 @@ Item {
Text {
anchors.centerIn: parent
color: "black" // Qt.hsla(0.8, 0.8, 0.8);
- text: "Qt\nQuick"
+ text: qsTr("Qt\nQuick")
horizontalAlignment: Text.AlignHCenter
@@ -136,8 +89,6 @@ Item {
anchors.bottom: parent.bottom
anchors.margins: 20
wrapMode: Text.WordWrap
- text: "This example creates two animated items and sets 'layer.enabled: true' on both of them. " +
- "This turns the items into texture providers and we can access their texture from C++ in a custom material. " +
- "The XorBlender is a custom C++ item which uses performs an Xor blend between them."
+ text: qsTr("This example creates two animated items and sets 'layer.enabled: true' on both of them. This turns the items into texture providers and we can access their texture from C++ in a custom material. The XorBlender is a custom C++ item which uses performs an Xor blend between them.")
}
}
diff --git a/examples/quick/scenegraph/twotextureproviders/shaders/checker.frag b/examples/quick/scenegraph/twotextureproviders/shaders/checker.frag
index 0932bc8c37..c684a2cedd 100644
--- a/examples/quick/scenegraph/twotextureproviders/shaders/checker.frag
+++ b/examples/quick/scenegraph/twotextureproviders/shaders/checker.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#version 440
layout(location = 0) in vec2 qt_TexCoord0;
diff --git a/examples/quick/scenegraph/twotextureproviders/shaders/compile.bat b/examples/quick/scenegraph/twotextureproviders/shaders/compile.bat
deleted file mode 100644
index 99e0ff2a91..0000000000
--- a/examples/quick/scenegraph/twotextureproviders/shaders/compile.bat
+++ /dev/null
@@ -1,42 +0,0 @@
-:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-::
-:: Copyright (C) 2020 The Qt Company Ltd.
-:: Contact: https://www.qt.io/licensing/
-::
-:: This file is part of the QtQuick module of the Qt Toolkit.
-::
-:: $QT_BEGIN_LICENSE:LGPL$
-:: Commercial License Usage
-:: Licensees holding valid commercial Qt licenses may use this file in
-:: accordance with the commercial license agreement provided with the
-:: Software or, alternatively, in accordance with the terms contained in
-:: a written agreement between you and The Qt Company. For licensing terms
-:: and conditions see https://www.qt.io/terms-conditions. For further
-:: information use the contact form at https://www.qt.io/contact-us.
-::
-:: GNU Lesser General Public License Usage
-:: Alternatively, this file may be used under the terms of the GNU Lesser
-:: General Public License version 3 as published by the Free Software
-:: Foundation and appearing in the file LICENSE.LGPL3 included in the
-:: packaging of this file. Please review the following information to
-:: ensure the GNU Lesser General Public License version 3 requirements
-:: will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-::
-:: GNU General Public License Usage
-:: Alternatively, this file may be used under the terms of the GNU
-:: General Public License version 2.0 or (at your option) the GNU General
-:: Public license version 3 or any later version approved by the KDE Free
-:: Qt Foundation. The licenses are as published by the Free Software
-:: Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-:: included in the packaging of this file. Please review the following
-:: information to ensure the GNU General Public License requirements will
-:: be met: https://www.gnu.org/licenses/gpl-2.0.html and
-:: https://www.gnu.org/licenses/gpl-3.0.html.
-::
-:: $QT_END_LICENSE$
-::
-:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-
-qsb --glsl "100es,120,150" --hlsl 50 --msl 12 -c -O -o checker.frag.qsb checker.frag
-qsb -b --glsl "100es,120,150" --hlsl 50 --msl 12 -c -O -o xorblender.vert.qsb xorblender.vert
-qsb --glsl "100es,120,150" --hlsl 50 --msl 12 -c -O -o xorblender.frag.qsb xorblender.frag
diff --git a/examples/quick/scenegraph/twotextureproviders/shaders/xorblender.frag b/examples/quick/scenegraph/twotextureproviders/shaders/xorblender.frag
index bc68160c1f..8587ae5316 100644
--- a/examples/quick/scenegraph/twotextureproviders/shaders/xorblender.frag
+++ b/examples/quick/scenegraph/twotextureproviders/shaders/xorblender.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#version 440
layout(location = 0) in vec2 vTexCoord;
diff --git a/examples/quick/scenegraph/twotextureproviders/xorblender.cpp b/examples/quick/scenegraph/twotextureproviders/xorblender.cpp
index 87ef00aeac..5d6ffb3805 100644
--- a/examples/quick/scenegraph/twotextureproviders/xorblender.cpp
+++ b/examples/quick/scenegraph/twotextureproviders/xorblender.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Gunnar Sletta <gunnar@sletta.org>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2014 Gunnar Sletta <gunnar@sletta.org>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "xorblender.h"
diff --git a/examples/quick/scenegraph/twotextureproviders/xorblender.h b/examples/quick/scenegraph/twotextureproviders/xorblender.h
index 17557b8efd..1ed5f6571a 100644
--- a/examples/quick/scenegraph/twotextureproviders/xorblender.h
+++ b/examples/quick/scenegraph/twotextureproviders/xorblender.h
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Gunnar Sletta <gunnar@sletta.org>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2014 Gunnar Sletta <gunnar@sletta.org>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef XORBLENDER_H
#define XORBLENDER_H
@@ -61,7 +14,7 @@ class XorBlender : public QQuickItem
QML_ELEMENT
public:
- explicit XorBlender(QQuickItem *parent = 0);
+ explicit XorBlender(QQuickItem *parent = nullptr);
QQuickItem *source1() const { return m_source1; }
QQuickItem *source2() const { return m_source2; }
diff --git a/examples/quick/scenegraph/vulkantextureimport/CMakeLists.txt b/examples/quick/scenegraph/vulkantextureimport/CMakeLists.txt
index b26aedf6ee..778fe5bd87 100644
--- a/examples/quick/scenegraph/vulkantextureimport/CMakeLists.txt
+++ b/examples/quick/scenegraph/vulkantextureimport/CMakeLists.txt
@@ -1,64 +1,52 @@
-# Generated from vulkantextureimport.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(vulkantextureimport LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup()
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/scenegraph/vulkantextureimport")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Quick)
-
-qt_add_executable(vulkantextureimport
+qt_add_executable(vulkantextureimport WIN32 MACOSX_BUNDLE
main.cpp
vulkantextureimport.cpp vulkantextureimport.h
)
+
set_target_properties(vulkantextureimport PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
+ # Prevent name clash with build subdirectory on case-insensitive file systems
+ OUTPUT_NAME vulkantextureimportapp
)
-target_link_libraries(vulkantextureimport PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-# Resources:
-set(vulkantextureimport_resource_files
- "main.qml"
- "squircle.frag.spv"
- "squircle.vert.spv"
+target_link_libraries(vulkantextureimport PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
-qt6_add_resources(vulkantextureimport "vulkantextureimport"
- PREFIX
- "/scenegraph/vulkantextureimport"
- FILES
- ${vulkantextureimport_resource_files}
+qt_add_qml_module(vulkantextureimport
+ URI VulkanTextureImport
+ QML_FILES
+ main.qml
+ RESOURCES
+ squircle.frag.spv
+ squircle.vert.spv
+ RESOURCE_PREFIX /scenegraph/vulkantextureimport
+ NO_RESOURCE_TARGET_PATH
)
install(TARGETS vulkantextureimport
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-set_target_properties(vulkantextureimport PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI VulkanTextureImport
+qt_generate_deploy_qml_app_script(
+ TARGET vulkantextureimport
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
-
-qt6_qml_type_registration(vulkantextureimport)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/scenegraph/vulkantextureimport/doc/src/vulkantextureimport.qdoc b/examples/quick/scenegraph/vulkantextureimport/doc/src/vulkantextureimport.qdoc
index 6da6b7ab6d..97e7d8045f 100644
--- a/examples/quick/scenegraph/vulkantextureimport/doc/src/vulkantextureimport.qdoc
+++ b/examples/quick/scenegraph/vulkantextureimport/doc/src/vulkantextureimport.qdoc
@@ -1,35 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\example scenegraph/vulkantextureimport
\title Scene Graph - Vulkan Texture Import
+ \examplecategory {Graphics}
\ingroup qtquickexamples
- \brief Shows how to use a texture created directly with use a texture created directly withulkan.
+ \brief Shows how to use a texture created directly with Vulkan.
\image vulkantextureimport-example.jpg
diff --git a/examples/quick/scenegraph/vulkantextureimport/main.cpp b/examples/quick/scenegraph/vulkantextureimport/main.cpp
index d2eb5184dc..3550bd782e 100644
--- a/examples/quick/scenegraph/vulkantextureimport/main.cpp
+++ b/examples/quick/scenegraph/vulkantextureimport/main.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QGuiApplication>
#include <QtQuick/QQuickView>
@@ -55,7 +8,7 @@ int main(int argc, char **argv)
{
QGuiApplication app(argc, argv);
- QQuickWindow::setGraphicsApi(QSGRendererInterface::VulkanRhi);
+ QQuickWindow::setGraphicsApi(QSGRendererInterface::Vulkan);
QQuickView view;
view.setResizeMode(QQuickView::SizeRootObjectToView);
diff --git a/examples/quick/scenegraph/vulkantextureimport/main.qml b/examples/quick/scenegraph/vulkantextureimport/main.qml
index 91adf4c394..e718258e40 100644
--- a/examples/quick/scenegraph/vulkantextureimport/main.qml
+++ b/examples/quick/scenegraph/vulkantextureimport/main.qml
@@ -1,56 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
//! [1]
-import VulkanTextureImport 1.0
+import VulkanTextureImport
//! [1]
Rectangle {
@@ -118,6 +71,6 @@ Rectangle {
anchors.right: renderer.right
anchors.margins: 20
wrapMode: Text.WordWrap
- text: "The squircle, using rendering code borrowed from the vulkanunderqml example, is rendered into a texture directly with Vulkan. The VkImage is then imported and used in a custom Qt Quick item."
+ text: qsTr("The squircle, using rendering code borrowed from the vulkanunderqml example, is rendered into a texture directly with Vulkan. The VkImage is then imported and used in a custom Qt Quick item.")
}
}
diff --git a/examples/quick/scenegraph/vulkantextureimport/vulkantextureimport.cpp b/examples/quick/scenegraph/vulkantextureimport/vulkantextureimport.cpp
index 26b75d54bb..dce74ae279 100644
--- a/examples/quick/scenegraph/vulkantextureimport/vulkantextureimport.cpp
+++ b/examples/quick/scenegraph/vulkantextureimport/vulkantextureimport.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "vulkantextureimport.h"
diff --git a/examples/quick/scenegraph/vulkantextureimport/vulkantextureimport.h b/examples/quick/scenegraph/vulkantextureimport/vulkantextureimport.h
index 401b5546f9..617577038e 100644
--- a/examples/quick/scenegraph/vulkantextureimport/vulkantextureimport.h
+++ b/examples/quick/scenegraph/vulkantextureimport/vulkantextureimport.h
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef VULKANTEXTUREIMPORT_H
#define VULKANTEXTUREIMPORT_H
diff --git a/examples/quick/scenegraph/vulkanunderqml/CMakeLists.txt b/examples/quick/scenegraph/vulkanunderqml/CMakeLists.txt
index 96741c6e86..12b07b4518 100644
--- a/examples/quick/scenegraph/vulkanunderqml/CMakeLists.txt
+++ b/examples/quick/scenegraph/vulkanunderqml/CMakeLists.txt
@@ -1,64 +1,52 @@
-# Generated from vulkanunderqml.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(vulkanunderqml LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup()
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/scenegraph/vulkanunderqml")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Quick)
-
-qt_add_executable(vulkanunderqml
+qt_add_executable(vulkanunderqml WIN32 MACOSX_BUNDLE
main.cpp
vulkansquircle.cpp vulkansquircle.h
)
+
set_target_properties(vulkanunderqml PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
+ # Prevent name clash with build subdirectory on case-insensitive file systems
+ OUTPUT_NAME vulkanunderqmlapp
)
-target_link_libraries(vulkanunderqml PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-# Resources:
-set(vulkanunderqml_resource_files
- "main.qml"
- "squircle.frag.spv"
- "squircle.vert.spv"
+target_link_libraries(vulkanunderqml PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
-qt6_add_resources(vulkanunderqml "vulkanunderqml"
- PREFIX
- "/scenegraph/vulkanunderqml"
- FILES
- ${vulkanunderqml_resource_files}
+qt_add_qml_module(vulkanunderqml
+ URI VulkanUnderQML
+ QML_FILES
+ main.qml
+ RESOURCES
+ squircle.frag.spv
+ squircle.vert.spv
+ RESOURCE_PREFIX /scenegraph/vulkanunderqml
+ NO_RESOURCE_TARGET_PATH
)
install(TARGETS vulkanunderqml
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-set_target_properties(vulkanunderqml PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI VulkanUnderQML
+qt_generate_deploy_qml_app_script(
+ TARGET vulkanunderqml
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
-
-qt6_qml_type_registration(vulkanunderqml)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/scenegraph/vulkanunderqml/doc/src/vulkanunderqml.qdoc b/examples/quick/scenegraph/vulkanunderqml/doc/src/vulkanunderqml.qdoc
index d11982c074..bb29731554 100644
--- a/examples/quick/scenegraph/vulkanunderqml/doc/src/vulkanunderqml.qdoc
+++ b/examples/quick/scenegraph/vulkanunderqml/doc/src/vulkanunderqml.qdoc
@@ -1,63 +1,23 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\example scenegraph/vulkanunderqml
\title Scene Graph - Vulkan Under QML
+ \examplecategory {Graphics}
\ingroup qtquickexamples
- \brief Shows how to render directly with vulkan under a Qt Quick scene.
+ \brief Shows how to render directly with Vulkan under a Qt Quick scene.
\image vulkanunderqml-example.jpg
- The Vulkan Under QML example shows how an application can make use of the
- \l QQuickWindow::beforeRendering() and \l
- QQuickWindow::beforeRenderPassRecording() signals to draw custom Vulkan
- content under a Qt Quick scene. This signal is emitted at the start of
- every frame, before the scene graph starts its rendering, thus any Vulkan
- draw calls that are made as a response to this signal, will stack under the
- Qt Quick items. There are two signals, because the custom Vulkan commands
- are recorded onto the same command buffer that is used by the scene graph.
- beforeRendering() on its own is not sufficient for this because it gets
- emitted at the start of the frame, before recording the start of a
- renderpass instance via
- \l{https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdBeginRenderPass.html}{vkCmdBeginRenderPass}.
- By also connecting to beforeRenderPassRecording(), the application's own
- commands and the scene graph's scaffolding will end up in the right order.
+ \note Compiling this example requires an SDK. See \l{Vulkan Integration} for
+ information on what to install.
- As an alternative, applications that wish to render Vulkan content
- on top of the Qt Quick scene, can do so by connecting to the \l
- QQuickWindow::afterRendering() and \l
- QQuickWindow::afterRenderPassRecording() signals.
+ \section1 Overview
- In this example, we will also see how it is possible to have
- values that are exposed to QML which affect the Vulkan
- rendering. We animate the threshold value using a NumberAnimation
- in the QML file and this value is used by the SPIR-V shader
- program that draws the squircles.
+ This example makes use of the \l QQuickWindow::beforeRendering()
+ and \l QQuickWindow::beforeRenderPassRecording() signals to draw custom Vulkan
+ content under a Qt Quick scene. QML is used to render a text label on top.
The example is equivalent in most ways to the \l{Scene Graph - OpenGL Under
QML}{OpenGL Under QML}, \l{Scene Graph - Direct3D 11 Under QML}{Direct3D 11
@@ -65,4 +25,60 @@
examples, they all render the same custom content, just via different
native APIs.
+ The particulars of utilizing QML will be covered in this documentation
+ without delving into the detail of custom Vulkan rendering.
+
+ \section1 Affecting Vulkan rendering from QML
+
+ The example shows how to use values that are exposed to QML to control
+ Vulkan rendering.
+
+ To expose the threshold value \c t to QML, in the definition of \c VulkanSquircle,
+ we use the \l Q_OBJECT, \l Q_PROPERTY, and \l QML_ELEMENT macros like so:
+
+ \quotefromfile scenegraph/vulkanunderqml/vulkansquircle.h
+ \skipto class VulkanSquircle
+ \printto public:
+
+ We then go on to declare public and private items:
+
+ \printto };
+
+ Then in \c main.qml we animate the threshold value using a \l NumberAnimation.
+
+ \quotefromfile scenegraph/vulkanunderqml/main.qml
+ \skipto VulkanSquircle {
+ \printto running: true
+ The \c t variable is ultimately used by the SPIR-V shader program that draws
+ the squircles.
+
+ \section1 Using signals to render custom Vulkan content
+
+ The \l QQuickWindow::beforeRendering()
+ and \l QQuickWindow::beforeRenderPassRecording() signals are what are used.
+
+ The QQuickWindow::beforeRendering() signal is emitted at the start of
+ every frame, before the scene graph starts its rendering. This means any Vulkan
+ draw calls that are made as a response to this signal, will stack under the
+ Qt Quick items. There are two signals because the custom Vulkan commands
+ are recorded onto the same command buffer used by the scene graph.
+
+ The beforeRendering() function on its own is not sufficient for this, because
+ it gets emitted at the start of the frame, before recording the start of a
+ \c renderpass instance by using
+ \l{https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdBeginRenderPass.html}{vkCmdBeginRenderPass}.
+
+ The solution: by connecting to beforeRenderPassRecording(), the application's
+ own commands and the scene graph's scaffolding will end up in the right order.
+
+ Connecting the signals is done by the \c sync() function:
+
+ \quotefromfile scenegraph/vulkanunderqml/vulkansquircle.cpp
+ \skipto void VulkanSquircle::sync()
+ \printto m_renderer->setWindow(window());
+
+ Another way you can render Vulkan content on top of the Qt Quick scene is by
+ connecting to the \l QQuickWindow::afterRendering() and
+ \l QQuickWindow::afterRenderPassRecording() signals.
+
*/
diff --git a/examples/quick/scenegraph/vulkanunderqml/main.cpp b/examples/quick/scenegraph/vulkanunderqml/main.cpp
index e4a3f36ca7..03e48fba84 100644
--- a/examples/quick/scenegraph/vulkanunderqml/main.cpp
+++ b/examples/quick/scenegraph/vulkanunderqml/main.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QGuiApplication>
#include <QtQuick/QQuickView>
@@ -56,7 +9,7 @@ int main(int argc, char **argv)
QGuiApplication app(argc, argv);
// This example needs Vulkan. It will not run otherwise.
- QQuickWindow::setGraphicsApi(QSGRendererInterface::VulkanRhi);
+ QQuickWindow::setGraphicsApi(QSGRendererInterface::Vulkan);
QQuickView view;
view.setResizeMode(QQuickView::SizeRootObjectToView);
diff --git a/examples/quick/scenegraph/vulkanunderqml/main.qml b/examples/quick/scenegraph/vulkanunderqml/main.qml
index c364ca7636..4981c352de 100644
--- a/examples/quick/scenegraph/vulkanunderqml/main.qml
+++ b/examples/quick/scenegraph/vulkanunderqml/main.qml
@@ -1,56 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//! [1]
-import QtQuick 2.0
-import VulkanUnderQML 1.0
+import QtQuick
+import VulkanUnderQML
Item {
@@ -79,7 +32,7 @@ Item {
id: label
color: "black"
wrapMode: Text.WordWrap
- text: "The background here is a squircle rendered with raw Vulkan using the beforeRendering() and beforeRenderPassRecording() signals in QQuickWindow. This text label and its border is rendered using QML"
+ text: qsTr("The background here is a squircle rendered with raw Vulkan using the beforeRendering() and beforeRenderPassRecording() signals in QQuickWindow. This text label and its border is rendered using QML")
anchors.right: parent.right
anchors.left: parent.left
anchors.bottom: parent.bottom
diff --git a/examples/quick/scenegraph/vulkanunderqml/vulkansquircle.cpp b/examples/quick/scenegraph/vulkanunderqml/vulkansquircle.cpp
index 5942b49843..6b47cde93d 100644
--- a/examples/quick/scenegraph/vulkanunderqml/vulkansquircle.cpp
+++ b/examples/quick/scenegraph/vulkanunderqml/vulkansquircle.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "vulkansquircle.h"
#include <QtCore/QRunnable>
@@ -205,7 +158,7 @@ void SquircleRenderer::frameStart()
QSGRendererInterface *rif = m_window->rendererInterface();
// We are not prepared for anything other than running with the RHI and its Vulkan backend.
- Q_ASSERT(rif->graphicsApi() == QSGRendererInterface::VulkanRhi);
+ Q_ASSERT(rif->graphicsApi() == QSGRendererInterface::Vulkan);
if (m_vert.isEmpty())
prepareShader(VertexStage);
@@ -305,8 +258,6 @@ static inline VkDeviceSize aligned(VkDeviceSize v, VkDeviceSize byteAlign)
void SquircleRenderer::init(int framesInFlight)
{
- qDebug("init");
-
Q_ASSERT(framesInFlight <= 3);
m_initialized = true;
@@ -391,7 +342,7 @@ void SquircleRenderer::init(int framesInFlight)
// example.
// We use one memory allocation for all uniform buffers, but then have to
- // watch out for the buffer offset aligment requirement, which may be as
+ // watch out for the buffer offset alignment requirement, which may be as
// large as 256 bytes.
m_allocPerUbuf = aligned(UBUF_SIZE, physDevProps.limits.minUniformBufferOffsetAlignment);
diff --git a/examples/quick/scenegraph/vulkanunderqml/vulkansquircle.h b/examples/quick/scenegraph/vulkanunderqml/vulkansquircle.h
index fd0114535f..0bdebc7ac6 100644
--- a/examples/quick/scenegraph/vulkanunderqml/vulkansquircle.h
+++ b/examples/quick/scenegraph/vulkanunderqml/vulkansquircle.h
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef VULKANSQUIRCLE_H
#define VULKANSQUIRCLE_H
diff --git a/examples/quick/shadereffects/CMakeLists.txt b/examples/quick/shadereffects/CMakeLists.txt
index 136cff7783..b86a3fa5d7 100644
--- a/examples/quick/shadereffects/CMakeLists.txt
+++ b/examples/quick/shadereffects/CMakeLists.txt
@@ -1,63 +1,61 @@
-# Generated from shadereffects.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(shadereffects LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick ShaderTools)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup(REQUIRES 6.5)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/shadereffects")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(shadereffects
+qt_add_executable(shadereffectsexample
+ WIN32
+ MACOSX_BUNDLE
main.cpp
)
-set_target_properties(shadereffects PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(shadereffects PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
+target_link_libraries(shadereffectsexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
-# Resources:
-set(shadereffects_resource_files
- "content/Slider.qml"
- "content/face-smile.png"
- "content/qt-logo.png"
- "content/shaders/blur.frag.qsb"
- "content/shaders/colorize.frag.qsb"
- "content/shaders/genie.vert.qsb"
- "content/shaders/outline.frag.qsb"
- "content/shaders/shadow.frag.qsb"
- "content/shaders/wobble.frag.qsb"
- "shadereffects.qml"
+qt_add_qml_module(shadereffectsexample
+ URI shadereffects
+ QML_FILES
+ "shadereffects.qml"
+ RESOURCES
+ "content/face-smile.png"
+ "content/qt-logo.png"
)
-qt6_add_resources(shadereffects "shadereffects"
+qt6_add_shaders(shadereffectsexample "shaders"
+ BATCHABLE
+ PRECOMPILE
+ OPTIMIZED
PREFIX
- "/shadereffects"
+ "/qt/qml/shadereffects"
FILES
- ${shadereffects_resource_files}
+ "content/shaders/genie.vert"
+ "content/shaders/blur.frag"
+ "content/shaders/colorize.frag"
+ "content/shaders/outline.frag"
+ "content/shaders/shadow.frag"
+ "content/shaders/wobble.frag"
+)
+
+install(TARGETS shadereffectsexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-install(TARGETS shadereffects
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+qt_generate_deploy_qml_app_script(
+ TARGET shadereffectsexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/shadereffects/content/Slider.qml b/examples/quick/shadereffects/content/Slider.qml
deleted file mode 100644
index 402b722413..0000000000
--- a/examples/quick/shadereffects/content/Slider.qml
+++ /dev/null
@@ -1,102 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Item {
- property real value: bar.x / (foo.width - bar.width)
- Item {
- id: foo
- width: parent.width - 4
- height: 6
- anchors.centerIn: parent
-
- Rectangle {
- height: parent.height
- anchors.left: parent.left
- anchors.right: bar.horizontalCenter
- color: "blue"
- radius: 3
- }
- Rectangle {
- height: parent.height
- anchors.left: bar.horizontalCenter
- anchors.right: parent.right
- color: "gray"
- radius: 3
- }
- Rectangle {
- anchors.fill: parent
- color: "transparent"
- radius: 3
- border.width: 2
- border.color: "black"
- }
-
- Rectangle {
- id: bar
- y: -7
- width: 20
- height: 20
- radius: 15
- color: "white"
- border.width: 2
- border.color: "black"
- MouseArea {
- anchors.fill: parent
- drag.target: parent
- drag.axis: Drag.XAxis
- drag.minimumX: 0
- drag.maximumX: foo.width - parent.width
- }
- }
- }
-}
-
diff --git a/examples/quick/shadereffects/content/shaders/blur.frag b/examples/quick/shadereffects/content/shaders/blur.frag
index 0c914d4244..b73a213348 100644
--- a/examples/quick/shadereffects/content/shaders/blur.frag
+++ b/examples/quick/shadereffects/content/shaders/blur.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#version 440
layout(location = 0) in vec2 qt_TexCoord0;
diff --git a/examples/quick/shadereffects/content/shaders/colorize.frag b/examples/quick/shadereffects/content/shaders/colorize.frag
index bc8067cc8c..eb50da9344 100644
--- a/examples/quick/shadereffects/content/shaders/colorize.frag
+++ b/examples/quick/shadereffects/content/shaders/colorize.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#version 440
layout(location = 0) in vec2 qt_TexCoord0;
diff --git a/examples/quick/shadereffects/content/shaders/compile.bat b/examples/quick/shadereffects/content/shaders/compile.bat
deleted file mode 100755
index e03cfde8d2..0000000000
--- a/examples/quick/shadereffects/content/shaders/compile.bat
+++ /dev/null
@@ -1,56 +0,0 @@
-:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-::
-:: Copyright (C) 2019 The Qt Company Ltd.
-:: Contact: https://www.qt.io/licensing/
-::
-:: This file is part of the examples of the Qt Toolkit.
-::
-:: $QT_BEGIN_LICENSE:BSD$
-:: Commercial License Usage
-:: Licensees holding valid commercial Qt licenses may use this file in
-:: accordance with the commercial license agreement provided with the
-:: Software or, alternatively, in accordance with the terms contained in
-:: a written agreement between you and The Qt Company. For licensing terms
-:: and conditions see https://www.qt.io/terms-conditions. For further
-:: information use the contact form at https://www.qt.io/contact-us.
-::
-:: BSD License Usage
-:: Alternatively, 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$
-::
-:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-
-qsb --glsl "150,120,100 es" --hlsl 50 --msl 12 -c -O -o blur.frag.qsb blur.frag
-qsb --glsl "150,120,100 es" --hlsl 50 --msl 12 -c -O -o colorize.frag.qsb colorize.frag
-qsb --glsl "150,120,100 es" --hlsl 50 --msl 12 -c -O -o outline.frag.qsb outline.frag
-qsb --glsl "150,120,100 es" --hlsl 50 --msl 12 -c -O -o shadow.frag.qsb shadow.frag
-qsb --glsl "150,120,100 es" --hlsl 50 --msl 12 -c -O -o wobble.frag.qsb wobble.frag
-qsb -b --glsl "150,120,100 es" --hlsl 50 --msl 12 -c -O -o genie.vert.qsb genie.vert
diff --git a/examples/quick/shadereffects/content/shaders/outline.frag b/examples/quick/shadereffects/content/shaders/outline.frag
index 26df69c5fe..11e9b74af6 100644
--- a/examples/quick/shadereffects/content/shaders/outline.frag
+++ b/examples/quick/shadereffects/content/shaders/outline.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#version 440
layout(location = 0) in vec2 qt_TexCoord0;
diff --git a/examples/quick/shadereffects/content/shaders/shadow.frag b/examples/quick/shadereffects/content/shaders/shadow.frag
index 8247517b6d..f42fa6c0b0 100644
--- a/examples/quick/shadereffects/content/shaders/shadow.frag
+++ b/examples/quick/shadereffects/content/shaders/shadow.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#version 440
layout(location = 0) in vec2 qt_TexCoord0;
diff --git a/examples/quick/shadereffects/content/shaders/wobble.frag b/examples/quick/shadereffects/content/shaders/wobble.frag
index a34481c2f2..a97f9d17f5 100644
--- a/examples/quick/shadereffects/content/shaders/wobble.frag
+++ b/examples/quick/shadereffects/content/shaders/wobble.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#version 440
layout(location = 0) in vec2 qt_TexCoord0;
diff --git a/examples/quick/shadereffects/doc/src/shadereffects.qdoc b/examples/quick/shadereffects/doc/src/shadereffects.qdoc
index ebb9ca7c15..134a14c618 100644
--- a/examples/quick/shadereffects/doc/src/shadereffects.qdoc
+++ b/examples/quick/shadereffects/doc/src/shadereffects.qdoc
@@ -1,35 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Qt Quick Examples - Shader Effects
\example shadereffects
\image qml-shadereffects-example.png
\brief A Qt Quick example demonstrating the use of shader effects.
\ingroup qtquickexamples
+ \examplecategory {Graphics}
This example demonstrates a couple of visual effects that you can perform
with shaders in Qt Quick. It applies five different effects on a text and
diff --git a/examples/quick/shadereffects/main.cpp b/examples/quick/shadereffects/main.cpp
index 9f649e2f94..0704eba39f 100644
--- a/examples/quick/shadereffects/main.cpp
+++ b/examples/quick/shadereffects/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(shadereffects/shadereffects)
diff --git a/examples/quick/shadereffects/shadereffects.qml b/examples/quick/shadereffects/shadereffects.qml
index 563a09c15d..daf3927246 100644
--- a/examples/quick/shadereffects/shadereffects.qml
+++ b/examples/quick/shadereffects/shadereffects.qml
@@ -1,56 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import QtQml.Models 2.1
-import "content"
+import QtQuick
+import QtQml.Models
+import QtQuick.Controls
Rectangle {
id: root
@@ -125,7 +78,7 @@ Rectangle {
property variant source: theSource
property real amplitude: 0.04 * wobbleSlider.value
property real frequency: 20
- property real time: 0
+ property real time
NumberAnimation on time { loops: Animation.Infinite; from: 0; to: Math.PI * 2; duration: 600 }
//! [fragment]
fragmentShader: "content/shaders/wobble.frag.qsb"
@@ -135,6 +88,8 @@ Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
+ anchors.leftMargin: 4
+ anchors.rightMargin: 4
height: 40
}
}
@@ -159,7 +114,7 @@ Rectangle {
fragmentShader: "content/shaders/blur.frag.qsb"
}
}
- property real angle: 0
+ property real angle
property variant offset: Qt.point(15.0 * Math.cos(angle), 15.0 * Math.sin(angle))
NumberAnimation on angle { loops: Animation.Infinite; from: 0; to: Math.PI * 2; duration: 6000 }
property variant delta: Qt.size(offset.x / width, offset.y / height)
@@ -170,6 +125,8 @@ Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
+ anchors.leftMargin: 4
+ anchors.rightMargin: 4
height: 40
}
}
@@ -191,6 +148,8 @@ Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
+ anchors.leftMargin: 4
+ anchors.rightMargin: 4
height: 40
}
}
@@ -199,8 +158,8 @@ Rectangle {
height: 160
//! [properties]
property variant source: theSource
- property real bend: 0
- property real minimize: 0
+ property real bend
+ property real minimize
property real side: genieSlider.value
SequentialAnimation on bend {
loops: Animation.Infinite
@@ -227,6 +186,8 @@ Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
+ anchors.leftMargin: 4
+ anchors.rightMargin: 4
height: 40
}
}
diff --git a/examples/quick/shadereffects/shadereffects.qrc b/examples/quick/shadereffects/shadereffects.qrc
index e6965d7674..7c432744ea 100644
--- a/examples/quick/shadereffects/shadereffects.qrc
+++ b/examples/quick/shadereffects/shadereffects.qrc
@@ -1,9 +1,8 @@
<RCC>
- <qresource prefix="/shadereffects">
+ <qresource prefix="/qt/qml/shadereffects">
<file>shadereffects.qml</file>
<file>content/face-smile.png</file>
<file>content/qt-logo.png</file>
- <file>content/Slider.qml</file>
<file>content/shaders/wobble.frag.qsb</file>
<file>content/shaders/blur.frag.qsb</file>
<file>content/shaders/shadow.frag.qsb</file>
diff --git a/examples/quick/shapes/CMakeLists.txt b/examples/quick/shapes/CMakeLists.txt
deleted file mode 100644
index 517f986e27..0000000000
--- a/examples/quick/shapes/CMakeLists.txt
+++ /dev/null
@@ -1,169 +0,0 @@
-# Generated from shapes.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(shapes LANGUAGES CXX)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/shapes")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(shapes
- main.cpp
-)
-set_target_properties(shapes PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(shapes PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-
-# Resources:
-set_source_files_properties("../shared/LauncherList.qml"
- PROPERTIES QT_RESOURCE_ALIAS "LauncherList.qml"
-)
-set_source_files_properties("../shared/SimpleLauncherDelegate.qml"
- PROPERTIES QT_RESOURCE_ALIAS "SimpleLauncherDelegate.qml"
-)
-set_source_files_properties("../shared/Slider.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Slider.qml"
-)
-set_source_files_properties("../shared/images/back.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/back.png"
-)
-set_source_files_properties("../shared/images/next.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/next.png"
-)
-set_source_files_properties("../shared/images/slider_handle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/slider_handle.png"
-)
-set_source_files_properties("content/clippedtigers.qml"
- PROPERTIES QT_RESOURCE_ALIAS "clippedtigers.qml"
-)
-set_source_files_properties("content/interactive.qml"
- PROPERTIES QT_RESOURCE_ALIAS "interactive.qml"
-)
-set_source_files_properties("content/item10.qml"
- PROPERTIES QT_RESOURCE_ALIAS "item10.qml"
-)
-set_source_files_properties("content/item11.qml"
- PROPERTIES QT_RESOURCE_ALIAS "item11.qml"
-)
-set_source_files_properties("content/item12.qml"
- PROPERTIES QT_RESOURCE_ALIAS "item12.qml"
-)
-set_source_files_properties("content/item13.qml"
- PROPERTIES QT_RESOURCE_ALIAS "item13.qml"
-)
-set_source_files_properties("content/item14.qml"
- PROPERTIES QT_RESOURCE_ALIAS "item14.qml"
-)
-set_source_files_properties("content/item15.qml"
- PROPERTIES QT_RESOURCE_ALIAS "item15.qml"
-)
-set_source_files_properties("content/item17.qml"
- PROPERTIES QT_RESOURCE_ALIAS "item17.qml"
-)
-set_source_files_properties("content/item18.qml"
- PROPERTIES QT_RESOURCE_ALIAS "item18.qml"
-)
-set_source_files_properties("content/item2.qml"
- PROPERTIES QT_RESOURCE_ALIAS "item2.qml"
-)
-set_source_files_properties("content/item3.qml"
- PROPERTIES QT_RESOURCE_ALIAS "item3.qml"
-)
-set_source_files_properties("content/item4.qml"
- PROPERTIES QT_RESOURCE_ALIAS "item4.qml"
-)
-set_source_files_properties("content/item5.qml"
- PROPERTIES QT_RESOURCE_ALIAS "item5.qml"
-)
-set_source_files_properties("content/item6.qml"
- PROPERTIES QT_RESOURCE_ALIAS "item6.qml"
-)
-set_source_files_properties("content/item7.qml"
- PROPERTIES QT_RESOURCE_ALIAS "item7.qml"
-)
-set_source_files_properties("content/item8.qml"
- PROPERTIES QT_RESOURCE_ALIAS "item8.qml"
-)
-set_source_files_properties("content/item9.qml"
- PROPERTIES QT_RESOURCE_ALIAS "item9.qml"
-)
-set_source_files_properties("content/main.qml"
- PROPERTIES QT_RESOURCE_ALIAS "main.qml"
-)
-set_source_files_properties("content/sampling.qml"
- PROPERTIES QT_RESOURCE_ALIAS "sampling.qml"
-)
-set_source_files_properties("content/shapegallery.qml"
- PROPERTIES QT_RESOURCE_ALIAS "shapegallery.qml"
-)
-set_source_files_properties("content/tapableTriangle.qml"
- PROPERTIES QT_RESOURCE_ALIAS "tapableTriangle.qml"
-)
-set_source_files_properties("content/tiger.qml"
- PROPERTIES QT_RESOURCE_ALIAS "tiger.qml"
-)
-set(shapes_resource_files
- "../shared/LauncherList.qml"
- "../shared/SimpleLauncherDelegate.qml"
- "../shared/Slider.qml"
- "../shared/images/back.png"
- "../shared/images/next.png"
- "../shared/images/slider_handle.png"
- "content/clippedtigers.qml"
- "content/interactive.qml"
- "content/item10.qml"
- "content/item11.qml"
- "content/item12.qml"
- "content/item13.qml"
- "content/item14.qml"
- "content/item15.qml"
- "content/item17.qml"
- "content/item18.qml"
- "content/item2.qml"
- "content/item3.qml"
- "content/item4.qml"
- "content/item5.qml"
- "content/item6.qml"
- "content/item7.qml"
- "content/item8.qml"
- "content/item9.qml"
- "content/main.qml"
- "content/sampling.qml"
- "content/shapegallery.qml"
- "content/tapableTriangle.qml"
- "content/tiger.qml"
-)
-
-qt6_add_resources(shapes "shapes"
- PREFIX
- "/shapes"
- FILES
- ${shapes_resource_files}
-)
-
-install(TARGETS shapes
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
diff --git a/examples/quick/shapes/content/clippedtigers.qml b/examples/quick/shapes/content/clippedtigers.qml
deleted file mode 100644
index c55efdc403..0000000000
--- a/examples/quick/shapes/content/clippedtigers.qml
+++ /dev/null
@@ -1,137 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.9
-import QtQuick.Shapes 1.0
-
-Rectangle {
- id: root
- width: 1024
- height: 768
-
- property color col: "lightsteelblue"
- gradient: Gradient {
- GradientStop { position: 0.0; color: Qt.tint(root.col, "#20FFFFFF") }
- GradientStop { position: 0.1; color: Qt.tint(root.col, "#20AAAAAA") }
- GradientStop { position: 0.9; color: Qt.tint(root.col, "#20666666") }
- GradientStop { position: 1.0; color: Qt.tint(root.col, "#20000000") }
- }
-
- Rectangle {
- id: scissorRect
- width: 200
- height: 200
- x: 150
- property real centerY: parent.height / 2 - height / 2
- property real dy: 0
- y: centerY + dy
- clip: true
-
- Loader {
- id: loader1
- width: parent.width
- height: parent.height
- y: 25 - scissorRect.dy
- source: "tiger.qml"
- asynchronous: true
- visible: status === Loader.Ready
- }
-
- SequentialAnimation on dy {
- loops: Animation.Infinite
- running: loader1.status === Loader.Ready && loader1.item.status === Shape.Ready
- NumberAnimation {
- from: 0
- to: -scissorRect.centerY
- duration: 2000
- }
- NumberAnimation {
- from: -scissorRect.centerY
- to: scissorRect.centerY
- duration: 4000
- }
- NumberAnimation {
- from: scissorRect.centerY
- to: 0
- duration: 2000
- }
- }
- }
-
- // With a more complex transformation (like rotation), stenciling is used
- // instead of scissoring, this is more expensive. It may also trigger a
- // slower code path for Shapes, depending on the path rendering backend
- // in use, and may affect rendering quality as well.
- Rectangle {
- id: stencilRect
- width: 300
- height: 200
- anchors.right: parent.right
- anchors.rightMargin: 100
- anchors.verticalCenter: parent.verticalCenter
- clip: true // NB! still clips to bounding rect (not shape)
-
- Loader {
- id: loader2
- width: parent.width
- height: parent.height
- source: "tiger.qml"
- asynchronous: true
- visible: status === Loader.Ready
- }
-
- NumberAnimation on rotation {
- from: 0
- to: 360
- duration: 5000
- loops: Animation.Infinite
- }
- }
-}
diff --git a/examples/quick/shapes/content/interactive.qml b/examples/quick/shapes/content/interactive.qml
deleted file mode 100644
index 1f7aad3ab0..0000000000
--- a/examples/quick/shapes/content/interactive.qml
+++ /dev/null
@@ -1,344 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.9
-import QtQuick.Shapes 1.0
-
-Rectangle {
- id: root
- width: 1024
- height: 768
-
- property color col: "lightsteelblue"
- gradient: Gradient {
- GradientStop { position: 0.0; color: Qt.tint(root.col, "#20FFFFFF") }
- GradientStop { position: 0.1; color: Qt.tint(root.col, "#20AAAAAA") }
- GradientStop { position: 0.9; color: Qt.tint(root.col, "#20666666") }
- GradientStop { position: 1.0; color: Qt.tint(root.col, "#20000000") }
- }
-
- property int mode: 0
- property bool showResizers: true
- property bool fill: false
-
- Row {
- x: 20
- y: 10
- spacing: 20
- Rectangle {
- border.color: "black"
- color: root.mode === 0 ? "red" : "transparent"
- width: 100
- height: 40
- Text {
- anchors.centerIn: parent
- text: "Line"
- }
- MouseArea {
- anchors.fill: parent
- onClicked: root.mode = 0
- }
- }
- Rectangle {
- border.color: "black"
- color: root.mode === 1 ? "red" : "transparent"
- width: 100
- height: 40
- Text {
- anchors.centerIn: parent
- text: "Cubic"
- }
- MouseArea {
- anchors.fill: parent
- onClicked: root.mode = 1
- }
- }
- Rectangle {
- border.color: "black"
- color: root.mode === 2 ? "red" : "transparent"
- width: 100
- height: 40
- Text {
- anchors.centerIn: parent
- text: "Quadratic"
- }
- MouseArea {
- anchors.fill: parent
- onClicked: root.mode = 2
- }
- }
-
- Slider {
- id: widthSlider
- name: "Width"
- min: 1
- max: 60
- init: 4
- }
-
- Rectangle {
- border.color: "black"
- color: root.showResizers ? "yellow" : "transparent"
- width: 50
- height: 40
- Text {
- anchors.centerIn: parent
- text: "Manip"
- }
- MouseArea {
- anchors.fill: parent
- onClicked: {
- root.showResizers = !root.showResizers;
- for (var i = 0; i < canvas.resizers.length; ++i)
- canvas.resizers[i].visible = root.showResizers;
- }
- }
- }
-
- Rectangle {
- border.color: "black"
- color: root.fill ? "yellow" : "transparent"
- width: 50
- height: 40
- Text {
- anchors.centerIn: parent
- text: "Fill"
- }
- MouseArea {
- anchors.fill: parent
- onClicked: root.fill = !root.fill
- }
- }
- }
-
- Rectangle {
- id: canvas
- width: root.width - 40
- height: root.height - 120
- x: 20
- y: 100
-
- property variant activePath: null
-
- property variant resizers: []
- property variant funcs
-
- property Component mouseArea: Component {
- Rectangle {
- id: rr
-
- property variant obj
- property string xprop
- property string yprop
-
- width: 20
- height: 20
-
- MouseArea {
- property bool a: false
-
- anchors.fill: parent
- hoverEnabled: true
- onEntered: color = "yellow"
- onExited: color = rr.color
- onPressed: a = true
- onReleased: a = false
- onPositionChanged: (mouse)=> {
- if (a) {
- var pt = mapToItem(rr.parent, mouse.x, mouse.y);
- rr.obj[rr.xprop] = pt.x
- rr.obj[rr.yprop] = pt.y
- rr.x = pt.x - 10
- rr.y = pt.y - 10
- }
- }
- }
- }
- }
-
- function genResizer(obj, x, y, xprop, yprop, color) {
- var ma = mouseArea.createObject(canvas, {
- color: color,
- xprop: xprop,
- yprop: yprop
- });
- ma.visible = root.showResizers;
- ma.obj = obj;
- ma.x = x - 10;
- ma.y = y - 10;
- resizers.push(ma);
- return ma;
- }
-
- property Component linePath: Component {
- ShapePath {
- id: lineShapePath
- strokeColor: "black"
- strokeWidth: widthSlider.value
- fillColor: "transparent"
- PathLine {
- x: lineShapePath.startX + 1
- y: lineShapePath.startY + 1
- }
- }
- }
-
- property Component cubicPath: Component {
- ShapePath {
- id: cubicShapePath
- strokeColor: "black"
- strokeWidth: widthSlider.value
- fillColor: root.fill ? 'green' : 'transparent'
- PathCubic {
- x: cubicShapePath.startX + 1
- y: cubicShapePath.startY + 1
- control1X: cubicShapePath.startX + 50;
- control1Y: cubicShapePath.startY + 50;
- control2X: cubicShapePath.startX + 150;
- control2Y: cubicShapePath.startY + 50;
- }
- }
- }
-
- property Component quadPath: Component {
- ShapePath {
- id: quadShapePath
- strokeColor: "black"
- strokeWidth: widthSlider.value
- fillColor: root.fill ? 'green' : 'transparent'
- PathQuad {
- x: quadShapePath.startx + 1
- y: quadShapePath.startY + 1
- controlX: quadShapePath.startX + 50
- controlY: quadShapePath.startY + 50
- }
- }
- }
-
- Component.onCompleted: {
- funcs = [
- { "start": function(x, y) {
- var p = linePath.createObject(root, { startX: x, startY: y });
- shape.data.push(p);
- activePath = p;
- }, "move": function(x, y) {
- if (!activePath)
- return;
- var pathObj = activePath.pathElements[0];
- pathObj.x = x;
- pathObj.y = y;
- }, "end": function() {
- canvas.genResizer(activePath, activePath.startX, activePath.startY, "startX", "startY", "red");
- var pathObj = activePath.pathElements[0];
- canvas.genResizer(pathObj, pathObj.x, pathObj.y, "x", "y", "red");
- activePath = null;
- }
- },
- { "start": function(x, y) {
- var p = cubicPath.createObject(root, { startX: x, startY: y });
- shape.data.push(p);
- activePath = p;
- }, "move": function(x, y) {
- if (!activePath)
- return;
- var pathObj = activePath.pathElements[0];
- pathObj.x = x;
- pathObj.y = y;
- }, "end": function() {
- canvas.genResizer(activePath, activePath.startX, activePath.startY, "startX", "startY", "red");
- var pathObj = activePath.pathElements[0];
- canvas.genResizer(pathObj, pathObj.x, pathObj.y, "x", "y", "red");
- canvas.genResizer(pathObj, pathObj.control1X, pathObj.control1Y, "control1X", "control1Y", "blue");
- canvas.genResizer(pathObj, pathObj.control2X, pathObj.control2Y, "control2X", "control2Y", "lightBlue");
- activePath = null;
- }
- },
- { "start": function(x, y) {
- var p = quadPath.createObject(root, { startX: x, startY: y });
- shape.data.push(p);
- activePath = p;
- }, "move": function(x, y) {
- if (!activePath)
- return;
- var pathObj = activePath.pathElements[0];
- pathObj.x = x;
- pathObj.y = y;
- }, "end": function() {
- canvas.genResizer(activePath, activePath.startX, activePath.startY, "startX", "startY", "red");
- var pathObj = activePath.pathElements[0];
- canvas.genResizer(pathObj, pathObj.x, pathObj.y, "x", "y", "red");
- canvas.genResizer(pathObj, pathObj.controlX, pathObj.controlY, "controlX", "controlY", "blue");
- activePath = null;
- }
- }
- ];
- }
-
- MouseArea {
- anchors.fill: parent
- onPressed: (mouse)=> {
- canvas.funcs[root.mode].start(mouse.x, mouse.y);
- }
- onPositionChanged: (mouse)=> {
- canvas.funcs[root.mode].move(mouse.x, mouse.y);
- }
- onReleased: {
- canvas.funcs[root.mode].end();
- }
- }
-
- Shape {
- id: shape
- anchors.fill: parent
-
- data: []
- }
- }
-}
diff --git a/examples/quick/shapes/content/item10.qml b/examples/quick/shapes/content/item10.qml
deleted file mode 100644
index e91342c2fe..0000000000
--- a/examples/quick/shapes/content/item10.qml
+++ /dev/null
@@ -1,174 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.9
-import QtQuick.Shapes 1.0
-
-Rectangle {
- color: "lightGray"
-
- Item {
- width: 200
- height: 200
- anchors.centerIn: parent
-
- Shape {
- id: shape
- anchors.fill: parent
-
- ShapePath {
- strokeWidth: 4
- strokeColor: "black"
- fillGradient: ConicalGradient {
- id: conGrad
- centerX: 100; centerY: 75
- NumberAnimation on angle { from: 0; to: 360; duration: 10000; loops: Animation.Infinite }
- GradientStop { position: 0; color: "#00000000" }
- GradientStop { position: 0.10; color: "#ffe0cc73" }
- GradientStop { position: 0.17; color: "#ffc6a006" }
- GradientStop { position: 0.46; color: "#ff600659" }
- GradientStop { position: 0.72; color: "#ff0680ac" }
- GradientStop { position: 0.92; color: "#ffb9d9e6" }
- GradientStop { position: 1.00; color: "#00000000" }
- }
-
- startX: 50; startY: 100
- PathCubic {
- x: 150; y: 100
- control1X: cp1.x; control1Y: cp1.y
- control2X: cp2.x; control2Y: cp2.y
- }
- }
- }
-
- Rectangle {
- id: cp1
- color: "red"
- width: 10; height: 10
- SequentialAnimation {
- loops: Animation.Infinite
- running: true
- NumberAnimation {
- target: cp1
- property: "x"
- from: 0
- to: shape.width - cp1.width
- duration: 5000
- }
- NumberAnimation {
- target: cp1
- property: "x"
- from: shape.width - cp1.width
- to: 0
- duration: 5000
- }
- NumberAnimation {
- target: cp1
- property: "y"
- from: 0
- to: shape.height - cp1.height
- duration: 5000
- }
- NumberAnimation {
- target: cp1
- property: "y"
- from: shape.height - cp1.height
- to: 0
- duration: 5000
- }
- }
- }
-
- Rectangle {
- id: cp2
- color: "blue"
- width: 10; height: 10
- x: shape.width - width
- SequentialAnimation {
- loops: Animation.Infinite
- running: true
- NumberAnimation {
- target: cp2
- property: "y"
- from: 0
- to: shape.height - cp2.height
- duration: 5000
- }
- NumberAnimation {
- target: cp2
- property: "y"
- from: shape.height - cp2.height
- to: 0
- duration: 5000
- }
- NumberAnimation {
- target: cp2
- property: "x"
- from: shape.width - cp2.width
- to: 0
- duration: 5000
- }
- NumberAnimation {
- target: cp2
- property: "x"
- from: 0
- to: shape.width - cp2.width
- duration: 5000
- }
- }
- }
- }
-
- Text {
- anchors.right: parent.right
- anchors.top: parent.top
- text: "Conical gradient angle: " + Math.round(conGrad.angle)
- }
-}
diff --git a/examples/quick/shapes/content/item11.qml b/examples/quick/shapes/content/item11.qml
deleted file mode 100644
index bdd08339e3..0000000000
--- a/examples/quick/shapes/content/item11.qml
+++ /dev/null
@@ -1,115 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.11
-import QtQuick.Shapes 1.0
-
-Rectangle {
- color: "lightGray"
- Shape {
- id: shape
- width: 220
- height: 200
- anchors.centerIn: parent
-
- ShapePath {
- fillGradient: LinearGradient {
- y2: shape.height
- GradientStop { position: 0; color: "yellow" }
- GradientStop { position: 1; color: "green" }
- }
-
- startX: 10; startY: 100
- PathArc {
- relativeX: 50; y: 100
- radiusX: 25; radiusY: 25
- }
- PathArc {
- relativeX: 50; y: 100
- radiusX: 25; radiusY: 35
- }
- PathArc {
- relativeX: 50; y: 100
- radiusX: 25; radiusY: 60
- }
- PathArc {
- relativeX: 50; y: 100
- radiusX: 50; radiusY: 120
- }
- }
- }
-
- Shape {
- width: 120
- height: 130
- anchors.bottom: parent.bottom
- anchors.right: parent.right
-
- scale: 0.5
-
- ShapePath {
- fillColor: "transparent"
- strokeColor: "darkBlue"
- strokeWidth: 20
- capStyle: ShapePath.RoundCap
-
- PathAngleArc {
- centerX: 65; centerY: 95
- radiusX: 45; radiusY: 45
- startAngle: -180
- SequentialAnimation on sweepAngle {
- loops: Animation.Infinite
- NumberAnimation { to: 360; duration: 2000 }
- NumberAnimation { to: 0; duration: 2000 }
- }
- }
- }
- }
-}
diff --git a/examples/quick/shapes/content/item12.qml b/examples/quick/shapes/content/item12.qml
deleted file mode 100644
index 8bdd1bfe50..0000000000
--- a/examples/quick/shapes/content/item12.qml
+++ /dev/null
@@ -1,113 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.9
-import QtQuick.Shapes 1.0
-
-Rectangle {
- color: "lightGray"
- Rectangle {
- border.color: "black"
- width: 200
- height: 200
- anchors.centerIn: parent
-
- Shape {
- anchors.fill: parent
-
- ShapePath {
- strokeColor: "transparent"
-
- fillGradient: LinearGradient {
- id: grad
- y1: 50; y2: 150
- GradientStop { position: 0; color: "black" }
- GradientStop { position: 1; color: "red" }
- }
-
- startX: 10; startY: 10
- PathLine { relativeX: 180; relativeY: 0 }
- PathLine { relativeX: 0; relativeY: 180 }
- PathLine { relativeX: -180; relativeY: 0 }
- PathLine { relativeX: 0; relativeY: -180 }
- }
- }
-
- Timer {
- id: spreadTimer
- interval: 3000
- running: true
- repeat: true
- property variant spreads: [ ShapeGradient.PadSpread, ShapeGradient.RepeatSpread, ShapeGradient.ReflectSpread ]
- property variant spreadTexts: [ "PadSpread", "RepeatSpread", "ReflectSpread" ]
- property int spreadIdx: 0
- onTriggered: { spreadIdx = (spreadIdx + 1) % spreads.length; grad.spread = spreads[spreadIdx] }
- }
-
-
- Shape {
- anchors.fill: parent
- ShapePath {
- strokeColor: "gray"
- strokeWidth: 2
- fillColor: "transparent"
- PathMove { x: 0; y: 50 }
- PathLine { relativeX: 200; relativeY: 0 }
- PathMove { x: 0; y: 150 }
- PathLine { relativeX: 200; relativeY: 0 }
- }
- }
- }
-
- Text {
- anchors.right: parent.right
- text: spreadTimer.spreadTexts[spreadTimer.spreadIdx]
- }
-}
diff --git a/examples/quick/shapes/content/item13.qml b/examples/quick/shapes/content/item13.qml
deleted file mode 100644
index 93160af7d8..0000000000
--- a/examples/quick/shapes/content/item13.qml
+++ /dev/null
@@ -1,97 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.9
-import QtQuick.Shapes 1.0
-
-Rectangle {
- color: "lightGray"
-
- Rectangle {
- width: 100
- height: 100
- anchors.centerIn: parent
- border.color: "gray"
-
- Repeater {
- model: 2
- Shape {
- anchors.fill: parent
-
- ShapePath {
- fillColor: "transparent"
- strokeColor: model.index === 0 ? "red" : "blue"
- strokeStyle: ShapePath.DashLine
- strokeWidth: 4
-
- startX: 4; startY: 4
- PathArc {
- id: arc
- x: 96; y: 96
- radiusX: 100; radiusY: 100
- direction: model.index === 0 ? PathArc.Clockwise : PathArc.Counterclockwise
- }
- }
- }
- }
- }
-
- Column {
- anchors.right: parent.right
- Text {
- text: "Clockwise (sweep 1)"
- color: "red"
- }
- Text {
- text: "Counter clockwise (sweep 0)"
- color: "blue"
- }
- }
-}
diff --git a/examples/quick/shapes/content/item14.qml b/examples/quick/shapes/content/item14.qml
deleted file mode 100644
index fd5b7d1048..0000000000
--- a/examples/quick/shapes/content/item14.qml
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.9
-import QtQuick.Shapes 1.0
-
-Rectangle {
- color: "lightGray"
-
- Repeater {
- model: 2
- Shape {
- width: 200
- height: 200
- anchors.centerIn: parent
-
- ShapePath {
- fillColor: "transparent"
- strokeColor: model.index === 0 ? "red" : "blue"
- strokeStyle: ShapePath.DashLine
- strokeWidth: 4
-
- startX: 50; startY: 100
- PathArc {
- x: 100; y: 150
- radiusX: 50; radiusY: 50
- useLargeArc: model.index === 1
- }
- }
- }
- }
-
- Column {
- anchors.right: parent.right
- Text {
- text: "Small"
- color: "red"
- }
- Text {
- text: "Large"
- color: "blue"
- }
- }
-}
diff --git a/examples/quick/shapes/content/item15.qml b/examples/quick/shapes/content/item15.qml
deleted file mode 100644
index eb23b8b3c5..0000000000
--- a/examples/quick/shapes/content/item15.qml
+++ /dev/null
@@ -1,113 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.9
-import QtQuick.Shapes 1.0
-
-Rectangle {
- color: "lightGray"
-
- Repeater {
- model: 2
- Shape {
- width: 200
- height: 200
- anchors.centerIn: parent
-
- ShapePath {
- fillColor: "transparent"
- strokeColor: model.index === 0 ? "red" : "blue"
- strokeStyle: ShapePath.DashLine
- strokeWidth: 4
-
- startX: 50; startY: 100
- PathArc {
- x: 150; y: 100
- radiusX: 50; radiusY: 20
- xAxisRotation: model.index === 0 ? 0 : 45
- }
- }
- }
- }
-
- Repeater {
- model: 2
- Shape {
- width: 200
- height: 200
- anchors.centerIn: parent
-
- ShapePath {
- fillColor: "transparent"
- strokeColor: model.index === 0 ? "red" : "blue"
-
- startX: 50; startY: 100
- PathArc {
- x: 150; y: 100
- radiusX: 50; radiusY: 20
- xAxisRotation: model.index === 0 ? 0 : 45
- direction: PathArc.Counterclockwise
- }
- }
- }
- }
-
- Column {
- anchors.right: parent.right
- Text {
- text: "0 degrees"
- color: "red"
- }
- Text {
- text: "45 degrees"
- color: "blue"
- }
- }
-}
diff --git a/examples/quick/shapes/content/item17.qml b/examples/quick/shapes/content/item17.qml
deleted file mode 100644
index 6ee03ddd04..0000000000
--- a/examples/quick/shapes/content/item17.qml
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.9
-import QtQuick.Shapes 1.0
-
-Rectangle {
- color: "lightGray"
-
- Item {
- anchors.fill: parent
-
- Text {
- anchors.centerIn: parent
- text: "Loading"
- // Phase #1: Loader loads tiger.qml. After this we have our item.
- // Phase #2: With some backends (generic) the item will start async processing. Wait for this too.
- visible: shapeLoader.status != Loader.Ready || shapeLoader.item.status === Shape.Processing
- }
-
- Loader {
- id: shapeLoader
- anchors.fill: parent
- source: "tiger.qml"
- asynchronous: true
- visible: status == Loader.Ready
- scale: 0.4
- }
- }
-}
diff --git a/examples/quick/shapes/content/item18.qml b/examples/quick/shapes/content/item18.qml
deleted file mode 100644
index 192438408d..0000000000
--- a/examples/quick/shapes/content/item18.qml
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.15
-import QtQuick.Shapes 1.0
-
-Rectangle {
- color: "lightGray"
-
- Shape {
- anchors.centerIn: parent
- width: 200
- height: 100
-
- ShapePath {
- id: capTest
- strokeColor: "black"
- strokeWidth: 1
- fillColor: "black"
-
- PathText { x: 0; y: 0; font.family: "Arial"; font.pixelSize: 150; text: "Qt!" }
- }
- }
-}
diff --git a/examples/quick/shapes/content/item2.qml b/examples/quick/shapes/content/item2.qml
deleted file mode 100644
index a033ba88c7..0000000000
--- a/examples/quick/shapes/content/item2.qml
+++ /dev/null
@@ -1,153 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.9
-import QtQuick.Shapes 1.0
-
-Rectangle {
- color: "lightGray"
-
- Shape {
- id: circ1
- anchors.fill: parent
-
- ShapePath {
- id: p1
- fillColor: "transparent" // stroke only
- strokeWidth: 4
-
- SequentialAnimation on strokeColor {
- loops: Animation.Infinite
- ColorAnimation {
- from: "black"
- to: "yellow"
- duration: 5000
- }
- ColorAnimation {
- from: "yellow"
- to: "green"
- duration: 5000
- }
- ColorAnimation {
- from: "green"
- to: "black"
- duration: 5000
- }
- }
-
- property real r: 60
- startX: circ1.width / 2 - r
- startY: circ1.height / 2 - r
- PathArc {
- x: circ1.width / 2 + p1.r
- y: circ1.height / 2 + p1.r
- radiusX: p1.r; radiusY: p1.r
- useLargeArc: true
- }
- PathArc {
- x: circ1.width / 2 - p1.r
- y: circ1.height / 2 - p1.r
- radiusX: p1.r; radiusY: p1.r
- useLargeArc: true
- }
- }
- }
-
- Shape {
- id: circ2
- anchors.fill: parent
-
- SequentialAnimation on opacity {
- loops: Animation.Infinite
- NumberAnimation { from: 1.0; to: 0.0; duration: 5000 }
- NumberAnimation { from: 0.0; to: 1.0; duration: 5000 }
- }
-
- ShapePath {
- id: p2
- strokeWidth: -1 // or strokeColor: "transparent"
-
- SequentialAnimation on fillColor {
- loops: Animation.Infinite
- ColorAnimation {
- from: "gray"
- to: "purple"
- duration: 3000
- }
- ColorAnimation {
- from: "purple"
- to: "red"
- duration: 3000
- }
- ColorAnimation {
- from: "red"
- to: "gray"
- duration: 3000
- }
- }
-
- property real r: 40
- startX: circ2.width / 2 - r
- startY: circ2.height / 2 - r
- PathArc {
- x: circ2.width / 2 + p2.r
- y: circ2.height / 2 + p2.r
- radiusX: p2.r; radiusY: p2.r
- useLargeArc: true
- }
- PathArc {
- x: circ2.width / 2 - p2.r
- y: circ2.height / 2 - p2.r
- radiusX: p2.r; radiusY: p2.r
- useLargeArc: true
- }
- }
- }
-}
diff --git a/examples/quick/shapes/content/item3.qml b/examples/quick/shapes/content/item3.qml
deleted file mode 100644
index 4274f260f3..0000000000
--- a/examples/quick/shapes/content/item3.qml
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.9
-import QtQuick.Shapes 1.0
-
-Rectangle {
- color: "lightGray"
- Shape {
- width: 200
- height: 150
- anchors.centerIn: parent
- ShapePath {
- strokeWidth: 4
- strokeColor: "red"
- fillGradient: RadialGradient {
- centerX: 100; centerY: 100; centerRadius: 100
- SequentialAnimation on focalRadius {
- loops: Animation.Infinite
- NumberAnimation { from: 1; to: 20; duration: 2000 }
- NumberAnimation { from: 20; to: 1; duration: 2000 }
- }
- SequentialAnimation on focalX {
- loops: Animation.Infinite
- NumberAnimation { from: 50; to: 150; duration: 3000 }
- NumberAnimation { from: 150; to: 50; duration: 3000 }
- }
- SequentialAnimation on focalY {
- loops: Animation.Infinite
- NumberAnimation { from: 50; to: 150; duration: 1000 }
- NumberAnimation { from: 150; to: 50; duration: 1000 }
- }
- GradientStop { position: 0; color: "#ffffff" }
- GradientStop { position: 0.11; color: "#f9ffa0" }
- GradientStop { position: 0.13; color: "#f9ff99" }
- GradientStop { position: 0.14; color: "#f3ff86" }
- GradientStop { position: 0.49; color: "#93b353" }
- GradientStop { position: 0.87; color: "#264619" }
- GradientStop { position: 0.96; color: "#0c1306" }
- GradientStop { position: 1; color: "#000000" }
- }
- fillColor: "blue" // ignored with the gradient set
- strokeStyle: ShapePath.DashLine
- dashPattern: [ 1, 4 ]
- startX: 20; startY: 20
- PathLine { x: 180; y: 130 }
- PathLine { x: 20; y: 130 }
- PathLine { x: 20; y: 20 }
- }
- }
-}
diff --git a/examples/quick/shapes/content/item4.qml b/examples/quick/shapes/content/item4.qml
deleted file mode 100644
index 2b20c0a263..0000000000
--- a/examples/quick/shapes/content/item4.qml
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.9
-import QtQuick.Shapes 1.0
-
-Rectangle {
- color: "lightGray"
- Shape {
- id: shape
- anchors.fill: parent
-
- ShapePath {
- id: p
- strokeWidth: 5
- strokeColor: "blue"
- strokeStyle: ShapePath.DashLine
- dashPattern: [ 1, 4, 4, 4 ]
- fillColor: "lightBlue"
-
- property real xr: 70
- property real yr: 30
- startX: shape.width / 2 - xr
- startY: shape.height / 2 - yr
- PathArc {
- x: shape.width / 2 + p.xr
- y: shape.height / 2 + p.yr
- radiusX: p.xr; radiusY: p.yr
- useLargeArc: true
- }
- PathArc {
- x: shape.width / 2 - p.xr
- y: shape.height / 2 - p.yr
- radiusX: p.xr; radiusY: p.yr
- useLargeArc: true
- }
- }
- }
-}
diff --git a/examples/quick/shapes/content/item5.qml b/examples/quick/shapes/content/item5.qml
deleted file mode 100644
index 5fd25093ae..0000000000
--- a/examples/quick/shapes/content/item5.qml
+++ /dev/null
@@ -1,89 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.9
-import QtQuick.Shapes 1.0
-
-Rectangle {
- color: "lightGray"
- Shape {
- width: 200
- height: 150
- anchors.centerIn: parent
- ShapePath {
- strokeWidth: 4
- strokeColor: "red"
- fillGradient: LinearGradient {
- x1: 20; y1: 20
- x2: 180; y2: 130
- GradientStop { position: 0; color: "blue" }
- GradientStop { position: 0.2; color: "green" }
- GradientStop { position: 0.4; color: "red" }
- GradientStop { position: 0.6; color: "yellow" }
- GradientStop { position: 1; color: "cyan" }
- }
- fillColor: "blue" // ignored with the gradient set
- strokeStyle: ShapePath.DashLine
- dashPattern: [ 1, 4 ]
- startX: 20; startY: 20
- PathLine { x: 180; y: 130 }
- PathLine { x: 20; y: 130 }
- PathLine { x: 20; y: 20 }
- }
- transform: Rotation { origin.x: 100; origin.y: 50; axis { x: 0; y: 1; z: 0 }
- SequentialAnimation on angle {
- NumberAnimation { from: 0; to: 75; duration: 2000 }
- NumberAnimation { from: 75; to: -75; duration: 4000 }
- NumberAnimation { from: -75; to: 0; duration: 2000 }
- loops: Animation.Infinite
- }
- }
- }
-}
diff --git a/examples/quick/shapes/content/item6.qml b/examples/quick/shapes/content/item6.qml
deleted file mode 100644
index f0791c30d2..0000000000
--- a/examples/quick/shapes/content/item6.qml
+++ /dev/null
@@ -1,89 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.9
-import QtQuick.Shapes 1.0
-
-Rectangle {
- color: "lightGray"
- Shape {
- width: 100
- height: 100
- anchors.centerIn: parent
- ShapePath {
- id: star
- strokeColor: "blue"
- fillColor: "magenta"
- strokeWidth: 2
- PathMove { x: 90; y: 50 }
- PathLine { x: 50 + 40 * Math.cos(0.8 * 1 * Math.PI); y: 50 + 40 * Math.sin(0.8 * 1 * Math.PI) }
- PathLine { x: 50 + 40 * Math.cos(0.8 * 2 * Math.PI); y: 50 + 40 * Math.sin(0.8 * 2 * Math.PI) }
- PathLine { x: 50 + 40 * Math.cos(0.8 * 3 * Math.PI); y: 50 + 40 * Math.sin(0.8 * 3 * Math.PI) }
- PathLine { x: 50 + 40 * Math.cos(0.8 * 4 * Math.PI); y: 50 + 40 * Math.sin(0.8 * 4 * Math.PI) }
- PathLine { x: 90; y: 50 }
- }
- NumberAnimation on rotation {
- from: 0
- to: 360
- duration: 5000
- loops: Animation.Infinite
- }
- }
- Timer {
- interval: 2000
- onTriggered: star.fillRule = (star.fillRule === ShapePath.OddEvenFill ? ShapePath.WindingFill : ShapePath.OddEvenFill)
- repeat: true
- running: true
- }
- Text {
- anchors.right: parent.right
- text: star.fillRule === ShapePath.OddEvenFill ? "OddEvenFill" : "WindingFill"
- }
-}
diff --git a/examples/quick/shapes/content/item7.qml b/examples/quick/shapes/content/item7.qml
deleted file mode 100644
index ff5c5702da..0000000000
--- a/examples/quick/shapes/content/item7.qml
+++ /dev/null
@@ -1,95 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.9
-import QtQuick.Shapes 1.0
-
-Rectangle {
- color: "lightGray"
-
- Shape {
- width: 120
- height: 120
- anchors.centerIn: parent
-
- ShapePath {
- id: joinTest
-
- strokeColor: "black"
- strokeWidth: 16
- fillColor: "transparent"
- capStyle: ShapePath.RoundCap
-
- property int joinStyleIdx: 0
- property variant styles: [ ShapePath.BevelJoin, ShapePath.MiterJoin, ShapePath.RoundJoin ]
- property variant styleTexts: [ "BevelJoin", "MiterJoin", "RoundJoin" ]
-
- joinStyle: styles[joinStyleIdx]
-
- startX: 30
- startY: 30
- PathLine { x: 100; y: 100 }
- PathLine { x: 30; y: 100 }
- }
- }
-
- Timer {
- interval: 1000
- repeat: true
- running: true
- onTriggered: joinTest.joinStyleIdx = (joinTest.joinStyleIdx + 1) % joinTest.styles.length
- }
-
- Text {
- id: txt
- anchors.right: parent.right
- text: joinTest.styleTexts[joinTest.joinStyleIdx]
- }
-}
diff --git a/examples/quick/shapes/content/item8.qml b/examples/quick/shapes/content/item8.qml
deleted file mode 100644
index 07f633fa56..0000000000
--- a/examples/quick/shapes/content/item8.qml
+++ /dev/null
@@ -1,93 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.9
-import QtQuick.Shapes 1.0
-
-Rectangle {
- color: "lightGray"
-
- Shape {
- anchors.centerIn: parent
- width: 200
- height: 100
-
- ShapePath {
- id: capTest
- strokeColor: "green"
- strokeWidth: 20
- fillColor: "transparent"
-
- property int capStyleIdx: 0
- property variant styles: [ ShapePath.FlatCap, ShapePath.SquareCap, ShapePath.RoundCap ]
- property variant styleTexts: [ "FlatCap", "SquareCap", "RoundCap" ]
-
- capStyle: styles[capStyleIdx]
-
- startX: 40; startY: 30
- PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 }
- PathLine { x: 150; y: 80 }
- PathQuad { x: 160; y: 30; controlX: 200; controlY: 80 }
- }
- }
-
- Timer {
- interval: 1000
- repeat: true
- running: true
- onTriggered: capTest.capStyleIdx = (capTest.capStyleIdx + 1) % capTest.styles.length
- }
-
- Text {
- id: txt
- anchors.right: parent.right
- text: capTest.styleTexts[capTest.capStyleIdx]
- }
-}
diff --git a/examples/quick/shapes/content/item9.qml b/examples/quick/shapes/content/item9.qml
deleted file mode 100644
index 4e5b4022b6..0000000000
--- a/examples/quick/shapes/content/item9.qml
+++ /dev/null
@@ -1,100 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.9
-import QtQuick.Shapes 1.0
-
-Rectangle {
- color: "lightGray"
-
- Item {
- width: 200
- height: 100
- anchors.centerIn: parent
-
- Shape {
- id: shape
- anchors.fill: parent
-
- ShapePath {
- strokeWidth: 4
- strokeColor: "black"
- fillColor: "transparent"
-
- startX: 50
- startY: 50
- PathQuad {
- x: 150; y: 50
- controlX: cp.x; controlY: cp.y
- }
- }
- }
-
- Rectangle {
- id: cp
- color: "red"
- width: 10
- height: 10
- SequentialAnimation on x {
- loops: Animation.Infinite
- NumberAnimation {
- from: 0
- to: shape.width - cp.width
- duration: 5000
- }
- NumberAnimation {
- from: shape.width - cp.width
- to: 0
- duration: 5000
- }
- }
- }
- }
-}
diff --git a/examples/quick/shapes/content/main.qml b/examples/quick/shapes/content/main.qml
deleted file mode 100644
index 8efa47d30b..0000000000
--- a/examples/quick/shapes/content/main.qml
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Item {
- width: 1280
- height: 720
- LauncherList {
- anchors.fill: parent
- Component.onCompleted: {
- addExample("Shape Gallery", "Simple path rendering examples", Qt.resolvedUrl("shapegallery.qml"))
- addExample("Interactive Shape", "Dynamic, interactive path rendering examples", Qt.resolvedUrl("interactive.qml"))
- addExample("Super- and multisampling", "Improving quality", Qt.resolvedUrl("sampling.qml"))
- addExample("Clip My Tiger!", "Clip examples, a.k.a. What Not To Do", Qt.resolvedUrl("clippedtigers.qml"))
- }
- }
-}
diff --git a/examples/quick/shapes/content/sampling.qml b/examples/quick/shapes/content/sampling.qml
deleted file mode 100644
index 6b651f8a1d..0000000000
--- a/examples/quick/shapes/content/sampling.qml
+++ /dev/null
@@ -1,186 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.9
-import QtQuick.Shapes 1.0
-
-Rectangle {
- id: root
- width: 1024
- height: 768
-
- property color col: "lightsteelblue"
- gradient: Gradient {
- GradientStop { position: 0.0; color: Qt.tint(root.col, "#20FFFFFF") }
- GradientStop { position: 0.1; color: Qt.tint(root.col, "#20AAAAAA") }
- GradientStop { position: 0.9; color: Qt.tint(root.col, "#20666666") }
- GradientStop { position: 1.0; color: Qt.tint(root.col, "#20000000") }
- }
-
- Row {
- anchors.fill: parent
- anchors.margins: 20
- spacing: 40
-
- Column {
- spacing: 40
-
- Text {
- text: "Original"
- }
-
- // A simple Shape without anything special.
- Rectangle {
- color: "lightGray"
- width: 400
- height: 200
-
- Shape {
- x: 30
- y: 20
- width: 50
- height: 50
- scale: 2
-
- ShapePath {
- strokeColor: "green"
- NumberAnimation on strokeWidth { from: 1; to: 20; duration: 5000 }
- fillColor: "transparent"
- capStyle: ShapePath.RoundCap
-
- startX: 40; startY: 30
- PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 }
- PathLine { x: 150; y: 80 }
- PathQuad { x: 160; y: 30; controlX: 200; controlY: 80 }
- }
- }
- }
-
- Text {
- text: "Supersampling (2x)"
- }
-
- // Now let's use 2x supersampling via layers. This way the entire subtree
- // is rendered into an FBO twice the size and then drawn with linear
- // filtering. This allows having some level of AA even when there is no
- // support for multisample framebuffers.
- Rectangle {
- id: supersampledItem
- color: "lightGray"
- width: 400
- height: 200
-
- layer.enabled: true
- layer.smooth: true
- layer.textureSize: Qt.size(supersampledItem.width * 2, supersampledItem.height * 2)
-
- Shape {
- x: 30
- y: 20
- width: 50
- height: 50
- scale: 2
-
- ShapePath {
- strokeColor: "green"
- NumberAnimation on strokeWidth { from: 1; to: 20; duration: 5000 }
- fillColor: "transparent"
- capStyle: ShapePath.RoundCap
-
- startX: 40; startY: 30
- PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 }
- PathLine { x: 150; y: 80 }
- PathQuad { x: 160; y: 30; controlX: 200; controlY: 80 }
- }
- }
- }
- }
-
- Column {
- spacing: 40
-
- Text {
- text: "Multisampling (4x)"
- }
-
- // Now let's use 4x MSAA, again via layers. This needs support for
- // multisample renderbuffers and framebuffer blits.
- Rectangle {
- color: "lightGray"
- width: 400
- height: 200
-
- layer.enabled: true
- layer.smooth: true
- layer.samples: 4
-
- Shape {
- x: 30
- y: 20
- width: 50
- height: 50
- scale: 2
-
- ShapePath {
- strokeColor: "green"
- NumberAnimation on strokeWidth { from: 1; to: 20; duration: 5000 }
- fillColor: "transparent"
- capStyle: ShapePath.RoundCap
-
- startX: 40; startY: 30
- PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 }
- PathLine { x: 150; y: 80 }
- PathQuad { x: 160; y: 30; controlX: 200; controlY: 80 }
- }
- }
- }
- }
- }
-}
diff --git a/examples/quick/shapes/content/shapegallery.qml b/examples/quick/shapes/content/shapegallery.qml
deleted file mode 100644
index e5a7c51483..0000000000
--- a/examples/quick/shapes/content/shapegallery.qml
+++ /dev/null
@@ -1,200 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.9
-import QtQuick.Shapes 1.0
-
-Rectangle {
- id: root
- width: 1024
- height: 768
-
- property color col: "lightsteelblue"
- gradient: Gradient {
- GradientStop { position: 0.0; color: Qt.tint(root.col, "#20FFFFFF") }
- GradientStop { position: 0.1; color: Qt.tint(root.col, "#20AAAAAA") }
- GradientStop { position: 0.9; color: Qt.tint(root.col, "#20666666") }
- GradientStop { position: 1.0; color: Qt.tint(root.col, "#20000000") }
- }
-
- ListModel {
- id: pathGalleryModel
- ListElement {
- name: "Stroke and fill"
- shapeUrl: "tapableTriangle.qml"
- }
- ListElement {
- name: "Stroke or fill only"
- shapeUrl: "item2.qml"
- }
- ListElement {
- name: "Dash pattern"
- shapeUrl: "item4.qml"
- }
- ListElement {
- name: "Linear gradient"
- shapeUrl: "item5.qml"
- }
- ListElement {
- name: "Radial gradient"
- shapeUrl: "item3.qml"
- }
- ListElement {
- name: "Fill rules"
- shapeUrl: "item6.qml"
- }
- ListElement {
- name: "Join styles"
- shapeUrl: "item7.qml"
- }
- ListElement {
- name: "Cap styles"
- shapeUrl: "item8.qml"
- }
- ListElement {
- name: "Quadratic curve"
- shapeUrl: "item9.qml"
- }
- ListElement {
- name: "Cubic curve"
- shapeUrl: "item10.qml"
- }
- ListElement {
- name: "Elliptical arc"
- shapeUrl: "item11.qml"
- }
- ListElement {
- name: "Gradient spread modes"
- shapeUrl: "item12.qml"
- }
- ListElement {
- name: "Arc direction"
- shapeUrl: "item13.qml"
- }
- ListElement {
- name: "Large/small arc"
- shapeUrl: "item14.qml"
- }
- ListElement {
- name: "Arc rotation"
- shapeUrl: "item15.qml"
- }
- ListElement {
- name: "Tiger"
- shapeUrl: "item17.qml"
- }
- ListElement {
- name: "Text"
- shapeUrl: "item18.qml"
- }
- }
-
- property int gridSpacing: 10
-
- Component {
- id: pathGalleryDelegate
- Rectangle {
- border.color: "purple"
- width: grid.cellWidth - root.gridSpacing
- height: grid.cellHeight - root.gridSpacing
- Column {
- anchors.fill: parent
- anchors.margins: 4
- Item {
- width: parent.width
- height: parent.height - delegText.height
- Loader {
- source: Qt.resolvedUrl(shapeUrl)
- anchors.fill: parent
- }
- }
- Text {
- id: delegText
- text: model.name
- font.pointSize: 16
- anchors.horizontalCenter: parent.horizontalCenter
- }
- }
- }
- }
-
- Rectangle {
- anchors.fill: parent
- anchors.margins: 10
- color: "lightBlue"
- clip: true
-
- GridView {
- id: grid
- anchors.fill: parent
- anchors.margins: root.gridSpacing
- cellWidth: 300
- cellHeight: 300
- delegate: pathGalleryDelegate
- model: pathGalleryModel
- }
- }
-
- Text {
- anchors.right: parent.right
- Shape { id: dummyShape; ShapePath { } } // used only to get the renderer type
- color: "darkBlue"
- font.pointSize: 12
- property variant rendererStrings: [ "Unknown", "Generic (QtGui triangulator)", "GL_NV_path_rendering", "Software (QPainter)" ]
- text: "Active Shape backend: " + rendererStrings[dummyShape.rendererType]
- SequentialAnimation on opacity {
- NumberAnimation { from: 1; to: 0; duration: 5000 }
- PauseAnimation { duration: 5000 }
- NumberAnimation { from: 0; to: 1; duration: 1000 }
- PauseAnimation { duration: 5000 }
- loops: Animation.Infinite
- }
- }
-}
diff --git a/examples/quick/shapes/content/tapableTriangle.qml b/examples/quick/shapes/content/tapableTriangle.qml
deleted file mode 100644
index 22ed577bcb..0000000000
--- a/examples/quick/shapes/content/tapableTriangle.qml
+++ /dev/null
@@ -1,101 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtQuick.Shapes 1.12
-
-Rectangle {
- width: 120
- height: 120
- color: th.pressed ? "steelBlue" : "lightGray"
- containmentMask: ctr
-
- TapHandler { id: th }
-
- Shape {
- id: ctr
- anchors.fill: parent
- containsMode: Shape.FillContains
-
- ShapePath {
- strokeColor: "red"
- fillColor: "blue"
-
- SequentialAnimation on strokeWidth {
- loops: Animation.Infinite
- NumberAnimation { from: 1; to: 30; duration: 5000 }
- NumberAnimation { from: 30; to: 1; duration: 5000 }
- PauseAnimation { duration: 2000 }
- }
-
- startX: 30; startY: 30
- PathLine { x: ctr.width - 30; y: ctr.height - 30 }
- PathLine { x: 30; y: ctr.height - 30 }
- PathLine { x: 30; y: 30 }
- }
-
- // Besides ShapePath, Shape supports visual and non-visual objects too, allowing
- // free mixing without going through extra hoops:
- Rectangle {
- id: testRect
- color: "green"
- opacity: 0.3
- width: 20
- height: 20
- anchors.right: parent.right
- }
- Timer {
- interval: 100
- repeat: true
- onTriggered: testRect.width = testRect.width > 1 ? testRect.width - 1 : 20
- running: true
- }
- }
-}
diff --git a/examples/quick/shapes/doc/src/shapes.qdoc b/examples/quick/shapes/doc/src/shapes.qdoc
deleted file mode 100644
index 46c1f930d3..0000000000
--- a/examples/quick/shapes/doc/src/shapes.qdoc
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-/*!
- \title Qt Quick Examples - Shapes
- \example shapes
- \image qml-shapes-example.png
- \brief A Qt Quick example demonstrating the use of shape items.
- \ingroup qtquickexamples
-
- This example demonstrates the usage of the \l Shape type in Qt Quick. Shapes
- allow efficiently rendering stroked and filled lines, curves, and arcs in Qt
- Quick scenes.
-
- \include examples-run.qdocinc
-*/
diff --git a/examples/quick/shapes/main.cpp b/examples/quick/shapes/main.cpp
deleted file mode 100644
index 60f6c98f42..0000000000
--- a/examples/quick/shapes/main.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-#include "../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(shapes/main)
diff --git a/examples/quick/shapes/shapes.pro b/examples/quick/shapes/shapes.pro
deleted file mode 100644
index f99d941804..0000000000
--- a/examples/quick/shapes/shapes.pro
+++ /dev/null
@@ -1,31 +0,0 @@
-TEMPLATE = app
-
-QT += quick qml
-SOURCES += main.cpp
-RESOURCES += shapes.qrc
-OTHER_FILES += content/main.qml \
- content/shapegallery.qml \
- content/interactive.qml \
- content/sampling.qml \
- content/clippedtigers.qml \
- content/tiger.qml \
- content/tapableTriangle.qml \
- content/item2.qml \
- content/item3.qml \
- content/item4.qml \
- content/item5.qml \
- content/item6.qml \
- content/item7.qml \
- content/item8.qml \
- content/item9.qml \
- content/item10.qml \
- content/item11.qml \
- content/item12.qml \
- content/item13.qml \
- content/item14.qml \
- content/item15.qml \
- content/item17.qml \
- content/item18.qml
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/shapes
-INSTALLS += target
diff --git a/examples/quick/shapes/shapes.qrc b/examples/quick/shapes/shapes.qrc
deleted file mode 100644
index 6de463dd33..0000000000
--- a/examples/quick/shapes/shapes.qrc
+++ /dev/null
@@ -1,33 +0,0 @@
-<RCC>
- <qresource prefix="/shapes">
- <file alias="LauncherList.qml">../shared/LauncherList.qml</file>
- <file alias="SimpleLauncherDelegate.qml">../shared/SimpleLauncherDelegate.qml</file>
- <file alias="images/next.png">../shared/images/next.png</file>
- <file alias="images/back.png">../shared/images/back.png</file>
- <file alias="images/slider_handle.png">../shared/images/slider_handle.png</file>
- <file alias="Slider.qml">../shared/Slider.qml</file>
- <file alias="main.qml">content/main.qml</file>
- <file alias="shapegallery.qml">content/shapegallery.qml</file>
- <file alias="interactive.qml">content/interactive.qml</file>
- <file alias="sampling.qml">content/sampling.qml</file>
- <file alias="clippedtigers.qml">content/clippedtigers.qml</file>
- <file alias="tiger.qml">content/tiger.qml</file>
- <file alias="tapableTriangle.qml">content/tapableTriangle.qml</file>
- <file alias="item2.qml">content/item2.qml</file>
- <file alias="item3.qml">content/item3.qml</file>
- <file alias="item4.qml">content/item4.qml</file>
- <file alias="item5.qml">content/item5.qml</file>
- <file alias="item6.qml">content/item6.qml</file>
- <file alias="item7.qml">content/item7.qml</file>
- <file alias="item8.qml">content/item8.qml</file>
- <file alias="item9.qml">content/item9.qml</file>
- <file alias="item10.qml">content/item10.qml</file>
- <file alias="item11.qml">content/item11.qml</file>
- <file alias="item12.qml">content/item12.qml</file>
- <file alias="item13.qml">content/item13.qml</file>
- <file alias="item14.qml">content/item14.qml</file>
- <file alias="item15.qml">content/item15.qml</file>
- <file alias="item17.qml">content/item17.qml</file>
- <file alias="item18.qml">content/item18.qml</file>
- </qresource>
-</RCC>
diff --git a/examples/quick/shared/Button.qml b/examples/quick/shared/Button.qml
index ce7dad717f..31e88fe541 100644
--- a/examples/quick/shared/Button.qml
+++ b/examples/quick/shared/Button.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.12
-import QtQuick.Window 2.1
+import QtQuick
+import QtQuick.Window
Item {
id: container
diff --git a/examples/quick/shared/CMakeLists.txt b/examples/quick/shared/CMakeLists.txt
new file mode 100644
index 0000000000..7382df7689
--- /dev/null
+++ b/examples/quick/shared/CMakeLists.txt
@@ -0,0 +1,38 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+set_source_files_properties(CheckBox.qml TabSet.qml TextField.qml
+ PROPERTIES
+ QT_QML_SOURCE_VERSIONS 2.1
+)
+
+set_source_files_properties(Images.qml
+ PROPERTIES
+ QT_QML_SINGLETON_TYPE true
+ QT_QML_SOURCE_VERSIONS 2.2
+)
+
+qt_add_qml_module(${PROJECT_NAME}_shared
+ URI shared
+ VERSION 2.2
+ PLUGIN_TARGET ${PROJECT_NAME}_shared
+ SOURCES
+ "shared.h"
+ QML_FILES
+ "Button.qml"
+ "CheckBox.qml"
+ "Label.qml"
+ "LauncherList.qml"
+ "SimpleLauncherDelegate.qml"
+ "Slider.qml"
+ "TabSet.qml"
+ "TextField.qml"
+ "Images.qml"
+ RESOURCES
+ "images/back.png"
+ "images/checkmark.png"
+ "images/next.png"
+ "images/qt-logo.png"
+ "images/slider_handle.png"
+ "images/tab.png"
+)
diff --git a/examples/quick/shared/CheckBox.qml b/examples/quick/shared/CheckBox.qml
index 51b6aabc09..45c4f4e674 100644
--- a/examples/quick/shared/CheckBox.qml
+++ b/examples/quick/shared/CheckBox.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.12
+import QtQuick
Item {
id: root
diff --git a/examples/quick/shared/FlickrRssModel.qml b/examples/quick/shared/FlickrRssModel.qml
deleted file mode 100644
index 2fb4412ba1..0000000000
--- a/examples/quick/shared/FlickrRssModel.qml
+++ /dev/null
@@ -1,92 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-
-ListModel {
- id: flickrImages
- property string tags : ""
- readonly property string queryUrl : "http://api.flickr.com/services/feeds/photos_public.gne?"
-
- function encodeParams(x) {
- return encodeURIComponent(x.replace(" ",","));
- }
- function fetchImages(format) {
- var requestURL = queryUrl + (tags ? "tags="+encodeParams(tags)+"&" : "") + "format=" + format + "&nojsoncallback=1";
- var xhr = new XMLHttpRequest;
- xhr.onreadystatechange = function() {
- if (xhr.readyState === XMLHttpRequest.DONE) {
-
- if (xhr.status !== 200) {
- console.log("Failed to get images from flickr. status code: " + xhr.status);
- return;
- }
-
- var jsonText = xhr.responseText;
- var objArray = JSON.parse(jsonText.replace(/\'/g,"'"))
- if (objArray.errors !== undefined)
- console.log("Error fetching tweets: " + objArray.errors[0].message)
- else {
- for (var key in objArray.items) {
- var rssItem = objArray.items[key];
- var jsonObject = "{ \"title\": \"" + rssItem.title +"\",\"media\": \"" + rssItem.media.m + "\", \"thumbnail\": \"" + rssItem.media.m.replace(/\_m\.jpg/,"_s.jpg") +"\"}"
- flickrImages.append(JSON.parse(jsonObject));
- }
- }
- }
- }
- xhr.open("GET", requestURL, true);
- xhr.send();
- }
- Component.onCompleted: {
- fetchImages("json");
- }
-}
-
diff --git a/examples/quick/shared/Images.qml b/examples/quick/shared/Images.qml
new file mode 100644
index 0000000000..ade3619d8a
--- /dev/null
+++ b/examples/quick/shared/Images.qml
@@ -0,0 +1,14 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+pragma Singleton
+import QtQml
+
+QtObject {
+ readonly property url back: Qt.resolvedUrl("images/back.png")
+ readonly property url checkmark: Qt.resolvedUrl("images/checkmark.png")
+ readonly property url next: Qt.resolvedUrl("images/next.png")
+ readonly property url qtLogo: Qt.resolvedUrl("images/qt-logo.png")
+ readonly property url sliderHandle: Qt.resolvedUrl("images/slider_handle.png")
+ readonly property url tab: Qt.resolvedUrl("images/tab.png")
+}
diff --git a/examples/quick/shared/Label.qml b/examples/quick/shared/Label.qml
index acbffb8dfa..5393336cab 100644
--- a/examples/quick/shared/Label.qml
+++ b/examples/quick/shared/Label.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
Text {
SystemPalette { id: palette }
diff --git a/examples/quick/shared/LauncherList.qml b/examples/quick/shared/LauncherList.qml
index cb13ec4372..f86ab80446 100644
--- a/examples/quick/shared/LauncherList.qml
+++ b/examples/quick/shared/LauncherList.qml
@@ -1,57 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 Crimson AS <info@crimson.no>
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQml 2.12
-import QtQml.Models 2.12
-import QtQuick 2.12
+// Copyright (C) 2017 Crimson AS <info@crimson.no>
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQml
+import QtQml.Models
+import QtQuick
Rectangle {
id: root
@@ -221,22 +174,26 @@ Rectangle {
id: back
source: "images/back.png"
anchors.verticalCenter: parent.verticalCenter
- anchors.verticalCenterOffset: 2
+ anchors.verticalCenterOffset: 1
anchors.left: parent.left
- anchors.leftMargin: 16
+ anchors.leftMargin: 6
+ width: 38
+ height: 31
+ fillMode: Image.Pad
+ horizontalAlignment: Image.AlignHCenter
+ verticalAlignment: Image.AlignVCenter
TapHandler {
id: tapHandler
enabled: root.activePageCount > 0
+ gesturePolicy: TapHandler.ReleaseWithinBounds
+ longPressThreshold: 0
onTapped: {
pageContainer.children[pageContainer.children.length - 1].exit()
}
}
Rectangle {
- anchors.centerIn: back
- width: 38
- height: 31
- anchors.verticalCenterOffset: -1
+ anchors.fill: parent
opacity: tapHandler.pressed ? 1 : 0
Behavior on opacity { NumberAnimation{ duration: 100 }}
gradient: Gradient {
diff --git a/examples/quick/shared/SimpleLauncherDelegate.qml b/examples/quick/shared/SimpleLauncherDelegate.qml
index 097954cb89..a6ac090b34 100644
--- a/examples/quick/shared/SimpleLauncherDelegate.qml
+++ b/examples/quick/shared/SimpleLauncherDelegate.qml
@@ -1,53 +1,6 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-import QtQuick 2.12
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+import QtQuick
Rectangle {
id: container
@@ -56,7 +9,7 @@ Rectangle {
property Item exampleItem
width: ListView.view.width
- height: button.implicitHeight + 22
+ height: col.implicitHeight + 22
signal clicked()
@@ -69,10 +22,18 @@ Rectangle {
GradientStop {
position: 1
Behavior on color {ColorAnimation { duration: 100 }}
- color: tapHandler.pressed ? "#e0e0e0" : button.containsMouse ? "#f5f5f5" : "#eee"
+ color: tapHandler.pressed ? "#e0e0e0" : hoverHandler.hovered ? "#f5f5f5" : "#eee"
}
}
+ TapHandler {
+ id: tapHandler
+ onTapped: container.clicked()
+ }
+ HoverHandler {
+ id: hoverHandler
+ }
+
Image {
id: image
opacity: 0.7
@@ -83,53 +44,28 @@ Rectangle {
anchors.rightMargin: 16
}
- Item {
- id: button
- anchors.top: parent.top
+ Column {
+ id: col
+ spacing: 2
anchors.left: parent.left
- anchors.bottom: parent.bottom
anchors.right:image.left
- implicitHeight: col.height
- height: implicitHeight
- width: buttonLabel.width + 20
- property alias containsMouse: hoverHandler.hovered
-
- TapHandler {
- id: tapHandler
- onTapped: container.clicked()
- }
- HoverHandler {
- id: hoverHandler
+ anchors.margins: 10
+ anchors.verticalCenter: parent.verticalCenter
+ Text {
+ width: parent.width
+ text: container.name
+ color: "black"
+ font.pixelSize: 22
+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
+ styleColor: "white"
+ style: Text.Raised
}
-
- Column {
- spacing: 2
- id: col
- anchors.verticalCenter: parent.verticalCenter
+ Text {
width: parent.width
- Text {
- id: buttonLabel
- anchors.left: parent.left
- anchors.leftMargin: 10
- anchors.right: parent.right
- anchors.rightMargin: 10
- text: container.name
- color: "black"
- font.pixelSize: 22
- wrapMode: Text.WrapAtWordBoundaryOrAnywhere
- styleColor: "white"
- style: Text.Raised
-
- }
- Text {
- id: buttonLabel2
- anchors.left: parent.left
- anchors.leftMargin: 10
- text: container.description
- wrapMode: Text.WrapAtWordBoundaryOrAnywhere
- color: "#666"
- font.pixelSize: 12
- }
+ text: container.description
+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
+ color: "#666"
+ font.pixelSize: 12
}
}
diff --git a/examples/quick/shared/Slider.qml b/examples/quick/shared/Slider.qml
index 5b08034571..b8bb6ed30c 100644
--- a/examples/quick/shared/Slider.qml
+++ b/examples/quick/shared/Slider.qml
@@ -1,59 +1,13 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.12
+import QtQuick
Item {
id: slider
height: 26
- width: 320
+ // default drag range is 180: divisible by 2, 3, 4, 5, 6, 9, 10, ...
+ width: sliderName.width + 223 + handle.width / 2
property real min: 0
property real max: 1
@@ -67,16 +21,19 @@ Item {
id: dragHandler
target: handle
xAxis.minimum: Math.round(-handle.width / 2 + 3)
- xAxis.maximum: Math.round(foo.width - handle.width/2 - 3)
+ xAxis.maximum: Math.round(groove.width - handle.width / 2 - 3)
property real value: (handle.x - xAxis.minimum) / (xAxis.maximum - xAxis.minimum)
}
Component.onCompleted: setValue(init)
function setValue(v) {
- if (min < max)
- handle.x = Math.round( v / (max - min) *
+ if (min < max) {
+ handle.x = Math.round( v / (max - min) *
(dragHandler.xAxis.maximum - dragHandler.xAxis.minimum)
+ dragHandler.xAxis.minimum);
+// console.log(name, v, "-> handle.x", handle.x, "from fraction", (v / (max - min)),
+// "of drag range", (dragHandler.xAxis.maximum - dragHandler.xAxis.minimum), "px", min, ":", max)
+ }
}
Rectangle {
id:sliderName
@@ -92,8 +49,8 @@ Item {
}
}
- Rectangle{
- id: foo
+ Rectangle {
+ id: groove
width: parent.width - 8 - sliderName.width
color: "#eee"
height: 7
diff --git a/examples/quick/shared/TabSet.qml b/examples/quick/shared/TabSet.qml
index ab8476ad44..d9ae7d7b6d 100644
--- a/examples/quick/shared/TabSet.qml
+++ b/examples/quick/shared/TabSet.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.12
-import QtQuick.Window 2.1
+import QtQuick
+import QtQuick.Window
Item {
id: tabWidget
diff --git a/examples/quick/shared/TextField.qml b/examples/quick/shared/TextField.qml
index 05e048011a..66854c89bf 100644
--- a/examples/quick/shared/TextField.qml
+++ b/examples/quick/shared/TextField.qml
@@ -1,54 +1,7 @@
-/*****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-*****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.1
+import QtQuick
Item {
id: root
diff --git a/examples/quick/shared/qmldir b/examples/quick/shared/qmldir
index b539191fec..8a3d856a08 100644
--- a/examples/quick/shared/qmldir
+++ b/examples/quick/shared/qmldir
@@ -1,7 +1,10 @@
+module shared
Button 2.0 Button.qml
CheckBox 2.1 CheckBox.qml
+Label 2.0 Label.qml
LauncherList 2.0 LauncherList.qml
SimpleLauncherDelegate 2.0 SimpleLauncherDelegate.qml
Slider 2.0 Slider.qml
TabSet 2.1 TabSet.qml
TextField 2.1 TextField.qml
+singleton Images 2.2 Images.qml
diff --git a/examples/quick/shared/shared.h b/examples/quick/shared/shared.h
index a6a468ddcb..382aec4295 100644
--- a/examples/quick/shared/shared.h
+++ b/examples/quick/shared/shared.h
@@ -1,57 +1,18 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QDir>
#include <QGuiApplication>
#include <QQmlEngine>
#include <QQmlFileSelector>
#include <QQuickView> //Not using QQmlApplicationEngine because many examples don't have a Window{}
+
+#ifdef Q_OS_MACOS
+#define ADD_MACOS_BUNDLE_IMPORT_PATH \
+ view.engine()->addImportPath(app.applicationDirPath() + QStringLiteral("/../PlugIns"));
+#else
+#define ADD_MACOS_BUNDLE_IMPORT_PATH
+#endif
+
#define DECLARATIVE_EXAMPLE_MAIN(NAME) int main(int argc, char* argv[]) \
{\
QGuiApplication app(argc,argv);\
@@ -59,20 +20,21 @@
app.setOrganizationDomain("qt-project.org");\
app.setApplicationName(QFileInfo(app.applicationFilePath()).baseName());\
QQuickView view;\
- if (qgetenv("QT_QUICK_CORE_PROFILE").toInt()) {\
+ ADD_MACOS_BUNDLE_IMPORT_PATH\
+ if (qEnvironmentVariableIntValue("QT_QUICK_CORE_PROFILE")) {\
QSurfaceFormat f = view.format();\
f.setProfile(QSurfaceFormat::CoreProfile);\
f.setVersion(4, 4);\
view.setFormat(f);\
}\
- if (qgetenv("QT_QUICK_MULTISAMPLE").toInt()) {\
+ if (qEnvironmentVariableIntValue("QT_QUICK_MULTISAMPLE")) {\
QSurfaceFormat f = view.format();\
f.setSamples(4);\
view.setFormat(f);\
}\
view.connect(view.engine(), &QQmlEngine::quit, &app, &QCoreApplication::quit);\
new QQmlFileSelector(view.engine(), &view);\
- view.setSource(QUrl("qrc:///" #NAME ".qml")); \
+ view.setSource(QUrl("qrc:/qt/qml/" #NAME ".qml")); \
if (view.status() == QQuickView::Error)\
return -1;\
view.setResizeMode(QQuickView::SizeRootObjectToView);\
diff --git a/examples/quick/shared/shared.qrc b/examples/quick/shared/shared.qrc
index cce683f8a3..054db1f352 100644
--- a/examples/quick/shared/shared.qrc
+++ b/examples/quick/shared/shared.qrc
@@ -1,19 +1,20 @@
<RCC>
- <qresource prefix="/shared">
- <file>FlickrRssModel.qml</file>
- <file>LauncherList.qml</file>
- <file>SimpleLauncherDelegate.qml</file>
+ <qresource prefix="/qt/qml/shared">
<file>Button.qml</file>
- <file>Slider.qml</file>
- <file>images/slider_handle.png</file>
<file>CheckBox.qml</file>
+ <file>Images.qml</file>
<file>Label.qml</file>
+ <file>LauncherList.qml</file>
+ <file>SimpleLauncherDelegate.qml</file>
+ <file>Slider.qml</file>
<file>TabSet.qml</file>
<file>TextField.qml</file>
<file>images/back.png</file>
+ <file>images/checkmark.png</file>
<file>images/next.png</file>
<file>images/qt-logo.png</file>
- <file>images/checkmark.png</file>
+ <file>images/slider_handle.png</file>
<file>images/tab.png</file>
+ <file>qmldir</file>
</qresource>
</RCC>
diff --git a/examples/quick/tableview/CMakeLists.txt b/examples/quick/tableview/CMakeLists.txt
index 6875e412e9..80ac8687d4 100644
--- a/examples/quick/tableview/CMakeLists.txt
+++ b/examples/quick/tableview/CMakeLists.txt
@@ -1,4 +1,2 @@
-# Generated from tableview.pro.
-
-add_subdirectory(gameoflife)
-add_subdirectory(pixelator)
+qt_internal_add_example(gameoflife)
+qt_internal_add_example(pixelator)
diff --git a/examples/quick/tableview/gameoflife/CMakeLists.txt b/examples/quick/tableview/gameoflife/CMakeLists.txt
index 4592943c11..0af748fc80 100644
--- a/examples/quick/tableview/gameoflife/CMakeLists.txt
+++ b/examples/quick/tableview/gameoflife/CMakeLists.txt
@@ -1,63 +1,49 @@
-# Generated from gameoflife.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(gameoflife LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/tableview/gameoflife")
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
+qt_standard_project_setup(REQUIRES 6.5)
qt_add_executable(gameoflife
+ WIN32
+ MACOSX_BUNDLE
gameoflifemodel.cpp gameoflifemodel.h
main.cpp
)
-set_target_properties(gameoflife PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(gameoflife PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-# Resources:
-set(qmake_immediate_resource_files
- "gosperglidergun.cells"
- "main.qml"
+target_link_libraries(gameoflife PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
-qt6_add_resources(gameoflife "qmake_immediate"
- PREFIX
- "/"
- FILES
- ${qmake_immediate_resource_files}
+qt_add_qml_module(gameoflife
+ URI GameOfLifeModel
+ QML_FILES main.qml
+ RESOURCES gosperglidergun.cells
+ NO_RESOURCE_TARGET_PATH
+ DEPENDENCIES
+ QtQml.Models
)
install(TARGETS gameoflife
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-set_target_properties(gameoflife PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI GameOfLifeModel
+qt_generate_deploy_qml_app_script(
+ TARGET gameoflife
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
-
-qt6_qml_type_registration(gameoflife)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/tableview/gameoflife/doc/src/gameoflife.qdoc b/examples/quick/tableview/gameoflife/doc/src/gameoflife.qdoc
index b61ba90a58..b8d594d598 100644
--- a/examples/quick/tableview/gameoflife/doc/src/gameoflife.qdoc
+++ b/examples/quick/tableview/gameoflife/doc/src/gameoflife.qdoc
@@ -1,34 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2018 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Qt Quick TableView examples - Conway’s Game of Life
\example tableview/gameoflife
\brief The \e{Conway’s Game of Life} example shows how the QML TableView
type can be used to display a C++ model that the user can pan around.
+ \examplecategory {Graphics}
\image gameoflife.png
\ingroup qtquickexamples
diff --git a/examples/quick/tableview/gameoflife/gameoflifemodel.cpp b/examples/quick/tableview/gameoflife/gameoflifemodel.cpp
index 32765f87a8..669157f7af 100644
--- a/examples/quick/tableview/gameoflife/gameoflifemodel.cpp
+++ b/examples/quick/tableview/gameoflife/gameoflifemodel.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2018 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "gameoflifemodel.h"
#include <QFile>
diff --git a/examples/quick/tableview/gameoflife/gameoflifemodel.h b/examples/quick/tableview/gameoflife/gameoflifemodel.h
index 161e0b2cfc..dc5f67729a 100644
--- a/examples/quick/tableview/gameoflife/gameoflifemodel.h
+++ b/examples/quick/tableview/gameoflife/gameoflifemodel.h
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2018 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef GAMEOFLIFEMODEL_H
#define GAMEOFLIFEMODEL_H
diff --git a/examples/quick/tableview/gameoflife/main.cpp b/examples/quick/tableview/gameoflife/main.cpp
index 8fa6b8b1db..ca0b3991cd 100644
--- a/examples/quick/tableview/gameoflife/main.cpp
+++ b/examples/quick/tableview/gameoflife/main.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2018 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QGuiApplication>
#include <QQmlApplicationEngine>
@@ -61,5 +14,5 @@ int main(int argc, char *argv[])
if (engine.rootObjects().isEmpty())
return -1;
- return app.exec();
+ return QGuiApplication::exec();
}
diff --git a/examples/quick/tableview/gameoflife/main.qml b/examples/quick/tableview/gameoflife/main.qml
index fb3195892f..55c5b193f8 100644
--- a/examples/quick/tableview/gameoflife/main.qml
+++ b/examples/quick/tableview/gameoflife/main.qml
@@ -1,59 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQml 2.12
-import QtQuick 2.12
-import QtQuick.Window 2.3
-import QtQuick.Controls 2.2
-import QtQuick.Layouts 1.3
-import GameOfLifeModel 1.0
+// Copyright (C) 2018 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQml
+import QtQuick
+import QtQuick.Window
+import QtQuick.Controls
+import QtQuick.Layouts
+import GameOfLifeModel
ApplicationWindow {
id: root
@@ -120,24 +73,22 @@ ApplicationWindow {
Button {
text: qsTr("Next")
onClicked: gameOfLifeModel.nextStep()
+ Layout.rightMargin: 50
+ Layout.fillWidth: false
}
//! [next]
- Item {
- width: 50
- }
-
Slider {
id: slider
- x: 245
- y: 17
from: 0
to: 1
value: 0.9
+ Layout.fillWidth: false
}
Button {
text: timer.running ? "❙❙" : "▶️"
+ Layout.fillWidth: false
onClicked: timer.running = !timer.running
}
}
diff --git a/examples/quick/tableview/pixelator/CMakeLists.txt b/examples/quick/tableview/pixelator/CMakeLists.txt
index 41b0a139c8..de24974bcd 100644
--- a/examples/quick/tableview/pixelator/CMakeLists.txt
+++ b/examples/quick/tableview/pixelator/CMakeLists.txt
@@ -1,63 +1,47 @@
-# Generated from pixelator.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qml_pixelator LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/tableview/pixelator")
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
+qt_standard_project_setup(REQUIRES 6.5)
qt_add_executable(qml_pixelator
+ WIN32
+ MACOSX_BUNDLE
imagemodel.cpp imagemodel.h
main.cpp
)
-set_target_properties(qml_pixelator PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(qml_pixelator PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-# Resources:
-set(qmake_immediate_resource_files
- "main.qml"
- "qt.png"
+target_link_libraries(qml_pixelator PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
-qt6_add_resources(qml_pixelator "qmake_immediate"
- PREFIX
- "/"
- FILES
- ${qmake_immediate_resource_files}
+qt_add_qml_module(qml_pixelator
+ URI ImageModel
+ QML_FILES main.qml
+ RESOURCES qt.png
+ NO_RESOURCE_TARGET_PATH
)
install(TARGETS qml_pixelator
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-set_target_properties(qml_pixelator PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI ImageModel
+qt_generate_deploy_qml_app_script(
+ TARGET qml_pixelator
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
-
-qt6_qml_type_registration(qml_pixelator)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/tableview/pixelator/doc/src/pixelator.qdoc b/examples/quick/tableview/pixelator/doc/src/pixelator.qdoc
index 88b28769cd..35d3ac6732 100644
--- a/examples/quick/tableview/pixelator/doc/src/pixelator.qdoc
+++ b/examples/quick/tableview/pixelator/doc/src/pixelator.qdoc
@@ -1,34 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Qt Quick TableViews examples - Pixelator
\example tableview/pixelator
\brief The Pixelator example shows how a QML TableView and a delegate
can be used for custom table models.
+ \examplecategory {Graphics}
\image qt-pixelator.png
\ingroup qtquickexamples
diff --git a/examples/quick/tableview/pixelator/imagemodel.cpp b/examples/quick/tableview/pixelator/imagemodel.cpp
index 827204bc06..7d2d164d29 100644
--- a/examples/quick/tableview/pixelator/imagemodel.cpp
+++ b/examples/quick/tableview/pixelator/imagemodel.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2018 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "imagemodel.h"
diff --git a/examples/quick/tableview/pixelator/imagemodel.h b/examples/quick/tableview/pixelator/imagemodel.h
index de8ad7cd8d..b1d11f44c8 100644
--- a/examples/quick/tableview/pixelator/imagemodel.h
+++ b/examples/quick/tableview/pixelator/imagemodel.h
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2018 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef IMAGEMODEL_H
#define IMAGEMODEL_H
diff --git a/examples/quick/tableview/pixelator/main.cpp b/examples/quick/tableview/pixelator/main.cpp
index c07f43dc27..b674572e0d 100644
--- a/examples/quick/tableview/pixelator/main.cpp
+++ b/examples/quick/tableview/pixelator/main.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2018 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QGuiApplication>
#include <QQmlApplicationEngine>
@@ -63,5 +16,5 @@ int main(int argc, char *argv[])
if (engine.rootObjects().isEmpty())
return -1;
- return app.exec();
+ return QGuiApplication::exec();
}
diff --git a/examples/quick/tableview/pixelator/main.qml b/examples/quick/tableview/pixelator/main.qml
index a5edefae90..67a4ff5a36 100644
--- a/examples/quick/tableview/pixelator/main.qml
+++ b/examples/quick/tableview/pixelator/main.qml
@@ -1,58 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2018 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.12
+import QtQuick
-import QtQuick.Window 2.12
+import QtQuick.Window
-import ImageModel 1.0
+import ImageModel
Window {
visible: true
diff --git a/examples/quick/text/.prev_CMakeLists.txt b/examples/quick/text/.prev_CMakeLists.txt
deleted file mode 100644
index 20d4228bcf..0000000000
--- a/examples/quick/text/.prev_CMakeLists.txt
+++ /dev/null
@@ -1,144 +0,0 @@
-# Generated from text.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(text LANGUAGES CXX)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/text")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(text
- main.cpp
-)
-set_target_properties(text PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(text PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-
-# Resources:
-set(text_resource_files
- "fonts/availableFonts.qml"
- "fonts/banner.qml"
- "fonts/content/fonts/tarzeau_ocr_a.ttf"
- "fonts/fonts.qml"
- "fonts/hello.qml"
- "imgtag/TextWithImage.qml"
- "imgtag/images/face-sad.png"
- "imgtag/images/face-smile-big.png"
- "imgtag/images/face-smile.png"
- "imgtag/images/heart200.png"
- "imgtag/images/qtlogo.png"
- "imgtag/images/starfish_2.png"
- "imgtag/imgtag.qml"
- "styledtext-layout.qml"
- "text.qml"
- "textselection/pics/endHandle.png"
- "textselection/pics/endHandle.sci"
- "textselection/pics/startHandle.png"
- "textselection/pics/startHandle.sci"
- "textselection/textselection.qml"
-)
-
-qt6_add_resources(text "text"
- PREFIX
- "/text"
- FILES
- ${text_resource_files}
-)
-set_source_files_properties("../shared/Button.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Button.qml"
-)
-set_source_files_properties("../shared/CheckBox.qml"
- PROPERTIES QT_RESOURCE_ALIAS "CheckBox.qml"
-)
-set_source_files_properties("../shared/FlickrRssModel.qml"
- PROPERTIES QT_RESOURCE_ALIAS "FlickrRssModel.qml"
-)
-set_source_files_properties("../shared/Label.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Label.qml"
-)
-set_source_files_properties("../shared/LauncherList.qml"
- PROPERTIES QT_RESOURCE_ALIAS "LauncherList.qml"
-)
-set_source_files_properties("../shared/SimpleLauncherDelegate.qml"
- PROPERTIES QT_RESOURCE_ALIAS "SimpleLauncherDelegate.qml"
-)
-set_source_files_properties("../shared/Slider.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Slider.qml"
-)
-set_source_files_properties("../shared/TabSet.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TabSet.qml"
-)
-set_source_files_properties("../shared/TextField.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TextField.qml"
-)
-set_source_files_properties("../shared/images/back.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/back.png"
-)
-set_source_files_properties("../shared/images/checkmark.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/checkmark.png"
-)
-set_source_files_properties("../shared/images/next.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/next.png"
-)
-set_source_files_properties("../shared/images/qt-logo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/qt-logo.png"
-)
-set_source_files_properties("../shared/images/slider_handle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/slider_handle.png"
-)
-set_source_files_properties("../shared/images/tab.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/tab.png"
-)
-set(shared_resource_files
- "Button.qml"
- "CheckBox.qml"
- "FlickrRssModel.qml"
- "Label.qml"
- "LauncherList.qml"
- "SimpleLauncherDelegate.qml"
- "Slider.qml"
- "TabSet.qml"
- "TextField.qml"
- "images/back.png"
- "images/checkmark.png"
- "images/next.png"
- "images/qt-logo.png"
- "images/slider_handle.png"
- "images/tab.png"
-)
-
-qt6_add_resources(text "shared"
- PREFIX
- "/shared"
- BASE
- "../shared"
- FILES
- ${shared_resource_files}
-)
-
-install(TARGETS text
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
diff --git a/examples/quick/text/CMakeLists.txt b/examples/quick/text/CMakeLists.txt
index f4e7e7de38..5560256793 100644
--- a/examples/quick/text/CMakeLists.txt
+++ b/examples/quick/text/CMakeLists.txt
@@ -1,146 +1,62 @@
-# Generated from text.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(text LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup(REQUIRES 6.5)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
+add_subdirectory("../shared" "shared")
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/text")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(text
+qt_add_executable(textexample
+ WIN32
+ MACOSX_BUNDLE
main.cpp
)
-set_target_properties(text PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(text PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-# Resources:
-set(text_resource_files
- "fonts/availableFonts.qml"
- "fonts/banner.qml"
- "fonts/content/fonts/tarzeau_ocr_a.ttf"
- "fonts/fonts.qml"
- "fonts/hello.qml"
- "imgtag/TextWithImage.qml"
- "imgtag/images/face-sad.png"
- "imgtag/images/face-smile-big.png"
- "imgtag/images/face-smile.png"
- "imgtag/images/heart200.png"
- "imgtag/images/qtlogo.png"
- "imgtag/images/starfish_2.png"
- "imgtag/imgtag.qml"
- "styledtext-layout.qml"
- "text.qml"
- "textselection/pics/endHandle.png"
- "textselection/pics/endHandle.sci"
- "textselection/pics/startHandle.png"
- "textselection/pics/startHandle.sci"
- "textselection/textselection.qml"
-)
-
-qt6_add_resources(text "text"
- PREFIX
- "/text"
- FILES
- ${text_resource_files}
-)
-set_source_files_properties("../shared/Button.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Button.qml"
-)
-set_source_files_properties("../shared/CheckBox.qml"
- PROPERTIES QT_RESOURCE_ALIAS "CheckBox.qml"
-)
-set_source_files_properties("../shared/FlickrRssModel.qml"
- PROPERTIES QT_RESOURCE_ALIAS "FlickrRssModel.qml"
-)
-set_source_files_properties("../shared/Label.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Label.qml"
-)
-set_source_files_properties("../shared/LauncherList.qml"
- PROPERTIES QT_RESOURCE_ALIAS "LauncherList.qml"
-)
-set_source_files_properties("../shared/SimpleLauncherDelegate.qml"
- PROPERTIES QT_RESOURCE_ALIAS "SimpleLauncherDelegate.qml"
-)
-set_source_files_properties("../shared/Slider.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Slider.qml"
-)
-set_source_files_properties("../shared/TabSet.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TabSet.qml"
-)
-set_source_files_properties("../shared/TextField.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TextField.qml"
-)
-set_source_files_properties("../shared/images/back.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/back.png"
-)
-set_source_files_properties("../shared/images/checkmark.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/checkmark.png"
-)
-set_source_files_properties("../shared/images/next.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/next.png"
-)
-set_source_files_properties("../shared/images/qt-logo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/qt-logo.png"
-)
-set_source_files_properties("../shared/images/slider_handle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/slider_handle.png"
-)
-set_source_files_properties("../shared/images/tab.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/tab.png"
-)
-set(shared_resource_files
- "Button.qml"
- "CheckBox.qml"
- "FlickrRssModel.qml"
- "Label.qml"
- "LauncherList.qml"
- "SimpleLauncherDelegate.qml"
- "Slider.qml"
- "TabSet.qml"
- "TextField.qml"
- "images/back.png"
- "images/checkmark.png"
- "images/next.png"
- "images/qt-logo.png"
- "images/slider_handle.png"
- "images/tab.png"
-)
-
-qt6_add_resources(text "shared"
- PREFIX
- "/shared"
- BASE
- "../shared"
- FILES
- ${shared_resource_files}
-)
-
-qt_import_qml_plugins(text) # special case
-
-install(TARGETS text
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
+target_link_libraries(textexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
+
+add_dependencies(textexample text_shared)
+
+qt_add_qml_module(textexample
+ URI text
+ QML_FILES
+ "fonts/availableFonts.qml"
+ "fonts/banner.qml"
+ "fonts/fonts.qml"
+ "fonts/hello.qml"
+ "imgtag/TextWithImage.qml"
+ "imgtag/imgtag.qml"
+ "styledtext-layout.qml"
+ "text.qml"
+ RESOURCES
+ "fonts/content/fonts/tarzeau_ocr_a.ttf"
+ "imgtag/images/face-sad.png"
+ "imgtag/images/face-smile-big.png"
+ "imgtag/images/face-smile.png"
+ "imgtag/images/heart200.png"
+ "imgtag/images/qtlogo.png"
+ "imgtag/images/starfish_2.png"
+)
+
+install(TARGETS textexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET textexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/text/doc/src/text.qdoc b/examples/quick/text/doc/src/text.qdoc
index 6378e3efe6..9aa5fb2f06 100644
--- a/examples/quick/text/doc/src/text.qdoc
+++ b/examples/quick/text/doc/src/text.qdoc
@@ -1,35 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Qt Quick Examples - Text
\example text
\brief This is a collection of QML examples relating to text.
\image qml-text-example.png
\ingroup qtquickexamples
+ \examplecategory {Graphics}
\e Text is a collection of small QML examples relating to text. Each example
is a small QML file, usually containing or emphasizing a particular type or
diff --git a/examples/quick/text/fonts/availableFonts.qml b/examples/quick/text/fonts/availableFonts.qml
index 41dbae0021..7f4f938b48 100644
--- a/examples/quick/text/fonts/availableFonts.qml
+++ b/examples/quick/text/fonts/availableFonts.qml
@@ -1,57 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
Rectangle {
- width: 320; height: 480; color: "steelblue"
+ width: 320
+ height: 480
+ color: "steelblue"
ListView {
anchors.fill: parent
@@ -60,7 +15,8 @@ Rectangle {
//! [model]
delegate: Item {
- height: 40; width: ListView.view.width
+ height: 40
+ width: ListView.view.width
required property string modelData
Text {
anchors.centerIn: parent
diff --git a/examples/quick/text/fonts/banner.qml b/examples/quick/text/fonts/banner.qml
index 961e750d56..aae93baea2 100644
--- a/examples/quick/text/fonts/banner.qml
+++ b/examples/quick/text/fonts/banner.qml
@@ -1,71 +1,43 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
Rectangle {
id: screen
property int pixelSize: screen.height * 1.25
property color textColor: "lightsteelblue"
- property string text: "Hello world! "
+ readonly property string text: qsTr("Hello world! ")
- width: 320; height: 480
+ width: 320
+ height: 480
color: "steelblue"
Row {
y: -screen.height / 4.5
- NumberAnimation on x { from: 0; to: -text.width; duration: 6000; loops: Animation.Infinite }
- Text { id: text; font.pixelSize: screen.pixelSize; color: screen.textColor; text: screen.text }
- Text { font.pixelSize: screen.pixelSize; color: screen.textColor; text: screen.text }
- Text { font.pixelSize: screen.pixelSize; color: screen.textColor; text: screen.text }
+ NumberAnimation on x {
+ from: 0
+ to: -text.width
+ duration: 6000
+ loops: Animation.Infinite
+ }
+ Text {
+ id: text
+ font.pixelSize: screen.pixelSize
+ color: screen.textColor
+ text: screen.text
+ }
+ Text {
+ font.pixelSize: screen.pixelSize
+ color: screen.textColor
+ text: screen.text
+ }
+ Text {
+ font.pixelSize: screen.pixelSize
+ color: screen.textColor
+ text: screen.text
+ }
}
}
diff --git a/examples/quick/text/fonts/fonts.qml b/examples/quick/text/fonts/fonts.qml
index aeb17c48e2..84cb6baa20 100644
--- a/examples/quick/text/fonts/fonts.qml
+++ b/examples/quick/text/fonts/fonts.qml
@@ -1,71 +1,36 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
Rectangle {
id: root
- property string myText: "The quick brown fox jumps over the lazy dog."
+ readonly property string myText: qsTr("The quick brown fox jumps over the lazy dog.")
- width: 320; height: 480
+ width: 320
+ height: 480
color: "steelblue"
//! [fontloaderlocal]
- FontLoader { id: localFont; source: "content/fonts/tarzeau_ocr_a.ttf" }
+ FontLoader {
+ id: localFont
+ source: "content/fonts/tarzeau_ocr_a.ttf"
+ }
//! [fontloaderlocal]
//! [fontloaderremote]
- FontLoader { id: webFont; source: "http://www.princexml.com/fonts/steffmann/Starburst.ttf" }
+ FontLoader {
+ id: webFont
+ source: "http://www.princexml.com/fonts/steffmann/Starburst.ttf"
+ }
//! [fontloaderremote]
Column {
- anchors { fill: parent; leftMargin: 10; rightMargin: 10; topMargin: 10 }
+ anchors {
+ fill: parent
+ leftMargin: 10
+ rightMargin: 10
+ topMargin: 10
+ }
spacing: 15
Text {
@@ -84,7 +49,11 @@ Rectangle {
width: parent.width
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter
- font { family: "Times"; pixelSize: 20; capitalization: Font.AllUppercase }
+ font {
+ family: "Times"
+ pixelSize: 20
+ capitalization: Font.AllUppercase
+ }
}
Text {
text: root.myText
@@ -92,21 +61,35 @@ Rectangle {
width: parent.width
horizontalAlignment: Text.AlignRight
wrapMode: Text.WordWrap
- font { family: "Courier"; pixelSize: 20; weight: Font.Bold; capitalization: Font.AllLowercase }
+ font {
+ family: "Courier"
+ pixelSize: 20
+ weight: Font.Bold
+ capitalization: Font.AllLowercase
+ }
}
Text {
text: root.myText
color: "lightsteelblue"
width: parent.width
wrapMode: Text.WordWrap
- font { family: "Courier"; pixelSize: 20; italic: true; capitalization: Font.SmallCaps }
+ font {
+ family: "Courier"
+ pixelSize: 20
+ italic: true
+ capitalization: Font.SmallCaps
+ }
}
Text {
text: root.myText
color: "lightsteelblue"
width: parent.width
wrapMode: Text.WordWrap
- font { family: localFont.name; pixelSize: 20; capitalization: Font.Capitalize }
+ font {
+ family: localFont.name
+ pixelSize: 20
+ capitalization: Font.Capitalize
+ }
}
Text {
text: {
@@ -117,7 +100,8 @@ Rectangle {
color: "lightsteelblue"
width: parent.width
wrapMode: Text.WordWrap
- font.family: webFont.name; font.pixelSize: 20
+ font.family: webFont.name
+ font.pixelSize: 20
}
}
}
diff --git a/examples/quick/text/fonts/hello.qml b/examples/quick/text/fonts/hello.qml
index b12641464c..89760b0b4b 100644
--- a/examples/quick/text/fonts/hello.qml
+++ b/examples/quick/text/fonts/hello.qml
@@ -1,76 +1,36 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
Rectangle {
id: screen
- width: 320; height: 480
+ width: 320
+ height: 480
color: "black"
Item {
id: container
- x: screen.width / 2; y: screen.height / 2
+ x: screen.width / 2
+ y: screen.height / 2
Text {
id: text
anchors.centerIn: parent
color: "white"
- text: "Hello world!"
+ text: qsTr("Hello world!")
font.pixelSize: 32
//! [letterspacing]
SequentialAnimation on font.letterSpacing {
- loops: Animation.Infinite;
- NumberAnimation { from: 0; to: 50; easing.type: Easing.InQuad; duration: 3000 }
+ loops: Animation.Infinite
+ NumberAnimation {
+ from: 0
+ to: 50
+ easing.type: Easing.InQuad
+ duration: 3000
+ }
ScriptAction {
script: {
container.y = (screen.height / 4) + (Math.random() * screen.height / 2)
@@ -81,9 +41,15 @@ Rectangle {
//! [letterspacing]
SequentialAnimation on opacity {
- loops: Animation.Infinite;
- NumberAnimation { from: 1; to: 0; duration: 2600 }
- PauseAnimation { duration: 400 }
+ loops: Animation.Infinite
+ NumberAnimation {
+ from: 1
+ to: 0
+ duration: 2600
+ }
+ PauseAnimation {
+ duration: 400
+ }
}
}
}
diff --git a/examples/quick/text/imgtag/TextWithImage.qml b/examples/quick/text/imgtag/TextWithImage.qml
index d22e93146d..0fdd208368 100644
--- a/examples/quick/text/imgtag/TextWithImage.qml
+++ b/examples/quick/text/imgtag/TextWithImage.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
Text {
width: parent.width
diff --git a/examples/quick/text/imgtag/imgtag.qml b/examples/quick/text/imgtag/imgtag.qml
index 3958fdb380..689d07aabb 100644
--- a/examples/quick/text/imgtag/imgtag.qml
+++ b/examples/quick/text/imgtag/imgtag.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
Rectangle {
id: main
diff --git a/examples/quick/text/main.cpp b/examples/quick/text/main.cpp
index e55b3fa739..5323f1bd08 100644
--- a/examples/quick/text/main.cpp
+++ b/examples/quick/text/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(text/text)
diff --git a/examples/quick/text/styledtext-layout.qml b/examples/quick/text/styledtext-layout.qml
index b399b638dc..1f99729488 100644
--- a/examples/quick/text/styledtext-layout.qml
+++ b/examples/quick/text/styledtext-layout.qml
@@ -1,62 +1,16 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
Rectangle {
id: main
- width: 320; height: 480
- focus: true
- property real offset: 0
- property real margin: 8
+ readonly property real margin: 8
+
+ width: 320
+ height: 480
+ focus: true
Text {
id: myText
@@ -76,7 +30,7 @@ Rectangle {
if (line.y + line.height >= height) {
line.y -= height - main.margin
- line.x = width / 2 + main.activeFocusmargin
+ line.x = width / 2 + main.margin
}
if (line.isLast) {
@@ -89,16 +43,15 @@ Rectangle {
Rectangle {
id: lastLineMarker
color: "#44cccccc"
- width: theEndText.width + margin
- height: theEndText.height + margin
+ width: theEndText.width + main.margin
+ height: theEndText.height + main.margin
Text {
id: theEndText
- text: "THE\nEND"
+ text: qsTr("THE\nEND")
anchors.centerIn: parent
font.pixelSize: myText.font.pixelSize / 2
}
}
}
-
}
diff --git a/examples/quick/text/text.qml b/examples/quick/text/text.qml
index f97a4e62de..f16c0bf13a 100644
--- a/examples/quick/text/text.qml
+++ b/examples/quick/text/text.qml
@@ -1,69 +1,21 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import "../shared"
+import QtQuick
+import shared
Item {
height: 480
width: 320
LauncherList {
- id: ll
anchors.fill: parent
Component.onCompleted: {
- addExample("Hello", "An Animated Hello World", Qt.resolvedUrl("fonts/hello.qml"));
- addExample("Fonts", "Using various fonts with a Text element", Qt.resolvedUrl("fonts/fonts.qml"));
- addExample("Available Fonts", "A list of your available fonts", Qt.resolvedUrl("fonts/availableFonts.qml"));
- addExample("Banner", "Large, scrolling text", Qt.resolvedUrl("fonts/banner.qml"));
- addExample("Img tag", "Embedding images into text", Qt.resolvedUrl("imgtag/imgtag.qml"));
- addExample("Text Layout", "Flowing text around items", Qt.resolvedUrl("styledtext-layout.qml"));
+ addExample(qsTr("Hello"), qsTr("An Animated Hello World"), Qt.resolvedUrl("fonts/hello.qml"));
+ addExample(qsTr("Fonts"), qsTr("Using various fonts with a Text element"), Qt.resolvedUrl("fonts/fonts.qml"));
+ addExample(qsTr("Available Fonts"), qsTr("A list of your available fonts"), Qt.resolvedUrl("fonts/availableFonts.qml"));
+ addExample(qsTr("Banner"), qsTr("Large, scrolling text"), Qt.resolvedUrl("fonts/banner.qml"));
+ addExample(qsTr("Img tag"), qsTr("Embedding images into text"), Qt.resolvedUrl("imgtag/imgtag.qml"));
+ addExample(qsTr("Text Layout"), qsTr("Flowing text around items"), Qt.resolvedUrl("styledtext-layout.qml"));
}
}
}
diff --git a/examples/quick/text/text.qmlproject b/examples/quick/text/text.qmlproject
index c08d9b9a89..5613abe903 100644
--- a/examples/quick/text/text.qmlproject
+++ b/examples/quick/text/text.qmlproject
@@ -2,6 +2,7 @@ import QmlProject 1.1
Project {
mainFile: "text.qml"
+ importPaths: ["../"]
/* Include .qml, .js, and image files from current directory and subdirectories */
QmlFiles {
diff --git a/examples/quick/text/text.qrc b/examples/quick/text/text.qrc
index f0d21627ad..8d727c2831 100644
--- a/examples/quick/text/text.qrc
+++ b/examples/quick/text/text.qrc
@@ -1,5 +1,5 @@
<RCC>
- <qresource prefix="/text">
+ <qresource prefix="/qt/qml/text">
<file>text.qml</file>
<file>fonts/availableFonts.qml</file>
<file>fonts/banner.qml</file>
@@ -13,11 +13,6 @@
<file>imgtag/images/heart200.png</file>
<file>imgtag/images/qtlogo.png</file>
<file>imgtag/images/starfish_2.png</file>
- <file>textselection/textselection.qml</file>
- <file>textselection/pics/endHandle.png</file>
- <file>textselection/pics/endHandle.sci</file>
- <file>textselection/pics/startHandle.png</file>
- <file>textselection/pics/startHandle.sci</file>
<file>styledtext-layout.qml</file>
<file>imgtag/TextWithImage.qml</file>
</qresource>
diff --git a/examples/quick/text/textselection/pics/endHandle.png b/examples/quick/text/textselection/pics/endHandle.png
deleted file mode 100644
index 598cf98857..0000000000
--- a/examples/quick/text/textselection/pics/endHandle.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/text/textselection/pics/endHandle.sci b/examples/quick/text/textselection/pics/endHandle.sci
deleted file mode 100644
index 4f51f24278..0000000000
--- a/examples/quick/text/textselection/pics/endHandle.sci
+++ /dev/null
@@ -1,5 +0,0 @@
-border.left: 0
-border.top: 6
-border.bottom: 6
-border.right: 6
-source: endHandle.png
diff --git a/examples/quick/text/textselection/pics/startHandle.png b/examples/quick/text/textselection/pics/startHandle.png
deleted file mode 100644
index 51def03054..0000000000
--- a/examples/quick/text/textselection/pics/startHandle.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/text/textselection/pics/startHandle.sci b/examples/quick/text/textselection/pics/startHandle.sci
deleted file mode 100644
index f9eae204c1..0000000000
--- a/examples/quick/text/textselection/pics/startHandle.sci
+++ /dev/null
@@ -1,5 +0,0 @@
-border.left: 6
-border.top: 6
-border.bottom: 6
-border.right: 0
-source: startHandle.png
diff --git a/examples/quick/text/textselection/textselection.qml b/examples/quick/text/textselection/textselection.qml
deleted file mode 100644
index 0e979c28a4..0000000000
--- a/examples/quick/text/textselection/textselection.qml
+++ /dev/null
@@ -1,221 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-
-Rectangle {
- id: editor
- color: "lightGrey"
- width: 640; height: 480
-
- Rectangle {
- color: "white"
- anchors.fill: parent
- anchors.margins: 20
-
- BorderImage {
- id: startHandle
- source: "pics/startHandle.sci"
- opacity: 0.0
- width: 10
- x: edit.positionToRectangle(edit.selectionStart).x - flick.contentX-width
- y: edit.positionToRectangle(edit.selectionStart).y - flick.contentY
- height: edit.positionToRectangle(edit.selectionStart).height
- }
-
- BorderImage {
- id: endHandle
- source: "pics/endHandle.sci"
- opacity: 0.0
- width: 10
- x: edit.positionToRectangle(edit.selectionEnd).x - flick.contentX
- y: edit.positionToRectangle(edit.selectionEnd).y - flick.contentY
- height: edit.positionToRectangle(edit.selectionEnd).height
- }
-
- Flickable {
- id: flick
-
- anchors.fill: parent
- contentWidth: edit.paintedWidth
- contentHeight: edit.paintedHeight
- interactive: true
- clip: true
-
- function ensureVisible(r) {
- if (contentX >= r.x)
- contentX = r.x;
- else if (contentX+width <= r.x+r.width)
- contentX = r.x+r.width-width;
- if (contentY >= r.y)
- contentY = r.y;
- else if (contentY+height <= r.y+r.height)
- contentY = r.y+r.height-height;
- }
-
- TextEdit {
- id: edit
- width: flick.width
- height: flick.height
- focus: true
- wrapMode: TextEdit.Wrap
- textFormat: TextEdit.RichText
-
- onCursorRectangleChanged: flick.ensureVisible(cursorRectangle)
-
- text: "<h1>Text Selection</h1>"
- +"<p>This example is a whacky text selection mechanisms, showing how these can be implemented in the TextEdit element, to cater for whatever style is appropriate for the target platform."
- +"<p><b>Press-and-hold</b> to select a word, then drag the selection handles."
- +"<p><b>Drag outside the selection</b> to scroll the text."
- +"<p><b>Click inside the selection</b> to cut/copy/paste/cancel selection."
- +"<p>It's too whacky to let you paste if there is no current selection."
-
- }
- }
-
- Item {
- id: menu
- opacity: 0.0
- width: 100
- height: 120
- anchors.centerIn: parent
-
- Rectangle {
- border.width: 1
- border.color: "darkBlue"
- radius: 15
- color: "#806080FF"
- anchors.fill: parent
- }
-
- Column {
- anchors.centerIn: parent
- spacing: 8
-
- Rectangle {
- border.width: 1
- border.color: "darkBlue"
- color: "#ff7090FF"
- width: 60
- height: 16
-
- Text { anchors.centerIn: parent; text: "Cut" }
-
- MouseArea {
- anchors.fill: parent
- onClicked: { edit.cut(); editor.state = "" }
- }
- }
-
- Rectangle {
- border.width: 1
- border.color: "darkBlue"
- color: "#ff7090FF"
- width: 60
- height: 16
-
- Text { anchors.centerIn: parent; text: "Copy" }
-
- MouseArea {
- anchors.fill: parent
- onClicked: { edit.copy(); editor.state = "selection" }
- }
- }
-
- Rectangle {
- border.width: 1
- border.color: "darkBlue"
- color: "#ff7090FF"
- width: 60
- height: 16
-
- Text { anchors.centerIn: parent; text: "Paste" }
-
- MouseArea {
- anchors.fill: parent
- onClicked: { edit.paste(); edit.cursorPosition = edit.selectionEnd; editor.state = "" }
- }
- }
-
- Rectangle {
- border.width: 1
- border.color: "darkBlue"
- color: "#ff7090FF"
- width: 60
- height: 16
-
- Text { anchors.centerIn: parent; text: "Deselect" }
-
- MouseArea {
- anchors.fill: parent
- onClicked: {
- edit.cursorPosition = edit.selectionEnd;
- edit.deselect();
- editor.state = ""
- }
- }
- }
- }
- }
- }
-
- states: [
- State {
- name: "selection"
- PropertyChanges { target: startHandle; opacity: 1.0 }
- PropertyChanges { target: endHandle; opacity: 1.0 }
- },
- State {
- name: "menu"
- PropertyChanges { target: startHandle; opacity: 0.5 }
- PropertyChanges { target: endHandle; opacity: 0.5 }
- PropertyChanges { target: menu; opacity: 1.0 }
- }
- ]
-}
diff --git a/examples/quick/threading/CMakeLists.txt b/examples/quick/threading/CMakeLists.txt
deleted file mode 100644
index 3dcc58158e..0000000000
--- a/examples/quick/threading/CMakeLists.txt
+++ /dev/null
@@ -1,130 +0,0 @@
-# Generated from threading.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(threading LANGUAGES CXX)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/threading")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(threading
- main.cpp
-)
-set_target_properties(threading PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(threading PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-
-# Resources:
-set(threading_resource_files
- "threadedlistmodel/dataloader.mjs"
- "threadedlistmodel/timedisplay.qml"
- "threading.qml"
- "workerscript/Spinner.qml"
- "workerscript/workerscript.mjs"
- "workerscript/workerscript.qml"
-)
-
-qt6_add_resources(threading "threading"
- PREFIX
- "/threading"
- FILES
- ${threading_resource_files}
-)
-set_source_files_properties("../shared/Button.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Button.qml"
-)
-set_source_files_properties("../shared/CheckBox.qml"
- PROPERTIES QT_RESOURCE_ALIAS "CheckBox.qml"
-)
-set_source_files_properties("../shared/FlickrRssModel.qml"
- PROPERTIES QT_RESOURCE_ALIAS "FlickrRssModel.qml"
-)
-set_source_files_properties("../shared/Label.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Label.qml"
-)
-set_source_files_properties("../shared/LauncherList.qml"
- PROPERTIES QT_RESOURCE_ALIAS "LauncherList.qml"
-)
-set_source_files_properties("../shared/SimpleLauncherDelegate.qml"
- PROPERTIES QT_RESOURCE_ALIAS "SimpleLauncherDelegate.qml"
-)
-set_source_files_properties("../shared/Slider.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Slider.qml"
-)
-set_source_files_properties("../shared/TabSet.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TabSet.qml"
-)
-set_source_files_properties("../shared/TextField.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TextField.qml"
-)
-set_source_files_properties("../shared/images/back.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/back.png"
-)
-set_source_files_properties("../shared/images/checkmark.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/checkmark.png"
-)
-set_source_files_properties("../shared/images/next.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/next.png"
-)
-set_source_files_properties("../shared/images/qt-logo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/qt-logo.png"
-)
-set_source_files_properties("../shared/images/slider_handle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/slider_handle.png"
-)
-set_source_files_properties("../shared/images/tab.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/tab.png"
-)
-set(shared_resource_files
- "Button.qml"
- "CheckBox.qml"
- "FlickrRssModel.qml"
- "Label.qml"
- "LauncherList.qml"
- "SimpleLauncherDelegate.qml"
- "Slider.qml"
- "TabSet.qml"
- "TextField.qml"
- "images/back.png"
- "images/checkmark.png"
- "images/next.png"
- "images/qt-logo.png"
- "images/slider_handle.png"
- "images/tab.png"
-)
-
-qt6_add_resources(threading "shared"
- PREFIX
- "/shared"
- BASE
- "../shared"
- FILES
- ${shared_resource_files}
-)
-
-install(TARGETS threading
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
diff --git a/examples/quick/threading/doc/images/qml-threading-example.png b/examples/quick/threading/doc/images/qml-threading-example.png
deleted file mode 100644
index 6ed79ab190..0000000000
--- a/examples/quick/threading/doc/images/qml-threading-example.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/threading/doc/src/threading.qdoc b/examples/quick/threading/doc/src/threading.qdoc
deleted file mode 100644
index f5e5139916..0000000000
--- a/examples/quick/threading/doc/src/threading.qdoc
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-/*!
- \title Qt Quick Examples - Threading
- \example threading
- \brief This is a collection of QML multithreading examples.
- \image qml-threading-example.png
- \ingroup qtquickexamples
-
- \e Threading is a collection of QML multithreading examples.
-
- \include examples-run.qdocinc
-
- \section1 Threaded ListModel
-
- \e{Threaded ListModel} contains a \l ListView and a \l ListModel.
- The ListModel object is updated asynchronously in another thread, and the
- results propagate back to the main thread. A timer requests updates from the
- worker thread periodically:
- \snippet threading/threadedlistmodel/timedisplay.qml 0
-
- Inside the worker thread, the ListModel is synchronized once the data is
- finished loading:
- \snippet threading/threadedlistmodel/dataloader.mjs 0
-
- \section1 WorkerScript
-
- \e WorkerScript contains an example of using a \l WorkerScript to offload
- expensive calculations into another thread. This keeps the UI from being
- blocked. This example calculates numbers in Pascal's Triangle, and not in a
- very optimal way, so it will often take several seconds to complete the
- calculation. By doing this in a WorkerScript in another thread, the UI is
- not blocked during this time.
-
- When the UI needs another value, a request is sent to the WorkerScript:
- \snippet threading/workerscript/workerscript.qml 0
-
- The workerscript then is free to take a really long time to calculate it:
- \snippet threading/workerscript/workerscript.mjs 0
-
- When it's done, the result returns to the main scene via the WorkerScript
- type:
- \snippet threading/workerscript/workerscript.qml 1
-*/
diff --git a/examples/quick/threading/main.cpp b/examples/quick/threading/main.cpp
deleted file mode 100644
index 75b6cab482..0000000000
--- a/examples/quick/threading/main.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-#include "../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(threading/threading)
diff --git a/examples/quick/threading/threadedlistmodel/dataloader.mjs b/examples/quick/threading/threadedlistmodel/dataloader.mjs
deleted file mode 100644
index 86a4424dbc..0000000000
--- a/examples/quick/threading/threadedlistmodel/dataloader.mjs
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-// ![0]
-WorkerScript.onMessage = function(msg) {
- if (msg.action == 'appendCurrentTime') {
- var data = {'time': new Date().toTimeString()};
- msg.model.append(data);
- msg.model.sync(); // updates the changes to the list
- }
-}
-// ![0]
diff --git a/examples/quick/threading/threadedlistmodel/doc/src/threadedlistmodel.qdoc b/examples/quick/threading/threadedlistmodel/doc/src/threadedlistmodel.qdoc
deleted file mode 100644
index 12596cfdac..0000000000
--- a/examples/quick/threading/threadedlistmodel/doc/src/threadedlistmodel.qdoc
+++ /dev/null
@@ -1,37 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \title Threaded ListModel Example
- \example threading/threadedlistmodel
- \brief The Threaded ListModel example shows how to use a ListModel from multiple
- threads using WorkerScript.
-
- This example shows how to use a ListModel from multiple threads using
- WorkerScript.
-*/
-
diff --git a/examples/quick/threading/threadedlistmodel/threadedlistmodel.qmlproject b/examples/quick/threading/threadedlistmodel/threadedlistmodel.qmlproject
deleted file mode 100644
index 361f4ba0d3..0000000000
--- a/examples/quick/threading/threadedlistmodel/threadedlistmodel.qmlproject
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QmlProject 1.1
-
-Project {
- mainFile: "timedisplay.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/quick/threading/threadedlistmodel/timedisplay.qml b/examples/quick/threading/threadedlistmodel/timedisplay.qml
deleted file mode 100644
index c4e6e7b249..0000000000
--- a/examples/quick/threading/threadedlistmodel/timedisplay.qml
+++ /dev/null
@@ -1,89 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Rectangle {
- color: "white"
- width: 200
- height: 300
-
- ListView {
- anchors.fill: parent
- model: listModel
- delegate: Component {
- Text {
- required property string time
- text: time
- }
- }
-
- ListModel { id: listModel }
-
- WorkerScript {
- id: worker
- source: "dataloader.mjs"
- }
-
-// ![0]
- Timer {
- id: timer
- interval: 2000; repeat: true
- running: true
- triggeredOnStart: true
-
- onTriggered: {
- var msg = {'action': 'appendCurrentTime', 'model': listModel};
- worker.sendMessage(msg);
- }
- }
-// ![0]
- }
-}
diff --git a/examples/quick/threading/threading.qml b/examples/quick/threading/threading.qml
deleted file mode 100644
index 674e4a4bc6..0000000000
--- a/examples/quick/threading/threading.qml
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import "../shared" as Examples
-
-Item {
- height: 480
- width: 320
- Examples.LauncherList {
- id: ll
- anchors.fill: parent
- Component.onCompleted: {
- addExample("Threaded ListModel", "Updates a ListModel in another thread", Qt.resolvedUrl("threadedlistmodel/timedisplay.qml"));
- addExample("WorkerScript", "Performs calculations in another thread", Qt.resolvedUrl("workerscript/workerscript.qml"));
- }
- }
-}
diff --git a/examples/quick/threading/threading.qmlproject b/examples/quick/threading/threading.qmlproject
deleted file mode 100644
index d17405d4dc..0000000000
--- a/examples/quick/threading/threading.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "threading.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/quick/threading/threading.qrc b/examples/quick/threading/threading.qrc
deleted file mode 100644
index 5dc6dff443..0000000000
--- a/examples/quick/threading/threading.qrc
+++ /dev/null
@@ -1,10 +0,0 @@
-<RCC>
- <qresource prefix="/threading">
- <file>threading.qml</file>
- <file>threadedlistmodel/timedisplay.qml</file>
- <file>threadedlistmodel/dataloader.mjs</file>
- <file>workerscript/Spinner.qml</file>
- <file>workerscript/workerscript.mjs</file>
- <file>workerscript/workerscript.qml</file>
- </qresource>
-</RCC>
diff --git a/examples/quick/threading/workerscript/Spinner.qml b/examples/quick/threading/workerscript/Spinner.qml
deleted file mode 100644
index a2257f8639..0000000000
--- a/examples/quick/threading/workerscript/Spinner.qml
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Rectangle {
- width: 64
- height: 64
- property alias value: list.currentIndex
- property alias label: caption.text
-
- Text {
- id: caption
- text: "Spinner"
- anchors.horizontalCenter: parent.horizontalCenter
- }
-
- Rectangle {
- anchors.top: caption.bottom
- anchors.topMargin: 4
- anchors.horizontalCenter: parent.horizontalCenter
- height: 48
- width: 32
- color: "black"
- ListView {
- id: list
- anchors.fill: parent
- highlightRangeMode: ListView.StrictlyEnforceRange
- preferredHighlightBegin: height/3
- preferredHighlightEnd: height/3
- clip: true
- model: 64
- delegate: Text {
- required property int index
- font.pixelSize: 18;
- color: "white";
- text: index;
- anchors.horizontalCenter: parent.horizontalCenter
- }
- }
- Rectangle {
- anchors.fill: parent
- gradient: Gradient {
- GradientStop { position: 0.0; color: "#FF000000" }
- GradientStop { position: 0.2; color: "#00000000" }
- GradientStop { position: 0.8; color: "#00000000" }
- GradientStop { position: 1.0; color: "#FF000000" }
- }
- }
- }
-}
diff --git a/examples/quick/threading/workerscript/workerscript.mjs b/examples/quick/threading/workerscript/workerscript.mjs
deleted file mode 100644
index 9953958086..0000000000
--- a/examples/quick/threading/workerscript/workerscript.mjs
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-//Will be initialized when WorkerScript{} is instantiated
-var cache = new Array(64);
-for (var i = 0; i < 64; i++)
- cache[i] = new Array(64);
-
-function triangle(row, column) {
- if (cache[row][column])
- return cache[row][column]
- if (column < 0 || column > row)
- return -1;
- if (column == 0 || column == row)
- return 1;
- return triangle(row-1, column-1) + triangle(row-1, column);
-}
-//! [0]
-WorkerScript.onMessage = function(message) {
- //Calculate result (may take a while, using a naive algorithm)
- var calculatedResult = triangle(message.row, message.column);
- //Send result back to main thread
- WorkerScript.sendMessage( { row: message.row,
- column: message.column,
- result: calculatedResult} );
-}
-//! [0]
diff --git a/examples/quick/threading/workerscript/workerscript.qml b/examples/quick/threading/workerscript/workerscript.qml
deleted file mode 100644
index eb8ad43d01..0000000000
--- a/examples/quick/threading/workerscript/workerscript.qml
+++ /dev/null
@@ -1,109 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Rectangle {
- width: 320; height: 480
-
-//! [1]
- WorkerScript {
- id: myWorker
- source: "workerscript.mjs"
-
- onMessage: (messageObject) => {
- if (messageObject.row == rowSpinner.value && messageObject.column == columnSpinner.value){ //Not an old result
- if (messageObject.result == -1)
- resultText.text = "Column must be <= Row";
- else
- resultText.text = messageObject.result;
- }
- }
- }
-//! [1]
- Row {
- y: 24
- spacing: 24
- anchors.horizontalCenter: parent.horizontalCenter
-//! [0]
- Spinner {
- id: rowSpinner
- label: "Row"
- onValueChanged: {
- resultText.text = "Loading...";
- myWorker.sendMessage( { row: rowSpinner.value, column: columnSpinner.value } );
- }
- }
-//! [0]
-
- Spinner {
- id: columnSpinner
- label: "Column"
- onValueChanged: {
- resultText.text = "Loading...";
- myWorker.sendMessage( { row: rowSpinner.value, column: columnSpinner.value } );
- }
- }
- }
-
- Text {
- id: resultText
- y: 180
- width: parent.width
- horizontalAlignment: Text.AlignHCenter
- wrapMode: Text.WordWrap
- font.pixelSize: 32
- }
-
- Text {
- text: "Pascal's Triangle Calculator"
- anchors { horizontalCenter: parent.horizontalCenter; bottom: parent.bottom; bottomMargin: 50 }
- }
-}
diff --git a/examples/quick/threading/workerscript/workerscript.qmlproject b/examples/quick/threading/workerscript/workerscript.qmlproject
deleted file mode 100644
index 6ab433e63b..0000000000
--- a/examples/quick/threading/workerscript/workerscript.qmlproject
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QmlProject 1.1
-
-Project {
- mainFile: "workerscript.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/quick/touchinteraction/CMakeLists.txt b/examples/quick/touchinteraction/CMakeLists.txt
deleted file mode 100644
index af3219ac7d..0000000000
--- a/examples/quick/touchinteraction/CMakeLists.txt
+++ /dev/null
@@ -1,147 +0,0 @@
-# Generated from touchinteraction.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(touchinteraction LANGUAGES CXX)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/touchinteraction")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(touchinteraction
- main.cpp
-)
-set_target_properties(touchinteraction PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(touchinteraction PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-
-# Resources:
-set(touchinteraction_resource_files
- "flickable/basic-flickable.qml"
- "flickable/content/Panel.qml"
- "flickable/content/cork.jpg"
- "flickable/content/note-yellow.png"
- "flickable/content/tack.png"
- "flickable/corkboards.qml"
- "multipointtouch/bearwhack.qml"
- "multipointtouch/content/AugmentedTouchPoint.qml"
- "multipointtouch/content/Bear0.png"
- "multipointtouch/content/Bear1.png"
- "multipointtouch/content/Bear2.png"
- "multipointtouch/content/Bear3.png"
- "multipointtouch/content/BearB.png"
- "multipointtouch/content/BearWhackParticleSystem.qml"
- "multipointtouch/content/ParticleFlame.qml"
- "multipointtouch/content/blur-circle.png"
- "multipointtouch/content/blur-circle3.png"
- "multipointtouch/content/heart-blur.png"
- "multipointtouch/content/title.png"
- "multipointtouch/multiflame.qml"
- "pincharea/flickresize.qml"
- "pincharea/qt-logo.jpg"
- "touchinteraction.qml"
-)
-
-qt6_add_resources(touchinteraction "touchinteraction"
- PREFIX
- "/touchinteraction"
- FILES
- ${touchinteraction_resource_files}
-)
-set_source_files_properties("../shared/Button.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Button.qml"
-)
-set_source_files_properties("../shared/CheckBox.qml"
- PROPERTIES QT_RESOURCE_ALIAS "CheckBox.qml"
-)
-set_source_files_properties("../shared/FlickrRssModel.qml"
- PROPERTIES QT_RESOURCE_ALIAS "FlickrRssModel.qml"
-)
-set_source_files_properties("../shared/Label.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Label.qml"
-)
-set_source_files_properties("../shared/LauncherList.qml"
- PROPERTIES QT_RESOURCE_ALIAS "LauncherList.qml"
-)
-set_source_files_properties("../shared/SimpleLauncherDelegate.qml"
- PROPERTIES QT_RESOURCE_ALIAS "SimpleLauncherDelegate.qml"
-)
-set_source_files_properties("../shared/Slider.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Slider.qml"
-)
-set_source_files_properties("../shared/TabSet.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TabSet.qml"
-)
-set_source_files_properties("../shared/TextField.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TextField.qml"
-)
-set_source_files_properties("../shared/images/back.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/back.png"
-)
-set_source_files_properties("../shared/images/checkmark.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/checkmark.png"
-)
-set_source_files_properties("../shared/images/next.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/next.png"
-)
-set_source_files_properties("../shared/images/qt-logo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/qt-logo.png"
-)
-set_source_files_properties("../shared/images/slider_handle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/slider_handle.png"
-)
-set_source_files_properties("../shared/images/tab.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/tab.png"
-)
-set(shared_resource_files
- "Button.qml"
- "CheckBox.qml"
- "FlickrRssModel.qml"
- "Label.qml"
- "LauncherList.qml"
- "SimpleLauncherDelegate.qml"
- "Slider.qml"
- "TabSet.qml"
- "TextField.qml"
- "images/back.png"
- "images/checkmark.png"
- "images/next.png"
- "images/qt-logo.png"
- "images/slider_handle.png"
- "images/tab.png"
-)
-
-qt6_add_resources(touchinteraction "shared"
- PREFIX
- "/shared"
- BASE
- "../shared"
- FILES
- ${shared_resource_files}
-)
-
-install(TARGETS touchinteraction
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
diff --git a/examples/quick/touchinteraction/doc/images/qml-touchinteraction-example.png b/examples/quick/touchinteraction/doc/images/qml-touchinteraction-example.png
deleted file mode 100644
index d4f0cab201..0000000000
--- a/examples/quick/touchinteraction/doc/images/qml-touchinteraction-example.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/touchinteraction/doc/src/touchinteraction.qdoc b/examples/quick/touchinteraction/doc/src/touchinteraction.qdoc
deleted file mode 100644
index 8526a9d58f..0000000000
--- a/examples/quick/touchinteraction/doc/src/touchinteraction.qdoc
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-/*!
- \title Qt Quick Examples - Touch Interaction
- \example touchinteraction
- \brief A collection of QML Touch Interaction examples.
- \image qml-touchinteraction-example.png
-
- \e{Touch Interaction} is a collection of small QML examples relating to
- touch interaction methods. For more information, visit
- \l{Important Concepts In Qt Quick - User Input}.
-
- \include examples-run.qdocinc
-
- \section1 Multipoint Flames Example
-
- \e{Multipoint Flames} demonstrates distinguishing different fingers in a
- \l MultiPointTouchArea, by assigning a different colored flame to each touch
- point.
-
- The MultipointTouchArea sets up multiple touch points:
- \snippet touchinteraction/multipointtouch/multiflame.qml 0
-
- The flames are then simply bound to the coordinates of the touch point, and
- whether it is currently pressed, as follows:
- \snippet touchinteraction/multipointtouch/multiflame.qml 1
-
- \section1 Bear-Whack Example
-
- \e{Bear-Whack} demonstrates using \l MultiPointTouchArea to add multiple
- finger support to a simple game. The interaction with the game
- is done through a SpriteGoal that follows the TouchPoint. The TouchPoints
- added to the MultiPointTouchArea are a component with the relevant logic
- embedded into it:
- \snippet touchinteraction/multipointtouch/content/AugmentedTouchPoint.qml 0
-
- \section1 Flick Resize Example
-
- \e{Flick Resize} uses a \l PinchArea to implement a \e{pinch-to-resize}
- behavior. This is easily achieved by listening to the PinchArea signals and
- responding to user input.
- \snippet touchinteraction/pincharea/flickresize.qml 0
-
- \section1 Flickable Example
-
- \e Flickable is a simple example demonstrating the \l Flickable type.
- \snippet touchinteraction/flickable/basic-flickable.qml 0
-
- \section1 Corkboards Example
-
- \e Corkboards shows another use for \l Flickable, with QML types within the
- flickable object that respond to mouse and keyboard interaction. This
- behavior does not require special code as the Qt Quick types already
- cooperate with the Flickable type for accepting touch events.
-*/
diff --git a/examples/quick/touchinteraction/flickable/basic-flickable.qml b/examples/quick/touchinteraction/flickable/basic-flickable.qml
deleted file mode 100644
index 45e835bf45..0000000000
--- a/examples/quick/touchinteraction/flickable/basic-flickable.qml
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
- //![0]
-Rectangle {
- width: 320
- height: 480
- Flickable {
- anchors.fill: parent
- contentWidth: 1200
- contentHeight: 1200
- Rectangle {
- width: 1000
- height: 1000
- //![0]
- x: 100
- y: 100
- radius: 128
- border.width: 4
- border.color: "black"
- gradient: Gradient {
- GradientStop { position: 0.0; color: "#000000" }
- GradientStop { position: 0.2; color: "#888888" }
- GradientStop { position: 0.4; color: "#FFFFFF" }
- GradientStop { position: 0.6; color: "#FFFFFF" }
- GradientStop { position: 0.8; color: "#888888" }
- GradientStop { position: 1.0; color: "#000000" }
- }
- }
- }
-}
diff --git a/examples/quick/touchinteraction/flickable/content/Panel.qml b/examples/quick/touchinteraction/flickable/content/Panel.qml
deleted file mode 100644
index 0aae0635b2..0000000000
--- a/examples/quick/touchinteraction/flickable/content/Panel.qml
+++ /dev/null
@@ -1,155 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Item {
- required property string name
- required property var notes
-
- property real horizontalVelocity: 0
-
- id: page
- width: ListView.view.width+40; height: ListView.view.height
-
-
- Image {
- source: "cork.jpg"
- width: page.ListView.view.width
- height: page.ListView.view.height
- fillMode: Image.PreserveAspectCrop
- clip: true
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: page.focus = false;
- }
-
- Text {
- text: page.name; x: 15; y: 8; height: 40; width: 370
- font.pixelSize: 18; font.bold: true; color: "white"
- style: Text.Outline; styleColor: "black"
- }
-
- Repeater {
- model: page.notes
- Item {
- id: stickyPage
- required property string noteText
-
- property int randomX: Math.random() * (page.ListView.view.width-0.5*stickyImage.width) +100
- property int randomY: Math.random() * (page.ListView.view.height-0.5*stickyImage.height) +50
-
- x: randomX; y: randomY
-
- rotation: -page.horizontalVelocity / 100
- Behavior on rotation {
- SpringAnimation { spring: 2.0; damping: 0.15 }
- }
-
- Item {
- id: sticky
- scale: 0.7
-
- Image {
- id: stickyImage
- x: 8 + -width * 0.6 / 2; y: -20
- source: "note-yellow.png"
- scale: 0.6; transformOrigin: Item.TopLeft
- }
-
- TextEdit {
- id: myText
- x: -104; y: 36; width: 215; height: 200
- font.pixelSize: 24
- readOnly: false
- rotation: -8
- text: stickyPage.noteText
- }
-
- Item {
- x: stickyImage.x; y: -20
- width: stickyImage.width * stickyImage.scale
- height: stickyImage.height * stickyImage.scale
-
- MouseArea {
- id: mouse
- anchors.fill: parent
- drag.target: stickyPage
- drag.axis: Drag.XAndYAxis
- drag.minimumY: 0
- drag.maximumY: page.height - 80
- drag.minimumX: 100
- drag.maximumX: page.width - 140
- onClicked: myText.forceActiveFocus()
- }
- }
- }
-
- Image {
- x: -width / 2; y: -height * 0.5 / 2
- source: "tack.png"
- scale: 0.7; transformOrigin: Item.TopLeft
- }
-
- states: State {
- name: "pressed"
- when: mouse.pressed
- PropertyChanges { target: sticky; rotation: 8; scale: 1 }
- PropertyChanges { target: page; z: 8 }
- }
-
- transitions: Transition {
- NumberAnimation { properties: "rotation,scale"; duration: 200 }
- }
- }
- }
-}
diff --git a/examples/quick/touchinteraction/flickable/corkboards.qml b/examples/quick/touchinteraction/flickable/corkboards.qml
deleted file mode 100644
index 4825053f3f..0000000000
--- a/examples/quick/touchinteraction/flickable/corkboards.qml
+++ /dev/null
@@ -1,99 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import "content"
-
-Rectangle {
- width: 320; height: 480
- color: "#464646"
-
- ListModel {
- id: list
-
- ListElement {
- name: "Panel One"
- notes: [
- ListElement { noteText: "Tap to edit" },
- ListElement { noteText: "Drag to move" },
- ListElement { noteText: "Flick to scroll" }
- ]
- }
-
- ListElement {
- name: "Panel Two"
- notes: [
- ListElement { noteText: "Note One" },
- ListElement { noteText: "Note Two" }
- ]
- }
-
- ListElement {
- name: "Panel Three"
- notes: [
- ListElement { noteText: "Note Three" }
- ]
- }
- }
-
- ListView {
- id: flickable
-
- anchors.fill: parent
- focus: true
- highlightRangeMode: ListView.StrictlyEnforceRange
- orientation: ListView.Horizontal
- snapMode: ListView.SnapOneItem
- model: list
- delegate: Panel {
- horizontalVelocity: flickable.horizontalVelocity
- }
- }
-}
diff --git a/examples/quick/touchinteraction/main.cpp b/examples/quick/touchinteraction/main.cpp
deleted file mode 100644
index 5dda8e7ed7..0000000000
--- a/examples/quick/touchinteraction/main.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-#include "../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(touchinteraction/touchinteraction)
diff --git a/examples/quick/touchinteraction/multipointtouch/bearwhack.qml b/examples/quick/touchinteraction/multipointtouch/bearwhack.qml
deleted file mode 100644
index 90c1a66891..0000000000
--- a/examples/quick/touchinteraction/multipointtouch/bearwhack.qml
+++ /dev/null
@@ -1,145 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-import "content"
-
-Item {
- id: root
- height: 480
- width: 320
- Item {
- id: startScreen
- anchors.fill: parent
- z: 1000
- Image {
- source: "content/title.png"
- anchors.centerIn: parent
- }
- MouseArea{
- anchors.fill: parent
- onClicked: {//Game Start
- parent.visible = false;
- }
- }
- }
- Rectangle {
- id: bg
- anchors.fill: parent
- gradient: Gradient {
- GradientStop { position: 0.0; color: "DarkBlue" }
- GradientStop { position: 0.8; color: "SkyBlue" }
- GradientStop { position: 0.81; color: "ForestGreen" }
- GradientStop { position: 1.0; color: "DarkGreen" }
- }
- }
-
- BearWhackParticleSystem {
- id: particleSystem
- anchors.fill: parent
- running: !startScreen.visible
- }
-
- property int score: particleSystem.score
-
- Text {
- anchors.right: parent.right
- anchors.margins: 4
- anchors.top: parent.top
- color: "white"
- function padded(num) {
- var ret = num.toString();
-
- if (ret >= 0)
- return ret.padStart(6, "0");
- else
- return "-" + ret.substr(1).padStart(6, "0");
- }
- text: "Score: " + padded(root.score)
- }
- MultiPointTouchArea {
- anchors.fill: parent
- touchPoints: [//Support up to 4 touches at once?
- AugmentedTouchPoint{ system: particleSystem },
- AugmentedTouchPoint{ system: particleSystem },
- AugmentedTouchPoint{ system: particleSystem },
- AugmentedTouchPoint{ system: particleSystem }
- ]
- }
- MouseArea{
- anchors.fill: parent
- id: ma
- onPressedChanged: {
- if (pressed) {
- timer.restart();
- sgoal.enabled = true;
- particleSystem.explode(mouseX,mouseY);
- }
- }
- Timer {
- id: timer
- interval: 100
- running: false
- repeat: false
- onTriggered: sgoal.enabled = false
- }
- SpriteGoal {
- id: sgoal
- x: ma.mouseX - 16
- y: ma.mouseY - 16
- width: 32
- height: 32
- system: particleSystem
- parent: particleSystem
- goalState: "falling"
- enabled: false
- }
- }
-}
diff --git a/examples/quick/touchinteraction/multipointtouch/content/AugmentedTouchPoint.qml b/examples/quick/touchinteraction/multipointtouch/content/AugmentedTouchPoint.qml
deleted file mode 100644
index 56f287666f..0000000000
--- a/examples/quick/touchinteraction/multipointtouch/content/AugmentedTouchPoint.qml
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-//! [0]
-TouchPoint {
- id: container
- property ParticleSystem system
- onPressedChanged: {
- if (pressed) {
- timer.restart();
- child.enabled = true;
- system.explode(x,y);
- }
- }
- property QtObject obj: Timer {
- id: timer
- interval: 100
- running: false
- repeat: false
- onTriggered: container.child.enabled = false
- }
- property Item child: SpriteGoal {
- enabled: false
- x: container.area.x - 16
- y: container.area.y - 16
- width: container.area.width + 32
- height: container.area.height + 32 //+32 so it doesn't have to hit the exact center
- system: container.system
- parent: container.system
- goalState: "falling"
- }
-}
-//! [0]
diff --git a/examples/quick/touchinteraction/multipointtouch/content/Bear0.png b/examples/quick/touchinteraction/multipointtouch/content/Bear0.png
deleted file mode 100644
index f520cc1f1b..0000000000
--- a/examples/quick/touchinteraction/multipointtouch/content/Bear0.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/touchinteraction/multipointtouch/content/Bear1.png b/examples/quick/touchinteraction/multipointtouch/content/Bear1.png
deleted file mode 100644
index 3b88f3b32e..0000000000
--- a/examples/quick/touchinteraction/multipointtouch/content/Bear1.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/touchinteraction/multipointtouch/content/Bear2.png b/examples/quick/touchinteraction/multipointtouch/content/Bear2.png
deleted file mode 100644
index 337b636070..0000000000
--- a/examples/quick/touchinteraction/multipointtouch/content/Bear2.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/touchinteraction/multipointtouch/content/Bear3.png b/examples/quick/touchinteraction/multipointtouch/content/Bear3.png
deleted file mode 100644
index f0e68590f4..0000000000
--- a/examples/quick/touchinteraction/multipointtouch/content/Bear3.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/touchinteraction/multipointtouch/content/BearB.png b/examples/quick/touchinteraction/multipointtouch/content/BearB.png
deleted file mode 100644
index 60be2b32c6..0000000000
--- a/examples/quick/touchinteraction/multipointtouch/content/BearB.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/touchinteraction/multipointtouch/content/BearWhackParticleSystem.qml b/examples/quick/touchinteraction/multipointtouch/content/BearWhackParticleSystem.qml
deleted file mode 100644
index 8da5949a1b..0000000000
--- a/examples/quick/touchinteraction/multipointtouch/content/BearWhackParticleSystem.qml
+++ /dev/null
@@ -1,193 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-ParticleSystem {
- id: particleSystem
-
- property int score
-
- function explode(x,y) {
- fireEmitter.burst(100,x,y);
- }
-
- Emitter {
- id: emitter
- group: "bears"
- width: parent.width
- emitRate: 1
- NumberAnimation on emitRate {
- id: goFaster
- from: 1
- to: 16
- running: particleSystem.running
- loops: 1
- duration: 60000 * 5
- easing.type: Easing.Linear
- }
- lifeSpan: 4000 + 800*(16-emitRate)
- maximumEmitted: 128
- size: 64
- velocity: PointDirection{ y: 40 + 10 * emitter.emitRate }
- }
-
- Emitter {
- id: fireEmitter
- enabled: false
- maximumEmitted: 6000
- group: "flame"
- emitRate: 1000
- size: 16
- endSize: 8
- velocity: CumulativeDirection { AngleDirection {angleVariation: 180; magnitudeVariation: 120;} PointDirection { y: -60 }}
- lifeSpan: 400
- }
- Emitter {
- id: heartEmitter
- enabled: false
- maximumEmitted: 6000
- group: "hearts"
- emitRate: 1000
- size: 16
- endSize: 8
- velocity: AngleDirection {angleVariation: 180; magnitudeVariation: 180;}
- lifeSpan: 600
- }
- Emitter {
- id: bloodEmitter
- enabled: false
- maximumEmitted: 6000
- group: "blood"
- emitRate: 1000
- size: 16
- endSize: 8
- velocity: CumulativeDirection { AngleDirection {angleVariation: 180; magnitudeVariation: 80;} PointDirection { y: 40 }}
- lifeSpan: 600
- }
-
- Affector {
- width: parent.width
- height: 64
- once: true
- y: parent.height - 32
- groups: "bears"
- onAffectParticles: function(particles) {
- for (var i=0;i<particles.length; i++) {
- if (particles[i].animationIndex != 0) {
- particleSystem.score++;
- bloodEmitter.burst(100, particles[i].x, particles[i].y);
- } else {
- particleSystem.score--;
- heartEmitter.burst(100, particles[i].x, particles[i].y);
- }
- particles[i].update = 1.0;
- particles[i].t -= 1000.0;
- }
- }
- }
- ImageParticle {
- groups: ["flame"]
- source: "blur-circle.png"
- z: 4
- colorVariation: 0.1
- color: "#ffa24d"
- alpha: 0.4
- }
- ImageParticle {
- groups: ["blood"]
- color: "red"
- z: 2
- source: "blur-circle3.png"
- alpha: 0.2
- }
- ImageParticle {
- groups: ["hearts"]
- color: "#ff66AA"
- z: 3
- source: "heart-blur.png"
- alpha: 0.4
- autoRotation: true
- }
- ImageParticle {
- groups: ["bears"]
- z: 1
- spritesInterpolate: false
- sprites:[
- Sprite{
- name: "floating"
- source: "Bear1.png"
- frameCount: 9
- frameWidth: 256
- frameHeight: 256
- frameDuration: 80
- to: {"still":0, "flailing":0}
- },
- Sprite{
- name: "flailing"
- source: "Bear2.png"
- frameCount: 8
- frameWidth: 256
- frameHeight: 256
- frameDuration: 80
- to: {"falling":1}
- },
- Sprite{
- name: "falling"
- source: "Bear3.png"
- frameCount: 5
- frameWidth: 256
- frameHeight: 256
- frameDuration: 80
- to: {"falling":1}
- }
- ]
- }
-}
diff --git a/examples/quick/touchinteraction/multipointtouch/content/ParticleFlame.qml b/examples/quick/touchinteraction/multipointtouch/content/ParticleFlame.qml
deleted file mode 100644
index 4c201720d9..0000000000
--- a/examples/quick/touchinteraction/multipointtouch/content/ParticleFlame.qml
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-ParticleSystem {
- anchors.fill: parent
-
- property alias emitterX: emitter.x
- property alias emitterY: emitter.y
-
- property alias color: img.color
- property alias emitting: emitter.enabled
- ImageParticle {
- id: img
- source: "blur-circle.png"
- colorVariation: 0.1
- color: "#ff521d"
- alpha: 0
- }
- Emitter {
- id: emitter
- velocityFromMovement: 10
- emitRate: 80
- lifeSpan: 1500
- velocity: PointDirection{ y: -90; yVariation: 50; }
- acceleration: PointDirection{ xVariation: 100; yVariation: 90; }
- size: 51
- sizeVariation: 53
- endSize: 64
- }
-}
diff --git a/examples/quick/touchinteraction/multipointtouch/content/blur-circle3.png b/examples/quick/touchinteraction/multipointtouch/content/blur-circle3.png
deleted file mode 100644
index dbc39cb16e..0000000000
--- a/examples/quick/touchinteraction/multipointtouch/content/blur-circle3.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/touchinteraction/multipointtouch/content/heart-blur.png b/examples/quick/touchinteraction/multipointtouch/content/heart-blur.png
deleted file mode 100644
index dbc38804ee..0000000000
--- a/examples/quick/touchinteraction/multipointtouch/content/heart-blur.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/touchinteraction/multipointtouch/content/title.png b/examples/quick/touchinteraction/multipointtouch/content/title.png
deleted file mode 100644
index 01893a247d..0000000000
--- a/examples/quick/touchinteraction/multipointtouch/content/title.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/touchinteraction/multipointtouch/multiflame.qml b/examples/quick/touchinteraction/multipointtouch/multiflame.qml
deleted file mode 100644
index 514d583044..0000000000
--- a/examples/quick/touchinteraction/multipointtouch/multiflame.qml
+++ /dev/null
@@ -1,105 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-import "content"
-
-Rectangle {
- width: 360
- height: 480
- color: "black"
-
-//! [0]
- MultiPointTouchArea {
- anchors.fill: parent
- minimumTouchPoints: 1
- maximumTouchPoints: 5
- touchPoints: [
- TouchPoint { id: touch1 },
- TouchPoint { id: touch2 },
- TouchPoint { id: touch11 },
- TouchPoint { id: touch21 },
- TouchPoint { id: touch31 }
- ]
- }
-//! [0]
-
-//! [1]
- ParticleFlame {
- color: "red"
- emitterX: touch1.x
- emitterY: touch1.y
- emitting: touch1.pressed
- }
-//! [1]
- ParticleFlame {
- color: "green"
- emitterX: touch2.x
- emitterY: touch2.y
- emitting: touch2.pressed
- }
- ParticleFlame {
- color: "yellow"
- emitterX: touch11.x
- emitterY: touch11.y
- emitting: touch11.pressed
- }
- ParticleFlame {
- color: "blue"
- emitterX: touch21.x
- emitterY: touch21.y
- emitting: touch21.pressed
- }
- ParticleFlame {
- color: "violet"
- emitterX: touch31.x
- emitterY: touch31.y
- emitting: touch31.pressed
- }
-}
diff --git a/examples/quick/touchinteraction/pincharea/flickresize.qml b/examples/quick/touchinteraction/pincharea/flickresize.qml
deleted file mode 100644
index 994fd01b50..0000000000
--- a/examples/quick/touchinteraction/pincharea/flickresize.qml
+++ /dev/null
@@ -1,109 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Rectangle {
- width: 640
- height: 360
- color: "gray"
-
- Flickable {
- id: flick
- anchors.fill: parent
- contentWidth: 500
- contentHeight: 500
-
- PinchArea {
- width: Math.max(flick.contentWidth, flick.width)
- height: Math.max(flick.contentHeight, flick.height)
-
- property real initialWidth
- property real initialHeight
- //![0]
- onPinchStarted: {
- initialWidth = flick.contentWidth
- initialHeight = flick.contentHeight
- }
-
- onPinchUpdated: (pinch)=> {
- // adjust content pos due to drag
- flick.contentX += pinch.previousCenter.x - pinch.center.x
- flick.contentY += pinch.previousCenter.y - pinch.center.y
-
- // resize content
- flick.resizeContent(initialWidth * pinch.scale, initialHeight * pinch.scale, pinch.center)
- }
-
- onPinchFinished: {
- // Move its content within bounds.
- flick.returnToBounds()
- }
- //![0]
-
- Rectangle {
- width: flick.contentWidth
- height: flick.contentHeight
- color: "white"
- Image {
- anchors.fill: parent
- source: "qt-logo.jpg"
- MouseArea {
- anchors.fill: parent
- onDoubleClicked: {
- flick.contentWidth = 500
- flick.contentHeight = 500
- }
- }
- }
- }
- }
- }
-}
diff --git a/examples/quick/touchinteraction/pincharea/qt-logo.jpg b/examples/quick/touchinteraction/pincharea/qt-logo.jpg
deleted file mode 100644
index 4014b4659c..0000000000
--- a/examples/quick/touchinteraction/pincharea/qt-logo.jpg
+++ /dev/null
Binary files differ
diff --git a/examples/quick/touchinteraction/touchinteraction.pro b/examples/quick/touchinteraction/touchinteraction.pro
deleted file mode 100644
index 0ae0a41cce..0000000000
--- a/examples/quick/touchinteraction/touchinteraction.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-TEMPLATE = app
-
-QT += quick qml
-SOURCES += main.cpp
-RESOURCES += \
- touchinteraction.qrc \
- ../shared/shared.qrc
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/touchinteraction
-INSTALLS += target
diff --git a/examples/quick/touchinteraction/touchinteraction.qml b/examples/quick/touchinteraction/touchinteraction.qml
deleted file mode 100644
index a95867b6c1..0000000000
--- a/examples/quick/touchinteraction/touchinteraction.qml
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import "../shared"
-
-Item {
- height: 480
- width: 320
- LauncherList {
- id: ll
- anchors.fill: parent
- Component.onCompleted: {
- addExample("Multipoint Flames", "Create multiple flames with multiple fingers", Qt.resolvedUrl("multipointtouch/multiflame.qml"));
- addExample("Bear-Whack", "Use multiple touches to knock all the bears down", Qt.resolvedUrl("multipointtouch/bearwhack.qml"));
- addExample("Flick Resize", "Manipulate images using pinch gestures", Qt.resolvedUrl("pincharea/flickresize.qml"));
- addExample("Flickable", "A viewport you can move with touch gestures", Qt.resolvedUrl("flickable/basic-flickable.qml"));
- addExample("Corkboards", "Uses touch input on items inside a Flickable", Qt.resolvedUrl("flickable/corkboards.qml"));
- }
- }
-}
diff --git a/examples/quick/touchinteraction/touchinteraction.qmlproject b/examples/quick/touchinteraction/touchinteraction.qmlproject
deleted file mode 100644
index a9aa9d2e81..0000000000
--- a/examples/quick/touchinteraction/touchinteraction.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "touchinteraction.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/quick/touchinteraction/touchinteraction.qrc b/examples/quick/touchinteraction/touchinteraction.qrc
deleted file mode 100644
index 6cec506a0f..0000000000
--- a/examples/quick/touchinteraction/touchinteraction.qrc
+++ /dev/null
@@ -1,27 +0,0 @@
-<RCC>
- <qresource prefix="/touchinteraction">
- <file>touchinteraction.qml</file>
- <file>flickable/basic-flickable.qml</file>
- <file>flickable/corkboards.qml</file>
- <file>flickable/content/cork.jpg</file>
- <file>flickable/content/note-yellow.png</file>
- <file>flickable/content/Panel.qml</file>
- <file>flickable/content/tack.png</file>
- <file>multipointtouch/bearwhack.qml</file>
- <file>multipointtouch/multiflame.qml</file>
- <file>multipointtouch/content/AugmentedTouchPoint.qml</file>
- <file>multipointtouch/content/Bear0.png</file>
- <file>multipointtouch/content/Bear1.png</file>
- <file>multipointtouch/content/Bear2.png</file>
- <file>multipointtouch/content/Bear3.png</file>
- <file>multipointtouch/content/BearB.png</file>
- <file>multipointtouch/content/BearWhackParticleSystem.qml</file>
- <file>multipointtouch/content/blur-circle.png</file>
- <file>multipointtouch/content/blur-circle3.png</file>
- <file>multipointtouch/content/heart-blur.png</file>
- <file>multipointtouch/content/ParticleFlame.qml</file>
- <file>multipointtouch/content/title.png</file>
- <file>pincharea/flickresize.qml</file>
- <file>pincharea/qt-logo.jpg</file>
- </qresource>
-</RCC>
diff --git a/examples/quick/tutorials/CMakeLists.txt b/examples/quick/tutorials/CMakeLists.txt
index 87d2caf01f..b200b54f9f 100644
--- a/examples/quick/tutorials/CMakeLists.txt
+++ b/examples/quick/tutorials/CMakeLists.txt
@@ -1,2 +1,2 @@
-# Generated from tutorials.pro.
-
+add_subdirectory(samegame)
+add_subdirectory(dynamicview)
diff --git a/examples/quick/tutorials/dynamicview/CMakeLists.txt b/examples/quick/tutorials/dynamicview/CMakeLists.txt
new file mode 100644
index 0000000000..2245f3cdfb
--- /dev/null
+++ b/examples/quick/tutorials/dynamicview/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+qt_internal_add_example(dynamicview1)
+qt_internal_add_example(dynamicview2)
+qt_internal_add_example(dynamicview3)
+qt_internal_add_example(dynamicview4)
diff --git a/examples/quick/tutorials/dynamicview/dynamicview1/CMakeLists.txt b/examples/quick/tutorials/dynamicview/dynamicview1/CMakeLists.txt
new file mode 100644
index 0000000000..a1ba04f8e9
--- /dev/null
+++ b/examples/quick/tutorials/dynamicview/dynamicview1/CMakeLists.txt
@@ -0,0 +1,49 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(dynamicview1 LANGUAGES CXX)
+
+set(CMAKE_AUTOMOC ON)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
+
+qt_standard_project_setup(REQUIRES 6.5)
+
+qt_add_executable(dynamicview1
+ main.cpp
+)
+
+set_target_properties(dynamicview1 PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+
+qt_add_qml_module(dynamicview1
+ URI dynamicview
+ QML_FILES
+ dynamicview.qml
+ PetsModel.qml
+)
+
+target_link_libraries(dynamicview1 PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
+
+install(TARGETS dynamicview1
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET dynamicview1
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/tutorials/dynamicview/dynamicview1/PetsModel.qml b/examples/quick/tutorials/dynamicview/dynamicview1/PetsModel.qml
index e9ffcc3cfd..0ebbb1d12e 100644
--- a/examples/quick/tutorials/dynamicview/dynamicview1/PetsModel.qml
+++ b/examples/quick/tutorials/dynamicview/dynamicview1/PetsModel.qml
@@ -1,111 +1,64 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//![0]
-import QtQuick 2.0
+import QtQuick
ListModel {
ListElement {
- name: "Polly"
- type: "Parrot"
+ name: qsTr("Polly")
+ type: qsTr("Parrot")
age: 12
- size: "Small"
+ size: qsTr("Small")
}
ListElement {
- name: "Penny"
- type: "Turtle"
+ name: qsTr("Penny")
+ type: qsTr("Turtle")
age: 4
- size: "Small"
+ size: qsTr("Small")
}
//![0]
ListElement {
- name: "Warren"
- type: "Rabbit"
+ name: qsTr("Warren")
+ type: qsTr("Rabbit")
age: 2
- size: "Small"
+ size: qsTr("Small")
}
ListElement {
- name: "Spot"
- type: "Dog"
+ name: qsTr("Spot")
+ type: qsTr("Dog")
age: 9
- size: "Medium"
+ size: qsTr("Medium")
}
ListElement {
- name: "Schrödinger"
- type: "Cat"
+ name: qsTr("Schrödinger")
+ type: qsTr("Cat")
age: 2
- size: "Medium"
+ size: qsTr("Medium")
}
ListElement {
- name: "Joey"
- type: "Kangaroo"
+ name: qsTr("Joey")
+ type: qsTr("Kangaroo")
age: 1
- size: "Medium"
+ size: qsTr("Medium")
}
ListElement {
- name: "Kimba"
- type: "Bunny"
+ name: qsTr("Kimba")
+ type: qsTr("Bunny")
age: 65
- size: "Large"
+ size: qsTr("Large")
}
ListElement {
- name: "Rover"
- type: "Dog"
+ name: qsTr("Rover")
+ type: qsTr("Dog")
age: 5
- size: "Large"
+ size: qsTr("Large")
}
ListElement {
- name: "Tiny"
- type: "Elephant"
+ name: qsTr("Tiny")
+ type: qsTr("Elephant")
age: 15
- size: "Large"
+ size: qsTr("Large")
}
//![1]
}
diff --git a/examples/quick/tutorials/dynamicview/dynamicview1/dynamicview.qml b/examples/quick/tutorials/dynamicview/dynamicview1/dynamicview.qml
index 60167aa813..3cf9194729 100644
--- a/examples/quick/tutorials/dynamicview/dynamicview1/dynamicview.qml
+++ b/examples/quick/tutorials/dynamicview/dynamicview1/dynamicview.qml
@@ -1,60 +1,15 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+pragma ComponentBehavior: Bound
//![0]
-import QtQuick 2.0
+import QtQuick
Rectangle {
id: root
- width: 300; height: 400
+ width: 300
+ height: 400
//![1]
Component {
@@ -63,7 +18,12 @@ Rectangle {
Rectangle {
id: content
- anchors { left: parent.left; right: parent.right }
+ required property string name
+ required property string type
+ required property string size
+ required property int age
+
+ width: view.width
height: column.implicitHeight + 4
border.width: 1
@@ -73,12 +33,15 @@ Rectangle {
Column {
id: column
- anchors { fill: parent; margins: 2 }
+ anchors {
+ fill: parent
+ margins: 2
+ }
- Text { text: 'Name: ' + name }
- Text { text: 'Type: ' + type }
- Text { text: 'Age: ' + age }
- Text { text: 'Size: ' + size }
+ Text { text: qsTr('Name: ') + content.name }
+ Text { text: qsTr('Type: ') + content.type }
+ Text { text: qsTr('Age: ') + content.age }
+ Text { text: qsTr('Size: ') + content.size }
}
}
}
@@ -87,7 +50,10 @@ Rectangle {
ListView {
id: view
- anchors { fill: parent; margins: 2 }
+ anchors {
+ fill: parent
+ margins: 2
+ }
model: PetsModel {}
delegate: dragDelegate
diff --git a/examples/quick/tutorials/dynamicview/dynamicview1/dynamicview1.qrc b/examples/quick/tutorials/dynamicview/dynamicview1/dynamicview1.qrc
index c89a5e3a97..07fe48ef38 100644
--- a/examples/quick/tutorials/dynamicview/dynamicview1/dynamicview1.qrc
+++ b/examples/quick/tutorials/dynamicview/dynamicview1/dynamicview1.qrc
@@ -1,5 +1,5 @@
<RCC>
- <qresource prefix="/">
+ <qresource prefix="/qt/qml/dynamicview">
<file>dynamicview.qml</file>
<file>PetsModel.qml</file>
</qresource>
diff --git a/examples/quick/tutorials/dynamicview/dynamicview1/main.cpp b/examples/quick/tutorials/dynamicview/dynamicview1/main.cpp
index 72b8b667f5..3c983133fb 100644
--- a/examples/quick/tutorials/dynamicview/dynamicview1/main.cpp
+++ b/examples/quick/tutorials/dynamicview/dynamicview1/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(dynamicview)
+DECLARATIVE_EXAMPLE_MAIN(dynamicview/dynamicview)
diff --git a/examples/quick/tutorials/dynamicview/dynamicview2/CMakeLists.txt b/examples/quick/tutorials/dynamicview/dynamicview2/CMakeLists.txt
new file mode 100644
index 0000000000..d1d65497f5
--- /dev/null
+++ b/examples/quick/tutorials/dynamicview/dynamicview2/CMakeLists.txt
@@ -0,0 +1,49 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(dynamicview2 LANGUAGES CXX)
+
+set(CMAKE_AUTOMOC ON)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
+
+qt_standard_project_setup(REQUIRES 6.5)
+
+qt_add_executable(dynamicview2
+ main.cpp
+)
+
+set_target_properties(dynamicview2 PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+
+qt_add_qml_module(dynamicview2
+ URI dynamicview
+ QML_FILES
+ dynamicview.qml
+ PetsModel.qml
+)
+
+target_link_libraries(dynamicview2 PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
+
+install(TARGETS dynamicview2
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET dynamicview2
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/tutorials/dynamicview/dynamicview2/PetsModel.qml b/examples/quick/tutorials/dynamicview/dynamicview2/PetsModel.qml
index bc8751f00a..457d8e5dcf 100644
--- a/examples/quick/tutorials/dynamicview/dynamicview2/PetsModel.qml
+++ b/examples/quick/tutorials/dynamicview/dynamicview2/PetsModel.qml
@@ -1,108 +1,61 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
ListModel {
ListElement {
- name: "Polly"
- type: "Parrot"
+ name: qsTr("Polly")
+ type: qsTr("Parrot")
age: 12
- size: "Small"
+ size: qsTr("Small")
}
ListElement {
- name: "Penny"
- type: "Turtle"
+ name: qsTr("Penny")
+ type: qsTr("Turtle")
age: 4
- size: "Small"
+ size: qsTr("Small")
}
ListElement {
- name: "Warren"
- type: "Rabbit"
+ name: qsTr("Warren")
+ type: qsTr("Rabbit")
age: 2
- size: "Small"
+ size: qsTr("Small")
}
ListElement {
- name: "Spot"
- type: "Dog"
+ name: qsTr("Spot")
+ type: qsTr("Dog")
age: 9
- size: "Medium"
+ size: qsTr("Medium")
}
ListElement {
- name: "Schrödinger"
- type: "Cat"
+ name: qsTr("Schrödinger")
+ type: qsTr("Cat")
age: 2
- size: "Medium"
+ size: qsTr("Medium")
}
ListElement {
- name: "Joey"
- type: "Kangaroo"
+ name: qsTr("Joey")
+ type: qsTr("Kangaroo")
age: 1
- size: "Medium"
+ size: qsTr("Medium")
}
ListElement {
- name: "Kimba"
- type: "Bunny"
+ name: qsTr("Kimba")
+ type: qsTr("Bunny")
age: 65
- size: "Large"
+ size: qsTr("Large")
}
ListElement {
- name: "Rover"
- type: "Dog"
+ name: qsTr("Rover")
+ type: qsTr("Dog")
age: 5
- size: "Large"
+ size: qsTr("Large")
}
ListElement {
- name: "Tiny"
- type: "Elephant"
+ name: qsTr("Tiny")
+ type: qsTr("Elephant")
age: 15
- size: "Large"
+ size: qsTr("Large")
}
}
diff --git a/examples/quick/tutorials/dynamicview/dynamicview2/dynamicview.qml b/examples/quick/tutorials/dynamicview/dynamicview2/dynamicview.qml
index 2c67c46df2..d1e954ba27 100644
--- a/examples/quick/tutorials/dynamicview/dynamicview2/dynamicview.qml
+++ b/examples/quick/tutorials/dynamicview/dynamicview2/dynamicview.qml
@@ -1,59 +1,14 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+pragma ComponentBehavior: Bound
+import QtQuick
Rectangle {
id: root
- width: 300; height: 400
+ width: 300
+ height: 400
//![0]
Component {
@@ -64,8 +19,15 @@ Rectangle {
id: dragArea
property bool held: false
-
- anchors { left: parent.left; right: parent.right }
+ required property string name
+ required property string type
+ required property string size
+ required property int age
+
+ anchors {
+ left: parent?.left
+ right: parent?.right
+ }
height: content.height
drag.target: held ? content : undefined
@@ -81,7 +43,8 @@ Rectangle {
horizontalCenter: parent.horizontalCenter
verticalCenter: parent.verticalCenter
}
- width: dragArea.width; height: column.implicitHeight + 4
+ width: dragArea.width
+ height: column.implicitHeight + 4
border.width: 1
border.color: "lightsteelblue"
@@ -94,21 +57,30 @@ Rectangle {
states: State {
when: dragArea.held
- ParentChange { target: content; parent: root }
+ ParentChange {
+ target: content
+ parent: root
+ }
AnchorChanges {
target: content
- anchors { horizontalCenter: undefined; verticalCenter: undefined }
+ anchors {
+ horizontalCenter: undefined
+ verticalCenter: undefined
+ }
}
}
//![4]
Column {
id: column
- anchors { fill: parent; margins: 2 }
+ anchors {
+ fill: parent
+ margins: 2
+ }
- Text { text: 'Name: ' + name }
- Text { text: 'Type: ' + type }
- Text { text: 'Age: ' + age }
- Text { text: 'Size: ' + size }
+ Text { text: qsTr('Name: ') + dragArea.name }
+ Text { text: qsTr('Type: ') + dragArea.type }
+ Text { text: qsTr('Age: ') + dragArea.age }
+ Text { text: qsTr('Size: ') + dragArea.size }
}
//![2]
}
@@ -120,7 +92,10 @@ Rectangle {
ListView {
id: view
- anchors { fill: parent; margins: 2 }
+ anchors {
+ fill: parent
+ margins: 2
+ }
model: PetsModel {}
delegate: dragDelegate
diff --git a/examples/quick/tutorials/dynamicview/dynamicview2/dynamicview2.qrc b/examples/quick/tutorials/dynamicview/dynamicview2/dynamicview2.qrc
index c89a5e3a97..07fe48ef38 100644
--- a/examples/quick/tutorials/dynamicview/dynamicview2/dynamicview2.qrc
+++ b/examples/quick/tutorials/dynamicview/dynamicview2/dynamicview2.qrc
@@ -1,5 +1,5 @@
<RCC>
- <qresource prefix="/">
+ <qresource prefix="/qt/qml/dynamicview">
<file>dynamicview.qml</file>
<file>PetsModel.qml</file>
</qresource>
diff --git a/examples/quick/tutorials/dynamicview/dynamicview2/main.cpp b/examples/quick/tutorials/dynamicview/dynamicview2/main.cpp
index 72b8b667f5..3c983133fb 100644
--- a/examples/quick/tutorials/dynamicview/dynamicview2/main.cpp
+++ b/examples/quick/tutorials/dynamicview/dynamicview2/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(dynamicview)
+DECLARATIVE_EXAMPLE_MAIN(dynamicview/dynamicview)
diff --git a/examples/quick/tutorials/dynamicview/dynamicview3/CMakeLists.txt b/examples/quick/tutorials/dynamicview/dynamicview3/CMakeLists.txt
new file mode 100644
index 0000000000..5c561f1112
--- /dev/null
+++ b/examples/quick/tutorials/dynamicview/dynamicview3/CMakeLists.txt
@@ -0,0 +1,49 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(dynamicview3 LANGUAGES CXX)
+
+set(CMAKE_AUTOMOC ON)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
+
+qt_standard_project_setup(REQUIRES 6.5)
+
+qt_add_executable(dynamicview3
+ main.cpp
+)
+
+set_target_properties(dynamicview3 PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+
+qt_add_qml_module(dynamicview3
+ URI dynamicview
+ QML_FILES
+ dynamicview.qml
+ PetsModel.qml
+)
+
+target_link_libraries(dynamicview3 PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
+
+install(TARGETS dynamicview3
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET dynamicview3
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/tutorials/dynamicview/dynamicview3/PetsModel.qml b/examples/quick/tutorials/dynamicview/dynamicview3/PetsModel.qml
index bc8751f00a..457d8e5dcf 100644
--- a/examples/quick/tutorials/dynamicview/dynamicview3/PetsModel.qml
+++ b/examples/quick/tutorials/dynamicview/dynamicview3/PetsModel.qml
@@ -1,108 +1,61 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
ListModel {
ListElement {
- name: "Polly"
- type: "Parrot"
+ name: qsTr("Polly")
+ type: qsTr("Parrot")
age: 12
- size: "Small"
+ size: qsTr("Small")
}
ListElement {
- name: "Penny"
- type: "Turtle"
+ name: qsTr("Penny")
+ type: qsTr("Turtle")
age: 4
- size: "Small"
+ size: qsTr("Small")
}
ListElement {
- name: "Warren"
- type: "Rabbit"
+ name: qsTr("Warren")
+ type: qsTr("Rabbit")
age: 2
- size: "Small"
+ size: qsTr("Small")
}
ListElement {
- name: "Spot"
- type: "Dog"
+ name: qsTr("Spot")
+ type: qsTr("Dog")
age: 9
- size: "Medium"
+ size: qsTr("Medium")
}
ListElement {
- name: "Schrödinger"
- type: "Cat"
+ name: qsTr("Schrödinger")
+ type: qsTr("Cat")
age: 2
- size: "Medium"
+ size: qsTr("Medium")
}
ListElement {
- name: "Joey"
- type: "Kangaroo"
+ name: qsTr("Joey")
+ type: qsTr("Kangaroo")
age: 1
- size: "Medium"
+ size: qsTr("Medium")
}
ListElement {
- name: "Kimba"
- type: "Bunny"
+ name: qsTr("Kimba")
+ type: qsTr("Bunny")
age: 65
- size: "Large"
+ size: qsTr("Large")
}
ListElement {
- name: "Rover"
- type: "Dog"
+ name: qsTr("Rover")
+ type: qsTr("Dog")
age: 5
- size: "Large"
+ size: qsTr("Large")
}
ListElement {
- name: "Tiny"
- type: "Elephant"
+ name: qsTr("Tiny")
+ type: qsTr("Elephant")
age: 15
- size: "Large"
+ size: qsTr("Large")
}
}
diff --git a/examples/quick/tutorials/dynamicview/dynamicview3/dynamicview.qml b/examples/quick/tutorials/dynamicview/dynamicview3/dynamicview.qml
index eb42a76a47..1212ac066c 100644
--- a/examples/quick/tutorials/dynamicview/dynamicview3/dynamicview.qml
+++ b/examples/quick/tutorials/dynamicview/dynamicview3/dynamicview.qml
@@ -1,60 +1,15 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQml.Models 2.1
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+pragma ComponentBehavior: Bound
+import QtQuick
+import QtQml.Models
//![0]
Rectangle {
id: root
- width: 300; height: 400
+ width: 300
+ height: 400
Component {
id: dragDelegate
@@ -63,8 +18,15 @@ Rectangle {
id: dragArea
property bool held: false
-
- anchors { left: parent.left; right: parent.right }
+ required property string name
+ required property string type
+ required property string size
+ required property int age
+
+ anchors {
+ left: parent?.left
+ right: parent?.right
+ }
height: content.height
drag.target: held ? content : undefined
@@ -80,7 +42,8 @@ Rectangle {
horizontalCenter: parent.horizontalCenter
verticalCenter: parent.verticalCenter
}
- width: dragArea.width; height: column.implicitHeight + 4
+ width: dragArea.width
+ height: column.implicitHeight + 4
border.width: 1
border.color: "lightsteelblue"
@@ -98,29 +61,41 @@ Rectangle {
states: State {
when: dragArea.held
- ParentChange { target: content; parent: root }
+ ParentChange {
+ target: content
+ parent: root
+ }
AnchorChanges {
target: content
- anchors { horizontalCenter: undefined; verticalCenter: undefined }
+ anchors {
+ horizontalCenter: undefined
+ verticalCenter: undefined
+ }
}
}
Column {
id: column
- anchors { fill: parent; margins: 2 }
+ anchors {
+ fill: parent
+ margins: 2
+ }
- Text { text: 'Name: ' + name }
- Text { text: 'Type: ' + type }
- Text { text: 'Age: ' + age }
- Text { text: 'Size: ' + size }
+ Text { text: qsTr('Name: ') + dragArea.name }
+ Text { text: qsTr('Type: ') + dragArea.type }
+ Text { text: qsTr('Age: ') + dragArea.age }
+ Text { text: qsTr('Size: ') + dragArea.size }
}
//![2]
}
//![3]
DropArea {
- anchors { fill: parent; margins: 10 }
+ anchors {
+ fill: parent
+ margins: 10
+ }
- onEntered: (drag)=> {
+ onEntered: (drag) => {
visualModel.items.move(
drag.source.DelegateModel.itemsIndex,
dragArea.DelegateModel.itemsIndex)
@@ -141,7 +116,10 @@ Rectangle {
ListView {
id: view
- anchors { fill: parent; margins: 2 }
+ anchors {
+ fill: parent
+ margins: 2
+ }
model: visualModel
diff --git a/examples/quick/tutorials/dynamicview/dynamicview3/dynamicview3.qrc b/examples/quick/tutorials/dynamicview/dynamicview3/dynamicview3.qrc
index c89a5e3a97..07fe48ef38 100644
--- a/examples/quick/tutorials/dynamicview/dynamicview3/dynamicview3.qrc
+++ b/examples/quick/tutorials/dynamicview/dynamicview3/dynamicview3.qrc
@@ -1,5 +1,5 @@
<RCC>
- <qresource prefix="/">
+ <qresource prefix="/qt/qml/dynamicview">
<file>dynamicview.qml</file>
<file>PetsModel.qml</file>
</qresource>
diff --git a/examples/quick/tutorials/dynamicview/dynamicview3/main.cpp b/examples/quick/tutorials/dynamicview/dynamicview3/main.cpp
index 72b8b667f5..3c983133fb 100644
--- a/examples/quick/tutorials/dynamicview/dynamicview3/main.cpp
+++ b/examples/quick/tutorials/dynamicview/dynamicview3/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(dynamicview)
+DECLARATIVE_EXAMPLE_MAIN(dynamicview/dynamicview)
diff --git a/examples/quick/tutorials/dynamicview/dynamicview4/CMakeLists.txt b/examples/quick/tutorials/dynamicview/dynamicview4/CMakeLists.txt
new file mode 100644
index 0000000000..a3f0ae04e9
--- /dev/null
+++ b/examples/quick/tutorials/dynamicview/dynamicview4/CMakeLists.txt
@@ -0,0 +1,50 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(dynamicview4 LANGUAGES CXX)
+
+set(CMAKE_AUTOMOC ON)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
+
+qt_standard_project_setup(REQUIRES 6.5)
+
+qt_add_executable(dynamicview4
+ main.cpp
+)
+
+set_target_properties(dynamicview4 PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+
+qt_add_qml_module(dynamicview4
+ URI dynamicview
+ QML_FILES
+ dynamicview.qml
+ ListSelector.qml
+ PetsModel.qml
+)
+
+target_link_libraries(dynamicview4 PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
+
+install(TARGETS dynamicview4
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET dynamicview4
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/tutorials/dynamicview/dynamicview4/ListSelector.qml b/examples/quick/tutorials/dynamicview/dynamicview4/ListSelector.qml
index b58a704303..ee788417d9 100644
--- a/examples/quick/tutorials/dynamicview/dynamicview4/ListSelector.qml
+++ b/examples/quick/tutorials/dynamicview/dynamicview4/ListSelector.qml
@@ -1,54 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+pragma ComponentBehavior: Bound
+import QtQuick
Item {
id: selector
@@ -58,12 +12,17 @@ Item {
property alias label: labelText.text
property bool expanded
- width: 100; height: labelText.implicitHeight + 26
+ width: 100
+ height: labelText.implicitHeight + 26
Rectangle {
- anchors { left: parent.left; right: parent.right; bottom: parent.bottom; }
+ anchors {
+ left: parent.left
+ right: parent.right
+ bottom: parent.bottom
+ }
- height: labelText.implicitHeight + 4 + (expanded ? 20 * view.count : 20)
+ height: labelText.implicitHeight + 4 + (selector.expanded ? 20 * view.count : 20)
Behavior on height { NumberAnimation { duration: 300 } }
radius: 2
@@ -78,13 +37,20 @@ Item {
Text {
id: labelText
- anchors { left: parent.left; top: parent.top; margins: 2 }
+
+ anchors {
+ left: parent.left
+ top: parent.top
+ margins: 2
+ }
}
Rectangle {
anchors {
- left: parent.left; top: labelText.bottom;
- right: parent.right; bottom: parent.bottom;
+ left: parent.left
+ top: labelText.bottom
+ right: parent.right
+ bottom: parent.bottom
margins: 2
leftMargin: 10
}
@@ -100,7 +66,13 @@ Item {
clip: true
delegate: Text {
- anchors { left: parent.left; right: parent.right }
+ required property int index
+ required property string modelData
+
+ anchors {
+ left: parent.left
+ right: parent.right
+ }
height: 20
verticalAlignment: Text.AlignVCenter
@@ -111,13 +83,16 @@ Item {
anchors.fill: parent
onClicked: {
- view.currentIndex = index
+ parent.ListView.view.currentIndex = parent.index
selector.expanded = !selector.expanded
}
}
}
highlight: Rectangle {
- anchors { left: parent.left; right: parent.right }
+ anchors {
+ left: parent.left
+ right: parent.right
+ }
height: 20
radius: 2
diff --git a/examples/quick/tutorials/dynamicview/dynamicview4/PetsModel.qml b/examples/quick/tutorials/dynamicview/dynamicview4/PetsModel.qml
index bc8751f00a..457d8e5dcf 100644
--- a/examples/quick/tutorials/dynamicview/dynamicview4/PetsModel.qml
+++ b/examples/quick/tutorials/dynamicview/dynamicview4/PetsModel.qml
@@ -1,108 +1,61 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
ListModel {
ListElement {
- name: "Polly"
- type: "Parrot"
+ name: qsTr("Polly")
+ type: qsTr("Parrot")
age: 12
- size: "Small"
+ size: qsTr("Small")
}
ListElement {
- name: "Penny"
- type: "Turtle"
+ name: qsTr("Penny")
+ type: qsTr("Turtle")
age: 4
- size: "Small"
+ size: qsTr("Small")
}
ListElement {
- name: "Warren"
- type: "Rabbit"
+ name: qsTr("Warren")
+ type: qsTr("Rabbit")
age: 2
- size: "Small"
+ size: qsTr("Small")
}
ListElement {
- name: "Spot"
- type: "Dog"
+ name: qsTr("Spot")
+ type: qsTr("Dog")
age: 9
- size: "Medium"
+ size: qsTr("Medium")
}
ListElement {
- name: "Schrödinger"
- type: "Cat"
+ name: qsTr("Schrödinger")
+ type: qsTr("Cat")
age: 2
- size: "Medium"
+ size: qsTr("Medium")
}
ListElement {
- name: "Joey"
- type: "Kangaroo"
+ name: qsTr("Joey")
+ type: qsTr("Kangaroo")
age: 1
- size: "Medium"
+ size: qsTr("Medium")
}
ListElement {
- name: "Kimba"
- type: "Bunny"
+ name: qsTr("Kimba")
+ type: qsTr("Bunny")
age: 65
- size: "Large"
+ size: qsTr("Large")
}
ListElement {
- name: "Rover"
- type: "Dog"
+ name: qsTr("Rover")
+ type: qsTr("Dog")
age: 5
- size: "Large"
+ size: qsTr("Large")
}
ListElement {
- name: "Tiny"
- type: "Elephant"
+ name: qsTr("Tiny")
+ type: qsTr("Elephant")
age: 15
- size: "Large"
+ size: qsTr("Large")
}
}
diff --git a/examples/quick/tutorials/dynamicview/dynamicview4/dynamicview.qml b/examples/quick/tutorials/dynamicview/dynamicview4/dynamicview.qml
index f40f060e7c..1a354d12d9 100644
--- a/examples/quick/tutorials/dynamicview/dynamicview4/dynamicview.qml
+++ b/examples/quick/tutorials/dynamicview/dynamicview4/dynamicview.qml
@@ -1,60 +1,15 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQml.Models 2.1
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+pragma ComponentBehavior: Bound
+import QtQuick
+import QtQml.Models
Rectangle {
id: root
- width: 300; height: 400
+ width: 300
+ height: 400
Component {
id: dragDelegate
@@ -63,8 +18,15 @@ Rectangle {
id: dragArea
property bool held: false
-
- anchors { left: parent.left; right: parent.right }
+ required property string name
+ required property string type
+ required property string size
+ required property int age
+
+ anchors {
+ left: parent?.left
+ right: parent?.right
+ }
height: content.height
enabled: visualModel.sortOrder == visualModel.lessThan.length
@@ -82,7 +44,8 @@ Rectangle {
horizontalCenter: parent.horizontalCenter
verticalCenter: parent.verticalCenter
}
- width: dragArea.width; height: column.implicitHeight + 4
+ width: dragArea.width
+ height: column.implicitHeight + 4
border.width: 1
border.color: "lightsteelblue"
@@ -100,28 +63,40 @@ Rectangle {
states: State {
when: dragArea.held
- ParentChange { target: content; parent: root }
+ ParentChange {
+ target: content
+ parent: root
+ }
AnchorChanges {
target: content
- anchors { horizontalCenter: undefined; verticalCenter: undefined }
+ anchors {
+ horizontalCenter: undefined
+ verticalCenter: undefined
+ }
}
}
Column {
id: column
- anchors { fill: parent; margins: 2 }
+ anchors {
+ fill: parent
+ margins: 2
+ }
- Text { text: 'Name: ' + name }
- Text { text: 'Type: ' + type }
- Text { text: 'Age: ' + age }
- Text { text: 'Size: ' + size }
+ Text { text: qsTr('Name: ') + dragArea.name }
+ Text { text: qsTr('Type: ') + dragArea.type }
+ Text { text: qsTr('Age: ') + dragArea.age }
+ Text { text: qsTr('Size: ') + dragArea.size }
}
}
DropArea {
- anchors { fill: parent; margins: 10 }
+ anchors {
+ fill: parent
+ margins: 10
+ }
- onEntered: (drag)=> {
+ onEntered: (drag) => {
visualModel.items.move(
drag.source.DelegateModel.itemsIndex,
dragArea.DelegateModel.itemsIndex)
@@ -157,11 +132,11 @@ Rectangle {
//![6]
//![3]
function insertPosition(lessThan, item) {
- var lower = 0
- var upper = items.count
+ let lower = 0
+ let upper = items.count
while (lower < upper) {
- var middle = Math.floor(lower + (upper - lower) / 2)
- var result = lessThan(item.model, items.get(middle).model);
+ const middle = Math.floor(lower + (upper - lower) / 2)
+ const result = lessThan(item.model, items.get(middle).model)
if (result) {
upper = middle
} else {
@@ -173,8 +148,8 @@ Rectangle {
function sort(lessThan) {
while (unsortedItems.count > 0) {
- var item = unsortedItems.get(0)
- var index = insertPosition(lessThan, item)
+ const item = unsortedItems.get(0)
+ const index = insertPosition(lessThan, item)
item.groups = "items"
items.move(item.itemsIndex, index)
@@ -209,7 +184,10 @@ Rectangle {
id: view
anchors {
- left: parent.left; top: parent.top; right: parent.right; bottom: orderSelector.top;
+ left: parent.left
+ top: parent.top
+ right: parent.right
+ bottom: orderSelector.top
margins: 2
}
@@ -222,9 +200,14 @@ Rectangle {
ListSelector {
id: orderSelector
- anchors { left: parent.left; right: parent.right; bottom: parent.bottom; margins: 2 }
+ anchors {
+ left: parent.left
+ right: parent.right
+ bottom: parent.bottom
+ margins: 2
+ }
- label: "Sort By"
- list: [ "Name", "Type", "Age", "Size", "Custom" ]
+ label: qsTr("Sort By")
+ list: [ qsTr("Name"), qsTr("Type"), qsTr("Age"), qsTr("Size"), qsTr("Custom") ]
}
}
diff --git a/examples/quick/tutorials/dynamicview/dynamicview4/dynamicview4.qrc b/examples/quick/tutorials/dynamicview/dynamicview4/dynamicview4.qrc
index c89a5e3a97..c9afd50c38 100644
--- a/examples/quick/tutorials/dynamicview/dynamicview4/dynamicview4.qrc
+++ b/examples/quick/tutorials/dynamicview/dynamicview4/dynamicview4.qrc
@@ -1,6 +1,8 @@
<RCC>
- <qresource prefix="/">
+ <qresource prefix="/qt/qml/dynamicview">
<file>dynamicview.qml</file>
+ <file>ListSelector.qml</file>
<file>PetsModel.qml</file>
+ <file>ListSelector.qml</file>
</qresource>
</RCC>
diff --git a/examples/quick/tutorials/dynamicview/dynamicview4/main.cpp b/examples/quick/tutorials/dynamicview/dynamicview4/main.cpp
index 72b8b667f5..3c983133fb 100644
--- a/examples/quick/tutorials/dynamicview/dynamicview4/main.cpp
+++ b/examples/quick/tutorials/dynamicview/dynamicview4/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(dynamicview)
+DECLARATIVE_EXAMPLE_MAIN(dynamicview/dynamicview)
diff --git a/examples/quick/tutorials/helloworld/Cell.qml b/examples/quick/tutorials/helloworld/Cell.qml
index 7462a5ceb1..d88b63cdfa 100644
--- a/examples/quick/tutorials/helloworld/Cell.qml
+++ b/examples/quick/tutorials/helloworld/Cell.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//![0]
-import QtQuick 2.0
+import QtQuick
//![1]
Item {
diff --git a/examples/quick/tutorials/helloworld/tutorial1.qml b/examples/quick/tutorials/helloworld/tutorial1.qml
index 73cdd7911b..c67bc75562 100644
--- a/examples/quick/tutorials/helloworld/tutorial1.qml
+++ b/examples/quick/tutorials/helloworld/tutorial1.qml
@@ -1,56 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//![0]
//![3]
-import QtQuick 2.0
+import QtQuick
//![3]
//![1]
diff --git a/examples/quick/tutorials/helloworld/tutorial2.qml b/examples/quick/tutorials/helloworld/tutorial2.qml
index 8b13b28c58..8b1c632b99 100644
--- a/examples/quick/tutorials/helloworld/tutorial2.qml
+++ b/examples/quick/tutorials/helloworld/tutorial2.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//![0]
-import QtQuick 2.0
+import QtQuick
Rectangle {
id: page
diff --git a/examples/quick/tutorials/helloworld/tutorial3.qml b/examples/quick/tutorials/helloworld/tutorial3.qml
index 8c40b40e1a..73833d2a67 100644
--- a/examples/quick/tutorials/helloworld/tutorial3.qml
+++ b/examples/quick/tutorials/helloworld/tutorial3.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//![0]
-import QtQuick 2.0
+import QtQuick
Rectangle {
id: page
@@ -70,7 +23,13 @@ Rectangle {
//![2]
states: State {
name: "down"; when: mouseArea.pressed == true
- PropertyChanges { target: helloText; y: 160; rotation: 180; color: "red" }
+ PropertyChanges {
+ helloText {
+ y: 160
+ rotation: 180
+ color: "red"
+ }
+ }
}
//![2]
diff --git a/examples/quick/tutorials/samegame/CMakeLists.txt b/examples/quick/tutorials/samegame/CMakeLists.txt
new file mode 100644
index 0000000000..4582f44309
--- /dev/null
+++ b/examples/quick/tutorials/samegame/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+qt_internal_add_example(samegame1)
+qt_internal_add_example(samegame2)
+qt_internal_add_example(samegame3)
+qt_internal_add_example(samegame4)
diff --git a/examples/quick/tutorials/samegame/samegame1/Block.qml b/examples/quick/tutorials/samegame/samegame1/Block.qml
index eac8e93810..c10f0c4825 100644
--- a/examples/quick/tutorials/samegame/samegame1/Block.qml
+++ b/examples/quick/tutorials/samegame/samegame1/Block.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//![0]
-import QtQuick 2.0
+import QtQuick
Item {
id: block
@@ -57,7 +10,7 @@ Item {
Image {
id: img
anchors.fill: parent
- source: "../shared/pics/redStone.png"
+ source: "pics/redStone.png"
}
}
//![0]
diff --git a/examples/quick/tutorials/samegame/samegame1/Button.qml b/examples/quick/tutorials/samegame/samegame1/Button.qml
index ddab89e56d..cc87465e3c 100644
--- a/examples/quick/tutorials/samegame/samegame1/Button.qml
+++ b/examples/quick/tutorials/samegame/samegame1/Button.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//![0]
-import QtQuick 2.0
+import QtQuick
Rectangle {
id: container
diff --git a/examples/quick/tutorials/samegame/samegame1/CMakeLists.txt b/examples/quick/tutorials/samegame/samegame1/CMakeLists.txt
new file mode 100644
index 0000000000..0ce11660a8
--- /dev/null
+++ b/examples/quick/tutorials/samegame/samegame1/CMakeLists.txt
@@ -0,0 +1,53 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(samegame1 LANGUAGES CXX)
+
+set(CMAKE_AUTOMOC ON)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
+
+qt_standard_project_setup(REQUIRES 6.5)
+
+qt_add_executable(samegame1
+ main.cpp
+)
+
+set_target_properties(samegame1 PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+
+qt_add_qml_module(samegame1
+ URI samegame
+ QML_FILES
+ "Block.qml"
+ "Button.qml"
+ "samegame.qml"
+ RESOURCES
+ "pics/background.jpg"
+ "pics/redStone.png"
+)
+
+target_link_libraries(samegame1 PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
+
+install(TARGETS samegame1
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET samegame1
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/tutorials/samegame/samegame1/main.cpp b/examples/quick/tutorials/samegame/samegame1/main.cpp
index 7589b92906..164b47aebd 100644
--- a/examples/quick/tutorials/samegame/samegame1/main.cpp
+++ b/examples/quick/tutorials/samegame/samegame1/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(samegame)
+DECLARATIVE_EXAMPLE_MAIN(samegame/samegame)
diff --git a/examples/quick/tutorials/samegame/shared/pics/background.jpg b/examples/quick/tutorials/samegame/samegame1/pics/background.jpg
index 903d395c8d..903d395c8d 100644
--- a/examples/quick/tutorials/samegame/shared/pics/background.jpg
+++ b/examples/quick/tutorials/samegame/samegame1/pics/background.jpg
Binary files differ
diff --git a/examples/quick/tutorials/samegame/shared/pics/redStone.png b/examples/quick/tutorials/samegame/samegame1/pics/redStone.png
index 36b09a2686..36b09a2686 100644
--- a/examples/quick/tutorials/samegame/shared/pics/redStone.png
+++ b/examples/quick/tutorials/samegame/samegame1/pics/redStone.png
Binary files differ
diff --git a/examples/quick/tutorials/samegame/samegame1/samegame.qml b/examples/quick/tutorials/samegame/samegame1/samegame.qml
index 68a1921da7..fe21acae99 100644
--- a/examples/quick/tutorials/samegame/samegame1/samegame.qml
+++ b/examples/quick/tutorials/samegame/samegame1/samegame.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//![0]
-import QtQuick 2.0
+import QtQuick
Rectangle {
id: screen
@@ -65,7 +18,7 @@ Rectangle {
Image {
id: background
anchors.fill: parent
- source: "../shared/pics/background.jpg"
+ source: "pics/background.jpg"
fillMode: Image.PreserveAspectCrop
}
}
diff --git a/examples/quick/tutorials/samegame/samegame1/samegame1.pro b/examples/quick/tutorials/samegame/samegame1/samegame1.pro
index 9f316b6868..d523857d64 100644
--- a/examples/quick/tutorials/samegame/samegame1/samegame1.pro
+++ b/examples/quick/tutorials/samegame/samegame1/samegame1.pro
@@ -2,10 +2,7 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-
-RESOURCES += \
- samegame1.qrc \
- ../shared/pics/shared.qrc
+RESOURCES += samegame1.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/quick/tutorials/samegame/samegame1
INSTALLS += target
diff --git a/examples/quick/tutorials/samegame/samegame1/samegame1.qrc b/examples/quick/tutorials/samegame/samegame1/samegame1.qrc
index 866cf899bf..47d37fccc5 100644
--- a/examples/quick/tutorials/samegame/samegame1/samegame1.qrc
+++ b/examples/quick/tutorials/samegame/samegame1/samegame1.qrc
@@ -1,7 +1,9 @@
<RCC>
- <qresource prefix="/">
+ <qresource prefix="/qt/qml/samegame">
<file>Button.qml</file>
<file>Block.qml</file>
<file>samegame.qml</file>
+ <file>pics/background.jpg</file>
+ <file>pics/redStone.png</file>
</qresource>
</RCC>
diff --git a/examples/quick/tutorials/samegame/samegame2/Block.qml b/examples/quick/tutorials/samegame/samegame2/Block.qml
index 12cc0ea043..b0416f0e15 100644
--- a/examples/quick/tutorials/samegame/samegame2/Block.qml
+++ b/examples/quick/tutorials/samegame/samegame2/Block.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
Item {
id: block
@@ -56,6 +9,6 @@ Item {
Image {
id: img
anchors.fill: parent
- source: "../shared/pics/redStone.png"
+ source: "pics/redStone.png"
}
}
diff --git a/examples/quick/tutorials/samegame/samegame2/Button.qml b/examples/quick/tutorials/samegame/samegame2/Button.qml
index 77921772d2..1a365e6dd9 100644
--- a/examples/quick/tutorials/samegame/samegame2/Button.qml
+++ b/examples/quick/tutorials/samegame/samegame2/Button.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
Rectangle {
id: container
diff --git a/examples/quick/tutorials/samegame/samegame2/CMakeLists.txt b/examples/quick/tutorials/samegame/samegame2/CMakeLists.txt
new file mode 100644
index 0000000000..3fe42e4cd4
--- /dev/null
+++ b/examples/quick/tutorials/samegame/samegame2/CMakeLists.txt
@@ -0,0 +1,54 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(samegame2 LANGUAGES CXX)
+
+set(CMAKE_AUTOMOC ON)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
+
+qt_standard_project_setup(REQUIRES 6.5)
+
+qt_add_executable(samegame2
+ main.cpp
+)
+
+set_target_properties(samegame2 PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+
+qt_add_qml_module(samegame2
+ URI samegame
+ QML_FILES
+ "Block.qml"
+ "Button.qml"
+ "samegame.qml"
+ "samegame.js"
+ RESOURCES
+ "pics/background.jpg"
+ "pics/redStone.png"
+)
+
+target_link_libraries(samegame2 PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
+
+install(TARGETS samegame2
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET samegame2
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/tutorials/samegame/samegame2/main.cpp b/examples/quick/tutorials/samegame/samegame2/main.cpp
index 7589b92906..164b47aebd 100644
--- a/examples/quick/tutorials/samegame/samegame2/main.cpp
+++ b/examples/quick/tutorials/samegame/samegame2/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(samegame)
+DECLARATIVE_EXAMPLE_MAIN(samegame/samegame)
diff --git a/examples/quick/tutorials/samegame/samegame2/pics/background.jpg b/examples/quick/tutorials/samegame/samegame2/pics/background.jpg
new file mode 100644
index 0000000000..903d395c8d
--- /dev/null
+++ b/examples/quick/tutorials/samegame/samegame2/pics/background.jpg
Binary files differ
diff --git a/examples/quick/tutorials/samegame/samegame2/pics/redStone.png b/examples/quick/tutorials/samegame/samegame2/pics/redStone.png
new file mode 100644
index 0000000000..36b09a2686
--- /dev/null
+++ b/examples/quick/tutorials/samegame/samegame2/pics/redStone.png
Binary files differ
diff --git a/examples/quick/tutorials/samegame/samegame2/samegame.qml b/examples/quick/tutorials/samegame/samegame2/samegame.qml
index 2c68fcf155..642a474ebd 100644
--- a/examples/quick/tutorials/samegame/samegame2/samegame.qml
+++ b/examples/quick/tutorials/samegame/samegame2/samegame.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
//![2]
import "samegame.js" as SameGame
//![2]
@@ -67,7 +20,7 @@ Rectangle {
Image {
id: background
anchors.fill: parent
- source: "../shared/pics/background.jpg"
+ source: "pics/background.jpg"
fillMode: Image.PreserveAspectCrop
}
}
diff --git a/examples/quick/tutorials/samegame/samegame2/samegame2.pro b/examples/quick/tutorials/samegame/samegame2/samegame2.pro
index 5ede9042cc..a0fc36e857 100644
--- a/examples/quick/tutorials/samegame/samegame2/samegame2.pro
+++ b/examples/quick/tutorials/samegame/samegame2/samegame2.pro
@@ -2,10 +2,7 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-
-RESOURCES += \
- samegame2.qrc \
- ../shared/pics/shared.qrc
+RESOURCES += samegame2.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/quick/tutorials/samegame/samegame2
INSTALLS += target
diff --git a/examples/quick/tutorials/samegame/samegame2/samegame2.qrc b/examples/quick/tutorials/samegame/samegame2/samegame2.qrc
index 0f95174d83..50ed4cf815 100644
--- a/examples/quick/tutorials/samegame/samegame2/samegame2.qrc
+++ b/examples/quick/tutorials/samegame/samegame2/samegame2.qrc
@@ -1,8 +1,10 @@
<RCC>
- <qresource prefix="/">
+ <qresource prefix="/qt/qml/samegame">
<file>Button.qml</file>
<file>Block.qml</file>
<file>samegame.qml</file>
<file>samegame.js</file>
+ <file>pics/background.jpg</file>
+ <file>pics/redStone.png</file>
</qresource>
</RCC>
diff --git a/examples/quick/tutorials/samegame/samegame3/Block.qml b/examples/quick/tutorials/samegame/samegame3/Block.qml
index d49bf89727..71d25c19db 100644
--- a/examples/quick/tutorials/samegame/samegame3/Block.qml
+++ b/examples/quick/tutorials/samegame/samegame3/Block.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//![0]
-import QtQuick 2.0
+import QtQuick
Item {
id: block
@@ -62,11 +15,11 @@ Item {
anchors.fill: parent
source: {
if (type == 0)
- return "../shared/pics/redStone.png";
+ return "pics/redStone.png";
else if (type == 1)
- return "../shared/pics/blueStone.png";
+ return "pics/blueStone.png";
else
- return "../shared/pics/greenStone.png";
+ return "pics/greenStone.png";
}
}
}
diff --git a/examples/quick/tutorials/samegame/samegame3/Button.qml b/examples/quick/tutorials/samegame/samegame3/Button.qml
index 77921772d2..1a365e6dd9 100644
--- a/examples/quick/tutorials/samegame/samegame3/Button.qml
+++ b/examples/quick/tutorials/samegame/samegame3/Button.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
Rectangle {
id: container
diff --git a/examples/quick/tutorials/samegame/samegame3/CMakeLists.txt b/examples/quick/tutorials/samegame/samegame3/CMakeLists.txt
new file mode 100644
index 0000000000..4bd5124fbe
--- /dev/null
+++ b/examples/quick/tutorials/samegame/samegame3/CMakeLists.txt
@@ -0,0 +1,57 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(samegame3 LANGUAGES CXX)
+
+set(CMAKE_AUTOMOC ON)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
+
+qt_standard_project_setup(REQUIRES 6.5)
+
+qt_add_executable(samegame3
+ main.cpp
+)
+
+set_target_properties(samegame3 PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+
+qt_add_qml_module(samegame3
+ URI samegame
+ QML_FILES
+ "Block.qml"
+ "Button.qml"
+ "Dialog.qml"
+ "samegame.qml"
+ "samegame.js"
+ RESOURCES
+ "pics/background.jpg"
+ "pics/blueStone.png"
+ "pics/greenStone.png"
+ "pics/redStone.png"
+)
+
+target_link_libraries(samegame3 PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
+
+install(TARGETS samegame3
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET samegame3
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/tutorials/samegame/samegame3/Dialog.qml b/examples/quick/tutorials/samegame/samegame3/Dialog.qml
index 94e708f9cf..3620da5799 100644
--- a/examples/quick/tutorials/samegame/samegame3/Dialog.qml
+++ b/examples/quick/tutorials/samegame/samegame3/Dialog.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//![0]
-import QtQuick 2.0
+import QtQuick
Rectangle {
id: container
diff --git a/examples/quick/tutorials/samegame/samegame3/main.cpp b/examples/quick/tutorials/samegame/samegame3/main.cpp
index 7589b92906..164b47aebd 100644
--- a/examples/quick/tutorials/samegame/samegame3/main.cpp
+++ b/examples/quick/tutorials/samegame/samegame3/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(samegame)
+DECLARATIVE_EXAMPLE_MAIN(samegame/samegame)
diff --git a/examples/quick/tutorials/samegame/samegame3/pics/background.jpg b/examples/quick/tutorials/samegame/samegame3/pics/background.jpg
new file mode 100644
index 0000000000..903d395c8d
--- /dev/null
+++ b/examples/quick/tutorials/samegame/samegame3/pics/background.jpg
Binary files differ
diff --git a/examples/quick/tutorials/samegame/shared/pics/blueStone.png b/examples/quick/tutorials/samegame/samegame3/pics/blueStone.png
index 20e43c75b6..20e43c75b6 100644
--- a/examples/quick/tutorials/samegame/shared/pics/blueStone.png
+++ b/examples/quick/tutorials/samegame/samegame3/pics/blueStone.png
Binary files differ
diff --git a/examples/quick/tutorials/samegame/shared/pics/greenStone.png b/examples/quick/tutorials/samegame/samegame3/pics/greenStone.png
index b568a1900c..b568a1900c 100644
--- a/examples/quick/tutorials/samegame/shared/pics/greenStone.png
+++ b/examples/quick/tutorials/samegame/samegame3/pics/greenStone.png
Binary files differ
diff --git a/examples/quick/tutorials/samegame/samegame3/pics/redStone.png b/examples/quick/tutorials/samegame/samegame3/pics/redStone.png
new file mode 100644
index 0000000000..36b09a2686
--- /dev/null
+++ b/examples/quick/tutorials/samegame/samegame3/pics/redStone.png
Binary files differ
diff --git a/examples/quick/tutorials/samegame/samegame3/samegame.qml b/examples/quick/tutorials/samegame/samegame3/samegame.qml
index 11376232a2..dadd089e24 100644
--- a/examples/quick/tutorials/samegame/samegame3/samegame.qml
+++ b/examples/quick/tutorials/samegame/samegame3/samegame.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//![0]
-import QtQuick 2.0
+import QtQuick
import "samegame.js" as SameGame
Rectangle {
@@ -66,7 +19,7 @@ Rectangle {
Image {
id: background
anchors.fill: parent
- source: "../shared/pics/background.jpg"
+ source: "pics/background.jpg"
fillMode: Image.PreserveAspectCrop
}
diff --git a/examples/quick/tutorials/samegame/samegame3/samegame3.pro b/examples/quick/tutorials/samegame/samegame3/samegame3.pro
index 7b99673e57..88f8f87699 100644
--- a/examples/quick/tutorials/samegame/samegame3/samegame3.pro
+++ b/examples/quick/tutorials/samegame/samegame3/samegame3.pro
@@ -2,10 +2,7 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-
-RESOURCES += \
- samegame3.qrc \
- ../shared/pics/shared.qrc
+RESOURCES += samegame3.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/quick/tutorials/samegame/samegame3
INSTALLS += target
diff --git a/examples/quick/tutorials/samegame/samegame3/samegame3.qrc b/examples/quick/tutorials/samegame/samegame3/samegame3.qrc
index 0f95174d83..11e4c66a56 100644
--- a/examples/quick/tutorials/samegame/samegame3/samegame3.qrc
+++ b/examples/quick/tutorials/samegame/samegame3/samegame3.qrc
@@ -1,8 +1,13 @@
<RCC>
- <qresource prefix="/">
+ <qresource prefix="/qt/qml/samegame">
<file>Button.qml</file>
<file>Block.qml</file>
+ <file>Dialog.qml</file>
<file>samegame.qml</file>
<file>samegame.js</file>
+ <file>pics/background.jpg</file>
+ <file>pics/blueStone.png</file>
+ <file>pics/greenStone.png</file>
+ <file>pics/redStone.png</file>
</qresource>
</RCC>
diff --git a/examples/quick/tutorials/samegame/samegame4/BoomBlock.qml b/examples/quick/tutorials/samegame/samegame4/BoomBlock.qml
new file mode 100644
index 0000000000..fa6b1d45a1
--- /dev/null
+++ b/examples/quick/tutorials/samegame/samegame4/BoomBlock.qml
@@ -0,0 +1,92 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Particles
+
+Item {
+ id: block
+
+ property int type: 0
+ property bool dying: false
+
+ //![1]
+ property bool spawned: false
+
+ Behavior on x {
+ enabled: block.spawned;
+ SpringAnimation{ spring: 2; damping: 0.2 }
+ }
+ Behavior on y {
+ SpringAnimation{ spring: 2; damping: 0.2 }
+ }
+ //![1]
+
+ //![2]
+ Image {
+ id: img
+
+ anchors.fill: parent
+ source: {
+ if (block.type == 0)
+ return "pics/redStone.png";
+ else if (block.type == 1)
+ return "pics/blueStone.png";
+ else
+ return "pics/greenStone.png";
+ }
+ opacity: 0
+
+ Behavior on opacity {
+ NumberAnimation { properties:"opacity"; duration: 200 }
+ }
+ }
+ //![2]
+
+ //![3]
+ ParticleSystem {
+ id: sys
+ anchors.centerIn: parent
+ ImageParticle {
+ // ![0]
+ source: {
+ if (block.type == 0)
+ return "pics/redStar.png";
+ else if (block.type == 1)
+ return "pics/blueStar.png";
+ else
+ return "pics/greenStar.png";
+ }
+ rotationVelocityVariation: 360
+ // ![0]
+ }
+
+ Emitter {
+ id: particles
+ anchors.centerIn: parent
+ emitRate: 0
+ lifeSpan: 700
+ velocity: AngleDirection {angleVariation: 360; magnitude: 80; magnitudeVariation: 40}
+ size: 16
+ }
+ }
+ //![3]
+
+ //![4]
+ states: [
+ State {
+ name: "AliveState"
+ when: block.spawned == true && block.dying == false
+ PropertyChanges { img.opacity: 1 }
+ },
+
+ State {
+ name: "DeathState"
+ when: block.dying == true
+ StateChangeScript { script: particles.burst(50); }
+ PropertyChanges { img.opacity: 0 }
+ StateChangeScript { script: block.destroy(1000); }
+ }
+ ]
+ //![4]
+}
diff --git a/examples/quick/tutorials/samegame/samegame4/Button.qml b/examples/quick/tutorials/samegame/samegame4/Button.qml
new file mode 100644
index 0000000000..1a365e6dd9
--- /dev/null
+++ b/examples/quick/tutorials/samegame/samegame4/Button.qml
@@ -0,0 +1,44 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Rectangle {
+ id: container
+
+ property string text: "Button"
+
+ signal clicked
+
+ width: buttonLabel.width + 20; height: buttonLabel.height + 5
+ border { width: 1; color: Qt.darker(activePalette.button) }
+ antialiasing: true
+ radius: 8
+
+ // color the button with a gradient
+ gradient: Gradient {
+ GradientStop {
+ position: 0.0
+ color: {
+ if (mouseArea.pressed)
+ return activePalette.dark
+ else
+ return activePalette.light
+ }
+ }
+ GradientStop { position: 1.0; color: activePalette.button }
+ }
+
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+ onClicked: container.clicked();
+ }
+
+ Text {
+ id: buttonLabel
+ anchors.centerIn: container
+ color: activePalette.buttonText
+ text: container.text
+ }
+}
diff --git a/examples/quick/tutorials/samegame/samegame4/CMakeLists.txt b/examples/quick/tutorials/samegame/samegame4/CMakeLists.txt
new file mode 100644
index 0000000000..7760ee1abf
--- /dev/null
+++ b/examples/quick/tutorials/samegame/samegame4/CMakeLists.txt
@@ -0,0 +1,64 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(samegame4 LANGUAGES CXX)
+
+set(CMAKE_AUTOMOC ON)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
+
+qt_standard_project_setup(REQUIRES 6.5)
+
+qt_add_executable(samegame4
+ main.cpp
+)
+
+set_target_properties(samegame4 PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+
+qt_add_qml_module(samegame4
+ URI samegame
+ QML_FILES
+ "BoomBlock.qml"
+ "Button.qml"
+ "Dialog.qml"
+ "samegame.qml"
+ "samegame.js"
+ RESOURCES
+ "highscores/README"
+ "highscores/score_data.xml"
+ "highscores/score_style.xsl"
+ "highscores/scores.php"
+ "pics/background.jpg"
+ "pics/blueStar.png"
+ "pics/blueStone.png"
+ "pics/greenStar.png"
+ "pics/greenStone.png"
+ "pics/redStar.png"
+ "pics/redStone.png"
+)
+
+target_link_libraries(samegame4 PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
+
+install(TARGETS samegame4
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET samegame4
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/tutorials/samegame/samegame4/Dialog.qml b/examples/quick/tutorials/samegame/samegame4/Dialog.qml
new file mode 100644
index 0000000000..3d3a04b66b
--- /dev/null
+++ b/examples/quick/tutorials/samegame/samegame4/Dialog.qml
@@ -0,0 +1,70 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+//![0]
+Rectangle {
+ id: container
+//![0]
+
+//![1]
+ property string inputText: textInput.text
+ signal closed
+
+ function show(text) {
+ dialogText.text = text;
+ container.opacity = 1;
+ textInput.opacity = 0;
+ }
+
+ function showWithInput(text) {
+ show(text);
+ textInput.opacity = 1;
+ textInput.focus = true;
+ textInput.text = ""
+ }
+
+ function hide() {
+ textInput.focus = false;
+ container.opacity = 0;
+ container.closed();
+ }
+//![1]
+
+ width: dialogText.width + textInput.width + 20
+ height: dialogText.height + 20
+ opacity: 0
+ visible: opacity > 0
+
+ Text {
+ id: dialogText
+ anchors { verticalCenter: parent.verticalCenter; left: parent.left; leftMargin: 10 }
+ text: ""
+ }
+
+//![2]
+ TextInput {
+ id: textInput
+ anchors { verticalCenter: parent.verticalCenter; left: dialogText.right }
+ width: 80
+ text: ""
+
+ onAccepted: container.hide() // close dialog when Enter is pressed
+ }
+//![2]
+
+ MouseArea {
+ anchors.fill: parent
+
+ onClicked: {
+ if (textInput.text == "" && textInput.opacity > 0)
+ Qt.inputMethod.show();
+ else
+ hide();
+ }
+ }
+
+//![3]
+}
+//![3]
diff --git a/examples/quick/tutorials/samegame/samegame4/content/BoomBlock.qml b/examples/quick/tutorials/samegame/samegame4/content/BoomBlock.qml
deleted file mode 100644
index 6ab2679744..0000000000
--- a/examples/quick/tutorials/samegame/samegame4/content/BoomBlock.qml
+++ /dev/null
@@ -1,139 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Item {
- id: block
-
- property int type: 0
- property bool dying: false
-
- //![1]
- property bool spawned: false
-
- Behavior on x {
- enabled: spawned;
- SpringAnimation{ spring: 2; damping: 0.2 }
- }
- Behavior on y {
- SpringAnimation{ spring: 2; damping: 0.2 }
- }
- //![1]
-
- //![2]
- Image {
- id: img
-
- anchors.fill: parent
- source: {
- if (type == 0)
- return "../../shared/pics/redStone.png";
- else if (type == 1)
- return "../../shared/pics/blueStone.png";
- else
- return "../../shared/pics/greenStone.png";
- }
- opacity: 0
-
- Behavior on opacity {
- NumberAnimation { properties:"opacity"; duration: 200 }
- }
- }
- //![2]
-
- //![3]
- ParticleSystem {
- id: sys
- anchors.centerIn: parent
- ImageParticle {
- // ![0]
- source: {
- if (type == 0)
- return "../../shared/pics/redStar.png";
- else if (type == 1)
- return "../../shared/pics/blueStar.png";
- else
- return "../../shared/pics/greenStar.png";
- }
- rotationVelocityVariation: 360
- // ![0]
- }
-
- Emitter {
- id: particles
- anchors.centerIn: parent
- emitRate: 0
- lifeSpan: 700
- velocity: AngleDirection {angleVariation: 360; magnitude: 80; magnitudeVariation: 40}
- size: 16
- }
- }
- //![3]
-
- //![4]
- states: [
- State {
- name: "AliveState"
- when: spawned == true && dying == false
- PropertyChanges { target: img; opacity: 1 }
- },
-
- State {
- name: "DeathState"
- when: dying == true
- StateChangeScript { script: particles.burst(50); }
- PropertyChanges { target: img; opacity: 0 }
- StateChangeScript { script: block.destroy(1000); }
- }
- ]
- //![4]
-}
diff --git a/examples/quick/tutorials/samegame/samegame4/content/Button.qml b/examples/quick/tutorials/samegame/samegame4/content/Button.qml
deleted file mode 100644
index 77921772d2..0000000000
--- a/examples/quick/tutorials/samegame/samegame4/content/Button.qml
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Rectangle {
- id: container
-
- property string text: "Button"
-
- signal clicked
-
- width: buttonLabel.width + 20; height: buttonLabel.height + 5
- border { width: 1; color: Qt.darker(activePalette.button) }
- antialiasing: true
- radius: 8
-
- // color the button with a gradient
- gradient: Gradient {
- GradientStop {
- position: 0.0
- color: {
- if (mouseArea.pressed)
- return activePalette.dark
- else
- return activePalette.light
- }
- }
- GradientStop { position: 1.0; color: activePalette.button }
- }
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- onClicked: container.clicked();
- }
-
- Text {
- id: buttonLabel
- anchors.centerIn: container
- color: activePalette.buttonText
- text: container.text
- }
-}
diff --git a/examples/quick/tutorials/samegame/samegame4/content/Dialog.qml b/examples/quick/tutorials/samegame/samegame4/content/Dialog.qml
deleted file mode 100644
index 5663add8ad..0000000000
--- a/examples/quick/tutorials/samegame/samegame4/content/Dialog.qml
+++ /dev/null
@@ -1,117 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-//![0]
-Rectangle {
- id: container
-//![0]
-
-//![1]
- property string inputText: textInput.text
- signal closed
-
- function show(text) {
- dialogText.text = text;
- container.opacity = 1;
- textInput.opacity = 0;
- }
-
- function showWithInput(text) {
- show(text);
- textInput.opacity = 1;
- textInput.focus = true;
- textInput.text = ""
- }
-
- function hide() {
- textInput.focus = false;
- container.opacity = 0;
- container.closed();
- }
-//![1]
-
- width: dialogText.width + textInput.width + 20
- height: dialogText.height + 20
- opacity: 0
- visible: opacity > 0
-
- Text {
- id: dialogText
- anchors { verticalCenter: parent.verticalCenter; left: parent.left; leftMargin: 10 }
- text: ""
- }
-
-//![2]
- TextInput {
- id: textInput
- anchors { verticalCenter: parent.verticalCenter; left: dialogText.right }
- width: 80
- text: ""
-
- onAccepted: container.hide() // close dialog when Enter is pressed
- }
-//![2]
-
- MouseArea {
- anchors.fill: parent
-
- onClicked: {
- if (textInput.text == "" && textInput.opacity > 0)
- Qt.inputMethod.show();
- else
- hide();
- }
- }
-
-//![3]
-}
-//![3]
diff --git a/examples/quick/tutorials/samegame/samegame4/main.cpp b/examples/quick/tutorials/samegame/samegame4/main.cpp
index 7589b92906..164b47aebd 100644
--- a/examples/quick/tutorials/samegame/samegame4/main.cpp
+++ b/examples/quick/tutorials/samegame/samegame4/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(samegame)
+DECLARATIVE_EXAMPLE_MAIN(samegame/samegame)
diff --git a/examples/quick/tutorials/samegame/samegame4/pics/background.jpg b/examples/quick/tutorials/samegame/samegame4/pics/background.jpg
new file mode 100644
index 0000000000..903d395c8d
--- /dev/null
+++ b/examples/quick/tutorials/samegame/samegame4/pics/background.jpg
Binary files differ
diff --git a/examples/quick/tutorials/samegame/shared/pics/blueStar.png b/examples/quick/tutorials/samegame/samegame4/pics/blueStar.png
index 213bb4bf6c..213bb4bf6c 100644
--- a/examples/quick/tutorials/samegame/shared/pics/blueStar.png
+++ b/examples/quick/tutorials/samegame/samegame4/pics/blueStar.png
Binary files differ
diff --git a/examples/quick/tutorials/samegame/samegame4/pics/blueStone.png b/examples/quick/tutorials/samegame/samegame4/pics/blueStone.png
new file mode 100644
index 0000000000..20e43c75b6
--- /dev/null
+++ b/examples/quick/tutorials/samegame/samegame4/pics/blueStone.png
Binary files differ
diff --git a/examples/quick/tutorials/samegame/shared/pics/greenStar.png b/examples/quick/tutorials/samegame/samegame4/pics/greenStar.png
index 38429749b8..38429749b8 100644
--- a/examples/quick/tutorials/samegame/shared/pics/greenStar.png
+++ b/examples/quick/tutorials/samegame/samegame4/pics/greenStar.png
Binary files differ
diff --git a/examples/quick/tutorials/samegame/samegame4/pics/greenStone.png b/examples/quick/tutorials/samegame/samegame4/pics/greenStone.png
new file mode 100644
index 0000000000..b568a1900c
--- /dev/null
+++ b/examples/quick/tutorials/samegame/samegame4/pics/greenStone.png
Binary files differ
diff --git a/examples/quick/tutorials/samegame/shared/pics/redStar.png b/examples/quick/tutorials/samegame/samegame4/pics/redStar.png
index 5cdf45c4c0..5cdf45c4c0 100644
--- a/examples/quick/tutorials/samegame/shared/pics/redStar.png
+++ b/examples/quick/tutorials/samegame/samegame4/pics/redStar.png
Binary files differ
diff --git a/examples/quick/tutorials/samegame/samegame4/pics/redStone.png b/examples/quick/tutorials/samegame/samegame4/pics/redStone.png
new file mode 100644
index 0000000000..36b09a2686
--- /dev/null
+++ b/examples/quick/tutorials/samegame/samegame4/pics/redStone.png
Binary files differ
diff --git a/examples/quick/tutorials/samegame/samegame4/content/samegame.js b/examples/quick/tutorials/samegame/samegame4/samegame.js
index 80b175d450..99d34c64a0 100644
--- a/examples/quick/tutorials/samegame/samegame4/content/samegame.js
+++ b/examples/quick/tutorials/samegame/samegame4/samegame.js
@@ -27,10 +27,6 @@ function startNewGame() {
maxRow = Math.floor(gameCanvas.height / gameCanvas.blockSize);
maxIndex = maxRow * maxColumn;
- //Close dialogs
- nameInputDialog.hide();
- dialog.hide();
-
//Initialize Board
board = new Array(maxIndex);
gameCanvas.score = 0;
@@ -41,6 +37,10 @@ function startNewGame() {
}
}
+ //Close dialogs
+ nameInputDialog.hide();
+ dialog.hide();
+
gameDuration = new Date();
}
@@ -191,6 +191,9 @@ function floodMoveCheck(column, row, type) {
//![2]
function saveHighScore(name) {
+ if (gameCanvas.score == 0)
+ return;
+
if (scoresURL != "")
sendHighScore(name);
diff --git a/examples/quick/tutorials/samegame/samegame4/samegame.qml b/examples/quick/tutorials/samegame/samegame4/samegame.qml
index 0cdbcd8cb0..b253e966f5 100644
--- a/examples/quick/tutorials/samegame/samegame4/samegame.qml
+++ b/examples/quick/tutorials/samegame/samegame4/samegame.qml
@@ -1,56 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import "content"
-import "content/samegame.js" as SameGame
+import QtQuick
+import "samegame.js" as SameGame
Rectangle {
id: screen
@@ -66,7 +18,7 @@ Rectangle {
Image {
id: background
anchors.fill: parent
- source: "../shared/pics/background.jpg"
+ source: "pics/background.jpg"
fillMode: Image.PreserveAspectCrop
}
diff --git a/examples/quick/tutorials/samegame/samegame4/samegame4.pro b/examples/quick/tutorials/samegame/samegame4/samegame4.pro
index 5da0d46e19..e9d341d555 100644
--- a/examples/quick/tutorials/samegame/samegame4/samegame4.pro
+++ b/examples/quick/tutorials/samegame/samegame4/samegame4.pro
@@ -2,10 +2,7 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-
-RESOURCES += \
- samegame4.qrc \
- ../shared/pics/shared.qrc
+RESOURCES += samegame4.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/quick/tutorials/samegame/samegame4
INSTALLS += target
diff --git a/examples/quick/tutorials/samegame/samegame4/samegame4.qrc b/examples/quick/tutorials/samegame/samegame4/samegame4.qrc
index 8b130721f5..44c5fbbaf3 100644
--- a/examples/quick/tutorials/samegame/samegame4/samegame4.qrc
+++ b/examples/quick/tutorials/samegame/samegame4/samegame4.qrc
@@ -1,13 +1,20 @@
<RCC>
- <qresource prefix="/">
+ <qresource prefix="/qt/qml/samegame">
<file>samegame.qml</file>
- <file>content/BoomBlock.qml</file>
- <file>content/Button.qml</file>
- <file>content/Dialog.qml</file>
- <file>content/samegame.js</file>
+ <file>BoomBlock.qml</file>
+ <file>Button.qml</file>
+ <file>Dialog.qml</file>
+ <file>samegame.js</file>
<file>highscores/README</file>
<file>highscores/score_data.xml</file>
<file>highscores/score_style.xsl</file>
<file>highscores/scores.php</file>
+ <file>pics/background.jpg</file>
+ <file>pics/blueStar.png</file>
+ <file>pics/blueStone.png</file>
+ <file>pics/greenStar.png</file>
+ <file>pics/greenStone.png</file>
+ <file>pics/redStar.png</file>
+ <file>pics/redStone.png</file>
</qresource>
</RCC>
diff --git a/examples/quick/tutorials/samegame/shared/pics/shared.qrc b/examples/quick/tutorials/samegame/shared/pics/shared.qrc
deleted file mode 100644
index 8982a9face..0000000000
--- a/examples/quick/tutorials/samegame/shared/pics/shared.qrc
+++ /dev/null
@@ -1,13 +0,0 @@
-<RCC>
- <qresource prefix="/shared/pics">
- <file>background.jpg</file>
- <file>blueStar.png</file>
- <file>blueStone.png</file>
- <file>greenStar.png</file>
- <file>greenStone.png</file>
- <file>redStar.png</file>
- <file>redStone.png</file>
- <file>star.png</file>
- <file>yellowStone.png</file>
- </qresource>
-</RCC>
diff --git a/examples/quick/tutorials/samegame/shared/pics/star.png b/examples/quick/tutorials/samegame/shared/pics/star.png
deleted file mode 100644
index defbde53ca..0000000000
--- a/examples/quick/tutorials/samegame/shared/pics/star.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/tutorials/samegame/shared/pics/yellowStone.png b/examples/quick/tutorials/samegame/shared/pics/yellowStone.png
deleted file mode 100644
index b1ce76212c..0000000000
--- a/examples/quick/tutorials/samegame/shared/pics/yellowStone.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/views/CMakeLists.txt b/examples/quick/views/CMakeLists.txt
index 9951bd48ff..6800983c6e 100644
--- a/examples/quick/views/CMakeLists.txt
+++ b/examples/quick/views/CMakeLists.txt
@@ -1,170 +1,94 @@
-# Generated from views.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(views LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/views")
+qt_standard_project_setup(REQUIRES 6.5)
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
+add_subdirectory("../shared" "shared")
-qt_add_executable(views
+qt_add_executable(viewsexample
+ WIN32
+ MACOSX_BUNDLE
main.cpp
)
-set_target_properties(views PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(views PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-# Resources:
-set(views_resource_files
- "delegatemodel/dragselection.qml"
- "delegatemodel/slideshow.qml"
- "gridview/gridview-example.qml"
- "gridview/pics/AddressBook_48.png"
- "gridview/pics/AudioPlayer_48.png"
- "gridview/pics/Camera_48.png"
- "gridview/pics/DateBook_48.png"
- "gridview/pics/EMail_48.png"
- "gridview/pics/TodoList_48.png"
- "gridview/pics/VideoPlayer_48.png"
- "listview/content/PetsModel.qml"
- "listview/content/PressAndHoldButton.qml"
- "listview/content/RecipesModel.qml"
- "listview/content/SmallText.qml"
- "listview/content/TextButton.qml"
- "listview/content/ToggleButton.qml"
- "listview/content/pics/arrow-down.png"
- "listview/content/pics/arrow-up.png"
- "listview/content/pics/fruit-salad.jpg"
- "listview/content/pics/hamburger.jpg"
- "listview/content/pics/lemonade.jpg"
- "listview/content/pics/list-delete.png"
- "listview/content/pics/minus-sign.png"
- "listview/content/pics/moreDown.png"
- "listview/content/pics/moreUp.png"
- "listview/content/pics/pancakes.jpg"
- "listview/content/pics/plus-sign.png"
- "listview/content/pics/vegetable-soup.jpg"
- "listview/displaymargin.qml"
- "listview/dynamiclist.qml"
- "listview/expandingdelegates.qml"
- "listview/highlight.qml"
- "listview/highlightranges.qml"
- "listview/sections.qml"
- "objectmodel/objectmodel.qml"
- "package/Delegate.qml"
- "package/view.qml"
- "pathview/pathview-example.qml"
- "pathview/pics/AddressBook_48.png"
- "pathview/pics/AudioPlayer_48.png"
- "pathview/pics/Camera_48.png"
- "pathview/pics/DateBook_48.png"
- "pathview/pics/EMail_48.png"
- "pathview/pics/TodoList_48.png"
- "pathview/pics/VideoPlayer_48.png"
- "views.qml"
+target_link_libraries(viewsexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
-qt6_add_resources(views "views"
- PREFIX
- "/views"
- FILES
- ${views_resource_files}
-)
-set_source_files_properties("../shared/Button.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Button.qml"
-)
-set_source_files_properties("../shared/CheckBox.qml"
- PROPERTIES QT_RESOURCE_ALIAS "CheckBox.qml"
-)
-set_source_files_properties("../shared/FlickrRssModel.qml"
- PROPERTIES QT_RESOURCE_ALIAS "FlickrRssModel.qml"
-)
-set_source_files_properties("../shared/Label.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Label.qml"
-)
-set_source_files_properties("../shared/LauncherList.qml"
- PROPERTIES QT_RESOURCE_ALIAS "LauncherList.qml"
-)
-set_source_files_properties("../shared/SimpleLauncherDelegate.qml"
- PROPERTIES QT_RESOURCE_ALIAS "SimpleLauncherDelegate.qml"
-)
-set_source_files_properties("../shared/Slider.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Slider.qml"
-)
-set_source_files_properties("../shared/TabSet.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TabSet.qml"
-)
-set_source_files_properties("../shared/TextField.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TextField.qml"
-)
-set_source_files_properties("../shared/images/back.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/back.png"
-)
-set_source_files_properties("../shared/images/checkmark.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/checkmark.png"
-)
-set_source_files_properties("../shared/images/next.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/next.png"
-)
-set_source_files_properties("../shared/images/qt-logo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/qt-logo.png"
-)
-set_source_files_properties("../shared/images/slider_handle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/slider_handle.png"
-)
-set_source_files_properties("../shared/images/tab.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/tab.png"
-)
-set(shared_resource_files
- "Button.qml"
- "CheckBox.qml"
- "FlickrRssModel.qml"
- "Label.qml"
- "LauncherList.qml"
- "SimpleLauncherDelegate.qml"
- "Slider.qml"
- "TabSet.qml"
- "TextField.qml"
- "images/back.png"
- "images/checkmark.png"
- "images/next.png"
- "images/qt-logo.png"
- "images/slider_handle.png"
- "images/tab.png"
-)
+add_dependencies(viewsexample views_shared)
-qt6_add_resources(views "shared"
- PREFIX
- "/shared"
- BASE
- "../shared"
- FILES
- ${shared_resource_files}
+qt_add_qml_module(viewsexample
+ URI views
+ QML_FILES
+ "delegatemodel/dragselection.qml"
+ "gridview/gridview-example.qml"
+ "listview/content/PetsModel.qml"
+ "listview/content/PressAndHoldButton.qml"
+ "listview/content/RecipesModel.qml"
+ "listview/content/SmallText.qml"
+ "listview/content/TextButton.qml"
+ "listview/content/ToggleButton.qml"
+ "listview/displaymargin.qml"
+ "listview/dynamiclist.qml"
+ "listview/expandingdelegates.qml"
+ "listview/highlight.qml"
+ "listview/highlightranges.qml"
+ "listview/sections.qml"
+ "objectmodel/objectmodel.qml"
+ "package/Delegate.qml"
+ "package/view.qml"
+ "pathview/pathview-example.qml"
+ "views.qml"
+ RESOURCES
+ "gridview/pics/AddressBook_48.png"
+ "gridview/pics/AudioPlayer_48.png"
+ "gridview/pics/Camera_48.png"
+ "gridview/pics/DateBook_48.png"
+ "gridview/pics/EMail_48.png"
+ "gridview/pics/TodoList_48.png"
+ "gridview/pics/VideoPlayer_48.png"
+ "listview/content/pics/arrow-down.png"
+ "listview/content/pics/arrow-up.png"
+ "listview/content/pics/fruit-salad.jpg"
+ "listview/content/pics/hamburger.jpg"
+ "listview/content/pics/lemonade.jpg"
+ "listview/content/pics/list-delete.png"
+ "listview/content/pics/minus-sign.png"
+ "listview/content/pics/moreDown.png"
+ "listview/content/pics/moreUp.png"
+ "listview/content/pics/pancakes.jpg"
+ "listview/content/pics/plus-sign.png"
+ "listview/content/pics/vegetable-soup.jpg"
+ "pathview/pics/AddressBook_48.png"
+ "pathview/pics/AudioPlayer_48.png"
+ "pathview/pics/Camera_48.png"
+ "pathview/pics/DateBook_48.png"
+ "pathview/pics/EMail_48.png"
+ "pathview/pics/TodoList_48.png"
+ "pathview/pics/VideoPlayer_48.png"
)
-install(TARGETS views
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+install(TARGETS viewsexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
+
+qt_generate_deploy_qml_app_script(
+ TARGET viewsexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/views/delegatemodel/delegatemodel.qmlproject b/examples/quick/views/delegatemodel/delegatemodel.qmlproject
deleted file mode 100644
index 2bb4016996..0000000000
--- a/examples/quick/views/delegatemodel/delegatemodel.qmlproject
+++ /dev/null
@@ -1,14 +0,0 @@
-import QmlProject 1.0
-
-Project {
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/quick/views/delegatemodel/dragselection.qml b/examples/quick/views/delegatemodel/dragselection.qml
index f9a0d37311..57a769fb29 100644
--- a/examples/quick/views/delegatemodel/dragselection.qml
+++ b/examples/quick/views/delegatemodel/dragselection.qml
@@ -1,56 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQml 2.0
-import QtQuick 2.0
-import QtQml.Models 2.1
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQml
+import QtQuick
+import QtQml.Models
+
+pragma ComponentBehavior: Bound
Item {
id: root
@@ -62,6 +17,7 @@ Item {
Component {
id: packageDelegate
+//![0]
Package {
id: packageRoot
@@ -80,19 +36,39 @@ Item {
Item {
id: draggable
+ Drag.active: visibleContainer.drag.active
+//![0]
+
width: 64
height: 64
- Drag.active: visibleContainer.drag.active
-
- anchors { horizontalCenter: parent.horizontalCenter; verticalCenter: parent.verticalCenter }
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ verticalCenter: parent.verticalCenter
+ }
states: State {
when: visibleContainer.drag.active
- AnchorChanges { target: draggable; anchors { horizontalCenter: undefined; verticalCenter: undefined} }
- ParentChange { target: selectionView; parent: draggable; x: 0; y: 0 }
- PropertyChanges { target: root; dragging: true }
- ParentChange { target: draggable; parent: root }
+ AnchorChanges {
+ target: draggable
+ anchors {
+ horizontalCenter: undefined
+ verticalCenter: undefined
+ }
+ }
+ ParentChange {
+ target: selectionView
+ parent: draggable
+ x: 0
+ y: 0
+ }
+ PropertyChanges {
+ root.dragging: true
+ }
+ ParentChange {
+ target: draggable
+ parent: root
+ }
}
}
DropArea {
@@ -119,8 +95,16 @@ Item {
radius: 8
gradient: Gradient {
- GradientStop { id: gradientStart; position: 0.0; color: "#8AC953" }
- GradientStop { id: gradientEnd; position: 1.0; color: "#8BC953" }
+ GradientStop {
+ id: gradientStart
+ position: 0.0
+ color: "#8AC953"
+ }
+ GradientStop {
+ id: gradientEnd
+ position: 1.0
+ color: "#8BC953"
+ }
}
border.width: 2
@@ -138,8 +122,13 @@ Item {
}
Rectangle {
- anchors { right: parent.right; top: parent.top; margins: 3 }
- width: 12; height: 12
+ anchors {
+ right: parent.right
+ top: parent.top
+ margins: 3
+ }
+ width: 12
+ height: 12
color: packageRoot.DelegateModel.inSelected ? "black" : "white"
radius: 6
@@ -155,25 +144,55 @@ Item {
states: [
State {
name: "selected"
- ParentChange { target: content; parent: selectionContainer; x: 3; y: 3 }
- PropertyChanges { target: packageRoot; DelegateModel.inItems: visibleContainer.drag.active }
- PropertyChanges { target: gradientStart; color: "#017423" }
- PropertyChanges { target: gradientStart; color: "#007423" }
+ ParentChange {
+ target: content
+ parent: selectionContainer
+ x: 3
+ y: 3
+ }
+ PropertyChanges {
+ packageRoot.DelegateModel.inItems: visibleContainer.drag.active
+ gradientStart.color: "#017423"
+ }
+ PropertyChanges {
+ gradientStart.color: "#007423"
+ }
}, State {
name: "visible"
- PropertyChanges { target: packageRoot; DelegateModel.inItems: true }
- ParentChange { target: content; parent: visibleContainer; x: 3; y: 3 }
- PropertyChanges { target: gradientStart; color: "#8AC953" }
- PropertyChanges { target: gradientStart; color: "#8BC953" }
+ PropertyChanges {
+ packageRoot.DelegateModel.inItems: true
+ }
+ ParentChange {
+ target: content
+ parent: visibleContainer
+ x: 3
+ y: 3
+ }
+ PropertyChanges {
+ gradientStart.color: "#8AC953"
+ }
+ PropertyChanges {
+ gradientStart.color: "#8BC953"
+ }
}
]
transitions: Transition {
- PropertyAction { target: packageRoot; properties: "DelegateModel.inItems" }
+ PropertyAction {
+ target: packageRoot
+ properties: "DelegateModel.inItems"
+ }
ParentAnimation {
target: content
- NumberAnimation { target: content; properties: "x,y"; duration: 500 }
+ NumberAnimation {
+ target: content
+ properties: "x,y"
+ duration: 500
+ }
+ }
+ ColorAnimation {
+ targets: [gradientStart, gradientEnd]
+ duration: 500
}
- ColorAnimation { targets: [gradientStart, gradientEnd]; duration: 500 }
}
}
}
@@ -184,7 +203,10 @@ Item {
model: 35
delegate: packageDelegate
- groups: DelegateModelGroup { id: selectedItems; name: "selected" }
+ groups: DelegateModelGroup {
+ id: selectedItems
+ name: "selected"
+ }
Component.onCompleted: parts.selection.filterOnGroup = "selected"
}
@@ -200,13 +222,16 @@ Item {
path: Path {
startX: 0
startY: 0
- PathLine { x: 64; y: 64 }
+ PathLine {
+ x: 64
+ y: 64
+ }
}
}
GridView {
id: itemsView
- anchors { fill: parent }
+ anchors.fill: parent
cellWidth: 64
cellHeight: 64
model: visualModel.parts.visible
diff --git a/examples/quick/views/delegatemodel/flipable.pro b/examples/quick/views/delegatemodel/flipable.pro
deleted file mode 100644
index ba00bf792c..0000000000
--- a/examples/quick/views/delegatemodel/flipable.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-TEMPLATE = app
-
-QT += quick qml
-SOURCES += main.cpp
-
-RESOURCES += flipable.qrc
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/flipable
-INSTALLS += target
diff --git a/examples/quick/views/delegatemodel/flipable.qrc b/examples/quick/views/delegatemodel/flipable.qrc
deleted file mode 100644
index 7918ccf00e..0000000000
--- a/examples/quick/views/delegatemodel/flipable.qrc
+++ /dev/null
@@ -1,9 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>flipable.qml</file>
- <file>content/5_heart.png</file>
- <file>content/9_club.png</file>
- <file>content/back.png</file>
- <file>content/Card.qml</file>
- </qresource>
-</RCC>
diff --git a/examples/quick/views/delegatemodel/main.cpp b/examples/quick/views/delegatemodel/main.cpp
deleted file mode 100644
index a0f0d67d45..0000000000
--- a/examples/quick/views/delegatemodel/main.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(flipable)
diff --git a/examples/quick/views/delegatemodel/slideshow.qml b/examples/quick/views/delegatemodel/slideshow.qml
deleted file mode 100644
index 638c8bf10f..0000000000
--- a/examples/quick/views/delegatemodel/slideshow.qml
+++ /dev/null
@@ -1,164 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtQml.Models 2.12
-import "../../shared" as Shared
-
-Rectangle {
- id: root
-
- property Item displayItem: null
-
- width: 300; height: 400
-
- color: "black"
-
- Shared.FlickrRssModel {
- id: flickrModel
- tags: "fjords,mountains"
- }
- DelegateModel {
- id: visualModel
-
- model: flickrModel
- delegate: Item {
- id: delegateItem
-
- width: 76; height: 76
-
- required property string thumbnail
-
- Rectangle {
- id: image
- x: 0; y: 0; width: 76; height: 76
- border.width: 1
- border.color: "white"
- color: "black"
-
- Image {
- anchors.fill: parent
- anchors.leftMargin: 1
- anchors.topMargin: 1
-
- source: delegateItem.thumbnail
- fillMode: Image.PreserveAspectFit
- }
-
- MouseArea {
- id: clickArea
- anchors.fill: parent
-
- onClicked: root.displayItem = root.displayItem !== delegateItem ? delegateItem : null
- }
-
- states: [
- State {
- when: root.displayItem === delegateItem
- name: "inDisplay";
- ParentChange { target: image; parent: imageContainer; x: 75; y: 75; width: 150; height: 150 }
- PropertyChanges { target: image; z: 2 }
- PropertyChanges { target: delegateItem; DelegateModel.inItems: false }
- },
- State {
- when: root.displayItem !== delegateItem
- name: "inList";
- ParentChange { target: image; parent: delegateItem; x: 2; y: 2; width: 75; height: 75 }
- PropertyChanges { target: image; z: 1 }
- PropertyChanges { target: delegateItem; DelegateModel.inItems: true }
- }
- ]
-
- transitions: [
- Transition {
- from: "inList"
- SequentialAnimation {
- PropertyAction { target: delegateItem; property: "DelegateModel.inPersistedItems"; value: true }
- ParentAnimation {
- target: image;
- via: root
- NumberAnimation { target: image; properties: "x,y,width,height"; duration: 1000 }
- }
- }
- }, Transition {
- from: "inDisplay"
- SequentialAnimation {
- ParentAnimation {
- target: image
- NumberAnimation { target: image; properties: "x,y,width,height"; duration: 1000 }
- }
- PropertyAction { target: delegateItem; property: "DelegateModel.inPersistedItems"; value: false }
- }
- }
- ]
- }
- }
- }
-
-
- PathView {
- id: imagePath
-
- anchors { left: parent.left; top: imageContainer.bottom; right: parent.right; bottom: parent.bottom }
- model: visualModel
-
- pathItemCount: 7
- path: Path {
- startX: -50; startY: 0
- PathQuad { x: 150; y: 50; controlX: 0; controlY: 50 }
- PathQuad { x: 350; y: 0; controlX: 300; controlY: 50 }
- }
- }
-
- Item {
- id: imageContainer
- anchors { fill: parent; bottomMargin: 100 }
- }
-}
diff --git a/examples/quick/views/doc/src/views.qdoc b/examples/quick/views/doc/src/views.qdoc
index 3e23f7657a..7e73ce31d7 100644
--- a/examples/quick/views/doc/src/views.qdoc
+++ b/examples/quick/views/doc/src/views.qdoc
@@ -1,29 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Qt Quick Examples - Views
@@ -31,6 +7,7 @@
\brief This is a collection of QML model-view examples.
\image qml-modelviews-example.png
\ingroup qtquickexamples
+ \examplecategory {Graphics}
\e Views is a collection of small QML examples relating to model and view
functionality. They demonstrate how to show data from a model using the
@@ -87,7 +64,7 @@
\section1 Using Packages
- \e Packages use the \l [QML]{Package} type to transition delegates between
+ \e Packages uses the \l [QML]{Package} type to transition delegates between
two views.
It has a Package object which defines delegate items for each view and an
@@ -100,6 +77,11 @@
\snippet views/package/view.qml 0
+ \e{Draggable Selections} demonstrates the use of Package to group together
+ multiple selected delegates for drag-and-drop within an item view.
+
+ \snippet views/delegatemodel/dragselection.qml 0
+
\section1 Using ObjectModel
\e ObjectModel uses an ObjectModel for the model instead of a \l ListModel.
diff --git a/examples/quick/views/gridview/gridview-example.qml b/examples/quick/views/gridview/gridview-example.qml
index 4cc30d3736..f340a97b4c 100644
--- a/examples/quick/views/gridview/gridview-example.qml
+++ b/examples/quick/views/gridview/gridview-example.qml
@@ -1,57 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
Rectangle {
- width: 300; height: 400
+ width: 300
+ height: 400
color: "white"
ListModel {
@@ -67,26 +21,36 @@ Rectangle {
//! [0]
GridView {
anchors.fill: parent
- cellWidth: 100; cellHeight: 100
+ cellWidth: 100
+ cellHeight: 100
focus: true
model: appModel
- highlight: Rectangle { width: 80; height: 80; color: "lightsteelblue" }
+ highlight: Rectangle {
+ width: 80
+ height: 80
+ color: "lightsteelblue"
+ }
delegate: Item {
required property string icon
required property string name
required property int index
- width: 100; height: 100
+ width: 100
+ height: 100
Image {
id: myIcon
- y: 20; anchors.horizontalCenter: parent.horizontalCenter
+ y: 20
+ anchors.horizontalCenter: parent.horizontalCenter
source: parent.icon
}
Text {
- anchors { top: myIcon.bottom; horizontalCenter: parent.horizontalCenter }
+ anchors {
+ top: myIcon.bottom
+ horizontalCenter: parent.horizontalCenter
+ }
text: parent.name
}
MouseArea {
diff --git a/examples/quick/views/listview/content/PetsModel.qml b/examples/quick/views/listview/content/PetsModel.qml
index bc8751f00a..acdab53c20 100644
--- a/examples/quick/views/listview/content/PetsModel.qml
+++ b/examples/quick/views/listview/content/PetsModel.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
ListModel {
ListElement {
diff --git a/examples/quick/views/listview/content/PressAndHoldButton.qml b/examples/quick/views/listview/content/PressAndHoldButton.qml
index 6d633c0264..51ab9435d2 100644
--- a/examples/quick/views/listview/content/PressAndHoldButton.qml
+++ b/examples/quick/views/listview/content/PressAndHoldButton.qml
@@ -1,61 +1,14 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
Image {
id: container
property int repeatDelay: 300
property int repeatDuration: 75
- property bool pressed: false
+ property bool pressed
signal clicked
diff --git a/examples/quick/views/listview/content/RecipesModel.qml b/examples/quick/views/listview/content/RecipesModel.qml
index 05f6d8a472..14b374a4c7 100644
--- a/examples/quick/views/listview/content/RecipesModel.qml
+++ b/examples/quick/views/listview/content/RecipesModel.qml
@@ -1,75 +1,28 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
ListModel {
ListElement {
title: "Pancakes"
picture: "content/pics/pancakes.jpg"
- ingredients: "<html>
+ ingredients: `<html>
<ul>
<li> 1 cup (150g) self-raising flour
<li> 1 tbs caster sugar
<li> 3/4 cup (185ml) milk
<li> 1 egg
</ul>
- </html>"
- method: "<html>
+ </html>`
+ method: `<html>
<ol>
<li> Sift flour and sugar together into a bowl. Add a pinch of salt.
<li> Beat milk and egg together, then add to dry ingredients. Beat until smooth.
<li> Pour mixture into a pan on medium heat and cook until bubbles appear on the surface.
<li> Turn over and cook other side until golden.
</ol>
- </html>"
+ </html>`
}
ListElement {
title: "Fruit Salad"
@@ -80,7 +33,7 @@ ListModel {
ListElement {
title: "Vegetable Soup"
picture: "content/pics/vegetable-soup.jpg"
- ingredients: "<html>
+ ingredients: `<html>
<ul>
<li> 1 onion
<li> 1 turnip
@@ -89,51 +42,51 @@ ListModel {
<li> 1 head of celery
<li> 1 1/2 litres of water
</ul>
- </html>"
- method: "<html>
+ </html>`
+ method: `<html>
<ol>
<li> Chop vegetables.
<li> Boil in water until vegetables soften.
<li> Season with salt and pepper to taste.
</ol>
- </html>"
+ </html>`
}
ListElement {
title: "Hamburger"
picture: "content/pics/hamburger.jpg"
- ingredients: "<html>
+ ingredients: `<html>
<ul>
<li> 500g minced beef
<li> Seasoning
<li> lettuce, tomato, onion, cheese
<li> 1 hamburger bun for each burger
</ul>
- </html>"
- method: "<html>
+ </html>`
+ method: `<html>
<ol>
<li> Mix the beef, together with seasoning, in a food processor.
<li> Shape the beef into burgers.
<li> Grill the burgers for about 5 mins on each side (until cooked through)
<li> Serve each burger on a bun with ketchup, cheese, lettuce, tomato and onion.
</ol>
- </html>"
+ </html>`
}
ListElement {
title: "Lemonade"
picture: "content/pics/lemonade.jpg"
- ingredients: "<html>
+ ingredients: `<html>
<ul>
<li> 1 cup Lemon Juice
<li> 1 cup Sugar
<li> 6 Cups of Water (2 cups warm water, 4 cups cold water)
</ul>
- </html>"
- method: "<html>
+ </html>`
+ method: `<html>
<ol>
<li> Pour 2 cups of warm water into a pitcher and stir in sugar until it dissolves.
<li> Pour in lemon juice, stir again, and add 4 cups of cold water.
<li> Chill or serve over ice cubes.
</ol>
- </html>"
+ </html>`
}
}
diff --git a/examples/quick/views/listview/content/SmallText.qml b/examples/quick/views/listview/content/SmallText.qml
index 21dc46d676..756610f4b3 100644
--- a/examples/quick/views/listview/content/SmallText.qml
+++ b/examples/quick/views/listview/content/SmallText.qml
@@ -1,56 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
Text {
- font.pixelSize: 12
+ font.pointSize: 9
}
diff --git a/examples/quick/views/listview/content/TextButton.qml b/examples/quick/views/listview/content/TextButton.qml
index ed95112d47..aef7aa79e0 100644
--- a/examples/quick/views/listview/content/TextButton.qml
+++ b/examples/quick/views/listview/content/TextButton.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
Rectangle {
id: container
@@ -80,7 +33,7 @@ Rectangle {
states: State {
name: "pressed"
when: mouseArea.pressed
- PropertyChanges { target: gradientStop; color: "#333333" }
+ PropertyChanges { gradientStop.color: "#333333" }
}
}
diff --git a/examples/quick/views/listview/content/ToggleButton.qml b/examples/quick/views/listview/content/ToggleButton.qml
index 890a94570b..19e2589f74 100644
--- a/examples/quick/views/listview/content/ToggleButton.qml
+++ b/examples/quick/views/listview/content/ToggleButton.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQml module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
Rectangle {
id: root
diff --git a/examples/quick/views/listview/displaymargin.qml b/examples/quick/views/listview/displaymargin.qml
index 19261caaa6..0030b82b55 100644
--- a/examples/quick/views/listview/displaymargin.qml
+++ b/examples/quick/views/listview/displaymargin.qml
@@ -1,53 +1,6 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-import QtQuick 2.3
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+import QtQuick
Item {
width: 480; height: 320
@@ -81,7 +34,8 @@ Item {
Rectangle {
id: header
- width: parent.width; height: 40
+ width: parent.width
+ height: 40
color: "#AAFF0000"
Text {
@@ -94,7 +48,8 @@ Item {
Rectangle {
id: footer
anchors.bottom: parent.bottom
- width: parent.width; height: 40
+ width: parent.width
+ height: 40
color: "#AAFF0000"
Text {
diff --git a/examples/quick/views/listview/dynamiclist.qml b/examples/quick/views/listview/dynamiclist.qml
index 973d3ce389..736088fbf7 100644
--- a/examples/quick/views/listview/dynamiclist.qml
+++ b/examples/quick/views/listview/dynamiclist.qml
@@ -1,61 +1,17 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-import QtQuick 2.0
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+import QtQuick
import "content"
// This example shows how items can be dynamically added to and removed from
// a ListModel, and how these list modifications can be animated.
+pragma ComponentBehavior: Bound
+
Rectangle {
id: container
- width: 500; height: 400
+ width: 500
+ height: 400
color: "#343434"
// The model:
@@ -63,30 +19,48 @@ Rectangle {
id: fruitModel
ListElement {
- name: "Apple"; cost: 2.45
+ name: "Apple"
+ cost: 2.45
attributes: [
- ListElement { description: "Core" },
- ListElement { description: "Deciduous" }
+ ListElement {
+ description: "Core"
+ },
+ ListElement {
+ description: "Deciduous"
+ }
]
}
ListElement {
- name: "Banana"; cost: 1.95
+ name: "Banana"
+ cost: 1.95
attributes: [
- ListElement { description: "Tropical" },
- ListElement { description: "Seedless" }
+ ListElement {
+ description: "Tropical"
+ },
+ ListElement {
+ description: "Seedless"
+ }
]
}
ListElement {
- name: "Cumquat"; cost: 3.25
+ name: "Kumquat"
+ cost: 3.25
attributes: [
- ListElement { description: "Citrus" }
+ ListElement {
+ description: "Citrus"
+ }
]
}
ListElement {
- name: "Durian"; cost: 9.95
+ name: "Durian"
+ cost: 9.95
attributes: [
- ListElement { description: "Tropical" },
- ListElement { description: "Smelly" }
+ ListElement {
+ description: "Tropical"
+ },
+ ListElement {
+ description: "Smelly"
+ }
]
}
}
@@ -98,7 +72,8 @@ Rectangle {
Item {
//! [0]
id: delegateItem
- width: listView.width; height: 80
+ width: listView.width
+ height: 80
clip: true
required property int index
@@ -130,7 +105,7 @@ Rectangle {
Column {
anchors {
left: arrows.right
- horizontalCenter: parent.horizontalCenter;
+ horizontalCenter: parent.horizontalCenter
bottom: parent.verticalCenter
}
@@ -202,18 +177,42 @@ Rectangle {
//! [1]
SequentialAnimation {
id: addAnimation
- PropertyAction { target: delegateItem; property: "height"; value: 0 }
- NumberAnimation { target: delegateItem; property: "height"; to: 80; duration: 250; easing.type: Easing.InOutQuad }
+ PropertyAction {
+ target: delegateItem
+ property: "height"
+ value: 0
+ }
+ NumberAnimation {
+ target: delegateItem
+ property: "height"
+ to: 80
+ duration: 250
+ easing.type: Easing.InOutQuad
+ }
}
ListView.onAdd: addAnimation.start()
SequentialAnimation {
id: removeAnimation
- PropertyAction { target: delegateItem; property: "ListView.delayRemove"; value: true }
- NumberAnimation { target: delegateItem; property: "height"; to: 0; duration: 250; easing.type: Easing.InOutQuad }
+ PropertyAction {
+ target: delegateItem
+ property: "ListView.delayRemove"
+ value: true
+ }
+ NumberAnimation {
+ target: delegateItem
+ property: "height"
+ to: 0
+ duration: 250
+ easing.type: Easing.InOutQuad
+ }
// Make sure delayRemove is set back to false so that the item can be destroyed
- PropertyAction { target: delegateItem; property: "ListView.delayRemove"; value: false }
+ PropertyAction {
+ target: delegateItem
+ property: "ListView.delayRemove"
+ value: false
+ }
}
ListView.onRemove: removeAnimation.start()
}
@@ -224,8 +223,10 @@ Rectangle {
ListView {
id: listView
anchors {
- left: parent.left; top: parent.top;
- right: parent.right; bottom: buttons.top;
+ left: parent.left
+ top: parent.top
+ right: parent.right
+ bottom: buttons.top
margins: 20
}
model: fruitModel
@@ -234,11 +235,15 @@ Rectangle {
Row {
id: buttons
- anchors { left: parent.left; bottom: parent.bottom; margins: 20 }
+ anchors {
+ left: parent.left
+ bottom: parent.bottom
+ margins: 20
+ }
spacing: 10
TextButton {
- text: "Add an item"
+ text: qsTr("Add an item")
onClicked: {
fruitModel.append({
"name": "Pizza Margarita",
@@ -249,7 +254,7 @@ Rectangle {
}
TextButton {
- text: "Remove all items"
+ text: qsTr("Remove all items")
onClicked: fruitModel.clear()
}
}
diff --git a/examples/quick/views/listview/expandingdelegates.qml b/examples/quick/views/listview/expandingdelegates.qml
index 6ed1d8c341..5c1811a00a 100644
--- a/examples/quick/views/listview/expandingdelegates.qml
+++ b/examples/quick/views/listview/expandingdelegates.qml
@@ -1,61 +1,15 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
import "content"
// This example illustrates expanding a list item to show a more detailed view.
Rectangle {
id: page
- width: 400; height: 240
+ width: 400
+ height: 240
color: "black"
// Delegate for the recipes. This delegate has two modes:
@@ -78,13 +32,16 @@ Rectangle {
// want to fade.
property real detailsOpacity : 0
//! [0]
- width: listView.width
+ width: ListView.view.width
height: 70
// A simple rounded rectangle for the background
Rectangle {
id: background
- x: 2; y: 2; width: parent.width - x*2; height: parent.height - y*2
+ x: 2
+ y: 2
+ width: parent.width - x * 2
+ height: parent.height - y * 2
color: "ivory"
border.color: "orange"
radius: 5
@@ -105,26 +62,32 @@ Rectangle {
Row {
id: topLayout
- x: 10; y: 10; height: recipeImage.height; width: parent.width
+ x: 10
+ y: 10
+ height: recipeImage.height
+ width: parent.width
spacing: 10
Image {
id: recipeImage
- width: 50; height: 50
+ width: 50
+ height: 50
source: recipe.picture
}
//! [1]
Column {
- width: background.width - recipeImage.width - 20; height: recipeImage.height
+ width: background.width - recipeImage.width - 20
+ height: recipeImage.height
spacing: 5
Text {
text: recipe.title
- font.bold: true; font.pointSize: 16
+ font.bold: true
+ font.pointSize: 16
}
SmallText {
- text: "Ingredients"
+ text: qsTr("Ingredients")
font.bold: true
opacity: recipe.detailsOpacity
}
@@ -141,22 +104,32 @@ Rectangle {
//! [2]
Item {
id: details
- x: 10; width: parent.width - 20
-
- anchors { top: topLayout.bottom; topMargin: 10; bottom: parent.bottom; bottomMargin: 10 }
+ x: 10
+ width: parent.width - 20
+
+ anchors {
+ top: topLayout.bottom
+ topMargin: 10
+ bottom: parent.bottom
+ bottomMargin: 10
+ }
opacity: recipe.detailsOpacity
//! [2]
SmallText {
id: methodTitle
anchors.top: parent.top
- text: "Method"
- font.pointSize: 12; font.bold: true
+ text: qsTr("Method")
+ font.pointSize: 12
+ font.bold: true
}
Flickable {
id: flick
width: parent.width
- anchors { top: methodTitle.bottom; bottom: parent.bottom }
+ anchors {
+ top: methodTitle.bottom
+ bottom: parent.bottom
+ }
contentHeight: methodText.height
clip: true
@@ -169,13 +142,19 @@ Rectangle {
}
Image {
- anchors { right: flick.right; top: flick.top }
+ anchors {
+ right: flick.right
+ top: flick.top
+ }
source: "content/pics/moreUp.png"
opacity: flick.atYBeginning ? 0 : 1
}
Image {
- anchors { right: flick.right; bottom: flick.bottom }
+ anchors {
+ right: flick.right
+ bottom: flick.bottom
+ }
source: "content/pics/moreDown.png"
opacity: flick.atYEnd ? 0 : 1
}
@@ -185,9 +164,12 @@ Rectangle {
// A button to close the detailed view, i.e. set the state back to default ('').
TextButton {
y: 10
- anchors { right: background.right; rightMargin: 10 }
+ anchors {
+ right: background.right
+ rightMargin: 10
+ }
opacity: recipe.detailsOpacity
- text: "Close"
+ text: qsTr("Close")
onClicked: recipe.state = '';
}
@@ -195,23 +177,46 @@ Rectangle {
states: State {
name: "Details"
- PropertyChanges { target: background; color: "white" }
- PropertyChanges { target: recipeImage; width: 130; height: 130 } // Make picture bigger
- PropertyChanges { target: recipe; detailsOpacity: 1; x: 0 } // Make details visible
- PropertyChanges { target: recipe; height: listView.height } // Fill the entire list area with the detailed view
+ PropertyChanges {
+ background.color: "white"
+ recipeImage {
+ // Make picture bigger
+ width: 130
+ height: 130
+ }
+ recipe {
+ // Make details visible
+ detailsOpacity: 1
+ x: 0
+
+ // Fill the entire list area with the detailed view
+ height: listView.height
+ }
+ }
// Move the list so that this item is at the top.
- PropertyChanges { target: recipe.ListView.view; explicit: true; contentY: recipe.y }
+ PropertyChanges {
+ recipe.ListView.view.contentY: recipe.y
+ explicit: true;
+ }
// Disallow flicking while we're in detailed view
- PropertyChanges { target: recipe.ListView.view; interactive: false }
+ PropertyChanges {
+ recipe.ListView.view.interactive: false
+ }
}
transitions: Transition {
// Make the state changes smooth
ParallelAnimation {
- ColorAnimation { property: "color"; duration: 500 }
- NumberAnimation { duration: 300; properties: "detailsOpacity,x,contentY,height,width" }
+ ColorAnimation {
+ property: "color"
+ duration: 500
+ }
+ NumberAnimation {
+ duration: 300
+ properties: "detailsOpacity,x,contentY,height,width"
+ }
}
}
}
@@ -222,7 +227,7 @@ Rectangle {
ListView {
id: listView
anchors.fill: parent
- model: RecipesModel {}
+ model: RecipesModel { }
delegate: recipeDelegate
}
}
diff --git a/examples/quick/views/listview/highlight.qml b/examples/quick/views/listview/highlight.qml
index 092b4d59bd..1f9b9c015c 100644
--- a/examples/quick/views/listview/highlight.qml
+++ b/examples/quick/views/listview/highlight.qml
@@ -1,68 +1,23 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
// This example shows how to create your own highlight delegate for a ListView
// that uses a SpringAnimation to provide custom movement when the
// highlight bar is moved between items.
-import QtQuick 2.0
+import QtQuick
import "content"
Rectangle {
- width: 200; height: 300
+ width: 200
+ height: 300
// Define a delegate component. The component will be
// instantiated for each visible item in the list.
component PetDelegate: Item {
id: pet
- width: 200; height: 55
+ width: 200
+ height: 55
required property int index
required property string name
@@ -70,18 +25,27 @@ Rectangle {
required property int age
Column {
- SmallText { text: 'Name: ' + pet.name }
- SmallText { text: 'Type: ' + pet.type }
- SmallText { text: 'Age: ' + pet.age }
+ SmallText {
+ text: 'Name: ' + pet.name
+ }
+ SmallText {
+ text: 'Type: ' + pet.type
+ }
+ SmallText {
+ text: 'Age: ' + pet.age
+ }
}
// indent the item if it is the current item
states: State {
name: "Current"
when: pet.ListView.isCurrentItem
- PropertyChanges { target: pet; x: 20 }
+ PropertyChanges { pet.x: 20 }
}
transitions: Transition {
- NumberAnimation { properties: "x"; duration: 200 }
+ NumberAnimation {
+ properties: "x"
+ duration: 200
+ }
}
MouseArea {
anchors.fill: parent
@@ -92,24 +56,31 @@ Rectangle {
//! [0]
// Define a highlight with customized movement between items.
component HighlightBar : Rectangle {
- width: 200; height: 50
+ width: 200
+ height: 50
color: "#FFFF88"
- y: listView.currentItem.y
- Behavior on y { SpringAnimation { spring: 2; damping: 0.1 } }
+ y: ListView.view.currentItem.y
+ Behavior on y {
+ SpringAnimation {
+ spring: 2
+ damping: 0.1
+ }
+ }
}
ListView {
id: listView
- width: 200; height: parent.height
+ width: 200
+ height: parent.height
x: 30
- model: PetsModel {}
- delegate: PetDelegate {}
+ model: PetsModel { }
+ delegate: PetDelegate { }
focus: true
// Set the highlight delegate. Note we must also set highlightFollowsCurrentItem
// to false so the highlight delegate can control how the highlight is moved.
- highlight: HighlightBar {}
+ highlight: HighlightBar { }
highlightFollowsCurrentItem: false
}
//! [0]
diff --git a/examples/quick/views/listview/highlightranges.qml b/examples/quick/views/listview/highlightranges.qml
index dafd064332..91304ae08b 100644
--- a/examples/quick/views/listview/highlightranges.qml
+++ b/examples/quick/views/listview/highlightranges.qml
@@ -1,56 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
import "content"
+pragma ComponentBehavior: Bound
+
//! [0]
Rectangle {
id: root
@@ -77,17 +32,26 @@ Rectangle {
}
}
- PauseAnimation { duration: 500 }
+ PauseAnimation {
+ duration: 500
+ }
}
//! [0]
- MouseArea{
+ MouseArea {
id: ma
z: 1
anchors.fill: parent
- onClicked: { z = 1 - z; if (anim.running) anim.stop(); else anim.restart();}
+ onClicked: function () {
+ z = 1 - z;
+ if (anim.running)
+ anim.stop();
+ else
+ anim.restart();
+ }
}
- width: 320; height: 480
+ width: 320
+ height: 480
// This example shows the same model in three different ListView items,
// with different highlight ranges. The highlight ranges are set by the
@@ -115,12 +79,16 @@ Rectangle {
//! [1]
ListView {
id: list1
- height: 50; width: parent.width
- model: PetsModel {id: aModel}
+ height: 50
+ width: parent.width
+ model: PetsModel {
+ id: aModel
+ }
delegate: petDelegate
orientation: ListView.Horizontal
-
- highlight: Rectangle { color: "lightsteelblue" }
+ highlight: Rectangle {
+ color: "lightsteelblue"
+ }
currentIndex: root.current
onCurrentIndexChanged: root.current = currentIndex
focus: true
@@ -129,29 +97,33 @@ Rectangle {
ListView {
id: list2
y: 160
- height: 50; width: parent.width
- model: PetsModel {}
+ height: 50
+ width: parent.width
+ model: PetsModel { }
delegate: petDelegate
orientation: ListView.Horizontal
-
- highlight: Rectangle { color: "yellow" }
+ highlight: Rectangle {
+ color: "yellow"
+ }
currentIndex: root.current
- preferredHighlightBegin: 80; preferredHighlightEnd: 220
+ preferredHighlightBegin: 80
+ preferredHighlightEnd: 220
highlightRangeMode: ListView.ApplyRange
}
ListView {
id: list3
y: 320
- height: 50; width: parent.width
+ height: 50
+ width: parent.width
model: PetsModel {}
delegate: petDelegate
orientation: ListView.Horizontal
-
highlight: Rectangle { color: "yellow" }
currentIndex: root.current
onCurrentIndexChanged: root.current = currentIndex
- preferredHighlightBegin: 125; preferredHighlightEnd: 125
+ preferredHighlightBegin: 125
+ preferredHighlightEnd: 125
highlightRangeMode: ListView.StrictlyEnforceRange
}
//! [1]
@@ -159,6 +131,7 @@ Rectangle {
Component {
id: petDelegate
Item {
+ id: petDelegateItem
width: 160
height: column.height
@@ -169,9 +142,15 @@ Rectangle {
Column {
id: column
- Text { text: 'Name: ' + parent.name }
- Text { text: 'Type: ' + parent.type }
- Text { text: 'Age: ' + parent.age }
+ Text {
+ text: 'Name: ' + petDelegateItem.name
+ }
+ Text {
+ text: 'Type: ' + petDelegateItem.type
+ }
+ Text {
+ text: 'Age: ' + petDelegateItem.age
+ }
}
MouseArea {
diff --git a/examples/quick/views/listview/sections.qml b/examples/quick/views/listview/sections.qml
index d51ed89789..83370958fa 100644
--- a/examples/quick/views/listview/sections.qml
+++ b/examples/quick/views/listview/sections.qml
@@ -1,58 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
// This example shows how a ListView can be separated into sections using
// the ListView.section attached property.
-import QtQuick 2.0
-import "content"
+import QtQuick
+import QtQuick.Controls
Rectangle {
id: container
@@ -61,21 +14,67 @@ Rectangle {
ListModel {
id: animalsModel
- ListElement { name: "Ant"; size: "Tiny" }
- ListElement { name: "Flea"; size: "Tiny" }
- ListElement { name: "Parrot"; size: "Small" }
- ListElement { name: "Guinea pig"; size: "Small" }
- ListElement { name: "Rat"; size: "Small" }
- ListElement { name: "Butterfly"; size: "Small" }
- ListElement { name: "Dog"; size: "Medium" }
- ListElement { name: "Cat"; size: "Medium" }
- ListElement { name: "Pony"; size: "Medium" }
- ListElement { name: "Koala"; size: "Medium" }
- ListElement { name: "Horse"; size: "Large" }
- ListElement { name: "Tiger"; size: "Large" }
- ListElement { name: "Giraffe"; size: "Large" }
- ListElement { name: "Elephant"; size: "Huge" }
- ListElement { name: "Whale"; size: "Huge" }
+
+ ListElement {
+ name: "Ant"
+ size: "Tiny"
+ }
+ ListElement {
+ name: "Flea"
+ size: "Tiny"
+ }
+ ListElement {
+ name: "Parrot"
+ size: "Small"
+ }
+ ListElement {
+ name: "Guinea pig"
+ size: "Small"
+ }
+ ListElement {
+ name: "Rat"
+ size: "Small"
+ }
+ ListElement {
+ name: "Butterfly"
+ size: "Small"
+ }
+ ListElement {
+ name: "Dog"
+ size: "Medium"
+ }
+ ListElement {
+ name: "Cat"
+ size: "Medium"
+ }
+ ListElement {
+ name: "Pony"
+ size: "Medium"
+ }
+ ListElement {
+ name: "Koala"
+ size: "Medium"
+ }
+ ListElement {
+ name: "Horse"
+ size: "Large"
+ }
+ ListElement {
+ name: "Tiger"
+ size: "Large"
+ }
+ ListElement {
+ name: "Giraffe"
+ size: "Large"
+ }
+ ListElement {
+ name: "Elephant"
+ size: "Huge"
+ }
+ ListElement {
+ name: "Whale"
+ size: "Huge"
+ }
}
//! [0]
@@ -83,7 +82,7 @@ Rectangle {
Component {
id: sectionHeading
Rectangle {
- width: container.width
+ width: ListView.view.width
height: childrenRect.height
color: "lightsteelblue"
@@ -105,6 +104,7 @@ Rectangle {
model: animalsModel
delegate: Text {
required property string name
+
text: name
font.pixelSize: 18
}
@@ -120,19 +120,23 @@ Rectangle {
anchors.bottom: parent.bottom
anchors.bottomMargin: 1
spacing: 1
- ToggleButton {
- label: "CurrentLabelAtStart"
- onToggled: {
- if (active)
+
+ CheckBox {
+ id: labelAtStartCheckBox
+ text: qsTr("CurrentLabelAtStart")
+ onClicked: {
+ if (checked)
view.section.labelPositioning |= ViewSection.CurrentLabelAtStart
else
view.section.labelPositioning &= ~ViewSection.CurrentLabelAtStart
}
}
- ToggleButton {
- label: "NextLabelAtEnd"
- onToggled: {
- if (active)
+
+ CheckBox {
+ id: labelAtEndCheckBox
+ text: qsTr("NextLabelAtEnd")
+ onClicked: {
+ if (checked)
view.section.labelPositioning |= ViewSection.NextLabelAtEnd
else
view.section.labelPositioning &= ~ViewSection.NextLabelAtEnd
diff --git a/examples/quick/views/main.cpp b/examples/quick/views/main.cpp
index b09597e804..d724e59961 100644
--- a/examples/quick/views/main.cpp
+++ b/examples/quick/views/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(views/views)
diff --git a/examples/quick/views/objectmodel/objectmodel.qml b/examples/quick/views/objectmodel/objectmodel.qml
index c9e4b8a5cd..f0b116a247 100644
--- a/examples/quick/views/objectmodel/objectmodel.qml
+++ b/examples/quick/views/objectmodel/objectmodel.qml
@@ -1,58 +1,13 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
// This example demonstrates placing items in a view using
// an ObjectModel
-import QtQuick 2.0
-import QtQml.Models 2.1
+import QtQuick
+import QtQml.Models
+
+pragma ComponentBehavior: Bound
Rectangle {
id: root
@@ -66,42 +21,69 @@ Rectangle {
id: itemModel
Rectangle {
- width: view.width; height: view.height
+ width: view.width
+ height: view.height
color: "#FFFEF0"
- Text { text: "Page 1"; font.bold: true; anchors.centerIn: parent }
+
+ Text {
+ anchors.centerIn: parent
+ text: qsTr("Page 1")
+ font.bold: true
+ }
Component.onDestruction: if (root.printDestruction) print("destroyed 1")
}
Rectangle {
- width: view.width; height: view.height
+ width: view.width
+ height: view.height
color: "#F0FFF7"
- Text { text: "Page 2"; font.bold: true; anchors.centerIn: parent }
+
+ Text {
+ anchors.centerIn: parent
+ text: qsTr("Page 2")
+ font.bold: true
+ }
Component.onDestruction: if (root.printDestruction) print("destroyed 2")
}
Rectangle {
- width: view.width; height: view.height
+ width: view.width
+ height: view.height
color: "#F4F0FF"
- Text { text: "Page 3"; font.bold: true; anchors.centerIn: parent }
- Component.onDestruction: if (root.activeFocusprintDestruction) print("destroyed 3")
+ Text {
+ anchors.centerIn: parent
+ text: qsTr("Page 3")
+ font.bold: true
+ }
+
+ Component.onDestruction: if (root.printDestruction) print("destroyed 3")
}
}
ListView {
id: view
- anchors { fill: parent; bottomMargin: 30 }
+ anchors {
+ fill: parent
+ bottomMargin: 30
+ }
model: itemModel
- preferredHighlightBegin: 0; preferredHighlightEnd: 0
+ preferredHighlightBegin: 0
+ preferredHighlightEnd: 0
highlightRangeMode: ListView.StrictlyEnforceRange
orientation: ListView.Horizontal
- snapMode: ListView.SnapOneItem; flickDeceleration: 2000
+ snapMode: ListView.SnapOneItem
+ flickDeceleration: 2000
cacheBuffer: 200
}
//! [0]
Rectangle {
- width: root.width; height: 30
- anchors { top: view.bottom; bottom: parent.bottom }
+ width: root.width
+ height: 30
+ anchors {
+ top: view.bottom
+ bottom: parent.bottom
+ }
color: "gray"
Row {
@@ -110,17 +92,18 @@ Rectangle {
Repeater {
model: itemModel.count
-
- Rectangle {
+ delegate: Rectangle {
required property int index
- width: 5; height: 5
+ width: 5
+ height: 5
radius: 3
- color: view.currentIndex == index ? "blue" : "white"
+ color: view.currentIndex === index ? "blue" : "white"
MouseArea {
- width: 20; height: 20
anchors.centerIn: parent
+ width: 20
+ height: 20
onClicked: view.currentIndex = parent.index
}
}
diff --git a/examples/quick/views/package/Delegate.qml b/examples/quick/views/package/Delegate.qml
index 9f4f1946d8..7f3eeaa833 100644
--- a/examples/quick/views/package/Delegate.qml
+++ b/examples/quick/views/package/Delegate.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
//! [0]
Package {
@@ -58,26 +11,50 @@ Package {
required property int index
required property string display
- Text { id: listDelegate; width: parent.width; height: 25; text: 'Empty'; Package.name: 'list' }
- Text { id: gridDelegate; width: parent.width / 2; height: 50; text: 'Empty'; Package.name: 'grid' }
+ Text {
+ id: listDelegate
+ width: parent.width
+ height: 25
+ text: 'Empty'
+ Package.name: 'list'
+ }
+
+ Text {
+ id: gridDelegate
+ width: parent.width / 2
+ height: 50
+ text: 'Empty'
+ Package.name: 'grid'
+ }
Rectangle {
id: wrapper
- width: parent.width; height: 25
+ width: parent?.width ?? 0
+ height: 25
color: 'lightsteelblue'
- Text { text: delegate.display; anchors.centerIn: parent }
+ Text {
+ text: delegate.display
+ anchors.centerIn: parent
+ }
state: delegate.upTo > delegate.index ? 'inGrid' : 'inList'
states: [
State {
name: 'inList'
- ParentChange { target: wrapper; parent: listDelegate }
+ ParentChange {
+ target: wrapper
+ parent: listDelegate
+ }
},
State {
name: 'inGrid'
ParentChange {
- target: wrapper; parent: gridDelegate
- x: 0; y: 0; width: gridDelegate.width; height: gridDelegate.height
+ target: wrapper
+ parent: gridDelegate
+ x: 0
+ y: 0
+ width: gridDelegate.width
+ height: gridDelegate.height
}
}
]
@@ -85,7 +62,10 @@ Package {
transitions: [
Transition {
ParentAnimation {
- NumberAnimation { properties: 'x,y,width,height'; duration: 300 }
+ NumberAnimation {
+ properties: 'x,y,width,height'
+ duration: 300
+ }
}
}
]
diff --git a/examples/quick/views/package/view.qml b/examples/quick/views/package/view.qml
index 632d27c724..a9a0c46198 100644
--- a/examples/quick/views/package/view.qml
+++ b/examples/quick/views/package/view.qml
@@ -1,66 +1,27 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import QtQml.Models 2.1
+import QtQuick
+import QtQml.Models
+
+pragma ComponentBehavior: Bound
Rectangle {
id: root
color: "white"
width: 320
height: 480
- property int upTo: 0
+ property int upTo
SequentialAnimation on upTo {
loops: -1
- NumberAnimation { to: 8; duration: 3500 }
- NumberAnimation { to: 0; duration: 3500 }
+ NumberAnimation {
+ to: 8
+ duration: 3500
+ }
+ NumberAnimation {
+ to: 0
+ duration: 3500
+ }
}
ListModel {
@@ -85,14 +46,14 @@ Rectangle {
ListView {
id: lv
- height: parent.height/2
+ height: parent.height / 2
width: parent.width
model: visualModel.parts.list
}
GridView {
- y: parent.height/2
- height: parent.height/2
+ y: parent.height / 2
+ height: parent.height / 2
width: parent.width
cellWidth: width / 2
cellHeight: 50
diff --git a/examples/quick/views/pathview/pathview-example.qml b/examples/quick/views/pathview/pathview-example.qml
index e42117dfae..f1ecd099c1 100644
--- a/examples/quick/views/pathview/pathview-example.qml
+++ b/examples/quick/views/pathview/pathview-example.qml
@@ -1,74 +1,50 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
Rectangle {
- width: 400; height: 240
+ width: 400
+ height: 240
color: "white"
ListModel {
id: appModel
- ListElement { name: "Music"; icon: "pics/AudioPlayer_48.png" }
- ListElement { name: "Movies"; icon: "pics/VideoPlayer_48.png" }
- ListElement { name: "Camera"; icon: "pics/Camera_48.png" }
- ListElement { name: "Calendar"; icon: "pics/DateBook_48.png" }
- ListElement { name: "Messaging"; icon: "pics/EMail_48.png" }
- ListElement { name: "Todo List"; icon: "pics/TodoList_48.png" }
- ListElement { name: "Contacts"; icon: "pics/AddressBook_48.png" }
+ ListElement {
+ name: "Music"
+ icon: "pics/AudioPlayer_48.png"
+ }
+ ListElement {
+ name: "Movies"
+ icon: "pics/VideoPlayer_48.png"
+ }
+ ListElement {
+ name: "Camera"
+ icon: "pics/Camera_48.png"
+ }
+ ListElement {
+ name: "Calendar"
+ icon: "pics/DateBook_48.png"
+ }
+ ListElement {
+ name: "Messaging"
+ icon: "pics/EMail_48.png"
+ }
+ ListElement {
+ name: "Todo List"
+ icon: "pics/TodoList_48.png"
+ }
+ ListElement {
+ name: "Contacts"
+ icon: "pics/AddressBook_48.png"
+ }
}
Component {
id: appDelegate
Item {
- width: 100; height: 100
+ width: 100
+ height: 100
scale: PathView.iconScale
required property string name
@@ -77,11 +53,15 @@ Rectangle {
Image {
id: myIcon
- y: 20; anchors.horizontalCenter: parent.horizontalCenter
+ y: 20
+ anchors.horizontalCenter: parent.horizontalCenter
source: parent.icon
}
Text {
- anchors { top: myIcon.bottom; horizontalCenter: parent.horizontalCenter }
+ anchors {
+ top: myIcon.bottom
+ horizontalCenter: parent.horizontalCenter
+ }
text: parent.name
}
@@ -94,7 +74,11 @@ Rectangle {
Component {
id: appHighlight
- Rectangle { width: 80; height: 80; color: "lightsteelblue" }
+ Rectangle {
+ width: 80
+ height: 80
+ color: "lightsteelblue"
+ }
}
PathView {
@@ -109,11 +93,30 @@ Rectangle {
path: Path {
startX: 10
startY: 50
- PathAttribute { name: "iconScale"; value: 0.5 }
- PathQuad { x: 200; y: 150; controlX: 50; controlY: 200 }
- PathAttribute { name: "iconScale"; value: 1.0 }
- PathQuad { x: 390; y: 50; controlX: 350; controlY: 200 }
- PathAttribute { name: "iconScale"; value: 0.5 }
+ PathAttribute {
+ name: "iconScale"
+ value: 0.5
+ }
+ PathQuad {
+ x: 200
+ y: 150
+ controlX: 50
+ controlY: 200
+ }
+ PathAttribute {
+ name: "iconScale"
+ value: 1.0
+ }
+ PathQuad {
+ x: 390
+ y: 50
+ controlX: 350
+ controlY: 200
+ }
+ PathAttribute {
+ name: "iconScale"
+ value: 0.5
+ }
}
}
}
diff --git a/examples/quick/views/views.qml b/examples/quick/views/views.qml
index bdf05269ae..77b16fa6bb 100644
--- a/examples/quick/views/views.qml
+++ b/examples/quick/views/views.qml
@@ -1,56 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import QtQml.Models 2.1
-import "../shared" as Examples
+import QtQuick
+import shared as Examples
Item {
height: 480
@@ -67,9 +19,8 @@ Item {
addExample("Sections", "ListView section headers and footers", Qt.resolvedUrl("listview/sections.qml"))
addExample("Packages", "Transitions between a ListView and GridView", Qt.resolvedUrl("package/view.qml"))
addExample("PathView", "A simple PathView", Qt.resolvedUrl("pathview/pathview-example.qml"))
- addExample("ObjectModel", "Using a ObjectModel", Qt.resolvedUrl("objectmodel/objectmodel.qml"))
+ addExample("ObjectModel", "Using an ObjectModel", Qt.resolvedUrl("objectmodel/objectmodel.qml"))
addExample("Display Margins", "A ListView with display margins", Qt.resolvedUrl("listview/displaymargin.qml"))
- addExample("DelegateModel", "A PathView using DelegateModel to instantiate delegates", Qt.resolvedUrl("delegatemodel/slideshow.qml"))
addExample("Draggable Selections", "Enabling drag-and-drop on DelegateModel delegates", Qt.resolvedUrl("delegatemodel/dragselection.qml"))
}
}
diff --git a/examples/quick/views/views.qmlproject b/examples/quick/views/views.qmlproject
index 7e6baf0a7f..f0e49ad008 100644
--- a/examples/quick/views/views.qmlproject
+++ b/examples/quick/views/views.qmlproject
@@ -2,6 +2,7 @@ import QmlProject 1.1
Project {
mainFile: "views.qml"
+ importPaths: [ "../" ]
/* Include .qml, .js, and image files from current directory and subdirectories */
QmlFiles {
diff --git a/examples/quick/views/views.qrc b/examples/quick/views/views.qrc
index 1646c49e81..9b16e81321 100644
--- a/examples/quick/views/views.qrc
+++ b/examples/quick/views/views.qrc
@@ -1,5 +1,6 @@
<RCC>
- <qresource prefix="/views">
+ <qresource prefix="/qt/qml/views">
+
<file>gridview/gridview-example.qml</file>
<file>gridview/pics/AddressBook_48.png</file>
<file>gridview/pics/AudioPlayer_48.png</file>
@@ -41,7 +42,6 @@
<file>pathview/pics/EMail_48.png</file>
<file>pathview/pics/TodoList_48.png</file>
<file>pathview/pics/VideoPlayer_48.png</file>
- <file>delegatemodel/slideshow.qml</file>
<file>delegatemodel/dragselection.qml</file>
<file>objectmodel/objectmodel.qml</file>
<file>views.qml</file>
diff --git a/examples/quick/window/AllScreens.qml b/examples/quick/window/AllScreens.qml
index 6f1a829410..25438f21a9 100644
--- a/examples/quick/window/AllScreens.qml
+++ b/examples/quick/window/AllScreens.qml
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtQuick.Controls
@@ -66,7 +19,7 @@ Column {
Repeater {
id: screenInfo
- model: Qt.application.screens
+ model: (Qt.application as Application).screens
Label {
required property string name
required property int virtualX
@@ -80,7 +33,7 @@ Column {
}
Component.onCompleted: {
- var screens = Qt.application.screens;
+ var screens = (Qt.application as Application).screens;
for (var i = 0; i < screens.length; ++i)
console.log("screen " + screens[i].name + " has geometry " +
screens[i].virtualX + ", " + screens[i].virtualY + " " +
diff --git a/examples/quick/window/CMakeLists.txt b/examples/quick/window/CMakeLists.txt
index 4fa2bcac4c..58bd8fd7e9 100644
--- a/examples/quick/window/CMakeLists.txt
+++ b/examples/quick/window/CMakeLists.txt
@@ -1,128 +1,50 @@
-# Generated from window.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(window LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
+qt_standard_project_setup(REQUIRES 6.5)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
+add_subdirectory("../shared" "shared")
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/window")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(window
+qt_add_executable(windowexample
+ WIN32
+ MACOSX_BUNDLE
main.cpp
)
-set_target_properties(window PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(window PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-# Resources:
-set(window_resource_files
- "AllScreens.qml"
- "CurrentScreen.qml"
- "Splash.qml"
- "window.qml"
+target_link_libraries(windowexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
-qt6_add_resources(window "window"
- PREFIX
- "/window"
- FILES
- ${window_resource_files}
-)
-set_source_files_properties("../shared/Button.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Button.qml"
-)
-set_source_files_properties("../shared/CheckBox.qml"
- PROPERTIES QT_RESOURCE_ALIAS "CheckBox.qml"
-)
-set_source_files_properties("../shared/FlickrRssModel.qml"
- PROPERTIES QT_RESOURCE_ALIAS "FlickrRssModel.qml"
-)
-set_source_files_properties("../shared/Label.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Label.qml"
-)
-set_source_files_properties("../shared/LauncherList.qml"
- PROPERTIES QT_RESOURCE_ALIAS "LauncherList.qml"
-)
-set_source_files_properties("../shared/SimpleLauncherDelegate.qml"
- PROPERTIES QT_RESOURCE_ALIAS "SimpleLauncherDelegate.qml"
-)
-set_source_files_properties("../shared/Slider.qml"
- PROPERTIES QT_RESOURCE_ALIAS "Slider.qml"
-)
-set_source_files_properties("../shared/TabSet.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TabSet.qml"
-)
-set_source_files_properties("../shared/TextField.qml"
- PROPERTIES QT_RESOURCE_ALIAS "TextField.qml"
-)
-set_source_files_properties("../shared/images/back.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/back.png"
-)
-set_source_files_properties("../shared/images/checkmark.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/checkmark.png"
-)
-set_source_files_properties("../shared/images/next.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/next.png"
-)
-set_source_files_properties("../shared/images/qt-logo.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/qt-logo.png"
-)
-set_source_files_properties("../shared/images/slider_handle.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/slider_handle.png"
-)
-set_source_files_properties("../shared/images/tab.png"
- PROPERTIES QT_RESOURCE_ALIAS "images/tab.png"
-)
-set(shared_resource_files
- "Button.qml"
- "CheckBox.qml"
- "FlickrRssModel.qml"
- "Label.qml"
- "LauncherList.qml"
- "SimpleLauncherDelegate.qml"
- "Slider.qml"
- "TabSet.qml"
- "TextField.qml"
- "images/back.png"
- "images/checkmark.png"
- "images/next.png"
- "images/qt-logo.png"
- "images/slider_handle.png"
- "images/tab.png"
+qt_add_qml_module(windowexample
+ URI window
+ QML_FILES
+ "AllScreens.qml"
+ "CurrentScreen.qml"
+ "Splash.qml"
+ "window.qml"
)
-qt6_add_resources(window "shared"
- PREFIX
- "/shared"
- BASE
- "../shared"
- FILES
- ${shared_resource_files}
+add_dependencies(windowexample window_shared)
+
+install(TARGETS windowexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-install(TARGETS window
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+qt_generate_deploy_qml_app_script(
+ TARGET windowexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/window/CurrentScreen.qml b/examples/quick/window/CurrentScreen.qml
index 0b6e681aac..1f4da7f0b7 100644
--- a/examples/quick/window/CurrentScreen.qml
+++ b/examples/quick/window/CurrentScreen.qml
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtQuick.Controls
diff --git a/examples/quick/window/Splash.qml b/examples/quick/window/Splash.qml
index cc520bd5a4..6989425548 100644
--- a/examples/quick/window/Splash.qml
+++ b/examples/quick/window/Splash.qml
@@ -1,54 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
+import shared
//! [splash-properties]
Window {
@@ -69,20 +23,21 @@ Window {
Image {
id: splashImage
- source: "../shared/images/qt-logo.png"
- MouseArea {
- anchors.fill: parent
- onClicked: Qt.quit()
+ source: Images.qtLogo
+ TapHandler {
+ onTapped: splash.exit()
}
}
+
+ function exit() {
+ splash.visible = false
+ splash.timeout()
+ }
+
//! [timer]
Timer {
- interval: splash.timeoutInterval; running: true; repeat: false
- onTriggered: {
- splash.visible = false
- splash.timeout()
- }
+ interval: splash.timeoutInterval; running: splash.visible; repeat: false
+ onTriggered: splash.exit()
}
//! [timer]
- Component.onCompleted: visible = true
}
diff --git a/examples/quick/window/doc/src/window.qdoc b/examples/quick/window/doc/src/window.qdoc
index 26caafce9a..ca3b90b76e 100644
--- a/examples/quick/window/doc/src/window.qdoc
+++ b/examples/quick/window/doc/src/window.qdoc
@@ -1,35 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Qt Quick Examples - Window and Screen
\example window
\brief This example demonstrates the Window and Screen types in QML.
\image qml-window-example.png
\ingroup qtquickexamples
+ \examplecategory {Graphics}
\e{Window and Screen} shows how to:
@@ -74,7 +51,8 @@
applications which need to rotate some content when the screen orientation
changes, to position windows on the screen or to convert real units to
logical pixel units. CurrentScreen.qml (which is displayed inline in
- window.qml, or can be run by itself with qmlscene) simply displays the
+ window.qml, or can be run by itself with the
+ \l {Prototyping with the QML Runtime Tool}{qml tool}) simply displays the
property values, while the splash screen uses them to center the window on
the screen.
diff --git a/examples/quick/window/main.cpp b/examples/quick/window/main.cpp
index 25eb3663ab..8de2aa8eef 100644
--- a/examples/quick/window/main.cpp
+++ b/examples/quick/window/main.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QtGui/QGuiApplication>
#include <QtGui/QScreen>
@@ -60,9 +13,14 @@ int main(int argc, char* argv[])
{
QGuiApplication app(argc, argv);
QQmlEngine engine;
+
+#ifdef Q_OS_MACOS
+ engine.addImportPath(app.applicationDirPath() + QStringLiteral("/../PlugIns"));
+#endif
+
QQmlComponent component(&engine);
QQuickWindow::setDefaultAlphaBuffer(true);
- component.loadUrl(QUrl("qrc:///window/window.qml"));
+ component.loadUrl(QUrl("qrc:/qt/qml/window/window.qml"));
if ( component.isReady() )
component.create();
else
diff --git a/examples/quick/window/window.qml b/examples/quick/window/window.qml
index 74c4d94984..99ff4403e4 100644
--- a/examples/quick/window/window.qml
+++ b/examples/quick/window/window.qml
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtQuick.Controls
@@ -54,12 +7,11 @@ import QtQuick.Controls
QtObject {
id: root
property real defaultSpacing: 10
- property SystemPalette palette: SystemPalette { }
property var controlWindow: Window {
width: col.implicitWidth + root.defaultSpacing * 2
height: col.implicitHeight + root.defaultSpacing * 2
- color: root.palette.window
+ color: palette.window
title: "Control Window"
Column {
id: col
@@ -137,13 +89,13 @@ QtObject {
" and has visibility " + parent.visibilityToString(root.testWindow.visibility)
}
Rectangle {
- color: root.palette.text
+ color: palette.text
width: parent.width
height: 1
}
CurrentScreen { }
Rectangle {
- color: root.palette.text
+ color: palette.text
width: parent.width
height: 1
}
@@ -164,35 +116,44 @@ QtObject {
anchors.centerIn: parent
text: "Second Window"
}
- MouseArea {
- anchors.fill: parent
- onClicked: root.testWindow.color = "#e0c31e"
+ TapHandler {
+ onTapped: root.testWindow.color = Qt.rgba(0.25 + Math.random() / 2,
+ 0.65 + Math.random() / 4,
+ 0.15 + Math.random() / 3)
}
Button {
- anchors.right: parent.right
- anchors.top: parent.top
- anchors.margins: root.defaultSpacing
- text: root.testWindow.visibility === Window.FullScreen ? "exit fullscreen" : "go fullscreen"
- width: 150
- onClicked: {
- if (root.testWindow.visibility === Window.FullScreen)
- root.testWindow.visibility = Window.AutomaticVisibility
- else
- root.testWindow.visibility = Window.FullScreen
+ id: fullscreenButton
+ anchors {
+ right: parent.right
+ top: parent.top
+ margins: root.defaultSpacing
}
+ width: height
+ checkable: true
+ Binding on checked { value: root.testWindow.visibility === Window.FullScreen }
+ onClicked: root.testWindow.visibility = checked ? Window.FullScreen : Window.AutomaticVisibility
+ text: "⛶"
+ ToolTip.visible: hovered
+ ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval
+ ToolTip.text: root.testWindow.visibility === Window.FullScreen ? qsTr("restore") : qsTr("fill screen")
}
Button {
anchors.left: parent.left
anchors.top: parent.top
anchors.margins: root.defaultSpacing
- text: "X"
- width: 30
+ text: "✘"
+ width: height
+ height: fullscreenButton.height
onClicked: root.testWindow.close()
+ ToolTip.visible: hovered
+ ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval
+ ToolTip.text: qsTr("close this window")
}
}
}
property var splashWindow: Splash {
+ visible: true
onTimeout: root.controlWindow.visible = true
}
}
diff --git a/examples/quick/window/window.qrc b/examples/quick/window/window.qrc
index 89d1de1b1f..206491cc13 100644
--- a/examples/quick/window/window.qrc
+++ b/examples/quick/window/window.qrc
@@ -1,5 +1,5 @@
<RCC>
- <qresource prefix="/window">
+ <qresource prefix="/qt/qml/window">
<file>window.qml</file>
<file>Splash.qml</file>
<file>CurrentScreen.qml</file>