summaryrefslogtreecommitdiffstats
path: root/RadioTuner/RadioTuner.qml
diff options
context:
space:
mode:
Diffstat (limited to 'RadioTuner/RadioTuner.qml')
-rw-r--r--RadioTuner/RadioTuner.qml145
1 files changed, 145 insertions, 0 deletions
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);
+ }
+}