aboutsummaryrefslogtreecommitdiffstats
path: root/examples/demos
diff options
context:
space:
mode:
Diffstat (limited to 'examples/demos')
-rw-r--r--examples/demos/calqlatr/calqlatr.pro11
-rw-r--r--examples/demos/calqlatr/calqlatr.qml110
-rw-r--r--examples/demos/calqlatr/calqlatr.qmlproject16
-rw-r--r--examples/demos/calqlatr/content/Button.qml80
-rw-r--r--examples/demos/calqlatr/content/Display.qml124
-rw-r--r--examples/demos/calqlatr/content/NumberPad.qml69
-rw-r--r--examples/demos/calqlatr/content/StyleLabel.qml50
-rw-r--r--examples/demos/calqlatr/content/audio/touch.wavbin950 -> 0 bytes
-rw-r--r--examples/demos/calqlatr/content/calculator.js143
-rw-r--r--examples/demos/calqlatr/content/images/icon-back.pngbin328 -> 0 bytes
-rw-r--r--examples/demos/calqlatr/content/images/icon-close.pngbin488 -> 0 bytes
-rw-r--r--examples/demos/calqlatr/content/images/icon-settings.pngbin503 -> 0 bytes
-rw-r--r--examples/demos/calqlatr/content/images/logo.pngbin5950 -> 0 bytes
-rw-r--r--examples/demos/calqlatr/content/images/paper-edge-left.pngbin12401 -> 0 bytes
-rw-r--r--examples/demos/calqlatr/content/images/paper-edge-right.pngbin12967 -> 0 bytes
-rw-r--r--examples/demos/calqlatr/content/images/paper-grip.pngbin298 -> 0 bytes
-rw-r--r--examples/demos/calqlatr/content/images/settings-selected-a.pngbin2326 -> 0 bytes
-rw-r--r--examples/demos/calqlatr/content/images/settings-selected-b.pngbin2334 -> 0 bytes
-rw-r--r--examples/demos/calqlatr/content/images/touch-green.pngbin4808 -> 0 bytes
-rw-r--r--examples/demos/calqlatr/content/images/touch-white.pngbin4601 -> 0 bytes
-rw-r--r--examples/demos/calqlatr/doc/images/qml-calqlatr-demo-small.pngbin37120 -> 0 bytes
-rw-r--r--examples/demos/calqlatr/doc/src/calqlatr.qdoc39
-rw-r--r--examples/demos/calqlatr/main.cpp41
-rw-r--r--examples/demos/clocks/clocks.qml88
-rw-r--r--examples/demos/clocks/content/Clock.qml140
-rw-r--r--examples/demos/clocks/content/arrow.pngbin692 -> 0 bytes
-rw-r--r--examples/demos/clocks/content/background.pngbin46895 -> 0 bytes
-rw-r--r--examples/demos/clocks/content/center.pngbin765 -> 0 bytes
-rw-r--r--examples/demos/clocks/content/clock-night.pngbin23359 -> 0 bytes
-rw-r--r--examples/demos/clocks/content/clock.pngbin20653 -> 0 bytes
-rw-r--r--examples/demos/clocks/content/hour.pngbin625 -> 0 bytes
-rw-r--r--examples/demos/clocks/content/minute.pngbin625 -> 0 bytes
-rw-r--r--examples/demos/clocks/content/quit.pngbin583 -> 0 bytes
-rw-r--r--examples/demos/clocks/content/second.pngbin303 -> 0 bytes
-rw-r--r--examples/demos/demos.pro11
-rw-r--r--examples/demos/maroon/content/BuildButton.qml90
-rw-r--r--examples/demos/maroon/content/GameCanvas.qml240
-rw-r--r--examples/demos/maroon/content/GameOverScreen.qml115
-rw-r--r--examples/demos/maroon/content/InfoBar.qml84
-rw-r--r--examples/demos/maroon/content/NewGameScreen.qml111
-rw-r--r--examples/demos/maroon/content/SoundEffect.qml53
-rw-r--r--examples/demos/maroon/content/audio/bomb-action.wavbin20972 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/audio/catch-action.wavbin13274 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/audio/catch.wavbin8638 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/audio/currency.wavbin15790 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/audio/factory-action.wavbin4936 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/audio/melee-action.wavbin17798 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/audio/projectile-action.wavbin2562 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/audio/shooter-action.wavbin27554 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/background.pngbin5802 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/bomb-action.pngbin23974 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/bomb-idle.pngbin12238 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/bomb.pngbin4067 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/button-help.pngbin8916 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/button-play.pngbin13945 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/catch-action.pngbin6760 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/catch.pngbin4771 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/cloud.pngbin3398 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/currency.pngbin1889 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/dialog-bomb.pngbin3751 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/dialog-factory.pngbin3946 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/dialog-melee.pngbin4392 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/dialog-pointer.pngbin911 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/dialog-shooter.pngbin3737 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/dialog.pngbin3362 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/factory-action.pngbin22440 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/factory-idle.pngbin12729 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/factory.pngbin4138 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/grid.pngbin2830 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/help.pngbin38255 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/lifes.pngbin1675 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/logo-bubble.pngbin7706 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/logo-fish.pngbin3477 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/logo.pngbin18332 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/melee-action.pngbin7797 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/melee-idle.pngbin22832 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/melee.pngbin4046 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/mob-idle.pngbin6181 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/mob.pngbin2391 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/points.pngbin1561 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/projectile-action.pngbin6257 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/projectile.pngbin801 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/scores.pngbin1535 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/shooter-action.pngbin18121 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/shooter-idle.pngbin11929 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/shooter.pngbin4137 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/sunlight.pngbin248412 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/text-1.pngbin2777 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/text-2.pngbin4959 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/text-3.pngbin5063 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/text-blank.pngbin1326 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/text-gameover.pngbin1515 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/text-go.pngbin4230 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/gfx/wave.pngbin2763 -> 0 bytes
-rw-r--r--examples/demos/maroon/content/logic.js264
-rw-r--r--examples/demos/maroon/content/mobs/MobBase.qml262
-rw-r--r--examples/demos/maroon/content/towers/Bomb.qml133
-rw-r--r--examples/demos/maroon/content/towers/Factory.qml114
-rw-r--r--examples/demos/maroon/content/towers/Melee.qml83
-rw-r--r--examples/demos/maroon/content/towers/Ranged.qml128
-rw-r--r--examples/demos/maroon/content/towers/TowerBase.qml72
-rw-r--r--examples/demos/maroon/main.cpp41
-rw-r--r--examples/demos/maroon/maroon.pro11
-rw-r--r--examples/demos/maroon/maroon.qml233
-rw-r--r--examples/demos/maroon/maroon.qmlproject16
-rw-r--r--examples/demos/photoviewer/PhotoViewerCore/AlbumDelegate.qml147
-rw-r--r--examples/demos/photoviewer/PhotoViewerCore/BusyIndicator.qml50
-rw-r--r--examples/demos/photoviewer/PhotoViewerCore/Button.qml72
-rw-r--r--examples/demos/photoviewer/PhotoViewerCore/EditableButton.qml85
-rw-r--r--examples/demos/photoviewer/PhotoViewerCore/PhotoDelegate.qml189
-rw-r--r--examples/demos/photoviewer/PhotoViewerCore/ProgressBar.qml57
-rw-r--r--examples/demos/photoviewer/PhotoViewerCore/RssModel.qml57
-rw-r--r--examples/demos/photoviewer/PhotoViewerCore/Tag.qml91
-rw-r--r--examples/demos/photoviewer/PhotoViewerCore/images/box-shadow.pngbin588 -> 0 bytes
-rw-r--r--examples/demos/photoviewer/PhotoViewerCore/images/busy.pngbin2629 -> 0 bytes
-rw-r--r--examples/demos/photoviewer/PhotoViewerCore/images/cardboard.pngbin8844 -> 0 bytes
-rw-r--r--examples/demos/photoviewer/PhotoViewerCore/qmldir8
-rw-r--r--examples/demos/photoviewer/PhotoViewerCore/script/script.js27
-rw-r--r--examples/demos/photoviewer/i18n/base.ts30
-rw-r--r--examples/demos/photoviewer/i18n/qml_fr.qmbin268 -> 0 bytes
-rw-r--r--examples/demos/photoviewer/i18n/qml_fr.ts30
-rw-r--r--examples/demos/photoviewer/photoviewer.qml110
-rw-r--r--examples/demos/photoviewer/photoviewer.qmlproject20
-rw-r--r--examples/demos/rssnews/content/BusyIndicator.qml53
-rw-r--r--examples/demos/rssnews/content/CategoryDelegate.qml82
-rw-r--r--examples/demos/rssnews/content/NewsDelegate.qml71
-rw-r--r--examples/demos/rssnews/content/RssFeeds.qml59
-rw-r--r--examples/demos/rssnews/content/ScrollBar.qml107
-rw-r--r--examples/demos/rssnews/content/images/busy.pngbin2629 -> 0 bytes
-rw-r--r--examples/demos/rssnews/content/images/scrollbar.pngbin161 -> 0 bytes
-rw-r--r--examples/demos/rssnews/rssnews.qml112
-rw-r--r--examples/demos/rssnews/rssnews.qmlproject16
-rw-r--r--examples/demos/samegame/content/Block.qml114
-rw-r--r--examples/demos/samegame/content/BlockEmitter.qml57
-rw-r--r--examples/demos/samegame/content/Button.qml70
-rw-r--r--examples/demos/samegame/content/GameArea.qml226
-rw-r--r--examples/demos/samegame/content/LogoAnimation.qml102
-rw-r--r--examples/demos/samegame/content/MenuEmitter.qml53
-rw-r--r--examples/demos/samegame/content/PaintEmitter.qml98
-rw-r--r--examples/demos/samegame/content/PrimaryPack.qml122
-rw-r--r--examples/demos/samegame/content/PuzzleBlock.qml111
-rw-r--r--examples/demos/samegame/content/SamegameText.qml49
-rw-r--r--examples/demos/samegame/content/SimpleBlock.qml108
-rw-r--r--examples/demos/samegame/content/SmokeText.qml83
-rw-r--r--examples/demos/samegame/content/gfx/background-puzzle.pngbin86666 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/background.pngbin101018 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/bar.pngbin10970 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/blue-puzzle.pngbin2219 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/blue.pngbin1018 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/bubble-highscore.pngbin2276 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/bubble-puzzle.pngbin2811 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/but-game-1.pngbin2728 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/but-game-2.pngbin3378 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/but-game-3.pngbin1423 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/but-game-4.pngbin2096 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/but-game-new.pngbin3662 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/but-menu.pngbin2391 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/but-puzzle-next.pngbin3658 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/but-quit.pngbin2100 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/green-puzzle.pngbin2271 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/green.pngbin1024 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/icon-fail.pngbin6549 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/icon-ok.pngbin7190 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/icon-time.pngbin1159 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/logo-a.pngbin1814 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/logo-e.pngbin1725 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/logo-g.pngbin1765 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/logo-m.pngbin1743 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/logo-s.pngbin1791 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/logo.pngbin3608 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/particle-brick.pngbin861 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/particle-paint.pngbin714 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/particle-smoke.pngbin5409 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/red-puzzle.pngbin2218 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/red.pngbin1018 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/text-highscore-new.pngbin6767 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/text-highscore.pngbin3179 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/text-no-winner.pngbin6321 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/text-p1-go.pngbin5395 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/text-p1-won.pngbin5618 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/text-p1.pngbin1751 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/text-p2-go.pngbin5874 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/text-p2-won.pngbin6177 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/text-p2.pngbin2381 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/yellow-puzzle.pngbin2239 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/gfx/yellow.pngbin1008 -> 0 bytes
-rw-r--r--examples/demos/samegame/content/levels/TemplateBase.qml70
-rw-r--r--examples/demos/samegame/content/levels/level0.qml59
-rw-r--r--examples/demos/samegame/content/levels/level1.qml59
-rw-r--r--examples/demos/samegame/content/levels/level2.qml61
-rw-r--r--examples/demos/samegame/content/levels/level3.qml60
-rw-r--r--examples/demos/samegame/content/levels/level4.qml58
-rw-r--r--examples/demos/samegame/content/levels/level5.qml59
-rw-r--r--examples/demos/samegame/content/levels/level6.qml60
-rw-r--r--examples/demos/samegame/content/levels/level7.qml58
-rw-r--r--examples/demos/samegame/content/levels/level8.qml59
-rw-r--r--examples/demos/samegame/content/levels/level9.qml62
-rwxr-xr-xexamples/demos/samegame/content/samegame.js581
-rw-r--r--examples/demos/samegame/main.cpp41
-rw-r--r--examples/demos/samegame/samegame.pro11
-rw-r--r--examples/demos/samegame/samegame.qml371
-rw-r--r--examples/demos/samegame/samegame.qmlproject16
-rw-r--r--examples/demos/samegame/settings.js56
-rw-r--r--examples/demos/stocqt/content/Button.qml59
-rw-r--r--examples/demos/stocqt/content/DatePicker.qml122
-rw-r--r--examples/demos/stocqt/content/StockChart.qml324
-rw-r--r--examples/demos/stocqt/content/StockListModel.qml147
-rw-r--r--examples/demos/stocqt/content/StockListView.qml87
-rw-r--r--examples/demos/stocqt/content/StockModel.qml160
-rw-r--r--examples/demos/stocqt/content/StockSettings.qml317
-rw-r--r--examples/demos/stocqt/content/StockView.qml129
-rw-r--r--examples/demos/stocqt/content/images/icon-calendar-anim.pngbin1088 -> 0 bytes
-rw-r--r--examples/demos/stocqt/content/images/icon-calendar.pngbin884 -> 0 bytes
-rw-r--r--examples/demos/stocqt/content/images/icon-items.pngbin887 -> 0 bytes
-rw-r--r--examples/demos/stocqt/content/images/icon-settings.pngbin1066 -> 0 bytes
-rw-r--r--examples/demos/stocqt/content/images/logo.pngbin4266 -> 0 bytes
-rw-r--r--examples/demos/stocqt/content/images/stock-selected.pngbin6480 -> 0 bytes
-rw-r--r--examples/demos/stocqt/content/images/wheel-touch.pngbin4767 -> 0 bytes
-rw-r--r--examples/demos/stocqt/content/images/wheel.pngbin36223 -> 0 bytes
-rw-r--r--examples/demos/stocqt/main.cpp41
-rw-r--r--examples/demos/stocqt/stocqt.pro11
-rw-r--r--examples/demos/stocqt/stocqt.qml101
-rw-r--r--examples/demos/stocqt/stocqt.qmlproject16
-rw-r--r--examples/demos/tweetsearch/content/FlipBar.qml173
-rw-r--r--examples/demos/tweetsearch/content/LineInput.qml98
-rw-r--r--examples/demos/tweetsearch/content/ListFooter.qml154
-rw-r--r--examples/demos/tweetsearch/content/ListHeader.qml81
-rw-r--r--examples/demos/tweetsearch/content/SearchDelegate.qml121
-rw-r--r--examples/demos/tweetsearch/content/TweetDelegate.qml189
-rw-r--r--examples/demos/tweetsearch/content/TweetsModel.qml91
-rw-r--r--examples/demos/tweetsearch/content/resources/anonymous.pngbin1788 -> 0 bytes
-rw-r--r--examples/demos/tweetsearch/content/resources/bird-anim-sprites.pngbin11079 -> 0 bytes
-rw-r--r--examples/demos/tweetsearch/content/resources/icon-clear.pngbin1166 -> 0 bytes
-rw-r--r--examples/demos/tweetsearch/content/resources/icon-loading.pngbin1542 -> 0 bytes
-rw-r--r--examples/demos/tweetsearch/content/resources/icon-refresh.pngbin1202 -> 0 bytes
-rw-r--r--examples/demos/tweetsearch/content/resources/icon-search.pngbin1284 -> 0 bytes
-rw-r--r--examples/demos/tweetsearch/content/tweetsearch.js19
-rw-r--r--examples/demos/tweetsearch/main.cpp41
-rw-r--r--examples/demos/tweetsearch/tweetsearch.pro11
-rw-r--r--examples/demos/tweetsearch/tweetsearch.qml130
-rw-r--r--examples/demos/tweetsearch/tweetsearch.qmlproject16
241 files changed, 0 insertions, 10017 deletions
diff --git a/examples/demos/calqlatr/calqlatr.pro b/examples/demos/calqlatr/calqlatr.pro
deleted file mode 100644
index 6a147f4ce6..0000000000
--- a/examples/demos/calqlatr/calqlatr.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-TEMPLATE = app
-
-QT += qml quick
-SOURCES += main.cpp
-
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/calqlatr
-qml.files = calqlatr.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/calqlatr
-sources.files = $$SOURCES calqlatr.pro
-sources.path = $$qml.path
-INSTALLS += target sources qml
diff --git a/examples/demos/calqlatr/calqlatr.qml b/examples/demos/calqlatr/calqlatr.qml
deleted file mode 100644
index 7640fbd738..0000000000
--- a/examples/demos/calqlatr/calqlatr.qml
+++ /dev/null
@@ -1,110 +0,0 @@
-/****************************************************************************
-**
-** 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
- width: 320
- height: 480
- focus: true
- color: "#272822"
-
- onWidthChanged: controller.reload()
-
- function operatorPressed(operator) { CalcEngine.operatorPressed(operator) }
- function digitPressed(digit) { CalcEngine.digitPressed(digit) }
-
- Item {
- id: pad
- width: window.width * 0.58
- NumberPad { y: 10; 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/examples/demos/calqlatr/calqlatr.qmlproject b/examples/demos/calqlatr/calqlatr.qmlproject
deleted file mode 100644
index ce2d59d310..0000000000
--- a/examples/demos/calqlatr/calqlatr.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "calqlatr.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/demos/calqlatr/content/Button.qml b/examples/demos/calqlatr/content/Button.qml
deleted file mode 100644
index c355c2d105..0000000000
--- a/examples/demos/calqlatr/content/Button.qml
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
-**
-** 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: 30
- height: 50
-
- Text {
- id: textItem
- font.pixelSize: 48
- wrapMode: Text.WordWrap
- lineHeight: 0.75
- color: "white"
- }
-
-// Rectangle {
-// color: "red"
-// opacity: 0.2
-// anchors.fill: mouse
-// }
-
- MouseArea {
- id: mouse
- anchors.fill: parent
- anchors.margins: -5
- onClicked: {
- //parent.clicked()
- if (operator)
- window.operatorPressed(parent.text)
- else
- window.digitPressed(parent.text)
- }
- }
-}
diff --git a/examples/demos/calqlatr/content/Display.qml b/examples/demos/calqlatr/content/Display.qml
deleted file mode 100644
index 3c1d9c0cd5..0000000000
--- a/examples/demos/calqlatr/content/Display.qml
+++ /dev/null
@@ -1,124 +0,0 @@
-/****************************************************************************
-**
-** 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 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/examples/demos/calqlatr/content/NumberPad.qml b/examples/demos/calqlatr/content/NumberPad.qml
deleted file mode 100644
index 853c7631c9..0000000000
--- a/examples/demos/calqlatr/content/NumberPad.qml
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** 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: 32
- rowSpacing: 16
-
- 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/examples/demos/calqlatr/content/StyleLabel.qml b/examples/demos/calqlatr/content/StyleLabel.qml
deleted file mode 100644
index 3bdea86129..0000000000
--- a/examples/demos/calqlatr/content/StyleLabel.qml
+++ /dev/null
@@ -1,50 +0,0 @@
-/****************************************************************************
-**
-** 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/examples/demos/calqlatr/content/audio/touch.wav b/examples/demos/calqlatr/content/audio/touch.wav
deleted file mode 100644
index 94cccb7546..0000000000
--- a/examples/demos/calqlatr/content/audio/touch.wav
+++ /dev/null
Binary files differ
diff --git a/examples/demos/calqlatr/content/calculator.js b/examples/demos/calqlatr/content/calculator.js
deleted file mode 100644
index 843ef39c02..0000000000
--- a/examples/demos/calqlatr/content/calculator.js
+++ /dev/null
@@ -1,143 +0,0 @@
-/****************************************************************************
-**
-** 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 (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") {
- digits = "0"
- } else if (op == "AC") {
- curVal = 0
- memory = 0
- lastOp = ""
- digits ="0"
- }
-
-
-}
-
diff --git a/examples/demos/calqlatr/content/images/icon-back.png b/examples/demos/calqlatr/content/images/icon-back.png
deleted file mode 100644
index 2989ee2e35..0000000000
--- a/examples/demos/calqlatr/content/images/icon-back.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/calqlatr/content/images/icon-close.png b/examples/demos/calqlatr/content/images/icon-close.png
deleted file mode 100644
index 3e21248232..0000000000
--- a/examples/demos/calqlatr/content/images/icon-close.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/calqlatr/content/images/icon-settings.png b/examples/demos/calqlatr/content/images/icon-settings.png
deleted file mode 100644
index 98e662f53f..0000000000
--- a/examples/demos/calqlatr/content/images/icon-settings.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/calqlatr/content/images/logo.png b/examples/demos/calqlatr/content/images/logo.png
deleted file mode 100644
index 6bc65610bc..0000000000
--- a/examples/demos/calqlatr/content/images/logo.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/calqlatr/content/images/paper-edge-left.png b/examples/demos/calqlatr/content/images/paper-edge-left.png
deleted file mode 100644
index ca29a3ae10..0000000000
--- a/examples/demos/calqlatr/content/images/paper-edge-left.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/calqlatr/content/images/paper-edge-right.png b/examples/demos/calqlatr/content/images/paper-edge-right.png
deleted file mode 100644
index 7c2da7b930..0000000000
--- a/examples/demos/calqlatr/content/images/paper-edge-right.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/calqlatr/content/images/paper-grip.png b/examples/demos/calqlatr/content/images/paper-grip.png
deleted file mode 100644
index 953c408bca..0000000000
--- a/examples/demos/calqlatr/content/images/paper-grip.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/calqlatr/content/images/settings-selected-a.png b/examples/demos/calqlatr/content/images/settings-selected-a.png
deleted file mode 100644
index e08ddface8..0000000000
--- a/examples/demos/calqlatr/content/images/settings-selected-a.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/calqlatr/content/images/settings-selected-b.png b/examples/demos/calqlatr/content/images/settings-selected-b.png
deleted file mode 100644
index d9aa7e3431..0000000000
--- a/examples/demos/calqlatr/content/images/settings-selected-b.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/calqlatr/content/images/touch-green.png b/examples/demos/calqlatr/content/images/touch-green.png
deleted file mode 100644
index 64dbde66b1..0000000000
--- a/examples/demos/calqlatr/content/images/touch-green.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/calqlatr/content/images/touch-white.png b/examples/demos/calqlatr/content/images/touch-white.png
deleted file mode 100644
index bb02b000cf..0000000000
--- a/examples/demos/calqlatr/content/images/touch-white.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/calqlatr/doc/images/qml-calqlatr-demo-small.png b/examples/demos/calqlatr/doc/images/qml-calqlatr-demo-small.png
deleted file mode 100644
index af67f63dd1..0000000000
--- a/examples/demos/calqlatr/doc/images/qml-calqlatr-demo-small.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/calqlatr/doc/src/calqlatr.qdoc b/examples/demos/calqlatr/doc/src/calqlatr.qdoc
deleted file mode 100644
index 366f01ea2c..0000000000
--- a/examples/demos/calqlatr/doc/src/calqlatr.qdoc
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and 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 Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \title QML Demo - Calqlatr
- \example demos/calqlatr
- \brief This is an example calculator written in QML.
- \image qml-calqlatr-demo-small.png
- \ingroup qmldemos
-
- This demo implements a simple calculator app, designed for portrait devices.
-
- This app has the logic implemented in Javascipt and the appearance implemented in QML.
-*/
-
diff --git a/examples/demos/calqlatr/main.cpp b/examples/demos/calqlatr/main.cpp
deleted file mode 100644
index 9000bfc7d7..0000000000
--- a/examples/demos/calqlatr/main.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(calqlatr)
diff --git a/examples/demos/clocks/clocks.qml b/examples/demos/clocks/clocks.qml
deleted file mode 100644
index 020fe32908..0000000000
--- a/examples/demos/clocks/clocks.qml
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************************
-**
-** 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"
-
-Rectangle {
- id: root
- width: 640; height: 320
- color: "#646464"
-
- ListView {
- id: clockview
- anchors.fill: parent
- orientation: ListView.Horizontal
- cacheBuffer: 2000
- snapMode: ListView.SnapOneItem
- highlightRangeMode: ListView.ApplyRange
-
- delegate: Clock { city: cityName; shift: timeShift }
- model: ListModel {
- ListElement { cityName: "New York"; timeShift: -4 }
- ListElement { cityName: "London"; timeShift: 0 }
- ListElement { cityName: "Oslo"; timeShift: 1 }
- ListElement { cityName: "Mumbai"; timeShift: 5.5 }
- ListElement { cityName: "Tokyo"; timeShift: 9 }
- ListElement { cityName: "Brisbane"; timeShift: 10 }
- ListElement { cityName: "Los Angeles"; timeShift: -8 }
- }
- }
-
- Image {
- anchors.left: parent.left
- anchors.bottom: parent.bottom
- anchors.margins: 10
- source: "content/arrow.png"
- rotation: -90
- opacity: clockview.atXBeginning ? 0 : 0.5
- Behavior on opacity { NumberAnimation { duration: 500 } }
- }
-
- Image {
- anchors.right: parent.right
- anchors.bottom: parent.bottom
- anchors.margins: 10
- source: "content/arrow.png"
- rotation: 90
- opacity: clockview.atXEnd ? 0 : 0.5
- Behavior on opacity { NumberAnimation { duration: 500 } }
- }
-}
diff --git a/examples/demos/clocks/content/Clock.qml b/examples/demos/clocks/content/Clock.qml
deleted file mode 100644
index 05317b1151..0000000000
--- a/examples/demos/clocks/content/Clock.qml
+++ /dev/null
@@ -1,140 +0,0 @@
-/****************************************************************************
-**
-** 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 : clock
- width: {
- if (ListView.view && ListView.view.width >= 200)
- return ListView.view.width / Math.floor(ListView.view.width / 200.0);
- else
- return 200;
- }
-
- height: {
- if (ListView.view && ListView.view.height >= 240)
- return ListView.view.height;
- else
- return 240;
- }
-
- property alias city: cityLabel.text
- property int hours
- property int minutes
- property int seconds
- property real shift
- property bool night: false
- property bool internationalTime: true //Unset for local time
-
- function timeChanged() {
- var date = new Date;
- hours = internationalTime ? date.getUTCHours() + Math.floor(clock.shift) : date.getHours()
- night = ( hours < 7 || hours > 19 )
- minutes = internationalTime ? date.getUTCMinutes() + ((clock.shift % 1) * 60) : date.getMinutes()
- seconds = date.getUTCSeconds();
- }
-
- Timer {
- interval: 100; running: true; repeat: true;
- onTriggered: clock.timeChanged()
- }
-
- Item {
- anchors.centerIn: parent
- width: 200; height: 240
-
- Image { id: background; source: "clock.png"; visible: clock.night == false }
- Image { source: "clock-night.png"; visible: clock.night == true }
-
-
- Image {
- x: 92.5; y: 27
- source: "hour.png"
- transform: Rotation {
- id: hourRotation
- origin.x: 7.5; origin.y: 73;
- angle: (clock.hours * 30) + (clock.minutes * 0.5)
- Behavior on angle {
- SpringAnimation { spring: 2; damping: 0.2; modulus: 360 }
- }
- }
- }
-
- Image {
- x: 93.5; y: 17
- source: "minute.png"
- transform: Rotation {
- id: minuteRotation
- origin.x: 6.5; origin.y: 83;
- angle: clock.minutes * 6
- Behavior on angle {
- SpringAnimation { spring: 2; damping: 0.2; modulus: 360 }
- }
- }
- }
-
- Image {
- x: 97.5; y: 20
- source: "second.png"
- transform: Rotation {
- id: secondRotation
- origin.x: 2.5; origin.y: 80;
- angle: clock.seconds * 6
- Behavior on angle {
- SpringAnimation { spring: 2; damping: 0.2; modulus: 360 }
- }
- }
- }
-
- Image {
- anchors.centerIn: background; source: "center.png"
- }
-
- Text {
- id: cityLabel
- y: 210; anchors.horizontalCenter: parent.horizontalCenter
- color: "white"
- font.family: "Helvetica"
- font.bold: true; font.pixelSize: 16
- style: Text.Raised; styleColor: "black"
- }
- }
-}
diff --git a/examples/demos/clocks/content/arrow.png b/examples/demos/clocks/content/arrow.png
deleted file mode 100644
index e437312217..0000000000
--- a/examples/demos/clocks/content/arrow.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/clocks/content/background.png b/examples/demos/clocks/content/background.png
deleted file mode 100644
index a885950862..0000000000
--- a/examples/demos/clocks/content/background.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/clocks/content/center.png b/examples/demos/clocks/content/center.png
deleted file mode 100644
index 7fbd802a44..0000000000
--- a/examples/demos/clocks/content/center.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/clocks/content/clock-night.png b/examples/demos/clocks/content/clock-night.png
deleted file mode 100644
index cc7151a397..0000000000
--- a/examples/demos/clocks/content/clock-night.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/clocks/content/clock.png b/examples/demos/clocks/content/clock.png
deleted file mode 100644
index 462edacc0e..0000000000
--- a/examples/demos/clocks/content/clock.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/clocks/content/hour.png b/examples/demos/clocks/content/hour.png
deleted file mode 100644
index f8061a1235..0000000000
--- a/examples/demos/clocks/content/hour.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/clocks/content/minute.png b/examples/demos/clocks/content/minute.png
deleted file mode 100644
index 1297ec7c2b..0000000000
--- a/examples/demos/clocks/content/minute.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/clocks/content/quit.png b/examples/demos/clocks/content/quit.png
deleted file mode 100644
index b822057d4e..0000000000
--- a/examples/demos/clocks/content/quit.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/clocks/content/second.png b/examples/demos/clocks/content/second.png
deleted file mode 100644
index 4aa9fb5e8e..0000000000
--- a/examples/demos/clocks/content/second.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/demos.pro b/examples/demos/demos.pro
deleted file mode 100644
index b243396986..0000000000
--- a/examples/demos/demos.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-TEMPLATE = subdirs
-SUBDIRS = calqlatr \
- samegame \
- tweetsearch \
- maroon \
- stocqt
-
-# install
-sources.files = demos.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos
-INSTALLS += sources
diff --git a/examples/demos/maroon/content/BuildButton.qml b/examples/demos/maroon/content/BuildButton.qml
deleted file mode 100644
index 49641fcecc..0000000000
--- a/examples/demos/maroon/content/BuildButton.qml
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
-**
-** 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/examples/demos/maroon/content/GameCanvas.qml b/examples/demos/maroon/content/GameCanvas.qml
deleted file mode 100644
index 5e6e963e84..0000000000
--- a/examples/demos/maroon/content/GameCanvas.qml
+++ /dev/null
@@ -1,240 +0,0 @@
-/****************************************************************************
-**
-** 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/examples/demos/maroon/content/GameOverScreen.qml b/examples/demos/maroon/content/GameOverScreen.qml
deleted file mode 100644
index dfb439fbb9..0000000000
--- a/examples/demos/maroon/content/GameOverScreen.qml
+++ /dev/null
@@ -1,115 +0,0 @@
-/****************************************************************************
-**
-** 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/examples/demos/maroon/content/InfoBar.qml b/examples/demos/maroon/content/InfoBar.qml
deleted file mode 100644
index 36303fc4fe..0000000000
--- a/examples/demos/maroon/content/InfoBar.qml
+++ /dev/null
@@ -1,84 +0,0 @@
-/****************************************************************************
-**
-** 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/examples/demos/maroon/content/NewGameScreen.qml b/examples/demos/maroon/content/NewGameScreen.qml
deleted file mode 100644
index 495e3aaa8e..0000000000
--- a/examples/demos/maroon/content/NewGameScreen.qml
+++ /dev/null
@@ -1,111 +0,0 @@
-/****************************************************************************
-**
-** 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/examples/demos/maroon/content/SoundEffect.qml b/examples/demos/maroon/content/SoundEffect.qml
deleted file mode 100644
index d286a397c1..0000000000
--- a/examples/demos/maroon/content/SoundEffect.qml
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** 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/examples/demos/maroon/content/audio/bomb-action.wav b/examples/demos/maroon/content/audio/bomb-action.wav
deleted file mode 100644
index b334dc1e5b..0000000000
--- a/examples/demos/maroon/content/audio/bomb-action.wav
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/audio/catch-action.wav b/examples/demos/maroon/content/audio/catch-action.wav
deleted file mode 100644
index 3e22124abf..0000000000
--- a/examples/demos/maroon/content/audio/catch-action.wav
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/audio/catch.wav b/examples/demos/maroon/content/audio/catch.wav
deleted file mode 100644
index d3eade87f8..0000000000
--- a/examples/demos/maroon/content/audio/catch.wav
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/audio/currency.wav b/examples/demos/maroon/content/audio/currency.wav
deleted file mode 100644
index 0d9ef2c200..0000000000
--- a/examples/demos/maroon/content/audio/currency.wav
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/audio/factory-action.wav b/examples/demos/maroon/content/audio/factory-action.wav
deleted file mode 100644
index a2ace6c221..0000000000
--- a/examples/demos/maroon/content/audio/factory-action.wav
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/audio/melee-action.wav b/examples/demos/maroon/content/audio/melee-action.wav
deleted file mode 100644
index d325af4700..0000000000
--- a/examples/demos/maroon/content/audio/melee-action.wav
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/audio/projectile-action.wav b/examples/demos/maroon/content/audio/projectile-action.wav
deleted file mode 100644
index 4e2284fceb..0000000000
--- a/examples/demos/maroon/content/audio/projectile-action.wav
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/audio/shooter-action.wav b/examples/demos/maroon/content/audio/shooter-action.wav
deleted file mode 100644
index 3e12b9419a..0000000000
--- a/examples/demos/maroon/content/audio/shooter-action.wav
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/background.png b/examples/demos/maroon/content/gfx/background.png
deleted file mode 100644
index d548b9314e..0000000000
--- a/examples/demos/maroon/content/gfx/background.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/bomb-action.png b/examples/demos/maroon/content/gfx/bomb-action.png
deleted file mode 100644
index 42da5d789f..0000000000
--- a/examples/demos/maroon/content/gfx/bomb-action.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/bomb-idle.png b/examples/demos/maroon/content/gfx/bomb-idle.png
deleted file mode 100644
index 3bd62e261d..0000000000
--- a/examples/demos/maroon/content/gfx/bomb-idle.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/bomb.png b/examples/demos/maroon/content/gfx/bomb.png
deleted file mode 100644
index 380da7d1a5..0000000000
--- a/examples/demos/maroon/content/gfx/bomb.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/button-help.png b/examples/demos/maroon/content/gfx/button-help.png
deleted file mode 100644
index aecebc1275..0000000000
--- a/examples/demos/maroon/content/gfx/button-help.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/button-play.png b/examples/demos/maroon/content/gfx/button-play.png
deleted file mode 100644
index 6cdad6c845..0000000000
--- a/examples/demos/maroon/content/gfx/button-play.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/catch-action.png b/examples/demos/maroon/content/gfx/catch-action.png
deleted file mode 100644
index 78ca9fe1cc..0000000000
--- a/examples/demos/maroon/content/gfx/catch-action.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/catch.png b/examples/demos/maroon/content/gfx/catch.png
deleted file mode 100644
index b7620fe3de..0000000000
--- a/examples/demos/maroon/content/gfx/catch.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/cloud.png b/examples/demos/maroon/content/gfx/cloud.png
deleted file mode 100644
index d7c35f8555..0000000000
--- a/examples/demos/maroon/content/gfx/cloud.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/currency.png b/examples/demos/maroon/content/gfx/currency.png
deleted file mode 100644
index 1571341f6c..0000000000
--- a/examples/demos/maroon/content/gfx/currency.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/dialog-bomb.png b/examples/demos/maroon/content/gfx/dialog-bomb.png
deleted file mode 100644
index 708d916ad7..0000000000
--- a/examples/demos/maroon/content/gfx/dialog-bomb.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/dialog-factory.png b/examples/demos/maroon/content/gfx/dialog-factory.png
deleted file mode 100644
index d2e2a48e31..0000000000
--- a/examples/demos/maroon/content/gfx/dialog-factory.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/dialog-melee.png b/examples/demos/maroon/content/gfx/dialog-melee.png
deleted file mode 100644
index 069d18d477..0000000000
--- a/examples/demos/maroon/content/gfx/dialog-melee.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/dialog-pointer.png b/examples/demos/maroon/content/gfx/dialog-pointer.png
deleted file mode 100644
index 9b51a090f9..0000000000
--- a/examples/demos/maroon/content/gfx/dialog-pointer.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/dialog-shooter.png b/examples/demos/maroon/content/gfx/dialog-shooter.png
deleted file mode 100644
index af980caabd..0000000000
--- a/examples/demos/maroon/content/gfx/dialog-shooter.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/dialog.png b/examples/demos/maroon/content/gfx/dialog.png
deleted file mode 100644
index d528ba78d1..0000000000
--- a/examples/demos/maroon/content/gfx/dialog.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/factory-action.png b/examples/demos/maroon/content/gfx/factory-action.png
deleted file mode 100644
index 8981678267..0000000000
--- a/examples/demos/maroon/content/gfx/factory-action.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/factory-idle.png b/examples/demos/maroon/content/gfx/factory-idle.png
deleted file mode 100644
index a145582c8f..0000000000
--- a/examples/demos/maroon/content/gfx/factory-idle.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/factory.png b/examples/demos/maroon/content/gfx/factory.png
deleted file mode 100644
index bfb9f3fb79..0000000000
--- a/examples/demos/maroon/content/gfx/factory.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/grid.png b/examples/demos/maroon/content/gfx/grid.png
deleted file mode 100644
index b59555247a..0000000000
--- a/examples/demos/maroon/content/gfx/grid.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/help.png b/examples/demos/maroon/content/gfx/help.png
deleted file mode 100644
index 4654e4c69b..0000000000
--- a/examples/demos/maroon/content/gfx/help.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/lifes.png b/examples/demos/maroon/content/gfx/lifes.png
deleted file mode 100644
index 135310b38c..0000000000
--- a/examples/demos/maroon/content/gfx/lifes.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/logo-bubble.png b/examples/demos/maroon/content/gfx/logo-bubble.png
deleted file mode 100644
index 136151caff..0000000000
--- a/examples/demos/maroon/content/gfx/logo-bubble.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/logo-fish.png b/examples/demos/maroon/content/gfx/logo-fish.png
deleted file mode 100644
index c41833a0c9..0000000000
--- a/examples/demos/maroon/content/gfx/logo-fish.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/logo.png b/examples/demos/maroon/content/gfx/logo.png
deleted file mode 100644
index 787ac99ce8..0000000000
--- a/examples/demos/maroon/content/gfx/logo.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/melee-action.png b/examples/demos/maroon/content/gfx/melee-action.png
deleted file mode 100644
index c53873bfcc..0000000000
--- a/examples/demos/maroon/content/gfx/melee-action.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/melee-idle.png b/examples/demos/maroon/content/gfx/melee-idle.png
deleted file mode 100644
index 621d9dff54..0000000000
--- a/examples/demos/maroon/content/gfx/melee-idle.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/melee.png b/examples/demos/maroon/content/gfx/melee.png
deleted file mode 100644
index ab240151f3..0000000000
--- a/examples/demos/maroon/content/gfx/melee.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/mob-idle.png b/examples/demos/maroon/content/gfx/mob-idle.png
deleted file mode 100644
index dedacc7866..0000000000
--- a/examples/demos/maroon/content/gfx/mob-idle.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/mob.png b/examples/demos/maroon/content/gfx/mob.png
deleted file mode 100644
index 7569c3525a..0000000000
--- a/examples/demos/maroon/content/gfx/mob.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/points.png b/examples/demos/maroon/content/gfx/points.png
deleted file mode 100644
index 1d2386dbe7..0000000000
--- a/examples/demos/maroon/content/gfx/points.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/projectile-action.png b/examples/demos/maroon/content/gfx/projectile-action.png
deleted file mode 100644
index aa2e650aeb..0000000000
--- a/examples/demos/maroon/content/gfx/projectile-action.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/projectile.png b/examples/demos/maroon/content/gfx/projectile.png
deleted file mode 100644
index c25a0c3890..0000000000
--- a/examples/demos/maroon/content/gfx/projectile.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/scores.png b/examples/demos/maroon/content/gfx/scores.png
deleted file mode 100644
index af757fe64a..0000000000
--- a/examples/demos/maroon/content/gfx/scores.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/shooter-action.png b/examples/demos/maroon/content/gfx/shooter-action.png
deleted file mode 100644
index 08e7e300ca..0000000000
--- a/examples/demos/maroon/content/gfx/shooter-action.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/shooter-idle.png b/examples/demos/maroon/content/gfx/shooter-idle.png
deleted file mode 100644
index 663098d3b0..0000000000
--- a/examples/demos/maroon/content/gfx/shooter-idle.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/shooter.png b/examples/demos/maroon/content/gfx/shooter.png
deleted file mode 100644
index d44401e055..0000000000
--- a/examples/demos/maroon/content/gfx/shooter.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/sunlight.png b/examples/demos/maroon/content/gfx/sunlight.png
deleted file mode 100644
index d1c7042117..0000000000
--- a/examples/demos/maroon/content/gfx/sunlight.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/text-1.png b/examples/demos/maroon/content/gfx/text-1.png
deleted file mode 100644
index 3ea399cc90..0000000000
--- a/examples/demos/maroon/content/gfx/text-1.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/text-2.png b/examples/demos/maroon/content/gfx/text-2.png
deleted file mode 100644
index 934a481f3b..0000000000
--- a/examples/demos/maroon/content/gfx/text-2.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/text-3.png b/examples/demos/maroon/content/gfx/text-3.png
deleted file mode 100644
index 47523f55b8..0000000000
--- a/examples/demos/maroon/content/gfx/text-3.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/text-blank.png b/examples/demos/maroon/content/gfx/text-blank.png
deleted file mode 100644
index 4a687b24dc..0000000000
--- a/examples/demos/maroon/content/gfx/text-blank.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/text-gameover.png b/examples/demos/maroon/content/gfx/text-gameover.png
deleted file mode 100644
index 4f53ef0b29..0000000000
--- a/examples/demos/maroon/content/gfx/text-gameover.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/text-go.png b/examples/demos/maroon/content/gfx/text-go.png
deleted file mode 100644
index bfc26f71fc..0000000000
--- a/examples/demos/maroon/content/gfx/text-go.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/gfx/wave.png b/examples/demos/maroon/content/gfx/wave.png
deleted file mode 100644
index f97426c4e7..0000000000
--- a/examples/demos/maroon/content/gfx/wave.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/maroon/content/logic.js b/examples/demos/maroon/content/logic.js
deleted file mode 100644
index dd76b7e073..0000000000
--- a/examples/demos/maroon/content/logic.js
+++ /dev/null
@@ -1,264 +0,0 @@
-/****************************************************************************
-**
-** 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/examples/demos/maroon/content/mobs/MobBase.qml b/examples/demos/maroon/content/mobs/MobBase.qml
deleted file mode 100644
index d4ece660ed..0000000000
--- a/examples/demos/maroon/content/mobs/MobBase.qml
+++ /dev/null
@@ -1,262 +0,0 @@
-/****************************************************************************
-**
-** 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/examples/demos/maroon/content/towers/Bomb.qml b/examples/demos/maroon/content/towers/Bomb.qml
deleted file mode 100644
index 00437f468f..0000000000
--- a/examples/demos/maroon/content/towers/Bomb.qml
+++ /dev/null
@@ -1,133 +0,0 @@
-/****************************************************************************
-**
-** 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/examples/demos/maroon/content/towers/Factory.qml b/examples/demos/maroon/content/towers/Factory.qml
deleted file mode 100644
index b34a18498a..0000000000
--- a/examples/demos/maroon/content/towers/Factory.qml
+++ /dev/null
@@ -1,114 +0,0 @@
-/****************************************************************************
-**
-** 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/examples/demos/maroon/content/towers/Melee.qml b/examples/demos/maroon/content/towers/Melee.qml
deleted file mode 100644
index 1b49a455aa..0000000000
--- a/examples/demos/maroon/content/towers/Melee.qml
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** 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/examples/demos/maroon/content/towers/Ranged.qml b/examples/demos/maroon/content/towers/Ranged.qml
deleted file mode 100644
index 33f3354fb6..0000000000
--- a/examples/demos/maroon/content/towers/Ranged.qml
+++ /dev/null
@@ -1,128 +0,0 @@
-/****************************************************************************
-**
-** 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/examples/demos/maroon/content/towers/TowerBase.qml b/examples/demos/maroon/content/towers/TowerBase.qml
deleted file mode 100644
index 5c71cb051f..0000000000
--- a/examples/demos/maroon/content/towers/TowerBase.qml
+++ /dev/null
@@ -1,72 +0,0 @@
-/****************************************************************************
-**
-** 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/examples/demos/maroon/main.cpp b/examples/demos/maroon/main.cpp
deleted file mode 100644
index da2343e444..0000000000
--- a/examples/demos/maroon/main.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(maroon)
diff --git a/examples/demos/maroon/maroon.pro b/examples/demos/maroon/maroon.pro
deleted file mode 100644
index fa2e4b5709..0000000000
--- a/examples/demos/maroon/maroon.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-TEMPLATE = app
-
-QT += qml quick
-SOURCES += main.cpp
-
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/maroon
-qml.files = maroon.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/maroon
-sources.files = $$SOURCES maroon.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
diff --git a/examples/demos/maroon/maroon.qml b/examples/demos/maroon/maroon.qml
deleted file mode 100644
index d7bfcb6a66..0000000000
--- a/examples/demos/maroon/maroon.qml
+++ /dev/null
@@ -1,233 +0,0 @@
-/****************************************************************************
-**
-** 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/examples/demos/maroon/maroon.qmlproject b/examples/demos/maroon/maroon.qmlproject
deleted file mode 100644
index 752666114f..0000000000
--- a/examples/demos/maroon/maroon.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "maroon.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/demos/photoviewer/PhotoViewerCore/AlbumDelegate.qml b/examples/demos/photoviewer/PhotoViewerCore/AlbumDelegate.qml
deleted file mode 100644
index 12902c0413..0000000000
--- a/examples/demos/photoviewer/PhotoViewerCore/AlbumDelegate.qml
+++ /dev/null
@@ -1,147 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 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
-
-Component {
- id: albumDelegate
- Package {
-
- Item {
- Package.name: 'browser'
- GridView {
- id: photosGridView; model: visualModel.parts.grid; width: mainWindow.width; height: mainWindow.height - 21
- x: 0; y: 21; cellWidth: 160; cellHeight: 153; interactive: false
- onCurrentIndexChanged: photosListView.positionViewAtIndex(currentIndex, ListView.Contain)
- }
- }
-
- Item {
- Package.name: 'fullscreen'
- ListView {
- id: photosListView; model: visualModel.parts.list; orientation: Qt.Horizontal
- width: mainWindow.width; height: mainWindow.height; interactive: false
- onCurrentIndexChanged: photosGridView.positionViewAtIndex(currentIndex, GridView.Contain)
- highlightRangeMode: ListView.StrictlyEnforceRange; snapMode: ListView.SnapOneItem
- }
- }
-
- Item {
- Package.name: 'album'
- id: albumWrapper; width: 210; height: 220
-
- VisualDataModel {
- id: visualModel; delegate: PhotoDelegate { }
- model: RssModel { id: rssModel; tags: tag }
- }
-
- BusyIndicator {
- id: busyIndicator
- anchors { centerIn: parent; verticalCenterOffset: -20 }
- on: rssModel.status != XmlListModel.Ready
- }
-
- PathView {
- id: photosPathView; model: visualModel.parts.stack; pathItemCount: 5
- visible: !busyIndicator.visible
- anchors.centerIn: parent; anchors.verticalCenterOffset: -30
- path: Path {
- PathAttribute { name: 'z'; value: 9999.0 }
- PathLine { x: 1; y: 1 }
- PathAttribute { name: 'z'; value: 0.0 }
- }
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: mainWindow.editMode ? photosModel.remove(index) : albumWrapper.state = 'inGrid'
- }
-
- Tag {
- anchors { horizontalCenter: parent.horizontalCenter; bottom: parent.bottom; bottomMargin: 10 }
- frontLabel: tag; backLabel: qsTr("Remove"); flipped: mainWindow.editMode
- onTagChanged: rssModel.tags = tag
- onBackClicked: if (mainWindow.editMode) photosModel.remove(index);
- }
-
- states: [
- State {
- name: 'inGrid'
- PropertyChanges { target: photosGridView; interactive: true }
- PropertyChanges { target: albumsShade; opacity: 1 }
- PropertyChanges { target: backButton; onClicked: albumWrapper.state = ''; y: 6 }
- },
- State {
- name: 'fullscreen'; extend: 'inGrid'
- PropertyChanges { target: photosGridView; interactive: false }
- PropertyChanges { target: photosListView; interactive: true }
- PropertyChanges { target: photosShade; opacity: 1 }
- PropertyChanges { target: backButton; y: -backButton.height - 8 }
- }
- ]
-
- GridView.onAdd: NumberAnimation {
- target: albumWrapper; properties: "scale"; from: 0.0; to: 1.0; easing.type: Easing.OutQuad
- }
- GridView.onRemove: SequentialAnimation {
- PropertyAction { target: albumWrapper; property: "GridView.delayRemove"; value: true }
- NumberAnimation { target: albumWrapper; property: "scale"; from: 1.0; to: 0.0; easing.type: Easing.OutQuad }
- PropertyAction { target: albumWrapper; property: "GridView.delayRemove"; value: false }
- }
-
- transitions: [
- Transition {
- from: '*'; to: 'inGrid'
- SequentialAnimation {
- NumberAnimation { properties: 'opacity'; duration: 250 }
- PauseAnimation { duration: 350 }
- NumberAnimation { target: backButton; properties: "y"; duration: 200; easing.type: Easing.OutQuad }
- }
- },
- Transition {
- from: 'inGrid'; to: '*'
- NumberAnimation { properties: "y,opacity"; easing.type: Easing.OutQuad; duration: 300 }
- }
- ]
- }
- }
-}
diff --git a/examples/demos/photoviewer/PhotoViewerCore/BusyIndicator.qml b/examples/demos/photoviewer/PhotoViewerCore/BusyIndicator.qml
deleted file mode 100644
index fc832eaed8..0000000000
--- a/examples/demos/photoviewer/PhotoViewerCore/BusyIndicator.qml
+++ /dev/null
@@ -1,50 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 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/examples/demos/photoviewer/PhotoViewerCore/Button.qml b/examples/demos/photoviewer/PhotoViewerCore/Button.qml
deleted file mode 100644
index 6571470e2f..0000000000
--- a/examples/demos/photoviewer/PhotoViewerCore/Button.qml
+++ /dev/null
@@ -1,72 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 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 alias label: labelText.text
- property color tint: "transparent"
- signal clicked
-
- width: labelText.width + 70 ; height: labelText.height + 18
-
- BorderImage {
- anchors { fill: container; leftMargin: -6; topMargin: -6; rightMargin: -8; bottomMargin: -8 }
- source: 'images/box-shadow.png'
- border.left: 10; border.top: 10; border.right: 10; border.bottom: 10
- }
-
- Image { anchors.fill: parent; source: "images/cardboard.png"; antialiasing: true }
-
- Rectangle {
- anchors.fill: container; color: container.tint; visible: container.tint != ""
- opacity: 0.25
- }
-
- Text { id: labelText; font.pixelSize: 15; anchors.centerIn: parent }
-
- MouseArea {
- anchors { fill: parent; leftMargin: -20; topMargin: -20; rightMargin: -20; bottomMargin: -20 }
- onClicked: container.clicked()
- }
-}
diff --git a/examples/demos/photoviewer/PhotoViewerCore/EditableButton.qml b/examples/demos/photoviewer/PhotoViewerCore/EditableButton.qml
deleted file mode 100644
index 8543bee157..0000000000
--- a/examples/demos/photoviewer/PhotoViewerCore/EditableButton.qml
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 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 string label
- signal clicked
-
- width: textInput.width + 70 ; height: textInput.height + 18
-
- BorderImage {
- anchors { fill: container; leftMargin: -6; topMargin: -6; rightMargin: -8; bottomMargin: -8 }
- source: 'images/box-shadow.png';
- border.left: 10; border.top: 10; border.right: 10; border.bottom: 10
- }
-
- Image { anchors.fill: parent; source: "images/cardboard.png"; antialiasing: true }
-
- TextInput {
- id: textInput; text: label; font.pixelSize: 15; anchors.centerIn: parent
- Keys.onReturnPressed: {
- container.label = textInput.text
- container.focus = true
- }
- Keys.onEnterPressed: {
- container.label = textInput.text
- container.focus = true
- }
- Keys.onEscapePressed: {
- textInput.text = container.label
- container.focus = true
- }
- }
-
- Rectangle {
- anchors.fill: container; border.color: "steelblue"; border.width: 4
- color: "transparent"; visible: textInput.focus; antialiasing: true
- }
-
- MouseArea {
- anchors { fill: parent; leftMargin: -20; topMargin: -20; rightMargin: -20; bottomMargin: -20 }
- onClicked: { textInput.forceActiveFocus(); Qt.inputMethod.show(); }
- }
-}
diff --git a/examples/demos/photoviewer/PhotoViewerCore/PhotoDelegate.qml b/examples/demos/photoviewer/PhotoViewerCore/PhotoDelegate.qml
deleted file mode 100644
index e14a1da266..0000000000
--- a/examples/demos/photoviewer/PhotoViewerCore/PhotoDelegate.qml
+++ /dev/null
@@ -1,189 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 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 "script/script.js" as Script
-
-Package {
- Item { id: stackItem; Package.name: 'stack'; width: 160; height: 153; z: stackItem.PathView.z }
- Item { id: listItem; Package.name: 'list'; width: mainWindow.width + 40; height: 153 }
- Item { id: gridItem; Package.name: 'grid'; width: 160; height: 153 }
-
- Item {
- width: 160; height: 153
-
- Item {
- id: photoWrapper
-
- property double randomAngle: Math.random() * (2 * 6 + 1) - 6
- property double randomAngle2: Math.random() * (2 * 6 + 1) - 6
-
- x: 0; y: 0; width: 140; height: 133
- z: stackItem.PathView.z; rotation: photoWrapper.randomAngle
-
- BorderImage {
- anchors {
- fill: originalImage.status == Image.Ready ? border : placeHolder
- leftMargin: -6; topMargin: -6; rightMargin: -8; bottomMargin: -8
- }
- source: 'images/box-shadow.png'
- border.left: 10; border.top: 10; border.right: 10; border.bottom: 10
- }
- Rectangle {
- id: placeHolder
-
- property int w: Script.getWidth(content)
- property int h: Script.getHeight(content)
- property double s: Script.calculateScale(w, h, photoWrapper.width)
-
- color: 'white'; anchors.centerIn: parent; antialiasing: true
- width: w * s; height: h * s; visible: originalImage.status != Image.Ready
- Rectangle {
- color: "#878787"; antialiasing: true
- anchors { fill: parent; topMargin: 3; bottomMargin: 3; leftMargin: 3; rightMargin: 3 }
- }
- }
- Rectangle {
- id: border; color: 'white'; anchors.centerIn: parent; antialiasing: true
- width: originalImage.paintedWidth + 6; height: originalImage.paintedHeight + 6
- visible: !placeHolder.visible
- }
- BusyIndicator { anchors.centerIn: parent; on: originalImage.status != Image.Ready }
- Image {
- id: originalImage; antialiasing: true;
- source: "http://" + Script.getImagePath(content); cache: false
- fillMode: Image.PreserveAspectFit; width: photoWrapper.width; height: photoWrapper.height
- }
- Image {
- id: hqImage; antialiasing: true; source: ""; visible: false; cache: false
- fillMode: Image.PreserveAspectFit; width: photoWrapper.width; height: photoWrapper.height
- }
- Binding {
- target: mainWindow; property: "downloadProgress"; value: hqImage.progress
- when: listItem.ListView.isCurrentItem
- }
- Binding {
- target: mainWindow; property: "imageLoading"
- value: (hqImage.status == Image.Loading) ? 1 : 0; when: listItem.ListView.isCurrentItem
- }
- MouseArea {
- width: originalImage.paintedWidth; height: originalImage.paintedHeight; anchors.centerIn: originalImage
- onClicked: {
- if (albumWrapper.state == 'inGrid') {
- gridItem.GridView.view.currentIndex = index;
- albumWrapper.state = 'fullscreen'
- } else {
- gridItem.GridView.view.currentIndex = index;
- albumWrapper.state = 'inGrid'
- }
- }
- }
-
- states: [
- State {
- name: 'stacked'; when: albumWrapper.state == ''
- ParentChange { target: photoWrapper; parent: stackItem; x: 10; y: 10 }
- PropertyChanges { target: photoWrapper; opacity: stackItem.PathView.onPath ? 1.0 : 0.0 }
- },
- State {
- name: 'inGrid'; when: albumWrapper.state == 'inGrid'
- ParentChange { target: photoWrapper; parent: gridItem; x: 10; y: 10; rotation: photoWrapper.randomAngle2 }
- },
- State {
- name: 'fullscreen'; when: albumWrapper.state == 'fullscreen'
- ParentChange {
- target: photoWrapper; parent: listItem; x: 0; y: 0; rotation: 0
- width: mainWindow.width; height: mainWindow.height
- }
- PropertyChanges { target: border; opacity: 0 }
- PropertyChanges { target: hqImage; source: listItem.ListView.isCurrentItem ? hq : ""; visible: true }
- }
- ]
-
- transitions: [
- Transition {
- from: 'stacked'; to: 'inGrid'
- SequentialAnimation {
- PauseAnimation { duration: 10 * index }
- ParentAnimation {
- target: photoWrapper; via: foreground
- NumberAnimation {
- target: photoWrapper; properties: 'x,y,rotation,opacity'; duration: 600; easing.type: 'OutQuart'
- }
- }
- }
- },
- Transition {
- from: 'inGrid'; to: 'stacked'
- ParentAnimation {
- target: photoWrapper; via: foreground
- NumberAnimation { properties: 'x,y,rotation,opacity'; duration: 600; easing.type: 'OutQuart' }
- }
- },
- Transition {
- from: 'inGrid'; to: 'fullscreen'
- SequentialAnimation {
- PauseAnimation { duration: gridItem.GridView.isCurrentItem ? 0 : 600 }
- ParentAnimation {
- target: photoWrapper; via: foreground
- NumberAnimation {
- targets: [ photoWrapper, border ]
- properties: 'x,y,width,height,opacity,rotation'
- duration: gridItem.GridView.isCurrentItem ? 600 : 1; easing.type: 'OutQuart'
- }
- }
- }
- },
- Transition {
- from: 'fullscreen'; to: 'inGrid'
- ParentAnimation {
- target: photoWrapper; via: foreground
- NumberAnimation {
- targets: [ photoWrapper, border ]
- properties: 'x,y,width,height,rotation,opacity'
- duration: gridItem.GridView.isCurrentItem ? 600 : 1; easing.type: 'OutQuart'
- }
- }
- }
- ]
- }
- }
-}
diff --git a/examples/demos/photoviewer/PhotoViewerCore/ProgressBar.qml b/examples/demos/photoviewer/PhotoViewerCore/ProgressBar.qml
deleted file mode 100644
index d2f915887f..0000000000
--- a/examples/demos/photoviewer/PhotoViewerCore/ProgressBar.qml
+++ /dev/null
@@ -1,57 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 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 real progress: 0
-
- Behavior on opacity { NumberAnimation { duration: 600 } }
-
- Rectangle { anchors.fill: parent; color: "black"; opacity: 0.5 }
-
- Rectangle {
- id: fill; color: "white"; height: container.height
- width: container.width * container.progress
- }
-}
diff --git a/examples/demos/photoviewer/PhotoViewerCore/RssModel.qml b/examples/demos/photoviewer/PhotoViewerCore/RssModel.qml
deleted file mode 100644
index 98fcd931dd..0000000000
--- a/examples/demos/photoviewer/PhotoViewerCore/RssModel.qml
+++ /dev/null
@@ -1,57 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 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
-
-XmlListModel {
- property string tags : ""
-
- function encodeTags(x) { return encodeURIComponent(x.replace(' ',',')); }
-
- source: "http://api.flickr.com/services/feeds/photos_public.gne?"+(tags ? "tags="+encodeTags(tags)+"&" : "")
- query: "/feed/entry"
- namespaceDeclarations: "declare default element namespace 'http://www.w3.org/2005/Atom';"
-
- XmlRole { name: "title"; query: "title/string()" }
- XmlRole { name: "content"; query: "content/string()" }
- XmlRole { name: "hq"; query: "link[@rel='enclosure']/@href/string()" }
-}
diff --git a/examples/demos/photoviewer/PhotoViewerCore/Tag.qml b/examples/demos/photoviewer/PhotoViewerCore/Tag.qml
deleted file mode 100644
index eeb8c355e3..0000000000
--- a/examples/demos/photoviewer/PhotoViewerCore/Tag.qml
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 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
-
-Flipable {
- id: flipable
-
- property alias frontLabel: frontButton.label
- property alias backLabel: backButton.label
-
- property int angle: 0
- property int randomAngle: Math.random() * (2 * 6 + 1) - 6
- property bool flipped: false
-
- signal frontClicked
- signal backClicked
- signal tagChanged(string tag)
-
- front: EditableButton {
- id: frontButton; rotation: flipable.randomAngle
- anchors { centerIn: parent; verticalCenterOffset: -20 }
- onClicked: flipable.frontClicked()
- onLabelChanged: flipable.tagChanged(label)
- }
-
- back: Button {
- id: backButton; tint: "red"; rotation: flipable.randomAngle
- anchors { centerIn: parent; verticalCenterOffset: -20 }
- onClicked: flipable.backClicked()
- }
-
- transform: Rotation {
- origin.x: flipable.width / 2; origin.y: flipable.height / 2
- axis.x: 0; axis.y: 1; axis.z: 0
- angle: flipable.angle
- }
-
- states: State {
- name: "back"; when: flipable.flipped
- PropertyChanges { target: flipable; angle: 180 }
- }
-
- transitions: Transition {
- ParallelAnimation {
- NumberAnimation { properties: "angle"; duration: 400 }
- SequentialAnimation {
- NumberAnimation { target: flipable; property: "scale"; to: 0.8; duration: 200 }
- NumberAnimation { target: flipable; property: "scale"; to: 1.0; duration: 200 }
- }
- }
- }
-}
diff --git a/examples/demos/photoviewer/PhotoViewerCore/images/box-shadow.png b/examples/demos/photoviewer/PhotoViewerCore/images/box-shadow.png
deleted file mode 100644
index 431af8545d..0000000000
--- a/examples/demos/photoviewer/PhotoViewerCore/images/box-shadow.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/photoviewer/PhotoViewerCore/images/busy.png b/examples/demos/photoviewer/PhotoViewerCore/images/busy.png
deleted file mode 100644
index 664c2b1491..0000000000
--- a/examples/demos/photoviewer/PhotoViewerCore/images/busy.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/photoviewer/PhotoViewerCore/images/cardboard.png b/examples/demos/photoviewer/PhotoViewerCore/images/cardboard.png
deleted file mode 100644
index 1847ab528d..0000000000
--- a/examples/demos/photoviewer/PhotoViewerCore/images/cardboard.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/photoviewer/PhotoViewerCore/qmldir b/examples/demos/photoviewer/PhotoViewerCore/qmldir
deleted file mode 100644
index d3c247f21a..0000000000
--- a/examples/demos/photoviewer/PhotoViewerCore/qmldir
+++ /dev/null
@@ -1,8 +0,0 @@
-AlbumDelegate AlbumDelegate.qml
-PhotoDelegate PhotoDelegate.qml
-ProgressBar ProgressBar.qml
-RssModel RssModel.qml
-BusyIndicator BusyIndicator.qml
-EditableButton EditableButton.qml
-Button Button.qml
-Tag Tag.qml
diff --git a/examples/demos/photoviewer/PhotoViewerCore/script/script.js b/examples/demos/photoviewer/PhotoViewerCore/script/script.js
deleted file mode 100644
index e8ef93a847..0000000000
--- a/examples/demos/photoviewer/PhotoViewerCore/script/script.js
+++ /dev/null
@@ -1,27 +0,0 @@
-.pragma library
-
-function getWidth(string) {
- return (string.match(/width=\"([0-9]+)\"/))[1]
-}
-
-function getHeight(string) {
- return (string.match(/height=\"([0-9]+)\"/))[1]
-}
-
-function getImagePath(string) {
- var pattern = /src=\"http:\/\/(\S+)\"/
- return (string.match(pattern))[1]
-}
-
-function calculateScale(width, height, cellSize) {
- var widthScale = (cellSize * 1.0) / width
- var heightScale = (cellSize * 1.0) / height
- var scale = 0
-
- if (widthScale <= heightScale) {
- scale = widthScale;
- } else if (heightScale < widthScale) {
- scale = heightScale;
- }
- return scale;
-}
diff --git a/examples/demos/photoviewer/i18n/base.ts b/examples/demos/photoviewer/i18n/base.ts
deleted file mode 100644
index 1accfd2f90..0000000000
--- a/examples/demos/photoviewer/i18n/base.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0">
-<context>
- <name>AlbumDelegate</name>
- <message>
- <location filename="../PhotoViewerCore/AlbumDelegate.qml" line="59"/>
- <source>Remove</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>photoviewer</name>
- <message>
- <location filename="../photoviewer.qml" line="30"/>
- <source>Add</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../photoviewer.qml" line="39"/>
- <source>Edit</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../photoviewer.qml" line="52"/>
- <source>Back</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-</TS>
diff --git a/examples/demos/photoviewer/i18n/qml_fr.qm b/examples/demos/photoviewer/i18n/qml_fr.qm
deleted file mode 100644
index c24fcbc46c..0000000000
--- a/examples/demos/photoviewer/i18n/qml_fr.qm
+++ /dev/null
Binary files differ
diff --git a/examples/demos/photoviewer/i18n/qml_fr.ts b/examples/demos/photoviewer/i18n/qml_fr.ts
deleted file mode 100644
index 9f892db616..0000000000
--- a/examples/demos/photoviewer/i18n/qml_fr.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="fr_FR">
-<context>
- <name>AlbumDelegate</name>
- <message>
- <location filename="../PhotoViewerCore/AlbumDelegate.qml" line="59"/>
- <source>Remove</source>
- <translation>Supprimer</translation>
- </message>
-</context>
-<context>
- <name>photoviewer</name>
- <message>
- <location filename="../photoviewer.qml" line="30"/>
- <source>Add</source>
- <translation>Ajouter</translation>
- </message>
- <message>
- <location filename="../photoviewer.qml" line="39"/>
- <source>Edit</source>
- <translation>Éditer</translation>
- </message>
- <message>
- <location filename="../photoviewer.qml" line="52"/>
- <source>Back</source>
- <translation>Retour</translation>
- </message>
-</context>
-</TS>
diff --git a/examples/demos/photoviewer/photoviewer.qml b/examples/demos/photoviewer/photoviewer.qml
deleted file mode 100644
index caeade4594..0000000000
--- a/examples/demos/photoviewer/photoviewer.qml
+++ /dev/null
@@ -1,110 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 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 "PhotoViewerCore"
-
-Rectangle {
- id: mainWindow
-
- property real downloadProgress: 0
- property bool imageLoading: false
- property bool editMode: false
-
- width: 800; height: 480; color: "#d5d6d8"
-
- ListModel {
- id: photosModel
- ListElement { tag: "Flowers" }
- ListElement { tag: "Wildlife" }
- ListElement { tag: "Prague" }
- }
-
- VisualDataModel { id: albumVisualModel; model: photosModel; delegate: AlbumDelegate {} }
-
- GridView {
- id: albumView; width: parent.width; height: parent.height; cellWidth: 210; cellHeight: 220
- model: albumVisualModel.parts.album; visible: albumsShade.opacity != 1.0
- }
-
- Column {
- spacing: 20; anchors { bottom: parent.bottom; right: parent.right; rightMargin: 20; bottomMargin: 20 }
- Button {
- id: newButton; label: qsTr("Add"); rotation: 3
- anchors.horizontalCenter: parent.horizontalCenter
- onClicked: {
- mainWindow.editMode = false
- photosModel.append( { tag: "" } )
- albumView.positionViewAtIndex(albumView.count - 1, GridView.Contain)
- }
- }
- Button {
- id: deleteButton; label: qsTr("Edit"); rotation: -2;
- onClicked: mainWindow.editMode = !mainWindow.editMode
- anchors.horizontalCenter: parent.horizontalCenter
- }
- Button {
- id: quitButton; label: qsTr("Quit"); rotation: -2;
- onClicked: Qt.quit()
- anchors.horizontalCenter: parent.horizontalCenter
- }
- }
-
- Rectangle {
- id: albumsShade; color: mainWindow.color
- width: parent.width; height: parent.height; opacity: 0.0
- }
-
- ListView { anchors.fill: parent; model: albumVisualModel.parts.browser; interactive: false }
-
- Button { id: backButton; label: qsTr("Back"); rotation: 3; x: parent.width - backButton.width - 6; y: -backButton.height - 8 }
-
- Rectangle { id: photosShade; color: 'black'; width: parent.width; height: parent.height; opacity: 0; visible: opacity != 0.0 }
-
- ListView { anchors.fill: parent; model: albumVisualModel.parts.fullscreen; interactive: false }
-
- Item { id: foreground; anchors.fill: parent }
-
- ProgressBar {
- progress: mainWindow.downloadProgress; width: parent.width; height: 4
- anchors.bottom: parent.bottom; opacity: mainWindow.imageLoading; visible: opacity != 0.0
- }
-}
diff --git a/examples/demos/photoviewer/photoviewer.qmlproject b/examples/demos/photoviewer/photoviewer.qmlproject
deleted file mode 100644
index 600bdb10f4..0000000000
--- a/examples/demos/photoviewer/photoviewer.qmlproject
+++ /dev/null
@@ -1,20 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "photoviewer.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
- Files {
- filter: "*.ts"
- directory: "i18n"
- }
-}
diff --git a/examples/demos/rssnews/content/BusyIndicator.qml b/examples/demos/rssnews/content/BusyIndicator.qml
deleted file mode 100644
index 20ac08f612..0000000000
--- a/examples/demos/rssnews/content/BusyIndicator.qml
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 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/examples/demos/rssnews/content/CategoryDelegate.qml b/examples/demos/rssnews/content/CategoryDelegate.qml
deleted file mode 100644
index a6fea432f8..0000000000
--- a/examples/demos/rssnews/content/CategoryDelegate.qml
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 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
-
- width: delegate.ListView.view.width; height: 60
-
- Text {
- text: name
- color: delegate.ListView.isCurrentItem ? "white" : "black"
- font { family: "Helvetica"; pixelSize: 16; bold: true }
- anchors {
- left: parent.left; leftMargin: 15
- verticalCenter: parent.verticalCenter
- }
- }
-
- BusyIndicator {
- scale: 0.6
- on: delegate.ListView.isCurrentItem && window.loading
- anchors { right: parent.right; rightMargin: 10; 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/examples/demos/rssnews/content/NewsDelegate.qml b/examples/demos/rssnews/content/NewsDelegate.qml
deleted file mode 100644
index fe481a0eb0..0000000000
--- a/examples/demos/rssnews/content/NewsDelegate.qml
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 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 + 40
- width: delegate.ListView.view.width
-
- Column {
- id: column
- x: 20; y: 20
- width: parent.width - 40
-
- Text {
- id: titleText
- text: title; width: parent.width; wrapMode: Text.WordWrap
- font { bold: true; family: "Helvetica"; pointSize: 16 }
- }
-
- Text {
- id: descriptionText
- width: parent.width; text: description
- wrapMode: Text.WordWrap; font.family: "Helvetica"
- }
- }
-
- Rectangle {
- width: parent.width; height: 1; color: "#cccccc"
- anchors.bottom: parent.bottom
- }
-}
diff --git a/examples/demos/rssnews/content/RssFeeds.qml b/examples/demos/rssnews/content/RssFeeds.qml
deleted file mode 100644
index 9a31d2be3e..0000000000
--- a/examples/demos/rssnews/content/RssFeeds.qml
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 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: "rss.news.yahoo.com/rss/topstories" }
- ListElement { name: "World"; feed: "rss.news.yahoo.com/rss/world" }
- ListElement { name: "Europe"; feed: "rss.news.yahoo.com/rss/europe" }
- ListElement { name: "Oceania"; feed: "rss.news.yahoo.com/rss/oceania" }
- ListElement { name: "U.S. National"; feed: "rss.news.yahoo.com/rss/us" }
- ListElement { name: "Politics"; feed: "rss.news.yahoo.com/rss/politics" }
- 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: "Health"; feed: "rss.news.yahoo.com/rss/health" }
- ListElement { name: "Science"; feed: "rss.news.yahoo.com/rss/science" }
- ListElement { name: "Sports"; feed: "rss.news.yahoo.com/rss/sports" }
-}
diff --git a/examples/demos/rssnews/content/ScrollBar.qml b/examples/demos/rssnews/content/ScrollBar.qml
deleted file mode 100644
index 2752b7c56d..0000000000
--- a/examples/demos/rssnews/content/ScrollBar.qml
+++ /dev/null
@@ -1,107 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 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/examples/demos/rssnews/content/images/busy.png b/examples/demos/rssnews/content/images/busy.png
deleted file mode 100644
index 664c2b1491..0000000000
--- a/examples/demos/rssnews/content/images/busy.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/rssnews/content/images/scrollbar.png b/examples/demos/rssnews/content/images/scrollbar.png
deleted file mode 100644
index 0228dcf9eb..0000000000
--- a/examples/demos/rssnews/content/images/scrollbar.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/rssnews/rssnews.qml b/examples/demos/rssnews/rssnews.qml
deleted file mode 100644
index 72c7170c93..0000000000
--- a/examples/demos/rssnews/rssnews.qml
+++ /dev/null
@@ -1,112 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 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
- width: 800; height: 480
-
- property string currentFeed: "rss.news.yahoo.com/rss/topstories"
- 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 {
- width: 220; height: window.height
- color: "#efefef"
-
- ListView {
- focus: true
- id: categories
- anchors.fill: parent
- model: rssFeeds
- footer: quitButtonDelegate
- 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 - 220; height: window.height
- model: feedModel
- delegate: NewsDelegate {}
- }
- }
- Component {
- id: quitButtonDelegate
- Item {
- width: categories.width; height: 60
- Text {
- text: "Quit"
- font { family: "Helvetica"; pixelSize: 16; bold: true }
- anchors {
- left: parent.left; leftMargin: 15
- verticalCenter: parent.verticalCenter
- }
- }
- MouseArea {
- anchors.fill: parent
- onClicked: Qt.quit()
- }
- }
- }
- ScrollBar { scrollArea: list; height: list.height; width: 8; anchors.right: window.right }
- Rectangle { x: 220; height: window.height; width: 1; color: "#cccccc" }
-}
diff --git a/examples/demos/rssnews/rssnews.qmlproject b/examples/demos/rssnews/rssnews.qmlproject
deleted file mode 100644
index 5becbdaed0..0000000000
--- a/examples/demos/rssnews/rssnews.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-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/examples/demos/samegame/content/Block.qml b/examples/demos/samegame/content/Block.qml
deleted file mode 100644
index 85f2e27d2a..0000000000
--- a/examples/demos/samegame/content/Block.qml
+++ /dev/null
@@ -1,114 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-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/examples/demos/samegame/content/BlockEmitter.qml b/examples/demos/samegame/content/BlockEmitter.qml
deleted file mode 100644
index 7dad509dfd..0000000000
--- a/examples/demos/samegame/content/BlockEmitter.qml
+++ /dev/null
@@ -1,57 +0,0 @@
-/****************************************************************************
-**
-** 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 "../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/examples/demos/samegame/content/Button.qml b/examples/demos/samegame/content/Button.qml
deleted file mode 100644
index aab21ec8c6..0000000000
--- a/examples/demos/samegame/content/Button.qml
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-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/examples/demos/samegame/content/GameArea.qml b/examples/demos/samegame/content/GameArea.qml
deleted file mode 100644
index f3ca98d80e..0000000000
--- a/examples/demos/samegame/content/GameArea.qml
+++ /dev/null
@@ -1,226 +0,0 @@
-/****************************************************************************
-**
-** 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 "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/examples/demos/samegame/content/LogoAnimation.qml b/examples/demos/samegame/content/LogoAnimation.qml
deleted file mode 100644
index c879893e92..0000000000
--- a/examples/demos/samegame/content/LogoAnimation.qml
+++ /dev/null
@@ -1,102 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-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/examples/demos/samegame/content/MenuEmitter.qml b/examples/demos/samegame/content/MenuEmitter.qml
deleted file mode 100644
index 16c766068c..0000000000
--- a/examples/demos/samegame/content/MenuEmitter.qml
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-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/examples/demos/samegame/content/PaintEmitter.qml b/examples/demos/samegame/content/PaintEmitter.qml
deleted file mode 100644
index 4a67c4a2d2..0000000000
--- a/examples/demos/samegame/content/PaintEmitter.qml
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
-**
-** 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 "../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/examples/demos/samegame/content/PrimaryPack.qml b/examples/demos/samegame/content/PrimaryPack.qml
deleted file mode 100644
index 278ed0eae1..0000000000
--- a/examples/demos/samegame/content/PrimaryPack.qml
+++ /dev/null
@@ -1,122 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-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/examples/demos/samegame/content/PuzzleBlock.qml b/examples/demos/samegame/content/PuzzleBlock.qml
deleted file mode 100644
index 8a0e725b16..0000000000
--- a/examples/demos/samegame/content/PuzzleBlock.qml
+++ /dev/null
@@ -1,111 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-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/examples/demos/samegame/content/SamegameText.qml b/examples/demos/samegame/content/SamegameText.qml
deleted file mode 100644
index 28c85f9486..0000000000
--- a/examples/demos/samegame/content/SamegameText.qml
+++ /dev/null
@@ -1,49 +0,0 @@
-/***************************************************************************
-**
-** 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/examples/demos/samegame/content/SimpleBlock.qml b/examples/demos/samegame/content/SimpleBlock.qml
deleted file mode 100644
index 22a1fa3225..0000000000
--- a/examples/demos/samegame/content/SimpleBlock.qml
+++ /dev/null
@@ -1,108 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-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/examples/demos/samegame/content/SmokeText.qml b/examples/demos/samegame/content/SmokeText.qml
deleted file mode 100644
index 73d9ae42da..0000000000
--- a/examples/demos/samegame/content/SmokeText.qml
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-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/examples/demos/samegame/content/gfx/background-puzzle.png b/examples/demos/samegame/content/gfx/background-puzzle.png
deleted file mode 100644
index c2eca5f5dc..0000000000
--- a/examples/demos/samegame/content/gfx/background-puzzle.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/background.png b/examples/demos/samegame/content/gfx/background.png
deleted file mode 100644
index 60f57b650f..0000000000
--- a/examples/demos/samegame/content/gfx/background.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/bar.png b/examples/demos/samegame/content/gfx/bar.png
deleted file mode 100644
index 4953cd6221..0000000000
--- a/examples/demos/samegame/content/gfx/bar.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/blue-puzzle.png b/examples/demos/samegame/content/gfx/blue-puzzle.png
deleted file mode 100644
index e550d5935b..0000000000
--- a/examples/demos/samegame/content/gfx/blue-puzzle.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/blue.png b/examples/demos/samegame/content/gfx/blue.png
deleted file mode 100644
index b8161c0f70..0000000000
--- a/examples/demos/samegame/content/gfx/blue.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/bubble-highscore.png b/examples/demos/samegame/content/gfx/bubble-highscore.png
deleted file mode 100644
index c4e38df824..0000000000
--- a/examples/demos/samegame/content/gfx/bubble-highscore.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/bubble-puzzle.png b/examples/demos/samegame/content/gfx/bubble-puzzle.png
deleted file mode 100644
index 278556bc8d..0000000000
--- a/examples/demos/samegame/content/gfx/bubble-puzzle.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/but-game-1.png b/examples/demos/samegame/content/gfx/but-game-1.png
deleted file mode 100644
index 3343b7ff13..0000000000
--- a/examples/demos/samegame/content/gfx/but-game-1.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/but-game-2.png b/examples/demos/samegame/content/gfx/but-game-2.png
deleted file mode 100644
index afba106962..0000000000
--- a/examples/demos/samegame/content/gfx/but-game-2.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/but-game-3.png b/examples/demos/samegame/content/gfx/but-game-3.png
deleted file mode 100644
index adea77a687..0000000000
--- a/examples/demos/samegame/content/gfx/but-game-3.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/but-game-4.png b/examples/demos/samegame/content/gfx/but-game-4.png
deleted file mode 100644
index 18c922ba45..0000000000
--- a/examples/demos/samegame/content/gfx/but-game-4.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/but-game-new.png b/examples/demos/samegame/content/gfx/but-game-new.png
deleted file mode 100644
index 257e182585..0000000000
--- a/examples/demos/samegame/content/gfx/but-game-new.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/but-menu.png b/examples/demos/samegame/content/gfx/but-menu.png
deleted file mode 100644
index 8440e87759..0000000000
--- a/examples/demos/samegame/content/gfx/but-menu.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/but-puzzle-next.png b/examples/demos/samegame/content/gfx/but-puzzle-next.png
deleted file mode 100644
index 7e3ed417d0..0000000000
--- a/examples/demos/samegame/content/gfx/but-puzzle-next.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/but-quit.png b/examples/demos/samegame/content/gfx/but-quit.png
deleted file mode 100644
index 95c77ced94..0000000000
--- a/examples/demos/samegame/content/gfx/but-quit.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/green-puzzle.png b/examples/demos/samegame/content/gfx/green-puzzle.png
deleted file mode 100644
index 581f76fd8d..0000000000
--- a/examples/demos/samegame/content/gfx/green-puzzle.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/green.png b/examples/demos/samegame/content/gfx/green.png
deleted file mode 100644
index da4cca5e7f..0000000000
--- a/examples/demos/samegame/content/gfx/green.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/icon-fail.png b/examples/demos/samegame/content/gfx/icon-fail.png
deleted file mode 100644
index 40726118a9..0000000000
--- a/examples/demos/samegame/content/gfx/icon-fail.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/icon-ok.png b/examples/demos/samegame/content/gfx/icon-ok.png
deleted file mode 100644
index 15a8442e94..0000000000
--- a/examples/demos/samegame/content/gfx/icon-ok.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/icon-time.png b/examples/demos/samegame/content/gfx/icon-time.png
deleted file mode 100644
index 9490e49e90..0000000000
--- a/examples/demos/samegame/content/gfx/icon-time.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/logo-a.png b/examples/demos/samegame/content/gfx/logo-a.png
deleted file mode 100644
index 20c20ba480..0000000000
--- a/examples/demos/samegame/content/gfx/logo-a.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/logo-e.png b/examples/demos/samegame/content/gfx/logo-e.png
deleted file mode 100644
index dd663f114a..0000000000
--- a/examples/demos/samegame/content/gfx/logo-e.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/logo-g.png b/examples/demos/samegame/content/gfx/logo-g.png
deleted file mode 100644
index a319bf9ffa..0000000000
--- a/examples/demos/samegame/content/gfx/logo-g.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/logo-m.png b/examples/demos/samegame/content/gfx/logo-m.png
deleted file mode 100644
index 6a029b3267..0000000000
--- a/examples/demos/samegame/content/gfx/logo-m.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/logo-s.png b/examples/demos/samegame/content/gfx/logo-s.png
deleted file mode 100644
index 963b17546a..0000000000
--- a/examples/demos/samegame/content/gfx/logo-s.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/logo.png b/examples/demos/samegame/content/gfx/logo.png
deleted file mode 100644
index e900eddb2f..0000000000
--- a/examples/demos/samegame/content/gfx/logo.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/particle-brick.png b/examples/demos/samegame/content/gfx/particle-brick.png
deleted file mode 100644
index 5c83896d22..0000000000
--- a/examples/demos/samegame/content/gfx/particle-brick.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/particle-paint.png b/examples/demos/samegame/content/gfx/particle-paint.png
deleted file mode 100644
index 9bd0a2a13f..0000000000
--- a/examples/demos/samegame/content/gfx/particle-paint.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/particle-smoke.png b/examples/demos/samegame/content/gfx/particle-smoke.png
deleted file mode 100644
index b27f954a79..0000000000
--- a/examples/demos/samegame/content/gfx/particle-smoke.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/red-puzzle.png b/examples/demos/samegame/content/gfx/red-puzzle.png
deleted file mode 100644
index 9ceb17e4d0..0000000000
--- a/examples/demos/samegame/content/gfx/red-puzzle.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/red.png b/examples/demos/samegame/content/gfx/red.png
deleted file mode 100644
index 681810fe3b..0000000000
--- a/examples/demos/samegame/content/gfx/red.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/text-highscore-new.png b/examples/demos/samegame/content/gfx/text-highscore-new.png
deleted file mode 100644
index 50f7fcd0f6..0000000000
--- a/examples/demos/samegame/content/gfx/text-highscore-new.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/text-highscore.png b/examples/demos/samegame/content/gfx/text-highscore.png
deleted file mode 100644
index 7198c277b8..0000000000
--- a/examples/demos/samegame/content/gfx/text-highscore.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/text-no-winner.png b/examples/demos/samegame/content/gfx/text-no-winner.png
deleted file mode 100644
index b4a6685111..0000000000
--- a/examples/demos/samegame/content/gfx/text-no-winner.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/text-p1-go.png b/examples/demos/samegame/content/gfx/text-p1-go.png
deleted file mode 100644
index c7bd2a5e75..0000000000
--- a/examples/demos/samegame/content/gfx/text-p1-go.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/text-p1-won.png b/examples/demos/samegame/content/gfx/text-p1-won.png
deleted file mode 100644
index 41c2eb7c98..0000000000
--- a/examples/demos/samegame/content/gfx/text-p1-won.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/text-p1.png b/examples/demos/samegame/content/gfx/text-p1.png
deleted file mode 100644
index b59c87b977..0000000000
--- a/examples/demos/samegame/content/gfx/text-p1.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/text-p2-go.png b/examples/demos/samegame/content/gfx/text-p2-go.png
deleted file mode 100644
index f03cd93afa..0000000000
--- a/examples/demos/samegame/content/gfx/text-p2-go.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/text-p2-won.png b/examples/demos/samegame/content/gfx/text-p2-won.png
deleted file mode 100644
index 116b7f2e7a..0000000000
--- a/examples/demos/samegame/content/gfx/text-p2-won.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/text-p2.png b/examples/demos/samegame/content/gfx/text-p2.png
deleted file mode 100644
index d4f2bc7335..0000000000
--- a/examples/demos/samegame/content/gfx/text-p2.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/yellow-puzzle.png b/examples/demos/samegame/content/gfx/yellow-puzzle.png
deleted file mode 100644
index 66044c81b4..0000000000
--- a/examples/demos/samegame/content/gfx/yellow-puzzle.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/gfx/yellow.png b/examples/demos/samegame/content/gfx/yellow.png
deleted file mode 100644
index 6bc5d385e3..0000000000
--- a/examples/demos/samegame/content/gfx/yellow.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/samegame/content/levels/TemplateBase.qml b/examples/demos/samegame/content/levels/TemplateBase.qml
deleted file mode 100644
index f0832d447f..0000000000
--- a/examples/demos/samegame/content/levels/TemplateBase.qml
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-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/examples/demos/samegame/content/levels/level0.qml b/examples/demos/samegame/content/levels/level0.qml
deleted file mode 100644
index 5d2fa4faf5..0000000000
--- a/examples/demos/samegame/content/levels/level0.qml
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-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/examples/demos/samegame/content/levels/level1.qml b/examples/demos/samegame/content/levels/level1.qml
deleted file mode 100644
index 4bb15cbe6a..0000000000
--- a/examples/demos/samegame/content/levels/level1.qml
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-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/examples/demos/samegame/content/levels/level2.qml b/examples/demos/samegame/content/levels/level2.qml
deleted file mode 100644
index a319479a60..0000000000
--- a/examples/demos/samegame/content/levels/level2.qml
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-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/examples/demos/samegame/content/levels/level3.qml b/examples/demos/samegame/content/levels/level3.qml
deleted file mode 100644
index 43e82d7694..0000000000
--- a/examples/demos/samegame/content/levels/level3.qml
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-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/examples/demos/samegame/content/levels/level4.qml b/examples/demos/samegame/content/levels/level4.qml
deleted file mode 100644
index 46ad42f709..0000000000
--- a/examples/demos/samegame/content/levels/level4.qml
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-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/examples/demos/samegame/content/levels/level5.qml b/examples/demos/samegame/content/levels/level5.qml
deleted file mode 100644
index 3716264993..0000000000
--- a/examples/demos/samegame/content/levels/level5.qml
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-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/examples/demos/samegame/content/levels/level6.qml b/examples/demos/samegame/content/levels/level6.qml
deleted file mode 100644
index 4547b75a37..0000000000
--- a/examples/demos/samegame/content/levels/level6.qml
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-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/examples/demos/samegame/content/levels/level7.qml b/examples/demos/samegame/content/levels/level7.qml
deleted file mode 100644
index 5d71d7cb51..0000000000
--- a/examples/demos/samegame/content/levels/level7.qml
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-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/examples/demos/samegame/content/levels/level8.qml b/examples/demos/samegame/content/levels/level8.qml
deleted file mode 100644
index 9dbb8c2d5f..0000000000
--- a/examples/demos/samegame/content/levels/level8.qml
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-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/examples/demos/samegame/content/levels/level9.qml b/examples/demos/samegame/content/levels/level9.qml
deleted file mode 100644
index 4e8bf19e26..0000000000
--- a/examples/demos/samegame/content/levels/level9.qml
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-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/examples/demos/samegame/content/samegame.js b/examples/demos/samegame/content/samegame.js
deleted file mode 100755
index 7b226cb42f..0000000000
--- a/examples/demos/samegame/content/samegame.js
+++ /dev/null
@@ -1,581 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-
-/* 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 behaviour 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/examples/demos/samegame/main.cpp b/examples/demos/samegame/main.cpp
deleted file mode 100644
index 20bf7fad18..0000000000
--- a/examples/demos/samegame/main.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(samegame)
diff --git a/examples/demos/samegame/samegame.pro b/examples/demos/samegame/samegame.pro
deleted file mode 100644
index 2f7afef5a5..0000000000
--- a/examples/demos/samegame/samegame.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-TEMPLATE = app
-
-QT += qml quick
-SOURCES += main.cpp
-
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/samegame
-qml.files = samegame.qml content settings.js
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/samegame
-sources.files = $$SOURCES samegame.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
diff --git a/examples/demos/samegame/samegame.qml b/examples/demos/samegame/samegame.qml
deleted file mode 100644
index 2b0b82a37c..0000000000
--- a/examples/demos/samegame/samegame.qml
+++ /dev/null
@@ -1,371 +0,0 @@
-/****************************************************************************
-**
-** 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/samegame.js" as Logic
-import "settings.js" as Settings
-import "content"
-
-Rectangle {
- id: root
- width: 320; height: 480
- 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: quitButton.right; 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/examples/demos/samegame/samegame.qmlproject b/examples/demos/samegame/samegame.qmlproject
deleted file mode 100644
index 42ffacf4f8..0000000000
--- a/examples/demos/samegame/samegame.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "samegame.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/demos/samegame/settings.js b/examples/demos/samegame/settings.js
deleted file mode 100644
index e09dee9af3..0000000000
--- a/examples/demos/samegame/settings.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************************
-**
-** 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/examples/demos/stocqt/content/Button.qml b/examples/demos/stocqt/content/Button.qml
deleted file mode 100644
index 0e99c52c51..0000000000
--- a/examples/demos/stocqt/content/Button.qml
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-Rectangle {
- id:button
- property bool buttonEnabled:true
- radius:5
- width:25
- height:25
- color:buttonEnabled ? "steelblue" : "gray"
- MouseArea {
- anchors.fill:parent
- onClicked: {
- if (buttonEnabled)
- buttonEnabled = false;
- else
- buttonEnabled = true;
- }
- }
-}
diff --git a/examples/demos/stocqt/content/DatePicker.qml b/examples/demos/stocqt/content/DatePicker.qml
deleted file mode 100644
index 82d8788bd9..0000000000
--- a/examples/demos/stocqt/content/DatePicker.qml
+++ /dev/null
@@ -1,122 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-Rectangle {
- id:root
- color:"transparent"
- width:300
- height:45
- property var _monthNames : [ "JAN", "FEB", "MAR", "APR", "MAY", "JUN","JUL", "AUG", "SEP", "OCT", "NOV", "DEC" ];
- property var date:new Date()
-
- onDateChanged: {
- month.text = root._monthNames[root.date.getMonth()]
- day.text = date.getDate();
- year.text = date.getFullYear();
- }
- Row {
- spacing:20
- anchors.fill:parent
-
- Rectangle {
- height:root.height
- width:root.width/3 - 20
- color:"#272822"
- radius:5
-
- TextInput {
- id:month
- anchors.centerIn:parent
- color:"#ecc089"
- font.pointSize:25
- font.bold:true
- text:root._monthNames[root.date.getMonth()]
- onAccepted : {
- for (var i = 0; i < 12; i++) {
- if (text === root._monthNames[i]) {
- root.date.setMonth(i);
- root.date = root.date;
- return;
- }
- }
- root.date = root.date;
- }
- }
- }
-
- Rectangle {
- height:root.height
- width:root.width/3 - 20
- color:"#272822"
- radius:5
-
- TextInput {
- id:day
- anchors.centerIn:parent
- color:"#ecc089"
- font.pointSize:25
- font.bold:true
- text:root.date.getDate()
- validator:IntValidator {bottom:1; top:31}
- onAccepted: { root.date.setDate(text); root.date = root.date;}
- }
- }
-
- Rectangle {
- height:root.height
- width:root.width/3 - 20
- color:"#272822"
- radius:5
-
- TextInput {
- id:year
- anchors.centerIn:parent
- color:"#ecc089"
- font.pointSize:25
- font.bold:true
- text:root.date.getFullYear()
- validator:IntValidator {bottom:1995; top:(new Date()).getFullYear()}
- onAccepted:{ root.date.setFullYear(text); root.date = root.date;}
- }
- }
- }
-}
diff --git a/examples/demos/stocqt/content/StockChart.qml b/examples/demos/stocqt/content/StockChart.qml
deleted file mode 100644
index c7411679bb..0000000000
--- a/examples/demos/stocqt/content/StockChart.qml
+++ /dev/null
@@ -1,324 +0,0 @@
-/****************************************************************************
-**
-** 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
-Rectangle {
- id:chart
- width:320
- height:320
- color:"transparent"
- property var _months : [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ]
- property var stockModel:null
- property var startDate
- property var endDate
- property var settings
-
- function update() {
- if (settings.chartType === "year")
- chart.startDate = new Date(chart.endDate.getFullYear() - 1, chart.endDate.getMonth(), chart.endDate.getDate());
- else if (settings.chartType === "month")
- chart.startDate = new Date(chart.endDate.getFullYear() , chart.endDate.getMonth() -1, chart.endDate.getDate())
- else if (settings.chartType === "week")
- chart.startDate = new Date(chart.endDate.getFullYear() , chart.endDate.getMonth(), chart.endDate.getDate() - 7)
- else
- chart.startDate = new Date(1995, 3, 25)
-
- canvas.requestPaint();
- }
-
-
- Text {
- id:fromDate
- color:"#6a5b44"
- width:50
- font.pointSize: 10
- wrapMode: Text.WordWrap
- anchors.left: parent.left
- anchors.leftMargin: 20
- anchors.top:parent.top
- text:_months[startDate.getMonth()] + "\n" + startDate.getFullYear()
- }
-
- Text {
- id:toDate
- color:"#6a5b44"
- font.pointSize: 10
- width:50
- wrapMode: Text.WordWrap
- anchors.right: parent.right
- anchors.leftMargin: 20
- anchors.top:parent.top
- text:_months[endDate.getMonth()] + "\n" + endDate.getFullYear()
- }
-
- Canvas {
- id:canvas
- anchors.top : toDate.bottom
- width:parent.width
- anchors.bottom: parent.bottom
-
- renderTarget: Canvas.FramebufferObject
- property int frames:first
- property int mouseX:0;
- property int mouseY:0;
- property int mousePressedX:0;
- property int mousePressedY:0;
- property int movedY:0
- property real scaleX:1.0;
- property real scaleY:1.0;
- property int first:0;
- property int last:0;
-
-// MouseArea {
-// anchors.fill: parent
-
-// onPositionChanged: {
-// if (mouse.modifiers & Qt.ControlModifier) {
-// if (canvas.mouseX == 0 && canvas.mouseY == 0) {
-// canvas.mouseX = mouse.x;
-// canvas.mouseY = mouse.y;
-// }
-// } else{
-// var w = (view.width/view.count)*canvas.scaleX;
-
-// //canvas.movedY += Math.round((canvas.mousePressedY - mouse.y)/2);
-
-// var movedX = Math.round((canvas.mousePressedX - mouse.x)/w);
-// if (movedX != 0 || canvas.movedY != 0) {
-// if (canvas.first + movedX >= 0 && canvas.last + movedX < view.count) {
-// canvas.first += movedX;
-// canvas.last += movedX;
-// }
-// canvas.requestPaint();
-// }
-// }
-// }
-
-// onPressed: {
-// canvas.mousePressedX = mouse.x;
-// canvas.mousePressedY = mouse.y;
-// }
-
-// onReleased : {
-// if (mouse.modifiers & Qt.ControlModifier) {
-// var sx = mouse.x - canvas.mouseX;
-// var sy = canvas.mouseY - mouse.y;
-
-// if (Math.abs(sx) < 50) sx = 0;
-// if (Math.abs(sy) < 50) sy = 0;
-
-// if (sx > 0)
-// canvas.scaleX *= sx/100 +1;
-// else
-// canvas.scaleX *= 1/(-sx/100 + 1);
-
-// if (sy > 0)
-// canvas.scaleY *= sy/100 +1;
-// else
-// canvas.scaleY *= 1/(-sy/100 + 1);
-
-// if (canvas.scaleX < 1)
-// canvas.scaleX = 1;
-
-// //console.log("scaleX:" + canvas.scaleX + ", scaleY:" + canvas.scaleY);
-
-// canvas.first = Math.round(view.currentIndex - view.currentIndex / canvas.scaleX);
-// canvas.last = Math.round(view.currentIndex + (view.count - view.currentIndex) / canvas.scaleX);
-
-// canvas.mouseX = 0;
-// canvas.mouseY = 0;
-// canvas.mousePressedX = 0;
-// canvas.mousePressedY = 0;
-// canvas.requestPaint();
-// }
-// }
-// }
-
- function drawBackground(ctx) {
- ctx.save();
- ctx.fillStyle = "#272822"
- ctx.fillRect(0, 0, canvas.width, canvas.height)
- ctx.strokeStyle = "#423a2f"
- ctx.beginPath();
- for (var i = 0; i < 10; i++) {
- ctx.moveTo(0, i * (canvas.height/10.0));
- ctx.lineTo(canvas.width, i * (canvas.height/10.0));
- }
-
- for (i = 0; i < 12; i++) {
- ctx.moveTo(i * (canvas.width/12.0), 0);
- ctx.lineTo(i * (canvas.width/12.0), canvas.height);
- }
- ctx.stroke();
-
- ctx.strokeStyle = "#5c7a37"
- ctx.beginPath();
- ctx.moveTo(8 * (canvas.width/12.0), 0);
- ctx.lineTo(8 * (canvas.width/12.0), canvas.height);
- ctx.stroke();
-
- ctx.restore();
- }
-
- function drawPrice(ctx, from, to, color, price, points, highest)
- {
- ctx.save();
- ctx.globalAlpha = 0.7;
- ctx.strokeStyle = color;
- ctx.lineWidth = 1;
- ctx.beginPath();
-
- var w = canvas.width/points.length;
- var end = points.length;
- for (var i = 0; i < end; i++) {
- var x = points[i].x;
- var y = points[i][price];
- y = canvas.height * y/highest;
- if (i == 0) {
- ctx.moveTo(x+w/2, y);
- } else {
- ctx.lineTo(x+w/2, y);
- }
- }
- ctx.stroke();
- ctx.restore();
- }
-
- function drawKLine(ctx, from, to, points, highest)
- {
- ctx.save();
- ctx.globalAlpha = 0.4;
- ctx.lineWidth = 2;
- var end = points.length;
- for (var i = 0; i < end; i++) {
- var x = points[i].x;
- var open = canvas.height * points[i].open/highest - canvas.movedY;
- var close = canvas.height * points[i].close/highest - canvas.movedY;
- var high = canvas.height * points[i].high/highest - canvas.movedY;
- var low = canvas.height * points[i].low/highest - canvas.movedY;
-
- var top, bottom;
- if (close <= open) {
- ctx.fillStyle = Qt.rgba(1, 0, 0, 1);
- ctx.strokeStyle = Qt.rgba(1, 0, 0, 1);
- top = close;
- bottom = open;
- } else {
- ctx.fillStyle = Qt.rgba(0, 1, 0, 1);
- ctx.strokeStyle = Qt.rgba(0, 1, 0, 1);
- top = open;
- bottom = close;
- }
-
- var w1, w2;
- w1 = canvas.width/points.length;
- w2 = w1 > 10 ? w1/2 : w1;
-
- ctx.fillRect(x + (w1 - w2)/2, top, w2, bottom - top);
- ctx.beginPath();
- ctx.moveTo(x+w1/2, high);
- ctx.lineTo(x+w1/2, low);
- ctx.stroke();
- }
- ctx.restore();
- }
-
- function drawVolume(ctx, from, to, color, price, points, highest)
- {
- ctx.save();
- ctx.fillStyle = color;
- ctx.globalAlpha = 0.6;
- ctx.strokeStyle = Qt.rgba(0.8, 0.8, 0.8, 1);
- ctx.lineWidth = 1;
-
- var end = points.length;
- for (var i = 0; i < end; i++) {
- var x = points[i].x;
- var y = points[i][price];
- y = canvas.height * (1 - y/highest);
- ctx.fillRect(x, y, canvas.width/points.length, canvas.height - y);
- }
- ctx.restore();
- }
-
- onPaint: {
- var ctx = canvas.getContext("2d");
-
- ctx.globalCompositeOperation = "source-over";
- ctx.lineWidth = 1;
-
- drawBackground(ctx);
- if (!stockModel.ready)
- return;
-
- last = stockModel.indexOf(chart.endDate)
- first = last - (chart.endDate.getTime() - chart.startDate.getTime())/86400000;
- console.log("painting... first:" + first + ", last:" + last);
-
- var highestPrice = stockModel.highestPrice;
- var highestVolume = stockModel.highestVolume;
- console.log("highest price:" + highestPrice + ", highest volume:" + highestVolume)
- var points = [];
- for (var i = 0; i <= last - first; i++) {
- var price = stockModel.get(i + first);
- points.push({
- x: i*canvas.width/(last-first+1),
- open: price.open,
- close: price.close,
- high:price.high,
- low:price.low,
- volume:price.volume
- });
- }
- if (settings.drawHighPrice)
- drawPrice(ctx, first, last, settings.highColor,"high", points, highestPrice);
- if (settings.drawLowPrice)
- drawPrice(ctx, first, last, settings.lowColor,"low", points, highestPrice);
- if (settings.drawOpenPrice)
- drawPrice(ctx, first, last,settings.openColor,"open", points, highestPrice);
- if (settings.drawClosePrice)
- drawPrice(ctx, first, last, settings.closeColor,"close", points, highestPrice);
- if (settings.drawVolume)
- drawVolume(ctx, first, last, settings.volumeColor,"volume", points, highestVolume);
- if (settings.drawKLine)
- drawKLine(ctx, first, last, points, highestPrice);
- }
-}
-}
diff --git a/examples/demos/stocqt/content/StockListModel.qml b/examples/demos/stocqt/content/StockListModel.qml
deleted file mode 100644
index b1e0706a3a..0000000000
--- a/examples/demos/stocqt/content/StockListModel.qml
+++ /dev/null
@@ -1,147 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-ListModel {
- id:stocks
- //Data from : http://en.wikipedia.org/wiki/NASDAQ-100
-
- ListElement {name:"Activision Blizzard"; stockId:"ATVI"}
- ListElement {name:"Adobe Systems Incorporated"; stockId:"ADBE"}
- ListElement {name:"Akamai Technologies, Inc"; stockId:"AKAM"}
- ListElement {name:"Alexion Pharmaceuticals"; stockId:"ALXN"}
- ListElement {name:"Altera Corporation"; stockId:"ALTR"}
- ListElement {name:"Amazon.com, Inc."; stockId:"AMZN"}
- ListElement {name:"Amgen Inc."; stockId:"AMGN"}
- ListElement {name:"Apollo Group, Inc."; stockId:"APOL"}
- ListElement {name:"Apple Inc."; stockId:"AAPL"}
- ListElement {name:"Applied Materials, Inc."; stockId:"AMAT"}
- ListElement {name:"Autodesk, Inc."; stockId:"ADSK"}
- ListElement {name:"Automatic Data Processing, Inc."; stockId:"ADP"}
- ListElement {name:"Baidu.com, Inc."; stockId:"BIDU"}
- ListElement {name:"Bed Bath & Beyond Inc."; stockId:"BBBY"}
- ListElement {name:"Biogen Idec, Inc"; stockId:"BIIB"}
- ListElement {name:"BMC Software, Inc."; stockId:"BMC"}
- ListElement {name:"Broadcom Corporation"; stockId:"BRCM"}
- ListElement {name:"C. H. Robinson Worldwide, Inc."; stockId:"CHRW"}
- ListElement {name:"CA, Inc."; stockId:"CA"}
- ListElement {name:"Celgene Corporation"; stockId:"CELG"}
- ListElement {name:"Cephalon, Inc."; stockId:"CEPH"}
- ListElement {name:"Cerner Corporation"; stockId:"CERN"}
- ListElement {name:"Check Point Software Technologies Ltd."; stockId:"CHKP"}
- ListElement {name:"Cisco Systems, Inc."; stockId:"CSCO"}
- ListElement {name:"Citrix Systems, Inc."; stockId:"CTXS"}
- ListElement {name:"Cognizant Technology Solutions Corporation"; stockId:"CTSH"}
- ListElement {name:"Comcast Corporation"; stockId:"CMCSA"}
- ListElement {name:"Costco Wholesale Corporation"; stockId:"COST"}
- ListElement {name:"Ctrip.com International, Ltd."; stockId:"CTRP"}
- ListElement {name:"Dell Inc."; stockId:"DELL"}
- ListElement {name:"DENTSPLY International Inc."; stockId:"XRAY"}
- ListElement {name:"DirecTV"; stockId:"DTV"}
- ListElement {name:"Dollar Tree, Inc."; stockId:"DLTR"}
- ListElement {name:"eBay Inc."; stockId:"EBAY"}
- ListElement {name:"Electronic Arts Inc."; stockId:"ERTS"}
- ListElement {name:"Expedia, Inc."; stockId:"EXPE"}
- ListElement {name:"Expeditors International of Washington, Inc."; stockId:"EXPD"}
- ListElement {name:"Express Scripts, Inc."; stockId:"ESRX"}
- ListElement {name:"F5 Networks, Inc."; stockId:"FFIV"}
- ListElement {name:"Fastenal Company"; stockId:"FAST"}
- ListElement {name:"First Solar, Inc."; stockId:"FSLR"}
- ListElement {name:"Fiserv, Inc."; stockId:"FISV"}
- ListElement {name:"Flextronics International Ltd."; stockId:"FLEX"}
- ListElement {name:"FLIR Systems, Inc."; stockId:"FLIR"}
- ListElement {name:"Garmin Ltd."; stockId:"GRMN"}
- ListElement {name:"Gilead Sciences, Inc."; stockId:"GILD"}
- ListElement {name:"Google Inc."; stockId:"GOOG"}
- ListElement {name:"Green Mountain Coffee Roasters, Inc."; stockId:"GMCR"}
- ListElement {name:"Henry Schein, Inc."; stockId:"HSIC"}
- ListElement {name:"Illumina, Inc."; stockId:"ILMN"}
- ListElement {name:"Infosys Technologies"; stockId:"INFY"}
- ListElement {name:"Intel Corporation"; stockId:"INTC"}
- ListElement {name:"Intuit, Inc."; stockId:"INTU"}
- ListElement {name:"Intuitive Surgical Inc."; stockId:"ISRG"}
- ListElement {name:"Joy Global Inc."; stockId:"JOYG"}
- ListElement {name:"KLA Tencor Corporation"; stockId:"KLAC"}
- ListElement {name:"Lam Research Corporation"; stockId:"LRCX"}
- ListElement {name:"Liberty Media Corporation, Interactive Series A"; stockId:"LINTA"}
- ListElement {name:"Life Technologies Corporation"; stockId:"LIFE"}
- ListElement {name:"Linear Technology Corporation"; stockId:"LLTC"}
- ListElement {name:"Marvell Technology Group, Ltd."; stockId:"MRVL"}
- ListElement {name:"Mattel, Inc."; stockId:"MAT"}
- ListElement {name:"Maxim Integrated Products"; stockId:"MXIM"}
- ListElement {name:"Microchip Technology Incorporated"; stockId:"MCHP"}
- ListElement {name:"Micron Technology, Inc."; stockId:"MU"}
- ListElement {name:"Microsoft Corporation"; stockId:"MSFT"}
- ListElement {name:"Mylan, Inc."; stockId:"MYL"}
- ListElement {name:"NetApp, Inc."; stockId:"NTAP"}
- ListElement {name:"Netflix, Inc."; stockId:"NFLX"}
- ListElement {name:"News Corporation, Ltd."; stockId:"NWSA"}
- ListElement {name:"NII Holdings, Inc."; stockId:"NIHD"}
- ListElement {name:"NVIDIA Corporation"; stockId:"NVDA"}
- ListElement {name:"O'Reilly Automotive, Inc."; stockId:"ORLY"}
- ListElement {name:"Oracle Corporation"; stockId:"ORCL"}
- ListElement {name:"PACCAR Inc."; stockId:"PCAR"}
- ListElement {name:"Paychex, Inc."; stockId:"PAYX"}
- ListElement {name:"Priceline.com, Incorporated"; stockId:"PCLN"}
- ListElement {name:"Qiagen N.V."; stockId:"QGEN"}
- ListElement {name:"QUALCOMM Incorporated"; stockId:"QCOM"}
- ListElement {name:"Research in Motion Limited"; stockId:"RIMM"}
- ListElement {name:"Ross Stores Inc."; stockId:"ROST"}
- ListElement {name:"SanDisk Corporation"; stockId:"SNDK"}
- ListElement {name:"Seagate Technology Holdings"; stockId:"STX"}
- ListElement {name:"Sears Holdings Corporation"; stockId:"SHLD"}
- ListElement {name:"Sigma-Aldrich Corporation"; stockId:"SIAL"}
- ListElement {name:"Staples Inc."; stockId:"SPLS"}
- ListElement {name:"Starbucks Corporation"; stockId:"SBUX"}
- ListElement {name:"Stericycle, Inc"; stockId:"SRCL"}
- ListElement {name:"Symantec Corporation"; stockId:"SYMC"}
- ListElement {name:"Teva Pharmaceutical Industries Ltd."; stockId:"TEVA"}
- ListElement {name:"Urban Outfitters, Inc."; stockId:"URBN"}
- ListElement {name:"VeriSign, Inc."; stockId:"VRSN"}
- ListElement {name:"Vertex Pharmaceuticals"; stockId:"VRTX"}
- ListElement {name:"Virgin Media, Inc."; stockId:"VMED"}
- ListElement {name:"Vodafone Group, plc."; stockId:"VOD"}
- ListElement {name:"Warner Chilcott, Ltd."; stockId:"WCRX"}
- ListElement {name:"Whole Foods Market, Inc."; stockId:"WFM"}
- ListElement {name:"Wynn Resorts Ltd."; stockId:"WYNN"}
- ListElement {name:"Xilinx, Inc."; stockId:"XLNX"}
- ListElement {name:"Yahoo! Inc."; stockId:"YHOO"}
-}
diff --git a/examples/demos/stocqt/content/StockListView.qml b/examples/demos/stocqt/content/StockListView.qml
deleted file mode 100644
index c241efb54c..0000000000
--- a/examples/demos/stocqt/content/StockListView.qml
+++ /dev/null
@@ -1,87 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-Rectangle {
- id:root
- width:320
- height:480
- color:"#423A2F"
-
- property string currentStockId:""
- property string currentStockName:""
-
- ListView {
- id:view
- anchors.fill:parent
- keyNavigationWraps:true
- focus:true
- snapMode: ListView.SnapToItem
- model:StockListModel{}
-
- onCurrentIndexChanged: {
- root.currentStockId = model.get(currentIndex).stockId
- root.currentStockName = model.get(currentIndex).name
- console.log("current stock:" + root.currentStockId + " - " + root.currentStockName)
- }
-
- delegate:Rectangle {
- height:30
- width:parent.width
- color:"transparent"
- MouseArea {
- anchors.fill: parent
- onClicked:view.currentIndex = index
- }
-
- Text {
- anchors.verticalCenter : parent.top
- anchors.verticalCenterOffset : 15
- color:index == view.currentIndex ? "#ECC089" : "#A58963"
- font.pointSize:12
- font.bold:true
- text:" " + stockId + " - " + name
- }
- }
-
- highlight:Image {height:30; width:parent.width; source:"images/stock-selected.png"}
- }
-} \ No newline at end of file
diff --git a/examples/demos/stocqt/content/StockModel.qml b/examples/demos/stocqt/content/StockModel.qml
deleted file mode 100644
index b5a78548e4..0000000000
--- a/examples/demos/stocqt/content/StockModel.qml
+++ /dev/null
@@ -1,160 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-ListModel {
- id:model
- property string stockId:""
- property string stockName:""
- property var startDate
- property var endDate
- property string stockDataCycle:"d"
- property bool ready:false
- property real stockPrice:0.0
- property real stockPriceChanged:0.0
- property real highestPrice:0
- property real highestVolume:0
-
- signal dataReady
-
- function indexOf(date) {
- var end = new Date(model.get(0).date)
- var start = new Date(model.get(model.count - 1).date)
- if (end <= date)
- return model.count -1;
-
- if (start >= date)
- return 0;
-
- for (var i = 0; i < model.count; i++) {
- var d = new Date(model.get(i).date)
- if ( d === date)
- return i;
- }
- return -1;
- }
-
- function requestUrl() {
- if (stockId === "")
- return;
-
- if (startDate === undefined)
- startDate = new Date(1995, 3, 25) //default: 25 April 1995
-
- if (endDate === undefined)
- endDate = new Date(); //today
-
- if (stockDataCycle !== "d" && stockDataCycle !== "w" && stockDataCycle !== "m")
- stockDataCycle = "d";
-
- /*
- Fetch stock data from yahoo finance:
- url: http://ichart.finance.yahoo.com/table.csv?s=NOK&a=5&b=11&c=2010&d=7&e=23&f=2010&g=d&ignore=.csv
- s:stock name/id, a:start day, b:start month, c:start year default: 25 April 1995, oldest c= 1962
- d:end day, e:end month, f:end year, default:today (data only available 3 days before today)
- g:data cycle(d daily, w weekly, m monthly, v Dividend)
- */
- var request = "http://ichart.finance.yahoo.com/table.csv?";
- request += "s=" + stockId;
- request += "&a=" + startDate.getDate();
- request += "&b=" + startDate.getMonth();
- request += "&c=" + startDate.getFullYear();
- request += "&d=" + endDate.getDate();
- request += "&e=" + endDate.getMonth();
- request += "&f=" + endDate.getFullYear();
- request += "&g=" + stockDataCycle;
- request += "&ignore=.csv";
- return request;
- }
-
- function createStockPrice(r) {
- if (highestPrice < r[2])
- highestPrice = r[2];
- if (highestVolume < r[5])
- highestVolume = r[5];
- return {
- "date": r[0],
- "open":r[1],
- "high":r[2],
- "low":r[3],
- "close":r[4],
- "volume":r[5],
- "adjusted":r[6]
- };
- }
-
- function updateStock() {
- var xhr = new XMLHttpRequest;
-
- var req = requestUrl();
- console.log("getting " + req + " .....");
-
- xhr.open("GET", req);
-
-
- model.ready = false;
- model.clear();
- var i = 1; //skip the first line
- xhr.onreadystatechange = function() {
- if (xhr.readyState === XMLHttpRequest.LOADING || xhr.readyState === XMLHttpRequest.DONE) {
- var records = xhr.responseText.split('\n');
- console.log("Updating:" + (records.length - i) + " records for " + model.stockId + " from:" + model.startDate + " to " + model.endDate)
-
- for (;i < records.length; i++ ) {
- var r = records[i].split(',');
- if (r.length === 7)
- model.append(createStockPrice(r));
- }
-
- if (xhr.readyState === XMLHttpRequest.DONE) {
- if (model.count > 0) {
- console.log("done, total:" + model.count);
- model.ready = true;
- model.stockPrice = model.get(0).adjusted
- model.stockPriceChanged = Math.round((model.stockPrice - model.get(2).adjusted) * 100) / 100
- model.dataReady(); //emit signal
- }
- }
- }
- }
- xhr.send()
- }
-}
diff --git a/examples/demos/stocqt/content/StockSettings.qml b/examples/demos/stocqt/content/StockSettings.qml
deleted file mode 100644
index 600747b969..0000000000
--- a/examples/demos/stocqt/content/StockSettings.qml
+++ /dev/null
@@ -1,317 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-Rectangle {
- id:root
- width:320
- height:480
- color:"#423A2F"
- property var startDate : startDatePicker.date;
- property var endDate : endDatePicker.date;
-
- property bool drawHighPrice:highButton.buttonEnabled
- property bool drawLowPrice:lowButton.buttonEnabled
- property bool drawOpenPrice:openButton.buttonEnabled
- property bool drawClosePrice:closeButton.buttonEnabled
- property bool drawVolume:volumeButton.buttonEnabled
- property bool drawKLine:klineButton.buttonEnabled
-
- property color highColor:Qt.rgba(1, 0, 0, 1)
- property color lowColor:Qt.rgba(0, 1, 0, 1)
- property color openColor:Qt.rgba(0, 0, 1, 1)
- property color closeColor:"#ecc088"
- property color volumeColor:Qt.rgba(0.3, 0.5, 0.7, 1)
-
- property string chartType:"year"
- Image {
- id:logo
- source:"images/logo.png"
- anchors.horizontalCenter : parent.horizontalCenter
- anchors.top:parent.top
- anchors.topMargin:15
- }
-
- Text {
- id:startDateText
- text:"START DATE:"
- color:"#76644A"
- font.pointSize:15
- anchors.left:parent.left
- anchors.leftMargin:20
- anchors.top:logo.bottom
- anchors.topMargin:20
- }
-
- DatePicker {
- id:startDatePicker
- anchors.left:parent.left
- anchors.leftMargin:30
- anchors.top:startDateText.bottom
- anchors.topMargin:15
- date : new Date(1995, 3, 25)
- }
-
- Text {
- id:endDateText
- text:"END DATE:"
- color:"#76644A"
- font.pointSize:15
- anchors.left:parent.left
- anchors.leftMargin:20
- anchors.top:startDatePicker.bottom
- anchors.topMargin:20
- }
-
- DatePicker {
- id:endDatePicker
- anchors.left:parent.left
- anchors.leftMargin:30
- anchors.top:endDateText.bottom
- anchors.topMargin:15
- }
-
- Text {
- id:drawOptionsText
- text:"DRAW OPTIONS:"
- color:"#76644A"
- font.pointSize:15
- anchors.left:parent.left
- anchors.leftMargin:20
- anchors.top:endDatePicker.bottom
- anchors.topMargin:20
- }
- Column {
- id:drawOptions
- anchors.top:drawOptionsText.bottom
- anchors.topMargin: 20
- anchors.left: parent.left
- anchors.leftMargin: 30
- spacing:2
- Row{
- spacing:10
- Text {
- text:"High "
- color:"#76644A"
- font.pointSize:15
- }
-
- Button {
- id:highButton
- buttonEnabled:false
- }
-
- Text {
- text:"Low "
- color:"#76644A"
- font.pointSize:15
- }
-
- Button {
- id:lowButton
- buttonEnabled:false
- }
-
- Text {
- text:"Open "
- color:"#76644A"
- font.pointSize:15
- }
- Button {
- id:openButton
- buttonEnabled:false
- }
- }
- Row{
- spacing:10
- Text {
- text:"Close "
- color:"#76644A"
- font.pointSize:15
- }
- Button {
- id:closeButton
- buttonEnabled:true
- }
- Text {
- text:"Volume"
- color:"#76644A"
- font.pointSize:15
- }
- Button {
- id:volumeButton
- buttonEnabled:true
- }
- Text {
- text:"K Line"
- color:"#76644A"
- font.pointSize:15
- }
- Button {
- id:klineButton
- buttonEnabled:false
- }
- }
- }
-
-
- Text {
- id:chartTypeText
- text:"CHART TYPE:"
- color:"#76644A"
- font.pointSize:15
- anchors.left:parent.left
- anchors.leftMargin:20
- anchors.top:drawOptions.bottom
- anchors.topMargin:20
- }
- Row {
- anchors.left: parent.left
- anchors.leftMargin: 20
- anchors.top : chartTypeText.bottom
- anchors.topMargin: 20
- spacing:10
- Rectangle {
- id:yearView
- width:70
- height:30
- radius:10
- color:"steelblue"
- Text {
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.fill: parent
- font.pointSize: 15
- text:"YEAR"
- }
- MouseArea {
- anchors.fill: parent
- onClicked: {
- if (root.chartType != "year") {
- root.chartType = "year";
- yearView.color = "steelblue"
- monthView.color = "gray"
- weekView.color = "gray"
- allView.color = "gray"
- }
- }
- }
- }
- Rectangle {
- id:monthView
- width:70
- radius:10
- height:30
- color:"gray"
- Text {
- anchors.fill: parent
- anchors.horizontalCenter: parent.horizontalCenter
- font.pointSize: 15
- color:"#ecc089"
- text:"MONTH"
- }
- MouseArea {
- anchors.fill: parent
- onClicked: {
- if (root.chartType != "month") {
- root.chartType = "month";
- yearView.color = "gray"
- monthView.color = "steelblue"
- weekView.color = "gray"
- allView.color = "gray"
- }
- }
- }
-
- }
- Rectangle {
- id:weekView
- height:30
- width:70
- radius:10
- color:"gray"
- Text {
- anchors.fill: parent
- anchors.horizontalCenter: parent.horizontalCenter
- font.pointSize: 15
- color:"#ecc089"
- text:"WEEK"
- }
- MouseArea {
- anchors.fill: parent
- onClicked: {
- if (root.chartType != "week") {
- root.chartType = "week";
- yearView.color = "gray"
- monthView.color = "gray"
- weekView.color = "steelblue"
- allView.color = "gray"
- }
- }
- }
- }
- Rectangle {
- id:allView
- width:70
- radius:10
- height:30
- color:"gray"
- Text {
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.fill: parent
- font.pointSize: 15
- color:"#ecc089"
- text:"ALL"
- }
- MouseArea {
- anchors.fill: parent
- onClicked: {
- if (root.chartType != "all") {
- root.chartType = "all";
- yearView.color = "gray"
- monthView.color = "gray"
- weekView.color = "gray"
- allView.color = "steelblue"
- }
- }
- }
- }
- }
-}
diff --git a/examples/demos/stocqt/content/StockView.qml b/examples/demos/stocqt/content/StockView.qml
deleted file mode 100644
index 49e6c98622..0000000000
--- a/examples/demos/stocqt/content/StockView.qml
+++ /dev/null
@@ -1,129 +0,0 @@
-/****************************************************************************
-**
-** 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
-Rectangle {
- id:root
- width:320
- height:480
- color:"#423A2F"
- property var stock:null
- property var stocklist:null
- property var settings:null
- signal listViewClicked
- signal settingsClicked
-
- function update() {
- chart.endDate = settings.endDate
- chart.update()
- }
-
- Rectangle {
- color:"#272822"
- anchors.fill:parent
- radius:20
-
- Image {
- source:"images/icon-items.png"
- anchors.left:parent.left
- anchors.leftMargin:10
- anchors.top:parent.top
- anchors.topMargin:10
- MouseArea {
- anchors.fill:parent
- onClicked:listViewClicked()
- }
- }
- Image {
- source:"images/icon-settings.png"
- anchors.right:parent.right
- anchors.rightMargin:10
- anchors.top:parent.top
- anchors.topMargin:10
- MouseArea {
- anchors.fill:parent
- onClicked:settingsClicked()
- }
- }
-
- Text {
- id:desc
- anchors.left:parent.left
- anchors.leftMargin:20
- anchors.top:parent.top
- anchors.topMargin:40
- color:"#564c3A"
- font.pointSize:15
- text:root.stock.stockId + " - " + root.stock.stockName
- }
-
- Text {
- id:price
- anchors.left:parent.left
- anchors.leftMargin:20
- anchors.top:desc.bottom
- anchors.topMargin:5
- color:"#ECC089"
- font.pointSize:30
- text:root.stock.stockPrice
- }
-
- Text {
- id:priceChange
- anchors.left:parent.left
- anchors.leftMargin:20
- anchors.top:price.bottom
- anchors.topMargin:5
- color: root.stock.stockPriceChanged < 0 ? "#A43D3D" : "#679B3A"
- font.pointSize:25
- text: root.stock.stockPriceChanged + " (" + Math.abs(Math.round(root.stock.stockPriceChanged/(root.stock.stockPrice - root.stock.stockPriceChanged) * 100))/100 +"%)"
- }
-
- StockChart {
- id:chart
- anchors.bottom: parent.bottom
- anchors.top : priceChange.bottom
- anchors.topMargin: 30
- width:parent.width
- stockModel:root.stock
- settings:root.settings
- }
- }
-}
diff --git a/examples/demos/stocqt/content/images/icon-calendar-anim.png b/examples/demos/stocqt/content/images/icon-calendar-anim.png
deleted file mode 100644
index c5164d5183..0000000000
--- a/examples/demos/stocqt/content/images/icon-calendar-anim.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/stocqt/content/images/icon-calendar.png b/examples/demos/stocqt/content/images/icon-calendar.png
deleted file mode 100644
index bd2857470b..0000000000
--- a/examples/demos/stocqt/content/images/icon-calendar.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/stocqt/content/images/icon-items.png b/examples/demos/stocqt/content/images/icon-items.png
deleted file mode 100644
index f951aa5009..0000000000
--- a/examples/demos/stocqt/content/images/icon-items.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/stocqt/content/images/icon-settings.png b/examples/demos/stocqt/content/images/icon-settings.png
deleted file mode 100644
index 222d998289..0000000000
--- a/examples/demos/stocqt/content/images/icon-settings.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/stocqt/content/images/logo.png b/examples/demos/stocqt/content/images/logo.png
deleted file mode 100644
index 90c7c3ba3d..0000000000
--- a/examples/demos/stocqt/content/images/logo.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/stocqt/content/images/stock-selected.png b/examples/demos/stocqt/content/images/stock-selected.png
deleted file mode 100644
index 5629796b9c..0000000000
--- a/examples/demos/stocqt/content/images/stock-selected.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/stocqt/content/images/wheel-touch.png b/examples/demos/stocqt/content/images/wheel-touch.png
deleted file mode 100644
index 11c8120ada..0000000000
--- a/examples/demos/stocqt/content/images/wheel-touch.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/stocqt/content/images/wheel.png b/examples/demos/stocqt/content/images/wheel.png
deleted file mode 100644
index 470a675b35..0000000000
--- a/examples/demos/stocqt/content/images/wheel.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/stocqt/main.cpp b/examples/demos/stocqt/main.cpp
deleted file mode 100644
index 779d204a24..0000000000
--- a/examples/demos/stocqt/main.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(stocqt)
diff --git a/examples/demos/stocqt/stocqt.pro b/examples/demos/stocqt/stocqt.pro
deleted file mode 100644
index dfa1924946..0000000000
--- a/examples/demos/stocqt/stocqt.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-TEMPLATE = app
-
-QT += qml quick
-SOURCES += main.cpp
-
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/stocqt
-qml.files = stocqt.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/stocqt
-sources.files = $$SOURCES stocqt.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
diff --git a/examples/demos/stocqt/stocqt.qml b/examples/demos/stocqt/stocqt.qml
deleted file mode 100644
index 3f8a84a810..0000000000
--- a/examples/demos/stocqt/stocqt.qml
+++ /dev/null
@@ -1,101 +0,0 @@
-/****************************************************************************
-**
-** 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"
-
-ListView {
- id:root
- width:320
- height:480
- snapMode:ListView.SnapOneItem
- focus:false
- orientation : ListView.Horizontal
- boundsBehavior : Flickable.StopAtBounds
- currentIndex : 1
-
- StockModel {
- id:stock
- stockId:listView.currentStockId
- stockName: listView.currentStockName
- startDate: settings.startDate
- endDate:settings.endDate
- onStockIdChanged: updateStock()
- onStartDateChanged: updateStock()
- onEndDateChanged: updateStock()
- onDataReady: {
- root.currentIndex = 1
- stockView.update()
- }
- }
-
- model: VisualItemModel {
- StockListView {
- id:listView
- width:root.width
- height:root.height
- }
-
- StockView {
- id:stockView
- width:root.width
- height:root.height
- stocklist : listView
- settings : settings
- stock: stock
-
- onListViewClicked:root.currentIndex = 0
- onSettingsClicked:root.currentIndex = 2
- }
-
- StockSettings {
- id:settings
- width:root.width
- height:root.height
- onDrawHighPriceChanged: stockView.update()
- onDrawLowPriceChanged: stockView.update()
- onDrawOpenPriceChanged: stockView.update()
- onDrawClosePriceChanged: stockView.update()
- onDrawVolumeChanged: stockView.update()
- onDrawKLineChanged: stockView.update()
- onChartTypeChanged: stockView.update()
- }
- }
-}
diff --git a/examples/demos/stocqt/stocqt.qmlproject b/examples/demos/stocqt/stocqt.qmlproject
deleted file mode 100644
index 11ab78418a..0000000000
--- a/examples/demos/stocqt/stocqt.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "stocqt.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/demos/tweetsearch/content/FlipBar.qml b/examples/demos/tweetsearch/content/FlipBar.qml
deleted file mode 100644
index 06aebcacb1..0000000000
--- a/examples/demos/tweetsearch/content/FlipBar.qml
+++ /dev/null
@@ -1,173 +0,0 @@
-/****************************************************************************
-**
-** 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: container
- property int animDuration: 300
- property Item front: Item {}
- property Item back: Item {}
- property real factor: 0.1 // amount the edges fold in for the 3D effect
- property alias delta: effect.delta
- property Item cur: frontShown ? front : back
- property Item noncur: frontShown ? back : front
-
- function swap() {
- var tmp = front;
- front = back;
- back = tmp;
- resync();
- }
-
- width: cur.width
- height: cur.height
- onFrontChanged: resync();
- onBackChanged: resync();
-
- function resync() {//TODO: Are the items ever actually visible?
- back.parent = container;
- front.parent = container;
- frontShown ? back.visible = false : front.visible = false;
- }
-
- property bool frontShown: true
-
- onFrontShownChanged: {
- back.visible = !frontShown
- front.visible = frontShown
- }
-
- function flipUp(start) {
- effect.visible = true;
- effect.sourceA = effect.source1
- effect.sourceB = effect.source2
- if (start == undefined)
- start = 1.0;
- deltaAnim.from = start;
- deltaAnim.to = 0.0
- dAnim.start();
- frontShown = false;
- }
-
- function flipDown(start) {
- effect.visible = true;
- effect.sourceA = effect.source1
- effect.sourceB = effect.source2
- if (start == undefined)
- start = 0.0;
- deltaAnim.from = start;
- deltaAnim.to = 1.0
- dAnim.start();
- frontShown = true;
- }
-
- ShaderEffect {
- id: effect
- width: cur.width
- height: cur.height
- property real factor: container.factor * width
- property real delta: 1.0
-
- mesh: GridMesh { resolution: Qt.size(8,2) }
-
- SequentialAnimation on delta {
- id: dAnim
- running: false
- NumberAnimation {
- id: deltaAnim
- duration: animDuration//expose anim
- }
- }
-
- property variant sourceA: source1
- property variant sourceB: source1
- property variant source1: ShaderEffectSource {
- sourceItem: front
- hideSource: effect.visible
- }
-
- property variant source2: ShaderEffectSource {
- sourceItem: back
- hideSource: effect.visible
- }
-
- fragmentShader: "
- uniform lowp float qt_Opacity;
- uniform sampler2D sourceA;
- uniform sampler2D sourceB;
- uniform highp float delta;
- varying highp vec2 qt_TexCoord0;
- void main() {
- highp vec4 tex = vec4(qt_TexCoord0.x, qt_TexCoord0.y * 2.0, qt_TexCoord0.x, (qt_TexCoord0.y-0.5) * 2.0);
- highp float shade = clamp(delta*2.0, 0.5, 1.0);
- highp vec4 col;
- if (qt_TexCoord0.y < 0.5) {
- col = texture2D(sourceA, tex.xy) * (shade);
- } else {
- col = texture2D(sourceB, tex.zw) * (1.5 - shade);
- col.w = 1.0;
- }
- gl_FragColor = col * qt_Opacity;
- }
- "
- property real h: height
- vertexShader: "
- uniform highp float delta;
- uniform highp float factor;
- uniform highp float h;
- uniform highp mat4 qt_Matrix;
- attribute highp vec4 qt_Vertex;
- attribute highp vec2 qt_MultiTexCoord0;
- varying highp vec2 qt_TexCoord0;
- void main() {
- highp vec4 pos = qt_Vertex;
- if (qt_MultiTexCoord0.y == 0.0)
- pos.x += factor * (1. - delta) * (qt_MultiTexCoord0.x * -2.0 + 1.0);
- else if (qt_MultiTexCoord0.y == 1.0)
- pos.x += factor * (delta) * (qt_MultiTexCoord0.x * -2.0 + 1.0);
- else
- pos.y = delta * h;
- gl_Position = qt_Matrix * pos;
- qt_TexCoord0 = qt_MultiTexCoord0;
- }"
-
- }
-}
diff --git a/examples/demos/tweetsearch/content/LineInput.qml b/examples/demos/tweetsearch/content/LineInput.qml
deleted file mode 100644
index 368293e961..0000000000
--- a/examples/demos/tweetsearch/content/LineInput.qml
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-FocusScope {
- id: wrapper
-
- property alias text: input.text
- property alias hint: hint.text
- property alias prefix: prefix.text
-
- signal accepted
-
- Rectangle {
- anchors.fill: parent
- border.color: "#707070"
- color: "#c1c1c1"
- radius: 4
-
- Text {
- id: hint
- anchors { fill: parent; leftMargin: 14 }
- verticalAlignment: Text.AlignVCenter
- text: "Enter word"
- font.pixelSize: 18
- color: "#707070"
- opacity: input.length ? 0 : 1
- }
-
- Text {
- id: prefix
- anchors { left: parent.left; leftMargin: 14; verticalCenter: parent.verticalCenter }
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: 18
- color: "#707070"
- opacity: !hint.opacity
- }
-
- TextInput {
- id: input
- focus: true
- anchors { left: prefix.right; right: parent.right; top: parent.top; bottom: parent.bottom }
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: 18
- color: "#707070"
- onAccepted: wrapper.accepted()
- }
-
- Image {
- source: "resources/icon-search.png"
- anchors.right: parent.right
- anchors.rightMargin: 12
- anchors.verticalCenter: parent.verticalCenter
- MouseArea {
- anchors { fill: parent; margins: -10 }
- onClicked: wrapper.accepted()
- }
- }
- }
-}
diff --git a/examples/demos/tweetsearch/content/ListFooter.qml b/examples/demos/tweetsearch/content/ListFooter.qml
deleted file mode 100644
index 91c1c8b331..0000000000
--- a/examples/demos/tweetsearch/content/ListFooter.qml
+++ /dev/null
@@ -1,154 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-Rectangle {
- color: "#d6d6d6"
- width: parent.width
- height: childrenRect.height
- z: 2
- Connections {
- target: mainListView
- onAutoSearch: {
- if (type == 'tag') {
- tagSearch.open()
- tagSearch.searchText = str
- } else if (type == 'user'){
- userSearch.open()
- userSearch.searchText = str
- } else {
- wordSearch.open()
- wordSearch.searchText = str
- }
- }
- }
-
- Column {
- width: parent.width
-
- SearchDelegate {
- id: wordSearch
- label: "Search word..."
- placeHolder: "Enter word"
- onHasOpened: {
- tagSearch.close()
- userSearch.close()
- }
- onOk: {
- mainListView.positionViewAtBeginning()
- mainListView.clear()
- tweetsModel.from = ""
- tweetsModel.phrase = searchText
- }
- }
-
- SearchDelegate {
- id: userSearch
- label: "From user..."
- placeHolder: "@username"
- prefix: "@"
- onHasOpened:{
- tagSearch.close()
- wordSearch.close()
- }
- onOk: {
- mainListView.positionViewAtBeginning()
- mainListView.clear()
- tweetsModel.phrase = ""
- tweetsModel.from = searchText
- }
- }
-
- SearchDelegate {
- id: tagSearch
- label: "Search hashtag..."
- placeHolder: "#hashtag"
- prefix: "#"
- onHasOpened:{
- userSearch.close()
- wordSearch.close()
- }
- onOk: {
- mainListView.positionViewAtBeginning()
- mainListView.clear()
- tweetsModel.from = ""
- tweetsModel.phrase = "#" + searchText
- }
- }
-
- SpriteSequence {
- id: sprite
- anchors.horizontalCenter: parent.horizontalCenter
- width: 320
- height: 300
- running: true
- interpolate: false
- Sprite {
- name: "bird"
- source: "resources/bird-anim-sprites.png"
- frameCount: 1
- frameRate: 1
- frameWidth: 320
- frameHeight: 300
- to: { "bird":10, "trill":1, "blink":1 }
- }
- Sprite {
- name: "trill"
- source: "resources/bird-anim-sprites.png"
- frameCount: 5
- frameRate: 3
- frameWidth: 320
- frameHeight: 300
- to: {"bird":1}
- }
- Sprite {
- name: "blink"
- source: "resources/bird-anim-sprites.png"
- frameCount: 1
- frameRate: 3
- frameWidth: 320
- frameHeight: 300
- frameX: 1600
- to: {"bird":1}
- }
- }
- }
-}
diff --git a/examples/demos/tweetsearch/content/ListHeader.qml b/examples/demos/tweetsearch/content/ListHeader.qml
deleted file mode 100644
index 2fb673dc7c..0000000000
--- a/examples/demos/tweetsearch/content/ListHeader.qml
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************************
-**
-** 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: 60
- width: parent.width
-
- property bool refresh: state == "pulled" ? true : false
-
- Row {
- spacing: 6
- height: childrenRect.height
- anchors.centerIn: parent
-
- Image {
- id: arrow
- source: "resources/icon-refresh.png"
- transformOrigin: Item.Center
- Behavior on rotation { NumberAnimation { duration: 200 } }
- }
-
- Text {
- id: label
- anchors.verticalCenter: arrow.verticalCenter
- text: "Pull to refresh... "
- font.pixelSize: 18
- color: "#999999"
- }
- }
-
- states: [
- State {
- name: "base"; when: mainListView.contentY >= -120
- PropertyChanges { target: arrow; rotation: 180 }
- },
- State {
- name: "pulled"; when: mainListView.contentY < -120
- PropertyChanges { target: label; text: "Release to refresh..." }
- PropertyChanges { target: arrow; rotation: 0 }
- }
- ]
-}
diff --git a/examples/demos/tweetsearch/content/SearchDelegate.qml b/examples/demos/tweetsearch/content/SearchDelegate.qml
deleted file mode 100644
index fc0ee0b655..0000000000
--- a/examples/demos/tweetsearch/content/SearchDelegate.qml
+++ /dev/null
@@ -1,121 +0,0 @@
-/****************************************************************************
-**
-** 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
-
-FlipBar {
- id: flipBar
- animDuration: 250
- property string label: ""
- property string placeHolder: ""
- property alias searchText: lineInput.text
- property alias prefix: lineInput.prefix
- property bool opened: false
- signal ok
- signal hasOpened
-
- height: 60
- width: parent.width
-
- function open() {
- flipBar.flipUp()
- flipBar.opened = true
- lineInput.forceActiveFocus()
- flipBar.hasOpened()
- }
-
- function close() {
- if (opened) {
- flipBar.flipDown()
- flipBar.opened = false
- }
- }
-
- front: Rectangle {
- height: 60
- width: parent.width
- color: "#999999"
-
- Rectangle { color: "#c1c1c1"; width: parent.width; height: 1 }
- Rectangle { color: "#707070"; width: parent.width; height: 1; anchors.bottom: parent.bottom }
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- onClicked: {
- if (!flipBar.opened)
- open()
- else if (!lineInput.activeFocus)
- lineInput.forceActiveFocus()
- else
- close()
- }
- }
-
- Text {
- text: flipBar.label
- anchors { left: parent.left; leftMargin: 20 }
- anchors.verticalCenter: parent.verticalCenter
- font.pixelSize: 18
- color: "#ffffff"
- }
- }
-
- back: FocusScope {
- height: 60
- width: parent.width
- Rectangle {
- anchors.fill: parent
- color: "#999999"
-
- Rectangle { color: "#c1c1c1"; width: parent.width; height: 1 }
- Rectangle { color: "#707070"; width: parent.width; height: 1; anchors.bottom: parent.bottom }
-
- LineInput {
- id: lineInput
- hint: flipBar.placeHolder
- focus: flipBar.opened
- anchors { fill: parent; margins: 6 }
- onAccepted: flipBar.ok()
- }
- }
- }
-
-}
diff --git a/examples/demos/tweetsearch/content/TweetDelegate.qml b/examples/demos/tweetsearch/content/TweetDelegate.qml
deleted file mode 100644
index c336ae6f8a..0000000000
--- a/examples/demos/tweetsearch/content/TweetDelegate.qml
+++ /dev/null
@@ -1,189 +0,0 @@
-/****************************************************************************
-**
-** 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 "tweetsearch.js" as Helper
-
-Item {
- id: container
- property real hm: 1.0
- property int appear: -1
- property real startRotation: 1
-
- onAppearChanged: {
- container.startRotation = 0.5
- flipBar.animDuration = appear;
- delayedAnim.start();
- }
-
- SequentialAnimation {
- id: delayedAnim
- PauseAnimation { duration: 50 }
- ScriptAction { script: flipBar.flipDown(startRotation); }
- }
-
- width: 320
- height: flipBar.height * hm
-
- FlipBar {
- id: flipBar
-
- property bool flipped: false
- delta: startRotation
-
- anchors.bottom: parent.bottom
- width: container.ListView.view ? container.ListView.view.width : 0
- height: Math.max(72, tweet.y + tweet.height + 10)
-
- front: Rectangle {
- width: container.ListView.view ? container.ListView.view.width : 0
- height: Math.max(72, tweet.y + tweet.height + 10)
- color: "#2699bf"
-
- Rectangle { color: "#33ccff"; width: parent.width; height: 1 }
- Rectangle { color: "#1a6680"; width: parent.width; height: 1; anchors.bottom: parent.bottom }
-
- Image {
- id: placeHolder
- source: "resources/anonymous.png"
- x: 10; y: 9
- visible: avatar.status != Image.Ready
- }
-
- Image {
- id: avatar
- source: model.userImage
- anchors.fill: placeHolder
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- onClicked: {
- flipBar.flipUp()
- flipBar.flipped = true
- }
- }
- }
-
- Text {
- id: name
- text: Helper.realName(model.name)
- anchors { left: avatar.right; leftMargin: 10; top: avatar.top; topMargin: -3 }
- font.pixelSize: 12
- font.bold: true
- color: "white"
- linkColor: "white"
- }
-
- Text {
- id: tweet
- text: model.statusText
- anchors { left: avatar.right; leftMargin: 10; top: name.bottom; topMargin: 0; right: parent.right; rightMargin: 10 }
- wrapMode: Text.WordWrap
- font.pixelSize: 12
- font.bold: false
- color: "#adebff"
- linkColor: "white"
- onLinkActivated: {
- var tag = link.split("http://search.twitter.com/search?q=%23")
- var user = link.split("https://twitter.com/")
- if (tag[1] != undefined) {
- mainListView.positionViewAtBeginning()
- mainListView.clear()
- mainListView.autoSearch('tag', tag[1])
- tweetsModel.from = ""
- tweetsModel.phrase = "#" + tag[1]
- } else if (user[1] != undefined) {
- mainListView.positionViewAtBeginning()
- mainListView.clear()
- mainListView.autoSearch('user', user[1])
- tweetsModel.phrase = ""
- tweetsModel.from = user[1]
- } else
- Qt.openUrlExternally(link)
- }
- }
- }
-
- back: Rectangle {
- width: container.ListView.view ? container.ListView.view.width : 0
- height: Math.max(72, tweet.y + tweet.height + 10)
- color: "#be4a25"
-
- Rectangle { color: "#ff6633"; width: parent.width; height: 1 }
- Rectangle { color: "#80341a"; width: parent.width; height: 1; anchors.bottom: parent.bottom }
-
- Image {
- id: avatar2
- source: model.userImage
- anchors.right: parent.right
- anchors.rightMargin: 10
- y: 9
- MouseArea {
- anchors.fill: parent
- onClicked: {
- flipBar.flipDown()
- flipBar.flipped = false
- }
- }
- }
-
- Text {
- id: username
- text: Helper.twitterName(model.name)
- x: 10; anchors { top: avatar2.top; topMargin: -3 }
- font.pixelSize: 12
- font.bold: true
- color: "white"
- linkColor: "white"
- }
-
- Text {
- text: model.source + "<br>" + Helper.formatDate(model.published) + "<br>" + model.uri
- x: 10; anchors { top: username.bottom; topMargin: 0 }
- wrapMode: Text.WordWrap
- font.pixelSize: 12
- font.bold: false
- color: "#ffc2ad"
- linkColor: "white"
- onLinkActivated: Qt.openUrlExternally(link);
- }
- }
- }
-}
diff --git a/examples/demos/tweetsearch/content/TweetsModel.qml b/examples/demos/tweetsearch/content/TweetsModel.qml
deleted file mode 100644
index df6ecdcd7f..0000000000
--- a/examples/demos/tweetsearch/content/TweetsModel.qml
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************************
-**
-** 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.XmlListModel 2.0
-
-Item {
- id: wrapper
-
- property variant model: xmlModel
- property string from : ""
- property string phrase : ""
-
- property string mode : "everyone"
- property int status: xmlModel.status
-
- function reload() { xmlModel.reload(); }
-
- property bool isLoading: status == XmlListModel.Loading
- property bool wasLoading: false
- signal isLoaded
-
- XmlListModel {
- id: xmlModel
-
- onStatusChanged: {
- if (status == XmlListModel.Ready && wasLoading == true)
- wrapper.isLoaded()
- if (status == XmlListModel.Loading)
- wasLoading = true;
- else
- wasLoading = false;
- }
-
- function encodePhrase(x) { return encodeURIComponent(x); }
-
- source: (from == "" && phrase == "") ? "" :
- 'http://search.twitter.com/search.atom?from='+from+"&rpp=10&phrase="+encodePhrase(phrase)
-
- namespaceDeclarations: "declare default element namespace 'http://www.w3.org/2005/Atom'; " +
- "declare namespace twitter=\"http://api.twitter.com/\";";
-
- query: "/feed/entry"
-
- XmlRole { name: "id"; query: "id/string()" }
- XmlRole { name: "content"; query: "content/string()" }
- XmlRole { name: "published"; query: "published/string()" }
- XmlRole { name: "source"; query: "twitter:source/string()" }
- XmlRole { name: "name"; query: "author/name/string()" }
- XmlRole { name: "uri"; query: "author/uri/string()" }
- XmlRole { name: "image"; query: "link[@rel = 'image']/@href/string()" }
-
- }
-}
diff --git a/examples/demos/tweetsearch/content/resources/anonymous.png b/examples/demos/tweetsearch/content/resources/anonymous.png
deleted file mode 100644
index 88fba26e90..0000000000
--- a/examples/demos/tweetsearch/content/resources/anonymous.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/tweetsearch/content/resources/bird-anim-sprites.png b/examples/demos/tweetsearch/content/resources/bird-anim-sprites.png
deleted file mode 100644
index 4e8d7e6116..0000000000
--- a/examples/demos/tweetsearch/content/resources/bird-anim-sprites.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/tweetsearch/content/resources/icon-clear.png b/examples/demos/tweetsearch/content/resources/icon-clear.png
deleted file mode 100644
index 75672f64c7..0000000000
--- a/examples/demos/tweetsearch/content/resources/icon-clear.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/tweetsearch/content/resources/icon-loading.png b/examples/demos/tweetsearch/content/resources/icon-loading.png
deleted file mode 100644
index 8dbff8b70f..0000000000
--- a/examples/demos/tweetsearch/content/resources/icon-loading.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/tweetsearch/content/resources/icon-refresh.png b/examples/demos/tweetsearch/content/resources/icon-refresh.png
deleted file mode 100644
index b639a638fe..0000000000
--- a/examples/demos/tweetsearch/content/resources/icon-refresh.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/tweetsearch/content/resources/icon-search.png b/examples/demos/tweetsearch/content/resources/icon-search.png
deleted file mode 100644
index e41935a6c1..0000000000
--- a/examples/demos/tweetsearch/content/resources/icon-search.png
+++ /dev/null
Binary files differ
diff --git a/examples/demos/tweetsearch/content/tweetsearch.js b/examples/demos/tweetsearch/content/tweetsearch.js
deleted file mode 100644
index 9b8638f69e..0000000000
--- a/examples/demos/tweetsearch/content/tweetsearch.js
+++ /dev/null
@@ -1,19 +0,0 @@
-.pragma library
-
-function twitterName(str)
-{
- var s = str.split("(")
- return s[0]
-}
-
-function realName(str)
-{
- var s = str.split("(")
- return s[1].substring(0, s[1].length-1)
-}
-
-function formatDate(date)
-{
- var da = new Date(date)
- return da.toDateString()
-}
diff --git a/examples/demos/tweetsearch/main.cpp b/examples/demos/tweetsearch/main.cpp
deleted file mode 100644
index 8b1d59679c..0000000000
--- a/examples/demos/tweetsearch/main.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(tweetsearch)
diff --git a/examples/demos/tweetsearch/tweetsearch.pro b/examples/demos/tweetsearch/tweetsearch.pro
deleted file mode 100644
index 36f4377de1..0000000000
--- a/examples/demos/tweetsearch/tweetsearch.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-TEMPLATE = app
-
-QT += quick qml
-SOURCES += main.cpp
-
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/tweetsearch
-qml.files = tweetsearch.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/tweetsearch
-sources.files = $$SOURCES tweetsearch.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
diff --git a/examples/demos/tweetsearch/tweetsearch.qml b/examples/demos/tweetsearch/tweetsearch.qml
deleted file mode 100644
index 961ffce36b..0000000000
--- a/examples/demos/tweetsearch/tweetsearch.qml
+++ /dev/null
@@ -1,130 +0,0 @@
-/****************************************************************************
-**
-** 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"
-
-Rectangle {
- id: main
- width: 320
- height: 480
- color: "#d6d6d6"
-
- property string searchTerms: ""
- property int inAnimDur: 250
- property int counter: 0
- property alias isLoading: tweetsModel.isLoading
- property var idx
- property var ids
-
- Component.onCompleted: ids = new Array()
-
- function idInModel(id)
- {
- for (var j = 0; j < ids.length; j++)
- if (ids[j] === id)
- return 1
- return 0
- }
-
- TweetsModel {
- id: tweetsModel
- onIsLoaded: {
- console.debug("Reload")
- idx = new Array()
- for (var i = 0; i < tweetsModel.model.count; i++) {
- var id = tweetsModel.model.get(i).id
- if (!idInModel(id))
- idx.push(i)
- }
- console.debug(idx.length + " new tweets")
- main.counter = idx.length
- }
- }
-
- Timer {
- id: timer
- interval: 500; running: main.counter; repeat: true
- onTriggered: {
- main.counter--;
- var id = tweetsModel.model.get(idx[main.counter]).id
- mainListView.add( { "statusText": tweetsModel.model.get(main.counter).content,
- "name": tweetsModel.model.get(main.counter).name,
- "userImage": tweetsModel.model.get(main.counter).image,
- "source": tweetsModel.model.get(main.counter).source,
- "id": id,
- "uri": tweetsModel.model.get(main.counter).uri,
- "published": tweetsModel.model.get(main.counter).published } );
- ids.push(id)
- }
- }
-
- ListView {
- id: mainListView
- anchors.fill: parent
- delegate: TweetDelegate { }
- model: ListModel { id: finalModel }
-
- add: Transition {
- NumberAnimation { property: "hm"; from: 0; to: 1.0; duration: 300; easing.type: Easing.OutQuad }
- PropertyAction { property: "appear"; value: 250 }
- }
-
- onDragEnded: if (header.refresh) { tweetsModel.model.reload() }
-
- ListHeader {
- id: header
- y: -mainListView.contentY - height
- }
-
- footer: ListFooter { }
-
- function clear() {
- ids = new Array()
- model.clear()
- }
-
- function add(obj) {
- model.insert(0, obj)
- }
-
- signal autoSearch(string type, string str) // To communicate with Footer instance
- }
-}
diff --git a/examples/demos/tweetsearch/tweetsearch.qmlproject b/examples/demos/tweetsearch/tweetsearch.qmlproject
deleted file mode 100644
index 5a0f31117b..0000000000
--- a/examples/demos/tweetsearch/tweetsearch.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "tweetsearch.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}