summaryrefslogtreecommitdiffstats
path: root/basicsuite/qt5-everywhere
diff options
context:
space:
mode:
authorKalle Viironen <kalle.viironen@digia.com>2014-02-03 13:37:15 +0200
committerKalle Viironen <kalle.viironen@digia.com>2014-02-03 13:39:10 +0200
commit6eca7933f42af800c64d3ee606ee56cb126970e4 (patch)
tree429fe57d992d18cfe9283e5c6ba071dca88c2163 /basicsuite/qt5-everywhere
parente80e8e67554708a69d74bab5c22c6644b419eae1 (diff)
parent203ffaab105b1f868689656bfbdfabb7f55b9e56 (diff)
Merge branch 'dev' into stable
Diffstat (limited to 'basicsuite/qt5-everywhere')
-rw-r--r--basicsuite/qt5-everywhere/Button.qml72
-rw-r--r--basicsuite/qt5-everywhere/Cloud.qml105
-rw-r--r--basicsuite/qt5-everywhere/DialogButton.qml66
-rw-r--r--basicsuite/qt5-everywhere/Element.qml76
-rw-r--r--basicsuite/qt5-everywhere/Group.qml81
-rw-r--r--basicsuite/qt5-everywhere/HelpScreen.qml329
-rw-r--r--basicsuite/qt5-everywhere/IslandElementContainer.qml158
-rw-r--r--basicsuite/qt5-everywhere/NavigationPanel.qml92
-rw-r--r--basicsuite/qt5-everywhere/QtLogo.pngbin0 -> 34605 bytes
-rw-r--r--basicsuite/qt5-everywhere/QuitDialog.qml107
-rw-r--r--basicsuite/qt5-everywhere/Slide.qml252
-rw-r--r--basicsuite/qt5-everywhere/SplashScreen.qml105
-rw-r--r--basicsuite/qt5-everywhere/WorldCanvas.qml145
-rw-r--r--basicsuite/qt5-everywhere/WorldMouseArea.qml115
-rw-r--r--basicsuite/qt5-everywhere/app.pro16
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/Calqlatr.qml107
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/Button.qml85
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/Display.qml128
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/NumberPad.qml69
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/StyleLabel.qml50
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/audio/touch.wavbin0 -> 950 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/calculator.js150
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-back.pngbin0 -> 328 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-close.pngbin0 -> 488 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-settings.pngbin0 -> 503 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/images/logo.pngbin0 -> 5950 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-edge-left.pngbin0 -> 12401 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-edge-right.pngbin0 -> 12967 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-grip.pngbin0 -> 298 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/images/settings-selected-a.pngbin0 -> 2326 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/images/settings-selected-b.pngbin0 -> 2334 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/images/touch-green.pngbin0 -> 4808 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/images/touch-white.pngbin0 -> 4601 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/canvasclock/canvasClock.qml404
-rw-r--r--basicsuite/qt5-everywhere/demos/demos.pro3
-rw-r--r--basicsuite/qt5-everywhere/demos/gridrssnews/RssDelegate.qml111
-rw-r--r--basicsuite/qt5-everywhere/demos/gridrssnews/ScrollBar.qml72
-rw-r--r--basicsuite/qt5-everywhere/demos/gridrssnews/main.qml150
-rw-r--r--basicsuite/qt5-everywhere/demos/heartmonitor/HeartData.js50
-rw-r--r--basicsuite/qt5-everywhere/demos/heartmonitor/heart.pngbin0 -> 7021 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/heartmonitor/main.qml266
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/.DS_Storebin0 -> 6148 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/Maroon.qml233
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/BuildButton.qml90
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/GameCanvas.qml240
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/GameOverScreen.qml115
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/InfoBar.qml84
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/NewGameScreen.qml111
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/SoundEffect.qml52
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/audio/bomb-action.wavbin0 -> 20972 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/audio/catch-action.wavbin0 -> 13274 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/audio/catch.wavbin0 -> 8638 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/audio/currency.wavbin0 -> 15790 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/audio/factory-action.wavbin0 -> 4936 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/audio/melee-action.wavbin0 -> 17798 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/audio/projectile-action.wavbin0 -> 2562 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/audio/shooter-action.wavbin0 -> 27554 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/background.pngbin0 -> 5802 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/bomb-action.pngbin0 -> 23974 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/bomb-idle.pngbin0 -> 12238 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/bomb.pngbin0 -> 4067 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/button-help.pngbin0 -> 8916 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/button-play.pngbin0 -> 13945 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/catch-action.pngbin0 -> 6760 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/catch.pngbin0 -> 4771 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/cloud.pngbin0 -> 3398 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/currency.pngbin0 -> 1889 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-bomb.pngbin0 -> 3751 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-factory.pngbin0 -> 3946 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-melee.pngbin0 -> 4392 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-pointer.pngbin0 -> 911 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-shooter.pngbin0 -> 3737 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog.pngbin0 -> 3362 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/factory-action.pngbin0 -> 22440 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/factory-idle.pngbin0 -> 12729 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/factory.pngbin0 -> 4138 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/grid.pngbin0 -> 2830 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/help.pngbin0 -> 38255 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/lifes.pngbin0 -> 1675 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/logo-bubble.pngbin0 -> 7706 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/logo-fish.pngbin0 -> 3477 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/logo.pngbin0 -> 18332 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/melee-action.pngbin0 -> 7797 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/melee-idle.pngbin0 -> 22832 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/melee.pngbin0 -> 4046 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/mob-idle.pngbin0 -> 6181 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/mob.pngbin0 -> 2391 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/points.pngbin0 -> 1561 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/projectile-action.pngbin0 -> 6257 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/projectile.pngbin0 -> 801 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/scores.pngbin0 -> 1535 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/shooter-action.pngbin0 -> 18121 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/shooter-idle.pngbin0 -> 11929 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/shooter.pngbin0 -> 4137 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/sunlight.pngbin0 -> 248412 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-1.pngbin0 -> 2777 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-2.pngbin0 -> 4959 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-3.pngbin0 -> 5063 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-blank.pngbin0 -> 1326 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-gameover.pngbin0 -> 1515 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-go.pngbin0 -> 4230 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/gfx/wave.pngbin0 -> 2763 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/logic.js264
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/mobs/MobBase.qml262
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/towers/Bomb.qml133
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/towers/Factory.qml114
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/towers/Melee.qml83
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/towers/Ranged.qml128
-rw-r--r--basicsuite/qt5-everywhere/demos/maroon/content/towers/TowerBase.qml72
-rw-r--r--basicsuite/qt5-everywhere/demos/particledemo/BootScreenDemo.qml181
-rw-r--r--basicsuite/qt5-everywhere/demos/particledemo/ParticleSysComponent.qml108
-rw-r--r--basicsuite/qt5-everywhere/demos/particledemo/images/particle.pngbin0 -> 1257 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/particledemo/images/particle_star.pngbin0 -> 1696 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/particledemo/images/qt-logo-green-mask.pngbin0 -> 10597 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/particledemo/images/qt-logo-white-mask.pngbin0 -> 17247 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/particledemo/particle.pngbin0 -> 861 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/particledemo/particledemo.qml213
-rw-r--r--basicsuite/qt5-everywhere/demos/photosurface/images/image0.pngbin0 -> 249779 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/photosurface/images/image1.pngbin0 -> 264663 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/photosurface/images/image2.pngbin0 -> 264621 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/photosurface/images/image3.pngbin0 -> 215134 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/photosurface/images/image4.pngbin0 -> 225879 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/photosurface/images/qml-photosurface-example-small.pngbin0 -> 47271 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/photosurface/photosurface.qml131
-rw-r--r--basicsuite/qt5-everywhere/demos/radio/VolumeButton.qml185
-rw-r--r--basicsuite/qt5-everywhere/demos/radio/VolumePoint.qml64
-rw-r--r--basicsuite/qt5-everywhere/demos/radio/channels.xml27
-rw-r--r--basicsuite/qt5-everywhere/demos/radio/images/radio_btn_pause.pngbin0 -> 1573 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/radio/images/radio_btn_play.pngbin0 -> 5402 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/radio/images/radio_btn_stop.pngbin0 -> 1388 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/radio/images/radio_sound_icon.pngbin0 -> 1972 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/radio/images/volume.pngbin0 -> 749 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/radio/radio.qml261
-rw-r--r--basicsuite/qt5-everywhere/demos/rssnews/content/BusyIndicator.qml53
-rw-r--r--basicsuite/qt5-everywhere/demos/rssnews/content/CategoryDelegate.qml84
-rw-r--r--basicsuite/qt5-everywhere/demos/rssnews/content/NewsDelegate.qml75
-rw-r--r--basicsuite/qt5-everywhere/demos/rssnews/content/RssFeeds.qml58
-rw-r--r--basicsuite/qt5-everywhere/demos/rssnews/content/ScrollBar.qml107
-rw-r--r--basicsuite/qt5-everywhere/demos/rssnews/content/images/busy.pngbin0 -> 2629 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/rssnews/content/images/scrollbar.pngbin0 -> 161 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/rssnews/rssnews.qml101
-rw-r--r--basicsuite/qt5-everywhere/demos/rssnews/rssnews.qmlproject16
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/Block.qml114
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/BlockEmitter.qml57
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/Button.qml70
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/GameArea.qml226
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/LogoAnimation.qml102
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/MenuEmitter.qml53
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/PaintEmitter.qml98
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/PrimaryPack.qml122
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/PuzzleBlock.qml111
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/SamegameText.qml49
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/SimpleBlock.qml108
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/SmokeText.qml83
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/background-puzzle.pngbin0 -> 86666 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/background.pngbin0 -> 101018 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/bar.pngbin0 -> 10970 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/blue-puzzle.pngbin0 -> 2219 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/blue.pngbin0 -> 1018 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/bubble-highscore.pngbin0 -> 2276 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/bubble-puzzle.pngbin0 -> 2811 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-1.pngbin0 -> 2728 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-2.pngbin0 -> 3378 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-3.pngbin0 -> 1423 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-4.pngbin0 -> 2096 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-new.pngbin0 -> 3662 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-menu.pngbin0 -> 2391 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-puzzle-next.pngbin0 -> 3658 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-quit.pngbin0 -> 2100 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/green-puzzle.pngbin0 -> 2271 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/green.pngbin0 -> 1024 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/icon-fail.pngbin0 -> 6549 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/icon-ok.pngbin0 -> 7190 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/icon-time.pngbin0 -> 1159 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-a.pngbin0 -> 1814 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-e.pngbin0 -> 1725 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-g.pngbin0 -> 1765 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-m.pngbin0 -> 1743 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-s.pngbin0 -> 1791 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo.pngbin0 -> 3608 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/particle-brick.pngbin0 -> 861 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/particle-paint.pngbin0 -> 714 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/particle-smoke.pngbin0 -> 5409 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/red-puzzle.pngbin0 -> 2218 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/red.pngbin0 -> 1018 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-highscore-new.pngbin0 -> 6767 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-highscore.pngbin0 -> 3179 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-no-winner.pngbin0 -> 6321 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p1-go.pngbin0 -> 5395 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p1-won.pngbin0 -> 5618 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p1.pngbin0 -> 1751 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p2-go.pngbin0 -> 5874 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p2-won.pngbin0 -> 6177 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p2.pngbin0 -> 2381 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/yellow-puzzle.pngbin0 -> 2239 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/gfx/yellow.pngbin0 -> 1008 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/levels/TemplateBase.qml70
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/levels/level0.qml59
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/levels/level1.qml59
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/levels/level2.qml61
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/levels/level3.qml60
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/levels/level4.qml58
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/levels/level5.qml59
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/levels/level6.qml60
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/levels/level7.qml58
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/levels/level8.qml59
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/levels/level9.qml62
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/content/samegame.js581
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/samegame.qml371
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/samegame.qrc72
-rw-r--r--basicsuite/qt5-everywhere/demos/samegame/settings.js56
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/Content.qml99
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/EffectSelectionPanel.qml156
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/Effects/Effect.qml90
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/Effects/EffectBillboard.qml59
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/Effects/EffectBlackAndWhite.qml56
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/Effects/EffectEmboss.qml46
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/Effects/EffectGaussianBlur.qml85
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/Effects/EffectGlow.qml46
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/Effects/EffectIsolate.qml61
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/Effects/EffectPassThrough.qml46
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/Effects/EffectPixelate.qml56
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/Effects/EffectPosterize.qml58
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/Effects/EffectRipple.qml64
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/Effects/EffectSepia.qml46
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/Effects/EffectSharpen.qml56
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/Effects/EffectShockwave.qml80
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/Effects/EffectSobelEdgeDetection1.qml59
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/Effects/EffectToon.qml63
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/Effects/EffectVignette.qml46
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/Effects/EffectWarhol.qml46
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/Effects/EffectWobble.qml61
-rw-r--r--basicsuite/qt5-everywhere/demos/shaders/Logo.qml191
-rw-r--r--basicsuite/qt5-everywhere/demos/shaders/LogoContainer.qml87
-rw-r--r--basicsuite/qt5-everywhere/demos/shaders/ParameterPanel.qml107
-rw-r--r--basicsuite/qt5-everywhere/demos/shaders/Slider.qml138
-rw-r--r--basicsuite/qt5-everywhere/demos/shaders/images/particle-smoke.pngbin0 -> 5409 bytes
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/images/qt-logo.pngbin0 -> 11465 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/shaders/images/wallpaper.pngbin0 -> 225879 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/shaders/import/import.pro13
-rw-r--r--basicsuite/qt5-everywhere/demos/shaders/import/main.cpp62
-rw-r--r--basicsuite/qt5-everywhere/demos/shaders/import/plugin.json0
-rw-r--r--basicsuite/qt5-everywhere/demos/shaders/import/qmldir2
-rw-r--r--basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.cpp97
-rw-r--r--basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.h84
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/main.qml116
-rw-r--r--basicsuite/qt5-everywhere/demos/shaders/shaders.pro3
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/shaders/billboard.fsh74
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/shaders/blackandwhite.fsh62
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/shaders/emboss.fsh71
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/shaders/gaussianblur_h.fsh67
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/shaders/gaussianblur_v.fsh68
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/shaders/glow.fsh72
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/shaders/isolate.fsh88
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/shaders/pixelate.fsh64
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/shaders/posterize.fsh68
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/shaders/ripple.fsh78
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/shaders/selectionpanel.fsh41
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/shaders/sepia.fsh59
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/shaders/sharpen.fsh75
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/shaders/shockwave.fsh73
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/shaders/sobeledgedetection1.fsh83
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/shaders/toon.fsh92
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/shaders/vignette.fsh64
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/shaders/warhol.fsh66
-rwxr-xr-xbasicsuite/qt5-everywhere/demos/shaders/shaders/wobble.fsh62
-rw-r--r--basicsuite/qt5-everywhere/demos/touchgallery/content/AndroidDelegate.qml94
-rw-r--r--basicsuite/qt5-everywhere/demos/touchgallery/content/ButtonPage.qml121
-rw-r--r--basicsuite/qt5-everywhere/demos/touchgallery/content/CustomAppWindow.qml181
-rw-r--r--basicsuite/qt5-everywhere/demos/touchgallery/content/ProgressBarPage.qml114
-rw-r--r--basicsuite/qt5-everywhere/demos/touchgallery/content/SliderPage.qml102
-rw-r--r--basicsuite/qt5-everywhere/demos/touchgallery/content/TabBarPage.qml102
-rw-r--r--basicsuite/qt5-everywhere/demos/touchgallery/content/TextInputPage.qml106
-rw-r--r--basicsuite/qt5-everywhere/demos/touchgallery/images/NOTICE.txt2
-rw-r--r--basicsuite/qt5-everywhere/demos/touchgallery/images/button_default.pngbin0 -> 1406 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/touchgallery/images/button_pressed.pngbin0 -> 1694 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/touchgallery/images/navigation_next_item.pngbin0 -> 1341 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/touchgallery/images/navigation_previous_item.pngbin0 -> 1343 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/touchgallery/images/tab_selected.pngbin0 -> 217 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/touchgallery/images/tabs_standard.pngbin0 -> 1230 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/touchgallery/images/textinput.pngbin0 -> 4132 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/touchgallery/images/toolbar.pngbin0 -> 1643 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/touchgallery/main.qml135
-rw-r--r--basicsuite/qt5-everywhere/demos/video/Content.qml67
-rw-r--r--basicsuite/qt5-everywhere/demos/video/ContentVideo.qml71
-rw-r--r--basicsuite/qt5-everywhere/demos/video/ControlBar.qml290
-rw-r--r--basicsuite/qt5-everywhere/demos/video/ImageButton.qml77
-rw-r--r--basicsuite/qt5-everywhere/demos/video/PlaybackControl.qml61
-rw-r--r--basicsuite/qt5-everywhere/demos/video/ScrollBar.qml69
-rw-r--r--basicsuite/qt5-everywhere/demos/video/SeekControl.qml125
-rw-r--r--basicsuite/qt5-everywhere/demos/video/Slider.qml140
-rw-r--r--basicsuite/qt5-everywhere/demos/video/VideoDelegate.qml111
-rw-r--r--basicsuite/qt5-everywhere/demos/video/VideoSelector.qml158
-rw-r--r--basicsuite/qt5-everywhere/demos/video/VolumeControl.qml80
-rw-r--r--basicsuite/qt5-everywhere/demos/video/images/CloseButton.pngbin0 -> 534 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/video/images/PauseButton.pngbin0 -> 681 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/video/images/PlayButton.pngbin0 -> 1617 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/video/images/RateButtonForward.pngbin0 -> 3175 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/video/images/RateButtonReverse.pngbin0 -> 3289 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/video/images/StopButton.pngbin0 -> 534 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/video/images/VolumeDown.pngbin0 -> 814 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/video/images/VolumeUp.pngbin0 -> 1972 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/video/main.qml161
-rw-r--r--basicsuite/qt5-everywhere/demos/video/qt5_video_jens.pngbin0 -> 34519 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/video/qt5_video_kenneth.pngbin0 -> 42023 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/video/qt5_video_lars.pngbin0 -> 52829 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/video/qt5_video_samuel.pngbin0 -> 27869 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/video/qt5_video_simon.pngbin0 -> 33733 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/video/qt5_video_thiago.pngbin0 -> 31894 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/video/qt5_videos.xml33
-rw-r--r--basicsuite/qt5-everywhere/description.txt1
-rw-r--r--basicsuite/qt5-everywhere/engine.js302
-rw-r--r--basicsuite/qt5-everywhere/fonts/OFL.txt92
-rw-r--r--basicsuite/qt5-everywhere/fonts/PatrickHandSC-Regular.ttfbin0 -> 152608 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/box.pngbin0 -> 4666 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/box_open.pngbin0 -> 5722 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/btn_help.pngbin0 -> 2587 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/btn_home.pngbin0 -> 3354 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/btn_next.pngbin0 -> 3374 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/btn_previous.pngbin0 -> 3325 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/car_device.pngbin0 -> 8356 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/character0.pngbin0 -> 13119 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/character1.pngbin0 -> 15654 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/character10.pngbin0 -> 15243 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/character2.pngbin0 -> 12270 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/character3.pngbin0 -> 14991 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/character4.pngbin0 -> 15077 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/character5.pngbin0 -> 13011 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/character6.pngbin0 -> 15671 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/character7.pngbin0 -> 13589 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/character8.pngbin0 -> 12914 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/character9.pngbin0 -> 18085 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/cloud1.pngbin0 -> 2860 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/cloud2.pngbin0 -> 3043 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/hand.pngbin0 -> 32258 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/highlight_mask.pngbin0 -> 10666 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/island.pngbin0 -> 50597 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/laptop1.pngbin0 -> 12899 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/laptop2.pngbin0 -> 12448 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/man1.pngbin0 -> 12878 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/medical_device.pngbin0 -> 23780 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/mountain.pngbin0 -> 5304 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/particle-smoke.pngbin0 -> 5409 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/phone1.pngbin0 -> 19454 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/phone2.pngbin0 -> 10535 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/phone3.pngbin0 -> 11835 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/stones.pngbin0 -> 3041 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/tablet1.pngbin0 -> 18363 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/tree1.pngbin0 -> 2128 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/tree2.pngbin0 -> 1747 bytes
-rw-r--r--basicsuite/qt5-everywhere/images/tv.pngbin0 -> 18685 bytes
-rw-r--r--basicsuite/qt5-everywhere/main.qml242
-rw-r--r--basicsuite/qt5-everywhere/preview_l.jpgbin0 -> 34331 bytes
-rw-r--r--basicsuite/qt5-everywhere/qt5-everywhere.pro5
-rw-r--r--basicsuite/qt5-everywhere/style.js49
-rw-r--r--basicsuite/qt5-everywhere/title.txt1
356 files changed, 16645 insertions, 0 deletions
diff --git a/basicsuite/qt5-everywhere/Button.qml b/basicsuite/qt5-everywhere/Button.qml
new file mode 100644
index 0000000..43e93b8
--- /dev/null
+++ b/basicsuite/qt5-everywhere/Button.qml
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+ width: (app.height + app.width) * 0.04
+ height: width
+
+ property string imageSource : ""
+ property double rotation: 0
+ signal clicked()
+
+ Image {
+ id: buttonImage
+ anchors.fill: root
+ anchors.margins: 0
+ source: root.imageSource
+ opacity: 1.0
+ rotation: root.rotation
+ }
+
+ MouseArea {
+ id: buttonMouseArea
+ anchors.fill: root
+ anchors.margins: -20
+ hoverEnabled: true
+ onClicked: root.clicked()
+ onEntered: buttonImage.anchors.margins = -(root.width * 0.1)
+ onExited: buttonImage.anchors.margins = 0
+ onPressed: {buttonImage.opacity = 0.7; buttonImage.anchors.margins = -(root.width * 0.1)}
+ onReleased: { buttonImage.opacity = 1.0; buttonImage.anchors.margins = 0}
+ }
+}
diff --git a/basicsuite/qt5-everywhere/Cloud.qml b/basicsuite/qt5-everywhere/Cloud.qml
new file mode 100644
index 0000000..b399308
--- /dev/null
+++ b/basicsuite/qt5-everywhere/Cloud.qml
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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: cloudRoot
+ x: app.width
+ y: randomY+deltaY
+ width: app.width*0.2
+ height: width*0.4
+
+ property int duration: 20000
+ property string sourceImage: ""
+ property real deltaY: 0
+ property real randomY: app.height*0.3
+ property real amplitudeY: app.height*0.2
+
+ function start() {
+ recalculate()
+ cloudXAnimation.restart();
+ cloudYAnimation.restart();
+ }
+
+ function recalculate() {
+ cloudRoot.duration = Math.random()*15000 + 10000
+ cloudRoot.x = app.width
+ cloudRoot.randomY = Math.random()*app.height
+ cloudRoot.width = app.width*0.2
+ cloudRoot.height = cloudRoot.width*0.4
+ cloudRoot.scale = Math.random()*0.6 + 0.7
+ }
+
+ Image {
+ id: cloud
+ anchors.fill: cloudRoot
+ source: cloudRoot.sourceImage
+ }
+
+ SequentialAnimation{
+ id: cloudYAnimation
+ NumberAnimation { target: cloudRoot; property: "deltaY"; duration: cloudRoot.duration*0.3; from: 0; to:cloudRoot.amplitudeY; easing.type: Easing.InOutQuad }
+ NumberAnimation { target: cloudRoot; property: "deltaY"; duration: cloudRoot.duration*0.3; from: cloudRoot.amplitudeY; to:0; easing.type: Easing.InOutQuad }
+ running: true
+ onRunningChanged: {
+ if (!running) {
+ cloudRoot.amplitudeY = Math.random() * (app.height*0.2)
+ restart()
+ }
+ }
+ }
+
+ NumberAnimation {
+ id: cloudXAnimation
+ target: cloudRoot
+ property: "x"
+ duration: cloudRoot.duration
+ to:-cloudRoot.width
+ running: true
+
+ onRunningChanged: {
+ if (!running) {
+ recalculate()
+ restart()
+ }
+ }
+ }
+}
diff --git a/basicsuite/qt5-everywhere/DialogButton.qml b/basicsuite/qt5-everywhere/DialogButton.qml
new file mode 100644
index 0000000..7f24e5d
--- /dev/null
+++ b/basicsuite/qt5-everywhere/DialogButton.qml
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+ radius: 10
+ height: 0.3 * dialog.height
+ width: dialog.width * 0.5 - dialog.dialogMargin
+ color: "transparent"
+
+ property string buttonText
+ signal clicked()
+
+ Text {
+ anchors.centerIn: parent
+ text: button.buttonText
+ font.pixelSize: 0.4 * button.height
+ color: "#ffffff"
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onPressed: parent.color = Qt.rgba(0.2, 0.2, 0.2, 0.4)
+ onReleased: parent.color = "transparent"
+ onClicked: button.clicked()
+ }
+}
diff --git a/basicsuite/qt5-everywhere/Element.qml b/basicsuite/qt5-everywhere/Element.qml
new file mode 100644
index 0000000..097a3fc
--- /dev/null
+++ b/basicsuite/qt5-everywhere/Element.qml
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+ width: 1
+ height: 1
+
+ property int itemId : 1
+
+ Image {
+ id: elementImage
+ anchors.centerIn: root
+ z: 5
+ }
+
+ Component.onCompleted: {
+ elementImage.source = root.itemId === 1 ? "images/tree1.png" :
+ root.itemId === 2 ? "images/tree2.png" :
+ root.itemId === 3 ? "images/mountain.png" :
+ root.itemId === 4 ? "images/stones.png" :
+ root.itemId === 5 ? "images/box_open.png" :
+ root.itemId === 6 ? "images/box.png" :
+ root.itemId === 10 ? "images/character0.png" :
+ root.itemId === 11 ? "images/character1.png" :
+ root.itemId === 12 ? "images/character3.png" :
+ root.itemId === 13 ? "images/character7.png" :
+ root.itemId === 14 ? "images/character8.png" :
+ root.itemId === 15 ? "images/character9.png" :
+ root.itemId === 20 ? "images/character2.png" :
+ root.itemId === 21 ? "images/character4.png" :
+ root.itemId === 22 ? "images/character5.png" :
+ root.itemId === 23 ? "images/character6.png" :
+ root.itemId === 24 ? "images/character10.png" :
+ ""
+ }
+}
diff --git a/basicsuite/qt5-everywhere/Group.qml b/basicsuite/qt5-everywhere/Group.qml
new file mode 100644
index 0000000..6ee3304
--- /dev/null
+++ b/basicsuite/qt5-everywhere/Group.qml
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 "style.js" as Style
+
+Item {
+ id: group
+ objectName: "group"
+
+ property int uid: 0
+ property real targetScale: 1
+ property int textX: 0
+ property int textY: 0
+ property string name: "Text"
+ property real imageScale: 6.0
+
+ property int fontSize: 160
+ property string uiFont: Style.FONT_FAMILY
+ property bool bold: true
+ property int fontTransition: 6
+
+ Text {
+ text: group.name
+ x: textX
+ y: textY
+ font.pixelSize: group.fontSize
+ font.family: Style.FONT_FAMILY
+ font.bold: group.bold
+ color: "#42200a"
+ smooth: true
+
+ Text {
+ text: group.name
+ color: "#1d6cb0"
+ x:group.fontTransition
+ y:-group.fontTransition
+ font.pixelSize: group.fontSize
+ font.family: Style.FONT_FAMILY
+ font.bold: group.bold
+ smooth: true
+ }
+ }
+}
diff --git a/basicsuite/qt5-everywhere/HelpScreen.qml b/basicsuite/qt5-everywhere/HelpScreen.qml
new file mode 100644
index 0000000..3fb540c
--- /dev/null
+++ b/basicsuite/qt5-everywhere/HelpScreen.qml
@@ -0,0 +1,329 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 "style.js" as Style
+
+Item {
+ id: root
+ anchors.fill:parent
+ property int delay: 500
+ property int rotationAngle:0
+
+ SequentialAnimation {
+ id: closeAnimation
+
+ ScriptAction{
+ script: {
+ pointer.visible = false
+ instructionText.text = ""
+ instructionText2.text = ""
+ highlightImage.smooth = false
+ highlight.size = Math.max(root.height, root.width)*2.5
+ }
+ }
+
+ PauseAnimation { duration: root.delay }
+
+ onRunningChanged: if (!running){
+ stopAnimations()
+ root.visible=false
+ highlight.size=0
+ highlightImage.smooth = true
+ }
+ }
+
+
+ Item{
+ id: highlight
+ property int size: 0
+ property bool hidden: false
+ width:1
+ height:1
+ Behavior on x {NumberAnimation{duration: root.delay}}
+ Behavior on y {NumberAnimation{duration: root.delay}}
+ Behavior on size {id: sizeBehavior; NumberAnimation{duration: root.delay}}
+ }
+
+ Image{
+ id: highlightImage
+ anchors.centerIn: highlight
+ width: highlight.hidden? 0: highlight.size
+ height: highlight.hidden? 0: highlight.size
+ source: "images/highlight_mask.png"
+ opacity: .8
+ smooth: true
+ }
+
+ Rectangle{
+ id: top
+ anchors {left:parent.left; top: parent.top; right: parent.right; bottom: highlightImage.top}
+ color: "black"
+ opacity: .8
+ }
+
+ Rectangle{
+ id: bottom
+ anchors {left:parent.left; top: highlightImage.bottom; right: parent.right; bottom: parent.bottom}
+ color: "black"
+ opacity: .8
+ }
+
+ Rectangle{
+ id: left
+ anchors {left:parent.left; top: highlightImage.top; right: highlightImage.left; bottom: highlightImage.bottom}
+ color: "black"
+ opacity: .8
+ }
+
+ Rectangle{
+ id: right
+ anchors {left:highlightImage.right; top: highlightImage.top; right: parent.right; bottom: highlightImage.bottom}
+ color: "black"
+ opacity: .8
+ }
+
+ Text{
+ id: instructionText
+ anchors {horizontalCenter: parent.horizontalCenter; top: parent.top; topMargin: parent.height*.05}
+ text: ""
+ font.pixelSize: parent.width*.075
+ font.family: Style.FONT_FAMILY
+ smooth: true
+ color: "white"
+
+ Text{
+ id: instructionText2
+ anchors {horizontalCenter: parent.horizontalCenter; top: parent.bottom; topMargin: -parent.height/2}
+ text: ""
+ font.pixelSize: parent.font.pixelSize
+ font.family: Style.FONT_FAMILY
+ smooth: true
+ color: "white"
+ }
+ }
+
+ Item{
+ id: pointer
+ width: parent.width*.3
+ height: parent.width*.3
+
+ Image{
+ id: handImage
+ width: parent.width*.8
+ height: width
+ source: "images/hand.png"
+ y: parent.height/2-height/2
+ x: parent.width/2-width/2+deltaX
+ property int deltaX:0
+ anchors.verticalCenter: parent.verticalCenter
+ rotation: 90
+
+ SequentialAnimation{
+ id: pointingAnimation
+ PauseAnimation { duration: root.delay}
+ NumberAnimation{
+ target: handImage
+ property: "deltaX"
+ from: -handImage.width*.2
+ to: handImage.width*.2
+ duration: 500
+ easing.type: Easing.InOutCubic
+ }
+ PauseAnimation { duration: 200 }
+ NumberAnimation{
+ target: handImage
+ property: "deltaX"
+ from: handImage.width*.2
+ to: -handImage.width*.2
+ duration: 500
+ easing.type: Easing.InOutCubic
+
+ }
+ }
+
+ }
+ }
+
+ SequentialAnimation {
+ id: helpAnimation
+ loops: Animation.Infinite
+
+ PauseAnimation { duration: 1000 }
+ PropertyAction { target: handImage; property: "mirror"; value: true}
+ PropertyAction { target: instructionText; property: "text"; value: "Tap on the devices to"}
+ PropertyAction { target: instructionText2; property: "text"; value: "open applications"}
+ PropertyAction { target: pointer; property: "visible"; value: true}
+ PropertyAction { target: highlight; property: "hidden"; value: false}
+
+ SequentialAnimation {
+ id: clickAnimation
+ property int index: 0
+ property variant uids: [8,12]
+ loops: 2
+
+ ScriptAction{
+ script: {
+ clickAnimation.index+=1
+ if (clickAnimation.index>=clickAnimation.uids.length) clickAnimation.index=0
+ }
+ }
+
+ ScriptAction{
+ script: {
+ highlight.size= (700+clickAnimation.index*100)*canvas.scalingFactor
+
+ highlight.x=root.width/2 +getPosition(clickAnimation.uids[clickAnimation.index]).x*canvas.scalingFactor
+ highlight.y=root.height/2 +getPosition(clickAnimation.uids[clickAnimation.index]).y*canvas.scalingFactor
+
+ pointer.x= root.width/2 -pointer.width/2 +getPosition(clickAnimation.uids[clickAnimation.index]).x*canvas.scalingFactor*.5
+ pointer.y= root.height/2 -pointer.height/2 +getPosition(clickAnimation.uids[clickAnimation.index]).y*canvas.scalingFactor*.5
+ pointer.rotation=Math.atan2(getPosition(clickAnimation.uids[clickAnimation.index]).y*canvas.scalingFactor, getPosition(clickAnimation.uids[clickAnimation.index]).x*canvas.scalingFactor)*180.0/Math.PI
+ pointingAnimation.restart()
+ }
+ }
+
+ PauseAnimation { duration: 3000 }
+ }
+ PauseAnimation { duration: 1000 }
+
+ SequentialAnimation{
+ id: navigationAnimation
+ PropertyAction { target: handImage; property: "mirror"; value: false}
+ PropertyAction { target: instructionText; property: "text"; value: "Use the Arrow to navigate"}
+ PropertyAction { target: instructionText2; property: "text"; value: "between applications"}
+ ScriptAction{
+ script: {
+ highlight.size= Math.min(root.width, root.height)*.4
+
+ var _x=0;
+ var _y=0;
+
+ if (root.width > root.height){
+ _x = navigationPanel.x+navigationPanel.width /2
+ _y = navigationPanel.y+navigationPanel.height*.33
+ pointer.x= root.width/2 -pointer.width/2 +root.width*.2
+ pointer.y= root.height/2 -pointer.height/2
+ highlight.x=_x
+ highlight.y=_y
+
+ }else{
+ _x=navigationPanel.x+navigationPanel.width*.33
+ _y=navigationPanel.y + navigationPanel.height /2
+ pointer.x= root.width/2 -pointer.width/2
+ pointer.y= root.height/2 -pointer.height/2 +root.height*.2
+ highlight.x=_x
+ highlight.y=_y
+ }
+
+ pointer.rotation=Math.atan2(_y-(pointer.y+pointer.height/2), _x-(pointer.x+pointer.width/2))*180.0/Math.PI
+
+ pointingAnimation.restart()
+ }
+ }
+ PauseAnimation { duration: 5000 }
+
+ PropertyAction { target: instructionText; property: "text"; value: "Use the Home button to"}
+ PropertyAction { target: instructionText2; property: "text"; value: "return to the beginning"}
+ ScriptAction{
+ script: {
+ highlight.size= Math.min(root.width, root.height)*.3
+
+ var _x=0;
+ var _y=0;
+
+ if (root.width > root.height){
+ _x = navigationPanel.x+navigationPanel.width /2
+ _y = navigationPanel.y+navigationPanel.height-navigationPanel.width /2
+ pointer.x= root.width/2 -pointer.width/2 +root.width*.2
+ pointer.y= root.height/2 -pointer.height/2
+ highlight.x=_x
+ highlight.y=_y
+
+ }else{
+ _x=navigationPanel.x+navigationPanel.width-navigationPanel.height /2
+ _y=navigationPanel.y + navigationPanel.height /2
+ pointer.x= root.width/2 -pointer.width/2
+ pointer.y= root.height/2 -pointer.height/2 +root.height*.2
+ highlight.x=_x
+ highlight.y=_y
+ }
+ pointer.rotation=Math.atan2(_y-(pointer.y+pointer.height/2), _x-(pointer.x+pointer.width/2))*180.0/Math.PI
+
+ pointingAnimation.restart()
+ }
+ }
+ PauseAnimation { duration: 5000 }
+ }
+
+ }
+
+ onWidthChanged: if (visible) show()
+ onHeightChanged: if (visible) show()
+
+ function show(){
+ highlight.hidden = true
+
+ pointer.visible = false
+ rotationAngle = 0
+
+ startAnimations()
+ visible = true
+ }
+
+ function startAnimations(){
+ pointingAnimation.restart()
+ helpAnimation.restart()
+ }
+
+ function stopAnimations(){
+ pointingAnimation.stop()
+ helpAnimation.stop()
+ }
+
+ MouseArea{
+ anchors.fill: root
+ onClicked: {
+ stopAnimations()
+ closeAnimation.restart()
+ }
+ }
+}
+
diff --git a/basicsuite/qt5-everywhere/IslandElementContainer.qml b/basicsuite/qt5-everywhere/IslandElementContainer.qml
new file mode 100644
index 0000000..c191d68
--- /dev/null
+++ b/basicsuite/qt5-everywhere/IslandElementContainer.qml
@@ -0,0 +1,158 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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: elementContainer
+
+ width: place == 2 ? parent.width : (islandWidth-parent.width)/2
+ height: place == 2 ? 0.1*islandHeight : 0.4*islandHeight
+ x: place == 0 ? -width : place == 1 ? parent.width : 0
+ y: place == 2 ? parent.height : (parent.height - height*0.6)
+
+ property int place : 0
+ property int itemWidth : islandWidth * 0.1
+ property int islandWidth: 100
+ property int islandHeight: 100
+
+ function createElement(xx, yy, itemId) {
+ var component = Qt.createComponent("Element.qml")
+ if (component.status === Component.Ready)
+ component.createObject(elementContainer, {"x": xx, "y": yy, "itemId": itemId});
+ }
+
+ function createElements()
+ {
+ // Left side
+ if (place === 0) {
+ var temp0 = Math.floor(Math.random()*6.9);
+ switch(temp0) {
+ case 0:
+ createElement(elementContainer.width*0.4, elementContainer.height*0.2, 1);
+ createElement(elementContainer.width*0.25, elementContainer.height*0.3, 1);
+ createElement(elementContainer.width*0.15, elementContainer.height*0.5, 1);
+ createElement(elementContainer.width*0.55, elementContainer.height*0.4, 1);
+ break;
+ case 1:
+ createElement(elementContainer.width*0.6, elementContainer.height*0.1, 1);
+ createElement(elementContainer.width*0.4, elementContainer.height*0.2, 1);
+ createElement(elementContainer.width*0.7, elementContainer.height*0.3, 1);
+ createElement(elementContainer.width*0.3, elementContainer.height*0.5, 1);
+ break;
+ case 2:
+ createElement(elementContainer.width*0.6, elementContainer.height*0.1, 3);
+ createElement(elementContainer.width*0.4, elementContainer.height*0.6, 4);
+ createElement(elementContainer.width*0.8, elementContainer.height*0.8, 4);
+ break;
+ case 3:
+ createElement(elementContainer.width*0.6, elementContainer.height*0.1, 3);
+ createElement(elementContainer.width*0.4, elementContainer.height*0.4, 1);
+ createElement(elementContainer.width*0.5, elementContainer.height*0.5, 2);
+ createElement(elementContainer.width*0.7, elementContainer.height*0.6, 2);
+ break;
+ case 4:
+ case 5:
+ var characterId = 10 + Math.floor(Math.random()*5.9);
+ createElement(elementContainer.width*0.7, elementContainer.height*0.3, characterId);
+ break;
+ default: break;
+ }
+ }
+ else if (place === 1) {
+ var temp1 = Math.floor(Math.random()*6.9);
+ switch(temp1) {
+ case 0:
+ createElement(elementContainer.width*0.6, elementContainer.height*0.2, 1);
+ createElement(elementContainer.width*0.75, elementContainer.height*0.3, 1);
+ createElement(elementContainer.width*0.85, elementContainer.height*0.5, 1);
+ createElement(elementContainer.width*0.45, elementContainer.height*0.4, 1);
+ break;
+ case 1:
+ createElement(elementContainer.width*0.4, elementContainer.height*0.1, 1);
+ createElement(elementContainer.width*0.6, elementContainer.height*0.2, 1);
+ createElement(elementContainer.width*0.3, elementContainer.height*0.3, 1);
+ createElement(elementContainer.width*0.7, elementContainer.height*0.5, 1);
+ break;
+ case 2:
+ createElement(elementContainer.width*0.4, elementContainer.height*0.1, 3);
+ createElement(elementContainer.width*0.6, elementContainer.height*0.6, 4);
+ createElement(elementContainer.width*0.2, elementContainer.height*0.8, 4);
+ break;
+ case 3:
+ createElement(elementContainer.width*0.4, elementContainer.height*0.1, 3);
+ createElement(elementContainer.width*0.6, elementContainer.height*0.4, 2);
+ createElement(elementContainer.width*0.5, elementContainer.height*0.5, 1);
+ createElement(elementContainer.width*0.3, elementContainer.height*0.6, 2);
+ break;
+ case 4:
+ case 5:
+ var characterId1 = 20 + Math.floor(Math.random()*4.9);
+ createElement(elementContainer.width*0.3, elementContainer.height*0.3, characterId1);
+ break;
+ default: break;
+ }
+ }
+ else {
+ var temp2 = Math.floor(Math.random()*4.9);
+ switch(temp2) {
+ case 0:
+ createElement(elementContainer.width*0.8, elementContainer.height*0.8, 5);
+ createElement(elementContainer.width*0.4, elementContainer.height*0.5, 5);
+ break;
+ case 1:
+ createElement(elementContainer.width*0.1, elementContainer.height*0.5, 1);
+ createElement(elementContainer.width*0.2, elementContainer.height*0.9, 2);
+ createElement(elementContainer.width*0.6, elementContainer.height*0.8, 4);
+ break;
+ case 2:
+ createElement(elementContainer.width*0.2, elementContainer.height*0.5, 6);
+ createElement(elementContainer.width*0.7, elementContainer.height*0.6, 2);
+ createElement(elementContainer.width*0.6, elementContainer.height*0.7, 1);
+ break;
+ case 3:
+ createElement(elementContainer.width*0.2, elementContainer.height*0.8, 6);
+ createElement(elementContainer.width*0.7, elementContainer.height*0.6, 6);
+ break;
+ default: break;
+ }
+ }
+ }
+}
diff --git a/basicsuite/qt5-everywhere/NavigationPanel.qml b/basicsuite/qt5-everywhere/NavigationPanel.qml
new file mode 100644
index 0000000..e73cc7f
--- /dev/null
+++ b/basicsuite/qt5-everywhere/NavigationPanel.qml
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+
+Grid {
+ id: root
+
+ function checkOrientation() {
+ root.spacing = (app.height + app.width) * 0.02
+
+ if (app.width >= app.height) {
+ root.columns = 1
+ root.anchors.bottom = undefined
+ root.anchors.horizontalCenter = undefined
+ root.anchors.right = app.right
+ root.anchors.verticalCenter = app.verticalCenter
+ root.anchors.rightMargin = app.width * 0.02
+ root.anchors.bottomMargin = 0
+ }
+ else {
+ root.columns = 3
+ root.anchors.right = undefined
+ root.anchors.verticalCenter = undefined
+ root.anchors.bottom = app.bottom
+ root.anchors.horizontalCenter = app.horizontalCenter
+ root.anchors.rightMargin = 0
+ root.anchors.bottomMargin = app.width * 0.02
+ }
+ }
+
+ Button {
+ id: nextButton
+ imageSource: "images/btn_next.png"
+ onClicked: canvas.goNext()
+ }
+
+ Button {
+ id: prevButton
+ imageSource: "images/btn_previous.png"
+ onClicked: canvas.goPrevious()
+ }
+
+ Button {
+ id: homeButton
+ imageSource: app.navigationState === 0 && !helpscreen.visible ? "images/btn_help.png" : "images/btn_home.png"
+ onClicked: {
+ if (app.navigationState===0){
+ helpscreen.show()
+ return;
+ }
+ canvas.goBack()
+ }
+ }
+}
diff --git a/basicsuite/qt5-everywhere/QtLogo.png b/basicsuite/qt5-everywhere/QtLogo.png
new file mode 100644
index 0000000..7b5c533
--- /dev/null
+++ b/basicsuite/qt5-everywhere/QtLogo.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/QuitDialog.qml b/basicsuite/qt5-everywhere/QuitDialog.qml
new file mode 100644
index 0000000..897afb9
--- /dev/null
+++ b/basicsuite/qt5-everywhere/QuitDialog.qml
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+ anchors.fill: parent
+ color: Qt.rgba(0.0, 0.0, 0.0, 0.7)
+
+ signal yes()
+ signal no()
+
+ MouseArea {
+ anchors.fill: parent
+ }
+
+ Rectangle {
+ id: dialog
+ anchors.centerIn: parent
+ width: dialogText.paintedWidth * 1.1
+ height: parent.height * 0.3
+ property double dialogMargin: height * 0.05
+
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "#222222" }
+ GradientStop { position: 0.3; color: "#000000" }
+ GradientStop { position: 1.0; color: "#111111" }
+ }
+ radius: 10
+ border { color: "#999999"; width: 1 }
+
+ Item {
+ id: content
+ anchors { left: parent.left; right: parent.right; top: parent.top }
+ height: dialog.height * 0.6
+
+ Text {
+ id: dialogText
+ anchors.centerIn: parent
+ verticalAlignment: Text.AlignVCenter
+ text: qsTr("Are you sure you want to quit?")
+ color: "#ffffff"
+ font.pixelSize: 0.2 *content.height
+ }
+ }
+
+ Rectangle {
+ id: line
+ anchors { left: parent.left; right: parent.right; top: content.bottom }
+ anchors.leftMargin: dialog.dialogMargin
+ anchors.rightMargin: dialog.dialogMargin
+ height: 1
+ color: "#777777"
+ }
+
+ DialogButton {
+ anchors { bottom: dialog.bottom; left:dialog.left; bottomMargin: dialog.dialogMargin; leftMargin: dialog.dialogMargin }
+ buttonText: "Yes"
+ onClicked: root.yes()
+ }
+ DialogButton {
+ anchors { bottom: dialog.bottom; right:dialog.right; bottomMargin: dialog.dialogMargin; rightMargin: dialog.dialogMargin }
+ buttonText: "No"
+ onClicked: root.no()
+ }
+
+ }
+
+}
diff --git a/basicsuite/qt5-everywhere/Slide.qml b/basicsuite/qt5-everywhere/Slide.qml
new file mode 100644
index 0000000..36e0b08
--- /dev/null
+++ b/basicsuite/qt5-everywhere/Slide.qml
@@ -0,0 +1,252 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 "style.js" as Style
+
+Item {
+ id: slide
+ objectName: "slide"
+
+ property int uid: 0
+ property int gid: 0
+ property string url: ""
+ property int device: 0
+ property string imageSource: ""
+ property bool loaded: false
+ property bool loading: false
+ property real targetScale: 1
+ property bool animationRunning: navigationAnimation.running || zoomAnimation.running
+ property int demoWidth: 603
+ property int demoHeight: 378
+ property int maskVerticalOffset: 51
+ property int maskHorizontalOffset: 1
+ property string demoColor: "#4353c3"
+ property string name: ""
+
+ function targetWidth()
+ {
+ return demoWidth*scale;
+ }
+
+ function targetHeight()
+ {
+ return demoHeight*scale;
+ }
+
+ Rectangle {
+ id: demoBackground
+ anchors.centerIn: parent
+ width: demoContainer.width * 1.03
+ height: demoContainer.height * 1.03
+ color: "black"
+ z: slide.loading || slide.loaded ? 1:-1
+
+ Rectangle{
+ id: demoContainer
+ anchors.centerIn: parent
+ width: demoWidth
+ height: demoHeight
+ color: demoColor
+ clip: true
+
+ Text {
+ id: splashScreenText
+ color: 'white'
+ font.pixelSize: parent.width *.2
+ font.family: Style.FONT_FAMILY
+ text: slide.name
+ anchors.centerIn: parent
+ smooth: true
+ visible: true
+ }
+ }
+ }
+
+ ShaderEffectSource{
+ id: demo
+ anchors.centerIn: parent
+ width: demoWidth
+ height: demoHeight
+ sourceItem: demoContainer
+ live: false
+ visible: (hasSnapshot && !slide.loaded) || updating
+ hideSource: visible && !updating && !loading
+ clip: true
+
+ property bool updating: false
+ property bool hasSnapshot: false
+
+ onScheduledUpdateCompleted: {
+ updating = false
+ hasSnapshot = true
+ releaseDemo(true)
+ }
+ }
+
+ Image {
+ id: deviceMaskImage
+ anchors.centerIn: parent
+ anchors.verticalCenterOffset: maskVerticalOffset
+ anchors.horizontalCenterOffset: maskHorizontalOffset
+ smooth: !animationRunning
+ antialiasing: !animationRunning
+ source: slide.imageSource
+ width: slide.width
+ height: slide.height
+ z: 2
+
+ IslandElementContainer { id: leftElementcontainer; place: 0; islandHeight: islandImage.height; islandWidth: islandImage.width }
+ IslandElementContainer { id: rightElementcontainer;place: 1; islandHeight: islandImage.height; islandWidth: islandImage.width }
+ IslandElementContainer { id: bottomElementcontainer;place: 2; islandHeight: islandImage.height; islandWidth: islandImage.width }
+ }
+
+ Image {
+ id: islandImage
+ anchors.top: deviceMaskImage.bottom
+ anchors.topMargin: -height * 0.3
+ anchors.horizontalCenter: deviceMaskImage.horizontalCenter
+ source: "images/island.png"
+ smooth: !animationRunning
+ antialiasing: !animationRunning
+ width: Math.max(deviceMaskImage.width, deviceMaskImage.height) * 1.6
+ height: width/2
+ z: -3
+ }
+
+ // Load timer
+ Timer {
+ id: loadTimer
+ interval: 5
+ running: false
+ repeat: false
+ onTriggered: {
+ loadSplashScreen();
+ load()
+ }
+ }
+
+ function loadDemo(){
+ if (!slide.loaded)
+ {
+ splashScreenText.visible = true
+ loadTimer.start();
+ } else if (slide.url==="demos/radio/radio.qml"){
+ for (var i =0; i<demoContainer.children.length; i++){
+ if (demoContainer.children[i].objectName === "demoApp"){
+ demoContainer.children[i].focus = true;
+ }
+ }
+ }
+ }
+
+ function load() {
+ if (!slide.url || slide.loaded) return;
+
+ print("CREATING DEMO: "+ slide.url)
+ var component = Qt.createComponent(slide.url);
+ print ("CREATED: "+slide.url)
+ var incubator = component.incubateObject(demoContainer, { x: 0, y: 0, objectName: "demoApp" });
+ if (incubator.status !== Component.Ready) {
+ incubator.onStatusChanged = function(status) {
+ if (status === Component.Ready) {
+ print ("Object", incubator.object, "is now ready!");
+ slide.loaded = true
+ releaseSplashScreen()
+ }
+ }
+ } else {
+ print ("Object", incubator.object, "is ready immediately!");
+ slide.loaded = true
+ releaseSplashScreen()
+ }
+ }
+
+ function loadSplashScreen()
+ {
+ slide.loading = true
+ var splash = Qt.createComponent("SplashScreen.qml");
+ if (splash.status === Component.Ready)
+ splash.createObject(demoContainer, {objectName: "splashScreen", text: slide.name});
+ }
+
+ function releaseSplashScreen()
+ {
+ splashScreenText.visible = false
+ slide.loading = false
+ for (var i =0; i<demoContainer.children.length; i++){
+ if (demoContainer.children[i].objectName === "splashScreen"){
+ demoContainer.children[i].explode();
+ }
+ }
+ }
+
+ function releaseDemo(snapShotCreated){
+ if (!slide.loaded) return;
+ if (!snapShotCreated){
+ demo.updating = true
+ demo.scheduleUpdate()
+ return;
+ }
+
+ if (slide.url === "demos/radio/radio.qml")
+ return; //Always alive
+
+ app.forceActiveFocus();
+
+ if (!slide.loaded)
+ return;
+
+ slide.loaded = false;
+
+ for (var i =0; i<demoContainer.children.length; i++){
+ if (demoContainer.children[i].objectName === "demoApp"){
+ demoContainer.children[i].destroy(500);
+ }
+ }
+ }
+
+ function createElements()
+ {
+ leftElementcontainer.createElements()
+ rightElementcontainer.createElements()
+ bottomElementcontainer.createElements()
+ }
+}
diff --git a/basicsuite/qt5-everywhere/SplashScreen.qml b/basicsuite/qt5-everywhere/SplashScreen.qml
new file mode 100644
index 0000000..42dd8d3
--- /dev/null
+++ b/basicsuite/qt5-everywhere/SplashScreen.qml
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 "style.js" as Style
+//based on the SmokeText component from SameGame
+
+Item {
+ id: root
+ anchors.fill: parent
+ z:1
+
+ property alias text: txt.text
+
+ Rectangle{
+ id: background
+ anchors.fill:parent
+ color: "black"
+ }
+
+ ParticleSystem{
+ id: particleSystem;
+ anchors.fill: parent
+
+ Text {
+ id: txt
+ color: 'white'
+ font.pixelSize: parent.width *.2
+ font.family: Style.FONT_FAMILY
+ anchors.centerIn: parent
+ smooth: true
+ }
+
+ Emitter {
+ id: emitter
+ anchors.fill: txt
+ enabled: false
+ emitRate: 1000
+ lifeSpan: 1500
+ size: parent.height * .2
+ endSize: parent.height * .1
+ velocity: AngleDirection { angleVariation: 360; magnitudeVariation: 160 }
+ }
+
+ ImageParticle {
+ id: smokeParticle
+ source: "images/particle-smoke.png"
+ alpha: 0.1
+ alphaVariation: 0.1
+ color: 'white'
+ }
+ }
+
+ SequentialAnimation {
+ id: anim
+ running: false
+ ScriptAction { script: emitter.pulse(100); }
+ NumberAnimation { target: txt; property: "opacity"; from: 1.0; to: 0.0; duration: 400}
+ NumberAnimation { target: background; property: "opacity"; from: 1.0; to: 0.0; duration: 1000}
+ PauseAnimation { duration: 200 }
+ onRunningChanged: if (!running) root.destroy();
+ }
+
+ function explode(){
+ anim.restart()
+ }
+}
diff --git a/basicsuite/qt5-everywhere/WorldCanvas.qml b/basicsuite/qt5-everywhere/WorldCanvas.qml
new file mode 100644
index 0000000..f73116b
--- /dev/null
+++ b/basicsuite/qt5-everywhere/WorldCanvas.qml
@@ -0,0 +1,145 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 "style.js" as Style
+
+Item{
+ id:canvas
+ width:1
+ height:1
+
+ x: app.width/2+xOffset
+ y: app.height/2+yOffset
+
+ property real xOffset: 0
+ property real yOffset: 0
+ property real angle: 0
+
+ property real zoomInTarget: 5
+ property real scalingFactor: 5
+
+ property real rotationOriginX
+ property real rotationOriginY
+
+ function goHome()
+ {
+ worldMouseArea.panning = false
+ xOffset = 0; //(app.homeCenterX * app.homeScaleFactor);
+ yOffset = 0; //(-app.homeCenterY * app.homeScaleFactor);
+ rotationOriginX = 0;
+ rotationOriginY = 0;
+ angle = 0;
+ zoomInTarget = app.homeScaleFactor;
+ app.navigationState = 0 //home
+ app.forceActiveFocus()
+ zoomAnimation.restart();
+ }
+ function goTo(target, updateScalingFactor)
+ {
+ if (target)
+ {
+ worldMouseArea.panning = false
+ xOffset = -target.x;
+ yOffset = -target.y;
+ rotationOriginX = target.x;
+ rotationOriginY = target.y;
+ angle = 0
+ zoomInTarget = target.targetScale;
+ if (updateScalingFactor)
+ scalingFactor = zoomInTarget
+ app.navigationState = target.navState
+ }
+ }
+
+ function goNext() {
+ goTo(app.getNext(), false);
+ navigationAnimation.restartAnimation()
+ }
+ function goPrevious() {
+ goTo(app.getPrevious(), false);
+ navigationAnimation.restartAnimation()
+ }
+
+ function goBack()
+ {
+ if (app.useGroups && app.navigationState == 2) {
+ goTo(app.getCurrentGroup(), false)
+ zoomAnimation.restart()
+ }
+ else
+ canvas.goHome()
+ }
+
+ Behavior on xOffset {
+ id: xOffsetBehaviour
+ enabled: !worldMouseArea.panning
+ NumberAnimation{duration: Style.APP_ANIMATION_DELAY}
+ }
+
+ Behavior on yOffset {
+ id: yOffsetBehaviour
+ enabled: !worldMouseArea.panning
+ NumberAnimation{duration: Style.APP_ANIMATION_DELAY}
+ }
+
+ Behavior on rotationOriginX {
+ NumberAnimation{
+ duration: Style.APP_ANIMATION_DELAY
+ }
+ }
+ Behavior on rotationOriginY {
+ NumberAnimation{
+ duration: Style.APP_ANIMATION_DELAY
+ }
+ }
+
+ transform: [
+
+ Scale{
+ id: canvasScale
+ origin.x: canvas.rotationOriginX
+ origin.y: canvas.rotationOriginY
+ xScale: canvas.scalingFactor
+ yScale :canvas.scalingFactor
+
+ }
+ ]
+}
diff --git a/basicsuite/qt5-everywhere/WorldMouseArea.qml b/basicsuite/qt5-everywhere/WorldMouseArea.qml
new file mode 100644
index 0000000..ee22054
--- /dev/null
+++ b/basicsuite/qt5-everywhere/WorldMouseArea.qml
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+
+MouseArea{
+ id: worldMouseArea
+ anchors.fill: parent
+
+ property int oldX: 0
+ property int oldY: 0
+ property int startMouseX: 0
+ property int startMouseY: 0
+ property bool panning: false
+
+ onReleased: {
+ var dx = mouse.x - startMouseX;
+ var dy = mouse.y - startMouseY;
+
+ // Check the point only if we didn't move the mouse too much
+ if (!mouse.wasHeld && Math.abs(dx) <= app.tapLimitX && Math.abs(dy) <= app.tapLimitY)
+ {
+ panning = false
+ var target = null;
+ var object = mapToItem(canvas, mouse.x, mouse.y)
+ var item = canvas.childAt(object.x,object.y)
+ if (item) {
+ if (item.objectName === 'slide')
+ target = app.selectTarget(item.uid)
+ else if (item.objectName === 'group')
+ target = app.selectGroup(item.uid)
+ }
+
+ // If we found target, go to the target
+ if (target) {
+ canvas.goTo(target, false, item.objectName === 'slide' ? 2 : 1)
+ zoomAnimation.restart()
+ }
+ else // If not target under mouse -> go home
+ canvas.goHome()
+ }
+ }
+
+ onPressed: {
+ // Save mouse state
+ oldX = mouse.x
+ oldY = mouse.y
+ startMouseX = mouse.x
+ startMouseY = mouse.y
+ }
+
+ onPositionChanged: {
+ var dx = mouse.x - oldX;
+ var dy = mouse.y - oldY;
+
+ oldX = mouse.x;
+ oldY = mouse.y;
+
+ if (!zoomAnimation.running && !navigationAnimation.running)
+ {
+ panning = true;
+ canvas.xOffset += dx;
+ canvas.yOffset += dy;
+ app.navigationState = 3 //dirty
+ }
+ }
+ onWheel: {
+ var newScalingFactor = canvas.scalingFactor
+ if (wheel.angleDelta.y > 0){
+ newScalingFactor+=canvas.scalingFactor*.05
+ }else{
+ newScalingFactor-=canvas.scalingFactor*.05
+ }
+ if (newScalingFactor < app.minScaleFactor) newScalingFactor = app.minScaleFactor
+ if (newScalingFactor > app.maxScaleFactor) newScalingFactor = app.maxScaleFactor
+ canvas.scalingFactor = newScalingFactor
+ }
+}
diff --git a/basicsuite/qt5-everywhere/app.pro b/basicsuite/qt5-everywhere/app.pro
new file mode 100644
index 0000000..be46a9c
--- /dev/null
+++ b/basicsuite/qt5-everywhere/app.pro
@@ -0,0 +1,16 @@
+TARGET = qt5-everywhere
+
+include(../shared/shared.pri)
+b2qtdemo_deploy_defaults()
+
+content.files = \
+ *.qml \
+ *.js \
+ fonts \
+ images \
+ demos
+content.path = $$DESTPATH
+
+OTHER_FILES += $${content.files}
+
+INSTALLS += target content
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/Calqlatr.qml b/basicsuite/qt5-everywhere/demos/calqlatr/Calqlatr.qml
new file mode 100644
index 0000000..39a0834
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/calqlatr/Calqlatr.qml
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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"
+import "content/calculator.js" as CalcEngine
+
+
+Rectangle {
+ id: window
+ anchors.fill: parent
+ color: "#272822"
+
+ function operatorPressed(operator) { CalcEngine.operatorPressed(operator) }
+ function digitPressed(digit) { CalcEngine.digitPressed(digit) }
+
+ Item {
+ id: pad
+ width: window.width * 0.58
+ height: window.height * 0.98
+ NumberPad { anchors.horizontalCenter: parent.horizontalCenter }
+ }
+
+ AnimationController {
+ id: controller
+ animation: ParallelAnimation {
+ id: anim
+ NumberAnimation { target: display; property: "x"; duration: 400; from: -16; to: window.width - display.width; easing.type: Easing.InOutQuad }
+ NumberAnimation { target: pad; property: "x"; duration: 400; from: window.width - pad.width; to: 0; easing.type: Easing.InOutQuad }
+ SequentialAnimation {
+ NumberAnimation { target: pad; property: "scale"; duration: 200; from: 1; to: 0.97; easing.type: Easing.InOutQuad }
+ NumberAnimation { target: pad; property: "scale"; duration: 200; from: 0.97; to: 1; easing.type: Easing.InOutQuad }
+ }
+ }
+ }
+
+ Display {
+ id: display
+ x: -16
+ width: window.width * 0.42
+ height: parent.height
+
+ MouseArea {
+ property real startX: 0
+ property real oldP: 0
+ property bool rewind: false
+
+ anchors.fill: parent
+ onPositionChanged: {
+ var reverse = startX > window.width / 2
+ var mx = mapToItem(window, mouse.x).x
+ var p = Math.abs((mx - startX) / (window.width - display.width))
+ if (p < oldP)
+ rewind = reverse ? false : true
+ else
+ rewind = reverse ? true : false
+ controller.progress = reverse ? 1 - p : p
+ oldP = p
+ }
+ onPressed: startX = mapToItem(window, mouse.x).x
+ onReleased: {
+ if (rewind)
+ controller.completeToBeginning()
+ else
+ controller.completeToEnd()
+ }
+ }
+ }
+
+}
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/Button.qml b/basicsuite/qt5-everywhere/demos/calqlatr/content/Button.qml
new file mode 100644
index 0000000..6165ed3
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/calqlatr/content/Button.qml
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 text: textItem.text
+ property alias color: textItem.color
+ property bool operator: false
+
+ signal clicked
+
+ width: 0.33*pad.width
+ height: pad.height/7
+
+ Text {
+ id: textItem
+ anchors.centerIn: parent
+ horizontalAlignment: Text.AlignHCenter
+ font.pixelSize: parent.height * 0.6
+ elide: Text.ElideLeft
+ lineHeight: 0.75
+ color: "white"
+ }
+
+ Image {
+ id: touchImage
+ source: "images/touch-green.png"
+ anchors.centerIn: parent
+ width: 2*parent.height
+ height: 2*parent.height
+ visible: false
+ }
+
+ MouseArea {
+ id: mouse
+ anchors.fill: parent
+ anchors.margins: -5
+ onPressed: touchImage.visible = true
+ onReleased: touchImage.visible = false
+ onClicked: {
+ if (operator)
+ window.operatorPressed(parent.text)
+ else
+ window.digitPressed(parent.text)
+ }
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/Display.qml b/basicsuite/qt5-everywhere/demos/calqlatr/content/Display.qml
new file mode 100644
index 0000000..df3bfa2
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/calqlatr/content/Display.qml
@@ -0,0 +1,128 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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: display
+ function clearAll()
+ {
+ listView.model.clear();
+ }
+
+ function displayOperator(operator)
+ {
+ listView.model.append({ "operator": operator, "operand": "" })
+ }
+
+ function newLine(operator, operand)
+ {
+ listView.model.append({ "operator": operator, "operand": operand })
+ }
+
+ function appendDigit(digit)
+ {
+ if (!listView.model.count)
+ listView.model.append({ "operator": "", "operand": "" })
+ var i = listView.model.count - 1;
+ listView.model.get(i).operand = listView.model.get(i).operand + digit;
+ }
+
+ Item {
+ id: theItem
+ width: parent.width + 32
+ height: parent.height
+
+ Rectangle {
+ id: rect
+ x: 16
+ color: "white"
+ height: parent.height
+ width: display.width - 16
+ }
+ Image {
+ anchors.right: rect.left
+ source: "images/paper-edge-left.png"
+ height: parent.height
+ fillMode: Image.TileVertically
+ }
+ Image {
+ anchors.left: rect.right
+ source: "images/paper-edge-right.png"
+ height: parent.height
+ fillMode: Image.TileVertically
+ }
+
+ Image {
+ source: "images/paper-grip.png"
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 20
+ }
+
+ ListView {
+ id: listView
+ x: 16; y: 30
+ width: display.width
+ height: display.height
+ delegate: Item {
+ height: 20
+ width: parent.width
+ Text {
+ id: operator
+ x: 8
+ font.pixelSize: 18
+ color: "#6da43d"
+ text: model.operator
+ }
+ Text {
+ id: operand
+ font.pixelSize: 18
+ anchors.right: parent.right
+ anchors.rightMargin: 26
+ text: model.operand
+ }
+ }
+ model: ListModel { }
+ }
+
+ }
+
+}
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/NumberPad.qml b/basicsuite/qt5-everywhere/demos/calqlatr/content/NumberPad.qml
new file mode 100644
index 0000000..454c50d
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/calqlatr/content/NumberPad.qml
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+
+Grid {
+ columns: 3
+ columnSpacing: 0
+ rowSpacing: 0
+
+ Button { text: "7" }
+ Button { text: "8" }
+ Button { text: "9" }
+ Button { text: "4" }
+ Button { text: "5" }
+ Button { text: "6" }
+ Button { text: "1" }
+ Button { text: "2" }
+ Button { text: "3" }
+ Button { text: "0" }
+ Button { text: "." }
+ Button { text: " " }
+ Button { text: "±"; color: "#6da43d"; operator: true }
+ Button { text: "−"; color: "#6da43d"; operator: true }
+ Button { text: "+"; color: "#6da43d"; operator: true }
+ Button { text: " "; color: "#6da43d"; operator: true }
+ Button { text: "÷"; color: "#6da43d"; operator: true }
+ Button { text: "×"; color: "#6da43d"; operator: true }
+ Button { text: "C"; color: "#6da43d"; operator: true }
+ Button { text: " "; color: "#6da43d"; operator: true }
+ Button { text: "="; color: "#6da43d"; operator: true }
+}
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/StyleLabel.qml b/basicsuite/qt5-everywhere/demos/calqlatr/content/StyleLabel.qml
new file mode 100644
index 0000000..3bdea86
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/calqlatr/content/StyleLabel.qml
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+
+Text {
+ width: 64
+ font.pixelSize: 14
+ font.bold: false
+ wrapMode: Text.WordWrap
+ lineHeight: 0.75
+ color: "#676764"
+}
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/audio/touch.wav b/basicsuite/qt5-everywhere/demos/calqlatr/content/audio/touch.wav
new file mode 100644
index 0000000..94cccb7
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/calqlatr/content/audio/touch.wav
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/calculator.js b/basicsuite/qt5-everywhere/demos/calqlatr/content/calculator.js
new file mode 100644
index 0000000..ffc78bf
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/calqlatr/content/calculator.js
@@ -0,0 +1,150 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+var curVal = 0
+var memory = 0
+var lastOp = ""
+var previousOperator = ""
+var digits = ""
+
+function disabled(op) {
+ if (op == "." && digits.toString().search(/\./) != -1) {
+ return true
+ } else if (op == window.squareRoot && digits.toString().search(/-/) != -1) {
+ return true
+ } else {
+ return false
+ }
+}
+
+function digitPressed(op)
+{
+ if (lastOp == "=")
+ display.newLine("", "");
+
+ if (disabled(op))
+ return
+ if (digits.toString().length >= 14)
+ return
+ if (lastOp.toString().length == 1 && ((lastOp >= "0" && lastOp <= "9") || lastOp == ".") ) {
+ digits = digits + op.toString()
+ display.appendDigit(op.toString())
+ } else {
+ digits = op
+ display.appendDigit(op.toString())
+ }
+ lastOp = op
+}
+
+function operatorPressed(op)
+{
+ if (disabled(op))
+ return
+ lastOp = op
+
+ if (previousOperator == "+") {
+ digits = Number(digits.valueOf()) + Number(curVal.valueOf())
+ } else if (previousOperator == "−") {
+ digits = Number(curVal) - Number(digits.valueOf())
+ } else if (previousOperator == "×") {
+ digits = Number(curVal) * Number(digits.valueOf())
+ } else if (previousOperator == "÷") {
+ digits = Number(Number(curVal) / Number(digits.valueOf())).toString()
+ } else if (previousOperator == "=") {
+ }
+
+ if (op == "+" || op == "−" || op == "×" || op == "÷") {
+ previousOperator = op
+ curVal = digits.valueOf()
+ display.displayOperator(previousOperator)
+ return
+ }
+
+ if (op == "=") {
+ display.newLine("=", digits.toString())
+ }
+
+ curVal = 0
+ previousOperator = ""
+
+ if (op == "1/x") {
+ digits = (1 / digits.valueOf()).toString()
+ } else if (op == "x^2") {
+ digits = (digits.valueOf() * digits.valueOf()).toString()
+ } else if (op == "Abs") {
+ digits = (Math.abs(digits.valueOf())).toString()
+ } else if (op == "Int") {
+ digits = (Math.floor(digits.valueOf())).toString()
+ } else if (op == window.plusminus) {
+ digits = (digits.valueOf() * -1).toString()
+ } else if (op == window.squareRoot) {
+ digits = (Math.sqrt(digits.valueOf())).toString()
+ } else if (op == "mc") {
+ memory = 0;
+ } else if (op == "m+") {
+ memory += digits.valueOf()
+ } else if (op == "mr") {
+ digits = memory.toString()
+ } else if (op == "m-") {
+ memory = digits.valueOf()
+ } else if (op == window.leftArrow) {
+ digits = digits.toString().slice(0, -1)
+ if (digits.length == 0) {
+ digits = "0"
+ }
+ } else if (op == "Off") {
+ Qt.quit();
+ } else if (op == "C") {
+ curVal = 0
+ memory = 0
+ lastOp = ""
+ digits = ""
+ display.clearAll()
+ } else if (op == "AC") {
+ curVal = 0
+ memory = 0
+ lastOp = ""
+ digits ="0"
+ }
+
+
+}
+
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-back.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-back.png
new file mode 100644
index 0000000..2989ee2
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-back.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-close.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-close.png
new file mode 100644
index 0000000..3e21248
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-close.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-settings.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-settings.png
new file mode 100644
index 0000000..98e662f
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-settings.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/logo.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/logo.png
new file mode 100644
index 0000000..6bc6561
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/logo.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-edge-left.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-edge-left.png
new file mode 100644
index 0000000..ca29a3a
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-edge-left.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-edge-right.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-edge-right.png
new file mode 100644
index 0000000..7c2da7b
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-edge-right.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-grip.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-grip.png
new file mode 100644
index 0000000..953c408
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-grip.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/settings-selected-a.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/settings-selected-a.png
new file mode 100644
index 0000000..e08ddfa
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/settings-selected-a.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/settings-selected-b.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/settings-selected-b.png
new file mode 100644
index 0000000..d9aa7e3
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/settings-selected-b.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/touch-green.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/touch-green.png
new file mode 100644
index 0000000..64dbde6
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/touch-green.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/touch-white.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/touch-white.png
new file mode 100644
index 0000000..bb02b00
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/touch-white.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/canvasclock/canvasClock.qml b/basicsuite/qt5-everywhere/demos/canvasclock/canvasClock.qml
new file mode 100644
index 0000000..e2b3bb0
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/canvasclock/canvasClock.qml
@@ -0,0 +1,404 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+ anchors.fill: parent
+ property color rimColor: Qt.rgba(1,0,0,1) //'#ff0000'
+ property color dialColor: Qt.rgba(0.2,0.2,0.2,1) //'#333333'
+ property color bgcolor: Qt.rgba(1,1,1,1)
+ property int dialStyle: 0
+ color: "#333333"
+
+ Text{
+ id: codeText
+ anchors {fill:parent}
+ text: ""
+ rotation: 10
+ color: "#666666"
+ font.pixelSize: root.height*.05
+
+ verticalAlignment:Text.AlignBottom
+
+ property int pos: 0
+
+ property string code: "
+var ctx = clockCanvas.getContext('2d')
+ctx.clearRect(0,0,clockContainer.clockRadius,clockContainer.clockRadius)
+
+var gradient = ctx.createRadialGradient(clockContainer.clockRadius/4, clockContainer.clockRadius/4, 0, clockContainer.clockRadius/4, clockContainer.clockRadius/4, clockContainer.clockRadius)
+gradient.addColorStop(0, '#ffffff')
+gradient.addColorStop(1, '#888888')
+
+ctx.fillStyle = gradient
+ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.475, 0, 360, false)
+ctx.fill()
+
+drawDials(ctx)
+
+var gradient2 = ctx.createLinearGradient(0, 0, clockContainer.clockRadius, clockContainer.clockRadius)
+gradient2.addColorStop(0, Qt.rgba(0,0,0,.5))
+gradient2.addColorStop(.5, Qt.rgba(1,1,1,.5))
+gradient2.addColorStop(1, Qt.rgba(0,0,0,.5))
+
+var gradient3 = ctx.createLinearGradient(0, 0, clockContainer.clockRadius, clockContainer.clockRadius)
+gradient3.addColorStop(0, Qt.rgba(1,1,1,.5))
+gradient3.addColorStop(.5, Qt.rgba(0,0,0,.5))
+gradient3.addColorStop(1, Qt.rgba(1,1,1,.5))
+
+ctx.lineWidth = clockContainer.clockRadius*.05
+ctx.strokeStyle = root.rimColor
+
+ctx.beginPath()
+ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.45, 0, 360, false)
+ctx.stroke()
+
+ctx.strokeStyle = gradient2
+ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.45, 0, 360, false)
+ctx.stroke()
+
+ctx.beginPath()
+ctx.strokeStyle = root.rimColor
+ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.475, 0, 360, false)
+ctx.stroke()
+
+ctx.strokeStyle = gradient3
+ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.475, 0, 360, false)
+ctx.stroke()
+ctx.closePath()
+
+function drawPointer(context, angle, len, thickness, color){
+ context.beginPath()
+ context.lineWidth = thickness
+ context.strokeStyle = color
+ context.moveTo(clockContainer.clockRadius/2, clockContainer.clockRadius/2)
+ var x1=Math.cos(angle*0.01745)*len
+ var y1=Math.sin(angle*0.01745)*len
+ context.lineTo(clockContainer.clockRadius/2+.5+x1,clockContainer.clockRadius/2+.5+y1)
+ context.stroke()
+ context.closePath()
+}"
+
+ Timer{
+ id: textTimer
+ interval: 10
+ onTriggered: {
+ codeText.pos++
+ if (codeText.pos >= codeText.code.length)codeText.pos=0
+ codeText.text+=codeText.code.charAt(codeText.pos)
+ if (codeText.text.length >1000){
+ codeText.text=codeText.text.substring(codeText.text.length-1000)
+ }
+ }
+ repeat: true
+ running: true
+ }
+ }
+
+ Rectangle {
+ anchors.fill: parent
+ gradient: Gradient {
+ GradientStop {position: .0; color :"black"}
+ GradientStop {position: .5; color :"transparent"}
+ GradientStop {position: 1.0; color :"black"}
+
+ }
+ opacity: .5
+ }
+
+ Item {
+ id: clockContainer
+ width: 2* Math.min(root.width*.8, root.height*.8)
+ height: width
+ scale: 0.5
+ anchors.centerIn: parent
+ property int clockRadius: width
+
+ ShaderEffectSource{
+ id: clockBg
+ anchors.fill: parent
+ sourceItem: clockCanvas
+ hideSource: true
+ live: false
+ }
+
+ Canvas {
+ id: clockCanvas
+ anchors.fill: parent
+ onPaint: {
+ var ctx = clockCanvas.getContext('2d')
+
+ ctx.clearRect(0,0,clockContainer.clockRadius,clockContainer.clockRadius)
+
+ var gradient = ctx.createRadialGradient(clockContainer.clockRadius/4, clockContainer.clockRadius/4, 0, clockContainer.clockRadius/4, clockContainer.clockRadius/4, clockContainer.clockRadius)
+
+ ctx.fillStyle = root.bgcolor
+ ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.475, 0, 360, false)
+ ctx.fill()
+
+ gradient.addColorStop(0, Qt.rgba(0,0,0,0))
+ gradient.addColorStop(1, Qt.rgba(0,0,0,.5))
+
+ ctx.fillStyle = gradient
+ ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.475, 0, 360, false)
+ ctx.fill()
+
+ drawDials(ctx)
+
+ var gradient2 = ctx.createLinearGradient(0, 0, clockContainer.clockRadius, clockContainer.clockRadius)
+ gradient2.addColorStop(0, Qt.rgba(0,0,0,.5))
+ gradient2.addColorStop(.5, Qt.rgba(1,1,1,.5))
+ gradient2.addColorStop(1, Qt.rgba(0,0,0,.5))
+
+ var gradient3 = ctx.createLinearGradient(0, 0, clockContainer.clockRadius, clockContainer.clockRadius)
+ gradient3.addColorStop(0, Qt.rgba(1,1,1,.5))
+ gradient3.addColorStop(.5, Qt.rgba(0,0,0,.5))
+ gradient3.addColorStop(1, Qt.rgba(1,1,1,.5))
+
+ ctx.lineWidth = clockContainer.clockRadius*.05
+
+ ctx.strokeStyle = root.rimColor
+ ctx.beginPath()
+ ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.45, 0, 360, false)
+ ctx.stroke()
+
+ ctx.strokeStyle = gradient2
+ ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.45, 0, 360, false)
+ ctx.stroke()
+
+ ctx.beginPath()
+ ctx.strokeStyle = root.rimColor
+ ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.475, 0, 360, false)
+ ctx.stroke()
+
+ ctx.strokeStyle = gradient3
+
+ ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.475, 0, 360, false)
+ ctx.stroke()
+ ctx.closePath()
+
+
+ clockBg.scheduleUpdate()
+ }
+
+ function drawDials(context){
+
+ context.strokeStyle = "#888888"
+ context.fillStyle = root.dialColor
+ context.lineWidth = 2
+ context.beginPath()
+ for (var i=1; i<=60; i++){
+ var x1=Math.cos(((i)*6)*0.01745)*clockContainer.clockRadius*.4
+ var y1=Math.sin(((i)*6)*0.01745)*clockContainer.clockRadius*.4
+
+ var x2=Math.cos(((i)*6)*0.01745)*clockContainer.clockRadius*.45
+ var y2=Math.sin(((i)*6)*0.01745)*clockContainer.clockRadius*.45
+
+ context.moveTo(clockContainer.clockRadius/2+.5+x1,clockContainer.clockRadius/2+.5+y1)
+ context.lineTo(clockContainer.clockRadius/2+.5+x2,clockContainer.clockRadius/2+.5+y2)
+ context.stroke()
+ }
+ context.closePath()
+
+ context.beginPath()
+
+ var romans = ['I','II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X', 'XI', 'XII']
+
+ for (i=1; i<=12; i++){
+ x1=Math.cos((-90+(i)*30)*0.01745)*clockContainer.clockRadius*.35 -clockContainer.width*0.03
+ y1=Math.sin((-90+(i)*30)*0.01745)*clockContainer.clockRadius*.35 +clockContainer.height*0.04
+
+ if (root.dialStyle === 1) x1-=clockContainer.width*0.01
+
+ context.font = 'bold '+Math.floor(clockContainer.width*.1)+'px Arial'
+
+
+ if (i >= 10)
+ x1 -= clockContainer.width*0.02
+ context.textAlign = 'center';
+ context.textBaseline = 'middle'
+
+ var dial = i
+
+ if (root.dialStyle === 1) dial = romans[i-1]
+ context.text(dial,clockContainer.clockRadius/2+x1,clockContainer.clockRadius/2+y1)
+
+ context.fill()
+ context.stroke()
+ }
+ context.closePath()
+ }
+ }
+
+ Canvas {
+ id: clockPointers
+ anchors.fill: parent
+ antialiasing: true
+ renderTarget: Canvas.Image
+ onPaint: {
+ var ctx = clockPointers.getContext('2d')
+ ctx.clearRect(0,0,clockContainer.clockRadius,clockContainer.clockRadius)
+ ctx.lineCap = 'round'
+ drawPointer(ctx, -90+clock.hours*30, clockContainer.clockRadius*.25, clockContainer.clockRadius*.05, "#000000")
+ drawPointer(ctx, -90+clock.minutes*6, clockContainer.clockRadius*.375, clockContainer.clockRadius*.025, "#333333")
+ drawPointer(ctx, -90+clock.seconds*6, clockContainer.clockRadius*.40, 4, "#aa0000")
+
+ // Draw nail
+ ctx.beginPath()
+ ctx.fillStyle = "#535353"
+ ctx.ellipse(clockContainer.clockRadius/2-16,clockContainer.clockRadius/2-16,32,32)
+ ctx.fill()
+ ctx.closePath()
+ }
+
+ function drawPointer(context, angle, len, thickness, color){
+ context.beginPath()
+ context.lineWidth = thickness
+ context.strokeStyle = color
+ context.moveTo(clockContainer.clockRadius/2, clockContainer.clockRadius/2)
+ var x1=Math.cos(angle*0.01745)*len
+ var y1=Math.sin(angle*0.01745)*len
+ context.lineTo(clockContainer.clockRadius/2+.5+x1,clockContainer.clockRadius/2+.5+y1)
+ context.stroke()
+ context.closePath()
+ }
+ }
+
+ Timer{
+ id: clock
+ interval: 1000
+ repeat: true
+ running: !mouseArea.pressed
+
+ property int hours: 0
+ property int minutes: 0
+ property int seconds: 0
+
+ onTriggered: {
+ seconds ++
+ if (seconds == 60) seconds = 0
+
+ if (seconds == 0) minutes++
+ if (minutes == 60) {
+ hours++
+ minutes=0
+ }
+
+ if (hours >= 12) hours=0
+
+ clockPointers.requestPaint()
+ }
+ }
+ }
+
+ MouseArea {
+ id: mouseArea
+ anchors.fill: clockContainer
+ property bool grabbed: false
+
+ onPressed: {
+
+ var temp = clockContainer.clockRadius/2
+ var ang = (90+Math.atan2((mouseY-temp), (mouseX-temp))*57.2957795)
+ if (ang <0) ang+=360
+
+ if (ang/6 > clock.minutes-2 && ang/6<clock.minutes+2){
+
+ grabbed = true
+ return;
+ } else {
+ var y = mouseY-temp
+ var x = mouseX-temp
+ var dist = Math.sqrt(y*y+x*x)
+
+ if (dist>clockContainer.clockRadius*.42*clockContainer.scale){
+ root.rimColor = newColor()
+ clockCanvas.requestPaint()
+ return;
+ }else if (dist>clockContainer.clockRadius*.32*clockContainer.scale) {
+ root.dialStyle = Math.round(Math.random())
+ root.dialColor = newColor()
+ clockCanvas.requestPaint()
+ }else{
+ root.bgcolor = newColor()
+ clockCanvas.requestPaint()
+ }
+ }
+ }
+
+ onPositionChanged: {
+ if (grabbed) {
+ var temp = clockContainer.clockRadius/2
+ var ang = (90+Math.atan2((mouseY-temp), (mouseX-temp))*57.2957795)
+ if (ang <0) ang+=360
+
+ var oldMinutes = clock.minutes
+ clock.minutes=ang/6
+
+ if (oldMinutes>55 && clock.minutes <5) clock.hours++
+ if (oldMinutes<5 && clock.minutes >50) clock.hours--
+ if (clock.hours >12) clock.hours=1
+ if (clock.hours <0) clock.hours=11
+
+
+ clockPointers.requestPaint()
+ }
+ }
+ onReleased: grabbed = false;
+ }
+
+ function newColor(){
+ var r=Math.random()
+ var g=Math.random()
+ var b=Math.random()
+ return Qt.rgba(r,g,b,1)
+ }
+
+ Component.onCompleted: {
+ var d = new Date()
+ clock.hours = d.getHours()
+ if (clock.hours>=12)clock.hours-=12
+ clock.minutes = d.getMinutes()
+ clock.seconds = d.getSeconds()
+ clockCanvas.requestPaint()
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/demos.pro b/basicsuite/qt5-everywhere/demos/demos.pro
new file mode 100644
index 0000000..439fe35
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/demos.pro
@@ -0,0 +1,3 @@
+TEMPLATE = subdirs
+SUBDIRS += \
+ shaders \
diff --git a/basicsuite/qt5-everywhere/demos/gridrssnews/RssDelegate.qml b/basicsuite/qt5-everywhere/demos/gridrssnews/RssDelegate.qml
new file mode 100644
index 0000000..b0c2047
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/gridrssnews/RssDelegate.qml
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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: delegate
+ height: grid.cellHeight
+ width: grid.cellWidth
+ color: mainWindow.appBackground
+ property int tileMargin: mainWindow.tileMargin
+
+ Rectangle {
+ anchors.left: parent.left
+ anchors.top: parent.top
+ anchors.topMargin: parent.tileMargin/2
+ width: parent.width - tileMargin
+ height: parent.height - tileMargin
+ color: mainWindow.tileBackground
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ grid.currentIndex = index
+ console.log(link)
+ Qt.openUrlExternally(link)
+ }
+ }
+
+ states: [
+ State {
+ name: "selected"
+ when: delegate.GridView.isCurrentItem
+ }
+ ]
+
+
+ Image {
+ id: iconImage
+ source: url
+ width: parent.width
+ height: parent.height
+ }
+
+ Rectangle{
+ width: parent.width
+ height: dateText.height + tileMargin
+ anchors.top: dateText.top
+ anchors.bottom: parent.bottom
+ color: "Black"
+ opacity: 0.5
+ visible: iconImage.source
+
+ }
+
+ Text {
+ id: dateText
+ anchors.left: parent.left
+ anchors.leftMargin: tileMargin
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: tileMargin
+ anchors.right: parent.right
+ anchors.rightMargin: tileMargin
+
+ color: mainWindow.textColor
+ text: title
+ width: parent.width;
+ wrapMode: Text.WordWrap;
+ smooth: true
+ font { family: mainWindow.uiFont; pixelSize: mainWindow.tileFontSize }
+ }
+ }
+}
+
diff --git a/basicsuite/qt5-everywhere/demos/gridrssnews/ScrollBar.qml b/basicsuite/qt5-everywhere/demos/gridrssnews/ScrollBar.qml
new file mode 100644
index 0000000..dae206b
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/gridrssnews/ScrollBar.qml
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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: width/2 - 1
+ color: mainWindow.appBackground
+ }
+
+ // Size the bar to the required size, depending upon the orientation.
+ Rectangle {
+ x: scrollBar.position * (scrollBar.width-2) + 1
+ y: 1
+ width: scrollBar.pageSize * (scrollBar.width-2)
+ height: parent.height
+ radius: height/2 - 1
+ color: mainWindow.tileBackground
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/gridrssnews/main.qml b/basicsuite/qt5-everywhere/demos/gridrssnews/main.qml
new file mode 100644
index 0000000..d85d292
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/gridrssnews/main.qml
@@ -0,0 +1,150 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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.XmlListModel 2.0
+
+Rectangle {
+ id: mainWindow
+ anchors.fill: parent
+ color: appBackground
+
+ property int tileHeight: parseInt(grid.height / 3)
+ property int tileFontSize: tileHeight * 0.08
+ property int horizontalMargin: height * 0.08
+ property int topBarsize: height * 0.2
+ property int bottomBarSize: height * 0.08
+ property int tileMargin: height * 0.01
+ property int appHeaderFontSize: topBarsize * 0.4
+ property string appBackground: "#262626"
+ property string tileBackground: "#86bc24"
+ property string textColor: "white"
+ property string uiFont: "Segoe UI"
+
+ XmlListModel {
+ id: feedModel
+ //source: "http://blog.qt.digia.com/feed/"
+ source: "http://news.yahoo.com/rss/tech"
+ //query: "/rss/channel/item"
+ // Filter out items that don't have images
+ query: "/rss/channel/item[exists(child::media:content)]"
+ namespaceDeclarations: "declare namespace media=\"http://search.yahoo.com/mrss/\";"
+ XmlRole { name: "url"; query: "media:content/@url/string()" }
+ XmlRole { name: "title"; query: "title/string()" }
+ XmlRole { name: "pubDate"; query: "pubDate/string()" }
+ XmlRole { name: "link"; query: "link/string()" }
+
+ onStatusChanged: {
+ if (status == XmlListModel.Ready) {
+ playbanner.start();
+ }
+ }
+ }
+
+ // Top bar
+ Item {
+ id: topBar
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.top: parent.top
+ anchors.leftMargin: horizontalMargin
+ opacity: 0
+ height: topBarsize
+ Text {
+ id: title
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ text: qsTr("Yahoo Technology")
+ font.family: uiFont;
+ font.pixelSize: appHeaderFontSize;
+ color: textColor
+ smooth: true
+ }
+ }
+
+ // Grid view
+ GridView {
+ id: grid
+ anchors.fill: parent
+ anchors.topMargin: topBarsize
+ anchors.bottomMargin: bottomBarSize
+ anchors.leftMargin: horizontalMargin
+ anchors.rightMargin: horizontalMargin
+ opacity: 0
+ flow: GridView.TopToBottom
+ cellHeight: tileHeight
+ cellWidth: parseInt(tileHeight * 1.5)
+ cacheBuffer: cellWidth
+ clip: false
+ focus: true
+ model: feedModel
+ delegate: RssDelegate {}
+
+ // Only show the scrollbars when the view is moving.
+ states: State {
+ when: grid.movingHorizontally
+ PropertyChanges { target: horizontalScrollBar; opacity: 1 }
+ }
+
+ transitions: Transition {
+ NumberAnimation { properties: "opacity"; duration: 400 }
+ }
+ }
+
+ ScrollBar {
+ id: horizontalScrollBar
+ width: parent.width; height: 6
+ anchors.bottom: parent.bottom
+ anchors.left: parent.left
+ opacity: 0
+ orientation: Qt.Horizontal
+ position: grid.visibleArea.xPosition
+ pageSize: grid.visibleArea.widthRatio
+ }
+
+ SequentialAnimation {
+ id: playbanner
+ running: false
+ NumberAnimation { target: topBar; property: "opacity"; to: 1.0; duration: 300}
+ NumberAnimation { target: grid; property: "opacity"; to: 1.0; duration: 300}
+ }
+
+}
+
diff --git a/basicsuite/qt5-everywhere/demos/heartmonitor/HeartData.js b/basicsuite/qt5-everywhere/demos/heartmonitor/HeartData.js
new file mode 100644
index 0000000..467e431
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/heartmonitor/HeartData.js
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+var heartData = [0,0,0,0,0]
+
+function fillHeartData(length) {
+ if (length !== heartData.length) {
+ heartData = new Array(length);
+ for (var i=0; i<length; i++) {
+ heartData[i] = 0;
+ }
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/heartmonitor/heart.png b/basicsuite/qt5-everywhere/demos/heartmonitor/heart.png
new file mode 100644
index 0000000..d7a6170
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/heartmonitor/heart.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/heartmonitor/main.qml b/basicsuite/qt5-everywhere/demos/heartmonitor/main.qml
new file mode 100644
index 0000000..08b8f28
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/heartmonitor/main.qml
@@ -0,0 +1,266 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 "HeartData.js" as Data
+
+Rectangle {
+ id: app
+ anchors.fill: parent
+ color: "black"
+
+ property int frequency: 60
+ property int beatDataIndex: -1
+ property int heartDataIndex: 0
+ property int beatDifference: 1200
+ property var previousTime: 0
+ property string curveColor: "#22ff22"
+ property string alarmColor: "#ff2222"
+ property string textColor: "#22ff22"
+ property string gridColor: "#333333"
+
+ function pulse() {
+ if (!heartAnimation.running) {
+ heartAnimation.restart()
+ heartTimer.restart()
+ calculateFrequency();
+ app.beatDataIndex = 0
+ }
+ }
+
+ function calculateFrequency() {
+ var ms = new Date().getTime();
+ if (app.previousTime > 0)
+ app.beatDifference = 0.8*beatDifference + 0.2*(ms - app.previousTime)
+ app.frequency = Math.round(60000.0 / app.beatDifference)
+ app.previousTime = ms;
+ }
+
+ function updateData() {
+ app.heartDataIndex++;
+ if (app.heartDataIndex >= Data.heartData.length)
+ app.heartDataIndex = 0;
+ else
+ app.heartDataIndex++;
+
+ if (beatDataIndex >= 0)
+ fillBeatData()
+ else
+ fillRandomData()
+
+ heartCanvas.requestPaint()
+ }
+
+ function fillBeatData() {
+ var value = 0;
+ switch (app.beatDataIndex) {
+ case 0: value = Math.random()*0.1+0.1; break;
+ case 1: value = Math.random()*0.1+0.0; break;
+ case 2: value = Math.random()*0.3+0.7; break;
+ case 3: value = Math.random()*0.1-0.05; break;
+ case 4: value = Math.random()*0.3-0.8; break;
+ case 5: value = Math.random()*0.1-0.05; break;
+ case 6: value = Math.random()*0.1-0.05; break;
+ case 7: value = Math.random()*0.1+0.15; break;
+ default: value = 0; break;
+ }
+
+ Data.heartData[app.heartDataIndex] = value;
+ app.beatDataIndex++;
+ if (app.beatDataIndex > 7)
+ app.beatDataIndex = -1
+ }
+
+ function fillRandomData() {
+ Data.heartData[app.heartDataIndex] = Math.random()*0.05-0.025
+ }
+
+ onWidthChanged: {
+ Data.fillHeartData(Math.floor(app.width*0.5))
+ gridCanvas.requestPaint();
+ }
+ onHeightChanged: gridCanvas.requestPaint()
+
+ Item {
+ id: grid
+ anchors.fill: parent
+
+ Canvas {
+ id: gridCanvas
+ anchors.fill: parent
+ antialiasing: true
+ renderTarget: Canvas.Image
+ onPaint: {
+ var ctx = gridCanvas.getContext('2d')
+
+ ctx.clearRect(0,0,grid.width,grid.height)
+ var step = 1000 / updateTimer.interval * (app.width / Data.heartData.length)
+ var xCount = app.width / step
+ var yCount = app.height / step
+ ctx.strokeStyle = app.gridColor;
+
+ var x=0;
+ ctx.beginPath()
+ for (var i=0; i<xCount; i++) {
+ x = i*step
+ ctx.moveTo(x,0)
+ ctx.lineTo(x,app.height)
+ }
+ ctx.stroke()
+ ctx.closePath()
+
+ var y=0;
+ ctx.beginPath()
+ for (var j=0; j<yCount; j++) {
+ y = j*step
+ ctx.moveTo(0, y)
+ ctx.lineTo(app.width,y)
+ }
+ ctx.stroke()
+ ctx.closePath()
+ }
+ }
+ }
+
+ Rectangle {
+ id: canvasBackground
+ anchors { bottom: parent.bottom; left: parent.left; right: parent.right }
+ height: 0.75 * parent.height
+
+ gradient: Gradient {
+ GradientStop {position: .0; color :"black"}
+ GradientStop {position: .5; color :"#00ff00"}
+ GradientStop {position: 1.0; color :"black"}
+ }
+ opacity: .3
+ }
+
+ Item {
+ id: canvasContainer
+ anchors.fill: canvasBackground
+
+ Canvas {
+ id: heartCanvas
+ anchors.fill: parent
+ antialiasing: true
+ renderTarget: Canvas.Image
+ onPaint: {
+ var ctx = heartCanvas.getContext('2d')
+
+ ctx.clearRect(0,0,canvasContainer.width,canvasContainer.height)
+
+ var baseY = heartCanvas.height/2;
+ var length = Data.heartData.length;
+ var step = (heartCanvas.width-5) / length;
+ var yFactor = heartCanvas.height * 0.35;
+ var heartIndex = (heartDataIndex+1) % length;
+ ctx.strokeStyle = app.curveColor;
+
+ ctx.beginPath()
+ ctx.moveTo(0,baseY)
+ var i=0, x=0, y=0;
+ for (i=0; i<length; i++) {
+ x=i*step;
+ y=baseY - Data.heartData[heartIndex]*yFactor;
+ ctx.lineTo(x,y)
+ heartIndex = (heartIndex+1)%length;
+ }
+ ctx.stroke()
+ ctx.closePath()
+
+ ctx.beginPath()
+ ctx.fillStyle = app.curveColor
+ ctx.ellipse(x-5,y-5,10,10)
+ ctx.fill()
+ ctx.closePath()
+ }
+ }
+ }
+ Image {
+ id: heart
+ anchors { left: parent.left; top: parent.top }
+ anchors.margins: app.width * 0.05
+ height: parent.height * 0.2
+ width: height*1.2
+ source: "heart.png"
+ MouseArea {
+ anchors.fill: parent
+ onPressed: pulse()
+ }
+ }
+
+ Text {
+ id: pulseText
+ anchors { right: parent.right; verticalCenter: heart.verticalCenter }
+ anchors.margins: app.width * 0.05
+ antialiasing: true
+ text: app.frequency
+ color: app.frequency > 100 ? app.alarmColor : app.textColor
+ font { pixelSize: app.width * .1; bold: true }
+ }
+
+ // Pulse timer
+ Timer {
+ id: heartTimer
+ interval: 1200
+ running: true
+ repeat: false
+ onTriggered: pulse()
+ }
+
+ // Update timer
+ Timer {
+ id: updateTimer
+ interval: 30
+ running: true
+ repeat: true
+ onTriggered: updateData()
+ }
+
+ SequentialAnimation{
+ id: heartAnimation
+ NumberAnimation { target: heart; property: "scale"; duration: 100; from: 1.0; to:1.2; easing.type: Easing.Linear }
+ NumberAnimation { target: heart; property: "scale"; duration: 100; from: 1.2; to:1.0; easing.type: Easing.Linear }
+ }
+
+ Component.onCompleted: {
+ Data.fillHeartData(Math.max(100,Math.floor(app.width*0.5)))
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/maroon/.DS_Store b/basicsuite/qt5-everywhere/demos/maroon/.DS_Store
new file mode 100644
index 0000000..b5c859b
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/.DS_Store
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/Maroon.qml b/basicsuite/qt5-everywhere/demos/maroon/Maroon.qml
new file mode 100644
index 0000000..d7bfcb6
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/Maroon.qml
@@ -0,0 +1,233 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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"
+import "content/logic.js" as Logic
+
+Item {
+ id: root
+ width: 320
+ height: 480
+ property var gameState: Logic.newGameState(canvas);
+ property bool passedSplash: false
+
+ Image {
+ source:"content/gfx/background.png"
+ anchors.bottom: view.bottom
+
+ ParticleSystem {
+ id: particles
+ anchors.fill: parent
+
+ ImageParticle {
+ id: bubble
+ anchors.fill: parent
+ source: "content/gfx/catch.png"
+ opacity: 0.25
+ }
+
+ Wander {
+ xVariance: 25;
+ pace: 25;
+ }
+
+ Emitter {
+ width: parent.width
+ height: 150
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 3
+ startTime: 15000
+
+ emitRate: 2
+ lifeSpan: 15000
+
+ acceleration: PointDirection{ y: -6; xVariation: 2; yVariation: 2 }
+
+ size: 24
+ sizeVariation: 16
+ }
+ }
+ }
+
+ Column {
+ id: view
+ y: -(height - 480)
+ width: 320
+
+ GameOverScreen { gameCanvas: canvas }
+
+ Item {
+ id: canvasArea
+ width: 320
+ height: 480
+
+ Row {
+ height: childrenRect.height
+ Image {
+ id: wave
+ y: 30
+ source:"content/gfx/wave.png"
+ }
+ Image {
+ y: 30
+ source:"content/gfx/wave.png"
+ }
+ NumberAnimation on x { from: 0; to: -(wave.width); duration: 16000; loops: Animation.Infinite }
+ SequentialAnimation on y {
+ loops: Animation.Infinite
+ NumberAnimation { from: y - 2; to: y + 2; duration: 1600; easing.type: Easing.InOutQuad }
+ NumberAnimation { from: y + 2; to: y - 2; duration: 1600; easing.type: Easing.InOutQuad }
+ }
+ }
+
+ Row {
+ opacity: 0.5
+ Image {
+ id: wave2
+ y: 25
+ source: "content/gfx/wave.png"
+ }
+ Image {
+ y: 25
+ source: "content/gfx/wave.png"
+ }
+ NumberAnimation on x { from: -(wave2.width); to: 0; duration: 32000; loops: Animation.Infinite }
+ SequentialAnimation on y {
+ loops: Animation.Infinite
+ NumberAnimation { from: y + 2; to: y - 2; duration: 1600; easing.type: Easing.InOutQuad }
+ NumberAnimation { from: y - 2; to: y + 2; duration: 1600; easing.type: Easing.InOutQuad }
+ }
+ }
+
+ Image {
+ source: "content/gfx/sunlight.png"
+ opacity: 0.02
+ y: 0
+ anchors.horizontalCenter: parent.horizontalCenter
+ transformOrigin: Item.Top
+ SequentialAnimation on rotation {
+ loops: Animation.Infinite
+ NumberAnimation { from: -10; to: 10; duration: 8000; easing.type: Easing.InOutSine }
+ NumberAnimation { from: 10; to: -10; duration: 8000; easing.type: Easing.InOutSine }
+ }
+ }
+
+ Image {
+ source: "content/gfx/sunlight.png"
+ opacity: 0.04
+ y: 20
+ anchors.horizontalCenter: parent.horizontalCenter
+ transformOrigin: Item.Top
+ SequentialAnimation on rotation {
+ loops: Animation.Infinite
+ NumberAnimation { from: 10; to: -10; duration: 8000; easing.type: Easing.InOutSine }
+ NumberAnimation { from: -10; to: 10; duration: 8000; easing.type: Easing.InOutSine }
+ }
+ }
+
+ Image {
+ source: "content/gfx/grid.png"
+ opacity: 0.5
+ }
+
+ GameCanvas {
+ id: canvas
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 20
+ x: 32
+ focus: true
+ }
+
+ InfoBar { anchors.bottom: canvas.top; anchors.bottomMargin: 6; width: parent.width }
+
+ //3..2..1..go
+ Timer {
+ id: countdownTimer
+ interval: 1000
+ running: root.countdown < 5
+ repeat: true
+ onTriggered: root.countdown++
+ }
+ Repeater {
+ model: ["content/gfx/text-blank.png", "content/gfx/text-3.png", "content/gfx/text-2.png", "content/gfx/text-1.png", "content/gfx/text-go.png"]
+ delegate: Image {
+ visible: root.countdown <= index
+ opacity: root.countdown == index ? 0.5 : 0.1
+ scale: root.countdown >= index ? 1.0 : 0.0
+ source: modelData
+ Behavior on opacity { NumberAnimation {} }
+ Behavior on scale { NumberAnimation {} }
+ }
+ }
+ }
+
+ NewGameScreen {
+ onStartButtonClicked: root.passedSplash = true
+ }
+ }
+
+ property int countdown: 10
+ Timer {
+ id: gameStarter
+ interval: 4000
+ running: false
+ repeat: false
+ onTriggered: Logic.startGame(canvas);
+ }
+
+ states: [
+ State {
+ name: "gameOn"; when: gameState.gameOver == false && passedSplash
+ PropertyChanges { target: view; y: -(height - 960) }
+ StateChangeScript { script: root.countdown = 0; }
+ PropertyChanges { target: gameStarter; running: true }
+ },
+ State {
+ name: "gameOver"; when: gameState.gameOver == true
+ PropertyChanges { target: view; y: 0 }
+ }
+ ]
+
+ transitions: Transition {
+ NumberAnimation { properties: "x,y"; duration: 1200; easing.type: Easing.OutQuad }
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/BuildButton.qml b/basicsuite/qt5-everywhere/demos/maroon/content/BuildButton.qml
new file mode 100644
index 0000000..49641fc
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/BuildButton.qml
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 "logic.js" as Logic
+
+Item {
+ id: container
+ width: 64
+ height: 64
+ property alias source: img.source
+ property int index
+ property int row: 0
+ property int col: 0
+ property int towerType
+ property bool canBuild: true
+ property Item gameCanvas: parent.parent.parent
+ signal clicked()
+
+ Image {
+ id: img
+ opacity: (canBuild && gameCanvas.coins >= Logic.towerData[towerType-1].cost) ? 1.0 : 0.4
+ }
+ Text {
+ anchors.right: parent.right
+ font.pointSize: 14
+ font.bold: true
+ color: "#ffffff"
+ text: Logic.towerData[towerType - 1].cost
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ Logic.buildTower(towerType, col, row)
+ container.clicked()
+ }
+ }
+ Image {
+ visible: col == index && row != 0
+ source: "gfx/dialog-pointer.png"
+ anchors.top: parent.bottom
+ anchors.topMargin: 4
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+ Image {
+ visible: col == index && row == 0
+ source: "gfx/dialog-pointer.png"
+ rotation: 180
+ anchors.bottom: parent.top
+ anchors.bottomMargin: 6
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/GameCanvas.qml b/basicsuite/qt5-everywhere/demos/maroon/content/GameCanvas.qml
new file mode 100644
index 0000000..5e6e963
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/GameCanvas.qml
@@ -0,0 +1,240 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 "logic.js" as Logic
+import "towers" as Towers
+
+Item {
+ id: grid
+
+ property int squareSize: 64
+ property int rows: 6
+ property int cols: 4
+ property Item canvas: grid
+ property int score: 0
+ property int coins: 100
+ property int lives: 3
+ property int waveNumber: 0
+ property int waveProgress: 0
+ property var towers
+ property var mobs
+ property bool gameRunning: false
+ property bool gameOver: false
+ property bool errored: false
+ property string errorString: ""
+
+ width: cols * squareSize
+ height: rows * squareSize
+
+ function freshState() {
+ lives = 3
+ coins = 100
+ score = 0
+ waveNumber = 0
+ waveProgress = 0
+ gameOver = false
+ gameRunning = false
+ towerMenu.shown = false
+ helpButton.comeBack();
+ }
+
+ Text {
+ id: errorText // Mostly for debug purposes
+ text: errorString
+ visible: errored
+ color: "red"
+ font.pixelSize: 18
+ wrapMode: Text.WordWrap
+ width: parent.width / 1.2
+ height: parent.height / 1.2
+ anchors.centerIn: parent
+ z: 1000
+ }
+
+ Timer {
+ interval: 16
+ running: true
+ repeat: true
+ onTriggered: Logic.tick()
+ }
+
+ MouseArea {
+ id: ma
+ anchors.fill: parent
+ onClicked: {
+ if (towerMenu.visible)
+ towerMenu.finish()
+ else
+ towerMenu.open(mouse.x, mouse.y)
+ }
+ }
+
+ Image {
+ id: towerMenu
+ visible: false
+ z: 1500
+ scale: 0.9
+ opacity: 0.7
+ property int dragDistance: 16
+ property int targetRow: 0
+ property int targetCol: 0
+ property bool shown: false
+ property bool towerExists: false
+
+ function finish() {
+ shown = false
+ }
+
+ function open(xp,yp) {
+ if (!grid.gameRunning)
+ return
+ targetRow = Logic.row(yp)
+ targetCol = Logic.col(xp)
+ if (targetRow == 0)
+ towerMenu.y = (targetRow + 1) * grid.squareSize
+ else
+ towerMenu.y = (targetRow - 1) * grid.squareSize
+ towerExists = (grid.towers[Logic.towerIdx(targetCol, targetRow)] != null)
+ shown = true
+ helpButton.goAway();
+ }
+
+ states: State {
+ name: "shown"; when: towerMenu.shown && !grid.gameOver
+ PropertyChanges { target: towerMenu; visible: true; scale: 1; opacity: 1 }
+ }
+
+ transitions: Transition {
+ PropertyAction { property: "visible" }
+ NumberAnimation { properties: "opacity,scale"; duration: 500; easing.type: Easing.OutElastic }
+ }
+
+ x: -32
+ source: "gfx/dialog.png"
+ Row {
+ id: buttonRow
+ height: 100
+ anchors.centerIn: parent
+ spacing: 8
+ BuildButton {
+ row: towerMenu.targetRow; col: towerMenu.targetCol
+ anchors.verticalCenter: parent.verticalCenter
+ towerType: 1; index: 0
+ canBuild: !towerMenu.towerExists
+ source: "gfx/dialog-melee.png"
+ onClicked: towerMenu.finish()
+ }
+ BuildButton {
+ row: towerMenu.targetRow; col: towerMenu.targetCol
+ anchors.verticalCenter: parent.verticalCenter
+ towerType: 2; index: 1
+ canBuild: !towerMenu.towerExists
+ source: "gfx/dialog-shooter.png"
+ onClicked: towerMenu.finish()
+ }
+ BuildButton {
+ row: towerMenu.targetRow; col: towerMenu.targetCol
+ anchors.verticalCenter: parent.verticalCenter
+ towerType: 3; index: 2
+ canBuild: !towerMenu.towerExists
+ source: "gfx/dialog-bomb.png"
+ onClicked: towerMenu.finish()
+ }
+ BuildButton {
+ row: towerMenu.targetRow; col: towerMenu.targetCol
+ anchors.verticalCenter: parent.verticalCenter
+ towerType: 4; index: 3
+ canBuild: !towerMenu.towerExists
+ source: "gfx/dialog-factory.png"
+ onClicked: towerMenu.finish()
+ }
+ }
+ }
+
+
+ Keys.onPressed: { // Cheat Codes while Testing
+ if (event.key == Qt.Key_Up && (event.modifiers & Qt.ShiftModifier))
+ grid.coins += 10;
+ if (event.key == Qt.Key_Left && (event.modifiers & Qt.ShiftModifier))
+ grid.lives += 1;
+ if (event.key == Qt.Key_Down && (event.modifiers & Qt.ShiftModifier))
+ Logic.gameState.waveProgress += 1000;
+ if (event.key == Qt.Key_Right && (event.modifiers & Qt.ShiftModifier))
+ Logic.endGame();
+ }
+
+ Image {
+ id: helpButton
+ z: 1010
+ source: "gfx/button-help.png"
+ function goAway() {
+ helpMA.enabled = false;
+ helpButton.opacity = 0;
+ }
+ function comeBack() {
+ helpMA.enabled = true;
+ helpButton.opacity = 1;
+ }
+ Behavior on opacity { NumberAnimation {} }
+ MouseArea {
+ id: helpMA
+ anchors.fill: parent
+ onClicked: {helpImage.visible = true; helpButton.visible = false;}
+ }
+
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 0
+ }
+
+ Image {
+ id: helpImage
+ z: 1010
+ source: "gfx/help.png"
+ anchors.fill: parent
+ visible: false
+ MouseArea {
+ anchors.fill: parent
+ onClicked: helpImage.visible = false;
+ }
+ }
+
+}
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/GameOverScreen.qml b/basicsuite/qt5-everywhere/demos/maroon/content/GameOverScreen.qml
new file mode 100644
index 0000000..dfb439f
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/GameOverScreen.qml
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 "logic.js" as Logic
+
+Item {
+ id: gameOverScreen
+ width: 320
+ height: 400
+ property GameCanvas gameCanvas
+
+ Image {
+ id: img
+ source: "gfx/text-gameover.png"
+ anchors.centerIn: parent
+ }
+
+ ParticleSystem {
+ anchors.fill: parent
+ ImageParticle {
+ id: cloud
+ source: "gfx/cloud.png"
+ alphaVariation: 0.25
+ opacity: 0.25
+ }
+
+ Wander {
+ xVariance: 100;
+ pace: 1;
+ }
+
+ Emitter {
+ id: cloudLeft
+ width: 160
+ height: 160
+ anchors.right: parent.left
+ emitRate: 0.5
+ lifeSpan: 12000
+ velocity: PointDirection{ x: 64; xVariation: 2; yVariation: 2 }
+ size: 160
+ }
+
+ Emitter {
+ id: cloudRight
+ width: 160
+ height: 160
+ anchors.left: parent.right
+ emitRate: 0.5
+ lifeSpan: 12000
+ velocity: PointDirection{ x: -64; xVariation: 2; yVariation: 2 }
+ size: 160
+ }
+ }
+
+
+ Text {
+ visible: gameCanvas != undefined
+ text: "You saved " + gameCanvas.score + " fishes!"
+ anchors.top: img.bottom
+ anchors.topMargin: 12
+ anchors.horizontalCenter: parent.horizontalCenter
+ font.bold: true
+ color: "#000000"
+ opacity: 0.5
+ }
+
+ Image {
+ source: "gfx/button-play.png"
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 0
+ MouseArea {
+ anchors.fill: parent
+ onClicked: gameCanvas.gameOver = false//This will actually trigger the state change in main.qml
+ }
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/InfoBar.qml b/basicsuite/qt5-everywhere/demos/maroon/content/InfoBar.qml
new file mode 100644
index 0000000..36303fc
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/InfoBar.qml
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 {
+ height: childrenRect.height
+
+ // Display the number of lives
+ Row {
+ anchors.left: parent.left
+ anchors.leftMargin: 10
+ spacing: 5
+ Repeater {
+ id: rep
+ model: Math.min(10, canvas.lives)
+ delegate: Image { source: "gfx/lifes.png" }
+ }
+ }
+
+ // Display the number of fishes saved
+ Row {
+ anchors.right: points.left
+ anchors.rightMargin: 20
+ spacing: 5
+ Image { source: "gfx/scores.png" }
+ Text {
+ text: canvas.score
+ font.bold: true
+ }
+ }
+
+ // Display the number of coins
+ Row {
+ id: points
+ anchors.right: parent.right
+ anchors.rightMargin: 10
+ spacing: 5
+ Image { source: "gfx/points.png" }
+ Text {
+ id: pointsLabel
+ text: canvas.coins
+ font.bold: true
+ }
+ }
+}
+
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/NewGameScreen.qml b/basicsuite/qt5-everywhere/demos/maroon/content/NewGameScreen.qml
new file mode 100644
index 0000000..495e3aa
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/NewGameScreen.qml
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+
+// This is the first screen.
+// It shows the logo and emit a startButtonClicked signal
+// when the user press the "PLAY" button.
+
+Item {
+ id: newGameScreen
+ width: 320
+ height: 480
+
+ signal startButtonClicked
+
+ Image {
+ source: "gfx/logo.png"
+ anchors.top: parent.top
+ anchors.topMargin: 60
+ }
+
+ Image {
+ source: "gfx/logo-fish.png"
+ anchors.top: parent.top
+
+ SequentialAnimation on x {
+ loops: Animation.Infinite
+ NumberAnimation { from: x + 148; to: x + 25; duration: 2000; easing.type: Easing.InOutQuad }
+ NumberAnimation { from: x + 25; to: x + 148; duration: 1600; easing.type: Easing.InOutQuad }
+ }
+ SequentialAnimation on anchors.topMargin {
+ loops: Animation.Infinite
+ NumberAnimation { from: 100; to: 60; duration: 1600; easing.type: Easing.InOutQuad }
+ NumberAnimation { from: 60; to: 100; duration: 2000; easing.type: Easing.InOutQuad }
+ }
+ }
+
+ Image {
+ source: "gfx/logo-bubble.png"
+ anchors.top: parent.top
+
+ SequentialAnimation on x {
+ loops: Animation.Infinite
+ NumberAnimation { from: x + 140; to: x + 40; duration: 2000; easing.type: Easing.InOutQuad }
+ NumberAnimation { from: x + 40; to: x + 140; duration: 1600; easing.type: Easing.InOutQuad }
+ }
+ SequentialAnimation on anchors.topMargin {
+ loops: Animation.Infinite
+ NumberAnimation { from: 100; to: 60; duration: 1600; easing.type: Easing.InOutQuad }
+ NumberAnimation { from: 60; to: 100; duration: 2000; easing.type: Easing.InOutQuad }
+ }
+ SequentialAnimation on width {
+ loops: Animation.Infinite
+ NumberAnimation { from: 140; to: 160; duration: 1000; easing.type: Easing.InOutQuad }
+ NumberAnimation { from: 160; to: 140; duration: 800; easing.type: Easing.InOutQuad }
+ }
+ SequentialAnimation on height {
+ loops: Animation.Infinite
+ NumberAnimation { from: 150; to: 140; duration: 800; easing.type: Easing.InOutQuad }
+ NumberAnimation { from: 140; to: 150; duration: 1000; easing.type: Easing.InOutQuad }
+ }
+ }
+
+ Image {
+ source: "gfx/button-play.png"
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 60
+ MouseArea {
+ anchors.fill: parent
+ onClicked: newGameScreen.startButtonClicked()
+ }
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/SoundEffect.qml b/basicsuite/qt5-everywhere/demos/maroon/content/SoundEffect.qml
new file mode 100644
index 0000000..0dccd12
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/SoundEffect.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+//Proxies a SoundEffect if QtMultimedia is installed
+Item {
+ id: container
+ property QtObject effect: Qt.createQmlObject("import QtMultimedia 5.0; SoundEffect{ source: '" + container.source + "' }", container);
+ property url source: ""
+ onSourceChanged: if (effect != null) effect.source = source;
+ function play() {
+ if (effect != null)
+ effect.play();
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/audio/bomb-action.wav b/basicsuite/qt5-everywhere/demos/maroon/content/audio/bomb-action.wav
new file mode 100644
index 0000000..b334dc1
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/audio/bomb-action.wav
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/audio/catch-action.wav b/basicsuite/qt5-everywhere/demos/maroon/content/audio/catch-action.wav
new file mode 100644
index 0000000..3e22124
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/audio/catch-action.wav
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/audio/catch.wav b/basicsuite/qt5-everywhere/demos/maroon/content/audio/catch.wav
new file mode 100644
index 0000000..d3eade8
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/audio/catch.wav
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/audio/currency.wav b/basicsuite/qt5-everywhere/demos/maroon/content/audio/currency.wav
new file mode 100644
index 0000000..0d9ef2c
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/audio/currency.wav
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/audio/factory-action.wav b/basicsuite/qt5-everywhere/demos/maroon/content/audio/factory-action.wav
new file mode 100644
index 0000000..a2ace6c
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/audio/factory-action.wav
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/audio/melee-action.wav b/basicsuite/qt5-everywhere/demos/maroon/content/audio/melee-action.wav
new file mode 100644
index 0000000..d325af4
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/audio/melee-action.wav
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/audio/projectile-action.wav b/basicsuite/qt5-everywhere/demos/maroon/content/audio/projectile-action.wav
new file mode 100644
index 0000000..4e2284f
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/audio/projectile-action.wav
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/audio/shooter-action.wav b/basicsuite/qt5-everywhere/demos/maroon/content/audio/shooter-action.wav
new file mode 100644
index 0000000..3e12b94
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/audio/shooter-action.wav
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/background.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/background.png
new file mode 100644
index 0000000..d548b93
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/background.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/bomb-action.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/bomb-action.png
new file mode 100644
index 0000000..42da5d7
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/bomb-action.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/bomb-idle.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/bomb-idle.png
new file mode 100644
index 0000000..3bd62e2
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/bomb-idle.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/bomb.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/bomb.png
new file mode 100644
index 0000000..380da7d
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/bomb.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/button-help.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/button-help.png
new file mode 100644
index 0000000..aecebc1
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/button-help.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/button-play.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/button-play.png
new file mode 100644
index 0000000..6cdad6c
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/button-play.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/catch-action.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/catch-action.png
new file mode 100644
index 0000000..78ca9fe
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/catch-action.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/catch.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/catch.png
new file mode 100644
index 0000000..b7620fe
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/catch.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/cloud.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/cloud.png
new file mode 100644
index 0000000..d7c35f8
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/cloud.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/currency.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/currency.png
new file mode 100644
index 0000000..1571341
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/currency.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-bomb.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-bomb.png
new file mode 100644
index 0000000..708d916
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-bomb.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-factory.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-factory.png
new file mode 100644
index 0000000..d2e2a48
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-factory.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-melee.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-melee.png
new file mode 100644
index 0000000..069d18d
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-melee.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-pointer.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-pointer.png
new file mode 100644
index 0000000..9b51a09
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-pointer.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-shooter.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-shooter.png
new file mode 100644
index 0000000..af980ca
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-shooter.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog.png
new file mode 100644
index 0000000..d528ba7
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/factory-action.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/factory-action.png
new file mode 100644
index 0000000..8981678
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/factory-action.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/factory-idle.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/factory-idle.png
new file mode 100644
index 0000000..a145582
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/factory-idle.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/factory.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/factory.png
new file mode 100644
index 0000000..bfb9f3f
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/factory.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/grid.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/grid.png
new file mode 100644
index 0000000..b595552
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/grid.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/help.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/help.png
new file mode 100644
index 0000000..4654e4c
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/help.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/lifes.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/lifes.png
new file mode 100644
index 0000000..135310b
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/lifes.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/logo-bubble.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/logo-bubble.png
new file mode 100644
index 0000000..136151c
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/logo-bubble.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/logo-fish.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/logo-fish.png
new file mode 100644
index 0000000..c41833a
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/logo-fish.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/logo.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/logo.png
new file mode 100644
index 0000000..787ac99
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/logo.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/melee-action.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/melee-action.png
new file mode 100644
index 0000000..c53873b
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/melee-action.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/melee-idle.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/melee-idle.png
new file mode 100644
index 0000000..621d9df
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/melee-idle.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/melee.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/melee.png
new file mode 100644
index 0000000..ab24015
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/melee.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/mob-idle.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/mob-idle.png
new file mode 100644
index 0000000..dedacc7
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/mob-idle.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/mob.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/mob.png
new file mode 100644
index 0000000..7569c35
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/mob.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/points.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/points.png
new file mode 100644
index 0000000..1d2386d
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/points.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/projectile-action.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/projectile-action.png
new file mode 100644
index 0000000..aa2e650
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/projectile-action.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/projectile.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/projectile.png
new file mode 100644
index 0000000..c25a0c3
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/projectile.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/scores.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/scores.png
new file mode 100644
index 0000000..af757fe
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/scores.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/shooter-action.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/shooter-action.png
new file mode 100644
index 0000000..08e7e30
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/shooter-action.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/shooter-idle.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/shooter-idle.png
new file mode 100644
index 0000000..663098d
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/shooter-idle.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/shooter.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/shooter.png
new file mode 100644
index 0000000..d44401e
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/shooter.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/sunlight.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/sunlight.png
new file mode 100644
index 0000000..d1c7042
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/sunlight.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-1.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-1.png
new file mode 100644
index 0000000..3ea399c
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-1.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-2.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-2.png
new file mode 100644
index 0000000..934a481
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-2.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-3.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-3.png
new file mode 100644
index 0000000..47523f5
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-3.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-blank.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-blank.png
new file mode 100644
index 0000000..4a687b2
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-blank.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-gameover.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-gameover.png
new file mode 100644
index 0000000..4f53ef0
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-gameover.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-go.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-go.png
new file mode 100644
index 0000000..bfc26f7
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-go.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/wave.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/wave.png
new file mode 100644
index 0000000..f97426c
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/wave.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/logic.js b/basicsuite/qt5-everywhere/demos/maroon/content/logic.js
new file mode 100644
index 0000000..dd76b7e
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/logic.js
@@ -0,0 +1,264 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+.pragma library // Shared game state
+.import QtQuick 2.0 as QQ
+
+// Game Stuff
+var gameState // Local reference
+function getGameState() { return gameState; }
+
+var towerData = [ // Name and cost, stats are in the delegate per instance
+ { "name": "Melee", "cost": 20 },
+ { "name": "Ranged", "cost": 50 },
+ { "name": "Bomb", "cost": 75 },
+ { "name": "Factory", "cost": 25 }
+]
+
+var waveBaseData = [300, 290, 280, 270, 220, 180, 160, 80, 80, 80, 30, 30, 30, 30];
+var waveData = [];
+
+var towerComponents = new Array(towerData.length);
+var mobComponent = Qt.createComponent("mobs/MobBase.qml");
+
+function endGame()
+{
+ gameState.gameRunning = false;
+ gameState.gameOver = true;
+ for (var i = 0; i < gameState.cols; i++) {
+ for (var j = 0; j < gameState.rows; j++) {
+ if (gameState.towers[towerIdx(i, j)]) {
+ gameState.towers[towerIdx(i, j)].destroy();
+ gameState.towers[towerIdx(i, j)] = null;
+ }
+ }
+ for (var j in gameState.mobs[i])
+ gameState.mobs[i][j].destroy();
+ gameState.mobs[i].splice(0,gameState.mobs[i].length); //Leaves queue reusable
+ }
+}
+
+function startGame(gameCanvas)
+{
+ waveData = new Array();
+ for (var i in waveBaseData)
+ waveData[i] = waveBaseData[i];
+ gameState.freshState();
+ for (var i = 0; i < gameCanvas.cols; i++) {
+ for (var j = 0; j < gameCanvas.rows; j++)
+ gameState.towers[towerIdx(i, j)] = null;
+ gameState.mobs[i] = new Array();
+ }
+ gameState.towers[towerIdx(0, 0)] = newTower(3, 0, 0);//Start with a starfish in the corner
+ gameState.gameRunning = true;
+ gameState.gameOver = false;
+}
+
+function newGameState(gameCanvas)
+{
+ for (var i = 0; i < towerComponents.length; i++) {
+ towerComponents[i] = Qt.createComponent("towers/" + towerData[i].name + ".qml");
+ if (towerComponents[i].status == QQ.Component.Error) {
+ gameCanvas.errored = true;
+ gameCanvas.errorString += "Loading Tower " + towerData[i].name + "\n" + (towerComponents[i].errorString());
+ console.log(towerComponents[i].errorString());
+ }
+ }
+ gameState = gameCanvas;
+ gameState.freshState();
+ gameState.towers = new Array(gameCanvas.rows * gameCanvas.cols);
+ gameState.mobs = new Array(gameCanvas.cols);
+ return gameState;
+}
+
+function row(y)
+{
+ return Math.floor(y / gameState.squareSize);
+}
+
+function col(x)
+{
+ return Math.floor(x / gameState.squareSize);
+}
+
+function towerIdx(x, y)
+{
+ return y + (x * gameState.rows);
+}
+
+function newMob(col)
+{
+ var ret = mobComponent.createObject(gameState.canvas,
+ { "col" : col,
+ "speed" : (Math.min(2.0, 0.10 * (gameState.waveNumber + 1))),
+ "y" : gameState.canvas.height });
+ gameState.mobs[col].push(ret);
+ return ret;
+}
+
+function newTower(type, row, col)
+{
+ var ret = towerComponents[type].createObject(gameState.canvas);
+ ret.row = row;
+ ret.col = col;
+ ret.fireCounter = ret.rof;
+ ret.spawn();
+ return ret;
+}
+
+function buildTower(type, x, y)
+{
+ if (gameState.towers[towerIdx(x,y)] != null) {
+ if (type <= 0) {
+ gameState.towers[towerIdx(x,y)].sell();
+ gameState.towers[towerIdx(x,y)] = null;
+ }
+ } else {
+ if (gameState.coins < towerData[type - 1].cost)
+ return;
+ gameState.towers[towerIdx(x, y)] = newTower(type - 1, y, x);
+ gameState.coins -= towerData[type - 1].cost;
+ }
+}
+
+function killMob(col, mob)
+{
+ if (!mob)
+ return;
+ var idx = gameState.mobs[col].indexOf(mob);
+ if (idx == -1 || !mob.hp)
+ return;
+ mob.hp = 0;
+ mob.die();
+ gameState.mobs[col].splice(idx,1);
+}
+
+function killTower(row, col)
+{
+ var tower = gameState.towers[towerIdx(col, row)];
+ if (!tower)
+ return;
+ tower.hp = 0;
+ tower.die();
+ gameState.towers[towerIdx(col, row)] = null;
+}
+
+function tick()
+{
+ if (!gameState.gameRunning)
+ return;
+
+ // Spawn
+ gameState.waveProgress += 1;
+ var i = gameState.waveProgress;
+ var j = 0;
+ while (i > 0 && j < waveData.length)
+ i -= waveData[j++];
+ if ( i == 0 ) // Spawn a mob
+ newMob(Math.floor(Math.random() * gameState.cols));
+ if ( j == waveData.length ) { // Next Wave
+ gameState.waveNumber += 1;
+ gameState.waveProgress = 0;
+ var waveModifier = 10; // Constant governing how much faster the next wave is to spawn (not fish speed)
+ for (var k in waveData ) // Slightly faster
+ if (waveData[k] > waveModifier)
+ waveData[k] -= waveModifier;
+ }
+
+ // Towers Attack
+ for (var j in gameState.towers) {
+ var tower = gameState.towers[j];
+ if (tower == null)
+ continue;
+ if (tower.fireCounter > 0) {
+ tower.fireCounter -= 1;
+ continue;
+ }
+ var column = tower.col;
+ for (var k in gameState.mobs[column]) {
+ var conflict = gameState.mobs[column][k];
+ if (conflict.y <= gameState.canvas.height && conflict.y + conflict.height > tower.y
+ && conflict.y - ((tower.row + 1) * gameState.squareSize) < gameState.squareSize * tower.range) { // In Range
+ tower.fire();
+ tower.fireCounter = tower.rof;
+ conflict.hit(tower.damage);
+ }
+ }
+
+ // Income
+ if (tower.income) {
+ gameState.coins += tower.income;
+ tower.fire();
+ tower.fireCounter = tower.rof;
+ }
+ }
+
+ // Mobs move
+ for (var i = 0; i < gameState.cols; i++) {
+ for (var j = 0; j < gameState.mobs[i].length; j++) {
+ var mob = gameState.mobs[i][j];
+ var newPos = gameState.mobs[i][j].y - gameState.mobs[i][j].speed;
+ if (newPos < 0) {
+ gameState.lives -= 1;
+ killMob(i, mob);
+ if (gameState.lives <= 0)
+ endGame();
+ continue;
+ }
+ var conflict = gameState.towers[towerIdx(i, row(newPos))];
+ if (conflict != null) {
+ if (mob.y < conflict.y + gameState.squareSize)
+ gameState.mobs[i][j].y += gameState.mobs[i][j].speed * 10; // Moved inside tower, now hurry back out
+ if (mob.fireCounter > 0) {
+ mob.fireCounter--;
+ } else {
+ gameState.mobs[i][j].fire();
+ conflict.hp -= mob.damage;
+ if (conflict.hp <= 0)
+ killTower(conflict.row, conflict.col);
+ mob.fireCounter = mob.rof;
+ }
+ } else {
+ gameState.mobs[i][j].y = newPos;
+ }
+ }
+ }
+
+}
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/mobs/MobBase.qml b/basicsuite/qt5-everywhere/demos/maroon/content/mobs/MobBase.qml
new file mode 100644
index 0000000..d4ece66
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/mobs/MobBase.qml
@@ -0,0 +1,262 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 "../logic.js" as Logic
+import ".."
+
+Item {
+ id: container
+ property string name: "Fish"
+ property int col: 0
+ property real hp: 3
+ property real damage: 1
+ property real speed: 0.25
+ property int rof: 30 //In ticks
+ property int fireCounter: 0
+ property bool dying: false
+ width: parent ? parent.squareSize : 0
+ height: parent ? parent.squareSize : 0
+ x: col * width
+ z: 1001
+ function fire() { }
+
+ function die() {
+ if (dying)
+ return;
+ dying = true;
+ bubble.jumpTo("burst");
+ if (fishSprite.currentSprite == "front")
+ fishSprite.jumpTo(Math.random() > 0.5 ? "left" : "right" );
+ fishSwim.start();
+ Logic.gameState.score += 1;
+ killedSound.play();
+ bubble.scale = 0.9
+ destroy(350);
+ }
+
+ function inked() {
+ if (hp > 0)
+ ink.jumpTo("dirty");
+ }
+
+ function hit(dmg) {
+ hp -= dmg;
+
+ if (hp <= 0)
+ Logic.killMob(col, container);
+ }
+
+ Component.onCompleted: spawnSound.play()
+
+ SoundEffect {
+ id: spawnSound
+ source: "../audio/catch.wav"
+ }
+ SoundEffect {
+ id: killedSound
+ source: "../audio/catch-action.wav"
+ }
+
+ SpriteSequence {
+ id: fishSprite
+ width: 64
+ height: 64
+ interpolate: false
+ goalSprite: ""
+
+ Sprite {
+ name: "left"
+ source: "../gfx/mob-idle.png"
+ frameWidth: 64
+ frameHeight: 64
+ frameCount: 1
+ frameDuration: 800
+ frameDurationVariation: 400
+ to: { "front" : 1 }
+ }
+
+ Sprite {
+ name: "front"
+ source: "../gfx/mob-idle.png"
+ frameCount: 1
+ frameX: 64
+ frameWidth: 64
+ frameHeight: 64
+ frameDuration: 800
+ frameDurationVariation: 400
+ to: { "left" : 1, "right" : 1 }
+ }
+
+ Sprite {
+ name: "right"
+ source: "../gfx/mob-idle.png"
+ frameCount: 1
+ frameX: 128
+ frameWidth: 64
+ frameHeight: 64
+ frameDuration: 800
+ frameDurationVariation: 400
+ to: { "front" : 1 }
+ }
+
+
+ Sprite { //WORKAROUND: This prevents the triggering of a rendering error which is currently under investigation.
+ name: "dummy"
+ source: "../gfx/melee-idle.png"
+ frameCount: 8
+ frameWidth: 64
+ frameHeight: 64
+ frameX: 0
+ frameDuration: 200
+ }
+
+ NumberAnimation on x {
+ id: fishSwim
+ running: false
+ property bool goingLeft: fishSprite.currentSprite == "right"
+ to: goingLeft ? -360 : 360
+ duration: 300
+ }
+ }
+
+ SpriteSequence {
+ id: bubble
+ width: 64
+ height: 64
+ scale: 0.4 + (0.2 * hp)
+ interpolate: false
+ goalSprite: ""
+
+ Behavior on scale {
+ NumberAnimation { duration: 150; easing.type: Easing.OutBack }
+ }
+
+ Sprite {
+ name: "big"
+ source: "../gfx/catch.png"
+ frameCount: 1
+ to: { "burst" : 0 }
+ }
+
+ Sprite {
+ name: "burst"
+ source: "../gfx/catch-action.png"
+ frameCount: 3
+ frameX: 64
+ frameDuration: 200
+ }
+
+ Sprite { //WORKAROUND: This prevents the triggering of a rendering error which is currently under investigation.
+ name: "dummy"
+ source: "../gfx/melee-idle.png"
+ frameCount: 8
+ frameWidth: 64
+ frameHeight: 64
+ frameX: 0
+ frameDuration: 200
+ }
+ SequentialAnimation on width {
+ loops: Animation.Infinite
+ NumberAnimation { from: width * 1; to: width * 1.1; duration: 800; easing.type: Easing.InOutQuad }
+ NumberAnimation { from: width * 1.1; to: width * 1; duration: 1000; easing.type: Easing.InOutQuad }
+ }
+ SequentialAnimation on height {
+ loops: Animation.Infinite
+ NumberAnimation { from: height * 1; to: height * 1.15; duration: 1200; easing.type: Easing.InOutQuad }
+ NumberAnimation { from: height * 1.15; to: height * 1; duration: 1000; easing.type: Easing.InOutQuad }
+ }
+ }
+
+ SpriteSequence {
+ id: ink
+ width: 64
+ height: 64
+ scale: bubble.scale
+ goalSprite: ""
+
+ Sprite {
+ name: "clean"
+ source: "../gfx/projectile-action.png"
+ frameCount: 1
+ frameX: 0
+ frameWidth: 64
+ frameHeight: 64
+ }
+ Sprite {
+ name: "dirty"
+ source: "../gfx/projectile-action.png"
+ frameCount: 3
+ frameX: 64
+ frameWidth: 64
+ frameHeight: 64
+ frameDuration: 150
+ to: {"clean":1}
+ }
+
+ Sprite { //WORKAROUND: This prevents the triggering of a rendering error which is currently under investigation.
+ name: "dummy"
+ source: "../gfx/melee-idle.png"
+ frameCount: 8
+ frameWidth: 64
+ frameHeight: 64
+ frameX: 0
+ frameDuration: 200
+ }
+ SequentialAnimation on width {
+ loops: Animation.Infinite
+ NumberAnimation { from: width * 1; to: width * 1.1; duration: 800; easing.type: Easing.InOutQuad }
+ NumberAnimation { from: width * 1.1; to: width * 1; duration: 1000; easing.type: Easing.InOutQuad }
+ }
+ SequentialAnimation on height {
+ loops: Animation.Infinite
+ NumberAnimation { from: height * 1; to: height * 1.15; duration: 1200; easing.type: Easing.InOutQuad }
+ NumberAnimation { from: height * 1.15; to: height * 1; duration: 1000; easing.type: Easing.InOutQuad }
+ }
+
+ }
+
+ SequentialAnimation on x {
+ loops: Animation.Infinite
+ NumberAnimation { from: x; to: x - 5; duration: 900; easing.type: Easing.InOutQuad }
+ NumberAnimation { from: x - 5; to: x; duration: 900; easing.type: Easing.InOutQuad }
+ }
+}
+
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/towers/Bomb.qml b/basicsuite/qt5-everywhere/demos/maroon/content/towers/Bomb.qml
new file mode 100644
index 0000000..41522ef
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/towers/Bomb.qml
@@ -0,0 +1,133 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 "../logic.js" as Logic
+import ".."
+
+TowerBase {
+ id: container
+ hp: 10
+ range: 0.4
+ rof: 10
+ property real detonationRange: 2.5
+
+ function fire() {
+ sound.play()
+ sprite.jumpTo("shoot")
+ animDelay.start()
+ }
+
+ function finishFire() {
+ var sCol = Math.max(0, col - 1)
+ var eCol = Math.min(Logic.gameState.cols - 1, col + 1)
+ var killList = new Array()
+ for (var i = sCol; i <= eCol; i++) {
+ for (var j = 0; j < Logic.gameState.mobs[i].length; j++)
+ if (Math.abs(Logic.gameState.mobs[i][j].y - container.y) < Logic.gameState.squareSize * detonationRange)
+ killList.push(Logic.gameState.mobs[i][j])
+ while (killList.length > 0)
+ Logic.killMob(i, killList.pop())
+ }
+ Logic.killTower(row, col);
+ }
+
+ Timer {
+ id: animDelay
+ running: false
+ interval: shootState.frameCount * shootState.frameDuration
+ onTriggered: finishFire()
+ }
+
+ function die()
+ {
+ destroy() // No blink, because we usually meant to die
+ }
+
+ SoundEffect {
+ id: sound
+ source: "../audio/bomb-action.wav"
+ }
+
+ SpriteSequence {
+ id: sprite
+ width: 64
+ height: 64
+ interpolate: false
+ goalSprite: ""
+
+ Sprite {
+ name: "idle"
+ source: "../gfx/bomb-idle.png"
+ frameCount: 4
+ frameDuration: 800
+ }
+
+ Sprite {
+ id: shootState
+ name: "shoot"
+ source: "../gfx/bomb-action.png"
+ frameCount: 6
+ frameDuration: 155
+ to: { "dying" : 1 } // So that if it takes a frame to clean up, it is on the last frame of the explosion
+ }
+
+ Sprite {
+ name: "dying"
+ source: "../gfx/bomb-action.png"
+ frameCount: 1
+ frameX: 64 * 5
+ frameWidth: 64
+ frameHeight: 64
+ frameDuration: 155
+ }
+
+ SequentialAnimation on x {
+ loops: Animation.Infinite
+ NumberAnimation { from: x; to: x + 4; duration: 900; easing.type: Easing.InOutQuad }
+ NumberAnimation { from: x + 4; to: x; duration: 900; easing.type: Easing.InOutQuad }
+ }
+ SequentialAnimation on y {
+ loops: Animation.Infinite
+ NumberAnimation { from: y; to: y - 4; duration: 900; easing.type: Easing.InOutQuad }
+ NumberAnimation { from: y - 4; to: y; duration: 900; easing.type: Easing.InOutQuad }
+ }
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/towers/Factory.qml b/basicsuite/qt5-everywhere/demos/maroon/content/towers/Factory.qml
new file mode 100644
index 0000000..b34a184
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/towers/Factory.qml
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 "../logic.js" as Logic
+import ".."
+
+TowerBase {
+ id: container
+ rof: 160
+ income: 5
+ SpriteSequence {
+ id: sprite
+ width: 64
+ height: 64
+ interpolate: false
+ goalSprite: ""
+
+ Sprite {
+ name: "idle"
+ source: "../gfx/factory-idle.png"
+ frameCount: 4
+ frameDuration: 200
+ }
+
+ Sprite {
+ name: "action"
+ source: "../gfx/factory-action.png"
+ frameCount: 4
+ frameDuration: 90
+ to: { "idle" : 1 }
+ }
+
+ SequentialAnimation on x {
+ loops: Animation.Infinite
+ NumberAnimation { from: x; to: x + 4; duration: 900; easing.type: Easing.InOutQuad }
+ NumberAnimation { from: x + 4; to: x; duration: 900; easing.type: Easing.InOutQuad }
+ }
+ SequentialAnimation on y {
+ loops: Animation.Infinite
+ NumberAnimation { from: y; to: y - 4; duration: 900; easing.type: Easing.InOutQuad }
+ NumberAnimation { from: y - 4; to: y; duration: 900; easing.type: Easing.InOutQuad }
+ }
+ }
+
+ SoundEffect {
+ id: actionSound
+ source: "../audio/factory-action.wav"
+ }
+
+ function fire() {
+ actionSound.play()
+ sprite.jumpTo("action")
+ coinLaunch.start()
+ }
+
+ function spawn() {
+ coin.target = Logic.gameState.mapToItem(container, 240, -32)
+ }
+
+ Image {
+ id: coin
+ property var target: { "x" : 0, "y" : 0 }
+ source: "../gfx/currency.png"
+ visible: false
+ }
+
+ SequentialAnimation {
+ id: coinLaunch
+ PropertyAction { target: coin; property: "visible"; value: true }
+ ParallelAnimation {
+ NumberAnimation { target: coin; property: "x"; from: 16; to: coin.target.x }
+ NumberAnimation { target: coin; property: "y"; from: 16; to: coin.target.y }
+ }
+ PropertyAction { target: coin; property: "visible"; value: false }
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/towers/Melee.qml b/basicsuite/qt5-everywhere/demos/maroon/content/towers/Melee.qml
new file mode 100644
index 0000000..1b49a45
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/towers/Melee.qml
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 ".."
+
+TowerBase {
+ hp: 4
+ range: 0.1
+ damage: 1
+ rof: 40
+ income: 0
+
+ SpriteSequence {
+ id: sprite
+ width: 64
+ height: 64
+ interpolate: false
+ goalSprite: ""
+
+ Sprite {
+ name: "idle"
+ source: "../gfx/melee-idle.png"
+ frameCount: 8
+ frameDuration: 250
+ }
+
+ Sprite {
+ name: "shoot"
+ source: "../gfx/melee-action.png"
+ frameCount: 2
+ frameDuration: 200
+ to: { "idle" : 1 }
+ }
+ }
+
+ function fire() {
+ shootSound.play()
+ sprite.jumpTo("shoot")
+ }
+
+ SoundEffect {
+ id: shootSound
+ source: "../audio/melee-action.wav"
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/towers/Ranged.qml b/basicsuite/qt5-everywhere/demos/maroon/content/towers/Ranged.qml
new file mode 100644
index 0000000..33f3354
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/towers/Ranged.qml
@@ -0,0 +1,128 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 "../logic.js" as Logic
+import ".."
+
+TowerBase {
+ id: container
+ hp: 2
+ range: 6
+ damage: 0 // By projectile
+ rof: 40
+ income: 0
+ property var targetMob
+ property real realDamage: 1
+ function fire() {
+ proj.x = 32 - proj.width / 2
+ proj.y = 0
+ targetMob = Logic.gameState.mobs[col][0]
+ projAnim.to = targetMob.y - container.y -10
+ projAnim.start()
+ shootSound.play()
+ sprite.jumpTo("shoot")
+ }
+
+ Image {
+ id: proj
+ y: 1000
+ SequentialAnimation on y {
+ id: projAnim
+ running: false
+ property real to: 1000
+ SmoothedAnimation {
+ to: projAnim.to
+ velocity: 400
+ }
+ ScriptAction {
+ script: {
+ if (targetMob && targetMob.hit) {
+ targetMob.hit(realDamage)
+ targetMob.inked()
+ projSound.play()
+ }
+ }
+ }
+ PropertyAction {
+ value: 1000;
+ }
+ }
+ source: "../gfx/projectile.png"
+ }
+
+ SoundEffect {
+ id: shootSound
+ source: "../audio/shooter-action.wav"
+ }
+ SoundEffect {
+ id: projSound
+ source: "../audio/projectile-action.wav"
+ }
+
+ SpriteSequence {
+ id: sprite
+ width: 64
+ height: 64
+ interpolate: false
+ goalSprite: ""
+
+ Sprite {
+ name: "idle"
+ source: "../gfx/shooter-idle.png"
+ frameCount: 4
+ frameDuration: 250
+ }
+
+ Sprite {
+ name: "shoot"
+ source: "../gfx/shooter-action.png"
+ frameCount: 5
+ frameDuration: 90
+ to: { "idle" : 1 }
+ }
+
+ SequentialAnimation on x {
+ loops: Animation.Infinite
+ NumberAnimation { from: x; to: x - 4; duration: 900; easing.type: Easing.InOutQuad }
+ NumberAnimation { from: x - 4; to: x; duration: 900; easing.type: Easing.InOutQuad }
+ }
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/towers/TowerBase.qml b/basicsuite/qt5-everywhere/demos/maroon/content/towers/TowerBase.qml
new file mode 100644
index 0000000..5c71cb0
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/maroon/content/towers/TowerBase.qml
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 hp: 1
+ property real range: 0
+ property real damage: 0
+ property int rof: 100
+ property int fireCounter: 0
+ property int income: 0
+ property int row: 0
+ property int col: 0
+
+ width: parent ? parent.squareSize : 0
+ height: parent ? parent.squareSize : 0
+ //This is how it is placed on the gameboard, do not modify/animate the X/Y/Z of a TowerBase please
+ x: col * width
+ y: row * height
+ z: 1000
+
+ function fire() { }
+ function spawn() { } //After all game properties are set
+ function die() { stdDeath.start(); destroy(1000); }
+ function sell() { destroy(); }
+
+ SequentialAnimation on opacity {
+ id: stdDeath
+ running: false
+ loops: 2
+ NumberAnimation { from: 1; to: 0; }
+ NumberAnimation { from: 0; to: 1; }
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/particledemo/BootScreenDemo.qml b/basicsuite/qt5-everywhere/demos/particledemo/BootScreenDemo.qml
new file mode 100644
index 0000000..eb4e29e
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/particledemo/BootScreenDemo.qml
@@ -0,0 +1,181 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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: root
+ property real size: Math.min(root.width, root.height);
+ signal finished()
+
+ SequentialAnimation {
+ id: entryAnimation
+ running: true
+ PropertyAction { target: sphereEmitter; property: "emitRate"; value: 150 }
+ PropertyAction { target: starEmitter; property: "emitRate"; value: 100 }
+ PropertyAction { target: starEmitter; property: "enabled"; value: true }
+ PropertyAction { target: sphereEmitter; property: "enabled"; value: true }
+ PropertyAction { target: sphereSystem; property: "running"; value: true }
+ PropertyAction { target: starSystem; property: "running"; value: true }
+ PauseAnimation { duration: 5000 }
+
+ onRunningChanged: if (!running) explodeAnimation.restart()
+ }
+
+ SequentialAnimation{
+ id: explodeAnimation
+ ScriptAction { script: {
+ starAccel.x = 5
+ starAccel.xVariation = 20;
+ starAccel.yVariation = 20;
+ sphereAccel.x = -5
+ sphereAccel.xVariation = 20
+ sphereAccel.yVariation = 20
+ sphereParticle.alpha = 0;
+ }
+ }
+ PropertyAction { target: sphereEmitter; property: "emitRate"; value: 200 }
+ PropertyAction { target: starEmitter; property: "emitRate"; value: 200 }
+ PauseAnimation { duration: 2000 }
+ PropertyAction { target: starEmitter; property: "enabled"; value: false }
+ PropertyAction { target: sphereEmitter; property: "enabled"; value: false }
+ PauseAnimation { duration: 5000 }
+
+ onRunningChanged: {
+ if (!running) {
+ root.finished()
+ root.destroy()
+ }
+ }
+ }
+
+ Item {
+ id: logo;
+ width: root.size / 2;
+ height: root.size / 2;
+ anchors.centerIn: parent
+ }
+
+ ParticleSystem {
+ id: sphereSystem;
+ anchors.fill: logo
+ running: false
+
+ ImageParticle {
+ id: sphereParticle
+ source: "images/particle.png"
+ color: "#80c342"
+ alpha: 1
+ colorVariation: 0.0
+ }
+
+ Emitter {
+ id: sphereEmitter
+ anchors.fill: parent
+ emitRate: 100
+ lifeSpan: 4000
+ size: root.width*.15
+ sizeVariation: size *.2
+ velocity: PointDirection { xVariation: 2; yVariation: 2; }
+
+ acceleration: PointDirection {
+ id: sphereAccel
+ xVariation: 1;
+ yVariation: 1;
+ }
+
+ shape: MaskShape {
+ source: "images/qt-logo-green-mask.png"
+ }
+ }
+ }
+
+ ParticleSystem {
+ id: starSystem;
+ anchors.fill: logo
+ running: false
+
+ ImageParticle {
+ id: starParticle
+ source: "images/particle_star.png"
+ color: "#ffffff"
+ alpha: 0
+ colorVariation: 0
+ }
+
+ Emitter {
+ id: starEmitter
+ anchors.fill: parent
+ emitRate: 50
+ lifeSpan: 5000
+ size: root.width*.1
+ sizeVariation: size *.2
+ velocity: PointDirection { xVariation: 1; yVariation: 1; }
+
+ acceleration: PointDirection {
+ id: starAccel
+ xVariation: 0;
+ yVariation: 0;
+ }
+
+ shape: MaskShape {
+ source: "images/qt-logo-white-mask.png"
+ }
+ }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+
+ if (entryAnimation.running) {
+ entryAnimation.complete()
+ return;
+ }
+
+ if (explodeAnimation.running) {
+ root.finished()
+ root.destroy()
+ }
+
+ }
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/particledemo/ParticleSysComponent.qml b/basicsuite/qt5-everywhere/demos/particledemo/ParticleSysComponent.qml
new file mode 100644
index 0000000..fc74037
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/particledemo/ParticleSysComponent.qml
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 component draw particles with the given color.
+ */
+
+ParticleSystem {
+ id: root
+ anchors.fill: parent
+ running: true
+
+ property color particleColor: "#ff0000"
+ property real angle: particleRoot.angle;
+ property int pointCount: particleRoot.pointCount;
+ property real radius: particleRoot.distance;
+ property real movement: particleRoot.movement;
+ property bool emitting: particleRoot.running;
+ property int touchX: 0
+ property int touchY: 0
+ property int startAngle: 0
+ property bool pressed: false
+ property real targetX: pressed ? touchX : width/2+radius * Math.cos(targetAngle*(Math.PI/180))
+ property real targetY: pressed ? touchY : height/2+radius * Math.sin(targetAngle*(Math.PI/180))
+ property real targetAngle: angle+startAngle
+
+ Emitter {
+ id: emitter
+ lifeSpan: 1000
+ emitRate: 80
+ x: targetX
+ y: targetY
+ enabled: root.emitting
+ size: root.height*.05
+ endSize: root.height*.1
+ sizeVariation: .5
+ velocity: AngleDirection{angle:0; angleVariation: 360; magnitude: 10}
+ acceleration: AngleDirection{angle:0; angleVariation: 360; magnitude: 10}
+ velocityFromMovement: root.movement
+ }
+
+ ImageParticle {
+ id: imageParticle
+ source: "images/particle.png"
+ color: root.pointCount >0 && root.pressed ? root.particleColor: "#444444"
+ alpha: .0
+ colorVariation: root.pointCount >0 && root.pressed ? 0.3: .0
+
+ Behavior on color{
+ enabled: root.pointCount != 0
+ ColorAnimation { duration: 500 }
+ }
+
+ SequentialAnimation on color {
+ id: colorAnimation
+ loops: Animation.Infinite
+ running: root.pointCount === 0
+ ColorAnimation {from: root.particleColor; to: "magenta"; duration: 2000}
+ ColorAnimation {from: "magenta"; to: "blue"; duration: 1000}
+ ColorAnimation {from: "blue"; to: "violet"; duration: 1000}
+ ColorAnimation {from: "violet"; to: "red"; duration: 1000}
+ ColorAnimation {from: "red"; to: "orange"; duration: 1000}
+ ColorAnimation {from: "orange"; to: "yellow"; duration: 1000}
+ ColorAnimation {from: "yellow"; to: "green"; duration: 1000}
+ ColorAnimation {from: "green"; to: root.particleColor; duration: 2000}
+ }
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/particledemo/images/particle.png b/basicsuite/qt5-everywhere/demos/particledemo/images/particle.png
new file mode 100644
index 0000000..7520c9b
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/particledemo/images/particle.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/particledemo/images/particle_star.png b/basicsuite/qt5-everywhere/demos/particledemo/images/particle_star.png
new file mode 100644
index 0000000..5660d27
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/particledemo/images/particle_star.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/particledemo/images/qt-logo-green-mask.png b/basicsuite/qt5-everywhere/demos/particledemo/images/qt-logo-green-mask.png
new file mode 100644
index 0000000..84be10d
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/particledemo/images/qt-logo-green-mask.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/particledemo/images/qt-logo-white-mask.png b/basicsuite/qt5-everywhere/demos/particledemo/images/qt-logo-white-mask.png
new file mode 100644
index 0000000..920eeee
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/particledemo/images/qt-logo-white-mask.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/particledemo/particle.png b/basicsuite/qt5-everywhere/demos/particledemo/particle.png
new file mode 100644
index 0000000..5c83896
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/particledemo/particle.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/particledemo/particledemo.qml b/basicsuite/qt5-everywhere/demos/particledemo/particledemo.qml
new file mode 100644
index 0000000..c3f8253
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/particledemo/particledemo.qml
@@ -0,0 +1,213 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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: particleRoot
+ color: "#000000"
+ anchors.fill: parent
+
+ property real distance: parent.height*.4
+ property real angle: 0
+ property real movement: 0
+ property alias running: angleAnimation.running
+ property int pointCount: mouseArea.pointCount + multiPointTouchArea.pointCount
+
+ BootScreenDemo {
+ width: Math.min(parent.width,parent.height)
+ height: width
+ anchors.centerIn: parent
+ z: 1
+ onFinished: {
+ distanceAnimation.restart()
+ angleAnimation.restart()
+ }
+ }
+
+ RotationAnimation on angle {
+ id: angleAnimation
+ from: 0
+ to: 360
+ running: false
+ duration: distanceAnimation.delay
+ direction: RotationAnimation.Shortest
+ loops: Animation.Infinite
+ }
+
+ SequentialAnimation on distance {
+ id: distanceAnimation
+ property int easingType:0
+ property int delay: 1000
+ running: false
+
+ NumberAnimation {
+ from: 0
+ to: parent.height*.4
+ duration: distanceAnimation.delay/2
+ easing.type: distanceAnimation.easingType
+ }
+
+ NumberAnimation {
+ from: parent.height*.4
+ to: 0
+ duration: distanceAnimation.delay/2
+ easing.type: distanceAnimation.easingType
+ }
+
+ onRunningChanged: {
+ if (!running){
+ var type = Math.floor(Math.random()*10)
+ switch (type){
+ case 0:
+ distanceAnimation.easingType=Easing.InOutBack
+ break;
+ case 1:
+ distanceAnimation.easingType=Easing.InOutBounce
+ break;
+ case 2:
+ distanceAnimation.easingType=Easing.InOutCirc
+ break;
+ case 3:
+ distanceAnimation.easingType=Easing.InOutElastic
+ break;
+ case 4:
+ distanceAnimation.easingType=Easing.InOutSine
+ break;
+ case 5:
+ distanceAnimation.easingType=Easing.OutInQuad
+ break;
+ case 6:
+ distanceAnimation.easingType=Easing.OutInCubic
+ break;
+ case 7:
+ distanceAnimation.easingType=Easing.OutExpo
+ break;
+ case 8:
+ distanceAnimation.easingType=Easing.OutCurve
+ break;
+ default:
+ distanceAnimation.easingType=Easing.Linear
+ break;
+ }
+
+ distanceAnimation.delay = 500 + Math.floor(Math.random()*1500)
+ angleAnimation.from = 180 + Math.random()*90 - 45
+ particleRoot.movement = Math.random()*2
+ angleAnimation.restart()
+ distanceAnimation.restart()
+ }
+ }
+ }
+
+ /**
+ * Create five ParticleSysComponents for drawing particles
+ * in the place of multitouch points with the given color.
+ */
+ ParticleSysComponent{ id: p1; particleColor: "#ff0000"; startAngle: 1*360/(5-particleRoot.pointCount); }
+ ParticleSysComponent{ id: p2; particleColor: "#00ff00"; startAngle: 2*360/(5-particleRoot.pointCount); }
+ ParticleSysComponent{ id: p3; particleColor: "#0000ff"; startAngle: 3*360/(5-particleRoot.pointCount); }
+ ParticleSysComponent{ id: p4; particleColor: "#ffff00"; startAngle: 4*360/(5-particleRoot.pointCount); }
+ ParticleSysComponent{ id: p5; particleColor: "#ff00ff"; startAngle: 5*360/(5-particleRoot.pointCount); }
+
+ /**
+ * In this demo we only support five touch point at the same time.
+ * One from mouseArea (because of Desktop-support) and four from MultiPointTouchArea.
+ */
+ MultiPointTouchArea {
+ id: multiPointTouchArea
+ anchors.fill: parent
+ minimumTouchPoints: 1
+ maximumTouchPoints: 6
+
+ property int pointCount:0
+
+ touchPoints: [
+ TouchPoint { id: point1 },
+ TouchPoint { id: point2 },
+ TouchPoint { id: point3 },
+ TouchPoint { id: point4 }
+ ]
+
+ onPressed: updatePointCount()
+ onReleased: updatePointCount()
+ onTouchUpdated: {
+ p2.touchX = point1.x; p2.touchY = point1.y; p2.pressed = point1.pressed;
+ p3.touchX = point2.x; p3.touchY = point2.y; p3.pressed = point2.pressed;
+ p4.touchX = point3.x; p4.touchY = point3.y; p4.pressed = point3.pressed;
+ p5.touchX = point4.x; p5.touchY = point4.y; p5.pressed = point4.pressed;
+ }
+
+ function updatePointCount(){
+ var tmp = 0
+ for (var i=0; i<4; i++) {
+ if (touchPoints[i].pressed)
+ tmp++
+ }
+ pointCount = tmp
+ }
+ }
+
+ /**
+ * For desktop.
+ */
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+
+ property int pointCount:0
+
+ onPressed: {
+ pointCount = 1;
+ p1.touchX = mouse.x;
+ p1.touchY = mouse.y;
+ p1.pressed = true;
+ }
+ onReleased: {
+ pointCount = 0;
+ p1.pressed = false;
+ }
+ onPositionChanged: {
+ p1.touchX = mouse.x;
+ p1.touchY = mouse.y;
+ }
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/photosurface/images/image0.png b/basicsuite/qt5-everywhere/demos/photosurface/images/image0.png
new file mode 100644
index 0000000..711b788
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/photosurface/images/image0.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/photosurface/images/image1.png b/basicsuite/qt5-everywhere/demos/photosurface/images/image1.png
new file mode 100644
index 0000000..e9bfcdf
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/photosurface/images/image1.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/photosurface/images/image2.png b/basicsuite/qt5-everywhere/demos/photosurface/images/image2.png
new file mode 100644
index 0000000..b37453c
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/photosurface/images/image2.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/photosurface/images/image3.png b/basicsuite/qt5-everywhere/demos/photosurface/images/image3.png
new file mode 100644
index 0000000..63d82e7
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/photosurface/images/image3.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/photosurface/images/image4.png b/basicsuite/qt5-everywhere/demos/photosurface/images/image4.png
new file mode 100644
index 0000000..a499231
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/photosurface/images/image4.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/photosurface/images/qml-photosurface-example-small.png b/basicsuite/qt5-everywhere/demos/photosurface/images/qml-photosurface-example-small.png
new file mode 100644
index 0000000..a0cd823
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/photosurface/images/qml-photosurface-example-small.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/photosurface/photosurface.qml b/basicsuite/qt5-everywhere/demos/photosurface/photosurface.qml
new file mode 100644
index 0000000..6ca2626
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/photosurface/photosurface.qml
@@ -0,0 +1,131 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+ visible: true
+ anchors.fill: parent
+ property int highestZ: 0
+ property real defaultSize: 200
+
+ gradient: Gradient{
+ GradientStop{position: 0.0; color: "#333333"}
+ GradientStop{position: 1.0; color: "#111111"}
+ }
+
+ Repeater {
+// model: FolderListModel {
+// id: folderModel
+// objectName: "folderModel"
+// showDirs: false
+// nameFilters: ["*.png", "*.jpg", "*.gif"]
+// }
+ id: repeater
+ model: 5
+ anchors.fill: parent
+
+ clip: true
+ Rectangle {
+ id: photoFrame
+ width: image.width * image.scale + 20
+ height: image.height * image.scale + 20
+ border.color: "black"
+ border.width: 2
+ smooth: true
+ antialiasing: true
+ x: Math.random() * root.width - defaultSize / 2
+ y: Math.random() * root.height - defaultSize / 2
+ rotation: Math.random() * 13 - 6
+ Image {
+ id: image
+ anchors.centerIn: parent
+ fillMode: Image.PreserveAspectFit
+ source: "images/image"+index+".png"
+ scale: defaultSize / Math.max(sourceSize.width, sourceSize.height)
+ antialiasing: true
+ }
+ PinchArea {
+ anchors.fill: parent
+ pinch.target: photoFrame
+ pinch.minimumRotation: -360
+ pinch.maximumRotation: 360
+ pinch.minimumScale: 0.1
+ pinch.maximumScale: 10
+ onPinchFinished: photoFrame.border.color = "black";
+ MouseArea {
+ id: dragArea
+ hoverEnabled: true
+ anchors.fill: parent
+ drag.target: photoFrame
+ onPressed: photoFrame.z = ++root.highestZ;
+ onEntered: photoFrame.border.color = "red";
+ onExited: photoFrame.border.color = "black";
+ onWheel: {
+ if (wheel.modifiers & Qt.ControlModifier) {
+ photoFrame.rotation += wheel.angleDelta.y / 120 * 5;
+ if (Math.abs(photoFrame.rotation) < 4)
+ photoFrame.rotation = 0;
+ } else {
+ photoFrame.rotation += wheel.angleDelta.x / 120;
+ if (Math.abs(photoFrame.rotation) < 0.6)
+ photoFrame.rotation = 0;
+ var scaleBefore = image.scale;
+ image.scale += image.scale * wheel.angleDelta.y / 120 / 10;
+ photoFrame.x -= image.width * (image.scale - scaleBefore) / 2.0;
+ photoFrame.y -= image.height * (image.scale - scaleBefore) / 2.0;
+ }
+ }
+ }
+ }
+ }
+ }
+// Text {
+// anchors.bottom: parent.bottom
+// anchors.left: parent.left
+// anchors.margins: 10
+// color: "darkgrey"
+// text: "On a touchscreen: use two fingers to zoom and rotate, one finger to drag\n" +
+// "With a mouse: drag normally, use the vertical wheel to zoom, horizontal wheel to rotate, or hold Ctrl while using the vertical wheel to rotate"
+// wrapMode: Text.Wrap
+// }
+
+ //Component.onCompleted: fileDialog.open()
+}
diff --git a/basicsuite/qt5-everywhere/demos/radio/VolumeButton.qml b/basicsuite/qt5-everywhere/demos/radio/VolumeButton.qml
new file mode 100644
index 0000000..76635b6
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/radio/VolumeButton.qml
@@ -0,0 +1,185 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+ width: size
+ height: size
+
+ property int steps: 10
+ property int size: 0
+ property real volume: .5
+ property bool playing: false
+ signal clicked();
+
+ Item {
+ id: bg
+ anchors.fill: parent
+
+ Rectangle {
+ id: bgRect
+
+ gradient: Gradient {
+ GradientStop {position: .0; color: "lightgray"}
+ GradientStop {position: 1.0; color: "white"}
+ }
+
+ border {width:1; color: "#888888"}
+ radius: root.size/2
+ anchors.centerIn: parent
+ width: parent.width
+ height: parent.height
+ }
+
+ Rectangle {
+ gradient: Gradient {
+ GradientStop {position: .0; color: playButtonMouseArea.pressed ? "#052e41": "#095477"}
+ GradientStop {position: 1.0; color: playButtonMouseArea.pressed ? "#095477": "#052e41"}
+ }
+
+ border {width:1; color: "#888888"}
+ radius: width/2
+ anchors.centerIn: parent
+ width: parent.width*.6
+ height: parent.height*.6
+
+ Image {
+ anchors {fill: parent; margins: parent.height*.3}
+ source: !root.playing ? "images/radio_btn_play.png" : "images/radio_btn_pause.png"
+ }
+
+ MouseArea {
+ id: playButtonMouseArea
+ anchors.fill: parent
+ anchors.margins: parent.width*.2
+ onClicked:{
+ root.clicked()
+ }
+ }
+ }
+ }
+
+ Item {
+ id: volumeIndicator
+ anchors.centerIn: root
+ width: root.size
+ height: root.size
+ z:2
+
+ Rectangle{
+ id: volumeCircle
+ objectName: "volumeCircle"
+ anchors {horizontalCenter: parent.horizontalCenter; top: parent.top}
+
+ gradient: Gradient {
+ GradientStop {position: .1; color: "#095477"}
+ GradientStop {position: 1.0; color: "#0e82b8"}
+ }
+
+ width: root.size * .2
+ height: width
+ radius: width/2
+ border {width:1; color: "#888888"}
+
+ Image {
+ anchors {fill: parent; margins: parent.height*.2}
+ source: "images/radio_sound_icon.png"
+ rotation: -volumeRotation.angle
+ }
+ }
+
+ transform: Rotation {
+ id: volumeRotation
+ origin.x: volumeIndicator.width/2
+ origin.y: volumeIndicator.height/2
+ angle: 270.0*root.volume+225
+ }
+ }
+
+ MouseArea {
+ id: mouseArea
+ anchors.fill: volumeIndicator
+ property bool grabbed: false
+ anchors.margins: -root.size*.2
+ z: -1
+
+ onPressed: {
+ var object = mapToItem(volumeIndicator, mouse.x, mouse.y)
+ var item = volumeIndicator.childAt(object.x,object.y)
+ if (item && item.objectName === 'volumeCircle') {
+ grabbed = true
+ return;
+ } else {
+ grabbed = false
+ }
+
+ object = mapToItem(root, mouse.x, mouse.y)
+ item = root.childAt(object.x,object.y)
+ if (item && item.objectName === 'volumePoint') {
+ root.volume = item.level
+ }
+ }
+
+ onPositionChanged: {
+ if (!grabbed) return;
+ var ang = (225+Math.atan2((mouse.y-mouseArea.height/2.0), (mouse.x-mouseArea.width/2.0))*180.0/Math.PI)
+ if (ang >360) ang-=360
+ if (ang > 270) return;
+ root.volume = (ang)/270.0
+ }
+ }
+
+ function init(){
+ for (var i=0; i<=root.steps; i++){
+ var x=Math.cos(((i)*270/root.steps+135)*0.01745)*root.size*.40
+ var y=Math.sin(((i)*270/root.steps+135)*0.01745)*root.size*.40
+ var component = Qt.createComponent("VolumePoint.qml")
+ if (component.status === Component.Ready) {
+ var object = component.createObject(root);
+ object.size = root.size*.05
+ object.x = root.size/2+x-object.size/2
+ object.y = root.size/2+y-object.size/2
+ object.level = i/root.steps
+ }
+ }
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/radio/VolumePoint.qml b/basicsuite/qt5-everywhere/demos/radio/VolumePoint.qml
new file mode 100644
index 0000000..c107823
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/radio/VolumePoint.qml
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+ objectName: "volumePoint"
+ width: size
+ height: size
+ radius: size/2
+ color: volume >= level ? "#0e82b8": "#095477"
+ border {width:1; color: "#888888"}
+ property int size: 10
+ property real level: 0
+ property real volume: parent.volume
+
+ Behavior on color{ColorAnimation { duration: 500 }}
+
+ Item {
+ id: pointClickArea
+ objectName: "pointClickArea"
+ property alias value: root.level
+ anchors.fill: parent
+ anchors.margins: -root.size*2
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/radio/channels.xml b/basicsuite/qt5-everywhere/demos/radio/channels.xml
new file mode 100644
index 0000000..99522ab
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/radio/channels.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+ <radio>
+ <channel>
+ <title>BBC World Service</title>
+ <url>http://vpr.streamguys.net/vpr24.mp3</url>
+ </channel>
+ <channel>
+ <title>CBC Music Hard Rock</title>
+ <url>http://2903.live.streamtheworld.com:80/CBC_HAROCK_H_SC.mp3</url>
+ </channel>
+ <channel>
+ <title>"JPR Classics"</title>
+ <url>http://jpr.streamguys.org:80/jpr-classics</url>
+ </channel>
+ <channel>
+ <title>VPR Classical</title>
+ <url>http://vprclassical.streamguys.net/vprclassical24.mp3</url>
+ </channel>
+ <channel>
+ <title>VPR Jazz24</title>
+ <url>http://vprjazz.streamguys.net/vprjazz24.mp3</url>
+ </channel>
+ <channel>
+ <title>Radio Paradise</title>
+ <url>http://scfire-m26.websys.aol.com:80/radio_paradise_mp3_128kbps.mp3</url>
+ </channel>
+ </radio>
diff --git a/basicsuite/qt5-everywhere/demos/radio/images/radio_btn_pause.png b/basicsuite/qt5-everywhere/demos/radio/images/radio_btn_pause.png
new file mode 100644
index 0000000..5204834
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/radio/images/radio_btn_pause.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/radio/images/radio_btn_play.png b/basicsuite/qt5-everywhere/demos/radio/images/radio_btn_play.png
new file mode 100644
index 0000000..92ee858
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/radio/images/radio_btn_play.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/radio/images/radio_btn_stop.png b/basicsuite/qt5-everywhere/demos/radio/images/radio_btn_stop.png
new file mode 100644
index 0000000..187158a
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/radio/images/radio_btn_stop.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/radio/images/radio_sound_icon.png b/basicsuite/qt5-everywhere/demos/radio/images/radio_sound_icon.png
new file mode 100644
index 0000000..ac0b61e
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/radio/images/radio_sound_icon.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/radio/images/volume.png b/basicsuite/qt5-everywhere/demos/radio/images/volume.png
new file mode 100644
index 0000000..a098d82
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/radio/images/volume.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/radio/radio.qml b/basicsuite/qt5-everywhere/demos/radio/radio.qml
new file mode 100644
index 0000000..8615f9b
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/radio/radio.qml
@@ -0,0 +1,261 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 QtMultimedia 5.0
+import QtQuick.XmlListModel 2.0
+
+FocusScope {
+ id: scope
+ x: parent.x; y: parent.y
+ width: parent.width; height: parent.height
+ focus: true
+ property bool active: false
+
+ Rectangle {
+ id: root
+ width:parent.width
+ height: parent.height
+ anchors.centerIn: parent
+ focus: true
+ color: "#262626"
+
+ Audio {
+ id: playMusic
+ source: ""
+ volume: volumeButton.volume
+ onSourceChanged: {
+ if (volumeButton.playing) playMusic.play()
+ }
+ onAvailabilityChanged: {
+ if (availability === Audio.Available) {
+ if (volumeButton.playing) playMusic.play()
+ }
+ }
+ Component.onDestruction: {
+ volumeButton.playing = false
+ playMusic.stop()
+ playMusic.source = ""
+ }
+ }
+
+ Rectangle {
+ id: playerRect
+ anchors.top: volumeButton.top
+ anchors.left: volumeButton.left
+ anchors.bottom: volumeButton.bottom
+ anchors.right: parent.right
+ anchors.rightMargin: parent.height*.05
+ gradient: Gradient {
+ GradientStop {position: .1; color: "lightgrey"}
+ GradientStop {position: 1.0; color: "white"}
+ }
+ border {width:1; color: "#888888"}
+ radius: height/2
+
+ Rectangle {
+ id: displayRect
+ anchors.fill: parent
+ anchors.margins: parent.height*.1
+ gradient: Gradient {
+ GradientStop {position: .0; color: "#095477"}
+ GradientStop {position: 1.0; color: "#052e41"}
+ }
+ border {width:1; color: "#888888"}
+ radius: height/2
+
+
+ PathView {
+ enabled: root.activeFocus
+ id: stationList
+ anchors.fill:parent
+ anchors.leftMargin: parent.height*.9
+ model: stationModel
+ pathItemCount: 6
+ clip: true
+ property int openedIndex: -1
+
+ onMovementStarted: {
+ idleTimer.stop()
+ openedIndex = -1
+ pathItemCount = 5
+ }
+ onMovementEnded: idleTimer.restart()
+
+ onOpenedIndexChanged: {
+ if (openedIndex === -1) return
+ idleTimer.lastIndex=openedIndex
+ positionViewAtIndex(openedIndex, PathView.Center)
+ }
+
+ Timer {
+ id: idleTimer
+ interval: 5000
+ property int lastIndex: -1
+ onTriggered: {
+ stationList.openedIndex = idleTimer.lastIndex
+ }
+ }
+
+ Timer {
+ id: browseTimer
+ interval: 500
+ property string source:""
+ onTriggered: playMusic.source = source
+ }
+
+ path: Path {
+ startX: stationList.x; startY: 0
+ PathArc {
+ id: pathArc
+ x: stationList.x; relativeY: stationList.height*1.1
+ radiusX: volumeButton.height/2
+ radiusY: volumeButton.height/2
+ useLargeArc: false
+ }
+ }
+
+ delegate: Item {
+ id: stationDelegate
+ property bool opened: stationList.openedIndex === index
+ width: stationList.width*.7
+ height: opened? stationList.height*.4: stationList.height*.2
+
+ Behavior on height {NumberAnimation{duration:200}}
+
+ Text {
+ id: delegateText
+ anchors.left: parent.left
+ anchors.top: parent.top
+ text: (index+1) +". " +title
+ font.pixelSize: stationDelegate.opened? stationList.height*.15 : stationList.height*.1
+ font.weight: stationDelegate.opened? Font.Bold: Font.Normal
+ color: stationList.openedIndex ===-1 || opened? "white": "#0e82b8"
+ Behavior on font.pixelSize {NumberAnimation{duration:200}}
+ }
+
+ Text {
+ id: statustextText
+ anchors.left: parent.left
+ anchors.top: delegateText.bottom
+
+ text: playMusic.playbackState=== Audio.PlayingState ? "Playing...":
+ playMusic.status=== Audio.Buffering ? "Buffering...":
+ playMusic.status=== Audio.Loading ? "Loading...":
+ playMusic.playbackState=== Audio.StoppedState ? "Stopped":"Error"
+
+ font.pixelSize: stationList.height*.1
+ color: delegateText.color
+ opacity: opened? 1.0: .0
+ Behavior on opacity {NumberAnimation{duration:200}}
+ }
+
+
+ MouseArea {
+ anchors.fill: parent
+ visible: root.activeFocus
+
+ onClicked: {
+ if (opened){
+ idleTimer.lastIndex=-1
+ stationList.openedIndex=-1
+ }else {
+ stationList.openedIndex= index
+ browseTimer.source = url
+ browseTimer.restart()
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ XmlListModel {
+ id: stationModel
+ source: "http://qt-project.org/uploads/videos/qt5_radio_channels.xml"
+ query: "/radio/channel"
+ XmlRole {name: "title"; query: "title/string()"}
+ XmlRole {name: "url"; query: "url/string()"}
+ }
+
+ VolumeButton {
+ id: volumeButton
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ anchors.leftMargin: size*.1
+ size:parent.height*.5
+ playing: playMusic.playbackState === Audio.PlayingState
+ onClicked: {
+ if (!playMusic.source) return;
+ if (!playing) {
+ playMusic.play()
+ }else {
+ playMusic.stop()
+ }
+ }
+ }
+
+ Component.onCompleted: {
+ volumeButton.init()
+ scope.focus = true
+ }
+
+ Keys.onPressed: {
+ if (event.key === Qt.Key_Down || event.key === Qt.Key_VolumeDown) {
+ event.accepted = true
+ if (volumeButton.volume > .1){
+ volumeButton.volume-=.1
+ }else{
+ volumeButton.volume = 0.0
+ }
+ }
+
+ if (event.key === Qt.Key_Up || event.key === Qt.Key_VolumeUp) {
+ event.accepted = true
+ if (volumeButton.volume < .9){
+ volumeButton.volume+=.1
+ }else{
+ volumeButton.volume = 1.0
+ }
+ }
+ }
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/rssnews/content/BusyIndicator.qml b/basicsuite/qt5-everywhere/demos/rssnews/content/BusyIndicator.qml
new file mode 100644
index 0000000..c16f582
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/rssnews/content/BusyIndicator.qml
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtQml 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Image {
+ id: container
+ property bool on: false
+
+ source: "images/busy.png"; visible: container.on
+
+ NumberAnimation on rotation {
+ running: container.on; from: 0; to: 360; loops: Animation.Infinite; duration: 1200
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/rssnews/content/CategoryDelegate.qml b/basicsuite/qt5-everywhere/demos/rssnews/content/CategoryDelegate.qml
new file mode 100644
index 0000000..2916d1b
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/rssnews/content/CategoryDelegate.qml
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtQml 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Item {
+ id: delegate
+ property double margin: delegate.height * 0.2;
+ width: delegate.ListView.view.width;
+ height: 60
+
+ Text {
+ text: name
+ color: delegate.ListView.isCurrentItem ? "white" : "black"
+ font { family: "Helvetica"; pixelSize: delegate.height * 0.25; bold: true }
+ anchors {
+ left: parent.left;
+ leftMargin: margin
+ verticalCenter: parent.verticalCenter
+ }
+ }
+
+ BusyIndicator {
+ scale: 0.6
+ on: delegate.ListView.isCurrentItem && window.loading
+ anchors { right: parent.right; rightMargin: margin; verticalCenter: parent.verticalCenter }
+ }
+
+ Rectangle {
+ width: delegate.width; height: 1; color: "#cccccc"
+ anchors.bottom: delegate.bottom
+ visible: delegate.ListView.isCurrentItem ? false : true
+ }
+ Rectangle {
+ width: delegate.width; height: 1; color: "white"
+ visible: delegate.ListView.isCurrentItem ? false : true
+ }
+
+ MouseArea {
+ anchors.fill: delegate
+ onClicked: {
+ delegate.ListView.view.currentIndex = index
+ window.currentFeed = feed
+ }
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/rssnews/content/NewsDelegate.qml b/basicsuite/qt5-everywhere/demos/rssnews/content/NewsDelegate.qml
new file mode 100644
index 0000000..4050af6
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/rssnews/content/NewsDelegate.qml
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtQml 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Item {
+ id: delegate
+ height: column.height + 2*margin
+ width: delegate.ListView.view.width
+
+ property double margin: width * 0.03
+
+ Column {
+ id: column
+ x: margin; y: margin
+ width: parent.width - 2*margin
+
+ Text {
+ id: titleText
+ text: title; width: parent.width; wrapMode: Text.WordWrap
+ font { bold: true; family: "Helvetica"; pixelSize: 20}
+ }
+
+ Text {
+ id: descriptionText
+ width: parent.width; text: description
+ wrapMode: Text.WordWrap
+ font.family: "Helvetica"
+ font.pixelSize: 12
+ }
+ }
+
+ Rectangle {
+ width: parent.width; height: 1; color: "#cccccc"
+ anchors.bottom: parent.bottom
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/rssnews/content/RssFeeds.qml b/basicsuite/qt5-everywhere/demos/rssnews/content/RssFeeds.qml
new file mode 100644
index 0000000..da26d6a
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/rssnews/content/RssFeeds.qml
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtQml 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+ListModel {
+ id: rssFeeds
+
+ ListElement { name: "Top Stories"; feed: "feeds.bbci.co.uk/news/rss.xml" }
+ ListElement { name: "Popular Stories"; feed: "finance.yahoo.com/rss/popularstories" }
+ ListElement { name: "Qt Blog"; feed: "blog.qt.digia.com/feed/" }
+ ListElement { name: "Planet Qt"; feed: "planet.qt-project.org/rss20.xml" }
+ ListElement { name: "World"; feed: "rss.news.yahoo.com/rss/world" }
+ ListElement { name: "Oceania"; feed: "rss.news.yahoo.com/rss/oceania" }
+ ListElement { name: "U.S. National"; feed: "rss.news.yahoo.com/rss/us" }
+ ListElement { name: "Business"; feed: "rss.news.yahoo.com/rss/business" }
+ ListElement { name: "Technology"; feed: "rss.news.yahoo.com/rss/tech" }
+ ListElement { name: "Entertainment"; feed: "rss.news.yahoo.com/rss/entertainment" }
+ ListElement { name: "Sports"; feed: "sports.yahoo.com/mlb/teams/bos/rss.xml" }
+}
diff --git a/basicsuite/qt5-everywhere/demos/rssnews/content/ScrollBar.qml b/basicsuite/qt5-everywhere/demos/rssnews/content/ScrollBar.qml
new file mode 100644
index 0000000..d3cf4a6
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/rssnews/content/ScrollBar.qml
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtQml 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Item {
+ id: container
+
+ property variant scrollArea
+ property variant orientation: Qt.Vertical
+
+ opacity: 0
+
+ function position()
+ {
+ var ny = 0;
+ if (container.orientation == Qt.Vertical)
+ ny = scrollArea.visibleArea.yPosition * container.height;
+ else
+ ny = scrollArea.visibleArea.xPosition * container.width;
+ if (ny > 2) return ny; else return 2;
+ }
+
+ function size()
+ {
+ var nh, ny;
+
+ if (container.orientation == Qt.Vertical)
+ nh = scrollArea.visibleArea.heightRatio * container.height;
+ else
+ nh = scrollArea.visibleArea.widthRatio * container.width;
+
+ if (container.orientation == Qt.Vertical)
+ ny = scrollArea.visibleArea.yPosition * container.height;
+ else
+ ny = scrollArea.visibleArea.xPosition * container.width;
+
+ if (ny > 3) {
+ var t;
+ if (container.orientation == Qt.Vertical)
+ t = Math.ceil(container.height - 3 - ny);
+ else
+ t = Math.ceil(container.width - 3 - ny);
+ if (nh > t) return t; else return nh;
+ } else return nh + ny;
+ }
+
+ Rectangle { anchors.fill: parent; color: "Black"; opacity: 0.3 }
+
+ BorderImage {
+ source: "images/scrollbar.png"
+ border { left: 1; right: 1; top: 1; bottom: 1 }
+ x: container.orientation == Qt.Vertical ? 2 : position()
+ width: container.orientation == Qt.Vertical ? container.width - 4 : size()
+ y: container.orientation == Qt.Vertical ? position() : 2
+ height: container.orientation == Qt.Vertical ? size() : container.height - 4
+ }
+
+ states: State {
+ name: "visible"
+ when: container.orientation == Qt.Vertical ? scrollArea.movingVertically : scrollArea.movingHorizontally
+ PropertyChanges { target: container; opacity: 1.0 }
+ }
+
+ transitions: Transition {
+ from: "visible"; to: ""
+ NumberAnimation { properties: "opacity"; duration: 600 }
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/rssnews/content/images/busy.png b/basicsuite/qt5-everywhere/demos/rssnews/content/images/busy.png
new file mode 100644
index 0000000..664c2b1
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/rssnews/content/images/busy.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/rssnews/content/images/scrollbar.png b/basicsuite/qt5-everywhere/demos/rssnews/content/images/scrollbar.png
new file mode 100644
index 0000000..0228dcf
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/rssnews/content/images/scrollbar.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/rssnews/rssnews.qml b/basicsuite/qt5-everywhere/demos/rssnews/rssnews.qml
new file mode 100644
index 0000000..5eae0a0
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/rssnews/rssnews.qml
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtQml 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.XmlListModel 2.0
+import "content"
+
+Rectangle {
+ id: window
+ anchors.fill: parent
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "#eeeeee" }
+ GradientStop { position: 0.1; color: "#ffffff" }
+ GradientStop { position: 0.9; color: "#ffffff" }
+ GradientStop { position: 1.0; color: "#bbbbbb" }
+ }
+
+ property int listWidth: window.width*0.35
+ property string currentFeed: "feeds.bbci.co.uk/news/rss.xml"
+ property bool loading: feedModel.status == XmlListModel.Loading
+
+ RssFeeds { id: rssFeeds }
+
+ XmlListModel {
+ id: feedModel
+ source: "http://" + window.currentFeed
+ query: "/rss/channel/item"
+
+ XmlRole { name: "title"; query: "title/string()" }
+ XmlRole { name: "link"; query: "link/string()" }
+ XmlRole { name: "description"; query: "description/string()" }
+ }
+
+ Row {
+ Rectangle {
+ id: categoryContent
+ width: window.listWidth; height: window.height
+ color: "#efefef"
+
+ ListView {
+ id: categories
+ anchors.fill: parent
+ model: rssFeeds
+ delegate: CategoryDelegate {}
+ highlight: Rectangle { color: "steelblue" }
+ highlightMoveVelocity: 9999999
+ }
+ ScrollBar {
+ scrollArea: categories; height: categories.height; width: 8
+ anchors.right: categories.right
+ }
+ }
+ ListView {
+ id: list
+ width: window.width - window.listWidth; height: window.height
+ model: feedModel
+ delegate: NewsDelegate {}
+ }
+ }
+
+ ScrollBar { scrollArea: list; height: list.height; width: 8; anchors.right: window.right }
+ Rectangle { x: window.listWidth; height: window.height; width: 1; color: "#cccccc" }
+}
diff --git a/basicsuite/qt5-everywhere/demos/rssnews/rssnews.qmlproject b/basicsuite/qt5-everywhere/demos/rssnews/rssnews.qmlproject
new file mode 100644
index 0000000..5becbda
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/rssnews/rssnews.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.1
+
+Project {
+ mainFile: "rssnews.qml"
+
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/Block.qml b/basicsuite/qt5-everywhere/demos/samegame/content/Block.qml
new file mode 100644
index 0000000..0b10b7f
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/Block.qml
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 bool dying: false
+ property bool spawned: false
+ property int type: 0
+ property ParticleSystem particleSystem
+
+ Behavior on x {
+ enabled: spawned;
+ SpringAnimation{ spring: 2; damping: 0.2 }
+ }
+ Behavior on y {
+ SpringAnimation{ spring: 2; damping: 0.2 }
+ }
+
+ Image {
+ id: img
+ source: {
+ if (type == 0){
+ "gfx/red.png";
+ } else if (type == 1) {
+ "gfx/blue.png";
+ } else if (type == 2) {
+ "gfx/green.png";
+ } else {
+ "gfx/yellow.png";
+ }
+ }
+ opacity: 0
+ Behavior on opacity { NumberAnimation { duration: 200 } }
+ anchors.fill: parent
+ }
+
+ //Foreground particles
+ BlockEmitter {
+ id: particles
+ system: particleSystem
+ group: {
+ if (type == 0){
+ "red";
+ } else if (type == 1) {
+ "blue";
+ } else if (type == 2) {
+ "green";
+ } else {
+ "yellow";
+ }
+ }
+ anchors.fill: parent
+ }
+
+ //Paint particles on the background
+ PaintEmitter {
+ id: particles2
+ system: particleSystem
+ }
+
+ states: [
+ State {
+ name: "AliveState"; when: spawned == true && dying == false
+ PropertyChanges { target: img; opacity: 1 }
+ },
+
+ State {
+ name: "DeathState"; when: dying == true
+ StateChangeScript { script: {particleSystem.paused = false; particles.pulse(100); particles2.pulse(100);} }
+ PropertyChanges { target: img; opacity: 0 }
+ StateChangeScript { script: block.destroy(1000); }
+ }
+ ]
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/BlockEmitter.qml b/basicsuite/qt5-everywhere/demos/samegame/content/BlockEmitter.qml
new file mode 100644
index 0000000..ba6261c
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/BlockEmitter.qml
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 "../settings.js" as Settings
+
+Emitter {
+ property Item block: parent
+ velocity: TargetDirection{targetX: block.width/2; targetY: block.height/2; magnitude: -40; magnitudeVariation: 40}
+ acceleration: TargetDirection{targetX: block.width/2; targetY: block.height/2; magnitude: -100;}
+ shape: EllipseShape{fill:true}
+ enabled: false;
+ lifeSpan: 700; lifeSpanVariation: 100
+ emitRate: 1000
+ maximumEmitted: 100 //only fires 0.1s bursts (still 2x old number)
+ size: Settings.blockSize * 0.85
+ endSize: Settings.blockSize * 0.85 /2
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/Button.qml b/basicsuite/qt5-everywhere/demos/samegame/content/Button.qml
new file mode 100644
index 0000000..4b825ba
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/Button.qml
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 {
+ property alias imgSrc: image.source
+ property alias system: emitter.system
+ property alias group: emitter.group
+ signal clicked
+ property bool rotatedButton: false
+
+ width: image.width
+ height: image.sourceSize.height
+ Image {
+ id: image
+ height: parent.height
+ width: height/sourceSize.height * sourceSize.width
+
+ anchors.horizontalCenter: parent.horizontalCenter
+ rotation: rotatedButton ? ((Math.random() * 3 + 2) * (Math.random() <= 0.5 ? -1 : 1)) : 0
+ MenuEmitter {
+ id: emitter
+ anchors.fill: parent
+ //shape: MaskShape {source: image.source}
+ }
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {parent.clicked(); emitter.burst(400);}
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/GameArea.qml b/basicsuite/qt5-everywhere/demos/samegame/content/GameArea.qml
new file mode 100644
index 0000000..6e72161
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/GameArea.qml
@@ -0,0 +1,226 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 "samegame.js" as Logic
+
+Item {
+ id: gameCanvas
+ property bool gameOver: true
+ property int score: 0
+ property int highScore: 0
+ property int moves: 0
+ property string mode: ""
+ property ParticleSystem ps: particleSystem
+ //For easy theming
+ property alias backgroundVisible: bg.visible
+ property string background: "gfx/background.png"
+ property string blockFile: "Block.qml"
+ onBlockFileChanged: Logic.changeBlock(blockFile);
+ property alias particlePack: auxLoader.source
+ //For multiplayer
+ property int score2: 0
+ property int curTurn: 1
+ property bool autoTurnChange: false
+ signal swapPlayers
+ property bool swapping: false
+ //onSwapPlayers: if (autoTurnChange) Logic.turnChange();//Now implemented below
+ //For puzzle
+ property url level
+ property bool puzzleWon: false
+ signal puzzleLost //Since root is tracking the puzzle progress
+ function showPuzzleEnd (won) {
+ if (won) {
+ smokeParticle.color = Qt.rgba(0,1,0,0);
+ puzzleWin.play();
+ } else {
+ smokeParticle.color = Qt.rgba(1,0,0,0);
+ puzzleFail.play();
+ puzzleLost();
+ }
+ }
+ function showPuzzleGoal (str) {
+ puzzleTextBubble.opacity = 1;
+ puzzleTextLabel.text = str;
+ }
+ Image {
+ id: bg
+ z: -1
+ anchors.fill: parent
+ source: background;
+ fillMode: Image.PreserveAspectCrop
+ }
+
+ MouseArea {
+ anchors.fill: parent; onClicked: {
+ if (puzzleTextBubble.opacity == 1) {
+ puzzleTextBubble.opacity = 0;
+ Logic.finishLoadingMap();
+ } else if (!swapping) {
+ Logic.handleClick(mouse.x,mouse.y);
+ }
+ }
+ }
+
+ Image {
+ id: highScoreTextBubble
+ opacity: mode == "arcade" && gameOver && gameCanvas.score == gameCanvas.highScore ? 1 : 0
+ Behavior on opacity { NumberAnimation {} }
+ anchors.centerIn: parent
+ z: 10
+ source: "gfx/bubble-highscore.png"
+ Image {
+ anchors.centerIn: parent
+ source: "gfx/text-highscore-new.png"
+ rotation: -10
+ }
+ }
+
+ Image {
+ id: puzzleTextBubble
+ anchors.centerIn: parent
+ opacity: 0
+ Behavior on opacity { NumberAnimation {} }
+ z: 10
+ source: "gfx/bubble-puzzle.png"
+ Connections {
+ target: gameCanvas
+ onModeChanged: if (mode != "puzzle" && puzzleTextBubble.opacity > 0) puzzleTextBubble.opacity = 0;
+ }
+ Text {
+ id: puzzleTextLabel
+ width: parent.width - 24
+ anchors.centerIn: parent
+ horizontalAlignment: Text.AlignHCenter
+ color: "white"
+ font.pixelSize: 24
+ font.bold: true
+ wrapMode: Text.WordWrap
+ }
+ }
+ onModeChanged: {
+ p1WonImg.opacity = 0;
+ p2WonImg.opacity = 0;
+ }
+ SmokeText { id: puzzleWin; source: "gfx/icon-ok.png"; system: particleSystem }
+ SmokeText { id: puzzleFail; source: "gfx/icon-fail.png"; system: particleSystem }
+
+ onSwapPlayers: {
+ smokeParticle.color = "yellow"
+ Logic.turnChange();
+ if (curTurn == 1) {
+ p1Text.play();
+ } else {
+ p2Text.play();
+ }
+ clickDelay.running = true;
+ }
+ SequentialAnimation {
+ id: clickDelay
+ ScriptAction { script: gameCanvas.swapping = true; }
+ PauseAnimation { duration: 750 }
+ ScriptAction { script: gameCanvas.swapping = false; }
+ }
+
+ SmokeText {
+ id: p1Text; source: "gfx/text-p1-go.png";
+ system: particleSystem; playerNum: 1
+ opacity: p1WonImg.opacity + p2WonImg.opacity > 0 ? 0 : 1
+ }
+
+ SmokeText {
+ id: p2Text; source: "gfx/text-p2-go.png";
+ system: particleSystem; playerNum: 2
+ opacity: p1WonImg.opacity + p2WonImg.opacity > 0 ? 0 : 1
+ }
+
+ onGameOverChanged: {
+ if (gameCanvas.mode == "multiplayer") {
+ if (gameCanvas.score >= gameCanvas.score2) {
+ p1WonImg.opacity = 1;
+ } else {
+ p2WonImg.opacity = 1;
+ }
+ }
+ }
+ Image {
+ id: p1WonImg
+ source: "gfx/text-p1-won.png"
+ anchors.centerIn: parent
+ opacity: 0
+ Behavior on opacity { NumberAnimation {} }
+ z: 10
+ }
+ Image {
+ id: p2WonImg
+ source: "gfx/text-p2-won.png"
+ anchors.centerIn: parent
+ opacity: 0
+ Behavior on opacity { NumberAnimation {} }
+ z: 10
+ }
+
+ ParticleSystem{
+ id: particleSystem;
+ anchors.fill: parent
+ z: 5
+ ImageParticle {
+ id: smokeParticle
+ groups: ["smoke"]
+ source: "gfx/particle-smoke.png"
+ alpha: 0.1
+ alphaVariation: 0.1
+ color: "yellow"
+ }
+ Loader {
+ id: auxLoader
+ anchors.fill: parent
+ source: "PrimaryPack.qml"
+ onItemChanged: {
+ if (item && "particleSystem" in item)
+ item.particleSystem = particleSystem
+ if (item && "gameArea" in item)
+ item.gameArea = gameCanvas
+ }
+ }
+ }
+}
+
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/LogoAnimation.qml b/basicsuite/qt5-everywhere/demos/samegame/content/LogoAnimation.qml
new file mode 100644
index 0000000..fb050e7
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/LogoAnimation.qml
@@ -0,0 +1,102 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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: container //Positioned where the 48x48 S/G should be
+ property alias running: mainAnim.running
+ property ParticleSystem particleSystem
+ property int dur: 500
+ signal boomTime
+ Image {
+ id: s1
+ source: "gfx/logo-s.png"
+ y: 0
+ }
+ Image {
+ id: g1
+ source: "gfx/logo-g.png"
+ y: -128
+ }
+ Column {
+ Repeater {
+ model: 2
+ Item {
+ width: 48
+ height: 48
+ BlockEmitter {
+ id: emitter
+ anchors.fill: parent
+ group: "red"
+ system: particleSystem
+ Connections {
+ target: container
+ onBoomTime: emitter.pulse(100);
+ }
+ }
+ }
+ }
+ }
+ SequentialAnimation {
+ id: mainAnim
+ running: true
+ loops: -1
+ PropertyAction { target: g1; property: "y"; value: -128}
+ PropertyAction { target: g1; property: "opacity"; value: 1}
+ PropertyAction { target: s1; property: "y"; value: 0}
+ PropertyAction { target: s1; property: "opacity"; value: 1}
+ NumberAnimation { target: g1; property: "y"; from: -96; to: -48; duration: dur}
+ ParallelAnimation {
+ NumberAnimation { target: g1; property: "y"; from: -48; to: 0; duration: dur}
+ NumberAnimation { target: s1; property: "y"; from: 0; to: 48; duration: dur }
+ }
+ PauseAnimation { duration: dur }
+ ScriptAction { script: container.boomTime(); }
+ ParallelAnimation {
+ NumberAnimation { target: g1; property: "opacity"; to: 0; duration: dur }
+ NumberAnimation { target: s1; property: "opacity"; to: 0; duration: dur }
+ }
+ PropertyAction { target: s1; property: "y"; value: -128}
+ PropertyAction { target: s1; property: "opacity"; value: 1}
+ NumberAnimation { target: s1; property: "y"; from: -96; to: 0; duration: dur * 2}
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/MenuEmitter.qml b/basicsuite/qt5-everywhere/demos/samegame/content/MenuEmitter.qml
new file mode 100644
index 0000000..93089fc
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/MenuEmitter.qml
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+
+Emitter {
+ anchors.fill: parent
+ velocity: AngleDirection{angleVariation: 360; magnitude: 140; magnitudeVariation: 40}
+ enabled: false;
+ lifeSpan: 500;
+ emitRate: 1
+ size: 28
+ endSize: 14
+ group: "yellow"
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/PaintEmitter.qml b/basicsuite/qt5-everywhere/demos/samegame/content/PaintEmitter.qml
new file mode 100644
index 0000000..fe758af
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/PaintEmitter.qml
@@ -0,0 +1,98 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 "../settings.js" as Settings
+
+Emitter {
+ property Item block: parent
+ anchors.fill: parent
+ shape: EllipseShape { fill: true }
+ group: {
+ if (block.type == 0){
+ "redspots";
+ } else if (block.type == 1) {
+ "bluespots";
+ } else if (block.type == 2) {
+ "greenspots";
+ } else {
+ "yellowspots";
+ }
+ }
+ size: Settings.blockSize * 2
+ endSize: Settings.blockSize/2
+ lifeSpan: 30000
+ enabled: false
+ emitRate: 60
+ maximumEmitted: 60
+ velocity: PointDirection{ y: 4; yVariation: 4 }
+ /* Possibly better, but dependent on gerrit change,28212
+ property real mainIntensity: 0.8
+ property real subIntensity: 0.1
+ property real colorVariation: 0.005
+ onEmitParticles: {//One group, many colors, for better stacking
+ for (var i=0; i<particles.length; i++) {
+ var particle = particles[i];
+ if (block.type == 0) {
+ particle.red = mainIntensity + (Math.random() * colorVariation * 2 - colorVariation);
+ particle.green = subIntensity + (Math.random() * colorVariation * 2 - colorVariation);
+ particle.blue = subIntensity + (Math.random() * colorVariation * 2 - colorVariation);
+ } else if (block.type == 1) {
+ particle.red = subIntensity + (Math.random() * colorVariation * 2 - colorVariation);
+ particle.green = subIntensity + (Math.random() * colorVariation * 2 - colorVariation);
+ particle.blue = mainIntensity + (Math.random() * colorVariation * 2 - colorVariation);
+ } else if (block.type == 2) {
+ particle.red = subIntensity + (Math.random() * colorVariation * 2 - colorVariation);
+ particle.green = mainIntensity + (Math.random() * colorVariation * 2 - colorVariation);
+ particle.blue = subIntensity + (Math.random() * colorVariation * 2 - colorVariation);
+ } else if (block.type == 3) {
+ particle.red = mainIntensity + (Math.random() * colorVariation * 2 - colorVariation);
+ particle.green = mainIntensity + (Math.random() * colorVariation * 2 - colorVariation);
+ particle.blue = subIntensity + (Math.random() * colorVariation * 2 - colorVariation);
+ } else {
+ particle.red = mainIntensity + (Math.random() * colorVariation * 2 - colorVariation);
+ particle.green = mainIntensity + (Math.random() * colorVariation * 2 - colorVariation);
+ particle.blue = mainIntensity + (Math.random() * colorVariation * 2 - colorVariation);
+ }
+ }
+ }
+ */
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/PrimaryPack.qml b/basicsuite/qt5-everywhere/demos/samegame/content/PrimaryPack.qml
new file mode 100644
index 0000000..3fe7fb1
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/PrimaryPack.qml
@@ -0,0 +1,122 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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: container
+ property ParticleSystem particleSystem
+ property GameArea gameArea
+ onGameAreaChanged: bgstacker.parent = gameArea;//Move to direct child of game canvas
+ Item {
+ id: bgstacker
+ z: 0
+ ImageParticle {
+ groups: ["yellowspots"]
+ color: Qt.darker("yellow");//Actually want desaturated...
+ system: particleSystem
+ source: "gfx/particle-paint.png"
+ colorVariation: 0.2
+ alpha: 0.2
+ entryEffect: ImageParticle.None
+ }
+ ImageParticle {
+ groups: ["redspots"]
+ system: particleSystem
+ color: Qt.darker("red");//Actually want desaturated...
+ source: "gfx/particle-paint.png"
+ colorVariation: 0.2
+ alpha: 0.2
+ entryEffect: ImageParticle.None
+ }
+ ImageParticle {
+ groups: ["greenspots"]
+ system: particleSystem
+ color: Qt.darker("green");//Actually want desaturated...
+ source: "gfx/particle-paint.png"
+ colorVariation: 0.2
+ alpha: 0.2
+ entryEffect: ImageParticle.None
+ }
+ ImageParticle {
+ groups: ["bluespots"]
+ system: particleSystem
+ color: Qt.darker("blue");//Actually want desaturated...
+ source: "gfx/particle-paint.png"
+ colorVariation: 0.2
+ alpha: 0.2
+ entryEffect: ImageParticle.None
+ }
+ }
+ ImageParticle {
+ groups: ["yellow"]
+ system: particleSystem
+ color: Qt.darker("yellow");//Actually want desaturated...
+ source: "gfx/particle-brick.png"
+ colorVariation: 0.4
+ alpha: 0.1
+ }
+ ImageParticle {
+ groups: ["red"]
+ system: particleSystem
+ color: Qt.darker("red");//Actually want desaturated...
+ source: "gfx/particle-brick.png"
+ colorVariation: 0.4
+ alpha: 0.1
+ }
+ ImageParticle {
+ groups: ["green"]
+ system: particleSystem
+ color: Qt.darker("green");//Actually want desaturated...
+ source: "gfx/particle-brick.png"
+ colorVariation: 0.4
+ alpha: 0.1
+ }
+ ImageParticle {
+ groups: ["blue"]
+ system: particleSystem
+ color: Qt.darker("blue");//Actually want desaturated...
+ source: "gfx/particle-brick.png"
+ colorVariation: 0.4
+ alpha: 0.1
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/PuzzleBlock.qml b/basicsuite/qt5-everywhere/demos/samegame/content/PuzzleBlock.qml
new file mode 100644
index 0000000..4f5b043
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/PuzzleBlock.qml
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 bool dying: false
+ property bool spawned: false
+ property int type: 0
+ property ParticleSystem particleSystem
+
+ Behavior on x {
+ enabled: spawned;
+ NumberAnimation{ easing.type: Easing.OutBounce }
+ }
+ Behavior on y {
+ NumberAnimation{ easing.type: Easing.InQuad }
+ }
+
+ Image {
+ id: img
+ source: {
+ if (type == 0){
+ "gfx/red-puzzle.png";
+ } else if (type == 1) {
+ "gfx/blue-puzzle.png";
+ } else if (type == 2) {
+ "gfx/green-puzzle.png";
+ } else {
+ "gfx/yellow-puzzle.png";
+ }
+ }
+ opacity: 0
+ Behavior on opacity { NumberAnimation { duration: 200 } }
+ anchors.centerIn: parent
+ anchors.verticalCenterOffset: -4
+ anchors.horizontalCenterOffset: 4
+ }
+
+ //Foreground particles
+ BlockEmitter {
+ id: particles
+ system: particleSystem
+ group: {
+ if (type == 0){
+ "red";
+ } else if (type == 1) {
+ "blue";
+ } else if (type == 2) {
+ "green";
+ } else {
+ "yellow";
+ }
+ }
+ anchors.fill: parent
+ }
+
+ states: [
+ State {
+ name: "AliveState"; when: spawned == true && dying == false
+ PropertyChanges { target: img; opacity: 1 }
+ },
+
+ State {
+ name: "DeathState"; when: dying == true
+ PropertyChanges { target: img; scale: 2 }
+ StateChangeScript { script: particles.pulse(200); }
+ PropertyChanges { target: img; opacity: 0 }
+ StateChangeScript { script: block.destroy(1000); }
+ }
+ ]
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/SamegameText.qml b/basicsuite/qt5-everywhere/demos/samegame/content/SamegameText.qml
new file mode 100644
index 0000000..28c85f9
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/SamegameText.qml
@@ -0,0 +1,49 @@
+/***************************************************************************
+**
+** Copyright (C) 2012 Research In Motion
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 "../settings.js" as Settings
+
+Text {
+ font.pixelSize: Settings.fontPixelSize;
+ color: "white";
+ textFormat: Text.StyledText;
+ Behavior on opacity { NumberAnimation {} }
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/SimpleBlock.qml b/basicsuite/qt5-everywhere/demos/samegame/content/SimpleBlock.qml
new file mode 100644
index 0000000..5ae4782
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/SimpleBlock.qml
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 bool dying: false
+ property bool spawned: false
+ property int type: 0
+ property ParticleSystem particleSystem
+
+ Behavior on x {
+ enabled: spawned;
+ SpringAnimation{ spring: 2; damping: 0.2 }
+ }
+ Behavior on y {
+ SpringAnimation{ spring: 2; damping: 0.2 }
+ }
+
+ Image {
+ id: img
+ source: {
+ if (type == 0){
+ "gfx/red.png";
+ } else if (type == 1) {
+ "gfx/blue.png";
+ } else if (type == 2) {
+ "gfx/green.png";
+ } else {
+ "gfx/yellow.png";
+ }
+ }
+ opacity: 0
+ Behavior on opacity { NumberAnimation { duration: 200 } }
+ anchors.fill: parent
+ }
+
+ //Foreground particles
+ BlockEmitter {
+ id: particles
+ system: particleSystem
+ group: {
+ if (type == 0){
+ "red";
+ } else if (type == 1) {
+ "blue";
+ } else if (type == 2) {
+ "green";
+ } else {
+ "yellow";
+ }
+ }
+ anchors.fill: parent
+ }
+
+ states: [
+ State {
+ name: "AliveState"; when: spawned == true && dying == false
+ PropertyChanges { target: img; opacity: 1 }
+ },
+
+ State {
+ name: "DeathState"; when: dying == true
+ StateChangeScript { script: {particleSystem.paused = false; particles.pulse(100); } }
+ PropertyChanges { target: img; opacity: 0 }
+ StateChangeScript { script: block.destroy(1000); }
+ }
+ ]
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/SmokeText.qml b/basicsuite/qt5-everywhere/demos/samegame/content/SmokeText.qml
new file mode 100644
index 0000000..46bc509
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/SmokeText.qml
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 {
+ z: 10
+ property alias source: img.source
+ property alias system: emitter.system
+ property int playerNum: 1
+ function play() {
+ anim.running = true;
+ }
+ anchors.centerIn: parent
+ Image {
+ opacity: 0
+ id: img
+ anchors.centerIn: parent
+ rotation: playerNum == 1 ? -8 : -5
+ Emitter {
+ id: emitter
+ group: "smoke"
+ anchors.fill: parent
+ shape: MaskShape { source: img.source }
+ enabled: false
+ emitRate: 1000
+ lifeSpan: 600
+ size: 64
+ endSize: 32
+ velocity: AngleDirection { angleVariation: 360; magnitudeVariation: 160 }
+ }
+ }
+ SequentialAnimation {
+ id: anim
+ running: false
+ PauseAnimation { duration: 500}
+ ParallelAnimation {
+ NumberAnimation { target: img; property: "opacity"; from: 0.1; to: 1.0 }
+ NumberAnimation { target: img; property: "scale"; from: 0.1; to: 1.0 }
+ }
+ PauseAnimation { duration: 250}
+ ScriptAction { script: emitter.pulse(100); }
+ NumberAnimation { target: img; property: "opacity"; from: 1.0; to: 0.0 }
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/background-puzzle.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/background-puzzle.png
new file mode 100644
index 0000000..c2eca5f
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/background-puzzle.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/background.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/background.png
new file mode 100644
index 0000000..60f57b6
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/background.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/bar.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/bar.png
new file mode 100644
index 0000000..4953cd6
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/bar.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/blue-puzzle.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/blue-puzzle.png
new file mode 100644
index 0000000..e550d59
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/blue-puzzle.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/blue.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/blue.png
new file mode 100644
index 0000000..b8161c0
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/blue.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/bubble-highscore.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/bubble-highscore.png
new file mode 100644
index 0000000..c4e38df
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/bubble-highscore.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/bubble-puzzle.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/bubble-puzzle.png
new file mode 100644
index 0000000..278556b
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/bubble-puzzle.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-1.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-1.png
new file mode 100644
index 0000000..3343b7f
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-1.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-2.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-2.png
new file mode 100644
index 0000000..afba106
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-2.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-3.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-3.png
new file mode 100644
index 0000000..adea77a
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-3.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-4.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-4.png
new file mode 100644
index 0000000..18c922b
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-4.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-new.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-new.png
new file mode 100644
index 0000000..257e182
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-new.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-menu.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-menu.png
new file mode 100644
index 0000000..8440e87
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-menu.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-puzzle-next.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-puzzle-next.png
new file mode 100644
index 0000000..7e3ed41
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-puzzle-next.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-quit.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-quit.png
new file mode 100644
index 0000000..95c77ce
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-quit.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/green-puzzle.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/green-puzzle.png
new file mode 100644
index 0000000..581f76f
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/green-puzzle.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/green.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/green.png
new file mode 100644
index 0000000..da4cca5
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/green.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/icon-fail.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/icon-fail.png
new file mode 100644
index 0000000..4072611
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/icon-fail.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/icon-ok.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/icon-ok.png
new file mode 100644
index 0000000..15a8442
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/icon-ok.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/icon-time.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/icon-time.png
new file mode 100644
index 0000000..9490e49
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/icon-time.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-a.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-a.png
new file mode 100644
index 0000000..20c20ba
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-a.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-e.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-e.png
new file mode 100644
index 0000000..dd663f1
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-e.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-g.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-g.png
new file mode 100644
index 0000000..a319bf9
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-g.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-m.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-m.png
new file mode 100644
index 0000000..6a029b3
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-m.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-s.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-s.png
new file mode 100644
index 0000000..963b175
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-s.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo.png
new file mode 100644
index 0000000..e900edd
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/particle-brick.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/particle-brick.png
new file mode 100644
index 0000000..5c83896
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/particle-brick.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/particle-paint.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/particle-paint.png
new file mode 100644
index 0000000..9bd0a2a
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/particle-paint.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/particle-smoke.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/particle-smoke.png
new file mode 100644
index 0000000..b27f954
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/particle-smoke.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/red-puzzle.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/red-puzzle.png
new file mode 100644
index 0000000..9ceb17e
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/red-puzzle.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/red.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/red.png
new file mode 100644
index 0000000..681810f
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/red.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-highscore-new.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-highscore-new.png
new file mode 100644
index 0000000..50f7fcd
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-highscore-new.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-highscore.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-highscore.png
new file mode 100644
index 0000000..7198c27
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-highscore.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-no-winner.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-no-winner.png
new file mode 100644
index 0000000..b4a6685
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-no-winner.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p1-go.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p1-go.png
new file mode 100644
index 0000000..c7bd2a5
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p1-go.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p1-won.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p1-won.png
new file mode 100644
index 0000000..41c2eb7
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p1-won.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p1.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p1.png
new file mode 100644
index 0000000..b59c87b
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p1.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p2-go.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p2-go.png
new file mode 100644
index 0000000..f03cd93
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p2-go.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p2-won.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p2-won.png
new file mode 100644
index 0000000..116b7f2
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p2-won.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p2.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p2.png
new file mode 100644
index 0000000..d4f2bc7
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p2.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/yellow-puzzle.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/yellow-puzzle.png
new file mode 100644
index 0000000..66044c8
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/yellow-puzzle.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/gfx/yellow.png b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/yellow.png
new file mode 100644
index 0000000..6bc5d38
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/gfx/yellow.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/TemplateBase.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/TemplateBase.qml
new file mode 100644
index 0000000..48ea399
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/TemplateBase.qml
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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: control
+ property int scoreTarget: -1
+ property int timeTarget: -1
+ property int moveTarget: -1
+ property bool mustClear: true
+ property string goalText: "Clear the level..."
+
+ property var startingGrid //If this isn't an array of ints, we will refuse to load the level.
+ /* Ints are 0-4. If not enough ints are there it will be prepadded with 0s to fill the grid
+ (which ruins everything if you have the wrong number of rows).
+ 0 - No block
+ 1 - Red
+ 2 - Blue
+ 3 - Green
+ 4 - Yellow
+ Ideas for future colors, but not supported in this version:
+ 5 - Purple
+ 6 - Cyan
+ 7 - Gray
+ 8 - Black
+ 9 - White
+ */
+
+ width: 320
+ height: 416
+ color: "white" //TODO: Theme support for both setting themes per level, and seeing it in the control!
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level0.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level0.qml
new file mode 100644
index 0000000..7ac7ed8
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level0.qml
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+
+TemplateBase{
+ moveTarget: 3
+ goalText: "1 of 10<br><br>Clear in three moves..."
+ startingGrid: [ 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 , 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 ,
+ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
+ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 ,
+ 0 , 0 , 0 , 0 , 0 , 1 , 1 , 2 , 1 , 1 ,
+ 0 , 0 , 0 , 1 , 1 , 3 , 3 , 3 , 3 , 3 ,
+ 0 , 1 , 1 , 3 , 3 , 3 , 1 , 3 , 1 , 1 ,
+ 1 , 2 , 3 , 3 , 1 , 1 , 3 , 3 , 3 , 3 ,
+ 1 , 3 , 3 , 2 , 3 , 3 , 3 , 3 , 1 , 1 ,
+ 1 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 ]
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level1.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level1.qml
new file mode 100644
index 0000000..0b7a889
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level1.qml
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+
+TemplateBase{
+ timeTarget: 10
+ goalText: "2 of 10<br><br>Clear in 10 seconds..."
+ startingGrid: [ 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 , 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 ,
+ 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 , 0 , 0 , 0 , 0 , 0 ,
+ 1 , 3 , 3 , 3 , 1 , 1 , 1 , 1 , 2 , 2 ,
+ 1 , 2 , 3 , 3 , 3 , 1 , 1 , 1 , 1 , 2 ,
+ 2 , 2 , 1 , 3 , 3 , 3 , 1 , 1 , 1 , 2 ,
+ 2 , 1 , 1 , 1 , 3 , 3 , 3 , 1 , 2 , 2 ,
+ 1 , 1 , 1 , 1 , 1 , 3 , 3 , 3 , 2 , 1 ]
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level2.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level2.qml
new file mode 100644
index 0000000..986f217
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level2.qml
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+
+TemplateBase{
+ scoreTarget: 1200
+ timeTarget: 60
+ goalText: "3 of 10<br><br>Score over 1200 points in one minute..."
+ mustClear: false
+ startingGrid: [ 3 , 1 , 2 , 1 , 1 , 2 , 1 , 1 , 3 , 3 ,
+ 1 , 3 , 3 , 2 , 3 , 3 , 1 , 1 , 3 , 1 ,
+ 3 , 1 , 3 , 3 , 2 , 3 , 3 , 3 , 1 , 2 ,
+ 3 , 2 , 2 , 1 , 3 , 3 , 2 , 1 , 1 , 2 ,
+ 3 , 1 , 2 , 2 , 2 , 2 , 2 , 1 , 3 , 1 ,
+ 2 , 3 , 1 , 2 , 2 , 3 , 3 , 1 , 3 , 2 ,
+ 3 , 2 , 1 , 1 , 3 , 3 , 3 , 2 , 2 , 1 ,
+ 1 , 2 , 2 , 3 , 2 , 3 , 3 , 3 , 1 , 1 ,
+ 1 , 3 , 3 , 3 , 1 , 2 , 2 , 3 , 3 , 1 ,
+ 3 , 3 , 2 , 1 , 2 , 2 , 1 , 1 , 1 , 3 ,
+ 2 , 1 , 3 , 2 , 3 , 2 , 3 , 2 , 2 , 1 ,
+ 1 , 3 , 1 , 2 , 1 , 2 , 3 , 1 , 2 , 2 ,
+ 1 , 2 , 2 , 2 , 1 , 1 , 2 , 3 , 1 , 2 ]
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level3.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level3.qml
new file mode 100644
index 0000000..eff5182
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level3.qml
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+
+TemplateBase{
+ scoreTarget: 3000
+ timeTarget: 60
+ goalText: "4 of 10<br>Clear the board with over 3000 points in under a minute..."
+ startingGrid: [ 3 , 3 , 1 , 1 , 1 , 2 , 2 , 4 , 3 , 3 ,
+ 4 , 3 , 1 , 4 , 2 , 2 , 2 , 4 , 3 , 4 ,
+ 4 , 3 , 3 , 4 , 1 , 1 , 3 , 3 , 4 , 4 ,
+ 3 , 3 , 3 , 3 , 3 , 1 , 3 , 2 , 2 , 4 ,
+ 4 , 4 , 3 , 4 , 3 , 1 , 4 , 4 , 4 , 4 ,
+ 4 , 4 , 3 , 4 , 1 , 1 , 4 , 4 , 3 , 3 ,
+ 4 , 2 , 2 , 2 , 2 , 2 , 4 , 4 , 4 , 1 ,
+ 4 , 4 , 2 , 4 , 2 , 2 , 1 , 1 , 1 , 1 ,
+ 4 , 4 , 2 , 4 , 2 , 2 , 1 , 4 , 4 , 1 ,
+ 4 , 1 , 1 , 4 , 3 , 3 , 4 , 2 , 4 , 1 ,
+ 4 , 1 , 1 , 2 , 3 , 3 , 4 , 2 , 2 , 1 ,
+ 1 , 1 , 2 , 2 , 2 , 3 , 3 , 3 , 2 , 1 ,
+ 4 , 1 , 1 , 2 , 2 , 3 , 4 , 3 , 4 , 4 ]
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level4.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level4.qml
new file mode 100644
index 0000000..4438de1
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level4.qml
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+
+TemplateBase{
+ goalText: "5 of 10<br><br>Clear the level..."
+ startingGrid: [ 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 , 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 , 3 , 2 , 1 , 1 , 1 , 1 , 3 , 2 , 3 ,
+ 1 , 2 , 3 , 1 , 3 , 2 , 2 , 1 , 1 , 2 ,
+ 3 , 2 , 2 , 2 , 1 , 1 , 1 , 1 , 3 , 3 ,
+ 2 , 1 , 1 , 3 , 2 , 1 , 1 , 2 , 1 , 3 ,
+ 1 , 3 , 3 , 1 , 2 , 1 , 2 , 1 , 3 , 3 ,
+ 1 , 3 , 2 , 2 , 2 , 1 , 1 , 3 , 2 , 3 ,
+ 1 , 1 , 3 , 2 , 3 , 3 , 2 , 1 , 1 , 1 ,
+ 1 , 2 , 2 , 3 , 2 , 2 , 1 , 3 , 1 , 3 ]
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level5.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level5.qml
new file mode 100644
index 0000000..ee48217
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level5.qml
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+
+TemplateBase{
+ moveTarget: 4
+ goalText: "6 of 10<br><br>Clear in four or less moves..."
+ startingGrid: [ 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 ,
+ 4 , 2 , 2 , 2 , 4 , 3 , 3 , 3 , 4 , 4 ,
+ 4 , 2 , 4 , 4 , 4 , 3 , 2 , 3 , 4 , 4 ,
+ 4 , 2 , 2 , 2 , 4 , 3 , 3 , 3 , 4 , 4 ,
+ 4 , 4 , 4 , 2 , 4 , 3 , 4 , 3 , 4 , 4 ,
+ 4 , 2 , 2 , 2 , 4 , 3 , 4 , 3 , 4 , 4 ,
+ 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 ,
+ 4 , 3 , 4 , 3 , 4 , 2 , 2 , 2 , 4 , 3 ,
+ 4 , 3 , 3 , 3 , 4 , 2 , 4 , 4 , 4 , 3 ,
+ 4 , 3 , 3 , 3 , 4 , 2 , 2 , 2 , 4 , 3 ,
+ 4 , 3 , 4 , 3 , 4 , 2 , 4 , 4 , 4 , 4 ,
+ 4 , 3 , 4 , 3 , 4 , 2 , 2 , 2 , 4 , 3 ,
+ 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 ]
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level6.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level6.qml
new file mode 100644
index 0000000..2b34baa
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level6.qml
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+
+TemplateBase{
+ moveTarget: 20
+ timeTarget: 40
+ goalText: "7 of 10<br><br>Clear with 20 moves in 40 seconds (or better)."
+ startingGrid: [ 1 , 3 , 1 , 1 , 1 , 1 , 2 , 1 , 2 , 2 ,
+ 2 , 1 , 2 , 3 , 3 , 1 , 3 , 1 , 1 , 3 ,
+ 3 , 1 , 1 , 1 , 2 , 2 , 3 , 2 , 3 , 1 ,
+ 1 , 3 , 1 , 1 , 3 , 1 , 1 , 1 , 2 , 3 ,
+ 2 , 1 , 1 , 1 , 3 , 2 , 3 , 3 , 2 , 3 ,
+ 3 , 3 , 3 , 3 , 2 , 2 , 3 , 1 , 3 , 2 ,
+ 2 , 2 , 3 , 2 , 2 , 3 , 2 , 2 , 2 , 2 ,
+ 1 , 2 , 1 , 2 , 1 , 3 , 2 , 3 , 2 , 3 ,
+ 1 , 1 , 2 , 3 , 3 , 3 , 3 , 1 , 1 , 2 ,
+ 3 , 3 , 2 , 2 , 2 , 2 , 3 , 1 , 3 , 1 ,
+ 1 , 2 , 3 , 3 , 3 , 1 , 3 , 2 , 1 , 2 ,
+ 1 , 2 , 1 , 1 , 2 , 3 , 1 , 2 , 1 , 3 ,
+ 3 , 1 , 2 , 2 , 1 , 3 , 3 , 1 , 3 , 2 ]
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level7.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level7.qml
new file mode 100644
index 0000000..280bbb1
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level7.qml
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+
+TemplateBase{
+ goalText: "8 of 10<br><br>Clear the grid."
+ startingGrid: [ 2 , 4 , 3 , 2 , 3 , 2 , 3 , 3 , 4 , 3 ,
+ 2 , 2 , 3 , 3 , 1 , 4 , 3 , 3 , 3 , 2 ,
+ 1 , 4 , 2 , 3 , 4 , 3 , 3 , 1 , 1 , 1 ,
+ 2 , 1 , 2 , 4 , 4 , 2 , 2 , 3 , 2 , 1 ,
+ 3 , 4 , 4 , 1 , 3 , 2 , 4 , 2 , 1 , 1 ,
+ 2 , 2 , 3 , 1 , 2 , 4 , 1 , 2 , 1 , 2 ,
+ 1 , 2 , 3 , 2 , 4 , 4 , 3 , 1 , 1 , 2 ,
+ 4 , 4 , 2 , 1 , 2 , 4 , 2 , 2 , 4 , 3 ,
+ 4 , 2 , 4 , 1 , 3 , 4 , 1 , 4 , 2 , 4 ,
+ 4 , 3 , 4 , 1 , 4 , 3 , 1 , 3 , 1 , 1 ,
+ 3 , 3 , 2 , 3 , 2 , 4 , 1 , 2 , 4 , 4 ,
+ 3 , 4 , 2 , 2 , 4 , 3 , 4 , 1 , 3 , 2 ,
+ 4 , 3 , 3 , 4 , 2 , 4 , 1 , 2 , 3 , 2 ]
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level8.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level8.qml
new file mode 100644
index 0000000..7661485
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level8.qml
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+
+TemplateBase{
+ scoreTarget: 1000
+ goalText: "9 of 10<br><br>Score over 1000 points"
+ startingGrid: [ 1 , 4 , 4 , 3 , 2 , 1 , 4 , 2 , 4 , 2 ,
+ 2 , 3 , 4 , 4 , 1 , 1 , 1 , 4 , 4 , 4 ,
+ 1 , 3 , 1 , 2 , 2 , 1 , 2 , 1 , 4 , 2 ,
+ 4 , 3 , 4 , 2 , 1 , 4 , 1 , 2 , 2 , 3 ,
+ 3 , 4 , 2 , 4 , 4 , 3 , 2 , 2 , 2 , 1 ,
+ 4 , 4 , 3 , 2 , 4 , 4 , 2 , 1 , 1 , 1 ,
+ 1 , 2 , 1 , 3 , 4 , 1 , 1 , 3 , 2 , 3 ,
+ 3 , 4 , 2 , 2 , 1 , 3 , 2 , 2 , 4 , 2 ,
+ 2 , 4 , 1 , 2 , 2 , 4 , 3 , 3 , 3 , 1 ,
+ 1 , 2 , 2 , 4 , 1 , 2 , 2 , 3 , 3 , 3 ,
+ 4 , 4 , 1 , 4 , 3 , 1 , 3 , 3 , 3 , 4 ,
+ 1 , 2 , 4 , 1 , 2 , 1 , 1 , 4 , 2 , 1 ,
+ 1 , 2 , 3 , 4 , 2 , 4 , 4 , 2 , 1 , 3 ]
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level9.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level9.qml
new file mode 100644
index 0000000..c75d8e5
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level9.qml
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+
+TemplateBase{
+ scoreTarget: 2000
+ timeTarget: 60
+ moveTarget: 20
+ mustClear: false
+ goalText: "10 of 10<br><br>Score 2000 in one minute with less than 20 moves!"
+ startingGrid: [ 3 , 2 , 3 , 1 , 3 , 3 , 4 , 1 , 3 , 3 ,
+ 2 , 3 , 2 , 1 , 1 , 2 , 2 , 2 , 4 , 1 ,
+ 2 , 4 , 4 , 4 , 3 , 1 , 4 , 4 , 4 , 1 ,
+ 3 , 1 , 3 , 4 , 4 , 2 , 2 , 2 , 2 , 3 ,
+ 2 , 1 , 4 , 4 , 3 , 3 , 1 , 1 , 3 , 2 ,
+ 3 , 2 , 1 , 4 , 3 , 4 , 1 , 3 , 4 , 2 ,
+ 3 , 3 , 1 , 4 , 4 , 4 , 2 , 1 , 2 , 3 ,
+ 2 , 3 , 4 , 3 , 4 , 1 , 1 , 3 , 2 , 4 ,
+ 4 , 4 , 1 , 2 , 4 , 3 , 2 , 2 , 2 , 4 ,
+ 1 , 4 , 2 , 2 , 1 , 1 , 2 , 1 , 1 , 4 ,
+ 1 , 4 , 3 , 3 , 3 , 1 , 3 , 4 , 4 , 2 ,
+ 3 , 4 , 1 , 1 , 2 , 2 , 2 , 3 , 2 , 1 ,
+ 3 , 3 , 4 , 3 , 1 , 1 , 1 , 4 , 4 , 3 ]
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/samegame.js b/basicsuite/qt5-everywhere/demos/samegame/content/samegame.js
new file mode 100644
index 0000000..96b8167
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/content/samegame.js
@@ -0,0 +1,581 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/* This script file handles the game logic */
+.pragma library
+.import QtQuick.LocalStorage 2.0 as Sql
+.import "../settings.js" as Settings
+
+var maxColumn = 10;
+var maxRow = 13;
+var types = 3;
+var maxIndex = maxColumn*maxRow;
+var board = new Array(maxIndex);
+var blockSrc = "Block.qml";
+var gameDuration;
+var component = Qt.createComponent(blockSrc);
+var gameCanvas;
+var betweenTurns = false;
+
+var puzzleLevel = null;
+var puzzlePath = "";
+
+var gameMode = "arcade"; //Set in new game, then tweaks behavior of other functions
+var gameOver = false;
+
+function changeBlock(src)
+{
+ blockSrc = src;
+ component = Qt.createComponent(blockSrc);
+}
+
+// Index function used instead of a 2D array
+function index(column, row)
+{
+ return column + row * maxColumn;
+}
+
+function timeStr(msecs)
+{
+ var secs = Math.floor(msecs/1000);
+ var m = Math.floor(secs/60);
+ var ret = "" + m + "m " + (secs%60) + "s";
+ return ret;
+}
+
+function cleanUp()
+{
+ if (gameCanvas == undefined)
+ return;
+ // Delete blocks from previous game
+ for (var i = 0; i < maxIndex; i++) {
+ if (board[i] != null)
+ board[i].destroy();
+ board[i] = null;
+ }
+ if (puzzleLevel != null){
+ puzzleLevel.destroy();
+ puzzleLevel = null;
+ }
+ gameCanvas.mode = ""
+}
+
+function startNewGame(gc, mode, map)
+{
+ gameCanvas = gc;
+ if (mode == undefined)
+ gameMode = "arcade";
+ else
+ gameMode = mode;
+ gameOver = false;
+
+ cleanUp();
+
+ gc.gameOver = false;
+ gc.mode = gameMode;
+ // Calculate board size
+ maxColumn = Math.floor(gameCanvas.width/Settings.blockSize);
+ maxRow = Math.floor(gameCanvas.height/Settings.blockSize);
+ maxIndex = maxRow * maxColumn;
+ if (gameMode == "arcade") //Needs to be after board sizing
+ getHighScore();
+
+
+ // Initialize Board
+ board = new Array(maxIndex);
+ gameCanvas.score = 0;
+ gameCanvas.score2 = 0;
+ gameCanvas.moves = 0;
+ gameCanvas.curTurn = 1;
+ if (gameMode == "puzzle")
+ loadMap(map);
+ else//Note that we load them in reverse order for correct visual stacking
+ for (var column = maxColumn - 1; column >= 0; column--)
+ for (var row = maxRow - 1; row >= 0; row--)
+ createBlock(column, row);
+ if (gameMode == "puzzle")
+ getLevelHistory();//Needs to be after map load
+ gameDuration = new Date();
+}
+
+var fillFound; // Set after a floodFill call to the number of blocks found
+var floodBoard; // Set to 1 if the floodFill reaches off that node
+
+// NOTE: Be careful with vars named x,y, as the calling object's x,y are still in scope
+function handleClick(x,y)
+{
+ if (betweenTurns || gameOver || gameCanvas == undefined)
+ return;
+ var column = Math.floor(x/Settings.blockSize);
+ var row = Math.floor(y/Settings.blockSize);
+ if (column >= maxColumn || column < 0 || row >= maxRow || row < 0)
+ return;
+ if (board[index(column, row)] == null)
+ return;
+ // If it's a valid block, remove it and all connected (does nothing if it's not connected)
+ floodFill(column,row, -1);
+ if (fillFound <= 0)
+ return;
+ if (gameMode == "multiplayer" && gameCanvas.curTurn == 2)
+ gameCanvas.score2 += (fillFound - 1) * (fillFound - 1);
+ else
+ gameCanvas.score += (fillFound - 1) * (fillFound - 1);
+ if (gameMode == "multiplayer" && gameCanvas.curTurn == 2)
+ shuffleUp();
+ else
+ shuffleDown();
+ gameCanvas.moves += 1;
+ if (gameMode == "endless")
+ refill();
+ else if (gameMode != "multiplayer")
+ victoryCheck();
+ if (gameMode == "multiplayer" && !gc.gameOver){
+ betweenTurns = true;
+ gameCanvas.swapPlayers();//signal, animate and call turnChange() when ready
+ }
+}
+
+function floodFill(column,row,type)
+{
+ if (board[index(column, row)] == null)
+ return;
+ var first = false;
+ if (type == -1) {
+ first = true;
+ type = board[index(column,row)].type;
+
+ // Flood fill initialization
+ fillFound = 0;
+ floodBoard = new Array(maxIndex);
+ }
+ if (column >= maxColumn || column < 0 || row >= maxRow || row < 0)
+ return;
+ if (floodBoard[index(column, row)] == 1 || (!first && type != board[index(column, row)].type))
+ return;
+ floodBoard[index(column, row)] = 1;
+ floodFill(column + 1, row, type);
+ floodFill(column - 1, row, type);
+ floodFill(column, row + 1, type);
+ floodFill(column, row - 1, type);
+ if (first == true && fillFound == 0)
+ return; // Can't remove single blocks
+ board[index(column, row)].dying = true;
+ board[index(column, row)] = null;
+ fillFound += 1;
+}
+
+function shuffleDown()
+{
+ // Fall down
+ for (var column = 0; column < maxColumn; column++) {
+ var fallDist = 0;
+ for (var row = maxRow - 1; row >= 0; row--) {
+ if (board[index(column,row)] == null) {
+ fallDist += 1;
+ } else {
+ if (fallDist > 0) {
+ var obj = board[index(column, row)];
+ obj.y = (row + fallDist) * Settings.blockSize;
+ board[index(column, row + fallDist)] = obj;
+ board[index(column, row)] = null;
+ }
+ }
+ }
+ }
+ // Fall to the left
+ fallDist = 0;
+ for (column = 0; column < maxColumn; column++) {
+ if (board[index(column, maxRow - 1)] == null) {
+ fallDist += 1;
+ } else {
+ if (fallDist > 0) {
+ for (row = 0; row < maxRow; row++) {
+ obj = board[index(column, row)];
+ if (obj == null)
+ continue;
+ obj.x = (column - fallDist) * Settings.blockSize;
+ board[index(column - fallDist,row)] = obj;
+ board[index(column, row)] = null;
+ }
+ }
+ }
+ }
+}
+
+
+function shuffleUp()
+{
+ // Fall up
+ for (var column = 0; column < maxColumn; column++) {
+ var fallDist = 0;
+ for (var row = 0; row < maxRow; row++) {
+ if (board[index(column,row)] == null) {
+ fallDist += 1;
+ } else {
+ if (fallDist > 0) {
+ var obj = board[index(column, row)];
+ obj.y = (row - fallDist) * Settings.blockSize;
+ board[index(column, row - fallDist)] = obj;
+ board[index(column, row)] = null;
+ }
+ }
+ }
+ }
+ // Fall to the left (or should it be right, so as to be left for P2?)
+ fallDist = 0;
+ for (column = 0; column < maxColumn; column++) {
+ if (board[index(column, 0)] == null) {
+ fallDist += 1;
+ } else {
+ if (fallDist > 0) {
+ for (row = 0; row < maxRow; row++) {
+ obj = board[index(column, row)];
+ if (obj == null)
+ continue;
+ obj.x = (column - fallDist) * Settings.blockSize;
+ board[index(column - fallDist,row)] = obj;
+ board[index(column, row)] = null;
+ }
+ }
+ }
+ }
+}
+
+function turnChange()//called by ui outside
+{
+ betweenTurns = false;
+ if (gameCanvas.curTurn == 1){
+ shuffleUp();
+ gameCanvas.curTurn = 2;
+ victoryCheck();
+ }else{
+ shuffleDown();
+ gameCanvas.curTurn = 1;
+ victoryCheck();
+ }
+}
+
+function refill()
+{
+ for (var column = 0; column < maxColumn; column++) {
+ for (var row = 0; row < maxRow; row++) {
+ if (board[index(column, row)] == null)
+ createBlock(column, row);
+ }
+ }
+}
+
+function victoryCheck()
+{
+ // Awards bonuses for no blocks left
+ var deservesBonus = true;
+ if (board[index(0,maxRow - 1)] != null || board[index(0,0)] != null)
+ deservesBonus = false;
+ // Checks for game over
+ if (deservesBonus){
+ if (gameCanvas.curTurn = 1)
+ gameCanvas.score += 1000;
+ else
+ gameCanvas.score2 += 1000;
+ }
+ gameOver = deservesBonus;
+ if (gameCanvas.curTurn == 1){
+ if (!(floodMoveCheck(0, maxRow - 1, -1)))
+ gameOver = true;
+ }else{
+ if (!(floodMoveCheck(0, 0, -1, true)))
+ gameOver = true;
+ }
+ if (gameMode == "puzzle"){
+ puzzleVictoryCheck(deservesBonus);//Takes it from here
+ return;
+ }
+ if (gameOver) {
+ var winnerScore = Math.max(gameCanvas.score, gameCanvas.score2);
+ if (gameMode == "multiplayer"){
+ gameCanvas.score = winnerScore;
+ saveHighScore(gameCanvas.score2);
+ }
+ saveHighScore(gameCanvas.score);
+ gameDuration = new Date() - gameDuration;
+ gameCanvas.gameOver = true;
+ }
+}
+
+// Only floods up and right, to see if it can find adjacent same-typed blocks
+function floodMoveCheck(column, row, type, goDownInstead)
+{
+ if (column >= maxColumn || column < 0 || row >= maxRow || row < 0)
+ return false;
+ if (board[index(column, row)] == null)
+ return false;
+ var myType = board[index(column, row)].type;
+ if (type == myType)
+ return true;
+ if (goDownInstead)
+ return floodMoveCheck(column + 1, row, myType, goDownInstead) ||
+ floodMoveCheck(column, row + 1, myType, goDownInstead);
+ else
+ return floodMoveCheck(column + 1, row, myType) ||
+ floodMoveCheck(column, row - 1, myType);
+}
+
+function createBlock(column,row,type)
+{
+ // Note that we don't wait for the component to become ready. This will
+ // only work if the block QML is a local file. Otherwise the component will
+ // not be ready immediately. There is a statusChanged signal on the
+ // component you could use if you want to wait to load remote files.
+ if (component.status == 1){
+ if (type == undefined)
+ type = Math.floor(Math.random() * types);
+ if (type < 0 || type > 4) {
+ console.log("Invalid type requested");//TODO: Is this triggered by custom levels much?
+ return;
+ }
+ var dynamicObject = component.createObject(gameCanvas,
+ {"type": type,
+ "x": column*Settings.blockSize,
+ "y": -1*Settings.blockSize,
+ "width": Settings.blockSize,
+ "height": Settings.blockSize,
+ "particleSystem": gameCanvas.ps});
+ if (dynamicObject == null){
+ console.log("error creating block");
+ console.log(component.errorString());
+ return false;
+ }
+ dynamicObject.y = row*Settings.blockSize;
+ dynamicObject.spawned = true;
+
+ board[index(column,row)] = dynamicObject;
+ }else{
+ console.log("error loading block component");
+ console.log(component.errorString());
+ return false;
+ }
+ return true;
+}
+
+function showPuzzleError(str)
+{
+ //TODO: Nice user visible UI?
+ console.log(str);
+}
+
+function loadMap(map)
+{
+ puzzlePath = map;
+ var levelComp = Qt.createComponent(puzzlePath);
+ if (levelComp.status != 1){
+ console.log("Error loading level");
+ showPuzzleError(levelComp.errorString());
+ return;
+ }
+ puzzleLevel = levelComp.createObject();
+ if (puzzleLevel == null || !puzzleLevel.startingGrid instanceof Array) {
+ showPuzzleError("Bugger!");
+ return;
+ }
+ gameCanvas.showPuzzleGoal(puzzleLevel.goalText);
+ //showPuzzleGoal should call finishLoadingMap as the next thing it does, before handling more events
+}
+
+function finishLoadingMap()
+{
+ for (var i in puzzleLevel.startingGrid)
+ if (! (puzzleLevel.startingGrid[i] >= 0 && puzzleLevel.startingGrid[i] <= 9) )
+ puzzleLevel.startingGrid[i] = 0;
+ //TODO: Don't allow loading larger levels, leads to cheating
+ while (puzzleLevel.startingGrid.length > maxIndex) puzzleLevel.startingGrid.shift();
+ while (puzzleLevel.startingGrid.length < maxIndex) puzzleLevel.startingGrid.unshift(0);
+ for (var i in puzzleLevel.startingGrid)
+ if (puzzleLevel.startingGrid[i] > 0)
+ createBlock(i % maxColumn, Math.floor(i / maxColumn), puzzleLevel.startingGrid[i] - 1);
+
+ //### Experimental feature - allow levels to contain arbitrary QML scenes as well!
+ //while (puzzleLevel.children.length)
+ // puzzleLevel.children[0].parent = gameCanvas;
+ gameDuration = new Date(); //Don't start until we finish loading
+}
+
+function puzzleVictoryCheck(clearedAll)//gameOver has also been set if no more moves
+{
+ var won = true;
+ var soFar = new Date() - gameDuration;
+ if (puzzleLevel.scoreTarget != -1 && gameCanvas.score < puzzleLevel.scoreTarget){
+ won = false;
+ } if (puzzleLevel.scoreTarget != -1 && gameCanvas.score >= puzzleLevel.scoreTarget && !puzzleLevel.mustClear){
+ gameOver = true;
+ } if (puzzleLevel.timeTarget != -1 && soFar/1000.0 > puzzleLevel.timeTarget){
+ gameOver = true;
+ } if (puzzleLevel.moveTarget != -1 && gameCanvas.moves >= puzzleLevel.moveTarget){
+ gameOver = true;
+ } if (puzzleLevel.mustClear && gameOver && !clearedAll) {
+ won = false;
+ }
+
+ if (gameOver) {
+ gameCanvas.gameOver = true;
+ gameCanvas.showPuzzleEnd(won);
+
+ if (won) {
+ // Store progress
+ saveLevelHistory();
+ }
+ }
+}
+
+function getHighScore()
+{
+ var db = Sql.LocalStorage.openDatabaseSync(
+ "SameGame",
+ "2.0",
+ "SameGame Local Data",
+ 100
+ );
+ db.transaction(
+ function(tx) {
+ tx.executeSql('CREATE TABLE IF NOT EXISTS Scores(game TEXT, score NUMBER, gridSize TEXT, time NUMBER)');
+ // Only show results for the current grid size
+ var rs = tx.executeSql('SELECT * FROM Scores WHERE gridSize = "'
+ + maxColumn + "x" + maxRow + '" AND game = "' + gameMode + '" ORDER BY score desc');
+ if (rs.rows.length > 0)
+ gameCanvas.highScore = rs.rows.item(0).score;
+ else
+ gameCanvas.highScore = 0;
+ }
+ );
+}
+
+function saveHighScore(score)
+{
+ // Offline storage
+ var db = Sql.LocalStorage.openDatabaseSync(
+ "SameGame",
+ "2.0",
+ "SameGame Local Data",
+ 100
+ );
+ var dataStr = "INSERT INTO Scores VALUES(?, ?, ?, ?)";
+ var data = [
+ gameMode,
+ score,
+ maxColumn + "x" + maxRow,
+ Math.floor(gameDuration / 1000)
+ ];
+ if (score >= gameCanvas.highScore)//Update UI field
+ gameCanvas.highScore = score;
+
+ db.transaction(
+ function(tx) {
+ tx.executeSql('CREATE TABLE IF NOT EXISTS Scores(game TEXT, score NUMBER, gridSize TEXT, time NUMBER)');
+ tx.executeSql(dataStr, data);
+ }
+ );
+}
+
+function getLevelHistory()
+{
+ var db = Sql.LocalStorage.openDatabaseSync(
+ "SameGame",
+ "2.0",
+ "SameGame Local Data",
+ 100
+ );
+ db.transaction(
+ function(tx) {
+ tx.executeSql('CREATE TABLE IF NOT EXISTS Puzzle(level TEXT, score NUMBER, moves NUMBER, time NUMBER)');
+ var rs = tx.executeSql('SELECT * FROM Puzzle WHERE level = "' + puzzlePath + '" ORDER BY score desc');
+ if (rs.rows.length > 0) {
+ gameCanvas.puzzleWon = true;
+ gameCanvas.highScore = rs.rows.item(0).score;
+ } else {
+ gameCanvas.puzzleWon = false;
+ gameCanvas.highScore = 0;
+ }
+ }
+ );
+}
+
+function saveLevelHistory()
+{
+ var db = Sql.LocalStorage.openDatabaseSync(
+ "SameGame",
+ "2.0",
+ "SameGame Local Data",
+ 100
+ );
+ var dataStr = "INSERT INTO Puzzle VALUES(?, ?, ?, ?)";
+ var data = [
+ puzzlePath,
+ gameCanvas.score,
+ gameCanvas.moves,
+ Math.floor(gameDuration / 1000)
+ ];
+ gameCanvas.puzzleWon = true;
+
+ db.transaction(
+ function(tx) {
+ tx.executeSql('CREATE TABLE IF NOT EXISTS Puzzle(level TEXT, score NUMBER, moves NUMBER, time NUMBER)');
+ tx.executeSql(dataStr, data);
+ }
+ );
+}
+
+function nuke() //For "Debug mode"
+{
+ for (var row = 1; row <= 5; row++) {
+ for (var col = 0; col < 5; col++) {
+ if (board[index(col, maxRow - row)] != null) {
+ board[index(col, maxRow - row)].dying = true;
+ board[index(col, maxRow - row)] = null;
+ }
+ }
+ }
+ if (gameMode == "multiplayer" && gameCanvas.curTurn == 2)
+ shuffleUp();
+ else
+ shuffleDown();
+ if (gameMode == "endless")
+ refill();
+ else
+ victoryCheck();
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/samegame.qml b/basicsuite/qt5-everywhere/demos/samegame/samegame.qml
new file mode 100644
index 0000000..49eab55
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/samegame.qml
@@ -0,0 +1,371 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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/samegame.js" as Logic
+import "settings.js" as Settings
+import "content"
+
+Rectangle {
+ id: root
+ anchors.fill: parent
+ property int acc: 0
+
+
+ function loadPuzzle() {
+ if (gameCanvas.mode != "")
+ Logic.cleanUp();
+ Logic.startNewGame(gameCanvas,"puzzle","levels/level"+acc+".qml")
+ }
+ function nextPuzzle() {
+ acc = (acc + 1) % 10;
+ loadPuzzle();
+ }
+ Timer {
+ id: gameOverTimer
+ interval: 1500
+ running : gameCanvas.gameOver && gameCanvas.mode == "puzzle" //mode will be reset by cleanUp();
+ repeat : false
+ onTriggered: {
+ Logic.cleanUp();
+ nextPuzzle();
+ }
+ }
+
+ Image {
+ source: "content/gfx/background.png"
+ anchors.fill: parent
+ }
+
+ GameArea {
+ id: gameCanvas
+ z: 1
+ y: Settings.headerHeight
+
+ width: parent.width
+ height: parent.height - Settings.headerHeight - Settings.footerHeight
+
+ backgroundVisible: root.state == "in-game"
+ onModeChanged: if (gameCanvas.mode != "puzzle") puzzleWon = false; //UI has stricter constraints on this variable than the game does
+ Age {
+ groups: ["redspots", "greenspots", "bluespots", "yellowspots"]
+ enabled: root.state == ""
+ system: gameCanvas.ps
+ }
+
+ onPuzzleLost: acc--;//So that nextPuzzle() reloads the current one
+
+ }
+
+ Item {
+ id: menu
+ z: 2
+ width: parent.width;
+ anchors.top: parent.top
+ anchors.bottom: bottomBar.top
+
+ LogoAnimation {
+ x: 64
+ y: Settings.headerHeight
+ particleSystem: gameCanvas.ps
+ running: root.state == ""
+ }
+ Row {
+ x: 112
+ y: 20
+ Image { source: "content/gfx/logo-a.png" }
+ Image { source: "content/gfx/logo-m.png" }
+ Image { source: "content/gfx/logo-e.png" }
+ }
+
+ Column {
+ y: 100 + 40
+ spacing: Settings.menuButtonSpacing
+
+ Button {
+ width: root.width
+ rotatedButton: true
+ imgSrc: "content/gfx/but-game-1.png"
+ onClicked: {
+ if (root.state == "in-game")
+ return //Prevent double clicking
+ root.state = "in-game"
+ gameCanvas.blockFile = "Block.qml"
+ gameCanvas.background = "gfx/background.png"
+ arcadeTimer.start();
+ }
+ //Emitted particles don't fade out, because ImageParticle is on the GameArea
+ system: gameCanvas.ps
+ group: "green"
+ Timer {
+ id: arcadeTimer
+ interval: Settings.menuDelay
+ running : false
+ repeat : false
+ onTriggered: Logic.startNewGame(gameCanvas)
+ }
+ }
+
+ Button {
+ width: root.width
+ rotatedButton: true
+ imgSrc: "content/gfx/but-game-2.png"
+ onClicked: {
+ if (root.state == "in-game")
+ return
+ root.state = "in-game"
+ gameCanvas.blockFile = "Block.qml"
+ gameCanvas.background = "gfx/background.png"
+ twopTimer.start();
+ }
+ system: gameCanvas.ps
+ group: "green"
+ Timer {
+ id: twopTimer
+ interval: Settings.menuDelay
+ running : false
+ repeat : false
+ onTriggered: Logic.startNewGame(gameCanvas, "multiplayer")
+ }
+ }
+
+ Button {
+ width: root.width
+ rotatedButton: true
+ imgSrc: "content/gfx/but-game-3.png"
+ onClicked: {
+ if (root.state == "in-game")
+ return
+ root.state = "in-game"
+ gameCanvas.blockFile = "SimpleBlock.qml"
+ gameCanvas.background = "gfx/background.png"
+ endlessTimer.start();
+ }
+ system: gameCanvas.ps
+ group: "blue"
+ Timer {
+ id: endlessTimer
+ interval: Settings.menuDelay
+ running : false
+ repeat : false
+ onTriggered: Logic.startNewGame(gameCanvas, "endless")
+ }
+ }
+
+ Button {
+ width: root.width
+ rotatedButton: true
+ imgSrc: "content/gfx/but-game-4.png"
+ group: "yellow"
+ onClicked: {
+ if (root.state == "in-game")
+ return
+ root.state = "in-game"
+ gameCanvas.blockFile = "PuzzleBlock.qml"
+ gameCanvas.background = "gfx/background.png"
+ puzzleTimer.start();
+ }
+ Timer {
+ id: puzzleTimer
+ interval: Settings.menuDelay
+ running : false
+ repeat : false
+ onTriggered: loadPuzzle();
+ }
+ system: gameCanvas.ps
+ }
+ }
+ }
+
+ Image {
+ id: scoreBar
+ source: "content/gfx/bar.png"
+ width: parent.width
+ z: 6
+ y: -Settings.headerHeight
+ height: Settings.headerHeight
+ Behavior on opacity { NumberAnimation {} }
+ SamegameText {
+ id: arcadeScore
+ anchors { right: parent.right; topMargin: 3; rightMargin: 11; top: parent.top}
+ text: '<font color="#f7d303">P1:</font> ' + gameCanvas.score
+ font.pixelSize: Settings.fontPixelSize
+ textFormat: Text.StyledText
+ color: "white"
+ opacity: gameCanvas.mode == "arcade" ? 1 : 0
+ Behavior on opacity { NumberAnimation {} }
+ }
+ SamegameText {
+ id: arcadeHighScore
+ anchors { left: parent.left; topMargin: 3; leftMargin: 11; top: parent.top}
+ text: '<font color="#f7d303">Highscore:</font> ' + gameCanvas.highScore
+ opacity: gameCanvas.mode == "arcade" ? 1 : 0
+ }
+ SamegameText {
+ id: p1Score
+ anchors { right: parent.right; topMargin: 3; rightMargin: 11; top: parent.top}
+ text: '<font color="#f7d303">P1:</font> ' + gameCanvas.score
+ opacity: gameCanvas.mode == "multiplayer" ? 1 : 0
+ }
+ SamegameText {
+ id: p2Score
+ anchors { left: parent.left; topMargin: 3; leftMargin: 11; top: parent.top}
+ text: '<font color="#f7d303">P2:</font> ' + gameCanvas.score2
+ opacity: gameCanvas.mode == "multiplayer" ? 1 : 0
+ rotation: 180
+ }
+ SamegameText {
+ id: puzzleMoves
+ anchors { left: parent.left; topMargin: 3; leftMargin: 11; top: parent.top}
+ text: '<font color="#f7d303">Moves:</font> ' + gameCanvas.moves
+ opacity: gameCanvas.mode == "puzzle" ? 1 : 0
+ }
+ SamegameText {
+ Image {
+ source: "content/gfx/icon-time.png"
+ x: -20
+ }
+ id: puzzleTime
+ anchors { topMargin: 3; top: parent.top; horizontalCenter: parent.horizontalCenter; horizontalCenterOffset: 20}
+ text: "00:00"
+ opacity: gameCanvas.mode == "puzzle" ? 1 : 0
+ Timer {
+ interval: 1000
+ repeat: true
+ running: gameCanvas.mode == "puzzle" && !gameCanvas.gameOver
+ onTriggered: {
+ var elapsed = Math.floor((new Date() - Logic.gameDuration)/ 1000.0);
+ var mins = Math.floor(elapsed/60.0);
+ var secs = (elapsed % 60);
+ puzzleTime.text = (mins < 10 ? "0" : "") + mins + ":" + (secs < 10 ? "0" : "") + secs;
+ }
+ }
+ }
+ SamegameText {
+ id: puzzleScore
+ anchors { right: parent.right; topMargin: 3; rightMargin: 11; top: parent.top}
+ text: '<font color="#f7d303">Score:</font> ' + gameCanvas.score
+ opacity: gameCanvas.mode == "puzzle" ? 1 : 0
+ }
+ }
+
+ Image {
+ id: bottomBar
+ width: parent.width
+ height: Settings.footerHeight
+ source: "content/gfx/bar.png"
+ y: parent.height - Settings.footerHeight;
+ z: 2
+ /*Button {
+ id: quitButton
+ height: Settings.toolButtonHeight
+ imgSrc: "content/gfx/but-quit.png"
+ onClicked: {Qt.quit(); }
+ anchors { left: parent.left; verticalCenter: parent.verticalCenter; leftMargin: 11 }
+ }*/
+ Button {
+ id: menuButton
+ height: Settings.toolButtonHeight
+ imgSrc: "content/gfx/but-menu.png"
+ visible: (root.state == "in-game");
+ onClicked: {root.state = ""; Logic.cleanUp(); gameCanvas.mode = ""}
+ anchors { left: parent.left; verticalCenter: parent.verticalCenter; leftMargin: 0 }
+ }
+ Button {
+ id: againButton
+ height: Settings.toolButtonHeight
+ imgSrc: "content/gfx/but-game-new.png"
+ visible: (root.state == "in-game");
+ opacity: gameCanvas.gameOver && (gameCanvas.mode == "arcade" || gameCanvas.mode == "multiplayer")
+ Behavior on opacity{ NumberAnimation {} }
+ onClicked: {if (gameCanvas.gameOver) { Logic.startNewGame(gameCanvas, gameCanvas.mode);}}
+ anchors { right: parent.right; verticalCenter: parent.verticalCenter; rightMargin: 11 }
+ }
+ Button {
+ id: nextButton
+ height: Settings.toolButtonHeight
+ imgSrc: "content/gfx/but-puzzle-next.png"
+ visible: (root.state == "in-game") && gameCanvas.mode == "puzzle" && gameCanvas.puzzleWon
+ opacity: gameCanvas.puzzleWon ? 1 : 0
+ Behavior on opacity{ NumberAnimation {} }
+ onClicked: {if (gameCanvas.puzzleWon) nextPuzzle();}
+ anchors { right: parent.right; verticalCenter: parent.verticalCenter; rightMargin: 11 }
+ }
+ }
+
+ Connections {
+ target: root
+ onStateChanged: stateChangeAnim.running = true
+ }
+ SequentialAnimation {
+ id: stateChangeAnim
+ ParallelAnimation {
+ NumberAnimation { target: bottomBar; property: "y"; to: root.height; duration: Settings.menuDelay/2; easing.type: Easing.OutQuad }
+ NumberAnimation { target: scoreBar; property: "y"; to: -Settings.headerHeight; duration: Settings.menuDelay/2; easing.type: Easing.OutQuad }
+ }
+ ParallelAnimation {
+ NumberAnimation { target: bottomBar; property: "y"; to: root.height - Settings.footerHeight; duration: Settings.menuDelay/2; easing.type: Easing.OutBounce}
+ NumberAnimation { target: scoreBar; property: "y"; to: root.state == "" ? -Settings.headerHeight : 0; duration: Settings.menuDelay/2; easing.type: Easing.OutBounce}
+ }
+ }
+
+ states: [
+ State {
+ name: "in-game"
+ PropertyChanges {
+ target: menu
+ opacity: 0
+ visible: false
+ }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ NumberAnimation {properties: "x,y,opacity"}
+ }
+ ]
+
+ //"Debug mode"
+ focus: true
+ Keys.onAsteriskPressed: Logic.nuke();
+ Keys.onSpacePressed: gameCanvas.puzzleWon = true;
+}
diff --git a/basicsuite/qt5-everywhere/demos/samegame/samegame.qrc b/basicsuite/qt5-everywhere/demos/samegame/samegame.qrc
new file mode 100644
index 0000000..951b9d1
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/samegame.qrc
@@ -0,0 +1,72 @@
+<RCC>
+ <qresource prefix="/demos/samegame">
+ <file>samegame.qml</file>
+ <file>settings.js</file>
+ <file>content/gfx/text-p1-won.png</file>
+ <file>content/gfx/background-puzzle.png</file>
+ <file>content/gfx/background.png</file>
+ <file>content/gfx/bar.png</file>
+ <file>content/gfx/blue-puzzle.png</file>
+ <file>content/gfx/blue.png</file>
+ <file>content/gfx/bubble-highscore.png</file>
+ <file>content/gfx/bubble-puzzle.png</file>
+ <file>content/gfx/but-game-1.png</file>
+ <file>content/gfx/but-game-2.png</file>
+ <file>content/gfx/but-game-3.png</file>
+ <file>content/gfx/but-game-4.png</file>
+ <file>content/gfx/but-game-new.png</file>
+ <file>content/gfx/but-menu.png</file>
+ <file>content/gfx/but-puzzle-next.png</file>
+ <file>content/gfx/but-quit.png</file>
+ <file>content/gfx/green-puzzle.png</file>
+ <file>content/gfx/green.png</file>
+ <file>content/gfx/icon-fail.png</file>
+ <file>content/gfx/icon-ok.png</file>
+ <file>content/gfx/icon-time.png</file>
+ <file>content/gfx/logo-a.png</file>
+ <file>content/gfx/logo-e.png</file>
+ <file>content/gfx/logo-g.png</file>
+ <file>content/gfx/logo-m.png</file>
+ <file>content/gfx/logo-s.png</file>
+ <file>content/gfx/logo.png</file>
+ <file>content/gfx/particle-brick.png</file>
+ <file>content/gfx/particle-paint.png</file>
+ <file>content/gfx/particle-smoke.png</file>
+ <file>content/gfx/red-puzzle.png</file>
+ <file>content/gfx/red.png</file>
+ <file>content/gfx/text-highscore-new.png</file>
+ <file>content/gfx/text-highscore.png</file>
+ <file>content/gfx/text-no-winner.png</file>
+ <file>content/gfx/text-p1-go.png</file>
+ <file>content/gfx/text-p1.png</file>
+ <file>content/gfx/text-p2-go.png</file>
+ <file>content/gfx/text-p2-won.png</file>
+ <file>content/gfx/text-p2.png</file>
+ <file>content/gfx/yellow-puzzle.png</file>
+ <file>content/gfx/yellow.png</file>
+ <file>content/levels/level0.qml</file>
+ <file>content/levels/level1.qml</file>
+ <file>content/levels/level2.qml</file>
+ <file>content/levels/level3.qml</file>
+ <file>content/levels/level4.qml</file>
+ <file>content/levels/level5.qml</file>
+ <file>content/levels/level6.qml</file>
+ <file>content/levels/level7.qml</file>
+ <file>content/levels/level8.qml</file>
+ <file>content/levels/level9.qml</file>
+ <file>content/levels/TemplateBase.qml</file>
+ <file>content/SamegameText.qml</file>
+ <file>content/SimpleBlock.qml</file>
+ <file>content/Block.qml</file>
+ <file>content/BlockEmitter.qml</file>
+ <file>content/Button.qml</file>
+ <file>content/GameArea.qml</file>
+ <file>content/LogoAnimation.qml</file>
+ <file>content/MenuEmitter.qml</file>
+ <file>content/PaintEmitter.qml</file>
+ <file>content/PrimaryPack.qml</file>
+ <file>content/PuzzleBlock.qml</file>
+ <file>content/samegame.js</file>
+ <file>content/SmokeText.qml</file>
+ </qresource>
+</RCC>
diff --git a/basicsuite/qt5-everywhere/demos/samegame/settings.js b/basicsuite/qt5-everywhere/demos/samegame/settings.js
new file mode 100644
index 0000000..e09dee9
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/samegame/settings.js
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Research In Motion
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+.pragma library
+
+//This should be switched over once a proper QML settings API exists
+
+var menuDelay = 500
+
+var headerHeight = 20 // 70 on BB10
+var footerHeight = 44 // 100 on BB10
+
+var fontPixelSize = 14 // 55 on BB10
+
+var blockSize = 32 // 64 on BB10
+
+var toolButtonHeight = 32 // 64 on BB10
+
+var menuButtonSpacing = 0 // 15 on BB10
diff --git a/basicsuite/qt5-everywhere/demos/shaders/Content.qml b/basicsuite/qt5-everywhere/demos/shaders/Content.qml
new file mode 100755
index 0000000..aae2337
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/Content.qml
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Rectangle {
+ id: root
+ property alias effect: effectLoader.item
+ property string effectSource: "Effects/EffectPassThrough.qml"
+ signal contentSizeChanged(size contentSize)
+
+ color: "black"
+
+ ShaderEffectSource {
+ id: theSource
+ smooth: true
+ hideSource: true
+ }
+
+ LogoContainer {
+ id: logoContainer
+ anchors.fill: root
+ }
+
+ Loader {
+ id: effectLoader
+ source: effectSource
+ }
+
+ onWidthChanged: {
+ if (effectLoader.item)
+ effectLoader.item.targetWidth = root.width
+ }
+
+ onHeightChanged: {
+ if (effectLoader.item)
+ effectLoader.item.targetHeight = root.height
+ }
+
+ onEffectSourceChanged: {
+ effectLoader.source = effectSource
+ updateSource()
+ }
+
+ function updateSource() {
+ if (effectLoader.item) {
+ effectLoader.item.parent = root
+ effectLoader.item.targetWidth = root.width
+ effectLoader.item.targetHeight = root.height
+ effectLoader.item.anchors.fill = logoContainer
+ effectLoader.item.source = theSource
+ }
+ }
+
+ function init() {
+ theSource.sourceItem = logoContainer
+ root.effectSource = "Effects/EffectPassThrough.qml"
+ effectLoader.source = root.effectSource
+ updateSource()
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/EffectSelectionPanel.qml b/basicsuite/qt5-everywhere/demos/shaders/EffectSelectionPanel.qml
new file mode 100755
index 0000000..93cdb5f
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/EffectSelectionPanel.qml
@@ -0,0 +1,156 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+import QtQuick 2.0
+
+Rectangle {
+ id: root
+ height: 78
+ property int itemHeight: 25
+ property string effectSource: ""
+ property string effectName: "No effect"
+
+ signal clicked
+ QtObject {
+ id: d
+ property Item selectedItem
+ }
+
+ ListModel {
+ id: sources
+ ListElement { name: "No effect"; source: "Effects/EffectPassThrough.qml" }
+ ListElement { name: "Billboard"; source: "Effects/EffectBillboard.qml" }
+ ListElement { name: "Black & white"; source: "Effects/EffectBlackAndWhite.qml" }
+ ListElement { name: "Blur"; source: "Effects/EffectGaussianBlur.qml" }
+ ListElement { name: "Edge detection"; source: "Effects/EffectSobelEdgeDetection1.qml" }
+ ListElement { name: "Emboss"; source: "Effects/EffectEmboss.qml" }
+ ListElement { name: "Glow"; source: "Effects/EffectGlow.qml" }
+ ListElement { name: "Isolate"; source: "Effects/EffectIsolate.qml" }
+ ListElement { name: "Pixelate"; source: "Effects/EffectPixelate.qml" }
+ ListElement { name: "Posterize"; source: "Effects/EffectPosterize.qml" }
+ ListElement { name: "Ripple"; source: "Effects/EffectRipple.qml" }
+ ListElement { name: "Sepia"; source: "Effects/EffectSepia.qml" }
+ ListElement { name: "Sharpen"; source: "Effects/EffectSharpen.qml" }
+ ListElement { name: "Shockwave"; source: "Effects/EffectShockwave.qml" }
+ ListElement { name: "Toon"; source: "Effects/EffectToon.qml" }
+ ListElement { name: "Warhol"; source: "Effects/EffectWarhol.qml" }
+ ListElement { name: "Wobble"; source: "Effects/EffectWobble.qml" }
+ ListElement { name: "Vignette"; source: "Effects/EffectVignette.qml" }
+ }
+
+ Component {
+ id: sourceDelegate
+ Item {
+ id: sourceDelegateItem
+ width: root.width
+ height: itemHeight
+
+ Text {
+ id: sourceSelectorItem
+ anchors.centerIn: parent
+ width: 0.9 * parent.width
+ height: 0.8 * itemHeight
+ text: name
+ color: "white"
+ }
+
+ states: [
+ State {
+ name: "selected"
+ PropertyChanges {
+ target: sourceSelectorItem
+ bgColor: "#ff8888"
+ }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ from: "*"
+ to: "*"
+ ColorAnimation {
+ properties: "color"
+ easing.type: Easing.OutQuart
+ duration: 500
+ }
+ }
+ ]
+ }
+ }
+
+ MouseArea {
+ id: mouseAboveMonitor
+ anchors.fill: parent
+ hoverEnabled: true
+ }
+
+ ListView {
+ id: list
+ anchors.fill: parent
+ clip: true
+ anchors.margins: root.width * 0.05
+ model: sources
+
+ currentIndex: 0
+
+ onCurrentIndexChanged : {
+ effectSource = model.get(currentIndex).source
+ effectName = model.get(currentIndex).name
+ root.clicked()
+ }
+
+ delegate: Item {
+ id: item
+ width: parent.width
+ height: itemHeight
+ Rectangle {
+ anchors.fill: parent
+ border.color: index == list.currentIndex ? "#44ffffff" : "transparent"
+ color: index == list.currentIndex ? "#22ffffff" : "transparent"
+ radius: 3
+ Text { color: "white" ; text: name ; anchors.centerIn: parent; font.pixelSize: item.height * 0.5 }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: list.currentIndex = index
+ }
+ }
+ }
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/Effect.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/Effect.qml
new file mode 100755
index 0000000..34eb07c
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/Effect.qml
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import ShaderReader 1.0
+
+ShaderEffect {
+ id: effect
+ property variant source
+ property ListModel parameters: ListModel { }
+ property bool divider: false
+ property real dividerValue: 1.0
+ property real targetWidth: 0
+ property real targetHeight: 0
+ property alias fragmentShaderFilename: shaderFileReader.fragmentShaderFilename
+ property alias vertexShaderFilename: shaderFileReader.vertexShaderFilename
+ //property string fragmentShaderFilename
+ //property string vertexShaderFilename
+
+ QtObject {
+ id: d
+ property string fragmentShaderCommon: "
+ #ifdef GL_ES
+ precision mediump float;
+ #else
+ # define lowp
+ # define mediump
+ # define highp
+ #endif // GL_ES
+ "
+ }
+
+ ShaderFileReader {
+ id: shaderFileReader
+ onFragmentShaderFilenameChanged: {
+ effect.fragmentShader = d.fragmentShaderCommon + shaderFileReader.fragmentShader
+ }
+ onVertexShaderFilenameChanged: {
+ effect.vertexShader = shaderFileReader.vertexShader
+ }
+ }
+
+ // The following is a workaround for the fact that ShaderEffect
+ // doesn't provide a way for shader programs to be read from a file,
+ // rather than being inline in the QML file
+
+ //onFragmentShaderFilenameChanged:
+ // fragmentShader = d.fragmentShaderCommon + shaderFileReader.readFile("qml/QtDemo/demos/shaders/" + fragmentShaderFilename)
+ //onVertexShaderFilenameChanged:
+ // vertexShader = shaderFileReader.readFile("qml/QtDemo/demos/shaders/" + vertexShaderFilename)
+}
+
diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectBillboard.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectBillboard.qml
new file mode 100755
index 0000000..124a2a1
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectBillboard.qml
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Effect {
+ parameters: ListModel {
+ ListElement {
+ name: "grid spacing"
+ value: 0.5
+ }
+ }
+
+ // Transform slider values, and bind result to shader uniforms
+ property real grid: parameters.get(0).value * 10
+
+ property real step_x: 0.0015625
+ property real step_y: targetHeight ? (step_x * targetWidth / targetHeight) : 0.0
+
+ fragmentShaderFilename: "shaders/billboard.fsh"
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectBlackAndWhite.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectBlackAndWhite.qml
new file mode 100755
index 0000000..37a3b6e
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectBlackAndWhite.qml
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Effect {
+ parameters: ListModel {
+ ListElement {
+ name: "threshold"
+ value: 0.5
+ }
+ }
+
+ // Transform slider values, and bind result to shader uniforms
+ property real threshold: parameters.get(0).value
+
+ fragmentShaderFilename: "shaders/blackandwhite.fsh"
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectEmboss.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectEmboss.qml
new file mode 100755
index 0000000..4bf5771
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectEmboss.qml
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Effect {
+ fragmentShaderFilename: "shaders/emboss.fsh"
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectGaussianBlur.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectGaussianBlur.qml
new file mode 100755
index 0000000..e63e17a
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectGaussianBlur.qml
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// Based on http://www.geeks3d.com/20100909/shader-library-gaussian-blur-post-processing-filter-in-glsl/
+
+import QtQuick 2.0
+
+Item {
+ id: root
+ property bool divider: true
+ property real dividerValue: 1
+ property ListModel parameters: ListModel {
+ ListElement {
+ name: "radius"
+ value: 0.5
+ }
+ }
+
+ property alias targetWidth: verticalShader.targetWidth
+ property alias targetHeight: verticalShader.targetHeight
+ property alias source: verticalShader.source
+
+ Effect {
+ id: verticalShader
+ anchors.fill: parent
+ dividerValue: parent.dividerValue
+ property real blurSize: 4.0 * parent.parameters.get(0).value / targetHeight
+ fragmentShaderFilename: "shaders/gaussianblur_v.fsh"
+ }
+
+ Effect {
+ id: horizontalShader
+ anchors.fill: parent
+ dividerValue: parent.dividerValue
+ property real blurSize: 4.0 * parent.parameters.get(0).value / parent.targetWidth
+ fragmentShaderFilename: "shaders/gaussianblur_h.fsh"
+ source: horizontalShaderSource
+
+ ShaderEffectSource {
+ id: horizontalShaderSource
+ sourceItem: verticalShader
+ smooth: true
+ hideSource: true
+ }
+ }
+}
+
diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectGlow.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectGlow.qml
new file mode 100755
index 0000000..d6e987d
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectGlow.qml
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Effect {
+ fragmentShaderFilename: "shaders/glow.fsh"
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectIsolate.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectIsolate.qml
new file mode 100755
index 0000000..2425a25
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectIsolate.qml
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Effect {
+ parameters: ListModel {
+ ListElement {
+ name: "hue"
+ value: 0.5
+ }
+ ListElement {
+ name: "width"
+ value: 0.5
+ }
+ }
+
+ // Transform slider values, and bind result to shader uniforms
+ property real targetHue: parameters.get(0).value * 360
+ property real windowWidth: parameters.get(1).value * 60
+
+ fragmentShaderFilename: "shaders/isolate.fsh"
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectPassThrough.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectPassThrough.qml
new file mode 100755
index 0000000..1f259be
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectPassThrough.qml
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Effect {
+ divider: false
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectPixelate.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectPixelate.qml
new file mode 100755
index 0000000..71f7da9
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectPixelate.qml
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Effect {
+ parameters: ListModel {
+ ListElement {
+ name: "granularity"
+ value: 0.5
+ }
+ }
+
+ // Transform slider values, and bind result to shader uniforms
+ property real granularity: parameters.get(0).value * 20
+
+ fragmentShaderFilename: "shaders/pixelate.fsh"
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectPosterize.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectPosterize.qml
new file mode 100755
index 0000000..0cf16a0
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectPosterize.qml
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Effect {
+ parameters: ListModel {
+ ListElement {
+ name: "gamma"
+ value: 0.5
+ }
+ }
+
+ // Transform slider values, and bind result to shader uniforms
+ property real gamma: parameters.get(0).value
+
+ property real numColors: 8.0
+
+ fragmentShaderFilename: "shaders/posterize.fsh"
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectRipple.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectRipple.qml
new file mode 100755
index 0000000..0b7c48c
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectRipple.qml
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Effect {
+ parameters: ListModel {
+ ListElement {
+ name: "amplitude"
+ value: 0.5
+ }
+ ListElement {
+ name: "frequency"
+ value: 0.5
+ }
+ }
+
+ // Transform slider values, and bind result to shader uniforms
+ property real amplitude: parameters.get(0).value * 0.03
+ property real n: parameters.get(1).value * 7
+
+ property real time: 0
+ NumberAnimation on time { loops: Animation.Infinite; from: 0; to: Math.PI * 2; duration: 600 }
+
+ fragmentShaderFilename: "shaders/ripple.fsh"
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectSepia.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectSepia.qml
new file mode 100755
index 0000000..446e779
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectSepia.qml
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Effect {
+ fragmentShaderFilename: "shaders/sepia.fsh"
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectSharpen.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectSharpen.qml
new file mode 100755
index 0000000..99ece3c
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectSharpen.qml
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Effect {
+ parameters: ListModel {
+ ListElement {
+ name: "sharpness"
+ value: 0.5
+ }
+ }
+
+ // Transform slider values, and bind result to shader uniforms
+ property real amount: parameters.get(0).value * 18
+
+ fragmentShaderFilename: "shaders/sharpen.fsh"
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectShockwave.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectShockwave.qml
new file mode 100755
index 0000000..fe91781
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectShockwave.qml
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Effect {
+ id: root
+ parameters: ListModel {
+ ListElement {
+ name: "amplitude"
+ value: 0.5
+ }
+ }
+
+ // Transform slider values, and bind result to shader uniforms
+ property real granularity: parameters.get(0).value * 20
+ property real weight: parameters.get(0).value
+
+ property real centerX
+ property real centerY
+ property real time
+
+ SequentialAnimation {
+ running: true
+ loops: Animation.Infinite
+ ScriptAction {
+ script: {
+ centerX = Math.random()
+ centerY = Math.random()
+ }
+ }
+ NumberAnimation {
+ target: root
+ property: "time"
+ from: 0
+ to: 1
+ duration: 1000
+ }
+ }
+
+ fragmentShaderFilename: "shaders/shockwave.fsh"
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectSobelEdgeDetection1.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectSobelEdgeDetection1.qml
new file mode 100755
index 0000000..189d5d3
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectSobelEdgeDetection1.qml
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Effect {
+ parameters: ListModel {
+ ListElement {
+ name: "threshold"
+ value: 0.5
+ }
+ }
+
+ // Transform slider values, and bind result to shader uniforms
+ property real mixLevel: parameters.get(0).value
+ property real targetSize: 250 - (200 * mixLevel) // TODO: fix ...
+ property real resS: targetSize
+ property real resT: targetSize
+
+ fragmentShaderFilename: "shaders/sobeledgedetection1.fsh"
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectToon.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectToon.qml
new file mode 100755
index 0000000..08f1849
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectToon.qml
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Effect {
+ parameters: ListModel {
+ ListElement {
+ name: "threshold"
+ value: 0.5
+ }
+ }
+
+ // Transform slider values, and bind result to shader uniforms
+ property real threshold: parameters.get(0).value
+ property real targetSize: 250 - (200 * threshold) // TODO: fix ...
+ property real resS: targetSize
+ property real resT: targetSize
+
+ // TODO
+ property real magTol: 0.3
+ property real quantize: 8.0
+
+ fragmentShaderFilename: "shaders/toon.fsh"
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectVignette.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectVignette.qml
new file mode 100755
index 0000000..1120161
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectVignette.qml
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Effect {
+ fragmentShaderFilename: "shaders/vignette.fsh"
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectWarhol.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectWarhol.qml
new file mode 100755
index 0000000..e96d052
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectWarhol.qml
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Effect {
+ fragmentShaderFilename: "shaders/warhol.fsh"
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectWobble.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectWobble.qml
new file mode 100755
index 0000000..4cccf48
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectWobble.qml
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Effect {
+ parameters: ListModel {
+ ListElement {
+ name: "amplitude"
+ value: 0.5
+ }
+ }
+
+ // Transform slider values, and bind result to shader uniforms
+ property real amplitude: parameters.get(0).value * 0.05
+
+ property real frequency: 20
+ property real time: 0
+
+ NumberAnimation on time { loops: Animation.Infinite; from: 0; to: Math.PI * 2; duration: 600 }
+
+ fragmentShaderFilename: "shaders/wobble.fsh"
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/Logo.qml b/basicsuite/qt5-everywhere/demos/shaders/Logo.qml
new file mode 100644
index 0000000..2e2617a
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/Logo.qml
@@ -0,0 +1,191 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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: root
+
+ property int logoSize: Math.min(parent.height, parent.width) / 2
+ property int logoSizeDivider: 1
+ property int logoState: 1
+ property double posX: parent.width / 2
+ property double posY: parent.height / 2
+ property double rot: 0
+ property double dx: 10
+ property double dy: 10
+ property double drot: 1
+ property string explodeColor: "#ff3333"
+
+ function play() {
+ randomValues();
+ animationTimer.restart()
+ }
+
+ function logoClicked() {
+ switch(root.logoState) {
+ case 1: {
+ parent.createNewLogos(root.posX,root.posY,logoSize,2)
+ parent.decreaseCounter();
+ logo.visible = false;
+ root.logoState = 2;
+ root.explodeColor = "#33ff33"
+ explodeAnimation.restart()
+ break;
+ }
+ default: {
+ // return true if we must destroy this logo
+ if (parent.decreaseCounter(root.posX,root.posY) === true) {
+ logo.visible = false;
+ root.logoState = 2;
+ root.dx = 0;
+ root.dy = 0;
+ root.drot = 0;
+ root.explodeColor = "#ff3333"
+ explodeAnimation.restart()
+ }
+ else { // It was last logo, we will keep it
+ root.logoState = 1
+ root.logoSizeDivider = 1
+ root.explodeColor = "#3333ff"
+ explodeAnimation.restart()
+ }
+ break;
+ }
+ }
+
+ }
+
+ function randomValues() {
+ root.dx = Math.random()*5
+ root.dy = Math.random()*5
+ root.drot = Math.floor(Math.random()*10) - 5
+ }
+
+ function move() {
+ var x = root.posX + root.dx;
+ var y = root.posY + root.dy;
+ var limit = logoSize / logoState;
+
+ // Check x
+ if (x + limit >= parent.width) {
+ x = parent.width - limit;
+ root.dx = -root.dx;
+ }
+ else if (x <= 0) {
+ x = 0;
+ root.dx = -root.dx;
+ }
+
+ // Check y
+ if (y + limit >= parent.height) {
+ y = parent.height - limit;
+ root.dy = -root.dy;
+ }
+ else if (y <= 0) {
+ y = 0;
+ root.dy = -root.dy;
+ }
+
+ root.posX = x
+ root.posY = y
+ root.rot = root.rot + root.drot
+ }
+
+ ParticleSystem{
+ id: particleSystem;
+ anchors.fill: logo
+
+ Emitter {
+ id: emitter
+ anchors.fill: particleSystem
+ enabled: false
+ emitRate: 1000
+ lifeSpan: 500
+ size: logo.height * .5
+ endSize: logo.height * .1
+ velocity: AngleDirection { angleVariation: 360; magnitudeVariation: 160 }
+ }
+
+ ImageParticle {
+ id: smokeParticle
+ source: "images/particle-smoke.png"
+ alpha: 0.3
+ alphaVariation: 0.1
+ color: root.explodeColor
+ }
+ }
+
+ Timer {
+ id: animationTimer
+ interval: 20
+ running: false
+ repeat: true
+ onTriggered: move();
+ }
+
+ Image {
+ id: logo
+ width: (logoSize / logoSizeDivider)
+ height: (logoSize / logoSizeDivider)
+ x: root.posX
+ y: root.posY
+ rotation: root.rot
+ source: "images/qt-logo.png"
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: logoClicked();
+ }
+ }
+
+ SequentialAnimation {
+ id: explodeAnimation
+ running: false
+ ScriptAction { script: emitter.pulse(100); }
+ PauseAnimation { duration: 600 }
+ onRunningChanged: {
+ if (!explodeAnimation.running && root.logoState > 1)
+ root.destroy();
+ }
+ }
+
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/LogoContainer.qml b/basicsuite/qt5-everywhere/demos/shaders/LogoContainer.qml
new file mode 100644
index 0000000..1237305
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/LogoContainer.qml
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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
+ anchors.fill: parent
+
+ property int logoCount: 0
+
+ Image {
+ id: background
+ source: "images/wallpaper.png"
+ anchors.fill: root
+ }
+
+ function createNewLogo(x,y,logoState) {
+ logoCount++;
+ var component = Qt.createComponent("Logo.qml")
+ if (component.status === Component.Ready) {
+ var logo = component.createObject(root, {"posX": x, "posY": y, "logoState": logoState, "logoSizeDivider" : logoState, "objectName": "logo"});
+ logo.play();
+ }
+ }
+
+ function createNewLogos(x, y, logoSize, logoState) {
+ var newSize = logoSize / logoState;
+ var temp = logoSize - newSize;
+
+ createNewLogo(x, y, logoState);
+ createNewLogo(x+temp, y, logoState);
+ createNewLogo(x+temp, y+temp, logoState);
+ createNewLogo(x, y+temp, logoState);
+ createNewLogo(x+logoSize/2-newSize/2, y+logoSize/2-newSize/2, logoState);
+ }
+
+ function decreaseCounter() {
+ if (logoCount > 1) {
+ logoCount--;
+ return true;
+ }
+ return false;
+ }
+
+ Component.onCompleted: {
+ var logoSize = Math.min(root.height, root.width) / 2;
+ createNewLogo(root.width/2 - logoSize/2, root.height/2 - logoSize/2, 1)
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/ParameterPanel.qml b/basicsuite/qt5-everywhere/demos/shaders/ParameterPanel.qml
new file mode 100644
index 0000000..33dd5ea
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/ParameterPanel.qml
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Rectangle {
+ id: root
+ height: view.model.count * sliderHeight
+ color: "#BB333333"
+ property color lineColor: "black"
+ property real spacing: 10
+ property real sliderHeight: 50
+ property bool isMouseAbove: mouseAboveMonitor.containsMouse
+
+ property ListModel model: ListModel { }
+
+ MouseArea {
+ id: mouseAboveMonitor
+ anchors.fill: parent
+ hoverEnabled: true;
+ }
+
+ Component {
+ id: editDelegate
+
+ Item {
+ id: delegate
+ width: root.width
+ height: root.sliderHeight
+
+ Text {
+ id: text
+ text: name
+ color: "white"
+ anchors {
+ top: parent.top
+ bottom: parent.bottom
+ left: parent.left
+ leftMargin: root.width * 0.05
+ }
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ font.pixelSize: delegate.height * 0.3
+ font.capitalization: Font.Capitalize
+ width: root.width * 0.35
+ }
+
+ Slider {
+ anchors {
+ verticalCenter: text.verticalCenter
+ left: text.right
+ leftMargin: root.width * 0.05
+ right: parent.right
+ rightMargin: root.width * 0.05
+ }
+ value: model.value
+ onValueChanged: view.model.setProperty(index, "value", value)
+ }
+ }
+ }
+
+ ListView {
+ id: view
+ anchors.fill: parent
+ model: root.model
+ delegate: editDelegate
+ interactive: false
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/Slider.qml b/basicsuite/qt5-everywhere/demos/shaders/Slider.qml
new file mode 100644
index 0000000..5ceefcc
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/Slider.qml
@@ -0,0 +1,138 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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: slider
+
+ height: handleBack.height
+ // value is read/write.
+ property real value: 0
+ property real maximum: 1
+ property real minimum: 0
+ property int xMax: width - handle.width
+ onXMaxChanged: updatePos()
+ onMinimumChanged: updatePos()
+ onValueChanged: if (!pressed) updatePos()
+ property bool mutable: true
+ property alias pressed : backgroundMouse.pressed
+
+ signal valueChangedByHandle(int newValue)
+
+ function updatePos() {
+ if (maximum > minimum) {
+ var pos = 0 + (value - minimum) * slider.xMax / (maximum - minimum);
+ pos = Math.min(pos, width - handle.width - 0);
+ pos = Math.max(pos, 0);
+ handle.x = pos;
+ } else {
+ handle.x = 0;
+ }
+ }
+
+ Rectangle {
+ id: background
+ width: slider.width
+ anchors.verticalCenter: slider.verticalCenter
+ height: 2
+ color: "#666666"
+
+ MouseArea {
+ id: backgroundMouse
+ anchors.fill: parent
+ anchors.topMargin: -24
+ anchors.bottomMargin: -24
+ enabled: slider.mutable
+ drag.target: handle
+ drag.axis: Drag.XAxis
+ drag.minimumX: 0
+ drag.maximumX: slider.xMax
+ onPressedChanged: {
+ value = Math.max(minimum, Math.min(maximum, (maximum - minimum) * (mouseX - handle.width/2) / slider.xMax + minimum));
+ valueChangedByHandle(value);
+ updatePos();
+ }
+ onPositionChanged: {
+ value = Math.max(minimum, Math.min(maximum, (maximum - minimum) * (mouseX - handle.width/2) / slider.xMax + minimum));
+ valueChangedByHandle(value);
+ }
+ onWheel: {
+ value = Math.max(minimum, Math.min(maximum, value + (wheel.angleDelta.y > 0 ? 1 : -1) * (10 / slider.xMax) * (slider.maximum - slider.minimum)));
+ valueChangedByHandle(value);
+ updatePos();
+ }
+ }
+ }
+
+ Rectangle {
+ id: progress
+ height: 5
+ anchors.verticalCenter: background.verticalCenter
+ anchors.left: background.left
+ anchors.right: handle.right
+ anchors.rightMargin: handle.width / 2
+ visible: slider.enabled
+ color: "#98c66c"
+ }
+
+ Rectangle {
+ id: handleBack
+ width: 40
+ height: width
+ radius: width / 2
+ color: "#8898c66c"
+ antialiasing: true
+ anchors.centerIn: handle
+ visible: handle.visible
+ }
+
+ Rectangle {
+ id: handle
+ width: 14
+ height: width
+ radius: width / 2
+ antialiasing: true
+ color: "#98c66c"
+ anchors.verticalCenter: background.verticalCenter
+ visible: slider.enabled
+ }
+}
+
diff --git a/basicsuite/qt5-everywhere/demos/shaders/images/particle-smoke.png b/basicsuite/qt5-everywhere/demos/shaders/images/particle-smoke.png
new file mode 100644
index 0000000..b27f954
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/images/particle-smoke.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/shaders/images/qt-logo.png b/basicsuite/qt5-everywhere/demos/shaders/images/qt-logo.png
new file mode 100755
index 0000000..242bb28
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/images/qt-logo.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/shaders/images/wallpaper.png b/basicsuite/qt5-everywhere/demos/shaders/images/wallpaper.png
new file mode 100644
index 0000000..a499231
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/images/wallpaper.png
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/shaders/import/import.pro b/basicsuite/qt5-everywhere/demos/shaders/import/import.pro
new file mode 100644
index 0000000..d72fb60
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/import/import.pro
@@ -0,0 +1,13 @@
+CXX_MODULE = qml
+TARGET = shaderreader
+TARGETPATH = ShaderReader
+IMPORT_VERSION = 1.0
+
+QT += quick
+
+SOURCES = main.cpp \
+ shaderfilereader.cpp \
+
+HEADERS = shaderfilereader.h \
+
+load(qml_plugin)
diff --git a/basicsuite/qt5-everywhere/demos/shaders/import/main.cpp b/basicsuite/qt5-everywhere/demos/shaders/import/main.cpp
new file mode 100644
index 0000000..0475ea8
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/import/main.cpp
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: For any questions to Digia, please use the contact form at
+** http://qt.digia.com/
+**
+** This file is part of the examples of the Qt Enterprise Embedded.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 <QtQml/QQmlExtensionPlugin>
+#include <QtQml/QtQml>
+#include "shaderfilereader.h"
+
+QT_BEGIN_NAMESPACE
+
+class SensorExplorerDeclarativeModule : public QQmlExtensionPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface" FILE "plugin.json")
+public:
+ virtual void registerTypes(const char *uri)
+ {
+ Q_ASSERT(QLatin1String(uri) == QLatin1String("ShaderReader"));
+ qmlRegisterType<ShaderFileReader>(uri, 1, 0, "ShaderFileReader");
+ }
+};
+
+QT_END_NAMESPACE
+
+#include "main.moc"
+
diff --git a/basicsuite/qt5-everywhere/demos/shaders/import/plugin.json b/basicsuite/qt5-everywhere/demos/shaders/import/plugin.json
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/import/plugin.json
diff --git a/basicsuite/qt5-everywhere/demos/shaders/import/qmldir b/basicsuite/qt5-everywhere/demos/shaders/import/qmldir
new file mode 100644
index 0000000..0c53031
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/import/qmldir
@@ -0,0 +1,2 @@
+module ShaderReader
+plugin shaderreader
diff --git a/basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.cpp b/basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.cpp
new file mode 100644
index 0000000..1623fb7
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.cpp
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: For any questions to Digia, please use the contact form at
+** http://qt.digia.com/
+**
+** This file is part of the examples of the Qt Enterprise Embedded.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 "shaderfilereader.h"
+#include <QtCore/QFile>
+#include <QtCore/QTextStream>
+#include <QtCore/QDir>
+#include <QtCore/QDebug>
+
+ShaderFileReader::ShaderFileReader(QObject* parent)
+ : QObject(parent)
+{
+ if (qEnvironmentVariableIsEmpty("QT_SHADER_PATH"))
+ setenv("QT_SHADER_PATH", "/data/user/qt/qt5-everywhere/demos/shaders/",1);
+ // check if directory contains shader files
+ QByteArray shaderPath(qgetenv("QT_SHADER_PATH").append("shaders/"));
+ QDir shaderDir(shaderPath);
+ if (shaderDir.entryInfoList(QStringList() << "*.fsh").length() < 1)
+ qWarning() << "ShaderFileReader: can not find shader files in " << shaderPath;
+}
+
+ShaderFileReader::~ShaderFileReader()
+{
+}
+
+void ShaderFileReader::setFragmentShaderFilename(const QString &name)
+{
+ m_fragmentShaderFilename = name;
+ Q_EMIT fragmentShaderFilenameChanged();
+}
+
+void ShaderFileReader::setVertexShaderFilename(const QString &name)
+{
+ m_vertexShaderFilename = name;
+ Q_EMIT vertexShaderFilenameChanged();
+}
+
+QString ShaderFileReader::fragmentShader() const
+{
+ return readShaderFile(m_fragmentShaderFilename);
+}
+
+QString ShaderFileReader::vertexShader() const
+{
+ return readShaderFile(m_vertexShaderFilename);
+}
+
+QString ShaderFileReader::readShaderFile(const QString &fileName) const
+{
+ QString content;
+ QString path = qgetenv("QT_SHADER_PATH");
+ QFile file(path.append(fileName));
+ if (file.open(QIODevice::ReadOnly)) {
+ QTextStream stream(&file);
+ content = stream.readAll();
+ file.close();
+ }
+ return content;
+}
+
diff --git a/basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.h b/basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.h
new file mode 100644
index 0000000..bfa82f7
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: For any questions to Digia, please use the contact form at
+** http://qt.digia.com/
+**
+** This file is part of the examples of the Qt Enterprise Embedded.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR 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 SHADERFILEREADER_H
+#define SHADERFILEREADER_H
+
+#include <QtCore/QObject>
+#include <QtCore/QString>
+
+class ShaderFileReader : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString fragmentShaderFilename READ fragmentShaderFilename
+ WRITE setFragmentShaderFilename NOTIFY fragmentShaderFilenameChanged)
+ Q_PROPERTY(QString vertexShaderFilename READ vertexShaderFilename
+ WRITE setVertexShaderFilename NOTIFY vertexShaderFilenameChanged)
+
+ Q_PROPERTY(QString fragmentShader READ fragmentShader)
+ Q_PROPERTY(QString vertexShader READ vertexShader)
+
+public:
+ ShaderFileReader(QObject* parent = 0);
+ ~ShaderFileReader();
+
+ void setFragmentShaderFilename(const QString &name);
+ void setVertexShaderFilename(const QString &name);
+ QString fragmentShaderFilename() const { return m_fragmentShaderFilename; }
+ QString vertexShaderFilename() const { return m_vertexShaderFilename; }
+
+ QString fragmentShader() const;
+ QString vertexShader() const;
+
+protected:
+ QString readShaderFile(const QString &fileName) const;
+
+Q_SIGNALS:
+ void fragmentShaderFilenameChanged();
+ void vertexShaderFilenameChanged();
+
+private:
+ QString m_fragmentShaderFilename;
+ QString m_vertexShaderFilename;
+};
+
+Q_DECLARE_METATYPE(ShaderFileReader*)
+
+#endif // SHADERFILEREADER_H
diff --git a/basicsuite/qt5-everywhere/demos/shaders/main.qml b/basicsuite/qt5-everywhere/demos/shaders/main.qml
new file mode 100755
index 0000000..c5f5d4c
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/main.qml
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Rectangle {
+ id: applicationWindow
+ anchors.fill:parent
+ color: "black"
+ property int margin: applicationWindow.height * 0.02
+
+ Content {
+ id: content
+ anchors.fill: parent
+ }
+
+ Rectangle {
+ id: fx
+ anchors.right: applicationWindow.right
+ anchors.bottom: applicationWindow.bottom
+ anchors.margins: applicationWindow.margin
+ width: applicationWindow.width * 0.25
+ height: applicationWindow.height * 0.08
+ color: "#333333"
+ border.color: "#777777"
+ opacity: 0.5
+
+ Text {
+ anchors.centerIn: fx
+ color: "#ffffff"
+ text: effectSelectionPanel.effectName
+ font.pixelSize: fx.height * 0.5
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onPressed: fx.color = "#555555"
+ onReleased: fx.color = "#333333"
+ onClicked: effectSelectionPanel.visible = !effectSelectionPanel.visible;
+ }
+ }
+
+ ParameterPanel {
+ id: parameterPanel
+ opacity: 0.7
+ visible: effectSelectionPanel.visible && model.count !== 0
+ width: applicationWindow.width * 0.4
+ sliderHeight: applicationWindow.height * 0.15
+ anchors {
+ bottom: effectSelectionPanel.bottom
+ right: effectSelectionPanel.left
+ }
+ }
+
+ EffectSelectionPanel {
+ id: effectSelectionPanel
+ visible: false
+ opacity: 0.7
+ anchors {
+ top: applicationWindow.top
+ right: applicationWindow.right
+ margins: applicationWindow.margin
+ }
+ width: fx.width
+ height: applicationWindow.height - fx.height - 2*applicationWindow.margin
+ itemHeight: fx.height
+ color: fx.color
+
+ onClicked: {
+ content.effectSource = effectSource
+ parameterPanel.model = content.effect.parameters
+ }
+ }
+
+ Component.onCompleted: {
+ content.init()
+ }
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/shaders.pro b/basicsuite/qt5-everywhere/demos/shaders/shaders.pro
new file mode 100644
index 0000000..de580fd
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/shaders.pro
@@ -0,0 +1,3 @@
+TEMPLATE = subdirs
+SUBDIRS += \
+ import \
diff --git a/basicsuite/qt5-everywhere/demos/shaders/shaders/billboard.fsh b/basicsuite/qt5-everywhere/demos/shaders/shaders/billboard.fsh
new file mode 100755
index 0000000..baa9554
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/shaders/billboard.fsh
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html
+
+uniform float grid;
+uniform float dividerValue;
+uniform float step_x;
+uniform float step_y;
+
+uniform sampler2D source;
+uniform lowp float qt_Opacity;
+varying vec2 qt_TexCoord0;
+
+void main()
+{
+ vec2 uv = qt_TexCoord0.xy;
+ float offx = floor(uv.x / (grid * step_x));
+ float offy = floor(uv.y / (grid * step_y));
+ vec3 res = texture2D(source, vec2(offx * grid * step_x , offy * grid * step_y)).rgb;
+ vec2 prc = fract(uv / vec2(grid * step_x, grid * step_y));
+ vec2 pw = pow(abs(prc - 0.5), vec2(2.0));
+ float rs = pow(0.45, 2.0);
+ float gr = smoothstep(rs - 0.1, rs + 0.1, pw.x + pw.y);
+ float y = (res.r + res.g + res.b) / 3.0;
+ vec3 ra = res / y;
+ float ls = 0.3;
+ float lb = ceil(y / ls);
+ float lf = ls * lb + 0.3;
+ res = lf * res;
+ vec3 col = mix(res, vec3(0.1, 0.1, 0.1), gr);
+ if (uv.x < dividerValue)
+ gl_FragColor = qt_Opacity * vec4(col, 1.0);
+ else
+ gl_FragColor = qt_Opacity * texture2D(source, uv);
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/shaders/blackandwhite.fsh b/basicsuite/qt5-everywhere/demos/shaders/shaders/blackandwhite.fsh
new file mode 100755
index 0000000..40756c4
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/shaders/blackandwhite.fsh
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html
+
+uniform float threshold;
+uniform float dividerValue;
+
+uniform sampler2D source;
+uniform lowp float qt_Opacity;
+varying vec2 qt_TexCoord0;
+
+void main()
+{
+ vec2 uv = qt_TexCoord0.xy;
+ vec4 orig = texture2D(source, uv);
+ vec3 col = orig.rgb;
+ float y = 0.3 *col.r + 0.59 * col.g + 0.11 * col.b;
+ y = y < threshold ? 0.0 : 1.0;
+ if (uv.x < dividerValue)
+ gl_FragColor = qt_Opacity * vec4(y, y, y, 1.0);
+ else
+ gl_FragColor = qt_Opacity * orig;
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/shaders/emboss.fsh b/basicsuite/qt5-everywhere/demos/shaders/shaders/emboss.fsh
new file mode 100755
index 0000000..bd13a0b
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/shaders/emboss.fsh
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html
+
+uniform float dividerValue;
+const float step_w = 0.0015625;
+const float step_h = 0.0027778;
+
+uniform sampler2D source;
+uniform lowp float qt_Opacity;
+varying vec2 qt_TexCoord0;
+
+void main()
+{
+ vec2 uv = qt_TexCoord0.xy;
+ vec3 t1 = texture2D(source, vec2(uv.x - step_w, uv.y - step_h)).rgb;
+ vec3 t2 = texture2D(source, vec2(uv.x, uv.y - step_h)).rgb;
+ vec3 t3 = texture2D(source, vec2(uv.x + step_w, uv.y - step_h)).rgb;
+ vec3 t4 = texture2D(source, vec2(uv.x - step_w, uv.y)).rgb;
+ vec3 t5 = texture2D(source, uv).rgb;
+ vec3 t6 = texture2D(source, vec2(uv.x + step_w, uv.y)).rgb;
+ vec3 t7 = texture2D(source, vec2(uv.x - step_w, uv.y + step_h)).rgb;
+ vec3 t8 = texture2D(source, vec2(uv.x, uv.y + step_h)).rgb;
+ vec3 t9 = texture2D(source, vec2(uv.x + step_w, uv.y + step_h)).rgb;
+ vec3 rr = -4.0 * t1 - 4.0 * t2 - 4.0 * t4 + 12.0 * t5;
+ float y = (rr.r + rr.g + rr.b) / 3.0;
+ vec3 col = vec3(y, y, y) + 0.3;
+ if (uv.x < dividerValue)
+ gl_FragColor = qt_Opacity * vec4(col, 1.0);
+ else
+ gl_FragColor = qt_Opacity * texture2D(source, uv);
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/shaders/gaussianblur_h.fsh b/basicsuite/qt5-everywhere/demos/shaders/shaders/gaussianblur_h.fsh
new file mode 100755
index 0000000..96ae8e4
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/shaders/gaussianblur_h.fsh
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+uniform float dividerValue;
+uniform float blurSize;
+
+uniform sampler2D source;
+uniform lowp float qt_Opacity;
+varying vec2 qt_TexCoord0;
+
+void main()
+{
+ vec2 uv = qt_TexCoord0.xy;
+ vec4 c = vec4(0.0);
+ if (uv.x < dividerValue) {
+ c += texture2D(source, uv - vec2(4.0*blurSize, 0.0)) * 0.05;
+ c += texture2D(source, uv - vec2(3.0*blurSize, 0.0)) * 0.09;
+ c += texture2D(source, uv - vec2(2.0*blurSize, 0.0)) * 0.12;
+ c += texture2D(source, uv - vec2(1.0*blurSize, 0.0)) * 0.15;
+ c += texture2D(source, uv) * 0.18;
+ c += texture2D(source, uv + vec2(1.0*blurSize, 0.0)) * 0.15;
+ c += texture2D(source, uv + vec2(2.0*blurSize, 0.0)) * 0.12;
+ c += texture2D(source, uv + vec2(3.0*blurSize, 0.0)) * 0.09;
+ c += texture2D(source, uv + vec2(4.0*blurSize, 0.0)) * 0.05;
+ } else {
+ c = texture2D(source, qt_TexCoord0);
+ }
+ gl_FragColor = qt_Opacity * c;
+}
diff --git a/basicsuite/qt5-everywhere/demos/shaders/shaders/gaussianblur_v.fsh b/basicsuite/qt5-everywhere/demos/shaders/shaders/gaussianblur_v.fsh
new file mode 100755
index 0000000..6bc7b8b
--- /dev/null
+++ b/basicsuite/qt5-everywhere/demos/shaders/shaders/gaussianblur_v.fsh
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+**