diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2011-03-01 09:43:00 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2011-03-01 09:43:00 +0100 |
commit | f37a39cf77bc20770211e05fbb4570a4a2aacaa7 (patch) | |
tree | 96c8c47ee17d5c7b7c64e709446ff7937a8a1ccc | |
parent | 671c364ff69dbf9beb18ec66cb360bd3a669ce38 (diff) |
Add a bunch of new mobile demos from INdT
393 files changed, 6693 insertions, 0 deletions
diff --git a/CoffeeTweed/Add.qml b/CoffeeTweed/Add.qml new file mode 100644 index 0000000..5a16af9 --- /dev/null +++ b/CoffeeTweed/Add.qml @@ -0,0 +1,38 @@ +import Qt 4.7 + +Item { + id: bt_add + width: 188; height: 188 + + signal addClicked + + Image { + id: bt_add_off; + source: "images/bt_add_off.png"; + } + + Image { + id: bt_add_on; + source: "images/bt_add_on.png"; + opacity: 0; + Behavior on opacity { NumberAnimation { duration: 150; } } + } + + MouseArea { + anchors.fill: parent + onPressed: { bt_add.state = "pressed" } + onReleased: { bt_add.state = "released"; bt_add.addClicked() } + + } + + states: [ + State { + name: "pressed" + PropertyChanges{ target: bt_add_on; opacity: 1; } + }, + State { + name: "released" + PropertyChanges{ target: bt_add_on; opacity: 0; } + } + ] +} diff --git a/CoffeeTweed/CoffeeTweed.qml b/CoffeeTweed/CoffeeTweed.qml new file mode 100644 index 0000000..ed2fdae --- /dev/null +++ b/CoffeeTweed/CoffeeTweed.qml @@ -0,0 +1,82 @@ +import Qt 4.6 + +Rectangle { + id: root + width: 800; height: 480 + + property int coffee_count: 0 + property int coffee_total: 12 + + function add_one() { + if (coffee_count < coffee_total) { + root.coffee_count += 1, + counter_toGo.state = "add_count", + counter_cupsDown.state = "add_count", + cup.state = "less_one", + tray.add_cup(coffee_count) + } + } + function remove_one() { + if (coffee_count > 0) { + root.coffee_count -= 1, + counter_toGo.state = "remove_count", + counter_cupsDown.state = "remove_count", + tray.remove_cup(coffee_count) + } + } + + Image { + source: "images/bg.png" + } + + Taskbar { + anchors.top: root.top + } + + Counter_toGo { + id: counter_toGo + x: 130; y: 120; + } + + Counter_cupsDown { + id: counter_cupsDown + x: 260; y: 86; + } + + Text { + id: toGo; + y: 120; x: 345; + text: "to go"; font.pixelSize: 100; font.letterSpacing: 90; color: "#FFF" + } + Text { + id: cupsDown + y: 86; x: 390; + text: "cups down"; font.pixelSize: 50; font.letterSpacing: 90; color: "#999" + } + + Tray { + id: tray + x: 335; y: 280; + } + + Tray_model{ + id: traymodel + } + + Cup { + id: cup + x: 175; y: 0; + } + + Add { + id: add_btn + x: -7; y: 200 + onAddClicked: add_one() + } + + Remove { + id: remove_btn + x: 619; y: 200 + onRemoveClicked: remove_one() + } +} diff --git a/CoffeeTweed/CoffeeTweed.qmlproject b/CoffeeTweed/CoffeeTweed.qmlproject new file mode 100644 index 0000000..86a5669 --- /dev/null +++ b/CoffeeTweed/CoffeeTweed.qmlproject @@ -0,0 +1,16 @@ +// File generated by QtCreator + +import QmlProject 1.0 + +Project { + // Scan current directory for .qml, .js, and image files + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } +} diff --git a/CoffeeTweed/Counter_cupsDown.qml b/CoffeeTweed/Counter_cupsDown.qml new file mode 100644 index 0000000..9507390 --- /dev/null +++ b/CoffeeTweed/Counter_cupsDown.qml @@ -0,0 +1,58 @@ +import Qt 4.7 + +Item { + width: 100; height: 90; + state: "default" + + Text { + id: cupsDown_counter + x: 20; y: 0 + width: parent.width + + text: "0" + color: "#999"; font.bold: true; font.pixelSize: 50; smooth: true; horizontalAlignment: "AlignRight" + + Behavior on opacity { + NumberAnimation { duration: 300;} + } + } + + function reset_counter_state() { + counter_cupsDown.state = "default" + } + + states: [ + State { + name: "default" + }, + State { + name: "add_count" + }, + State { + name: "remove_count" + } + ] + + transitions: [ + Transition { + from: "default"; to: "add_count" + SequentialAnimation { + PropertyAnimation { target: cupsDown_counter; property: "opacity"; to: 0; } + PropertyAction{ target: cupsDown_counter; property: "text"; value: coffee_count } + PauseAnimation { duration: 1500; } + PropertyAnimation { target: cupsDown_counter; property: "opacity"; to: 1; } + ScriptAction { script: reset_counter_state() } + } + }, + Transition { + from: "default"; to: "remove_count" + SequentialAnimation { + PropertyAnimation { target: cupsDown_counter; property: "opacity"; to: 0; } + PropertyAction{ target: cupsDown_counter; property: "text"; value: coffee_count } + PauseAnimation { duration: 300; } + PropertyAnimation { target: cupsDown_counter; property: "opacity"; to: 1; } + ScriptAction { script: reset_counter_state() } + } + } + ] +} diff --git a/CoffeeTweed/Counter_toGo.qml b/CoffeeTweed/Counter_toGo.qml new file mode 100644 index 0000000..2bf8d88 --- /dev/null +++ b/CoffeeTweed/Counter_toGo.qml @@ -0,0 +1,58 @@ +import Qt 4.7 + +Item { + width: 170; height: 90; + state: "default" + + Text { + id: toGo_counter + x: 20; y: 0 + width: parent.width + + text: coffee_total + color: "#FFF"; font.bold: true; font.pixelSize: 100; smooth: true; horizontalAlignment: "AlignRight" + + Behavior on opacity { + NumberAnimation { duration: 300;} + } + } + + function reset_counter_state() { + counter_toGo.state = "default" + } + + states: [ + State { + name: "default" + }, + State { + name: "add_count" + }, + State { + name: "remove_count" + } + ] + + transitions: [ + Transition { + from: "default"; to: "add_count" + SequentialAnimation { + PropertyAnimation { target: toGo_counter; property: "opacity"; to: 0; } + PropertyAction{ target: toGo_counter; property: "text"; value: coffee_total - coffee_count } + PauseAnimation { duration: 1500; } + PropertyAnimation { target: toGo_counter; property: "opacity"; to: 1; } + ScriptAction { script: reset_counter_state() } + } + }, + Transition { + from: "default"; to: "remove_count" + SequentialAnimation { + PropertyAnimation { target: toGo_counter; property: "opacity"; to: 0; } + PropertyAction{ target: toGo_counter; property: "text"; value: coffee_total - coffee_count } + PauseAnimation { duration: 300; } + PropertyAnimation { target: toGo_counter; property: "opacity"; to: 1; } + ScriptAction { script: reset_counter_state() } + } + } + ] +} diff --git a/CoffeeTweed/Cup.qml b/CoffeeTweed/Cup.qml new file mode 100644 index 0000000..93fc385 --- /dev/null +++ b/CoffeeTweed/Cup.qml @@ -0,0 +1,112 @@ +import Qt 4.7 + +Item { + id: coffee_cup + width: 190; height: 480 + + function return_to_ashes() { + coffee_cup.state = ""; + } + + Image { + id: cup_plate + source: "images/coffee_plate.png"; y: 365 + } + + Item { + id: cup_full + width: 135; height: 138; x: 7; y: 280 + Image { source: "images/cup_back.png"; } + + Item { id: cup_content; Image { source: "images/cup_content.png"; } } + Item { id: cup_front; Image { source: "images/cup_front.png"; } } + } + + Item { + id: cup_empty + width: 135; height: 138; x: 7; y: 280; opacity: 0 + Image { source: "images/cup_empty.png"; } + } + + Item { + id: cup_smoke + width: 233; height: 258; y: 45; x: -13; opacity: 1 + Image { source: "images/cup_smoke.png" } + } + + Item { + id: cup_running + width: 135; height: 188; x: 7; y: -228; opacity: 0 + Image { source: "images/cup_blur.png"; } + } + + states: [ + State{ + name: "less_one" + } + ] + + transitions: [ + Transition { + from: "" + to: "less_one" + + SequentialAnimation{ + + // Empty the cup and fade the smoke + ParallelAnimation { + PropertyAnimation { target: cup_smoke; property: "opacity"; to: 0; duration: 500; } + PropertyAnimation { target: cup_content; property: "y"; to: 25; duration: 500; } + } + + // Change the full cup composition by the empty cup + PropertyAction { target: cup_empty; property: "opacity"; value: 1 } + PropertyAction { target: cup_full; property: "opacity"; value: 0; } + + // Pause for coffee + PauseAnimation { duration: 100; } + + // Fade out the empty cup + PropertyAnimation { target: cup_empty; property: "opacity"; to: 0; duration: 200; } + + // Send the empty cup to the top and update the number + PropertyAction { target: cup_empty; property: "y"; value: -188; } + + // Turn on the blur and empty cups + PropertyAction { target: cup_running; property: "opacity"; value: 1; } + PropertyAction { target: cup_empty; property: "opacity"; value: 1; } + + // Clean cup coming! + ParallelAnimation { + PropertyAnimation { target: cup_running; property: "y"; to: 235; duration: 300; } + PropertyAnimation { target: cup_empty; property: "y"; to: 285; duration: 300; } + } + + // Landing in the plate + ParallelAnimation { + PropertyAnimation { target: cup_empty; property: "y"; to: 280; duration: 150; } + PropertyAnimation { target: cup_running; property: "opacity"; to: 0; duration: 200; } + } + + // Get the blured cup to the original place + PropertyAction { target: cup_running; property: "y"; value: -228; } + + // Wait for the waiter + PauseAnimation { duration: 500; } + + // Change the empty cup by the full cup composition + PropertyAction { target: cup_full; property: "opacity"; value: 1; } + PropertyAction { target: cup_empty; property: "opacity"; value: 0; } + + // Here is your coffee, sir + PropertyAnimation { target: cup_content; property: "y"; to: 0; duration: 400; } + PropertyAnimation { target: cup_smoke; property: "opacity"; to: 1; duration: 700; } + + // Ready for the next turn + ScriptAction { script: return_to_ashes() } + } + + } + ] + +} diff --git a/CoffeeTweed/Remove.qml b/CoffeeTweed/Remove.qml new file mode 100644 index 0000000..66c35f1 --- /dev/null +++ b/CoffeeTweed/Remove.qml @@ -0,0 +1,39 @@ +import Qt 4.7 + +Item { + id: bt_remove + width: 188; height: 188 + + signal removeClicked + + Image { + id: bt_remove_off; + source: "images/bt_remove_off.png"; + } + + Image { + id: bt_remove_on; + source: "images/bt_remove_on.png"; + opacity: 0; + Behavior on opacity { NumberAnimation { duration: 150; } } + } + + MouseArea { + anchors.fill: parent + onPressed: { bt_remove.state = "pressed" } + onReleased: { bt_remove.state = "released"; bt_remove.removeClicked() } + + } + + states: [ + State { + name: "pressed" + PropertyChanges{ target: bt_remove_on; opacity: 1; } + }, + State { + name: "released" + PropertyChanges{ target: bt_remove_on; opacity: 0; } + } + ] + +} diff --git a/CoffeeTweed/Taskbar.qml b/CoffeeTweed/Taskbar.qml new file mode 100644 index 0000000..f64ae17 --- /dev/null +++ b/CoffeeTweed/Taskbar.qml @@ -0,0 +1,6 @@ +import Qt 4.7 + +Rectangle { + width: 800; height: 55 + Image { source: "images/taskbar_placeholder.png" } +} diff --git a/CoffeeTweed/Tray.qml b/CoffeeTweed/Tray.qml new file mode 100644 index 0000000..608317a --- /dev/null +++ b/CoffeeTweed/Tray.qml @@ -0,0 +1,64 @@ +import Qt 4.7 + +Item { + id:cuptray + width: 330; height: 110; + + Tray_model{ + id: traymodel + } + + function add_cup(indx) { + var cupindx = indx -1; + traymodel.set(cupindx, { cupstate: "display" }); + } + + function remove_cup(indx) { + var cupindx = indx; + traymodel.set(cupindx, { cupstate: "hide" }); + } + + Component { + id: emptycup + Item { + id: empty_cup + width: 69; height: 67 + x: pos_x; y: pos_y; z: pos_z + opacity: 0 + state: cupstate + + Image { source: img_src } + + Behavior on opacity { NumberAnimation { duration: 400 } } + + states: [ + State { + name: "display" + }, + State { + name: "hide" + } + ] + transitions: [ + Transition { + from: "*"; to: "hide" + SequentialAnimation { + PropertyAnimation { target: empty_cup; property: "opacity"; to: 0; } + } + }, + Transition { + from: "hide"; to: "display" + SequentialAnimation { + PropertyAnimation { target: empty_cup; property: "opacity"; to: 1; } + } + } + ] + } + } + + Repeater { + model: traymodel + delegate: emptycup + } + +} diff --git a/CoffeeTweed/Tray_model.qml b/CoffeeTweed/Tray_model.qml new file mode 100644 index 0000000..bbbcb38 --- /dev/null +++ b/CoffeeTweed/Tray_model.qml @@ -0,0 +1,20 @@ +import Qt 4.7 + +ListModel { + id: tray_model + + ListElement { cupstate: "hide"; img_src: "images/empty_row1.png"; pos_x: 64; pos_y: 40; pos_z: 3 } + ListElement { cupstate: "hide"; img_src: "images/empty_row1.png"; pos_x: 124; pos_y: 40; pos_z: 3 } + ListElement { cupstate: "hide"; img_src: "images/empty_row1.png"; pos_x: 184; pos_y: 40; pos_z: 3 } + ListElement { cupstate: "hide"; img_src: "images/empty_row1.png"; pos_x: 244; pos_y: 40; pos_z: 3 } + + ListElement { cupstate: "hide"; img_src: "images/empty_row2.png"; pos_x: 32; pos_y: 20; pos_z: 2 } + ListElement { cupstate: "hide"; img_src: "images/empty_row2.png"; pos_x: 92; pos_y: 20; pos_z: 2 } + ListElement { cupstate: "hide"; img_src: "images/empty_row2.png"; pos_x: 152; pos_y: 20; pos_z: 2 } + ListElement { cupstate: "hide"; img_src: "images/empty_row2.png"; pos_x: 212; pos_y: 20; pos_z: 2 } + + ListElement { cupstate: "hide"; img_src: "images/empty_row3.png"; pos_x: 0; pos_y: 0; pos_z: 1 } + ListElement { cupstate: "hide"; img_src: "images/empty_row3.png"; pos_x: 60; pos_y: 0; pos_z: 1 } + ListElement { cupstate: "hide"; img_src: "images/empty_row3.png"; pos_x: 120; pos_y: 0; pos_z: 1 } + ListElement { cupstate: "hide"; img_src: "images/empty_row3.png"; pos_x: 180; pos_y: 0; pos_z: 1 } +} diff --git a/CoffeeTweed/images/.DS_Store b/CoffeeTweed/images/.DS_Store Binary files differnew file mode 100755 index 0000000..5008ddf --- /dev/null +++ b/CoffeeTweed/images/.DS_Store diff --git a/CoffeeTweed/images/bg.png b/CoffeeTweed/images/bg.png Binary files differnew file mode 100755 index 0000000..ef08d0e --- /dev/null +++ b/CoffeeTweed/images/bg.png diff --git a/CoffeeTweed/images/bt_add_off.png b/CoffeeTweed/images/bt_add_off.png Binary files differnew file mode 100755 index 0000000..b317af6 --- /dev/null +++ b/CoffeeTweed/images/bt_add_off.png diff --git a/CoffeeTweed/images/bt_add_on.png b/CoffeeTweed/images/bt_add_on.png Binary files differnew file mode 100755 index 0000000..593cf2e --- /dev/null +++ b/CoffeeTweed/images/bt_add_on.png diff --git a/CoffeeTweed/images/bt_remove_off.png b/CoffeeTweed/images/bt_remove_off.png Binary files differnew file mode 100755 index 0000000..c5bd438 --- /dev/null +++ b/CoffeeTweed/images/bt_remove_off.png diff --git a/CoffeeTweed/images/bt_remove_on.png b/CoffeeTweed/images/bt_remove_on.png Binary files differnew file mode 100755 index 0000000..2b6c9e2 --- /dev/null +++ b/CoffeeTweed/images/bt_remove_on.png diff --git a/CoffeeTweed/images/coffee_plate.png b/CoffeeTweed/images/coffee_plate.png Binary files differnew file mode 100755 index 0000000..4abbfb9 --- /dev/null +++ b/CoffeeTweed/images/coffee_plate.png diff --git a/CoffeeTweed/images/cup_back.png b/CoffeeTweed/images/cup_back.png Binary files differnew file mode 100755 index 0000000..c553027 --- /dev/null +++ b/CoffeeTweed/images/cup_back.png diff --git a/CoffeeTweed/images/cup_blur.png b/CoffeeTweed/images/cup_blur.png Binary files differnew file mode 100755 index 0000000..2add637 --- /dev/null +++ b/CoffeeTweed/images/cup_blur.png diff --git a/CoffeeTweed/images/cup_content.png b/CoffeeTweed/images/cup_content.png Binary files differnew file mode 100755 index 0000000..848a691 --- /dev/null +++ b/CoffeeTweed/images/cup_content.png diff --git a/CoffeeTweed/images/cup_empty.png b/CoffeeTweed/images/cup_empty.png Binary files differnew file mode 100755 index 0000000..6201666 --- /dev/null +++ b/CoffeeTweed/images/cup_empty.png diff --git a/CoffeeTweed/images/cup_front.png b/CoffeeTweed/images/cup_front.png Binary files differnew file mode 100755 index 0000000..81c5da6 --- /dev/null +++ b/CoffeeTweed/images/cup_front.png diff --git a/CoffeeTweed/images/cup_full.png b/CoffeeTweed/images/cup_full.png Binary files differnew file mode 100755 index 0000000..7470d53 --- /dev/null +++ b/CoffeeTweed/images/cup_full.png diff --git a/CoffeeTweed/images/cup_smoke.png b/CoffeeTweed/images/cup_smoke.png Binary files differnew file mode 100755 index 0000000..aa98b3b --- /dev/null +++ b/CoffeeTweed/images/cup_smoke.png diff --git a/CoffeeTweed/images/empty_row1.png b/CoffeeTweed/images/empty_row1.png Binary files differnew file mode 100755 index 0000000..9023f93 --- /dev/null +++ b/CoffeeTweed/images/empty_row1.png diff --git a/CoffeeTweed/images/empty_row2.png b/CoffeeTweed/images/empty_row2.png Binary files differnew file mode 100755 index 0000000..2a8fa2f --- /dev/null +++ b/CoffeeTweed/images/empty_row2.png diff --git a/CoffeeTweed/images/empty_row3.png b/CoffeeTweed/images/empty_row3.png Binary files differnew file mode 100755 index 0000000..211a6d7 --- /dev/null +++ b/CoffeeTweed/images/empty_row3.png diff --git a/CoffeeTweed/images/taskbar_bg.png b/CoffeeTweed/images/taskbar_bg.png Binary files differnew file mode 100755 index 0000000..0658fbf --- /dev/null +++ b/CoffeeTweed/images/taskbar_bg.png diff --git a/CoffeeTweed/images/taskbar_close_bt.png b/CoffeeTweed/images/taskbar_close_bt.png Binary files differnew file mode 100755 index 0000000..70a1e66 --- /dev/null +++ b/CoffeeTweed/images/taskbar_close_bt.png diff --git a/CoffeeTweed/images/taskbar_division.png b/CoffeeTweed/images/taskbar_division.png Binary files differnew file mode 100755 index 0000000..0e481a4 --- /dev/null +++ b/CoffeeTweed/images/taskbar_division.png diff --git a/CoffeeTweed/images/taskbar_home_bt.png b/CoffeeTweed/images/taskbar_home_bt.png Binary files differnew file mode 100755 index 0000000..f4c61d8 --- /dev/null +++ b/CoffeeTweed/images/taskbar_home_bt.png diff --git a/CoffeeTweed/images/taskbar_options_bt.png b/CoffeeTweed/images/taskbar_options_bt.png Binary files differnew file mode 100755 index 0000000..f68a4f4 --- /dev/null +++ b/CoffeeTweed/images/taskbar_options_bt.png diff --git a/CoffeeTweed/images/taskbar_placeholder.png b/CoffeeTweed/images/taskbar_placeholder.png Binary files differnew file mode 100755 index 0000000..824f1b3 --- /dev/null +++ b/CoffeeTweed/images/taskbar_placeholder.png diff --git a/RadioTuner/README.rtf b/RadioTuner/README.rtf new file mode 100644 index 0000000..3891a00 --- /dev/null +++ b/RadioTuner/README.rtf @@ -0,0 +1,7 @@ +{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf540 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\paperw11900\paperh16840\margl1440\margr1440\vieww9000\viewh8400\viewkind0 +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural + +\f0\fs24 \cf0 Just need to run the "RadioTuner.qml" file.}
\ No newline at end of file diff --git a/RadioTuner/RadioModel.qml b/RadioTuner/RadioModel.qml new file mode 100644 index 0000000..e6974ef --- /dev/null +++ b/RadioTuner/RadioModel.qml @@ -0,0 +1,5 @@ +import Qt 4.7 + +ListModel { + id: radioModel + } diff --git a/RadioTuner/RadioTuner.qml b/RadioTuner/RadioTuner.qml new file mode 100644 index 0000000..39db455 --- /dev/null +++ b/RadioTuner/RadioTuner.qml @@ -0,0 +1,145 @@ +import Qt 4.7 + +Item { + id: root + width: 800 + height: 480 + + Script { + source: "rangemodel.js"; + } + + Image { + id: tunerBg + x: 81 + y: 86 + source: "images/scala_bg.png" + } + + StationsModel{ + id:stationsModel; + } + + ListView { + id: radiosList; + x: 68; + y: 86; + width: 638; + height: 270; + orientation: "Horizontal" + model: createModel(stationsModel); + delegate: scaleDelegate; + highlightMoveSpeed: -1; + highlightRangeMode: "StrictlyEnforceRange" + //interactive: false; + } + + Component { + id: scaleDelegate; + RangeStation { + width: 29; + height: 266; + stationRange: model.stationRange; + kind: model.kind; + station: model.station; + stationName: model.stationName; + } + } + + Image { + id: buttonNext; + x: 719 + y: 86 + source: "images/bt_next.png" + + MouseArea { + anchors.fill: parent; + onClicked: { + gotoNextStation(radiosList, stationName, stationDial); + } + } + } + + Image { + id: buttonPrevious; + x: 0 + y: 86 + source: "images/bt_prev.png" + + MouseArea { + anchors.fill: parent; + onClicked: { + gotoPreviousStation(radiosList, stationName, stationDial); + } + } + } + + Image { + id: bottomBar; + x: 0 + y: 355 + source: "images/bottom.png" + } + + Image { + id: topBar; + x: 0 + y: 58 + source: "images/top.png" + } + + Image { + id: placeHolder; + x: 0 + y: 0 + source: "images/placeholder_n900_bar.png" + } + + Image { + id: image1 + x: 81 + y: 86 + source: "images/scala_glass.png" + } + + Image { + id: image2 + x: 198 + y: 117 + source: "images/scala_needle.png" + } + + Text { + id: stationName + x: 198 + y: 377 + width: 404 + height: 46 + color: "#ffffff" + styleColor: "#ffffff" + horizontalAlignment: "AlignHCenter" + font.pointSize: 35 + font.family: "Nokia Sans" + } + + Text { + id: stationDial + x: 290 + y: 422 + width: 220 + height: 32 + color: "#eaeaeb" + font.pointSize: 25 + font.family: "Nokia Sans" + styleColor: "#eaeaeb" + horizontalAlignment: "AlignHCenter" + } + + + Component.onCompleted:{ + radiosList.currentIndex = gotoradioIndex(0); + radiosList.highlightMoveSpeed = 1000; + stationName.text = setStationName(0); + stationDial.text = setStationDial(0); + } +} diff --git a/RadioTuner/RadioTuner.qmlproject b/RadioTuner/RadioTuner.qmlproject new file mode 100644 index 0000000..86a5669 --- /dev/null +++ b/RadioTuner/RadioTuner.qmlproject @@ -0,0 +1,16 @@ +// File generated by QtCreator + +import QmlProject 1.0 + +Project { + // Scan current directory for .qml, .js, and image files + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } +} diff --git a/RadioTuner/RangeStation.qml b/RadioTuner/RangeStation.qml new file mode 100644 index 0000000..4ce6e37 --- /dev/null +++ b/RadioTuner/RangeStation.qml @@ -0,0 +1,69 @@ +import Qt 4.6 + +Item { + id: range; + width: 266; + height: 272; + property real stationRange; + property int roundedRange : parseInt(stationRange) + property string kind; + property string stationName; + property real station; + + onKindChanged:{ + if(kind == "high") + background.source = "images/high_tick.png"; + + else if(kind == "medium") + background.source = "images/medium_tick.png"; + + else if(kind == "low") + background.source = "images/low_tick.png"; + } + + onStationChanged:{ + if(station != -1){ + bgText.visible = true; + } + + } + + Image { + id: background; + anchors.fill: parent; + anchors.topMargin: 30; + fillMode: "PreserveAspectFit"; + } + + Image { + id: bgText; + visible: false; + fillMode: "PreserveAspectFit"; + source:"images/scala_rdslabel.png"; + + Text { + id: name; + text: stationName; + rotation: 270; + anchors.fill:parent; + anchors.leftMargin:70; + anchors.topMargin:170; + color: "#514C4A"; + font.pixelSize: 23; + font.family: "Nokia Sans"; + } + + } + + Text { + id: rangeText; + text: parent.roundedRange; + width: 50; + x:-10; + color: "#000000"; + font.pixelSize: 25; + font.family: "Nokia Sans"; + horizontalAlignment: "AlignHCenter"; + visible: parseInt(stationRange * 10) % 10 == 0; + } +} diff --git a/RadioTuner/StationsModel.qml b/RadioTuner/StationsModel.qml new file mode 100644 index 0000000..c979c17 --- /dev/null +++ b/RadioTuner/StationsModel.qml @@ -0,0 +1,77 @@ +import Qt 4.7 + +ListModel { + id: stationsModel + ListElement { + name: "NME Radio" + dial: 87.7 + } + ListElement { + name: "BBC Radio 2" + dial: 89.1 + } + ListElement { + name: "BBC Radio 3" + dial: 91.3 + } + ListElement { + name: "BBC Radio 4" + dial: 93.5 + } + ListElement { + name: "BBC London" + dial: 94.9 + } + ListElement { + name: "Capital FM" + dial: 95.8 + } + ListElement { + name: "The Eagle" + dial: 96.4 + } + ListElement { + name: "Herts Mercury" + dial: 87.7 + } + ListElement { + name: "BBC Radio Kent" + dial: 96.6 + } + ListElement { + name: "Choice FM" + dial: 96.9 + } + ListElement { + name: "LBC" + dial: 97.3 + } + ListElement { + name: "Chiltern FM" + dial: 97.6 + } + ListElement { + name: "BBC Radio 1" + dial: 98.8 + } + ListElement { + name: "Kiss FM" + dial: 100.0 + } + ListElement { + name: "Classic FM" + dial: 100.9 + } + ListElement { + name: "Mercury FM" + dial: 101.6 + } + ListElement { + name: "Smooth FM" + dial: 102.2 + } + ListElement { + name: "Essex FM" + dial: 102.7 + } + } diff --git a/RadioTuner/images/.DS_Store b/RadioTuner/images/.DS_Store Binary files differnew file mode 100644 index 0000000..5008ddf --- /dev/null +++ b/RadioTuner/images/.DS_Store diff --git a/RadioTuner/images/bottom.png b/RadioTuner/images/bottom.png Binary files differnew file mode 100755 index 0000000..854266d --- /dev/null +++ b/RadioTuner/images/bottom.png diff --git a/RadioTuner/images/bt_next.png b/RadioTuner/images/bt_next.png Binary files differnew file mode 100755 index 0000000..8951976 --- /dev/null +++ b/RadioTuner/images/bt_next.png diff --git a/RadioTuner/images/bt_next_down.png b/RadioTuner/images/bt_next_down.png Binary files differnew file mode 100755 index 0000000..1a476df --- /dev/null +++ b/RadioTuner/images/bt_next_down.png diff --git a/RadioTuner/images/bt_prev.png b/RadioTuner/images/bt_prev.png Binary files differnew file mode 100755 index 0000000..754f9e9 --- /dev/null +++ b/RadioTuner/images/bt_prev.png diff --git a/RadioTuner/images/bt_prev_down.png b/RadioTuner/images/bt_prev_down.png Binary files differnew file mode 100755 index 0000000..1e0d353 --- /dev/null +++ b/RadioTuner/images/bt_prev_down.png diff --git a/RadioTuner/images/bt_rdsname_arrow.png b/RadioTuner/images/bt_rdsname_arrow.png Binary files differnew file mode 100755 index 0000000..62a85ec --- /dev/null +++ b/RadioTuner/images/bt_rdsname_arrow.png diff --git a/RadioTuner/images/high_tick.png b/RadioTuner/images/high_tick.png Binary files differnew file mode 100644 index 0000000..6f966c6 --- /dev/null +++ b/RadioTuner/images/high_tick.png diff --git a/RadioTuner/images/low_tick.png b/RadioTuner/images/low_tick.png Binary files differnew file mode 100644 index 0000000..f4aa2c1 --- /dev/null +++ b/RadioTuner/images/low_tick.png diff --git a/RadioTuner/images/medium_tick.png b/RadioTuner/images/medium_tick.png Binary files differnew file mode 100644 index 0000000..f03aa10 --- /dev/null +++ b/RadioTuner/images/medium_tick.png diff --git a/RadioTuner/images/placeholder_n900_bar.png b/RadioTuner/images/placeholder_n900_bar.png Binary files differnew file mode 100644 index 0000000..ae34d72 --- /dev/null +++ b/RadioTuner/images/placeholder_n900_bar.png diff --git a/RadioTuner/images/scala_bg.png b/RadioTuner/images/scala_bg.png Binary files differnew file mode 100755 index 0000000..3c63cb6 --- /dev/null +++ b/RadioTuner/images/scala_bg.png diff --git a/RadioTuner/images/scala_glass.png b/RadioTuner/images/scala_glass.png Binary files differnew file mode 100755 index 0000000..639c2b7 --- /dev/null +++ b/RadioTuner/images/scala_glass.png diff --git a/RadioTuner/images/scala_needle.png b/RadioTuner/images/scala_needle.png Binary files differnew file mode 100755 index 0000000..3a14938 --- /dev/null +++ b/RadioTuner/images/scala_needle.png diff --git a/RadioTuner/images/scala_rdslabel.png b/RadioTuner/images/scala_rdslabel.png Binary files differnew file mode 100755 index 0000000..a2ec211 --- /dev/null +++ b/RadioTuner/images/scala_rdslabel.png diff --git a/RadioTuner/images/scala_ticks.png b/RadioTuner/images/scala_ticks.png Binary files differnew file mode 100755 index 0000000..0e8dc81 --- /dev/null +++ b/RadioTuner/images/scala_ticks.png diff --git a/RadioTuner/images/top.png b/RadioTuner/images/top.png Binary files differnew file mode 100755 index 0000000..defa47c --- /dev/null +++ b/RadioTuner/images/top.png diff --git a/RadioTuner/rangemodel.js b/RadioTuner/rangemodel.js new file mode 100644 index 0000000..88aa557 --- /dev/null +++ b/RadioTuner/rangemodel.js @@ -0,0 +1,93 @@ +var startRange = 860; +var finalRange = 2090; +var middleRange = 11; +var k = 0; +var actualItem = 0; +var stationsArray = []; +var indexArray = []; + +function createModel(stationsModel){ + createArray(stationsModel); + + var component = createComponent("RadioModel.qml"); + var object = component.createObject(); + populateModel(object); + + return object +} + +function populateModel(model){ + for(var i=startRange;i<=finalRange;i++) { + var range = i/10.0; + var stationName = "none"; + var stationDial = hasStation(range, k); + if(stationDial != -1) + stationName = stationsArray[range]; + var object = {stationRange:range, kind:setKind(i), station:stationDial, stationName:stationName} + model.append(object); + k++ + } +} + +function createArray(model){ + for(var i=0;i<=model.count-1;i++) { + var object = new Object(); + stationsArray[model.get(i).dial] = model.get(i).name; + } + +} + +function setKind(index){ + + if(index%10 == 0) { + return "high" + } + else if(index%5 == 0) { + return "medium" + } + + return "low" +} + +function hasStation(range, k){ + if(stationsArray[range] != undefined){ + var object = new Object(); + object.index = k; + object.dial = range; + object.name = stationsArray[range] + indexArray.push(object); + return range + } + return -1 +} + +function gotoradioIndex(index){ + return indexArray[index].index - middleRange +} + +function setStationName(index){ + return indexArray[index].name +} + +function setStationDial(index){ + return indexArray[index].dial +} + +function gotoNextStation(list, stationText, dialText){ + actualItem++ + if(actualItem > indexArray.length-1) + actualItem = indexArray.length-1 + list.currentIndex = indexArray[actualItem].index - middleRange; + stationText.text = setStationName(actualItem); + dialText.text = setStationDial(actualItem); +} + +function gotoPreviousStation(list, stationText, dialText){ + actualItem-- + if(actualItem < 0) + actualItem = 0 + list.currentIndex = indexArray[actualItem].index - middleRange; + stationText.text = setStationName(actualItem); + dialText.text = setStationDial(actualItem); +} + diff --git a/qtflyingbus/core/AboutMenu.qml b/qtflyingbus/core/AboutMenu.qml new file mode 100644 index 0000000..c07520f --- /dev/null +++ b/qtflyingbus/core/AboutMenu.qml @@ -0,0 +1,65 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 + +Image { + id: about + source: "images/menu/about.png" + + signal clicked(); + + MouseArea { + anchors.fill: parent + onClicked: about.clicked(); + } + + MouseArea { + x: 141 + y: 64 + width: 266 + height: 61 + rotation: -9 + onClicked: { + Qt.openUrlExternally("http://qt.nokia.com") + } + } +} diff --git a/qtflyingbus/core/Background.qml b/qtflyingbus/core/Background.qml new file mode 100644 index 0000000..ee5c7a1 --- /dev/null +++ b/qtflyingbus/core/Background.qml @@ -0,0 +1,78 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 + +Item { + id: background + + Component { + id: itemComponent + + Image { + id: item + property real iniX : 0.0 + property real iniY : 0.0 + property real speed : 1.0 + property real vspeed : 1.0 + property bool tile : false + + Binding { + target: item + when: item.tile + property: "width" + value: canvas.sceneWidth + } + + fillMode: Image.TileHorizontally + x: item.iniX + canvas.sceneX * item.speed + y: item.iniY - canvas.sceneY * item.vspeed + } + } + + function createItem(image, x, y) { + var object = itemComponent.createObject(background); + object.source = Qt.resolvedUrl(image); + object.iniY = background.height - parseInt(y); + object.iniX = parseInt(x) * background.width / 640.0; + return object; + } +} diff --git a/qtflyingbus/core/Balloon.qml b/qtflyingbus/core/Balloon.qml new file mode 100644 index 0000000..4054c0b --- /dev/null +++ b/qtflyingbus/core/Balloon.qml @@ -0,0 +1,113 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 + +FrameSprite { + id: balloon + + signal clicked(); + + property string color + property bool full : false + property int lineHeight : 80 + property int balloonTop : 0 + property int balloonBottom : 0 + property int animationPhase : 0 + property int maxAnimationPhase : 8 + + visible: false + + frameImages: [ + "images/balloons/" + color + "/1.png", + "images/balloons/" + color + "/2.png", + "images/balloons/" + color + "/3.png", + "images/balloons/" + color + "/4.png", + "images/balloons/" + color + "/5.png", + "images/balloons/" + color + "/6.png", + ] + + MouseArea { + anchors.fill: parent + onClicked: balloon.clicked(); + } + + Image { + y: 50 + z: -1 + height: lineHeight + fillMode: Image.TileVertically + source: "images/balloons/line.png"; + anchors.horizontalCenter : parent.horizontalCenter + } + + onFullChanged: { + visible = true; + animationPhase = 0; + + if (full) { + frameIndex = 0; + y = balloonBottom; + maxAnimationPhase = 8; + } else { + frameIndex = 3; + y = balloonTop; + maxAnimationPhase = 4; + } + } + + function advance(phase) { + if (animationPhase >= maxAnimationPhase) + return; + + animationPhase++; + var progress = animationPhase / maxAnimationPhase; + + if (full) { + frameIndex = 3 * progress; + y = balloonBottom + (balloonTop - balloonBottom) * progress; + } else { + frameIndex = 4 + progress; + if (progress >= 1.0) + visible = false; + } + } +} diff --git a/qtflyingbus/core/Base.qml b/qtflyingbus/core/Base.qml new file mode 100644 index 0000000..5b93b09 --- /dev/null +++ b/qtflyingbus/core/Base.qml @@ -0,0 +1,199 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 +import "engine.js" as Engine + +Item { + id: screen + property int score : 0 + property int highScore : 0 + property bool ready : false + property bool paused : true + + signal levelLoaded(); + + LevelModel { + id: levelModel + onStatusChanged: { + if (status == XmlListModel.Ready) { + levelLoaded(); + Engine.startGame(ready); + ready = true; + } + } + } + + Item { + id: canvas + anchors.fill: parent + + property real sceneX: 0.0 + property real sceneY: Math.min(player.balloonTop, 0) + property real sceneWidth: 0.0 + property real sceneHeight: canvas.height * 6.0 + + Background { + id: background + anchors.fill: parent + } + + Score { + life: player.life + value: screen.score + anchors.top: parent.top + anchors.left: parent.left + } + + Item { + id: foreground + y: -canvas.sceneY + width: canvas.width + height: canvas.sceneHeight + + Player { id: player; z: 1; } + } + } + + Rectangle { + id: overlay + color: "black" + opacity: 0.7 + anchors.fill: canvas + anchors.leftMargin: -2 + + MouseArea { + // block mouse event + anchors.fill: parent + } + } + + Menu { + id: menu + y: screen.height / 2 - menu.height / 2 + anchors.horizontalCenter: parent.horizontalCenter + + onHelpClicked: screen.state = "help"; + onPlayClicked: Engine.resumeGame(); + onRestartClicked: Engine.restartGame(); + onNextLevelClicked: Engine.gotoNextLevel(); + } + + Button { + id: pauseButton + visible: false + anchors.top: parent.top + anchors.right: parent.right + normalImage: "images/buttons/pause.png" + pressedImage: "images/buttons/pause2.png" + onClicked: { + menu.setState("default"); + screen.state = ""; + } + } + + Button { + id: closeButton + anchors.top: parent.top + anchors.right: parent.right + normalImage: "images/buttons/close.png" + pressedImage: "images/buttons/close2.png" + onClicked: menu.setState("leave"); + } + + HelpScreen { + id: helpScreen + visible: false + anchors.fill: parent + onBackClicked: screen.state = ""; + } + + FinalSplash { + id: finalSplash + anchors.fill: parent + + onDialogRequest: { + menu.setState("youwon", false); + screen.state = ""; + } + } + + Timer { + id: timer + repeat: true + interval: 30 + running: false + onTriggered: Engine.tick(); + } + + states : [ + State { + name: "running" + PropertyChanges { target: timer; running: true; } + PropertyChanges { target: pauseButton; visible: true; } + PropertyChanges { target: closeButton; visible: false; } + PropertyChanges { target: menu; visible: false; opacity: 0.0; + y: screen.height / 2 - menu.height / 2 - 20; } + PropertyChanges { target: overlay; visible: false; opacity: 0.0; } + }, + State { + name: "help" + PropertyChanges { target: canvas; visible: false; } + PropertyChanges { target: helpScreen; visible: true; } + PropertyChanges { target: closeButton; visible: false; } + PropertyChanges { target: menu; visible: false; opacity: 0.0; } + PropertyChanges { target: overlay; visible: false; opacity: 0.0; } + } + ] + + transitions: [ + Transition { + from: "running"; to: ""; reversible: true; + PropertyAction { target: menu; property: "visible"; } + NumberAnimation { target: menu; properties: "y,opacity"; duration: 200; } + } + ] + + Component.onCompleted: { + Engine.loadDatabase(); + Engine.loadLevel(0); + } +} diff --git a/qtflyingbus/core/Button.qml b/qtflyingbus/core/Button.qml new file mode 100644 index 0000000..6809575 --- /dev/null +++ b/qtflyingbus/core/Button.qml @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 + +Image { + id: button + property url normalImage + property url pressedImage + + signal clicked(); + + source: mouseArea.pressed ? pressedImage : normalImage + + MouseArea { + id: mouseArea + anchors.fill: parent + onClicked: button.clicked(); + } +} diff --git a/qtflyingbus/core/CompleteMenu.qml b/qtflyingbus/core/CompleteMenu.qml new file mode 100644 index 0000000..69f5984 --- /dev/null +++ b/qtflyingbus/core/CompleteMenu.qml @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 + +ScoreMenu { + signal nextLevelClicked(); + + Image { + x: 140 + y: 21 + source: "images/menu/complete_title.png" + } + + Button { + x: 90 + y: 90 + normalImage: "images/menu/button/next_level.png" + pressedImage: "images/menu/button/next_level_pressed.png" + onClicked: nextLevelClicked(); + } +} diff --git a/qtflyingbus/core/DigitLabel.qml b/qtflyingbus/core/DigitLabel.qml new file mode 100644 index 0000000..921d11b --- /dev/null +++ b/qtflyingbus/core/DigitLabel.qml @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 + +Row { + id: label + property int value + + spacing: 2 + + Component { + id: digitComponent + Image { smooth: true; } + } + + onValueChanged: { + var digits = label.children; + for (var i = 0; i < digits.length; i++) + digits[i].destroy(); + + if (digitComponent.status != Component.Ready) + return; + + var str = value.toString(); + for (var i = 0; i < str.length; i++) { + var object = digitComponent.createObject(label); + var symbol = (str[i] == "-") ? "minus" : str[i]; + object.source = "images/digits/" + symbol + ".png"; + } + } +} diff --git a/qtflyingbus/core/FinalSplash.qml b/qtflyingbus/core/FinalSplash.qml new file mode 100644 index 0000000..ab2e842 --- /dev/null +++ b/qtflyingbus/core/FinalSplash.qml @@ -0,0 +1,128 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 + +Item { + id: splash + visible: false + + signal dialogRequest(); + + MouseArea { + // block mouse events + anchors.fill: parent + } + + Image { + id: world + visible: false + source: "images/splash/finalbackground.png" + anchors.bottom: parent.bottom + + FinalSplashItem { + jumpSize: 20 + jumpDelay: 40 + x: 300 + sceneY: world.height - 314 + active: world.visible + source: "images/splash/tablet.png" + } + FinalSplashItem { + jumpSize: 40 + jumpDelay: 20 + x: 520 + sceneY: world.height - 276 + active: world.visible + source: "images/splash/n8.png" + } + FinalSplashItem { + jumpSize: 25 + jumpDelay: 50 + x: 350 + sceneY: world.height - 224 + active: world.visible + source: "images/splash/note.png" + } + Image { + x: 0 + y: world.height - 150 + source: "images/sprites/van/running/1.png" + } + } + + Rectangle { + id: overlay + opacity: 0.0 + color: "black" + anchors.fill: parent + } + + function display() { + animation.start(); + } + + SequentialAnimation { + id: animation + + PropertyAction { target: splash; property: "visible"; value: true; } + NumberAnimation { target: overlay; property: "opacity"; + from: 0.0; to: 1.0; duration: 800; } + PropertyAction { target: world; property: "visible"; value: true; } + + ParallelAnimation { + NumberAnimation { target: overlay; property: "opacity"; + from: 1.0; to: 0.0; duration: 1400; } + NumberAnimation { target: world; property: "x"; from: -170; to: 0; + duration: 1400; easing.type: Easing.OutSine; } + } + + ScriptAction { script: splash.dialogRequest(); } + PauseAnimation { duration: 3000; } + + NumberAnimation { target: overlay; property: "opacity"; + from: 0.0; to: 1.0; duration: 800; } + PropertyAction { target: world; property: "visible"; value: false; } + NumberAnimation { target: overlay; property: "opacity"; + from: 1.0; to: 0.0; duration: 800; } + PropertyAction { target: splash; property: "visible"; value: false; } + } +} diff --git a/qtflyingbus/core/FinalSplashItem.qml b/qtflyingbus/core/FinalSplashItem.qml new file mode 100644 index 0000000..b8aa793 --- /dev/null +++ b/qtflyingbus/core/FinalSplashItem.qml @@ -0,0 +1,76 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 + +Image { + id: item + + property int sceneY: 0 + property int jumpSize : 40 + property int jumpDelay : 40 + property bool active : false + + SequentialAnimation { + running: active + loops: Animation.Infinite + + PauseAnimation { + duration: jumpDelay + } + NumberAnimation { + target: item + property: "y" + from: sceneY + to: sceneY - jumpSize + duration: 200 + easing.type: Easing.OutSine + } + NumberAnimation { + target: item + property: "y" + from: sceneY - jumpSize + to: sceneY + duration: 200 + easing.type: Easing.InSine + } + } +} diff --git a/qtflyingbus/core/FrameSprite.qml b/qtflyingbus/core/FrameSprite.qml new file mode 100644 index 0000000..abb6ae2 --- /dev/null +++ b/qtflyingbus/core/FrameSprite.qml @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 + +Sprite { + property int frameIndex : -1 + property variant frameImages : [] + + image: (frameIndex >= 0 && + frameIndex < frameImages.length) ? frameImages[frameIndex] : "" + + function advance(phase) { + frameIndex = (frameIndex + 1) % frameImages.length; + } + + onFrameImagesChanged: { + frameIndex = (frameImages.length > 0) ? 0 : -1; + } +} diff --git a/qtflyingbus/core/GameOverMenu.qml b/qtflyingbus/core/GameOverMenu.qml new file mode 100644 index 0000000..49f413d --- /dev/null +++ b/qtflyingbus/core/GameOverMenu.qml @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 + +ScoreMenu { + signal retryClicked(); + + special: true + + Image { + z: -1 + source: "images/menu/menu_gameover.png" + } + + Button { + x: 80 + y: 100 + normalImage: "images/menu/button/retry.png" + pressedImage: "images/menu/button/retry_pressed.png" + onClicked: retryClicked(); + } +} diff --git a/qtflyingbus/core/HelpScreen.qml b/qtflyingbus/core/HelpScreen.qml new file mode 100644 index 0000000..b53b8f4 --- /dev/null +++ b/qtflyingbus/core/HelpScreen.qml @@ -0,0 +1,144 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 + +Item { + id: helpScreen + + signal backClicked(); + + Image { + source: "images/help/background.png" + anchors.bottom: parent.bottom + anchors.horizontalCenter: parent.horizontalCenter + } + + Flickable { + id: flickable + anchors.fill: parent + contentWidth: 3300 + contentHeight: helpScreen.height + boundsBehavior: Flickable.StopAtBounds + + Item { + width: flickable.contentWidth + height: flickable.height + + Image { + x: 40 + anchors.bottom: parent.bottom + source: "images/help/tap.png" + } + Image { + x: 440 + anchors.bottom: parent.bottom + source: "images/help/pop.png" + } + Image { + x: 840 + anchors.bottom: parent.bottom + anchors.bottomMargin: 70 + source: "images/help/peace.png" + } + Image { + x: 1140 + anchors.bottom: parent.bottom + anchors.bottomMargin: 50 + source: "images/help/rock.png" + } + Image { + x: 1440 + anchors.bottom: parent.bottom + anchors.bottomMargin: 50 + source: "images/help/bird.png" + } + Image { + x: 1740 + anchors.bottom: parent.bottom + anchors.bottomMargin: 48 + source: "images/help/ladybug.png" + } + Image { + x: 2040 + anchors.bottom: parent.bottom + anchors.bottomMargin: 48 + source: "images/help/cloud.png" + } + Image { + x: 2340 + anchors.bottom: parent.bottom + anchors.bottomMargin: 44 + source: "images/help/tree.png" + } + Image { + x: 2640 + anchors.bottom: parent.bottom + anchors.bottomMargin: 44 + source: "images/help/balloon.png" + } + Image { + x: 2940 + anchors.bottom: parent.bottom + anchors.bottomMargin: 70 + source: "images/help/playnow.png" + MouseArea { + anchors.fill: parent + onClicked: screen.state = "running" + } + } + } + } + + Image { + anchors.top: parent.top + anchors.left: parent.left + source: "images/help/title.png" + } + + Button { + anchors.top: parent.top + anchors.right: parent.right + normalImage: "images/buttons/back.png" + pressedImage: "images/buttons/back2.png" + onClicked: helpScreen.backClicked(); + } +} diff --git a/qtflyingbus/core/LeaveMenu.qml b/qtflyingbus/core/LeaveMenu.qml new file mode 100644 index 0000000..aa8f3d6 --- /dev/null +++ b/qtflyingbus/core/LeaveMenu.qml @@ -0,0 +1,75 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 + +Item { + signal yesClicked(); + signal noClicked(); + + Image { + x: 160 + y: 21 + source: "images/menu/leave_title.png" + } + + Image { + x: 330 + y: 170 + source: "images/menu/menu_div.png" + } + + Button { + x: 100 + y: 140 + normalImage: "images/menu/button/yes.png" + pressedImage: "images/menu/button/yes_pressed.png" + onClicked: yesClicked(); + } + + Button { + x: 370 + y: 110 + normalImage: "images/menu/button/no.png" + pressedImage: "images/menu/button/no_pressed.png" + onClicked: noClicked(); + } +} diff --git a/qtflyingbus/core/LevelModel.qml b/qtflyingbus/core/LevelModel.qml new file mode 100644 index 0000000..ae6b605 --- /dev/null +++ b/qtflyingbus/core/LevelModel.qml @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 + +XmlListModel { + id: levelModel + query: "/level/object" + + XmlRole { name: "x"; query: "x/number()" } + XmlRole { name: "y"; query: "y/number()" } + XmlRole { name: "name"; query: "name/string()" } + XmlRole { name: "type"; query: "type/number()" } + XmlRole { name: "image"; query: "image/string()" } + XmlRole { name: "speed"; query: "speed/number()" } + XmlRole { name: "vspeed"; query: "vspeed/number()" } +} diff --git a/qtflyingbus/core/Main.qml b/qtflyingbus/core/Main.qml new file mode 100644 index 0000000..c0dfa89 --- /dev/null +++ b/qtflyingbus/core/Main.qml @@ -0,0 +1,81 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 + +Item { + id: main + property bool doLoad : false + + Loader { + id: gameLoader + anchors.fill: parent + } + + Loader { + id: splashLoader + anchors.fill: parent + source: "Splash.qml" + onLoaded: gameLoader.source = "Base.qml"; + } + + Connections { + id: gameConnection + target: gameLoader.item + onLevelLoaded: unlock(); + } + + Connections { + id: splashConnection + target: splashLoader.item + onTimeout: unlock(); + } + + function unlock() { + if (doLoad) { + splashLoader.source = ""; + gameConnection.target = null; + splashConnection.target = null; + } + + doLoad = true; + } +} diff --git a/qtflyingbus/core/Menu.qml b/qtflyingbus/core/Menu.qml new file mode 100644 index 0000000..1646117 --- /dev/null +++ b/qtflyingbus/core/Menu.qml @@ -0,0 +1,202 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 + +Item { + id: menu + width: background.width + height: background.height + + signal playClicked(); + signal helpClicked(); + signal restartClicked(); + signal nextLevelClicked(); + + state: "default" + + Image { + id: background + source: "images/menu/menu.png" + } + + PlayMenu { + id: playMenu + anchors.fill: parent + + onPlayClicked: menu.playClicked(); + onHelpClicked: menu.helpClicked(); + onExitClicked: menu.state = "leave"; + onMoreInfoClicked: menu.state = "about"; + } + + AboutMenu { + id: aboutMenu + x: 110 + y: 106 + opacity: 0.0 + visible: false + + onClicked: menu.state = "default"; + } + + LeaveMenu { + id: leaveMenu + opacity: 0.0 + visible: false + anchors.fill: parent + + onYesClicked: Qt.quit(); + onNoClicked: menu.state = "default"; + } + + CompleteMenu { + id: completeMenu + opacity: 0.0 + visible: false + anchors.fill: parent + playerScore: screen.score + highScore: screen.highScore + + onMenuClicked: menu.state = "default"; + onNextLevelClicked: menu.nextLevelClicked(); + } + + YouWinMenu { + id: youWinMenu + opacity: 0.0 + visible: false + anchors.fill: parent + playerScore: screen.score + highScore: screen.highScore + + onMenuClicked: menu.state = "default"; + onRestartClicked: menu.restartClicked(); + } + + GameOverMenu { + id: gameOverMenu + opacity: 0.0 + visible: false + anchors.fill: parent + playerScore: screen.score + highScore: screen.highScore + + onMenuClicked: menu.state = "default"; + onRetryClicked: menu.restartClicked(); + } + + states : [ + State { + name: "default" + PropertyChanges { target: playMenu; opacity: 1.0; visible: true; } + }, + State { + name: "about" + PropertyChanges { target: playMenu; opacity: 0.0; visible: false; } + PropertyChanges { target: aboutMenu; opacity: 1.0; visible: true; } + }, + State { + name: "leave" + PropertyChanges { target: playMenu; opacity: 0.0; visible: false; } + PropertyChanges { target: leaveMenu; opacity: 1.0; visible: true; } + }, + State { + name: "nextlevel" + PropertyChanges { target: playMenu; opacity: 0.0; visible: false; } + PropertyChanges { target: completeMenu; opacity: 1.0; visible: true; } + }, + State { + name: "youwon" + PropertyChanges { target: playMenu; opacity: 0.0; visible: false; } + PropertyChanges { target: youWinMenu; opacity: 1.0; visible: true; } + }, + State { + name: "gameover" + PropertyChanges { target: playMenu; opacity: 0.0; visible: false; } + PropertyChanges { target: background; opacity: 0.0; } + PropertyChanges { target: gameOverMenu; opacity: 1.0; visible: true; } + } + ] + + transitions: [ + Transition { + from: "default"; to: "about"; reversible: true; + MenuAnimation { first: playMenu; second: aboutMenu; } + }, + Transition { + from: "default"; to: "leave"; reversible: true; + MenuAnimation { first: playMenu; second: leaveMenu; } + }, + Transition { + from: "default"; to: "nextlevel"; reversible: true; + MenuAnimation { first: playMenu; second: completeMenu; } + }, + Transition { + from: "default"; to: "youwon"; reversible: true; + MenuAnimation { first: playMenu; second: youWinMenu; } + }, + Transition { + from: "default"; to: "gameover"; reversible: true; + SequentialAnimation { + PropertyAction { target: gameOverMenu; property: "visible"; } + ParallelAnimation { + NumberAnimation { target: playMenu; property: "opacity"; + duration: 300; } + NumberAnimation { target: background; property: "opacity"; + duration: 300; } + } + NumberAnimation { target: gameOverMenu; property: "opacity"; + duration: 300; } + PropertyAction { target: playMenu; property: "visible"; } + } + } + ] + + function setState(state, animated) { + if (!animated) { + // XXX: workaround to avoid transition + // There is a pending suggestion to avoid this (QTBUG-14488) + menu.state = "undefined"; + } + menu.state = state; + } +} diff --git a/qtflyingbus/core/MenuAnimation.qml b/qtflyingbus/core/MenuAnimation.qml new file mode 100644 index 0000000..ba13b11 --- /dev/null +++ b/qtflyingbus/core/MenuAnimation.qml @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 + +SequentialAnimation { + property Item first + property Item second + + PropertyAction { target: second; property: "visible"; } + NumberAnimation { target: first; property: "opacity"; duration: 300; } + NumberAnimation { target: second; property: "opacity"; duration: 300; } + PropertyAction { target: first; property: "visible"; } +} diff --git a/qtflyingbus/core/PlayMenu.qml b/qtflyingbus/core/PlayMenu.qml new file mode 100644 index 0000000..31fac64 --- /dev/null +++ b/qtflyingbus/core/PlayMenu.qml @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 + +Item { + signal playClicked(); + signal helpClicked(); + signal moreInfoClicked(); + signal exitClicked(); + + Image { + x: 390 + y: 138 + source: "images/menu/details.png" + } + Button { + x: 86 + y: 116 + normalImage: "images/menu/button/play.png" + pressedImage: "images/menu/button/play_pressed.png" + onClicked: playClicked(); + } + Button { + x: 415 + y: 90 + normalImage: "images/menu/button/help.png" + pressedImage: "images/menu/button/help_pressed.png" + onClicked: helpClicked(); + } + Button { + x: 416 + y: 150 + normalImage: "images/menu/button/about.png" + pressedImage: "images/menu/button/about_pressed.png" + onClicked: moreInfoClicked(); + } + Button { + x: 436 + y: 206 + normalImage: "images/menu/button/exit.png" + pressedImage: "images/menu/button/exit_pressed.png" + onClicked: exitClicked(); + } +} diff --git a/qtflyingbus/core/Player.qml b/qtflyingbus/core/Player.qml new file mode 100644 index 0000000..bb29ec6 --- /dev/null +++ b/qtflyingbus/core/Player.qml @@ -0,0 +1,235 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 + +FrameSprite { + id: player + property int life : 3 + property bool imune : false + property int imunePhase : 0 + property int balloonCount : 0 + property int oldBalloonCount : 0 + property int balloonStep: 160 + property int balloonTop: y - 120 + property bool inflating : false + + frameImages : [ + "images/sprites/van/running/1.png", + "images/sprites/van/running/2.png", + "images/sprites/van/running/3.png", + "images/sprites/van/running/4.png", + "images/sprites/van/running/5.png", + "images/sprites/van/running/6.png", + "images/sprites/van/inflating/1.png", + "images/sprites/van/inflating/2.png", + "images/sprites/van/inflating/3.png", + "images/sprites/van/inflating/4.png", + "images/sprites/van/inflating/5.png", + "images/sprites/van/inflating/6.png" + ] + + property variant balloons : [ + balloon3, balloon2, balloon5, balloon1, balloon4 + ] + + topOffset: 7 + rightOffset: 6 + bottomOffset: 16 + + Behavior on y { + enabled: !screen.paused + NumberAnimation { + duration: 450 + easing.type: Easing.OutSine + } + } + + Balloon { + id: balloon1 + color: "yellow" + x: 0 + z: -1 + lineHeight: 25 + balloonTop: -50 + balloonBottom: -18 + onClicked: explodeBalloon(balloon1); + } + + Balloon { + id: balloon2 + color: "green" + x: 30 + z: -1 + lineHeight: 45 + balloonTop: -80 + balloonBottom: -34 + onClicked: explodeBalloon(balloon2); + } + + Balloon { + id: balloon3 + color: "blue" + x: 84 + z: -1 + lineHeight: 72 + balloonTop: -112 + balloonBottom: -40 + onClicked: explodeBalloon(balloon3); + } + + Balloon { + id: balloon4 + color: "red" + x: 62 + z: -1 + lineHeight: 45 + balloonTop: -82 + balloonBottom: -36 + onClicked: explodeBalloon(balloon4); + } + + Balloon { + id: balloon5 + color: "pink" + x: 108 + z: -1 + lineHeight: 40 + balloonTop: -82 + balloonBottom: -36 + onClicked: explodeBalloon(balloon5); + } + + MouseArea { + anchors.fill: parent + onClicked: fillBalloon(); + } + + onImuneChanged: { + if (imune) + imunePhase = 0; + else + opacity = 1.0; + } + + onBalloonCountChanged: { + if (balloonCount > oldBalloonCount) { + frameIndex = 6; + inflating = true; + } + + player.y = (canvas.height - player.height - 6) + - balloonCount * balloonStep; + + oldBalloonCount = balloonCount; + } + + function reset() { + life = 3; + imune = false; + balloonCount = 0; + x = -player.width; + y = (canvas.height - player.height - 6); + for (var i = 0; i < balloons.length; i++) + balloons[i].full = false; + } + + function fillBalloon() { + if (balloonCount > 4) + return false; + + for (var i = 0; i < balloons.length; i++) { + if (!balloons[i].full) { + balloonCount++; + balloons[i].full = true; + return true; + } + } + + return false; + } + + function explodeBalloon(balloon) { + if (balloonCount > 0 && balloon.full) { + balloonCount--; + balloon.full = false; + return true; + } + return false; + } + + function explodeAnyBalloon() { + if (balloonCount <= 0) + return; + + for (var i = 0; i < balloons.length; i++) { + if (explodeBalloon(balloons[i])) + break; + } + } + + function advance(phase) { + if (phase % 2 == 0) { + if (balloonCount == 0) + frameIndex = (frameIndex + 1) % 6; + else if (inflating) { + if (frameIndex < 10) + frameIndex++; + else { + frameIndex = 0; + inflating = false; + } + } + } + + if (imune) { + imunePhase++; + var MAX_IMUNE_PHASE = 100; + if (imunePhase > MAX_IMUNE_PHASE) + imune = false; + else + opacity = (parseInt(phase / 4) % 2 == 0) ? 0.6 : 1.0; + } + + for (var i = 0; i < balloons.length; i++) + balloons[i].advance(phase); + } +} diff --git a/qtflyingbus/core/Score.qml b/qtflyingbus/core/Score.qml new file mode 100644 index 0000000..4e18a46 --- /dev/null +++ b/qtflyingbus/core/Score.qml @@ -0,0 +1,78 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 + +Item { + id: score + property int life : 0 + property int value : 0 + + Image { + id: image + source: "images/score.png" + + Text { + text: score.value + font.family: "Nokia Sans" + font.pixelSize: 42 + font.bold: true + color: "#693d3f" + anchors.fill: parent + anchors.bottomMargin: 20 + anchors.rightMargin: 30 + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignRight + } + } + + Row { + x: 180 + y: 10 + spacing: 2 + Repeater { + model: life + Image { + source: "images/life.png" + } + } + } +} diff --git a/qtflyingbus/core/ScoreMenu.qml b/qtflyingbus/core/ScoreMenu.qml new file mode 100644 index 0000000..137cfc4 --- /dev/null +++ b/qtflyingbus/core/ScoreMenu.qml @@ -0,0 +1,113 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 + +Item { + signal menuClicked(); + + property int highScore : -1 + property int playerScore : -1 + property bool special : false + + Image { + x: 140 + y: 220 + source: "images/menu/dot.png" + } + + Image { + x: 240 + y: 208 + source: "images/menu/dot.png" + } + + Image { + x: 100 + y: 230 + source: "images/menu/yourscore.png" + } + + Image { + x: 198 + y: 240 + source: "images/menu/menu_div.png" + } + + Image { + x: 220 + y: 215 + source: "images/menu/highscore.png" + } + + DigitLabel { + x: 100 + y: 268 + rotation: -7 + value: playerScore + } + + DigitLabel { + x: 220 + y: 251 + rotation: -7 + value: highScore + } + + Item { + x: special ? 450 : 410 + y: special ? 230 : 198 + rotation: special ? 18 : 0 + + Image { + x: 40 + y: -16 + source: "images/menu/dot.png" + } + + Button { + smooth: true + normalImage: "images/menu/button/menu.png" + pressedImage: "images/menu/button/menu_pressed.png" + onClicked: menuClicked(); + } + } +} diff --git a/qtflyingbus/core/Splash.qml b/qtflyingbus/core/Splash.qml new file mode 100644 index 0000000..1c3e63a --- /dev/null +++ b/qtflyingbus/core/Splash.qml @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 + +Item { + id: splash + signal timeout(); + + MouseArea { + // block mouse events + anchors.fill: parent + } + + Image { + source: "images/splash/background.png" + anchors.bottom: parent.bottom + anchors.horizontalCenter: parent.horizontalCenter + } + + Image { + source: "images/splash/van.png" + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + } + + Timer { + running: true + interval: 1500 + onTriggered: splash.timeout(); + } +} diff --git a/qtflyingbus/core/Sprite.qml b/qtflyingbus/core/Sprite.qml new file mode 100644 index 0000000..5e926ef --- /dev/null +++ b/qtflyingbus/core/Sprite.qml @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 + +Image { + id: sprite + source: image + + property int type : 0 + property string image : "" + property int damage : 1 + property real velocity : 0 + + property real topOffset : 0 + property real leftOffset : 0 + property real rightOffset : 0 + property real bottomOffset : 0 + + function advance(phase) { + + } +} diff --git a/qtflyingbus/core/YouWinMenu.qml b/qtflyingbus/core/YouWinMenu.qml new file mode 100644 index 0000000..c6ea98c --- /dev/null +++ b/qtflyingbus/core/YouWinMenu.qml @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 + +ScoreMenu { + signal restartClicked() + + Image { + x: 5 + y: -30 + z: -1 + source: "images/menu/menu_youwin.png" + } + + Button { + x: 90 + y: 90 + normalImage: "images/menu/button/restart.png" + pressedImage: "images/menu/button/restart_pressed.png" + onClicked: restartClicked() + } +} diff --git a/qtflyingbus/core/engine.js b/qtflyingbus/core/engine.js new file mode 100644 index 0000000..457fe0a --- /dev/null +++ b/qtflyingbus/core/engine.js @@ -0,0 +1,385 @@ +/**************************************************************************** +** +** This file is part of QtFlyingVan +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +var BONUS_SCORE = 100; + +var ENEMY_TYPE = 1; +var BONUS_TYPE = 2; +var BACKGROUND_ITEM_TYPE = 98; +var BACKGROUND_TILE_TYPE = 99; + +var levelSpeed = 3.2; +var leftMargin = 120; +var sprites = new Array(); +var components = new Array(); +var backgroundItems = new Array(); + +var db = null; +var phase = 0; +var currentLevel = -1; +var levelFiles = ["levels/1.xml", "levels/2.xml", "levels/3.xml"]; + +/* + Load the scene according to the level model. When level model changes + (see Base.qml), it will call this method to reload the scene elements. +*/ +function startGame(doRun) +{ + screen.paused = true; + + var info, object; + var totalWidth = 0; + + reset(); + + // read level description + for (var i = 0; i < levelModel.count; i++) { + info = levelModel.get(i); + + if (info.type == BACKGROUND_ITEM_TYPE || + info.type == BACKGROUND_TILE_TYPE) { + // create background element + object = background.createItem(info.image, info.x, info.y); + object.speed = info.speed; + object.vspeed = info.vspeed; + object.tile = (info.type == BACKGROUND_TILE_TYPE); + backgroundItems.push(object); + } else { + // create sprite element (bonus or enemy) + object = createObject("sprites/" + info.name + ".qml", foreground); + + if (object != null) { + object.x = info.x; + object.y = canvas.height - info.y; + sprites.push(object); + totalWidth = Math.max(totalWidth, object.x + object.width); + } + } + } + + screen.paused = false; + canvas.sceneWidth = totalWidth; + + if (doRun) + screen.state = "running"; +} + +/* + Delete all scene sprites and reset scene parameters. +*/ +function reset() +{ + player.reset(); + + phase = 0; + canvas.sceneX = 0; + canvas.sceneWidth = 0; + + var obj; + + for (var i = 0; i < sprites.length; i++) { + obj = sprites[i]; + if (obj != null) { + obj.visible = false; + obj.image = ""; // workaround to avoid leak + obj.destroy(); + } + } + + for (var i = 0; i < backgroundItems.length; i++) { + obj = backgroundItems[i]; + if (obj != null) { + obj.visible = false; + obj.source = ""; // workaround to avoid leak + obj.destroy(); + } + } + + sprites.splice(0); + backgroundItems.splice(0); +} + +/* + Creates an object given its QML file name. +*/ +function createObject(name, parent) +{ + var component; + + if (name in components) + component = components[name]; + else { + component = Qt.createComponent(name); + + if (component == null || component.status != Component.Ready) { + console.log("error loading '" + name + "' component"); + console.log(component.errorString()); + return null; + } + + components[name] = component; + } + + var object = component.createObject(parent); + + if (object == null) { + console.log("error creating object for: " + name); + console.log(component.errorString()); + return null; + } + + return object; +} + +/* + A timer triggers this method (see Base.qml) using a fixed time interval. + This method will handle all the game logic like scene movement, sprite + collisions and game state changes. +*/ +function tick() +{ + if (!screen.paused) { + phase = (phase + 1) % 0xfffffff; + + advanceSprites(); + checkCollisions(); + checkGameEnd(); + } +} + +/* + Change sprites positions and advance their states. +*/ +function advanceSprites() +{ + player.advance(phase); + + var fx = canvas.sceneX - levelSpeed; + var limit = Math.min(0, canvas.width - canvas.sceneWidth); + var moveSprites = (player.x >= leftMargin && fx > limit); + + if (!moveSprites) { + player.x += levelSpeed; + } else { + canvas.sceneX = fx; + } + + for (var i = 0; i < sprites.length; i++) { + var obj = sprites[i] + + if (obj == null) + continue; + + if (obj.x + obj.width < 0) { + obj.destroy(); + sprites[i] = null; + } else { + obj.x -= obj.velocity; + + if (moveSprites) + obj.x -= levelSpeed; + + if (obj.x <= canvas.width) + obj.advance(phase); + } + } +} + +/* + Handle all player collisions (this includes enemy and bonus item collisions). +*/ +function checkCollisions() +{ + var imune = player.imune; + var obj, collides, damage = 0; + + // check collision with all scene sprites + for (var i = 0; i < sprites.length; i++) { + obj = sprites[i]; + + // skip damage if player is imune + if (obj == null || obj.type == ENEMY_TYPE && imune) + continue; + + // check for simple bounding rect collision + collides = (player.y + player.height - player.bottomOffset >= obj.y + obj.topOffset + && player.y + player.topOffset <= obj.y + obj.height - obj.bottomOffset + && player.x + player.width - player.rightOffset >= obj.x + obj.leftOffset + && player.x + player.leftOffset <= obj.x + obj.width - obj.rightOffset); + + if (collides) { + // player has collided with the sprite + if (obj.type == ENEMY_TYPE) { + imune = true; + damage = obj.damage; + } else if (obj.type == BONUS_TYPE) { + screen.score += BONUS_SCORE; + obj.destroy(); + sprites[i] = null; + } + } + } + + // if player has collided, set imunity and update score + if (damage > 0) { + player.imune = true; + player.life = Math.max(player.life - 1, 0); + + if (damage > 1) + player.explodeAnyBalloon(); + + if (player.life == 0) { + saveScoreToDisk(); + menu.setState("gameover", false); + screen.state = ""; + } + } +} + +/* + Check if the level has ended. If the level has ended, it will show a menu to go + to the next level or it will show the final score if it's already in the last level. +*/ +function checkGameEnd() +{ + // check if player finished the level + if (player.x > canvas.width && !screen.paused) { + screen.paused = true; + saveScoreToDisk(); + + // check if it's in the final level + if (currentLevel < levelFiles.length - 1) { + menu.setState("nextlevel", false); + screen.state = ""; + } else { + finalSplash.display(); + } + } +} + +/* + Change the current level and reload model data. +*/ +function loadLevel(level) +{ + if (level >= 0 && level < levelFiles.length) { + if (currentLevel == level) { + Engine.startGame(true); + } else { + currentLevel = level; + levelModel.source = levelFiles[level]; + } + } +} + +/* + Resume level or go to a new level. +*/ +function resumeGame() +{ + if (player.life == 0) { + restartGame(); + return; + } + + // if it's playing, just resume + if (!screen.paused) { + screen.state = "running"; + return; + } + + // go to next level or restart + if (currentLevel < levelFiles.length - 1) + gotoNextLevel(); + else + restartGame(); +} + +// Load the first level +function restartGame() +{ + screen.highScore = Math.max(screen.highScore, + screen.score) + screen.score = 0; + loadLevel(0); +} + +// Load the next level +function gotoNextLevel() +{ + loadLevel(currentLevel + 1); +} + +// Load score database +function loadDatabase() +{ + if (db) + return; + + db = openDatabaseSync("QtFlyingVan", "1.0", "QtFlyingVan", 1000000); + + if (!db) + return; + + var rs; + db.transaction(function(tx) { + tx.executeSql('CREATE TABLE IF NOT EXISTS scores(score INT, date DATETIME)'); + rs = tx.executeSql('SELECT * FROM scores ORDER BY score DESC LIMIT 1'); + }); + + if (rs.rows.length > 0) { + var record = rs.rows.item(0); + screen.highScore = record.score; + } +} + +// Update score database +function saveScoreToDisk() +{ + if (!db) { + console.log("Warning: Database is not open"); + return; + } + + db.transaction(function(tx) { + tx.executeSql("INSERT INTO scores VALUES(?, date('now'))", [screen.score]); + }); +} diff --git a/qtflyingbus/core/images/LICENSE.txt b/qtflyingbus/core/images/LICENSE.txt new file mode 100644 index 0000000..9deebda --- /dev/null +++ b/qtflyingbus/core/images/LICENSE.txt @@ -0,0 +1,63 @@ +License + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. + +1. Definitions + + 1. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. + 2. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License. + 3. "Licensor" means the individual or entity that offers the Work under the terms of this License. + 4. "Original Author" means the individual or entity who created the Work. + 5. "Work" means the copyrightable work of authorship offered under the terms of this License. + 6. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. + +2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: + + 1. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; + 2. to create and reproduce Derivative Works; + 3. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; + 4. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works. + 5. + + For the avoidance of doubt, where the work is a musical composition: + 1. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work. + 2. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights agency or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions). + 6. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions). + +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved. + +4. Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: + + 1. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(b), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by clause 4(b), as requested. + 2. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. + +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + + 1. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. + 2. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. + +8. Miscellaneous + + 1. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. + 2. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. + 3. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + 4. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. + 5. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. + + +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. + +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. + +Creative Commons may be contacted at http://creativecommons.org/. + diff --git a/qtflyingbus/core/images/balloons/blue/1.png b/qtflyingbus/core/images/balloons/blue/1.png Binary files differnew file mode 100644 index 0000000..4f421bb --- /dev/null +++ b/qtflyingbus/core/images/balloons/blue/1.png diff --git a/qtflyingbus/core/images/balloons/blue/2.png b/qtflyingbus/core/images/balloons/blue/2.png Binary files differnew file mode 100644 index 0000000..eb3c16c --- /dev/null +++ b/qtflyingbus/core/images/balloons/blue/2.png diff --git a/qtflyingbus/core/images/balloons/blue/3.png b/qtflyingbus/core/images/balloons/blue/3.png Binary files differnew file mode 100644 index 0000000..5205c8a --- /dev/null +++ b/qtflyingbus/core/images/balloons/blue/3.png diff --git a/qtflyingbus/core/images/balloons/blue/4.png b/qtflyingbus/core/images/balloons/blue/4.png Binary files differnew file mode 100644 index 0000000..331b712 --- /dev/null +++ b/qtflyingbus/core/images/balloons/blue/4.png diff --git a/qtflyingbus/core/images/balloons/blue/5.png b/qtflyingbus/core/images/balloons/blue/5.png Binary files differnew file mode 100644 index 0000000..aa41f15 --- /dev/null +++ b/qtflyingbus/core/images/balloons/blue/5.png diff --git a/qtflyingbus/core/images/balloons/blue/6.png b/qtflyingbus/core/images/balloons/blue/6.png Binary files differnew file mode 100644 index 0000000..7c7e831 --- /dev/null +++ b/qtflyingbus/core/images/balloons/blue/6.png diff --git a/qtflyingbus/core/images/balloons/green/1.png b/qtflyingbus/core/images/balloons/green/1.png Binary files differnew file mode 100644 index 0000000..613c0d1 --- /dev/null +++ b/qtflyingbus/core/images/balloons/green/1.png diff --git a/qtflyingbus/core/images/balloons/green/2.png b/qtflyingbus/core/images/balloons/green/2.png Binary files differnew file mode 100644 index 0000000..a12f0c5 --- /dev/null +++ b/qtflyingbus/core/images/balloons/green/2.png diff --git a/qtflyingbus/core/images/balloons/green/3.png b/qtflyingbus/core/images/balloons/green/3.png Binary files differnew file mode 100644 index 0000000..32ddddd --- /dev/null +++ b/qtflyingbus/core/images/balloons/green/3.png diff --git a/qtflyingbus/core/images/balloons/green/4.png b/qtflyingbus/core/images/balloons/green/4.png Binary files differnew file mode 100644 index 0000000..925b925 --- /dev/null +++ b/qtflyingbus/core/images/balloons/green/4.png diff --git a/qtflyingbus/core/images/balloons/green/5.png b/qtflyingbus/core/images/balloons/green/5.png Binary files differnew file mode 100644 index 0000000..6501be6 --- /dev/null +++ b/qtflyingbus/core/images/balloons/green/5.png diff --git a/qtflyingbus/core/images/balloons/green/6.png b/qtflyingbus/core/images/balloons/green/6.png Binary files differnew file mode 100644 index 0000000..2324294 --- /dev/null +++ b/qtflyingbus/core/images/balloons/green/6.png diff --git a/qtflyingbus/core/images/balloons/line.png b/qtflyingbus/core/images/balloons/line.png Binary files differnew file mode 100644 index 0000000..ef12508 --- /dev/null +++ b/qtflyingbus/core/images/balloons/line.png diff --git a/qtflyingbus/core/images/balloons/pink/1.png b/qtflyingbus/core/images/balloons/pink/1.png Binary files differnew file mode 100644 index 0000000..d047777 --- /dev/null +++ b/qtflyingbus/core/images/balloons/pink/1.png diff --git a/qtflyingbus/core/images/balloons/pink/2.png b/qtflyingbus/core/images/balloons/pink/2.png Binary files differnew file mode 100644 index 0000000..fc28cd4 --- /dev/null +++ b/qtflyingbus/core/images/balloons/pink/2.png diff --git a/qtflyingbus/core/images/balloons/pink/3.png b/qtflyingbus/core/images/balloons/pink/3.png Binary files differnew file mode 100644 index 0000000..cdbd2b7 --- /dev/null +++ b/qtflyingbus/core/images/balloons/pink/3.png diff --git a/qtflyingbus/core/images/balloons/pink/4.png b/qtflyingbus/core/images/balloons/pink/4.png Binary files differnew file mode 100644 index 0000000..2b877d6 --- /dev/null +++ b/qtflyingbus/core/images/balloons/pink/4.png diff --git a/qtflyingbus/core/images/balloons/pink/5.png b/qtflyingbus/core/images/balloons/pink/5.png Binary files differnew file mode 100644 index 0000000..1a68f88 --- /dev/null +++ b/qtflyingbus/core/images/balloons/pink/5.png diff --git a/qtflyingbus/core/images/balloons/pink/6.png b/qtflyingbus/core/images/balloons/pink/6.png Binary files differnew file mode 100644 index 0000000..0458b76 --- /dev/null +++ b/qtflyingbus/core/images/balloons/pink/6.png diff --git a/qtflyingbus/core/images/balloons/red/1.png b/qtflyingbus/core/images/balloons/red/1.png Binary files differnew file mode 100644 index 0000000..386dbb7 --- /dev/null +++ b/qtflyingbus/core/images/balloons/red/1.png diff --git a/qtflyingbus/core/images/balloons/red/2.png b/qtflyingbus/core/images/balloons/red/2.png Binary files differnew file mode 100644 index 0000000..f16b7fb --- /dev/null +++ b/qtflyingbus/core/images/balloons/red/2.png diff --git a/qtflyingbus/core/images/balloons/red/3.png b/qtflyingbus/core/images/balloons/red/3.png Binary files differnew file mode 100644 index 0000000..3ee81f0 --- /dev/null +++ b/qtflyingbus/core/images/balloons/red/3.png diff --git a/qtflyingbus/core/images/balloons/red/4.png b/qtflyingbus/core/images/balloons/red/4.png Binary files differnew file mode 100644 index 0000000..2af49c6 --- /dev/null +++ b/qtflyingbus/core/images/balloons/red/4.png diff --git a/qtflyingbus/core/images/balloons/red/5.png b/qtflyingbus/core/images/balloons/red/5.png Binary files differnew file mode 100644 index 0000000..f9392a7 --- /dev/null +++ b/qtflyingbus/core/images/balloons/red/5.png diff --git a/qtflyingbus/core/images/balloons/red/6.png b/qtflyingbus/core/images/balloons/red/6.png Binary files differnew file mode 100644 index 0000000..8534cf7 --- /dev/null +++ b/qtflyingbus/core/images/balloons/red/6.png diff --git a/qtflyingbus/core/images/balloons/yellow/1.png b/qtflyingbus/core/images/balloons/yellow/1.png Binary files differnew file mode 100644 index 0000000..8c950e6 --- /dev/null +++ b/qtflyingbus/core/images/balloons/yellow/1.png diff --git a/qtflyingbus/core/images/balloons/yellow/2.png b/qtflyingbus/core/images/balloons/yellow/2.png Binary files differnew file mode 100644 index 0000000..b17a8fd --- /dev/null +++ b/qtflyingbus/core/images/balloons/yellow/2.png diff --git a/qtflyingbus/core/images/balloons/yellow/3.png b/qtflyingbus/core/images/balloons/yellow/3.png Binary files differnew file mode 100644 index 0000000..e449379 --- /dev/null +++ b/qtflyingbus/core/images/balloons/yellow/3.png diff --git a/qtflyingbus/core/images/balloons/yellow/4.png b/qtflyingbus/core/images/balloons/yellow/4.png Binary files differnew file mode 100644 index 0000000..5c2b2c7 --- /dev/null +++ b/qtflyingbus/core/images/balloons/yellow/4.png diff --git a/qtflyingbus/core/images/balloons/yellow/5.png b/qtflyingbus/core/images/balloons/yellow/5.png Binary files differnew file mode 100644 index 0000000..65160f5 --- /dev/null +++ b/qtflyingbus/core/images/balloons/yellow/5.png diff --git a/qtflyingbus/core/images/balloons/yellow/6.png b/qtflyingbus/core/images/balloons/yellow/6.png Binary files differnew file mode 100644 index 0000000..7cfc73e --- /dev/null +++ b/qtflyingbus/core/images/balloons/yellow/6.png diff --git a/qtflyingbus/core/images/buttons/back.png b/qtflyingbus/core/images/buttons/back.png Binary files differnew file mode 100644 index 0000000..a2c41af --- /dev/null +++ b/qtflyingbus/core/images/buttons/back.png diff --git a/qtflyingbus/core/images/buttons/back2.png b/qtflyingbus/core/images/buttons/back2.png Binary files differnew file mode 100644 index 0000000..9923292 --- /dev/null +++ b/qtflyingbus/core/images/buttons/back2.png diff --git a/qtflyingbus/core/images/buttons/close.png b/qtflyingbus/core/images/buttons/close.png Binary files differnew file mode 100644 index 0000000..44c6a40 --- /dev/null +++ b/qtflyingbus/core/images/buttons/close.png diff --git a/qtflyingbus/core/images/buttons/close2.png b/qtflyingbus/core/images/buttons/close2.png Binary files differnew file mode 100644 index 0000000..c30bf4b --- /dev/null +++ b/qtflyingbus/core/images/buttons/close2.png diff --git a/qtflyingbus/core/images/buttons/pause.png b/qtflyingbus/core/images/buttons/pause.png Binary files differnew file mode 100644 index 0000000..3fc56b9 --- /dev/null +++ b/qtflyingbus/core/images/buttons/pause.png diff --git a/qtflyingbus/core/images/buttons/pause2.png b/qtflyingbus/core/images/buttons/pause2.png Binary files differnew file mode 100644 index 0000000..c9c5b7d --- /dev/null +++ b/qtflyingbus/core/images/buttons/pause2.png diff --git a/qtflyingbus/core/images/buttons/play.png b/qtflyingbus/core/images/buttons/play.png Binary files differnew file mode 100644 index 0000000..f2b6872 --- /dev/null +++ b/qtflyingbus/core/images/buttons/play.png diff --git a/qtflyingbus/core/images/buttons/play2.png b/qtflyingbus/core/images/buttons/play2.png Binary files differnew file mode 100644 index 0000000..76dadbd --- /dev/null +++ b/qtflyingbus/core/images/buttons/play2.png diff --git a/qtflyingbus/core/images/digits/0.png b/qtflyingbus/core/images/digits/0.png Binary files differnew file mode 100644 index 0000000..2dfc479 --- /dev/null +++ b/qtflyingbus/core/images/digits/0.png diff --git a/qtflyingbus/core/images/digits/1.png b/qtflyingbus/core/images/digits/1.png Binary files differnew file mode 100644 index 0000000..caaa9aa --- /dev/null +++ b/qtflyingbus/core/images/digits/1.png diff --git a/qtflyingbus/core/images/digits/2.png b/qtflyingbus/core/images/digits/2.png Binary files differnew file mode 100644 index 0000000..919ae78 --- /dev/null +++ b/qtflyingbus/core/images/digits/2.png diff --git a/qtflyingbus/core/images/digits/3.png b/qtflyingbus/core/images/digits/3.png Binary files differnew file mode 100644 index 0000000..9b768dc --- /dev/null +++ b/qtflyingbus/core/images/digits/3.png diff --git a/qtflyingbus/core/images/digits/4.png b/qtflyingbus/core/images/digits/4.png Binary files differnew file mode 100644 index 0000000..bc2acd0 --- /dev/null +++ b/qtflyingbus/core/images/digits/4.png diff --git a/qtflyingbus/core/images/digits/5.png b/qtflyingbus/core/images/digits/5.png Binary files differnew file mode 100644 index 0000000..bd4eaf7 --- /dev/null +++ b/qtflyingbus/core/images/digits/5.png diff --git a/qtflyingbus/core/images/digits/6.png b/qtflyingbus/core/images/digits/6.png Binary files differnew file mode 100644 index 0000000..5abab68 --- /dev/null +++ b/qtflyingbus/core/images/digits/6.png diff --git a/qtflyingbus/core/images/digits/7.png b/qtflyingbus/core/images/digits/7.png Binary files differnew file mode 100644 index 0000000..1475998 --- /dev/null +++ b/qtflyingbus/core/images/digits/7.png diff --git a/qtflyingbus/core/images/digits/8.png b/qtflyingbus/core/images/digits/8.png Binary files differnew file mode 100644 index 0000000..d3ef574 --- /dev/null +++ b/qtflyingbus/core/images/digits/8.png diff --git a/qtflyingbus/core/images/digits/9.png b/qtflyingbus/core/images/digits/9.png Binary files differnew file mode 100644 index 0000000..729354b --- /dev/null +++ b/qtflyingbus/core/images/digits/9.png diff --git a/qtflyingbus/core/images/digits/minus.png b/qtflyingbus/core/images/digits/minus.png Binary files differnew file mode 100644 index 0000000..aea83d6 --- /dev/null +++ b/qtflyingbus/core/images/digits/minus.png diff --git a/qtflyingbus/core/images/help/background.png b/qtflyingbus/core/images/help/background.png Binary files differnew file mode 100644 index 0000000..ec6ce9d --- /dev/null +++ b/qtflyingbus/core/images/help/background.png diff --git a/qtflyingbus/core/images/help/balloon.png b/qtflyingbus/core/images/help/balloon.png Binary files differnew file mode 100644 index 0000000..16492ea --- /dev/null +++ b/qtflyingbus/core/images/help/balloon.png diff --git a/qtflyingbus/core/images/help/bird.png b/qtflyingbus/core/images/help/bird.png Binary files differnew file mode 100644 index 0000000..26949f7 --- /dev/null +++ b/qtflyingbus/core/images/help/bird.png diff --git a/qtflyingbus/core/images/help/cloud.png b/qtflyingbus/core/images/help/cloud.png Binary files differnew file mode 100644 index 0000000..738922a --- /dev/null +++ b/qtflyingbus/core/images/help/cloud.png diff --git a/qtflyingbus/core/images/help/ladybug.png b/qtflyingbus/core/images/help/ladybug.png Binary files differnew file mode 100644 index 0000000..b214495 --- /dev/null +++ b/qtflyingbus/core/images/help/ladybug.png diff --git a/qtflyingbus/core/images/help/peace.png b/qtflyingbus/core/images/help/peace.png Binary files differnew file mode 100644 index 0000000..bf37f10 --- /dev/null +++ b/qtflyingbus/core/images/help/peace.png diff --git a/qtflyingbus/core/images/help/playnow.png b/qtflyingbus/core/images/help/playnow.png Binary files differnew file mode 100644 index 0000000..cec958c --- /dev/null +++ b/qtflyingbus/core/images/help/playnow.png diff --git a/qtflyingbus/core/images/help/pop.png b/qtflyingbus/core/images/help/pop.png Binary files differnew file mode 100644 index 0000000..3a14362 --- /dev/null +++ b/qtflyingbus/core/images/help/pop.png diff --git a/qtflyingbus/core/images/help/rock.png b/qtflyingbus/core/images/help/rock.png Binary files differnew file mode 100644 index 0000000..f3e8deb --- /dev/null +++ b/qtflyingbus/core/images/help/rock.png diff --git a/qtflyingbus/core/images/help/tap.png b/qtflyingbus/core/images/help/tap.png Binary files differnew file mode 100644 index 0000000..c2bbd9f --- /dev/null +++ b/qtflyingbus/core/images/help/tap.png diff --git a/qtflyingbus/core/images/help/title.png b/qtflyingbus/core/images/help/title.png Binary files differnew file mode 100644 index 0000000..23cdd39 --- /dev/null +++ b/qtflyingbus/core/images/help/title.png diff --git a/qtflyingbus/core/images/help/tree.png b/qtflyingbus/core/images/help/tree.png Binary files differnew file mode 100644 index 0000000..823907d --- /dev/null +++ b/qtflyingbus/core/images/help/tree.png diff --git a/qtflyingbus/core/images/life.png b/qtflyingbus/core/images/life.png Binary files differnew file mode 100644 index 0000000..7a3e56f --- /dev/null +++ b/qtflyingbus/core/images/life.png diff --git a/qtflyingbus/core/images/menu/about.png b/qtflyingbus/core/images/menu/about.png Binary files differnew file mode 100644 index 0000000..8b7bfb4 --- /dev/null +++ b/qtflyingbus/core/images/menu/about.png diff --git a/qtflyingbus/core/images/menu/button/about.png b/qtflyingbus/core/images/menu/button/about.png Binary files differnew file mode 100644 index 0000000..28aa4d6 --- /dev/null +++ b/qtflyingbus/core/images/menu/button/about.png diff --git a/qtflyingbus/core/images/menu/button/about_pressed.png b/qtflyingbus/core/images/menu/button/about_pressed.png Binary files differnew file mode 100644 index 0000000..a5b06dc --- /dev/null +++ b/qtflyingbus/core/images/menu/button/about_pressed.png diff --git a/qtflyingbus/core/images/menu/button/exit.png b/qtflyingbus/core/images/menu/button/exit.png Binary files differnew file mode 100644 index 0000000..ac3579b --- /dev/null +++ b/qtflyingbus/core/images/menu/button/exit.png diff --git a/qtflyingbus/core/images/menu/button/exit_pressed.png b/qtflyingbus/core/images/menu/button/exit_pressed.png Binary files differnew file mode 100644 index 0000000..be90fc7 --- /dev/null +++ b/qtflyingbus/core/images/menu/button/exit_pressed.png diff --git a/qtflyingbus/core/images/menu/button/help.png b/qtflyingbus/core/images/menu/button/help.png Binary files differnew file mode 100644 index 0000000..cf5d13b --- /dev/null +++ b/qtflyingbus/core/images/menu/button/help.png diff --git a/qtflyingbus/core/images/menu/button/help_pressed.png b/qtflyingbus/core/images/menu/button/help_pressed.png Binary files differnew file mode 100644 index 0000000..925bd3e --- /dev/null +++ b/qtflyingbus/core/images/menu/button/help_pressed.png diff --git a/qtflyingbus/core/images/menu/button/menu.png b/qtflyingbus/core/images/menu/button/menu.png Binary files differnew file mode 100644 index 0000000..0756d98 --- /dev/null +++ b/qtflyingbus/core/images/menu/button/menu.png diff --git a/qtflyingbus/core/images/menu/button/menu_pressed.png b/qtflyingbus/core/images/menu/button/menu_pressed.png Binary files differnew file mode 100644 index 0000000..57abc06 --- /dev/null +++ b/qtflyingbus/core/images/menu/button/menu_pressed.png diff --git a/qtflyingbus/core/images/menu/button/next_level.png b/qtflyingbus/core/images/menu/button/next_level.png Binary files differnew file mode 100644 index 0000000..66c6572 --- /dev/null +++ b/qtflyingbus/core/images/menu/button/next_level.png diff --git a/qtflyingbus/core/images/menu/button/next_level_pressed.png b/qtflyingbus/core/images/menu/button/next_level_pressed.png Binary files differnew file mode 100644 index 0000000..d060072 --- /dev/null +++ b/qtflyingbus/core/images/menu/button/next_level_pressed.png diff --git a/qtflyingbus/core/images/menu/button/no.png b/qtflyingbus/core/images/menu/button/no.png Binary files differnew file mode 100644 index 0000000..20c18db --- /dev/null +++ b/qtflyingbus/core/images/menu/button/no.png diff --git a/qtflyingbus/core/images/menu/button/no_pressed.png b/qtflyingbus/core/images/menu/button/no_pressed.png Binary files differnew file mode 100644 index 0000000..e062302 --- /dev/null +++ b/qtflyingbus/core/images/menu/button/no_pressed.png diff --git a/qtflyingbus/core/images/menu/button/play.png b/qtflyingbus/core/images/menu/button/play.png Binary files differnew file mode 100644 index 0000000..b217802 --- /dev/null +++ b/qtflyingbus/core/images/menu/button/play.png diff --git a/qtflyingbus/core/images/menu/button/play_pressed.png b/qtflyingbus/core/images/menu/button/play_pressed.png Binary files differnew file mode 100644 index 0000000..919aa55 --- /dev/null +++ b/qtflyingbus/core/images/menu/button/play_pressed.png diff --git a/qtflyingbus/core/images/menu/button/restart.png b/qtflyingbus/core/images/menu/button/restart.png Binary files differnew file mode 100644 index 0000000..1049299 --- /dev/null +++ b/qtflyingbus/core/images/menu/button/restart.png diff --git a/qtflyingbus/core/images/menu/button/restart_pressed.png b/qtflyingbus/core/images/menu/button/restart_pressed.png Binary files differnew file mode 100644 index 0000000..9e64680 --- /dev/null +++ b/qtflyingbus/core/images/menu/button/restart_pressed.png diff --git a/qtflyingbus/core/images/menu/button/retry.png b/qtflyingbus/core/images/menu/button/retry.png Binary files differnew file mode 100644 index 0000000..5d63206 --- /dev/null +++ b/qtflyingbus/core/images/menu/button/retry.png diff --git a/qtflyingbus/core/images/menu/button/retry_pressed.png b/qtflyingbus/core/images/menu/button/retry_pressed.png Binary files differnew file mode 100644 index 0000000..232f73d --- /dev/null +++ b/qtflyingbus/core/images/menu/button/retry_pressed.png diff --git a/qtflyingbus/core/images/menu/button/yes.png b/qtflyingbus/core/images/menu/button/yes.png Binary files differnew file mode 100644 index 0000000..5abceeb --- /dev/null +++ b/qtflyingbus/core/images/menu/button/yes.png diff --git a/qtflyingbus/core/images/menu/button/yes_pressed.png b/qtflyingbus/core/images/menu/button/yes_pressed.png Binary files differnew file mode 100644 index 0000000..5e66611 --- /dev/null +++ b/qtflyingbus/core/images/menu/button/yes_pressed.png diff --git a/qtflyingbus/core/images/menu/complete_title.png b/qtflyingbus/core/images/menu/complete_title.png Binary files differnew file mode 100644 index 0000000..d5bd2e5 --- /dev/null +++ b/qtflyingbus/core/images/menu/complete_title.png diff --git a/qtflyingbus/core/images/menu/details.png b/qtflyingbus/core/images/menu/details.png Binary files differnew file mode 100644 index 0000000..b56046a --- /dev/null +++ b/qtflyingbus/core/images/menu/details.png diff --git a/qtflyingbus/core/images/menu/dot.png b/qtflyingbus/core/images/menu/dot.png Binary files differnew file mode 100644 index 0000000..27aa29e --- /dev/null +++ b/qtflyingbus/core/images/menu/dot.png diff --git a/qtflyingbus/core/images/menu/highscore.png b/qtflyingbus/core/images/menu/highscore.png Binary files differnew file mode 100644 index 0000000..80eb1ad --- /dev/null +++ b/qtflyingbus/core/images/menu/highscore.png diff --git a/qtflyingbus/core/images/menu/leave_title.png b/qtflyingbus/core/images/menu/leave_title.png Binary files differnew file mode 100644 index 0000000..2506291 --- /dev/null +++ b/qtflyingbus/core/images/menu/leave_title.png diff --git a/qtflyingbus/core/images/menu/menu.png b/qtflyingbus/core/images/menu/menu.png Binary files differnew file mode 100644 index 0000000..447251c --- /dev/null +++ b/qtflyingbus/core/images/menu/menu.png diff --git a/qtflyingbus/core/images/menu/menu_div.png b/qtflyingbus/core/images/menu/menu_div.png Binary files differnew file mode 100644 index 0000000..1cf4a94 --- /dev/null +++ b/qtflyingbus/core/images/menu/menu_div.png diff --git a/qtflyingbus/core/images/menu/menu_gameover.png b/qtflyingbus/core/images/menu/menu_gameover.png Binary files differnew file mode 100644 index 0000000..532e96c --- /dev/null +++ b/qtflyingbus/core/images/menu/menu_gameover.png diff --git a/qtflyingbus/core/images/menu/menu_youwin.png b/qtflyingbus/core/images/menu/menu_youwin.png Binary files differnew file mode 100644 index 0000000..67f2b25 --- /dev/null +++ b/qtflyingbus/core/images/menu/menu_youwin.png diff --git a/qtflyingbus/core/images/menu/yourscore.png b/qtflyingbus/core/images/menu/yourscore.png Binary files differnew file mode 100644 index 0000000..ed17ab6 --- /dev/null +++ b/qtflyingbus/core/images/menu/yourscore.png diff --git a/qtflyingbus/core/images/scene/elements/bigmountain1.png b/qtflyingbus/core/images/scene/elements/bigmountain1.png Binary files differnew file mode 100644 index 0000000..94e5990 --- /dev/null +++ b/qtflyingbus/core/images/scene/elements/bigmountain1.png diff --git a/qtflyingbus/core/images/scene/elements/bigmountain2.png b/qtflyingbus/core/images/scene/elements/bigmountain2.png Binary files differnew file mode 100644 index 0000000..9d2c4b8 --- /dev/null +++ b/qtflyingbus/core/images/scene/elements/bigmountain2.png diff --git a/qtflyingbus/core/images/scene/elements/bush.png b/qtflyingbus/core/images/scene/elements/bush.png Binary files differnew file mode 100644 index 0000000..f521226 --- /dev/null +++ b/qtflyingbus/core/images/scene/elements/bush.png diff --git a/qtflyingbus/core/images/scene/elements/cloud1.png b/qtflyingbus/core/images/scene/elements/cloud1.png Binary files differnew file mode 100644 index 0000000..9fc2c6f --- /dev/null +++ b/qtflyingbus/core/images/scene/elements/cloud1.png diff --git a/qtflyingbus/core/images/scene/elements/cloud2.png b/qtflyingbus/core/images/scene/elements/cloud2.png Binary files differnew file mode 100644 index 0000000..41765d7 --- /dev/null +++ b/qtflyingbus/core/images/scene/elements/cloud2.png diff --git a/qtflyingbus/core/images/scene/elements/cloud3.png b/qtflyingbus/core/images/scene/elements/cloud3.png Binary files differnew file mode 100644 index 0000000..840cdab --- /dev/null +++ b/qtflyingbus/core/images/scene/elements/cloud3.png diff --git a/qtflyingbus/core/images/scene/elements/cloud4.png b/qtflyingbus/core/images/scene/elements/cloud4.png Binary files differnew file mode 100644 index 0000000..3533465 --- /dev/null +++ b/qtflyingbus/core/images/scene/elements/cloud4.png diff --git a/qtflyingbus/core/images/scene/elements/cloud5.png b/qtflyingbus/core/images/scene/elements/cloud5.png Binary files differnew file mode 100644 index 0000000..28ff7ec --- /dev/null +++ b/qtflyingbus/core/images/scene/elements/cloud5.png diff --git a/qtflyingbus/core/images/scene/elements/grass.png b/qtflyingbus/core/images/scene/elements/grass.png Binary files differnew file mode 100644 index 0000000..b99356c --- /dev/null +++ b/qtflyingbus/core/images/scene/elements/grass.png diff --git a/qtflyingbus/core/images/scene/elements/ground.png b/qtflyingbus/core/images/scene/elements/ground.png Binary files differnew file mode 100644 index 0000000..8a42fd5 --- /dev/null +++ b/qtflyingbus/core/images/scene/elements/ground.png diff --git a/qtflyingbus/core/images/scene/elements/moon.png b/qtflyingbus/core/images/scene/elements/moon.png Binary files differnew file mode 100644 index 0000000..95e049a --- /dev/null +++ b/qtflyingbus/core/images/scene/elements/moon.png diff --git a/qtflyingbus/core/images/scene/elements/mountain.png b/qtflyingbus/core/images/scene/elements/mountain.png Binary files differnew file mode 100644 index 0000000..282705e --- /dev/null +++ b/qtflyingbus/core/images/scene/elements/mountain.png diff --git a/qtflyingbus/core/images/scene/elements/road.png b/qtflyingbus/core/images/scene/elements/road.png Binary files differnew file mode 100644 index 0000000..81cb8ac --- /dev/null +++ b/qtflyingbus/core/images/scene/elements/road.png diff --git a/qtflyingbus/core/images/scene/elements/sand.png b/qtflyingbus/core/images/scene/elements/sand.png Binary files differnew file mode 100644 index 0000000..323a49a --- /dev/null +++ b/qtflyingbus/core/images/scene/elements/sand.png diff --git a/qtflyingbus/core/images/scene/elements/street.png b/qtflyingbus/core/images/scene/elements/street.png Binary files differnew file mode 100644 index 0000000..184073b --- /dev/null +++ b/qtflyingbus/core/images/scene/elements/street.png diff --git a/qtflyingbus/core/images/scene/elements/sun.png b/qtflyingbus/core/images/scene/elements/sun.png Binary files differnew file mode 100644 index 0000000..1a96729 --- /dev/null +++ b/qtflyingbus/core/images/scene/elements/sun.png diff --git a/qtflyingbus/core/images/scene/elements/sunlight.png b/qtflyingbus/core/images/scene/elements/sunlight.png Binary files differnew file mode 100644 index 0000000..1033da6 --- /dev/null +++ b/qtflyingbus/core/images/scene/elements/sunlight.png diff --git a/qtflyingbus/core/images/scene/elements/water.png b/qtflyingbus/core/images/scene/elements/water.png Binary files differnew file mode 100644 index 0000000..b72f168 --- /dev/null +++ b/qtflyingbus/core/images/scene/elements/water.png diff --git a/qtflyingbus/core/images/scene/sky/dark.png b/qtflyingbus/core/images/scene/sky/dark.png Binary files differnew file mode 100644 index 0000000..6a0b584 --- /dev/null +++ b/qtflyingbus/core/images/scene/sky/dark.png diff --git a/qtflyingbus/core/images/scene/sky/gray.png b/qtflyingbus/core/images/scene/sky/gray.png Binary files differnew file mode 100644 index 0000000..b969757 --- /dev/null +++ b/qtflyingbus/core/images/scene/sky/gray.png diff --git a/qtflyingbus/core/images/scene/sky/light.png b/qtflyingbus/core/images/scene/sky/light.png Binary files differnew file mode 100644 index 0000000..d6c4368 --- /dev/null +++ b/qtflyingbus/core/images/scene/sky/light.png diff --git a/qtflyingbus/core/images/score.png b/qtflyingbus/core/images/score.png Binary files differnew file mode 100644 index 0000000..1283f89 --- /dev/null +++ b/qtflyingbus/core/images/score.png diff --git a/qtflyingbus/core/images/splash/background.png b/qtflyingbus/core/images/splash/background.png Binary files differnew file mode 100644 index 0000000..ef55f59 --- /dev/null +++ b/qtflyingbus/core/images/splash/background.png diff --git a/qtflyingbus/core/images/splash/finalbackground.png b/qtflyingbus/core/images/splash/finalbackground.png Binary files differnew file mode 100644 index 0000000..18d716f --- /dev/null +++ b/qtflyingbus/core/images/splash/finalbackground.png diff --git a/qtflyingbus/core/images/splash/n8.png b/qtflyingbus/core/images/splash/n8.png Binary files differnew file mode 100644 index 0000000..aa27e82 --- /dev/null +++ b/qtflyingbus/core/images/splash/n8.png diff --git a/qtflyingbus/core/images/splash/note.png b/qtflyingbus/core/images/splash/note.png Binary files differnew file mode 100644 index 0000000..8ed027c --- /dev/null +++ b/qtflyingbus/core/images/splash/note.png diff --git a/qtflyingbus/core/images/splash/tablet.png b/qtflyingbus/core/images/splash/tablet.png Binary files differnew file mode 100644 index 0000000..5577e6c --- /dev/null +++ b/qtflyingbus/core/images/splash/tablet.png diff --git a/qtflyingbus/core/images/splash/van.png b/qtflyingbus/core/images/splash/van.png Binary files differnew file mode 100644 index 0000000..e3ee35c --- /dev/null +++ b/qtflyingbus/core/images/splash/van.png diff --git a/qtflyingbus/core/images/sprites/elements/balloon.png b/qtflyingbus/core/images/sprites/elements/balloon.png Binary files differnew file mode 100644 index 0000000..94ad9cc --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/balloon.png diff --git a/qtflyingbus/core/images/sprites/elements/bird1.png b/qtflyingbus/core/images/sprites/elements/bird1.png Binary files differnew file mode 100644 index 0000000..a5fe85f --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/bird1.png diff --git a/qtflyingbus/core/images/sprites/elements/bird2.png b/qtflyingbus/core/images/sprites/elements/bird2.png Binary files differnew file mode 100644 index 0000000..792019d --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/bird2.png diff --git a/qtflyingbus/core/images/sprites/elements/bird3.png b/qtflyingbus/core/images/sprites/elements/bird3.png Binary files differnew file mode 100644 index 0000000..4a73bc0 --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/bird3.png diff --git a/qtflyingbus/core/images/sprites/elements/bird4.png b/qtflyingbus/core/images/sprites/elements/bird4.png Binary files differnew file mode 100644 index 0000000..403dbae --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/bird4.png diff --git a/qtflyingbus/core/images/sprites/elements/bird5.png b/qtflyingbus/core/images/sprites/elements/bird5.png Binary files differnew file mode 100644 index 0000000..c80fb4e --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/bird5.png diff --git a/qtflyingbus/core/images/sprites/elements/cloud1.png b/qtflyingbus/core/images/sprites/elements/cloud1.png Binary files differnew file mode 100644 index 0000000..863d77c --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/cloud1.png diff --git a/qtflyingbus/core/images/sprites/elements/cloud2.png b/qtflyingbus/core/images/sprites/elements/cloud2.png Binary files differnew file mode 100644 index 0000000..ac5ce08 --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/cloud2.png diff --git a/qtflyingbus/core/images/sprites/elements/cloud3.png b/qtflyingbus/core/images/sprites/elements/cloud3.png Binary files differnew file mode 100644 index 0000000..71f3b6d --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/cloud3.png diff --git a/qtflyingbus/core/images/sprites/elements/cloud4.png b/qtflyingbus/core/images/sprites/elements/cloud4.png Binary files differnew file mode 100644 index 0000000..0a375ab --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/cloud4.png diff --git a/qtflyingbus/core/images/sprites/elements/cloud5.png b/qtflyingbus/core/images/sprites/elements/cloud5.png Binary files differnew file mode 100644 index 0000000..e57066e --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/cloud5.png diff --git a/qtflyingbus/core/images/sprites/elements/cloud6.png b/qtflyingbus/core/images/sprites/elements/cloud6.png Binary files differnew file mode 100644 index 0000000..0e19fd9 --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/cloud6.png diff --git a/qtflyingbus/core/images/sprites/elements/cloud7.png b/qtflyingbus/core/images/sprites/elements/cloud7.png Binary files differnew file mode 100644 index 0000000..82e255e --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/cloud7.png diff --git a/qtflyingbus/core/images/sprites/elements/ladybug1.png b/qtflyingbus/core/images/sprites/elements/ladybug1.png Binary files differnew file mode 100644 index 0000000..de5d2ce --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/ladybug1.png diff --git a/qtflyingbus/core/images/sprites/elements/ladybug2.png b/qtflyingbus/core/images/sprites/elements/ladybug2.png Binary files differnew file mode 100644 index 0000000..36c8247 --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/ladybug2.png diff --git a/qtflyingbus/core/images/sprites/elements/ladybug3.png b/qtflyingbus/core/images/sprites/elements/ladybug3.png Binary files differnew file mode 100644 index 0000000..7aa5cc7 --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/ladybug3.png diff --git a/qtflyingbus/core/images/sprites/elements/peace1.png b/qtflyingbus/core/images/sprites/elements/peace1.png Binary files differnew file mode 100644 index 0000000..a9fc7b0 --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/peace1.png diff --git a/qtflyingbus/core/images/sprites/elements/peace2.png b/qtflyingbus/core/images/sprites/elements/peace2.png Binary files differnew file mode 100644 index 0000000..2b0fe6e --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/peace2.png diff --git a/qtflyingbus/core/images/sprites/elements/peace3.png b/qtflyingbus/core/images/sprites/elements/peace3.png Binary files differnew file mode 100644 index 0000000..a6af9b5 --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/peace3.png diff --git a/qtflyingbus/core/images/sprites/elements/peace4.png b/qtflyingbus/core/images/sprites/elements/peace4.png Binary files differnew file mode 100644 index 0000000..38fcb81 --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/peace4.png diff --git a/qtflyingbus/core/images/sprites/elements/peace5.png b/qtflyingbus/core/images/sprites/elements/peace5.png Binary files differnew file mode 100644 index 0000000..7a56bf9 --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/peace5.png diff --git a/qtflyingbus/core/images/sprites/elements/stone.png b/qtflyingbus/core/images/sprites/elements/stone.png Binary files differnew file mode 100644 index 0000000..cf4793d --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/stone.png diff --git a/qtflyingbus/core/images/sprites/elements/tree1.png b/qtflyingbus/core/images/sprites/elements/tree1.png Binary files differnew file mode 100644 index 0000000..849b0b8 --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/tree1.png diff --git a/qtflyingbus/core/images/sprites/elements/tree2.png b/qtflyingbus/core/images/sprites/elements/tree2.png Binary files differnew file mode 100644 index 0000000..e91448c --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/tree2.png diff --git a/qtflyingbus/core/images/sprites/elements/tree3.png b/qtflyingbus/core/images/sprites/elements/tree3.png Binary files differnew file mode 100644 index 0000000..60d6f01 --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/tree3.png diff --git a/qtflyingbus/core/images/sprites/elements/tree4.png b/qtflyingbus/core/images/sprites/elements/tree4.png Binary files differnew file mode 100644 index 0000000..2c614bf --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/tree4.png diff --git a/qtflyingbus/core/images/sprites/elements/tree5.png b/qtflyingbus/core/images/sprites/elements/tree5.png Binary files differnew file mode 100644 index 0000000..ee0c7d3 --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/tree5.png diff --git a/qtflyingbus/core/images/sprites/elements/tree6.png b/qtflyingbus/core/images/sprites/elements/tree6.png Binary files differnew file mode 100644 index 0000000..46bec32 --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/tree6.png diff --git a/qtflyingbus/core/images/sprites/elements/tree7.png b/qtflyingbus/core/images/sprites/elements/tree7.png Binary files differnew file mode 100644 index 0000000..3f3c17c --- /dev/null +++ b/qtflyingbus/core/images/sprites/elements/tree7.png diff --git a/qtflyingbus/core/images/sprites/qml.png b/qtflyingbus/core/images/sprites/qml.png Binary files differnew file mode 100644 index 0000000..785b473 --- /dev/null +++ b/qtflyingbus/core/images/sprites/qml.png diff --git a/qtflyingbus/core/images/sprites/star.png b/qtflyingbus/core/images/sprites/star.png Binary files differnew file mode 100644 index 0000000..e41a8bb --- /dev/null +++ b/qtflyingbus/core/images/sprites/star.png diff --git a/qtflyingbus/core/images/sprites/std.png b/qtflyingbus/core/images/sprites/std.png Binary files differnew file mode 100644 index 0000000..0c96b9d --- /dev/null +++ b/qtflyingbus/core/images/sprites/std.png diff --git a/qtflyingbus/core/images/sprites/van/inflating/1.png b/qtflyingbus/core/images/sprites/van/inflating/1.png Binary files differnew file mode 100644 index 0000000..307aec0 --- /dev/null +++ b/qtflyingbus/core/images/sprites/van/inflating/1.png diff --git a/qtflyingbus/core/images/sprites/van/inflating/2.png b/qtflyingbus/core/images/sprites/van/inflating/2.png Binary files differnew file mode 100644 index 0000000..7db91b0 --- /dev/null +++ b/qtflyingbus/core/images/sprites/van/inflating/2.png diff --git a/qtflyingbus/core/images/sprites/van/inflating/3.png b/qtflyingbus/core/images/sprites/van/inflating/3.png Binary files differnew file mode 100644 index 0000000..35f1a2f --- /dev/null +++ b/qtflyingbus/core/images/sprites/van/inflating/3.png diff --git a/qtflyingbus/core/images/sprites/van/inflating/4.png b/qtflyingbus/core/images/sprites/van/inflating/4.png Binary files differnew file mode 100644 index 0000000..c940ee1 --- /dev/null +++ b/qtflyingbus/core/images/sprites/van/inflating/4.png diff --git a/qtflyingbus/core/images/sprites/van/inflating/5.png b/qtflyingbus/core/images/sprites/van/inflating/5.png Binary files differnew file mode 100644 index 0000000..6d9b10f --- /dev/null +++ b/qtflyingbus/core/images/sprites/van/inflating/5.png diff --git a/qtflyingbus/core/images/sprites/van/inflating/6.png b/qtflyingbus/core/images/sprites/van/inflating/6.png Binary files differnew file mode 100644 index 0000000..024346a --- /dev/null +++ b/qtflyingbus/core/images/sprites/van/inflating/6.png diff --git a/qtflyingbus/core/images/sprites/van/running/1.png b/qtflyingbus/core/images/sprites/van/running/1.png Binary files differnew file mode 100644 index 0000000..7af2854 --- /dev/null +++ b/qtflyingbus/core/images/sprites/van/running/1.png diff --git a/qtflyingbus/core/images/sprites/van/running/2.png b/qtflyingbus/core/images/sprites/van/running/2.png Binary files differnew file mode 100644 index 0000000..cfddd19 --- /dev/null +++ b/qtflyingbus/core/images/sprites/van/running/2.png diff --git a/qtflyingbus/core/images/sprites/van/running/3.png b/qtflyingbus/core/images/sprites/van/running/3.png Binary files differnew file mode 100644 index 0000000..2b72d9b --- /dev/null +++ b/qtflyingbus/core/images/sprites/van/running/3.png diff --git a/qtflyingbus/core/images/sprites/van/running/4.png b/qtflyingbus/core/images/sprites/van/running/4.png Binary files differnew file mode 100644 index 0000000..70b28d4 --- /dev/null +++ b/qtflyingbus/core/images/sprites/van/running/4.png diff --git a/qtflyingbus/core/images/sprites/van/running/5.png b/qtflyingbus/core/images/sprites/van/running/5.png Binary files differnew file mode 100644 index 0000000..00e266b --- /dev/null +++ b/qtflyingbus/core/images/sprites/van/running/5.png diff --git a/qtflyingbus/core/images/sprites/van/running/6.png b/qtflyingbus/core/images/sprites/van/running/6.png Binary files differnew file mode 100644 index 0000000..fb7ac1b --- /dev/null +++ b/qtflyingbus/core/images/sprites/van/running/6.png diff --git a/qtflyingbus/core/levels/1.xml b/qtflyingbus/core/levels/1.xml new file mode 100644 index 0000000..cf3a6cb --- /dev/null +++ b/qtflyingbus/core/levels/1.xml @@ -0,0 +1,153 @@ +<?xml version="1.0" encoding="utf-8"?> +<level version="1.0"> + <object> + <x>426</x> + <y>462</y> + <name>Bird</name> + </object> + <object> + <x>800</x> + <y>800</y> + <name>Cloud</name> + </object> + <object> + <x>880</x> + <y>508</y> + <name>LadyBug</name> + </object> + <object> + <x>1372</x> + <y>440</y> + <name>Balloon</name> + </object> + <object> + <x>1752</x> + <y>604</y> + <name>LadyBug</name> + </object> + <object> + <x>2370</x> + <y>470</y> + <name>LadyBug</name> + </object> + <object> + <x>2584</x> + <y>300</y> + <name>Bird</name> + </object> + + <object> + <x>638</x> + <y>470</y> + <name>Peace</name> + </object> + <object> + <x>1098</x> + <y>300</y> + <name>Peace</name> + </object> + <object> + <x>1900</x> + <y>280</y> + <name>Peace</name> + </object> + + <object> + <x>2000</x> + <y>180</y> + <name>Tree</name> + </object> + + <object> + <x>320</x> + <y>86</y> + <name>Stone</name> + </object> + <object> + <x>770</x> + <y>86</y> + <name>Stone</name> + </object> + <object> + <x>1488</x> + <y>86</y> + <name>Stone</name> + </object> + <object> + <x>1582</x> + <y>86</y> + <name>Stone</name> + </object> + <object> + <x>2744</x> + <y>86</y> + <name>Stone</name> + </object> + + <object> + <x>0.00000001</x> + <y>480</y> + <type>98</type> + <speed>0.00000001</speed> + <vspeed>0.00000001</vspeed> + <image>images/scene/sky/light.png</image> + </object> + <object> + <x>100</x> + <y>260</y> + <type>98</type> + <speed>0.00000001</speed> + <vspeed>0.8</vspeed> + <image>images/scene/elements/sun.png</image> + </object> + + <object> + <x>130</x> + <y>660</y> + <type>98</type> + <speed>0.1</speed> + <vspeed>0.9</vspeed> + <image>images/scene/elements/cloud2.png</image> + </object> + <object> + <x>630</x> + <y>480</y> + <type>98</type> + <speed>0.1</speed> + <vspeed>0.9</vspeed> + <image>images/scene/elements/cloud3.png</image> + </object> + <object> + <x>900</x> + <y>530</y> + <type>98</type> + <speed>0.1</speed> + <vspeed>0.9</vspeed> + <image>images/scene/elements/cloud4.png</image> + </object> + <object> + <x>0.00000001</x> + <y>240</y> + <type>99</type> + <speed>0.1</speed> + <vspeed>0.9</vspeed> + <image>images/scene/elements/cloud1.png</image> + </object> + + <object> + <x>0.00000001</x> + <y>180</y> + <type>99</type> + <speed>0.3</speed> + <vspeed>0.95</vspeed> + <image>images/scene/elements/mountain.png</image> + </object> + <object> + <x>0.00000001</x> + <y>54</y> + <type>99</type> + <speed>1.0</speed> + <vspeed>1.0</vspeed> + <image>images/scene/elements/ground.png</image> + </object> +</level> diff --git a/qtflyingbus/core/levels/2.xml b/qtflyingbus/core/levels/2.xml new file mode 100644 index 0000000..a67f3f9 --- /dev/null +++ b/qtflyingbus/core/levels/2.xml @@ -0,0 +1,127 @@ +<?xml version="1.0" encoding="utf-8"?> +<level version="1.0"> + <object> + <x>880</x> + <y>208</y> + <name>LadyBug</name> + </object> + <object> + <x>1372</x> + <y>400</y> + <name>LadyBug</name> + </object> + <object> + <x>1752</x> + <y>500</y> + <name>Balloon</name> + </object> + <object> + <x>2370</x> + <y>380</y> + <name>Bird</name> + </object> + <object> + <x>2584</x> + <y>200</y> + <name>LadyBug</name> + </object> + + <object> + <x>638</x> + <y>330</y> + <name>Peace</name> + </object> + <object> + <x>1098</x> + <y>200</y> + <name>Peace</name> + </object> + <object> + <x>1974</x> + <y>500</y> + <name>Peace</name> + </object> + + <object> + <x>770</x> + <y>86</y> + <name>Stone</name> + </object> + <object> + <x>1188</x> + <y>86</y> + <name>Stone</name> + </object> + <object> + <x>1582</x> + <y>86</y> + <name>Stone</name> + </object> + + <object> + <x>0.00000001</x> + <y>480</y> + <type>98</type> + <speed>0.00000001</speed> + <vspeed>0.00000001</vspeed> + <image>images/scene/sky/gray.png</image> + </object> + <object> + <x>100</x> + <y>360</y> + <type>98</type> + <speed>0.00000001</speed> + <vspeed>0.8</vspeed> + <image>images/scene/elements/sun.png</image> + </object> + + <object> + <x>0.00000001</x> + <y>560</y> + <type>98</type> + <speed>0.1</speed> + <vspeed>0.9</vspeed> + <image>images/scene/elements/cloud2.png</image> + </object> + <object> + <x>680</x> + <y>680</y> + <type>98</type> + <speed>0.1</speed> + <vspeed>0.9</vspeed> + <image>images/scene/elements/cloud3.png</image> + </object> + <object> + <x>1000</x> + <y>630</y> + <type>98</type> + <speed>0.1</speed> + <vspeed>0.9</vspeed> + <image>images/scene/elements/cloud4.png</image> + </object> + + <object> + <x>0.00000001</x> + <y>190</y> + <type>99</type> + <speed>0.3</speed> + <vspeed>0.95</vspeed> + <image>images/scene/elements/water.png</image> + </object> + <object> + <x>0.00000001</x> + <y>145</y> + <type>99</type> + <speed>0.3</speed> + <vspeed>1.0</vspeed> + <image>images/scene/elements/sand.png</image> + </object> + <object> + <x>0.00000001</x> + <y>74</y> + <type>99</type> + <speed>1.0</speed> + <vspeed>1.0</vspeed> + <image>images/scene/elements/street.png</image> + </object> +</level> diff --git a/qtflyingbus/core/levels/3.xml b/qtflyingbus/core/levels/3.xml new file mode 100644 index 0000000..6b37617 --- /dev/null +++ b/qtflyingbus/core/levels/3.xml @@ -0,0 +1,156 @@ +<?xml version="1.0" encoding="utf-8"?> +<level version="1.0"> + <object> + <x>880</x> + <y>440</y> + <name>LadyBug</name> + </object> + <object> + <x>1372</x> + <y>600</y> + <name>Balloon</name> + </object> + <object> + <x>1752</x> + <y>620</y> + <name>Balloon</name> + </object> + <object> + <x>4000</x> + <y>410</y> + <name>LadyBug</name> + </object> + <object> + <x>1300</x> + <y>400</y> + <name>Bird</name> + </object> + + <object> + <x>638</x> + <y>540</y> + <name>Peace</name> + </object> + <object> + <x>1098</x> + <y>600</y> + <name>Peace</name> + </object> + <object> + <x>1974</x> + <y>300</y> + <name>Peace</name> + </object> + <object> + <x>1600</x> + <y>620</y> + <name>Peace</name> + </object> + + <object> + <x>600</x> + <y>86</y> + <name>Stone</name> + </object> + <object> + <x>1200</x> + <y>86</y> + <name>Stone</name> + </object> + <object> + <x>1600</x> + <y>86</y> + <name>Stone</name> + </object> + <object> + <x>2600</x> + <y>86</y> + <name>Stone</name> + </object> + + <object> + <x>0.00000001</x> + <y>480</y> + <type>98</type> + <speed>0.00000001</speed> + <vspeed>0.00000001</vspeed> + <image>images/scene/sky/dark.png</image> + </object> + <object> + <x>240</x> + <y>560</y> + <type>98</type> + <speed>0.00000001</speed> + <vspeed>0.8</vspeed> + <image>images/scene/elements/moon.png</image> + </object> + + <object> + <x>0.00000001</x> + <y>520</y> + <type>98</type> + <speed>0.1</speed> + <vspeed>0.9</vspeed> + <image>images/scene/elements/cloud2.png</image> + </object> + <object> + <x>500</x> + <y>640</y> + <type>98</type> + <speed>0.1</speed> + <vspeed>0.9</vspeed> + <image>images/scene/elements/cloud3.png</image> + </object> + <object> + <x>900</x> + <y>-400</y> + <type>98</type> + <speed>0.1</speed> + <vspeed>0.9</vspeed> + <image>images/scene/elements/cloud4.png</image> + </object> + <object> + <x>0.00000001</x> + <y>160</y> + <type>99</type> + <speed>0.1</speed> + <vspeed>0.9</vspeed> + <image>images/scene/elements/cloud1.png</image> + </object> + + <object> + <x>0.00000001</x> + <y>460</y> + <type>99</type> + <speed>0.3</speed> + <vspeed>0.95</vspeed> + <image>images/scene/elements/bigmountain2.png</image> + </object> + + <object> + <x>0.00000001</x> + <y>540</y> + <type>99</type> + <speed>0.3</speed> + <vspeed>0.95</vspeed> + <image>images/scene/elements/bigmountain1.png</image> + </object> + + <object> + <x>0.00000001</x> + <y>240</y> + <type>99</type> + <speed>1.0</speed> + <vspeed>1.0</vspeed> + <image>images/scene/elements/bush.png</image> + </object> + + <object> + <x>0.00000001</x> + <y>70</y> + <type>99</type> + <speed>1.0</speed> + <vspeed>1.0</vspeed> + <image>images/scene/elements/road.png</image> + </object> +</level> diff --git a/qtflyingbus/core/resource.qrc b/qtflyingbus/core/resource.qrc new file mode 100644 index 0000000..64edf47 --- /dev/null +++ b/qtflyingbus/core/resource.qrc @@ -0,0 +1,206 @@ +<RCC> +<qresource prefix="/"> + <file>./Background.qml</file> + <file>./FinalSplash.qml</file> + <file>./Splash.qml</file> + <file>./sprites/Peace.qml</file> + <file>./sprites/Balloon.qml</file> + <file>./sprites/Bird.qml</file> + <file>./sprites/Stone.qml</file> + <file>./sprites/Cloud.qml</file> + <file>./sprites/Tree.qml</file> + <file>./sprites/LadyBug.qml</file> + <file>./AboutMenu.qml</file> + <file>./FrameSprite.qml</file> + <file>./Score.qml</file> + <file>./Sprite.qml</file> + <file>./Player.qml</file> + <file>./ScoreMenu.qml</file> + <file>./Main.qml</file> + <file>./Balloon.qml</file> + <file>./DigitLabel.qml</file> + <file>./FinalSplashItem.qml</file> + <file>./LevelModel.qml</file> + <file>./MenuAnimation.qml</file> + <file>./YouWinMenu.qml</file> + <file>./levels/1.xml</file> + <file>./levels/3.xml</file> + <file>./levels/2.xml</file> + <file>./PlayMenu.qml</file> + <file>./images/sprites/std.png</file> + <file>./images/sprites/elements/tree5.png</file> + <file>./images/sprites/elements/ladybug3.png</file> + <file>./images/sprites/elements/peace4.png</file> + <file>./images/sprites/elements/ladybug2.png</file> + <file>./images/sprites/elements/bird3.png</file> + <file>./images/sprites/elements/bird4.png</file> + <file>./images/sprites/elements/cloud2.png</file> + <file>./images/sprites/elements/cloud3.png</file> + <file>./images/sprites/elements/peace1.png</file> + <file>./images/sprites/elements/peace5.png</file> + <file>./images/sprites/elements/cloud7.png</file> + <file>./images/sprites/elements/cloud6.png</file> + <file>./images/sprites/elements/cloud1.png</file> + <file>./images/sprites/elements/tree7.png</file> + <file>./images/sprites/elements/tree6.png</file> + <file>./images/sprites/elements/tree1.png</file> + <file>./images/sprites/elements/peace2.png</file> + <file>./images/sprites/elements/tree2.png</file> + <file>./images/sprites/elements/tree3.png</file> + <file>./images/sprites/elements/bird5.png</file> + <file>./images/sprites/elements/cloud4.png</file> + <file>./images/sprites/elements/bird2.png</file> + <file>./images/sprites/elements/cloud5.png</file> + <file>./images/sprites/elements/bird1.png</file> + <file>./images/sprites/elements/ladybug1.png</file> + <file>./images/sprites/elements/balloon.png</file> + <file>./images/sprites/elements/tree4.png</file> + <file>./images/sprites/elements/peace3.png</file> + <file>./images/sprites/elements/stone.png</file> + <file>./images/sprites/star.png</file> + <file>./images/sprites/qml.png</file> + <file>./images/sprites/van/running/2.png</file> + <file>./images/sprites/van/running/6.png</file> + <file>./images/sprites/van/running/1.png</file> + <file>./images/sprites/van/running/4.png</file> + <file>./images/sprites/van/running/5.png</file> + <file>./images/sprites/van/running/3.png</file> + <file>./images/sprites/van/inflating/2.png</file> + <file>./images/sprites/van/inflating/6.png</file> + <file>./images/sprites/van/inflating/1.png</file> + <file>./images/sprites/van/inflating/4.png</file> + <file>./images/sprites/van/inflating/5.png</file> + <file>./images/sprites/van/inflating/3.png</file> + <file>./images/splash/note.png</file> + <file>./images/splash/tablet.png</file> + <file>./images/splash/n8.png</file> + <file>./images/splash/van.png</file> + <file>./images/splash/finalbackground.png</file> + <file>./images/splash/background.png</file> + <file>./images/scene/elements/street.png</file> + <file>./images/scene/elements/moon.png</file> + <file>./images/scene/elements/sunlight.png</file> + <file>./images/scene/elements/sand.png</file> + <file>./images/scene/elements/cloud2.png</file> + <file>./images/scene/elements/cloud3.png</file> + <file>./images/scene/elements/bigmountain1.png</file> + <file>./images/scene/elements/road.png</file> + <file>./images/scene/elements/cloud1.png</file> + <file>./images/scene/elements/sun.png</file> + <file>./images/scene/elements/ground.png</file> + <file>./images/scene/elements/water.png</file> + <file>./images/scene/elements/mountain.png</file> + <file>./images/scene/elements/cloud4.png</file> + <file>./images/scene/elements/cloud5.png</file> + <file>./images/scene/elements/bigmountain2.png</file> + <file>./images/scene/elements/bush.png</file> + <file>./images/scene/elements/grass.png</file> + <file>./images/scene/sky/light.png</file> + <file>./images/scene/sky/dark.png</file> + <file>./images/scene/sky/gray.png</file> + <file>./images/balloons/blue/2.png</file> + <file>./images/balloons/blue/6.png</file> + <file>./images/balloons/blue/1.png</file> + <file>./images/balloons/blue/4.png</file> + <file>./images/balloons/blue/5.png</file> + <file>./images/balloons/blue/3.png</file> + <file>./images/balloons/pink/2.png</file> + <file>./images/balloons/pink/6.png</file> + <file>./images/balloons/pink/1.png</file> + <file>./images/balloons/pink/4.png</file> + <file>./images/balloons/pink/5.png</file> + <file>./images/balloons/pink/3.png</file> + <file>./images/balloons/green/2.png</file> + <file>./images/balloons/green/6.png</file> + <file>./images/balloons/green/1.png</file> + <file>./images/balloons/green/4.png</file> + <file>./images/balloons/green/5.png</file> + <file>./images/balloons/green/3.png</file> + <file>./images/balloons/yellow/2.png</file> + <file>./images/balloons/yellow/6.png</file> + <file>./images/balloons/yellow/1.png</file> + <file>./images/balloons/yellow/4.png</file> + <file>./images/balloons/yellow/5.png</file> + <file>./images/balloons/yellow/3.png</file> + <file>./images/balloons/red/2.png</file> + <file>./images/balloons/red/6.png</file> + <file>./images/balloons/red/1.png</file> + <file>./images/balloons/red/4.png</file> + <file>./images/balloons/red/5.png</file> + <file>./images/balloons/red/3.png</file> + <file>./images/balloons/line.png</file> + <file>./images/score.png</file> + <file>./images/life.png</file> + <file>./images/menu/about.png</file> + <file>./images/menu/menu_youwin.png</file> + <file>./images/menu/details.png</file> + <file>./images/menu/leave_title.png</file> + <file>./images/menu/menu_gameover.png</file> + <file>./images/menu/yourscore.png</file> + <file>./images/menu/button/play_pressed.png</file> + <file>./images/menu/button/exit.png</file> + <file>./images/menu/button/about.png</file> + <file>./images/menu/button/next_level_pressed.png</file> + <file>./images/menu/button/about_pressed.png</file> + <file>./images/menu/button/no.png</file> + <file>./images/menu/button/no_pressed.png</file> + <file>./images/menu/button/menu_pressed.png</file> + <file>./images/menu/button/yes_pressed.png</file> + <file>./images/menu/button/retry.png</file> + <file>./images/menu/button/help.png</file> + <file>./images/menu/button/help_pressed.png</file> + <file>./images/menu/button/yes.png</file> + <file>./images/menu/button/retry_pressed.png</file> + <file>./images/menu/button/exit_pressed.png</file> + <file>./images/menu/button/next_level.png</file> + <file>./images/menu/button/play.png</file> + <file>./images/menu/button/restart.png</file> + <file>./images/menu/button/restart_pressed.png</file> + <file>./images/menu/button/menu.png</file> + <file>./images/menu/complete_title.png</file> + <file>./images/menu/highscore.png</file> + <file>./images/menu/menu_div.png</file> + <file>./images/menu/dot.png</file> + <file>./images/menu/menu.png</file> + <file>./images/LICENSE.txt</file> + <file>./images/buttons/pause.png</file> + <file>./images/buttons/close.png</file> + <file>./images/buttons/play2.png</file> + <file>./images/buttons/pause2.png</file> + <file>./images/buttons/back2.png</file> + <file>./images/buttons/play.png</file> + <file>./images/buttons/back.png</file> + <file>./images/buttons/close2.png</file> + <file>./images/digits/2.png</file> + <file>./images/digits/minus.png</file> + <file>./images/digits/9.png</file> + <file>./images/digits/0.png</file> + <file>./images/digits/6.png</file> + <file>./images/digits/1.png</file> + <file>./images/digits/8.png</file> + <file>./images/digits/7.png</file> + <file>./images/digits/4.png</file> + <file>./images/digits/5.png</file> + <file>./images/digits/3.png</file> + <file>./images/help/ladybug.png</file> + <file>./images/help/rock.png</file> + <file>./images/help/title.png</file> + <file>./images/help/tap.png</file> + <file>./images/help/peace.png</file> + <file>./images/help/tree.png</file> + <file>./images/help/cloud.png</file> + <file>./images/help/playnow.png</file> + <file>./images/help/bird.png</file> + <file>./images/help/background.png</file> + <file>./images/help/balloon.png</file> + <file>./images/help/pop.png</file> + <file>./HelpScreen.qml</file> + <file>./Button.qml</file> + <file>./engine.js</file> + <file>./Base.qml</file> + <file>./LeaveMenu.qml</file> + <file>./GameOverMenu.qml</file> + <file>./CompleteMenu.qml</file> + <file>./Menu.qml</file> +</qresource> +</RCC>
\ No newline at end of file diff --git a/qtflyingbus/core/sprites/Balloon.qml b/qtflyingbus/core/sprites/Balloon.qml new file mode 100644 index 0000000..d0367ec --- /dev/null +++ b/qtflyingbus/core/sprites/Balloon.qml @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 +import "../" + +Sprite { + type: 1 + velocity: 1 + topOffset: 4 + leftOffset: 4 + rightOffset: 4 + bottomOffset: 30 + + image: "images/sprites/elements/balloon.png" +} diff --git a/qtflyingbus/core/sprites/Bird.qml b/qtflyingbus/core/sprites/Bird.qml new file mode 100644 index 0000000..e46e338 --- /dev/null +++ b/qtflyingbus/core/sprites/Bird.qml @@ -0,0 +1,65 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 +import "../" + +FrameSprite { + type: 1 + damage: 2 + velocity: 4 + + topOffset: 30 + leftOffset: 4 + rightOffset: 4 + bottomOffset: 8 + + frameImages: [ + "images/sprites/elements/bird1.png", + "images/sprites/elements/bird2.png", + "images/sprites/elements/bird3.png", + "images/sprites/elements/bird4.png", + "images/sprites/elements/bird5.png", + "images/sprites/elements/bird4.png", + "images/sprites/elements/bird3.png", + "images/sprites/elements/bird2.png" + ] +} diff --git a/qtflyingbus/core/sprites/Cloud.qml b/qtflyingbus/core/sprites/Cloud.qml new file mode 100644 index 0000000..a356cc0 --- /dev/null +++ b/qtflyingbus/core/sprites/Cloud.qml @@ -0,0 +1,78 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 +import "../" + +FrameSprite { + type: 1 + topOffset: 4 + leftOffset: 34 + rightOffset: 34 + bottomOffset: 4 + + property int interval : 40 + property bool flash : false + + frameImages: [ + "images/sprites/elements/cloud1.png", + "images/sprites/elements/cloud2.png", + "images/sprites/elements/cloud3.png", + "images/sprites/elements/cloud4.png", + "images/sprites/elements/cloud5.png", + "images/sprites/elements/cloud6.png", + "images/sprites/elements/cloud7.png" + ] + + function advance(phase) { + if (phase % interval == 0) + flash = true; + + if (flash && phase % 2 == 0) { + if (frameIndex < 6) + frameIndex++; + else { + flash = false; + frameIndex = 0; + } + } + } +} diff --git a/qtflyingbus/core/sprites/LadyBug.qml b/qtflyingbus/core/sprites/LadyBug.qml new file mode 100644 index 0000000..4e70eba --- /dev/null +++ b/qtflyingbus/core/sprites/LadyBug.qml @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 +import "../" + +FrameSprite { + type: 1 + velocity: 1 + topOffset: 8 + leftOffset: 2 + rightOffset: 16 + bottomOffset: 18 + + frameImages: [ + "images/sprites/elements/ladybug1.png", + "images/sprites/elements/ladybug2.png", + "images/sprites/elements/ladybug3.png", + "images/sprites/elements/ladybug2.png" + ] +} diff --git a/qtflyingbus/core/sprites/Peace.qml b/qtflyingbus/core/sprites/Peace.qml new file mode 100644 index 0000000..5f8a5e3 --- /dev/null +++ b/qtflyingbus/core/sprites/Peace.qml @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 +import "../" + +FrameSprite { + type: 2 + topOffset: 4 + leftOffset: 34 + rightOffset: 34 + bottomOffset: 4 + + frameImages: [ + "images/sprites/elements/peace1.png", + "images/sprites/elements/peace2.png", + "images/sprites/elements/peace3.png", + "images/sprites/elements/peace4.png", + "images/sprites/elements/peace5.png", + "images/sprites/elements/peace4.png", + "images/sprites/elements/peace3.png", + "images/sprites/elements/peace2.png" + ] +} diff --git a/qtflyingbus/core/sprites/Stone.qml b/qtflyingbus/core/sprites/Stone.qml new file mode 100644 index 0000000..9d70de7 --- /dev/null +++ b/qtflyingbus/core/sprites/Stone.qml @@ -0,0 +1,53 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 +import "../" + +Sprite { + type: 1 + topOffset: 8 + leftOffset: 8 + rightOffset: 8 + bottomOffset: 8 + + image: "images/sprites/elements/stone.png" +} diff --git a/qtflyingbus/core/sprites/Tree.qml b/qtflyingbus/core/sprites/Tree.qml new file mode 100644 index 0000000..a7d95f0 --- /dev/null +++ b/qtflyingbus/core/sprites/Tree.qml @@ -0,0 +1,53 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 +import "../" + +Sprite { + type: 1 + topOffset: 16 + leftOffset: 64 + rightOffset: 64 + bottomOffset: 4 + + image: "images/sprites/elements/tree1.png" +} diff --git a/qtflyingbus/main_640_360.qml b/qtflyingbus/main_640_360.qml new file mode 100644 index 0000000..a118a6c --- /dev/null +++ b/qtflyingbus/main_640_360.qml @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 +import "core" + +Item { + width: main.width + height: main.height + + Main { + id: main + clip: true + width: 640 + height: 360 + } +} diff --git a/qtflyingbus/main_800_480.qml b/qtflyingbus/main_800_480.qml new file mode 100644 index 0000000..a94b7df --- /dev/null +++ b/qtflyingbus/main_800_480.qml @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 +import "core" + +Item { + width: main.width + height: main.height + + Main { + id: main + clip: true + width: 800 + height: 480 + } +} diff --git a/qtflyingbus/main_864_480.qml b/qtflyingbus/main_864_480.qml new file mode 100644 index 0000000..920ee58 --- /dev/null +++ b/qtflyingbus/main_864_480.qml @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** This file is part of QtFlyingBus +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** * Neither the name of Nokia Corporation 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." +** +****************************************************************************/ + +import Qt 4.7 +import "core" + +Item { + width: main.width + height: main.height + + Main { + id: main + clip: true + width: 864 + height: 480 + } +} diff --git a/qtflyingbus/qtflyingbus b/qtflyingbus/qtflyingbus new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/qtflyingbus/qtflyingbus diff --git a/weather-qml/.DS_Store b/weather-qml/.DS_Store Binary files differnew file mode 100644 index 0000000..5008ddf --- /dev/null +++ b/weather-qml/.DS_Store diff --git a/weather-qml/.gitignore b/weather-qml/.gitignore new file mode 100644 index 0000000..87cab50 --- /dev/null +++ b/weather-qml/.gitignore @@ -0,0 +1,19 @@ +*.o +moc_*.cpp +Makefile +qrc_*.cpp +*.moc +*~ +*.inf +*.sis +*.mmp +*.rss +*.pkg +*.loc +*.mk +*.cache +*# +.cproject +.project +.make.cache +ABLD.BAT diff --git a/weather-qml/CityModel.qml b/weather-qml/CityModel.qml new file mode 100644 index 0000000..d4760a8 --- /dev/null +++ b/weather-qml/CityModel.qml @@ -0,0 +1,183 @@ +import Qt 4.6 + +ListModel { + ListElement { + cityId: "Mostly Cloudy" + cityName: "Mostly Cloudy" + lower: 18 + upper: 31 + current: 22 + isNight: false + weather: "MostlyCloudy" + } + + ListElement { + cityId: "Mostly Cloudy 2" + cityName: "Mostly Cloudy 2" + lower: 18 + upper: 31 + current: 22 + isNight: true + weather: "MostlyCloudy" + } + + ListElement { + cityId: "Storm" + cityName: "Storm" + lower: 2 + upper: 21 + current: 8 + isNight: false + weather: "Storm" + } + + ListElement { + cityId: "Storm 2" + cityName: "Storm 2" + lower: 2 + upper: 21 + current: 8 + isNight: true + weather: "Storm" + } + + ListElement { + cityId: "Thunderstorm" + cityName: "Thunderstorm" + lower: 10 + upper: 13 + current: 7 + isNight: false + weather: "Thunderstorm" + } + + ListElement { + cityId: "Thunderstorm 2" + cityName: "Thunderstorm 2" + lower: 10 + upper: 13 + current: 7 + isNight: true + weather: "Thunderstorm" + } + + ListElement { + cityId: "Rain" + cityName: "Rain" + lower: 11 + upper: 25 + current: 12 + isNight: false + weather: "Rain" + } + + ListElement { + cityId: "Rain 2" + cityName: "Rain 2" + lower: 11 + upper: 25 + current: 12 + isNight: true + weather: "Rain" + } + + ListElement { + cityId: "Mist" + cityName: "Mist" + lower: 21 + upper: 25 + current: 22 + isNight: false + weather: "Mist" + } + + ListElement { + cityId: "Mist 2" + cityName: "Mist 2" + lower: 21 + upper: 25 + current: 22 + isNight: true + weather: "Mist" + } + + ListElement { + cityId: "Haze" + cityName: "Haze" + lower: 1 + upper: 9 + current: 11 + isNight: false + weather: "Haze" + } + + ListElement { + cityId: "Haze 2" + cityName: "Haze 2" + lower: 1 + upper: 9 + current: 11 + isNight: true + weather: "Haze" + } + + ListElement { + cityId: "Fog" + cityName: "Fog" + lower: 28 + upper: 35 + current: 30 + isNight: false + weather: "Fog" + } + + ListElement { + cityId: "Fog 2" + cityName: "Fog 2" + lower: 28 + upper: 35 + current: 30 + isNight: true + weather: "Fog" + } + + ListElement { + cityId: "Cloudy" + cityName: "Cloudy" + lower: 25 + upper: 28 + current: 27 + isNight: false + weather: "Cloudy" + } + + ListElement { + cityId: "Cloudy 2" + cityName: "Cloudy 2" + lower: 25 + upper: 28 + current: 27 + isNight: true + weather: "Cloudy" + } + + ListElement { + cityId: "Mostly Sunny" + cityName: "Mostly Sunny" + lower: 33 + upper: 39 + current: 36 + isNight: false + weather: "MostlySunny" + } + + ListElement { + cityId: "Mostly Sunny 2" + cityName: "Mostly Sunny 2" + lower: 33 + upper: 39 + current: 36 + isNight: true + weather: "MostlySunny" + } +} diff --git a/weather-qml/CityPanel.qml b/weather-qml/CityPanel.qml new file mode 100644 index 0000000..19b4ef1 --- /dev/null +++ b/weather-qml/CityPanel.qml @@ -0,0 +1,154 @@ +import Qt 4.6 + +Item { + id: root + width: window.width + + property string currentMessage; + + signal gotoCity(string cityId); + + MouseArea { + id: overlay + anchors.fill: parent + visible: false + onClicked: root.state = "" + } + + Image { + id: backPanel + opacity: 0.0 + y: frontPanel.y + source: "images/city_panel_bg.png" + } + + Rectangle { + id: cityRect + x: 0 + y: 36 + width: 360 + height: 64 + color: "#071217" + opacity: 0.0 + anchors.topMargin: -1 // XXX workaround for internal rounding bug + anchors.top: backPanel.bottom + anchors.left: parent.left + anchors.right: parent.right + + /// XXX: list item bg + height: (80 * Math.min(cityListView.count, 5)) + 17 + + Component { + id: cityDelegate + Item { + id: cityItem + width: background.width + height: background.height + + ListView.onRemove: SequentialAnimation { + PropertyAction { target: cityItem; property: "ListView.delayRemove"; value: true } + NumberAnimation { target: cityItem; property: "opacity"; to: 0 } + NumberAnimation { target: cityItem; property: "height"; to: 0; duration: 9000; } + PropertyAction { target: cityItem; property: "ListView.delayRemove"; value: false } + } + + ListView.onAdd: SequentialAnimation { + PropertyAction { target: cityItem; property: "opacity"; value: 0 } + NumberAnimation { target: cityItem; property: "height"; from: 0; to: background.height; duration: 9000;} + NumberAnimation { target: cityItem; property: "opacity"; from: 0; to: 1 } + } + + Image { + id: background; + source: "images/list_item_bg.png" + MouseArea { + anchors.fill: parent + onClicked: { root.gotoCity(cityId); } + } + } + + Text { + text: cityName + color: "white" + font.family: "Nokia Sans" + font.pixelSize: 38 + anchors.fill: parent + anchors.leftMargin: 30 + anchors.rightMargin: 30 + verticalAlignment: "AlignVCenter" + } + } + } + + ListView { + id: cityListView; + clip: true; + model: cityModel + opacity: 0.0 + delegate: cityDelegate + anchors.fill: cityRect + anchors.topMargin: -17 + anchors.bottomMargin: 35 + + ScrollBar { + id: scroll + pageSize: cityListView.height / cityListView.contentHeight + position: cityListView.contentY / cityListView.contentHeight + anchors.top: cityListView.top + anchors.bottom: cityListView.bottom + anchors.right: cityListView.right + anchors.rightMargin: 10 + anchors.bottomMargin: 15 + width: 8 + } + } + } + + Image { + id: frontPanel + source: "images/city_name_background_bigger.png" + anchors.bottom: root.bottom + MouseArea { + anchors.fill: frontPanel + onClicked: { root.state = "final"; } + } + } + + states : State { + name: "final" + PropertyChanges { target: frontPanel; opacity: 0.0; visible: false; } + PropertyChanges { target: backPanel; opacity: 1.0; } + PropertyChanges { target: cityRect; opacity: 1.0; } + PropertyChanges { target: backPanel; y: root.height - cityRect.height; } + PropertyChanges { target: overlay; visible: true; } + PropertyChanges { target: cityListView; opacity: 1.0; } + } + + transitions: Transition { + from: ""; to: "final" + SequentialAnimation { + ParallelAnimation { + NumberAnimation { target: backPanel; properties: "opacity"; duration: 300 } + NumberAnimation { target: cityRect; properties: "opacity"; duration: 300 } + } + NumberAnimation { target: frontPanel; properties: "opacity"; duration: 300 } + NumberAnimation { target: frontPanel; properties: "visible"; duration: 0 } + NumberAnimation { target: backPanel; properties: "y"; duration: 250 } + NumberAnimation { target: cityListView; properties: "opacity"; duration: 200 } + } + } + + transitions: Transition { + from: "final"; to: "" + SequentialAnimation { + NumberAnimation { target: cityListView; properties: "opacity"; duration: 200 } + NumberAnimation { target: backPanel; properties: "y"; duration: 250 } + NumberAnimation { target: frontPanel; properties: "opacity"; duration: 300 } + NumberAnimation { target: frontPanel; properties: "visible"; duration: 0 } + ParallelAnimation { + NumberAnimation { target: backPanel; properties: "opacity"; duration: 300 } + NumberAnimation { target: cityRect; properties: "opacity"; duration: 300 } + } + } + } +} diff --git a/weather-qml/Cloudy.qml b/weather-qml/Cloudy.qml new file mode 100644 index 0000000..84e6f92 --- /dev/null +++ b/weather-qml/Cloudy.qml @@ -0,0 +1,106 @@ +import Qt 4.6 + +ForecastView { + id: root + isClear: false + + SmallCloud { + id: cloud5 + x: scaledX(-22) + y: scaledY(-800) + finalY: scaledY(-477); + type: isDay ? "cloud" : "cloud_rain" + } + + SmallCloud { + id: cloud4 + x: scaledX(317) + y: scaledY(-800) + finalY: scaledY(-480); + type: isDay ? "cloud" : "cloud_rain" + } + + HungItem { + id: sun + x: isDay ? scaledX(198) : scaledX(220) + y: scaledY(-800) + itemX: 0 + itemY: isDay ? 176 : 180 + height: isDay ? 460 : 440 + finalY: isDay ? scaledY(-255) : scaledY(-205) + itemImage: isDay ? "images/cold_sun.png" : "images/moon.png" + lineImage: isDay ? "images/cold_sun_line.png" : "images/moon_line.png" + } + + MediumCloud { + id: cloud3 + x: scaledX(215) + y: scaledY(-800) + finalY: scaledY(-340) + type: isDay ? "cloud" : "cloud_rain" + } + + LargeCloud { + id: cloud2 + x: scaledX(-1) + y: scaledY(-800) + finalY: scaledY(-333) + type: isDay ? "cloud" : "cloud_rain" + } + + LargeCloud { + id: cloud1 + x: scaledX(318) + y: scaledY(-800) + finalY: scaledY(-331) + type: isDay ? "cloud" : "cloud_rain" + } + + states : State { + name: "final" + PropertyChanges { target: sun; y: sun.finalY; } + PropertyChanges { target: cloud1; y: cloud1.finalY; } + PropertyChanges { target: cloud2; y: cloud2.finalY; } + PropertyChanges { target: cloud3; y: cloud3.finalY; } + PropertyChanges { target: cloud4; y: cloud4.finalY; } + PropertyChanges { target: cloud5; y: cloud5.finalY; } + } + + transitions: Transition { + SequentialAnimation { + ParallelAnimation { + NumberAnimation { target: cloud1; properties: "y"; + easing.type: "OutBack"; duration: 500 } + + SequentialAnimation { + PauseAnimation { duration: 200 } + NumberAnimation { target: cloud3; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + + SequentialAnimation { + PauseAnimation { duration: 400 } + NumberAnimation { target: cloud2; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + + SequentialAnimation { + PauseAnimation { duration: 600 } + NumberAnimation { target: cloud4; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + + SequentialAnimation { + PauseAnimation { duration: 600 } + NumberAnimation { target: cloud5; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + } + + NumberAnimation { target: sun; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + } + + onPresent: { root.state = "final"; } +} diff --git a/weather-qml/Fog.qml b/weather-qml/Fog.qml new file mode 100644 index 0000000..3def8af --- /dev/null +++ b/weather-qml/Fog.qml @@ -0,0 +1,67 @@ +import Qt 4.6 + +ForecastView { + id: root + isClear: false + + SmallCloud { + id: cloud2 + x: scaledX(308) + y: scaledY(-800) + finalY: scaledY(-468); + type: "cloud_rain" + } + + HungItem { + id: sun + x: isDay ? scaledX(198) : scaledX(220) + y: scaledY(-800) + itemX: 0 + itemY: isDay ? 176 : 180 + height: isDay ? 460 : 440 + finalY: isDay ? scaledY(-255) : scaledY(-205) + itemImage: isDay ? "images/cold_sun.png" : "images/moon.png" + lineImage: isDay ? "images/cold_sun_line.png" : "images/moon_line.png" + } + + MediumCloud { + id: cloud1 + x: scaledX(3) + y: scaledY(-800) + finalY: scaledY(-296) + type: "cloud_rain" + } + + Image { + id: fog + x: scaledX(-30) + source: "images/fog.png" + } + + states : State { + name: "final" + PropertyChanges { target: sun; y: sun.finalY; } + PropertyChanges { target: cloud1; y: cloud1.finalY; } + PropertyChanges { target: cloud2; y: cloud2.finalY; } + } + + transitions: Transition { + SequentialAnimation { + ParallelAnimation { + NumberAnimation { target: cloud1; properties: "y"; + easing.type: "OutBack"; duration: 500 } + + SequentialAnimation { + PauseAnimation { duration: 200 } + NumberAnimation { target: cloud2; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + } + + NumberAnimation { target: sun; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + } + + onPresent: { root.state = "final"; } +} diff --git a/weather-qml/ForecastLabel.qml b/weather-qml/ForecastLabel.qml new file mode 100644 index 0000000..60a4440 --- /dev/null +++ b/weather-qml/ForecastLabel.qml @@ -0,0 +1,70 @@ +import Qt 4.6 + +Item { + id: root + + property string lowTemperature + property string highTemperature + property string currentTemperature + + Row { + anchors.bottom: line.bottom + anchors.bottomMargin: 58 + anchors.bottom: parent.bottom + anchors.horizontalCenter: line.horizontalCenter + + Text { + text: currentTemperature + font.family: "Nokia Sans" + font.pixelSize: 120 + font.bold: true + color: "white" + } + + Image { + source: "images/centigrades.png" + } + } + + Image { + id: line + source: "images/division_line.png" + anchors.top: parent.top + anchors.topMargin: 104 + anchors.horizontalCenter: parent.horizontalCenter + } + + Row { + anchors.left: line.left + anchors.top: line.bottom + + Image { + source: "images/icon_max.png" + } + + Text { + text: highTemperature + "°C" + font.family: "Nokia Sans" + font.pixelSize: 30 + color: "white" + opacity: 0.7 + } + } + + Row { + anchors.right: line.right + anchors.top: line.bottom + + Image { + source: "images/icon_min.png" + } + + Text { + text: lowTemperature + "°C" + font.family: "Nokia Sans" + font.pixelSize: 30 + color: "white" + opacity: 0.7 + } + } +} diff --git a/weather-qml/ForecastView.qml b/weather-qml/ForecastView.qml new file mode 100644 index 0000000..9aace9c --- /dev/null +++ b/weather-qml/ForecastView.qml @@ -0,0 +1,60 @@ +import Qt 4.6 + +Item { + id: root + anchors.fill: parent + + signal present(); + + property bool isDay : true; + property bool isClear : true; + property string cityName; + property int lowTemperature; + property int highTemperature; + property int currentTemperature; + + function scaledX(x) { + return x * window.scaleFactorX; + } + + function scaledY(y) { + return y * window.scaleFactorY; + } + + Image { + id: bg + x: root.width / 2 - bg.width / 2 + source: root.isDay ? (root.isClear ? "images/bg_day_clear.png" : "images/bg_day_rain.png") + : (root.isClear ? "images/bg_night_clear.png" : "images/bg_night_rain.png"); + } + + ForecastLabel { + id: display1 + x: 110 + z: 99 + width: 260 + height: 180 + anchors.bottomMargin: 115 + anchors.bottom: parent.bottom + currentTemperature: root.currentTemperature + lowTemperature: root.lowTemperature + highTemperature: root.highTemperature + } + + Text { + id: cityLabel + z: 99 + text: root.cityName + font.family: "Nokia Sans" + font.pixelSize: 40 + color: "#ffffff" + horizontalAlignment: "AlignHCenter" + anchors.left: parent.left + anchors.right: parent.right + anchors.leftMargin: 50 + anchors.bottomMargin: 76 + anchors.bottom: parent.bottom + } + + Connections { target: parent; onPresent: present(); } +} diff --git a/weather-qml/Haze.qml b/weather-qml/Haze.qml new file mode 100644 index 0000000..7da5e67 --- /dev/null +++ b/weather-qml/Haze.qml @@ -0,0 +1,67 @@ +import Qt 4.6 + +ForecastView { + id: root + isClear: false + + SmallCloud { + id: cloud2 + x: scaledX(341) + y: scaledY(-800) + finalY: scaledY(-469); + type: "cloud_rain" + } + + HungItem { + id: sun + x: isDay ? scaledX(198) : scaledX(220) + y: scaledY(-800) + itemX: 0 + itemY: isDay ? 176 : 180 + height: isDay ? 460 : 440 + finalY: isDay ? scaledY(-255) : scaledY(-205) + itemImage: isDay ? "images/cold_sun.png" : "images/moon.png" + lineImage: isDay ? "images/cold_sun_line.png" : "images/moon_line.png" + } + + MediumCloud { + id: cloud1 + x: scaledX(6) + y: scaledY(-800) + finalY: scaledY(-296) + type: "cloud_rain" + } + + Image { + id: haze + x: scaledX(-30) + source: "images/haze.png" + } + + states : State { + name: "final" + PropertyChanges { target: sun; y: sun.finalY; } + PropertyChanges { target: cloud1; y: cloud1.finalY; } + PropertyChanges { target: cloud2; y: cloud2.finalY; } + } + + transitions: Transition { + SequentialAnimation { + ParallelAnimation { + NumberAnimation { target: cloud1; properties: "y"; + easing.type: "OutBack"; duration: 500 } + + SequentialAnimation { + PauseAnimation { duration: 200 } + NumberAnimation { target: cloud2; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + } + + NumberAnimation { target: sun; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + } + + onPresent: { root.state = "final"; } +} diff --git a/weather-qml/HungItem.qml b/weather-qml/HungItem.qml new file mode 100644 index 0000000..cf14c09 --- /dev/null +++ b/weather-qml/HungItem.qml @@ -0,0 +1,28 @@ +import Qt 4.6 + +Item { + id: root + + property real itemX + property real itemY + property real finalY + property string lineImage + property string itemImage + + width: item.width + height: itemY + item.height + + Image { + id: line + source: root.lineImage + anchors.horizontalCenter: root.horizontalCenter + } + + Image { + id: item + x: root.itemX + y: root.itemY + source: root.itemImage + anchors.bottom: parent.bottom + } +} diff --git a/weather-qml/LargeCloud.qml b/weather-qml/LargeCloud.qml new file mode 100644 index 0000000..c05e234 --- /dev/null +++ b/weather-qml/LargeCloud.qml @@ -0,0 +1,11 @@ +import Qt 4.6 + +HungItem { + id: root + itemX: 15; + itemY: 420; + + property string type: "cloud"; + itemImage: "images/" + root.type + "_1.png" + lineImage: "images/" + root.type + "_1_line.png" +} diff --git a/weather-qml/MediumCloud.qml b/weather-qml/MediumCloud.qml new file mode 100644 index 0000000..527ce97 --- /dev/null +++ b/weather-qml/MediumCloud.qml @@ -0,0 +1,11 @@ +import Qt 4.6 + +HungItem { + id: root + itemX: 13; + itemY: 420; + + property string type: "cloud"; + itemImage: "images/" + root.type + "_2.png" + lineImage: "images/" + root.type + "_2_line.png" +} diff --git a/weather-qml/Mist.qml b/weather-qml/Mist.qml new file mode 100644 index 0000000..d30e604 --- /dev/null +++ b/weather-qml/Mist.qml @@ -0,0 +1,119 @@ +import Qt 4.6 + +ForecastView { + id: root + isClear: false + + SmallCloud { + id: cloud5 + x: scaledX(297) + y: scaledY(-800) + finalY: scaledY(-460); + type: "cloud_rain" + } + + SmallCloud { + id: cloud4 + x: scaledX(64) + y: scaledY(-800) + finalY: scaledY(-436) + type: "cloud_rain" + } + + HungItem { + id: sun + x: isDay ? scaledX(198) : scaledX(220) + y: scaledY(-800) + itemX: 0 + itemY: isDay ? 176 : 180 + height: isDay ? 460 : 440 + finalY: isDay ? scaledY(-255) : scaledY(-205) + itemImage: isDay ? "images/cold_sun.png" : "images/moon.png" + lineImage: isDay ? "images/cold_sun_line.png" : "images/moon_line.png" + } + + MediumCloud { + id: cloud3 + x: scaledX(154) + y: scaledY(-800) + finalY: scaledY(-296) + type: "cloud_rain" + } + + RainItem { + id: rain + x: scaledX(70) + y: scaledY(376) + visible: false + rainType: "mist" + } + + LargeCloud { + id: cloud2 + x: scaledX(315) + y: scaledY(-800) + finalY: scaledY(-351) + type: "cloud_rain" + } + + LargeCloud { + id: cloud1 + x: scaledX(-70) + y: scaledY(-800) + finalY: scaledY(-294) + type: "cloud_rain" + } + + states : State { + name: "final" + PropertyChanges { target: sun; y: sun.finalY; } + PropertyChanges { target: cloud1; y: cloud1.finalY; } + PropertyChanges { target: cloud2; y: cloud2.finalY; } + PropertyChanges { target: cloud3; y: cloud3.finalY; } + PropertyChanges { target: cloud4; y: cloud4.finalY; } + PropertyChanges { target: cloud5; y: cloud5.finalY; } + PropertyChanges { target: rain; visible: true; } + } + + transitions: Transition { + SequentialAnimation { + ParallelAnimation { + NumberAnimation { target: cloud1; properties: "y"; + easing.type: "OutBack"; duration: 500 } + + SequentialAnimation { + PauseAnimation { duration: 200 } + NumberAnimation { target: cloud2; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + + SequentialAnimation { + PauseAnimation { duration: 400 } + NumberAnimation { target: cloud3; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + + SequentialAnimation { + PauseAnimation { duration: 600 } + NumberAnimation { target: cloud4; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + + SequentialAnimation { + PauseAnimation { duration: 800 } + NumberAnimation { target: cloud5; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + } + + NumberAnimation { target: sun; properties: "y"; + easing.type: "OutBack"; duration: 500 } + + PauseAnimation { duration: 100 } + + NumberAnimation { target: rain; properties: "visible"; duration: 0 } + } + } + + onPresent: { root.state = "final"; } +} diff --git a/weather-qml/MostlyCloudy.qml b/weather-qml/MostlyCloudy.qml new file mode 100644 index 0000000..8485f2f --- /dev/null +++ b/weather-qml/MostlyCloudy.qml @@ -0,0 +1,91 @@ +import Qt 4.6 + +ForecastView { + id: root + isClear: false + + SmallCloud { + id: cloud4 + x: scaledX(84) + y: scaledY(-800) + finalY: scaledY(-483); + type: isDay ? "cloud" : "cloud_rain" + } + + HungItem { + id: sun + x: isDay ? scaledX(198) : scaledX(220) + y: scaledY(-800) + itemX: 0 + itemY: isDay ? 176 : 180 + height: isDay ? 460 : 440 + finalY: isDay ? scaledY(-255) : scaledY(-205) + itemImage: isDay ? "images/cold_sun.png" : "images/moon.png" + lineImage: isDay ? "images/cold_sun_line.png" : "images/moon_line.png" + } + + MediumCloud { + id: cloud3 + x: scaledX(-43) + y: scaledY(-800) + finalY: scaledY(-333) + type: isDay ? "cloud" : "cloud_rain" + } + + MediumCloud { + id: cloud2 + x: scaledX(374) + y: scaledY(-800) + finalY: scaledY(-334) + type: isDay ? "cloud" : "cloud_rain" + } + + LargeCloud { + id: cloud1 + x: scaledX(235) + y: scaledY(-800) + finalY: scaledY(-298) + type: isDay ? "cloud" : "cloud_rain" + } + + states : State { + name: "final" + PropertyChanges { target: sun; y: sun.finalY; } + PropertyChanges { target: cloud1; y: cloud1.finalY; } + PropertyChanges { target: cloud2; y: cloud2.finalY; } + PropertyChanges { target: cloud3; y: cloud3.finalY; } + PropertyChanges { target: cloud4; y: cloud4.finalY; } + } + + transitions: Transition { + SequentialAnimation { + ParallelAnimation { + NumberAnimation { target: cloud1; properties: "y"; + easing.type: "OutBack"; duration: 500 } + + SequentialAnimation { + PauseAnimation { duration: 200 } + NumberAnimation { target: cloud3; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + + SequentialAnimation { + PauseAnimation { duration: 400 } + NumberAnimation { target: cloud2; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + + SequentialAnimation { + PauseAnimation { duration: 600 } + NumberAnimation { target: cloud4; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + } + + NumberAnimation { target: sun; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + } + + onPresent: { root.state = "final"; } +} diff --git a/weather-qml/MostlySunny.qml b/weather-qml/MostlySunny.qml new file mode 100644 index 0000000..4970238 --- /dev/null +++ b/weather-qml/MostlySunny.qml @@ -0,0 +1,75 @@ +import Qt 4.6 + +ForecastView { + id: root + + SmallCloud { + id: cloud3 + x: scaledX(-7) + y: scaledY(-800) + finalY: scaledY(-540); + type: isDay ? "cloud" : "cloud_rain" + } + + SmallCloud { + id: cloud2 + x: scaledX(399) + y: scaledY(-800) + finalY: scaledY(-409); + type: isDay ? "cloud" : "cloud_rain" + } + + HungItem { + id: sun + x: isDay ? scaledX(120) : scaledX(220) + y: scaledY(-800) + itemX: 0 + itemY: isDay ? 200 : 180 + height: isDay ? 500 : 440 + finalY: isDay ? scaledY(-198) : scaledY(-205) + itemImage: isDay ? "images/sun.png" : "images/moon.png" + lineImage: isDay ? "images/sun_line.png" : "images/moon_line.png" + } + + MediumCloud { + id: cloud1 + x: scaledX(-20) + y: scaledY(-800) + finalY: scaledY(-218) + type: isDay ? "cloud" : "cloud_rain" + } + + states : State { + name: "final" + PropertyChanges { target: sun; y: sun.finalY; } + PropertyChanges { target: cloud1; y: cloud1.finalY; } + PropertyChanges { target: cloud2; y: cloud2.finalY; } + PropertyChanges { target: cloud3; y: cloud3.finalY; } + } + + transitions: Transition { + SequentialAnimation { + ParallelAnimation { + NumberAnimation { target: cloud1; properties: "y"; + easing.type: "OutBack"; duration: 500 } + + SequentialAnimation { + PauseAnimation { duration: 200 } + NumberAnimation { target: cloud2; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + + SequentialAnimation { + PauseAnimation { duration: 400 } + NumberAnimation { target: cloud3; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + } + + NumberAnimation { target: sun; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + } + + onPresent: { root.state = "final"; } +} diff --git a/weather-qml/ParallaxView.qml b/weather-qml/ParallaxView.qml new file mode 100644 index 0000000..cfd4414 --- /dev/null +++ b/weather-qml/ParallaxView.qml @@ -0,0 +1,60 @@ +import Qt 4.6 + +Item { + id: root + + Component { + id: cityDelegate + + Item { + id: itemInner + width: 432 + height: window.height + + signal present(); + + Component.onCompleted: { + var component = createComponent(weather + ".qml"); + var element = component.createObject(); + + if (element != 0) { + element.parent = itemInner; + element.cityName = cityName; + element.isDay = !isNight; + element.lowTemperature = lower; + element.highTemperature = upper; + element.currentTemperature = current; + } + } + } + } + + ListView { + id: list + property bool moving: false + + anchors.fill: parent + orientation: "Horizontal" + currentIndex: window.currentIndex + + onCurrentIndexChanged: { + if (!moving && currentItem) + currentItem.present(); + } + + onMovementStarted: { + moving = true; + } + + onMovementEnded: { + moving = false; + currentItem.present(); + } + + model: cityModel + delegate: cityDelegate + + snapMode: ListView.SnapOneItem + highlightRangeMode: "StrictlyEnforceRange" + } +} diff --git a/weather-qml/PartlyCloudy.qml b/weather-qml/PartlyCloudy.qml new file mode 100644 index 0000000..39a01a8 --- /dev/null +++ b/weather-qml/PartlyCloudy.qml @@ -0,0 +1,75 @@ +import Qt 4.6 + +ForecastView { + id: root + + SmallCloud { + id: cloud3 + x: scaledX(396) + y: scaledY(-800) + finalY: scaledY(-446); + type: isDay ? "cloud" : "cloud_rain" + } + + HungItem { + id: sun + x: isDay ? scaledX(120) : scaledX(220) + y: scaledY(-800) + itemX: 0 + itemY: isDay ? 200 : 180 + height: isDay ? 500 : 440 + finalY: isDay ? scaledY(-198) : scaledY(-205) + itemImage: isDay ? "images/sun.png" : "images/moon.png" + lineImage: isDay ? "images/sun_line.png" : "images/moon_line.png" + } + + MediumCloud { + id: cloud2 + x: scaledX(0) + y: scaledY(-800) + finalY: scaledY(-307) + type: isDay ? "cloud" : "cloud_rain" + } + + LargeCloud { + id: cloud1 + x: scaledX(267) + y: scaledY(-800) + finalY: scaledY(-291) + type: isDay ? "cloud" : "cloud_rain" + } + + states : State { + name: "final" + PropertyChanges { target: sun; y: sun.finalY; } + PropertyChanges { target: cloud1; y: cloud1.finalY; } + PropertyChanges { target: cloud2; y: cloud2.finalY; } + PropertyChanges { target: cloud3; y: cloud3.finalY; } + } + + transitions: Transition { + SequentialAnimation { + ParallelAnimation { + NumberAnimation { target: cloud1; properties: "y"; + easing.type: "OutBack"; duration: 500 } + + SequentialAnimation { + PauseAnimation { duration: 200 } + NumberAnimation { target: cloud2; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + + SequentialAnimation { + PauseAnimation { duration: 400 } + NumberAnimation { target: cloud3; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + } + + NumberAnimation { target: sun; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + } + + onPresent: { root.state = "final"; } +} diff --git a/weather-qml/README.rtf b/weather-qml/README.rtf new file mode 100644 index 0000000..2819044 --- /dev/null +++ b/weather-qml/README.rtf @@ -0,0 +1,7 @@ +{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf540 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\paperw11900\paperh16840\margl1440\margr1440\vieww9000\viewh8400\viewkind0 +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural + +\f0\fs24 \cf0 Just need to run the "default.qml" file.}
\ No newline at end of file diff --git a/weather-qml/Rain.qml b/weather-qml/Rain.qml new file mode 100644 index 0000000..1774b2b --- /dev/null +++ b/weather-qml/Rain.qml @@ -0,0 +1,119 @@ +import Qt 4.6 + +ForecastView { + id: root + isClear: false + + SmallCloud { + id: cloud5 + x: scaledX(300) + y: scaledY(-800) + finalY: scaledY(-469); + type: "cloud_rain" + } + + HungItem { + id: sun + x: isDay ? scaledX(198) : scaledX(220) + y: scaledY(-800) + itemX: 0 + itemY: isDay ? 176 : 180 + height: isDay ? 460 : 440 + finalY: isDay ? scaledY(-255) : scaledY(-205) + itemImage: isDay ? "images/cold_sun.png" : "images/moon.png" + lineImage: isDay ? "images/cold_sun_line.png" : "images/moon_line.png" + } + + MediumCloud { + id: cloud4 + x: scaledX(100) + y: scaledY(-800) + finalY: scaledY(-356) + type: "cloud_rain" + } + + MediumCloud { + id: cloud3 + x: scaledX(340) + y: scaledY(-800) + finalY: scaledY(-339) + type: "cloud_rain" + } + + RainItem { + id: rain + x: scaledX(70) + y: scaledY(376) + visible: false + rainType: "rain" + } + + LargeCloud { + id: cloud2 + x: scaledX(186) + y: scaledY(-800) + finalY: scaledY(-319) + type: "cloud_rain" + } + + LargeCloud { + id: cloud1 + x: scaledX(-62) + y: scaledY(-800) + finalY: scaledY(-289) + type: "cloud_rain" + } + + states : State { + name: "final" + PropertyChanges { target: sun; y: sun.finalY; } + PropertyChanges { target: cloud1; y: cloud1.finalY; } + PropertyChanges { target: cloud2; y: cloud2.finalY; } + PropertyChanges { target: cloud3; y: cloud3.finalY; } + PropertyChanges { target: cloud4; y: cloud4.finalY; } + PropertyChanges { target: cloud5; y: cloud5.finalY; } + PropertyChanges { target: rain; visible: true; } + } + + transitions: Transition { + SequentialAnimation { + ParallelAnimation { + NumberAnimation { target: cloud1; properties: "y"; + easing.type: "OutBack"; duration: 500 } + + SequentialAnimation { + PauseAnimation { duration: 200 } + NumberAnimation { target: cloud2; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + + SequentialAnimation { + PauseAnimation { duration: 400 } + NumberAnimation { target: cloud3; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + + SequentialAnimation { + PauseAnimation { duration: 600 } + NumberAnimation { target: cloud4; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + + SequentialAnimation { + PauseAnimation { duration: 800 } + NumberAnimation { target: cloud5; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + } + + NumberAnimation { target: sun; properties: "y"; + easing.type: "OutBack"; duration: 500 } + + PauseAnimation { duration: 100 } + + NumberAnimation { target: rain; properties: "visible"; duration: 0 } + } + } + + onPresent: { root.state = "final"; } +} diff --git a/weather-qml/RainItem.qml b/weather-qml/RainItem.qml new file mode 100644 index 0000000..47d9e6f --- /dev/null +++ b/weather-qml/RainItem.qml @@ -0,0 +1,15 @@ +import Qt 4.6 + +Image { + id: rainItem + property int frame : 1; + property string rainType: "rain"; + + source: "images/" + rainType + "_0" + rainItem.frame + ".png" + + frame: NumberAnimation { + repeat: true + duration: 1100 + from: 1; to: 5; + } +} diff --git a/weather-qml/ScrollBar.qml b/weather-qml/ScrollBar.qml new file mode 100644 index 0000000..2361c32 --- /dev/null +++ b/weather-qml/ScrollBar.qml @@ -0,0 +1,27 @@ +import Qt 4.6 + +Item { + id: scrollBar + + property real position + property real pageSize + + Rectangle { + id: background + anchors.fill: parent + opacity: 0.3 + color: "white" + radius: (width / 2 - 1) + } + + Rectangle { + opacity: 0.7 + color: "black" + radius: (width / 2 - 1) + x: 1 + y: Math.min(Math.max(0.0, scrollBar.position), + Math.max(0.0, 1.0 - scrollBar.pageSize)) * (scrollBar.height - 2) + 1 + width: parent.width - 2 + height: Math.min(1.0, scrollBar.pageSize) * (scrollBar.height - 2) + } +} diff --git a/weather-qml/SmallCloud.qml b/weather-qml/SmallCloud.qml new file mode 100644 index 0000000..38db715 --- /dev/null +++ b/weather-qml/SmallCloud.qml @@ -0,0 +1,11 @@ +import Qt 4.6 + +HungItem { + id: root + itemX: 10; + itemY: 492; + + property string type: "cloud"; + itemImage: "images/" + root.type + "_3.png" + lineImage: "images/" + root.type + "_3_line.png" +} diff --git a/weather-qml/SplashScreen.qml b/weather-qml/SplashScreen.qml new file mode 100644 index 0000000..bee13c8 --- /dev/null +++ b/weather-qml/SplashScreen.qml @@ -0,0 +1,53 @@ +import Qt 4.6 + +Item { + id: splash + + Image { + id: bg + source: "images/bg_loading.png" + anchors.fill: parent + } + + Image { + id: bottomMenu + source: "images/city_name_background_bigger.png" + anchors.bottom: bottomBar.top + anchors.horizontalCenter: parent.horizontalCenter + } + + Throbber { + id: "progress" + anchors.topMargin: 10 + anchors.top: infoLabel.bottom + anchors.horizontalCenter: parent.horizontalCenter + } + + Text { + id: infoLabel + text: "Loading" + color: "white" + font.family: "Nokia Sans" + font.pixelSize: 22 + anchors.top: parent.top + anchors.topMargin: parent.height * 0.3 + anchors.horizontalCenter: parent.horizontalCenter + verticalAlignment: "AlignVCenter" + horizontalAlignment: "AlignHCenter" + } + + Image { + id: umbrella + source: "images/umbrella.png" + anchors.bottom: bottomBar.top + anchors.bottomMargin: 20 + anchors.horizontalCenter: parent.horizontalCenter + } + + Image { + id: bottomBar + source: "images/bg_bottom_options.png" + anchors.bottom: parent.bottom + anchors.horizontalCenter: parent.horizontalCenter + } +} diff --git a/weather-qml/Storm.qml b/weather-qml/Storm.qml new file mode 100644 index 0000000..d92de47 --- /dev/null +++ b/weather-qml/Storm.qml @@ -0,0 +1,119 @@ +import Qt 4.6 + +ForecastView { + id: root + isClear: false + + SmallCloud { + id: cloud5 + x: scaledX(280) + y: scaledY(-800) + finalY: scaledY(-480) + type: "cloud_storm" + } + + SmallCloud { + id: cloud4 + x: scaledX(36) + y: scaledY(-800) + finalY: scaledY(-494) + type: "cloud_storm" + } + + HungItem { + id: sun + x: isDay ? scaledX(198) : scaledX(220) + y: scaledY(-800) + itemX: 0 + itemY: isDay ? 176 : 180 + height: isDay ? 460 : 440 + finalY: isDay ? scaledY(-255) : scaledY(-205) + itemImage: isDay ? "images/cold_sun.png" : "images/moon.png" + lineImage: isDay ? "images/cold_sun_line.png" : "images/moon_line.png" + } + + MediumCloud { + id: cloud2 + x: scaledX(340) + y: scaledY(-800) + finalY: scaledY(-350) + type: "cloud_storm" + } + + LargeCloud { + id: cloud3 + x: scaledX(-30) + y: scaledY(-800) + finalY: scaledY(-345) + type: "cloud_storm" + } + + RainItem { + id: rain + x: scaledX(70) + y: scaledY(376) + visible: false + rainType: "storm" + } + + LargeCloud { + id: cloud1 + x: scaledX(202) + y: scaledY(-800) + finalY: scaledY(-310) + type: "cloud_storm" + } + + states : State { + name: "final" + PropertyChanges { target: sun; y: sun.finalY; } + PropertyChanges { target: cloud1; y: cloud1.finalY; } + PropertyChanges { target: cloud2; y: cloud2.finalY; } + PropertyChanges { target: cloud3; y: cloud3.finalY; } + PropertyChanges { target: cloud4; y: cloud4.finalY; } + PropertyChanges { target: cloud5; y: cloud5.finalY; } + PropertyChanges { target: rain; visible: true; } + } + + transitions: Transition { + SequentialAnimation { + ParallelAnimation { + NumberAnimation { target: cloud1; properties: "y"; + easing.type: "OutBack"; duration: 500 } + + SequentialAnimation { + PauseAnimation { duration: 200 } + NumberAnimation { target: cloud3; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + + SequentialAnimation { + PauseAnimation { duration: 400 } + NumberAnimation { target: cloud2; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + + SequentialAnimation { + PauseAnimation { duration: 600 } + NumberAnimation { target: cloud4; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + + SequentialAnimation { + PauseAnimation { duration: 800 } + NumberAnimation { target: cloud5; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + } + + NumberAnimation { target: sun; properties: "y"; + easing.type: "OutBack"; duration: 500 } + + PauseAnimation { duration: 100 } + + NumberAnimation { target: rain; properties: "visible"; duration: 0 } + } + } + + onPresent: { root.state = "final"; } +} diff --git a/weather-qml/Sunny.qml b/weather-qml/Sunny.qml new file mode 100644 index 0000000..046ba6d --- /dev/null +++ b/weather-qml/Sunny.qml @@ -0,0 +1,31 @@ +import Qt 4.6 + +ForecastView { + id: root + + HungItem { + id: sun + x: isDay ? scaledX(120) : scaledX(220) + y: scaledY(-800) + itemX: 0 + itemY: isDay ? 200 : 180 + height: isDay ? 500 : 440 + finalY: isDay ? scaledY(-198) : scaledY(-205) + itemImage: isDay ? "images/sun.png" : "images/moon.png" + lineImage: isDay ? "images/sun_line.png" : "images/moon_line.png" + } + + states : State { + name: "final" + PropertyChanges { target: sun; y: sun.finalY; } + } + + transitions : Transition { + SequentialAnimation { + NumberAnimation { target: sun; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + } + + onPresent: root.state = "final" +} diff --git a/weather-qml/Throbber.qml b/weather-qml/Throbber.qml new file mode 100644 index 0000000..8174c1d --- /dev/null +++ b/weather-qml/Throbber.qml @@ -0,0 +1,14 @@ +import Qt 4.6 + +Image { + id: throbber + property int frame : 1; + + source: "images/loading_" + throbber.frame + ".png" + + frame: NumberAnimation { + repeat: true + duration: 700 + from: 1; to: 25; + } +} diff --git a/weather-qml/Thunderstorm.qml b/weather-qml/Thunderstorm.qml new file mode 100644 index 0000000..094c23c --- /dev/null +++ b/weather-qml/Thunderstorm.qml @@ -0,0 +1,119 @@ +import Qt 4.6 + +ForecastView { + id: root + isClear: false + + SmallCloud { + id: cloud5 + x: scaledX(56) + y: scaledY(-800) + finalY: scaledY(-481) + type: "cloud_storm" + } + + MediumCloud { + id: cloud4 + x: scaledX(275) + y: scaledY(-800) + finalY: scaledY(-359) + type: "cloud_storm" + } + + HungItem { + id: sun + x: isDay ? scaledX(198) : scaledX(220) + y: scaledY(-800) + itemX: 0 + itemY: isDay ? 176 : 180 + height: isDay ? 460 : 440 + finalY: isDay ? scaledY(-255) : scaledY(-205) + itemImage: isDay ? "images/cold_sun.png" : "images/moon.png" + lineImage: isDay ? "images/cold_sun_line.png" : "images/moon_line.png" + } + + MediumCloud { + id: cloud2 + x: scaledX(115) + y: scaledY(-800) + finalY: scaledY(-350) + type: "cloud_tstorm" + } + + LargeCloud { + id: cloud3 + x: scaledX(-12) + y: scaledY(-800) + finalY: scaledY(-323) + type: "cloud_storm" + } + + RainItem { + id: rain + x: scaledX(70) + y: scaledY(376) + visible: false + rainType: "storm" + } + + LargeCloud { + id: cloud1 + x: scaledX(249) + y: scaledY(-850) + finalY: scaledY(-310) + type: "cloud_tstorm" + } + + states : State { + name: "final" + PropertyChanges { target: sun; y: sun.finalY; } + PropertyChanges { target: cloud1; y: cloud1.finalY; } + PropertyChanges { target: cloud2; y: cloud2.finalY; } + PropertyChanges { target: cloud3; y: cloud3.finalY; } + PropertyChanges { target: cloud4; y: cloud4.finalY; } + PropertyChanges { target: cloud5; y: cloud5.finalY; } + PropertyChanges { target: rain; visible: true; } + } + + transitions: Transition { + SequentialAnimation { + ParallelAnimation { + NumberAnimation { target: cloud1; properties: "y"; + easing.type: "OutBack"; duration: 500 } + + SequentialAnimation { + PauseAnimation { duration: 200 } + NumberAnimation { target: cloud3; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + + SequentialAnimation { + PauseAnimation { duration: 400 } + NumberAnimation { target: cloud2; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + + SequentialAnimation { + PauseAnimation { duration: 600 } + NumberAnimation { target: cloud4; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + + SequentialAnimation { + PauseAnimation { duration: 800 } + NumberAnimation { target: cloud5; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + } + + NumberAnimation { target: sun; properties: "y"; + easing.type: "OutBack"; duration: 500 } + + PauseAnimation { duration: 100 } + + NumberAnimation { target: rain; properties: "visible"; duration: 0 } + } + } + + onPresent: { root.state = "final"; } +} diff --git a/weather-qml/UnknownForecast.qml b/weather-qml/UnknownForecast.qml new file mode 100644 index 0000000..4f86cbe --- /dev/null +++ b/weather-qml/UnknownForecast.qml @@ -0,0 +1,30 @@ +import Qt 4.6 + +ForecastView { + id: root + isClear: true + + HungItem { + id: question + x: scaledX(260) + y: scaledY(-800) + itemX: 8 + itemY: 190 + height: 476 + finalY: scaledY(-255) + itemImage: "images/na_icon.png" + lineImage: "images/na_icon_line.png" + } + + states : State { + name: "final" + PropertyChanges { target: question; y: question.finalY; } + } + + transitions: Transition { + NumberAnimation { target: question; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + + onPresent: { root.state = "final"; } +} diff --git a/weather-qml/Weather.qmlproject b/weather-qml/Weather.qmlproject new file mode 100644 index 0000000..3923c0e --- /dev/null +++ b/weather-qml/Weather.qmlproject @@ -0,0 +1,19 @@ +// File generated by QtCreator + +import QmlProject 1.0 + +Project { + // Scan current directory and subdirectories for .qml, .js, and image files + QmlFiles { + directory: "." + recursive: true + } + JavaScriptFiles { + directory: "." + recursive: true + } + ImageFiles { + directory: "." + recursive: true + } +} diff --git a/weather-qml/default.qml b/weather-qml/default.qml new file mode 100644 index 0000000..64c4ce7 --- /dev/null +++ b/weather-qml/default.qml @@ -0,0 +1,73 @@ +import Qt 4.6 + +Rectangle { + id: window + width: 360 + height: 640 + color: "black" + + property int currentIndex : -1; + property bool splashVisible : true + property string weatherSource : "" + + property int verticalOffset: -40 + property real scaleFactorX: window.width / 480.0 + property real scaleFactorY: window.height / 864.0 + + CityModel { + id: cityModel + } + + ParallaxView { + id: view + x: -58 + width: 432 + height: window.height + } + + CityPanel { + id: cityPanel + anchors.top: parent.top + anchors.bottom: bottomBar.top + + onGotoCity: console.log("todo: goto city") + } + + Image { + id: bottomBar + source: "images/bg_bottom_options.png" + anchors.bottom: parent.bottom + } + + SplashScreen { + id: splash + anchors.fill: parent + visible: true + } + + Timer { + interval: 1000 + repeat: false + running: true + onTriggered: splash.visible = false; + } + + Text { + id: exitLabel + text: "Exit" + color: "white" + font.family: "Nokia Sans" + font.pixelSize: 22 + + anchors.fill: bottomBar + anchors.rightMargin: 15 + anchors.leftMargin: window.width / 2 + verticalAlignment: "AlignVCenter" + horizontalAlignment: "AlignRight" + + MouseArea { + anchors.fill: parent + onClicked: { Qt.quit(); } + } + } +} diff --git a/weather-qml/images/bg_bottom_options.png b/weather-qml/images/bg_bottom_options.png Binary files differnew file mode 100644 index 0000000..10a2877 --- /dev/null +++ b/weather-qml/images/bg_bottom_options.png diff --git a/weather-qml/images/bg_day_clear.png b/weather-qml/images/bg_day_clear.png Binary files differnew file mode 100644 index 0000000..2609bbb --- /dev/null +++ b/weather-qml/images/bg_day_clear.png diff --git a/weather-qml/images/bg_day_heavyrain.png b/weather-qml/images/bg_day_heavyrain.png Binary files differnew file mode 100644 index 0000000..6f0f80e --- /dev/null +++ b/weather-qml/images/bg_day_heavyrain.png diff --git a/weather-qml/images/bg_day_rain.png b/weather-qml/images/bg_day_rain.png Binary files differnew file mode 100644 index 0000000..f3a578e --- /dev/null +++ b/weather-qml/images/bg_day_rain.png diff --git a/weather-qml/images/bg_loading.png b/weather-qml/images/bg_loading.png Binary files differnew file mode 100644 index 0000000..aa9a5f8 --- /dev/null +++ b/weather-qml/images/bg_loading.png diff --git a/weather-qml/images/bg_night_clear.png b/weather-qml/images/bg_night_clear.png Binary files differnew file mode 100644 index 0000000..bfe23ce --- /dev/null +++ b/weather-qml/images/bg_night_clear.png diff --git a/weather-qml/images/bg_night_rain.png b/weather-qml/images/bg_night_rain.png Binary files differnew file mode 100644 index 0000000..db8ffba --- /dev/null +++ b/weather-qml/images/bg_night_rain.png diff --git a/weather-qml/images/bt_options_bg.png b/weather-qml/images/bt_options_bg.png Binary files differnew file mode 100644 index 0000000..10a2877 --- /dev/null +++ b/weather-qml/images/bt_options_bg.png diff --git a/weather-qml/images/button_list_delete.png b/weather-qml/images/button_list_delete.png Binary files differnew file mode 100755 index 0000000..81358e7 --- /dev/null +++ b/weather-qml/images/button_list_delete.png diff --git a/weather-qml/images/centigrades.png b/weather-qml/images/centigrades.png Binary files differnew file mode 100644 index 0000000..fabfd9f --- /dev/null +++ b/weather-qml/images/centigrades.png diff --git a/weather-qml/images/city_name_background_bigger.png b/weather-qml/images/city_name_background_bigger.png Binary files differnew file mode 100644 index 0000000..a5e83d0 --- /dev/null +++ b/weather-qml/images/city_name_background_bigger.png diff --git a/weather-qml/images/city_panel_bg.png b/weather-qml/images/city_panel_bg.png Binary files differnew file mode 100644 index 0000000..6dde03f --- /dev/null +++ b/weather-qml/images/city_panel_bg.png diff --git a/weather-qml/images/cloud_1.png b/weather-qml/images/cloud_1.png Binary files differnew file mode 100644 index 0000000..dfab8e2 --- /dev/null +++ b/weather-qml/images/cloud_1.png diff --git a/weather-qml/images/cloud_1_line.png b/weather-qml/images/cloud_1_line.png Binary files differnew file mode 100644 index 0000000..8a4b090 --- /dev/null +++ b/weather-qml/images/cloud_1_line.png diff --git a/weather-qml/images/cloud_2.png b/weather-qml/images/cloud_2.png Binary files differnew file mode 100644 index 0000000..a219b5e --- /dev/null +++ b/weather-qml/images/cloud_2.png diff --git a/weather-qml/images/cloud_2_line.png b/weather-qml/images/cloud_2_line.png Binary files differnew file mode 100644 index 0000000..b9b8ca3 --- /dev/null +++ b/weather-qml/images/cloud_2_line.png diff --git a/weather-qml/images/cloud_3.png b/weather-qml/images/cloud_3.png Binary files differnew file mode 100644 index 0000000..45cde4d --- /dev/null +++ b/weather-qml/images/cloud_3.png diff --git a/weather-qml/images/cloud_3_line.png b/weather-qml/images/cloud_3_line.png Binary files differnew file mode 100644 index 0000000..0486741 --- /dev/null +++ b/weather-qml/images/cloud_3_line.png diff --git a/weather-qml/images/cloud_rain_1.png b/weather-qml/images/cloud_rain_1.png Binary files differnew file mode 100644 index 0000000..063be25 --- /dev/null +++ b/weather-qml/images/cloud_rain_1.png diff --git a/weather-qml/images/cloud_rain_1_line.png b/weather-qml/images/cloud_rain_1_line.png Binary files differnew file mode 100644 index 0000000..204207b --- /dev/null +++ b/weather-qml/images/cloud_rain_1_line.png diff --git a/weather-qml/images/cloud_rain_2.png b/weather-qml/images/cloud_rain_2.png Binary files differnew file mode 100644 index 0000000..fc7a9c3 --- /dev/null +++ b/weather-qml/images/cloud_rain_2.png diff --git a/weather-qml/images/cloud_rain_2_line.png b/weather-qml/images/cloud_rain_2_line.png Binary files differnew file mode 100644 index 0000000..ddef2d4 --- /dev/null +++ b/weather-qml/images/cloud_rain_2_line.png diff --git a/weather-qml/images/cloud_rain_3.png b/weather-qml/images/cloud_rain_3.png Binary files differnew file mode 100644 index 0000000..89b64dd --- /dev/null +++ b/weather-qml/images/cloud_rain_3.png diff --git a/weather-qml/images/cloud_rain_3_line.png b/weather-qml/images/cloud_rain_3_line.png Binary files differnew file mode 100644 index 0000000..862f631 --- /dev/null +++ b/weather-qml/images/cloud_rain_3_line.png diff --git a/weather-qml/images/cloud_storm_1.png b/weather-qml/images/cloud_storm_1.png Binary files differnew file mode 100644 index 0000000..77ef7c1 --- /dev/null +++ b/weather-qml/images/cloud_storm_1.png diff --git a/weather-qml/images/cloud_storm_1_line.png b/weather-qml/images/cloud_storm_1_line.png Binary files differnew file mode 100644 index 0000000..013a082 --- /dev/null +++ b/weather-qml/images/cloud_storm_1_line.png diff --git a/weather-qml/images/cloud_storm_2.png b/weather-qml/images/cloud_storm_2.png Binary files differnew file mode 100644 index 0000000..1ab2ea6 --- /dev/null +++ b/weather-qml/images/cloud_storm_2.png diff --git a/weather-qml/images/cloud_storm_2_line.png b/weather-qml/images/cloud_storm_2_line.png Binary files differnew file mode 100644 index 0000000..51b38b1 --- /dev/null +++ b/weather-qml/images/cloud_storm_2_line.png diff --git a/weather-qml/images/cloud_storm_3.png b/weather-qml/images/cloud_storm_3.png Binary files differnew file mode 100644 index 0000000..e896b01 --- /dev/null +++ b/weather-qml/images/cloud_storm_3.png diff --git a/weather-qml/images/cloud_storm_3_line.png b/weather-qml/images/cloud_storm_3_line.png Binary files differnew file mode 100644 index 0000000..ad52b91 --- /dev/null +++ b/weather-qml/images/cloud_storm_3_line.png diff --git a/weather-qml/images/cloud_tstorm_1.png b/weather-qml/images/cloud_tstorm_1.png Binary files differnew file mode 100644 index 0000000..784a4be --- /dev/null +++ b/weather-qml/images/cloud_tstorm_1.png diff --git a/weather-qml/images/cloud_tstorm_1_line.png b/weather-qml/images/cloud_tstorm_1_line.png Binary files differnew file mode 100644 index 0000000..013a082 --- /dev/null +++ b/weather-qml/images/cloud_tstorm_1_line.png diff --git a/weather-qml/images/cloud_tstorm_2.png b/weather-qml/images/cloud_tstorm_2.png Binary files differnew file mode 100644 index 0000000..130c3cd --- /dev/null +++ b/weather-qml/images/cloud_tstorm_2.png diff --git a/weather-qml/images/cloud_tstorm_2_line.png b/weather-qml/images/cloud_tstorm_2_line.png Binary files differnew file mode 100644 index 0000000..51b38b1 --- /dev/null +++ b/weather-qml/images/cloud_tstorm_2_line.png diff --git a/weather-qml/images/cold_sun.png b/weather-qml/images/cold_sun.png Binary files differnew file mode 100644 index 0000000..deefdef --- /dev/null +++ b/weather-qml/images/cold_sun.png diff --git a/weather-qml/images/cold_sun_line.png b/weather-qml/images/cold_sun_line.png Binary files differnew file mode 100644 index 0000000..f51062b --- /dev/null +++ b/weather-qml/images/cold_sun_line.png diff --git a/weather-qml/images/division_line.png b/weather-qml/images/division_line.png Binary files differnew file mode 100644 index 0000000..896c69c --- /dev/null +++ b/weather-qml/images/division_line.png diff --git a/weather-qml/images/fog.png b/weather-qml/images/fog.png Binary files differnew file mode 100644 index 0000000..6066207 --- /dev/null +++ b/weather-qml/images/fog.png diff --git a/weather-qml/images/haze.png b/weather-qml/images/haze.png Binary files differnew file mode 100644 index 0000000..58c1532 --- /dev/null +++ b/weather-qml/images/haze.png diff --git a/weather-qml/images/icon_max.png b/weather-qml/images/icon_max.png Binary files differnew file mode 100644 index 0000000..e6910d1 --- /dev/null +++ b/weather-qml/images/icon_max.png diff --git a/weather-qml/images/icon_min.png b/weather-qml/images/icon_min.png Binary files differnew file mode 100644 index 0000000..04f2819 --- /dev/null +++ b/weather-qml/images/icon_min.png diff --git a/weather-qml/images/list_item_bg.png b/weather-qml/images/list_item_bg.png Binary files differnew file mode 100644 index 0000000..4b61700 --- /dev/null +++ b/weather-qml/images/list_item_bg.png diff --git a/weather-qml/images/list_item_pressed_bg.png b/weather-qml/images/list_item_pressed_bg.png Binary files differnew file mode 100644 index 0000000..2941e00 --- /dev/null +++ b/weather-qml/images/list_item_pressed_bg.png diff --git a/weather-qml/images/list_item_selected_bg.png b/weather-qml/images/list_item_selected_bg.png Binary files differnew file mode 100644 index 0000000..aa4ffb9 --- /dev/null +++ b/weather-qml/images/list_item_selected_bg.png diff --git a/weather-qml/images/list_top.png b/weather-qml/images/list_top.png Binary files differnew file mode 100644 index 0000000..b943e0b --- /dev/null +++ b/weather-qml/images/list_top.png diff --git a/weather-qml/images/loading_1.png b/weather-qml/images/loading_1.png Binary files differnew file mode 100644 index 0000000..c06c275 --- /dev/null +++ b/weather-qml/images/loading_1.png diff --git a/weather-qml/images/loading_10.png b/weather-qml/images/loading_10.png Binary files differnew file mode 100644 index 0000000..22d483e --- /dev/null +++ b/weather-qml/images/loading_10.png diff --git a/weather-qml/images/loading_11.png b/weather-qml/images/loading_11.png Binary files differnew file mode 100644 index 0000000..3723524 --- /dev/null +++ b/weather-qml/images/loading_11.png diff --git a/weather-qml/images/loading_12.png b/weather-qml/images/loading_12.png Binary files differnew file mode 100644 index 0000000..bc8cb15 --- /dev/null +++ b/weather-qml/images/loading_12.png diff --git a/weather-qml/images/loading_13.png b/weather-qml/images/loading_13.png Binary files differnew file mode 100644 index 0000000..6b0999a --- /dev/null +++ b/weather-qml/images/loading_13.png diff --git a/weather-qml/images/loading_14.png b/weather-qml/images/loading_14.png Binary files differnew file mode 100644 index 0000000..b93671d --- /dev/null +++ b/weather-qml/images/loading_14.png diff --git a/weather-qml/images/loading_15.png b/weather-qml/images/loading_15.png Binary files differnew file mode 100644 index 0000000..5e6cf81 --- /dev/null +++ b/weather-qml/images/loading_15.png diff --git a/weather-qml/images/loading_16.png b/weather-qml/images/loading_16.png Binary files differnew file mode 100644 index 0000000..5bb7fce --- /dev/null +++ b/weather-qml/images/loading_16.png diff --git a/weather-qml/images/loading_17.png b/weather-qml/images/loading_17.png Binary files differnew file mode 100644 index 0000000..5cdf620 --- /dev/null +++ b/weather-qml/images/loading_17.png diff --git a/weather-qml/images/loading_18.png b/weather-qml/images/loading_18.png Binary files differnew file mode 100644 index 0000000..c0fe963 --- /dev/null +++ b/weather-qml/images/loading_18.png diff --git a/weather-qml/images/loading_19.png b/weather-qml/images/loading_19.png Binary files differnew file mode 100644 index 0000000..2ba879b --- /dev/null +++ b/weather-qml/images/loading_19.png diff --git a/weather-qml/images/loading_2.png b/weather-qml/images/loading_2.png Binary files differnew file mode 100644 index 0000000..d8f06e1 --- /dev/null +++ b/weather-qml/images/loading_2.png diff --git a/weather-qml/images/loading_20.png b/weather-qml/images/loading_20.png Binary files differnew file mode 100644 index 0000000..d1b665b --- /dev/null +++ b/weather-qml/images/loading_20.png diff --git a/weather-qml/images/loading_21.png b/weather-qml/images/loading_21.png Binary files differnew file mode 100644 index 0000000..5d8f865 --- /dev/null +++ b/weather-qml/images/loading_21.png diff --git a/weather-qml/images/loading_22.png b/weather-qml/images/loading_22.png Binary files differnew file mode 100644 index 0000000..ab23e6d --- /dev/null +++ b/weather-qml/images/loading_22.png diff --git a/weather-qml/images/loading_23.png b/weather-qml/images/loading_23.png Binary files differnew file mode 100644 index 0000000..0da026d --- /dev/null +++ b/weather-qml/images/loading_23.png diff --git a/weather-qml/images/loading_24.png b/weather-qml/images/loading_24.png Binary files differnew file mode 100644 index 0000000..09a123f --- /dev/null +++ b/weather-qml/images/loading_24.png diff --git a/weather-qml/images/loading_25.png b/weather-qml/images/loading_25.png Binary files differnew file mode 100644 index 0000000..9946381 --- /dev/null +++ b/weather-qml/images/loading_25.png diff --git a/weather-qml/images/loading_3.png b/weather-qml/images/loading_3.png Binary files differnew file mode 100644 index 0000000..55bb39e --- /dev/null +++ b/weather-qml/images/loading_3.png diff --git a/weather-qml/images/loading_4.png b/weather-qml/images/loading_4.png Binary files differnew file mode 100644 index 0000000..6036e50 --- /dev/null +++ b/weather-qml/images/loading_4.png diff --git a/weather-qml/images/loading_5.png b/weather-qml/images/loading_5.png Binary files differnew file mode 100644 index 0000000..28e1994 --- /dev/null +++ b/weather-qml/images/loading_5.png diff --git a/weather-qml/images/loading_6.png b/weather-qml/images/loading_6.png Binary files differnew file mode 100644 index 0000000..18cf24c --- /dev/null +++ b/weather-qml/images/loading_6.png diff --git a/weather-qml/images/loading_7.png b/weather-qml/images/loading_7.png Binary files differnew file mode 100644 index 0000000..a43d161 --- /dev/null +++ b/weather-qml/images/loading_7.png diff --git a/weather-qml/images/loading_8.png b/weather-qml/images/loading_8.png Binary files differnew file mode 100644 index 0000000..99706c2 --- /dev/null +++ b/weather-qml/images/loading_8.png diff --git a/weather-qml/images/loading_9.png b/weather-qml/images/loading_9.png Binary files differnew file mode 100644 index 0000000..113aa50 --- /dev/null +++ b/weather-qml/images/loading_9.png diff --git a/weather-qml/images/minus_sign.png b/weather-qml/images/minus_sign.png Binary files differnew file mode 100644 index 0000000..6a9c06a --- /dev/null +++ b/weather-qml/images/minus_sign.png diff --git a/weather-qml/images/mist_01.png b/weather-qml/images/mist_01.png Binary files differnew file mode 100644 index 0000000..c3b5d5c --- /dev/null +++ b/weather-qml/images/mist_01.png diff --git a/weather-qml/images/mist_02.png b/weather-qml/images/mist_02.png Binary files differnew file mode 100644 index 0000000..63b15d8 --- /dev/null +++ b/weather-qml/images/mist_02.png diff --git a/weather-qml/images/mist_03.png b/weather-qml/images/mist_03.png Binary files differnew file mode 100644 index 0000000..7e67747 --- /dev/null +++ b/weather-qml/images/mist_03.png diff --git a/weather-qml/images/mist_04.png b/weather-qml/images/mist_04.png Binary files differnew file mode 100644 index 0000000..42bb6b8 --- /dev/null +++ b/weather-qml/images/mist_04.png diff --git a/weather-qml/images/mist_05.png b/weather-qml/images/mist_05.png Binary files differnew file mode 100644 index 0000000..636b4a6 --- /dev/null +++ b/weather-qml/images/mist_05.png diff --git a/weather-qml/images/moon.png b/weather-qml/images/moon.png Binary files differnew file mode 100644 index 0000000..5862179 --- /dev/null +++ b/weather-qml/images/moon.png diff --git a/weather-qml/images/moon_line.png b/weather-qml/images/moon_line.png Binary files differnew file mode 100644 index 0000000..449cb4a --- /dev/null +++ b/weather-qml/images/moon_line.png diff --git a/weather-qml/images/na_icon.png b/weather-qml/images/na_icon.png Binary files differnew file mode 100644 index 0000000..2a7877f --- /dev/null +++ b/weather-qml/images/na_icon.png diff --git a/weather-qml/images/na_icon_line.png b/weather-qml/images/na_icon_line.png Binary files differnew file mode 100644 index 0000000..449cb4a --- /dev/null +++ b/weather-qml/images/na_icon_line.png diff --git a/weather-qml/images/rain_01.png b/weather-qml/images/rain_01.png Binary files differnew file mode 100644 index 0000000..04ec51a --- /dev/null +++ b/weather-qml/images/rain_01.png diff --git a/weather-qml/images/rain_02.png b/weather-qml/images/rain_02.png Binary files differnew file mode 100644 index 0000000..fcc9e7e --- /dev/null +++ b/weather-qml/images/rain_02.png diff --git a/weather-qml/images/rain_03.png b/weather-qml/images/rain_03.png Binary files differnew file mode 100644 index 0000000..4ab82aa --- /dev/null +++ b/weather-qml/images/rain_03.png diff --git a/weather-qml/images/rain_04.png b/weather-qml/images/rain_04.png Binary files differnew file mode 100644 index 0000000..0cd9506 --- /dev/null +++ b/weather-qml/images/rain_04.png diff --git a/weather-qml/images/rain_05.png b/weather-qml/images/rain_05.png Binary files differnew file mode 100644 index 0000000..cf59516 --- /dev/null +++ b/weather-qml/images/rain_05.png diff --git a/weather-qml/images/scroll.png b/weather-qml/images/scroll.png Binary files differnew file mode 100644 index 0000000..8ebce0f --- /dev/null +++ b/weather-qml/images/scroll.png diff --git a/weather-qml/images/scroll_knob.png b/weather-qml/images/scroll_knob.png Binary files differnew file mode 100644 index 0000000..379e54a --- /dev/null +++ b/weather-qml/images/scroll_knob.png diff --git a/weather-qml/images/star_01.png b/weather-qml/images/star_01.png Binary files differnew file mode 100644 index 0000000..6e60dcc --- /dev/null +++ b/weather-qml/images/star_01.png diff --git a/weather-qml/images/star_02.png b/weather-qml/images/star_02.png Binary files differnew file mode 100644 index 0000000..6ca331a --- /dev/null +++ b/weather-qml/images/star_02.png diff --git a/weather-qml/images/star_03.png b/weather-qml/images/star_03.png Binary files differnew file mode 100644 index 0000000..f8ebb43 --- /dev/null +++ b/weather-qml/images/star_03.png diff --git a/weather-qml/images/storm_01.png b/weather-qml/images/storm_01.png Binary files differnew file mode 100644 index 0000000..436df98 --- /dev/null +++ b/weather-qml/images/storm_01.png diff --git a/weather-qml/images/storm_02.png b/weather-qml/images/storm_02.png Binary files differnew file mode 100644 index 0000000..16da93f --- /dev/null +++ b/weather-qml/images/storm_02.png diff --git a/weather-qml/images/storm_03.png b/weather-qml/images/storm_03.png Binary files differnew file mode 100644 index 0000000..7ca4192 --- /dev/null +++ b/weather-qml/images/storm_03.png diff --git a/weather-qml/images/storm_04.png b/weather-qml/images/storm_04.png Binary files differnew file mode 100644 index 0000000..f2ba7ce --- /dev/null +++ b/weather-qml/images/storm_04.png diff --git a/weather-qml/images/storm_05.png b/weather-qml/images/storm_05.png Binary files differnew file mode 100644 index 0000000..c35fd7f --- /dev/null +++ b/weather-qml/images/storm_05.png diff --git a/weather-qml/images/sun.png b/weather-qml/images/sun.png Binary files differnew file mode 100644 index 0000000..f99abdf --- /dev/null +++ b/weather-qml/images/sun.png diff --git a/weather-qml/images/sun_line.png b/weather-qml/images/sun_line.png Binary files differnew file mode 100644 index 0000000..f963c27 --- /dev/null +++ b/weather-qml/images/sun_line.png diff --git a/weather-qml/images/thunder.png b/weather-qml/images/thunder.png Binary files differnew file mode 100644 index 0000000..de95d9a --- /dev/null +++ b/weather-qml/images/thunder.png diff --git a/weather-qml/images/umbrella.png b/weather-qml/images/umbrella.png Binary files differnew file mode 100644 index 0000000..afc79e4 --- /dev/null +++ b/weather-qml/images/umbrella.png |