aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/demos
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2012-12-11 14:17:34 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-12 10:32:50 +0100
commita0fb0a5dd32b031f89abe603ed07a50c74327e37 (patch)
tree04dd8b801c1e5daca81701542a8f6815c8b35274 /examples/quick/demos
parentb570d384c0704ea12364e353493eeb6f1ae34cd3 (diff)
Use resource files for most examples
Make examples shadow-build-friendly by using resource files instead of trying to derive the qml path from applicationDirPath(). Change-Id: I669424554c772d9b261249b366247190f5fbd8b1 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Diffstat (limited to 'examples/quick/demos')
-rw-r--r--examples/quick/demos/calqlatr/calqlatr.pro7
-rw-r--r--examples/quick/demos/calqlatr/calqlatr.qrc22
-rw-r--r--examples/quick/demos/calqlatr/main.cpp2
-rw-r--r--examples/quick/demos/maroon/main.cpp2
-rw-r--r--examples/quick/demos/maroon/maroon.pro5
-rw-r--r--examples/quick/demos/maroon/maroon.qrc71
-rw-r--r--examples/quick/demos/samegame/main.cpp2
-rw-r--r--examples/quick/demos/samegame/samegame.pro5
-rw-r--r--examples/quick/demos/samegame/samegame.qrc72
-rw-r--r--examples/quick/demos/stocqt/main.cpp2
-rw-r--r--examples/quick/demos/stocqt/stocqt.pro5
-rw-r--r--examples/quick/demos/stocqt/stocqt.qrc21
-rw-r--r--examples/quick/demos/tweetsearch/main.cpp2
-rw-r--r--examples/quick/demos/tweetsearch/tweetsearch.pro5
-rw-r--r--examples/quick/demos/tweetsearch/tweetsearch.qrc19
15 files changed, 222 insertions, 20 deletions
diff --git a/examples/quick/demos/calqlatr/calqlatr.pro b/examples/quick/demos/calqlatr/calqlatr.pro
index fec0d6416b..1b002a5f27 100644
--- a/examples/quick/demos/calqlatr/calqlatr.pro
+++ b/examples/quick/demos/calqlatr/calqlatr.pro
@@ -3,7 +3,8 @@ TEMPLATE = app
QT += qml quick
SOURCES += main.cpp
+RESOURCES += calqlatr.qrc \
+ ../../shared/shared.qrc
+
target.path = $$[QT_INSTALL_EXAMPLES]/quick/demos/calqlatr
-qml.files = calqlatr.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/quick/demos/calqlatr
-INSTALLS += target qml
+INSTALLS += target
diff --git a/examples/quick/demos/calqlatr/calqlatr.qrc b/examples/quick/demos/calqlatr/calqlatr.qrc
new file mode 100644
index 0000000000..fda7d35d7e
--- /dev/null
+++ b/examples/quick/demos/calqlatr/calqlatr.qrc
@@ -0,0 +1,22 @@
+<RCC>
+ <qresource prefix="/demos/calqlatr">
+ <file>calqlatr.qml</file>
+ <file>content/Button.qml</file>
+ <file>content/calculator.js</file>
+ <file>content/Display.qml</file>
+ <file>content/NumberPad.qml</file>
+ <file>content/StyleLabel.qml</file>
+ <file>content/audio/touch.wav</file>
+ <file>content/images/icon-back.png</file>
+ <file>content/images/icon-close.png</file>
+ <file>content/images/icon-settings.png</file>
+ <file>content/images/logo.png</file>
+ <file>content/images/paper-edge-left.png</file>
+ <file>content/images/paper-edge-right.png</file>
+ <file>content/images/paper-grip.png</file>
+ <file>content/images/settings-selected-a.png</file>
+ <file>content/images/settings-selected-b.png</file>
+ <file>content/images/touch-green.png</file>
+ <file>content/images/touch-white.png</file>
+ </qresource>
+</RCC>
diff --git a/examples/quick/demos/calqlatr/main.cpp b/examples/quick/demos/calqlatr/main.cpp
index 9000bfc7d7..65bfc97f9a 100644
--- a/examples/quick/demos/calqlatr/main.cpp
+++ b/examples/quick/demos/calqlatr/main.cpp
@@ -38,4 +38,4 @@
**
****************************************************************************/
#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(calqlatr)
+DECLARATIVE_EXAMPLE_MAIN(demos/calqlatr/calqlatr)
diff --git a/examples/quick/demos/maroon/main.cpp b/examples/quick/demos/maroon/main.cpp
index da2343e444..6866cf8d7b 100644
--- a/examples/quick/demos/maroon/main.cpp
+++ b/examples/quick/demos/maroon/main.cpp
@@ -38,4 +38,4 @@
**
****************************************************************************/
#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(maroon)
+DECLARATIVE_EXAMPLE_MAIN(demos/maroon/maroon)
diff --git a/examples/quick/demos/maroon/maroon.pro b/examples/quick/demos/maroon/maroon.pro
index e193927e72..6ca0a2bf16 100644
--- a/examples/quick/demos/maroon/maroon.pro
+++ b/examples/quick/demos/maroon/maroon.pro
@@ -2,8 +2,7 @@ TEMPLATE = app
QT += qml quick
SOURCES += main.cpp
+RESOURCES += maroon.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/quick/demos/maroon
-qml.files = maroon.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/quick/demos/maroon
-INSTALLS += target qml
+INSTALLS += target
diff --git a/examples/quick/demos/maroon/maroon.qrc b/examples/quick/demos/maroon/maroon.qrc
new file mode 100644
index 0000000000..52c2a4e513
--- /dev/null
+++ b/examples/quick/demos/maroon/maroon.qrc
@@ -0,0 +1,71 @@
+<RCC>
+ <qresource prefix="/demos/maroon">
+ <file>maroon.qml</file>
+ <file>content/BuildButton.qml</file>
+ <file>content/GameCanvas.qml</file>
+ <file>content/GameOverScreen.qml</file>
+ <file>content/InfoBar.qml</file>
+ <file>content/logic.js</file>
+ <file>content/NewGameScreen.qml</file>
+ <file>content/SoundEffect.qml</file>
+ <file>content/audio/bomb-action.wav</file>
+ <file>content/audio/catch-action.wav</file>
+ <file>content/audio/catch.wav</file>
+ <file>content/audio/currency.wav</file>
+ <file>content/audio/factory-action.wav</file>
+ <file>content/audio/melee-action.wav</file>
+ <file>content/audio/projectile-action.wav</file>
+ <file>content/audio/shooter-action.wav</file>
+ <file>content/gfx/background.png</file>
+ <file>content/gfx/bomb-action.png</file>
+ <file>content/gfx/bomb-idle.png</file>
+ <file>content/gfx/bomb.png</file>
+ <file>content/gfx/button-help.png</file>
+ <file>content/gfx/button-play.png</file>
+ <file>content/gfx/catch-action.png</file>
+ <file>content/gfx/catch.png</file>
+ <file>content/gfx/cloud.png</file>
+ <file>content/gfx/currency.png</file>
+ <file>content/gfx/dialog-bomb.png</file>
+ <file>content/gfx/dialog-factory.png</file>
+ <file>content/gfx/dialog-melee.png</file>
+ <file>content/gfx/dialog-pointer.png</file>
+ <file>content/gfx/dialog-shooter.png</file>
+ <file>content/gfx/dialog.png</file>
+ <file>content/gfx/factory-action.png</file>
+ <file>content/gfx/factory-idle.png</file>
+ <file>content/gfx/factory.png</file>
+ <file>content/gfx/grid.png</file>
+ <file>content/gfx/help.png</file>
+ <file>content/gfx/lifes.png</file>
+ <file>content/gfx/logo-bubble.png</file>
+ <file>content/gfx/logo-fish.png</file>
+ <file>content/gfx/logo.png</file>
+ <file>content/gfx/melee-action.png</file>
+ <file>content/gfx/melee-idle.png</file>
+ <file>content/gfx/melee.png</file>
+ <file>content/gfx/mob-idle.png</file>
+ <file>content/gfx/mob.png</file>
+ <file>content/gfx/points.png</file>
+ <file>content/gfx/projectile-action.png</file>
+ <file>content/gfx/projectile.png</file>
+ <file>content/gfx/scores.png</file>
+ <file>content/gfx/shooter-action.png</file>
+ <file>content/gfx/shooter-idle.png</file>
+ <file>content/gfx/shooter.png</file>
+ <file>content/gfx/sunlight.png</file>
+ <file>content/gfx/text-1.png</file>
+ <file>content/gfx/text-2.png</file>
+ <file>content/gfx/text-3.png</file>
+ <file>content/gfx/text-blank.png</file>
+ <file>content/gfx/text-gameover.png</file>
+ <file>content/gfx/text-go.png</file>
+ <file>content/gfx/wave.png</file>
+ <file>content/mobs/MobBase.qml</file>
+ <file>content/towers/Bomb.qml</file>
+ <file>content/towers/Factory.qml</file>
+ <file>content/towers/Melee.qml</file>
+ <file>content/towers/Ranged.qml</file>
+ <file>content/towers/TowerBase.qml</file>
+ </qresource>
+</RCC>
diff --git a/examples/quick/demos/samegame/main.cpp b/examples/quick/demos/samegame/main.cpp
index 20bf7fad18..c12804ef1f 100644
--- a/examples/quick/demos/samegame/main.cpp
+++ b/examples/quick/demos/samegame/main.cpp
@@ -38,4 +38,4 @@
**
****************************************************************************/
#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(samegame)
+DECLARATIVE_EXAMPLE_MAIN(demos/samegame/samegame)
diff --git a/examples/quick/demos/samegame/samegame.pro b/examples/quick/demos/samegame/samegame.pro
index fec2e53018..59cacd3c8b 100644
--- a/examples/quick/demos/samegame/samegame.pro
+++ b/examples/quick/demos/samegame/samegame.pro
@@ -2,8 +2,7 @@ TEMPLATE = app
QT += qml quick
SOURCES += main.cpp
+RESOURCES += samegame.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/quick/demos/samegame
-qml.files = samegame.qml content settings.js
-qml.path = $$[QT_INSTALL_EXAMPLES]/quick/demos/samegame
-INSTALLS += target qml
+INSTALLS += target
diff --git a/examples/quick/demos/samegame/samegame.qrc b/examples/quick/demos/samegame/samegame.qrc
new file mode 100644
index 0000000000..951b9d116c
--- /dev/null
+++ b/examples/quick/demos/samegame/samegame.qrc
@@ -0,0 +1,72 @@
+<RCC>
+ <qresource prefix="/demos/samegame">
+ <file>samegame.qml</file>
+ <file>settings.js</file>
+ <file>content/gfx/text-p1-won.png</file>
+ <file>content/gfx/background-puzzle.png</file>
+ <file>content/gfx/background.png</file>
+ <file>content/gfx/bar.png</file>
+ <file>content/gfx/blue-puzzle.png</file>
+ <file>content/gfx/blue.png</file>
+ <file>content/gfx/bubble-highscore.png</file>
+ <file>content/gfx/bubble-puzzle.png</file>
+ <file>content/gfx/but-game-1.png</file>
+ <file>content/gfx/but-game-2.png</file>
+ <file>content/gfx/but-game-3.png</file>
+ <file>content/gfx/but-game-4.png</file>
+ <file>content/gfx/but-game-new.png</file>
+ <file>content/gfx/but-menu.png</file>
+ <file>content/gfx/but-puzzle-next.png</file>
+ <file>content/gfx/but-quit.png</file>
+ <file>content/gfx/green-puzzle.png</file>
+ <file>content/gfx/green.png</file>
+ <file>content/gfx/icon-fail.png</file>
+ <file>content/gfx/icon-ok.png</file>
+ <file>content/gfx/icon-time.png</file>
+ <file>content/gfx/logo-a.png</file>
+ <file>content/gfx/logo-e.png</file>
+ <file>content/gfx/logo-g.png</file>
+ <file>content/gfx/logo-m.png</file>
+ <file>content/gfx/logo-s.png</file>
+ <file>content/gfx/logo.png</file>
+ <file>content/gfx/particle-brick.png</file>
+ <file>content/gfx/particle-paint.png</file>
+ <file>content/gfx/particle-smoke.png</file>
+ <file>content/gfx/red-puzzle.png</file>
+ <file>content/gfx/red.png</file>
+ <file>content/gfx/text-highscore-new.png</file>
+ <file>content/gfx/text-highscore.png</file>
+ <file>content/gfx/text-no-winner.png</file>
+ <file>content/gfx/text-p1-go.png</file>
+ <file>content/gfx/text-p1.png</file>
+ <file>content/gfx/text-p2-go.png</file>
+ <file>content/gfx/text-p2-won.png</file>
+ <file>content/gfx/text-p2.png</file>
+ <file>content/gfx/yellow-puzzle.png</file>
+ <file>content/gfx/yellow.png</file>
+ <file>content/levels/level0.qml</file>
+ <file>content/levels/level1.qml</file>
+ <file>content/levels/level2.qml</file>
+ <file>content/levels/level3.qml</file>
+ <file>content/levels/level4.qml</file>
+ <file>content/levels/level5.qml</file>
+ <file>content/levels/level6.qml</file>
+ <file>content/levels/level7.qml</file>
+ <file>content/levels/level8.qml</file>
+ <file>content/levels/level9.qml</file>
+ <file>content/levels/TemplateBase.qml</file>
+ <file>content/SamegameText.qml</file>
+ <file>content/SimpleBlock.qml</file>
+ <file>content/Block.qml</file>
+ <file>content/BlockEmitter.qml</file>
+ <file>content/Button.qml</file>
+ <file>content/GameArea.qml</file>
+ <file>content/LogoAnimation.qml</file>
+ <file>content/MenuEmitter.qml</file>
+ <file>content/PaintEmitter.qml</file>
+ <file>content/PrimaryPack.qml</file>
+ <file>content/PuzzleBlock.qml</file>
+ <file>content/samegame.js</file>
+ <file>content/SmokeText.qml</file>
+ </qresource>
+</RCC>
diff --git a/examples/quick/demos/stocqt/main.cpp b/examples/quick/demos/stocqt/main.cpp
index 779d204a24..d893aa5a04 100644
--- a/examples/quick/demos/stocqt/main.cpp
+++ b/examples/quick/demos/stocqt/main.cpp
@@ -38,4 +38,4 @@
**
****************************************************************************/
#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(stocqt)
+DECLARATIVE_EXAMPLE_MAIN(demos/stocqt/stocqt)
diff --git a/examples/quick/demos/stocqt/stocqt.pro b/examples/quick/demos/stocqt/stocqt.pro
index f33c4aee01..efe37cb722 100644
--- a/examples/quick/demos/stocqt/stocqt.pro
+++ b/examples/quick/demos/stocqt/stocqt.pro
@@ -2,8 +2,7 @@ TEMPLATE = app
QT += qml quick
SOURCES += main.cpp
+RESOURCES += stocqt.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/quick/demos/stocqt
-qml.files = stocqt.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/quick/demos/stocqt
-INSTALLS += target qml
+INSTALLS += target
diff --git a/examples/quick/demos/stocqt/stocqt.qrc b/examples/quick/demos/stocqt/stocqt.qrc
new file mode 100644
index 0000000000..b2b1acaf04
--- /dev/null
+++ b/examples/quick/demos/stocqt/stocqt.qrc
@@ -0,0 +1,21 @@
+<RCC>
+ <qresource prefix="/demos/stocqt">
+ <file>stocqt.qml</file>
+ <file>content/Button.qml</file>
+ <file>content/DatePicker.qml</file>
+ <file>content/StockChart.qml</file>
+ <file>content/StockListModel.qml</file>
+ <file>content/StockListView.qml</file>
+ <file>content/StockModel.qml</file>
+ <file>content/StockSettings.qml</file>
+ <file>content/StockView.qml</file>
+ <file>content/images/icon-calendar-anim.png</file>
+ <file>content/images/icon-calendar.png</file>
+ <file>content/images/icon-items.png</file>
+ <file>content/images/icon-settings.png</file>
+ <file>content/images/logo.png</file>
+ <file>content/images/stock-selected.png</file>
+ <file>content/images/wheel-touch.png</file>
+ <file>content/images/wheel.png</file>
+ </qresource>
+</RCC>
diff --git a/examples/quick/demos/tweetsearch/main.cpp b/examples/quick/demos/tweetsearch/main.cpp
index 8b1d59679c..6253bc2f6b 100644
--- a/examples/quick/demos/tweetsearch/main.cpp
+++ b/examples/quick/demos/tweetsearch/main.cpp
@@ -38,4 +38,4 @@
**
****************************************************************************/
#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(tweetsearch)
+DECLARATIVE_EXAMPLE_MAIN(demos/tweetsearch/tweetsearch)
diff --git a/examples/quick/demos/tweetsearch/tweetsearch.pro b/examples/quick/demos/tweetsearch/tweetsearch.pro
index 887c05af88..b063cc4106 100644
--- a/examples/quick/demos/tweetsearch/tweetsearch.pro
+++ b/examples/quick/demos/tweetsearch/tweetsearch.pro
@@ -2,8 +2,7 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
+RESOURCES += tweetsearch.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/quick/demos/tweetsearch
-qml.files = tweetsearch.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/quick/demos/tweetsearch
-INSTALLS += target qml
+INSTALLS += target
diff --git a/examples/quick/demos/tweetsearch/tweetsearch.qrc b/examples/quick/demos/tweetsearch/tweetsearch.qrc
new file mode 100644
index 0000000000..b23c3c5537
--- /dev/null
+++ b/examples/quick/demos/tweetsearch/tweetsearch.qrc
@@ -0,0 +1,19 @@
+<RCC>
+ <qresource prefix="/demos/tweetsearch">
+ <file>tweetsearch.qml</file>
+ <file>content/FlipBar.qml</file>
+ <file>content/LineInput.qml</file>
+ <file>content/ListFooter.qml</file>
+ <file>content/ListHeader.qml</file>
+ <file>content/SearchDelegate.qml</file>
+ <file>content/TweetDelegate.qml</file>
+ <file>content/tweetsearch.js</file>
+ <file>content/TweetsModel.qml</file>
+ <file>content/resources/anonymous.png</file>
+ <file>content/resources/bird-anim-sprites.png</file>
+ <file>content/resources/icon-clear.png</file>
+ <file>content/resources/icon-loading.png</file>
+ <file>content/resources/icon-refresh.png</file>
+ <file>content/resources/icon-search.png</file>
+ </qresource>
+</RCC>