From d7d612ff07253b1cc1ffa4be489a8d90ec750af6 Mon Sep 17 00:00:00 2001 From: "Anselmo Lacerda S. de Melo" Date: Thu, 3 Mar 2011 17:09:35 -0300 Subject: RadioTuner Signed-off-by: Anselmo Lacerda S. de Melo --- RadioTuner/LICENSE.BSD | 32 ++ RadioTuner/README.rtf | 7 - RadioTuner/RadioModel.qml | 5 - RadioTuner/RadioTuner.qml | 145 -------- RadioTuner/RadioTuner.qmlproject | 16 - RadioTuner/RangeStation.qml | 69 ---- RadioTuner/StationsModel.qml | 77 ----- RadioTuner/build/build.pro | 17 + RadioTuner/build/debian/changelog | 5 + RadioTuner/build/debian/compat | 1 + RadioTuner/build/debian/control | 13 + RadioTuner/build/debian/rules | 19 ++ RadioTuner/build/main.cpp | 36 ++ RadioTuner/build/mainwindow.cpp | 39 +++ RadioTuner/build/mainwindow.h | 22 ++ RadioTuner/build/resource.qrc | 43 +++ RadioTuner/content/RadioModel.qml | 46 +++ RadioTuner/content/RadioTuner.qml | 202 +++++++++++ RadioTuner/content/RangeStation.qml | 105 ++++++ RadioTuner/content/StationsModel.qml | 118 +++++++ RadioTuner/content/images/n900/bottom.png | Bin 0 -> 24545 bytes RadioTuner/content/images/n900/bt_next.png | Bin 0 -> 5946 bytes RadioTuner/content/images/n900/bt_next_down.png | Bin 0 -> 6074 bytes RadioTuner/content/images/n900/bt_prev.png | Bin 0 -> 7583 bytes RadioTuner/content/images/n900/bt_prev_down.png | Bin 0 -> 7443 bytes .../content/images/n900/bt_rdsname_arrow.png | Bin 0 -> 375 bytes RadioTuner/content/images/n900/close.png | Bin 0 -> 2485 bytes RadioTuner/content/images/n900/high_tick.png | Bin 0 -> 398 bytes RadioTuner/content/images/n900/low_tick.png | Bin 0 -> 302 bytes RadioTuner/content/images/n900/medium_tick.png | Bin 0 -> 375 bytes RadioTuner/content/images/n900/scala_bg.png | Bin 0 -> 88354 bytes RadioTuner/content/images/n900/scala_glass.png | Bin 0 -> 6581 bytes RadioTuner/content/images/n900/scala_needle.png | Bin 0 -> 14308 bytes RadioTuner/content/images/n900/scala_rdslabel.png | Bin 0 -> 369 bytes RadioTuner/content/images/n900/scala_ticks.png | Bin 0 -> 1130 bytes RadioTuner/content/images/n900/top.png | Bin 0 -> 5129 bytes RadioTuner/content/images/s60/bottom.png | Bin 0 -> 26225 bytes RadioTuner/content/images/s60/bt_next.png | Bin 0 -> 7575 bytes RadioTuner/content/images/s60/bt_next_down.png | Bin 0 -> 7592 bytes RadioTuner/content/images/s60/bt_prev.png | Bin 0 -> 8881 bytes RadioTuner/content/images/s60/bt_prev_down.png | Bin 0 -> 8895 bytes RadioTuner/content/images/s60/bt_rdsname_arrow.png | Bin 0 -> 3079 bytes RadioTuner/content/images/s60/close.png | Bin 0 -> 2194 bytes RadioTuner/content/images/s60/high_tick.png | Bin 0 -> 3042 bytes RadioTuner/content/images/s60/low_tick.png | Bin 0 -> 2968 bytes RadioTuner/content/images/s60/medium_tick.png | Bin 0 -> 3005 bytes RadioTuner/content/images/s60/scala_bg.png | Bin 0 -> 64242 bytes RadioTuner/content/images/s60/scala_glass.png | Bin 0 -> 9461 bytes RadioTuner/content/images/s60/scala_needle.png | Bin 0 -> 17435 bytes RadioTuner/content/images/s60/scala_rdslabel.png | Bin 0 -> 3115 bytes RadioTuner/content/images/s60/scala_ticks.png | Bin 0 -> 5288 bytes RadioTuner/content/images/s60/top.png | Bin 0 -> 4080 bytes RadioTuner/content/rangemodel.js | 119 +++++++ RadioTuner/debian/changelog | 5 + RadioTuner/debian/compat | 1 + RadioTuner/debian/control | 12 + RadioTuner/debian/copyright | 44 +++ RadioTuner/debian/rules | 43 +++ RadioTuner/icons/radiotuner.png | Bin 0 -> 4204 bytes RadioTuner/icons/radiotuner.svg | 372 +++++++++++++++++++++ RadioTuner/images/.DS_Store | Bin 6148 -> 0 bytes RadioTuner/images/bottom.png | Bin 24545 -> 0 bytes RadioTuner/images/bt_next.png | Bin 5946 -> 0 bytes RadioTuner/images/bt_next_down.png | Bin 6074 -> 0 bytes RadioTuner/images/bt_prev.png | Bin 7583 -> 0 bytes RadioTuner/images/bt_prev_down.png | Bin 7443 -> 0 bytes RadioTuner/images/bt_rdsname_arrow.png | Bin 375 -> 0 bytes RadioTuner/images/high_tick.png | Bin 398 -> 0 bytes RadioTuner/images/low_tick.png | Bin 302 -> 0 bytes RadioTuner/images/medium_tick.png | Bin 375 -> 0 bytes RadioTuner/images/placeholder_n900_bar.png | Bin 22357 -> 0 bytes RadioTuner/images/scala_bg.png | Bin 88354 -> 0 bytes RadioTuner/images/scala_glass.png | Bin 6581 -> 0 bytes RadioTuner/images/scala_needle.png | Bin 14308 -> 0 bytes RadioTuner/images/scala_rdslabel.png | Bin 369 -> 0 bytes RadioTuner/images/scala_ticks.png | Bin 1130 -> 0 bytes RadioTuner/images/top.png | Bin 2246 -> 0 bytes RadioTuner/main_n900.qml | 50 +++ RadioTuner/main_s60.qml | 50 +++ RadioTuner/radiotuner.desktop | 8 + RadioTuner/radiotuner.pro | 2 + RadioTuner/rangemodel.js | 93 ------ 82 files changed, 1404 insertions(+), 412 deletions(-) create mode 100644 RadioTuner/LICENSE.BSD delete mode 100644 RadioTuner/README.rtf delete mode 100644 RadioTuner/RadioModel.qml delete mode 100644 RadioTuner/RadioTuner.qml delete mode 100644 RadioTuner/RadioTuner.qmlproject delete mode 100644 RadioTuner/RangeStation.qml delete mode 100644 RadioTuner/StationsModel.qml create mode 100644 RadioTuner/build/build.pro create mode 100644 RadioTuner/build/debian/changelog create mode 100644 RadioTuner/build/debian/compat create mode 100644 RadioTuner/build/debian/control create mode 100755 RadioTuner/build/debian/rules create mode 100644 RadioTuner/build/main.cpp create mode 100644 RadioTuner/build/mainwindow.cpp create mode 100644 RadioTuner/build/mainwindow.h create mode 100644 RadioTuner/build/resource.qrc create mode 100755 RadioTuner/content/RadioModel.qml create mode 100755 RadioTuner/content/RadioTuner.qml create mode 100755 RadioTuner/content/RangeStation.qml create mode 100755 RadioTuner/content/StationsModel.qml create mode 100755 RadioTuner/content/images/n900/bottom.png create mode 100755 RadioTuner/content/images/n900/bt_next.png create mode 100755 RadioTuner/content/images/n900/bt_next_down.png create mode 100755 RadioTuner/content/images/n900/bt_prev.png create mode 100755 RadioTuner/content/images/n900/bt_prev_down.png create mode 100755 RadioTuner/content/images/n900/bt_rdsname_arrow.png create mode 100755 RadioTuner/content/images/n900/close.png create mode 100755 RadioTuner/content/images/n900/high_tick.png create mode 100755 RadioTuner/content/images/n900/low_tick.png create mode 100755 RadioTuner/content/images/n900/medium_tick.png create mode 100755 RadioTuner/content/images/n900/scala_bg.png create mode 100755 RadioTuner/content/images/n900/scala_glass.png create mode 100755 RadioTuner/content/images/n900/scala_needle.png create mode 100755 RadioTuner/content/images/n900/scala_rdslabel.png create mode 100755 RadioTuner/content/images/n900/scala_ticks.png create mode 100755 RadioTuner/content/images/n900/top.png create mode 100755 RadioTuner/content/images/s60/bottom.png create mode 100755 RadioTuner/content/images/s60/bt_next.png create mode 100755 RadioTuner/content/images/s60/bt_next_down.png create mode 100755 RadioTuner/content/images/s60/bt_prev.png create mode 100755 RadioTuner/content/images/s60/bt_prev_down.png create mode 100755 RadioTuner/content/images/s60/bt_rdsname_arrow.png create mode 100755 RadioTuner/content/images/s60/close.png create mode 100755 RadioTuner/content/images/s60/high_tick.png create mode 100755 RadioTuner/content/images/s60/low_tick.png create mode 100755 RadioTuner/content/images/s60/medium_tick.png create mode 100755 RadioTuner/content/images/s60/scala_bg.png create mode 100755 RadioTuner/content/images/s60/scala_glass.png create mode 100755 RadioTuner/content/images/s60/scala_needle.png create mode 100755 RadioTuner/content/images/s60/scala_rdslabel.png create mode 100755 RadioTuner/content/images/s60/scala_ticks.png create mode 100755 RadioTuner/content/images/s60/top.png create mode 100755 RadioTuner/content/rangemodel.js create mode 100755 RadioTuner/debian/changelog create mode 100755 RadioTuner/debian/compat create mode 100755 RadioTuner/debian/control create mode 100644 RadioTuner/debian/copyright create mode 100755 RadioTuner/debian/rules create mode 100755 RadioTuner/icons/radiotuner.png create mode 100755 RadioTuner/icons/radiotuner.svg delete mode 100644 RadioTuner/images/.DS_Store delete mode 100755 RadioTuner/images/bottom.png delete mode 100755 RadioTuner/images/bt_next.png delete mode 100755 RadioTuner/images/bt_next_down.png delete mode 100755 RadioTuner/images/bt_prev.png delete mode 100755 RadioTuner/images/bt_prev_down.png delete mode 100755 RadioTuner/images/bt_rdsname_arrow.png delete mode 100644 RadioTuner/images/high_tick.png delete mode 100644 RadioTuner/images/low_tick.png delete mode 100644 RadioTuner/images/medium_tick.png delete mode 100644 RadioTuner/images/placeholder_n900_bar.png delete mode 100755 RadioTuner/images/scala_bg.png delete mode 100755 RadioTuner/images/scala_glass.png delete mode 100755 RadioTuner/images/scala_needle.png delete mode 100755 RadioTuner/images/scala_rdslabel.png delete mode 100755 RadioTuner/images/scala_ticks.png delete mode 100755 RadioTuner/images/top.png create mode 100755 RadioTuner/main_n900.qml create mode 100755 RadioTuner/main_s60.qml create mode 100755 RadioTuner/radiotuner.desktop create mode 100644 RadioTuner/radiotuner.pro delete mode 100644 RadioTuner/rangemodel.js diff --git a/RadioTuner/LICENSE.BSD b/RadioTuner/LICENSE.BSD new file mode 100644 index 0000000..13f338b --- /dev/null +++ b/RadioTuner/LICENSE.BSD @@ -0,0 +1,32 @@ +Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +All rights reserved. +Contact: Nokia Corporation (qt-info@nokia.com) + +"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." diff --git a/RadioTuner/README.rtf b/RadioTuner/README.rtf deleted file mode 100644 index 3891a00..0000000 --- a/RadioTuner/README.rtf +++ /dev/null @@ -1,7 +0,0 @@ -{\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 deleted file mode 100644 index e6974ef..0000000 --- a/RadioTuner/RadioModel.qml +++ /dev/null @@ -1,5 +0,0 @@ -import Qt 4.7 - -ListModel { - id: radioModel - } diff --git a/RadioTuner/RadioTuner.qml b/RadioTuner/RadioTuner.qml deleted file mode 100644 index 39db455..0000000 --- a/RadioTuner/RadioTuner.qml +++ /dev/null @@ -1,145 +0,0 @@ -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 deleted file mode 100644 index 86a5669..0000000 --- a/RadioTuner/RadioTuner.qmlproject +++ /dev/null @@ -1,16 +0,0 @@ -// 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 deleted file mode 100644 index 4ce6e37..0000000 --- a/RadioTuner/RangeStation.qml +++ /dev/null @@ -1,69 +0,0 @@ -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 deleted file mode 100644 index c979c17..0000000 --- a/RadioTuner/StationsModel.qml +++ /dev/null @@ -1,77 +0,0 @@ -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/build/build.pro b/RadioTuner/build/build.pro new file mode 100644 index 0000000..a0c6a18 --- /dev/null +++ b/RadioTuner/build/build.pro @@ -0,0 +1,17 @@ +TEMPLATE = app +TARGET = radiotuner + +QT += declarative + +symbian { + LIBS += -lesock -lconnmon -lcone -lavkon + + TARGET.UID3 = 0xe3431593 + TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 + + DEPLOYMENT.installer_header = 0xA000D7CE +} + +SOURCES += main.cpp + +RESOURCES += resource.qrc diff --git a/RadioTuner/build/debian/changelog b/RadioTuner/build/debian/changelog new file mode 100644 index 0000000..16f5a75 --- /dev/null +++ b/RadioTuner/build/debian/changelog @@ -0,0 +1,5 @@ +radiotuner (0.1-1) unstable; urgency=low + + * Initial release + + -- Adriano Rezende Thu, 25 Nov 2010 10:37:30 -0300 diff --git a/RadioTuner/build/debian/compat b/RadioTuner/build/debian/compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/RadioTuner/build/debian/compat @@ -0,0 +1 @@ +5 diff --git a/RadioTuner/build/debian/control b/RadioTuner/build/debian/control new file mode 100644 index 0000000..f24ba17 --- /dev/null +++ b/RadioTuner/build/debian/control @@ -0,0 +1,13 @@ +Source: radiotuner +Section: user/Other +Priority: extra +Maintainer: Adriano Rezende +Build-Depends: debhelper (>= 5), libqt4-experimental-dev +Standards-Version: 3.8.4 + +Package: radiotuner +Section: user/Other +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Radio Tuner + Qt Quick demo. diff --git a/RadioTuner/build/debian/rules b/RadioTuner/build/debian/rules new file mode 100755 index 0000000..f62b045 --- /dev/null +++ b/RadioTuner/build/debian/rules @@ -0,0 +1,19 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 + +DEB_BUILDDIR = debian/builddeb +DEB_QMAKE_ARGS = $(CURDIR)/build.pro + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/qmake.mk + +clear:: + rm -fr $(DEB_BUILDDIR) diff --git a/RadioTuner/build/main.cpp b/RadioTuner/build/main.cpp new file mode 100644 index 0000000..c766754 --- /dev/null +++ b/RadioTuner/build/main.cpp @@ -0,0 +1,36 @@ +#include +#include +#include + +#ifdef Q_OS_SYMBIAN +#include +#include +#endif + + +int main(int argc, char **argv) +{ + QApplication app(argc, argv); + +#ifdef Q_OS_SYMBIAN + // lock portrait mode for symbian + CAknAppUi *akn = dynamic_cast(CEikonEnv::Static()->AppUi()); + TRAPD(error, if (akn) akn->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape); ); +#endif + + QDeclarativeView view; +#ifdef Q_OS_SYMBIAN + view.setSource(QUrl("qrc:main_s60.qml")); +#else + view.setSource(QUrl("qrc:main_n900.qml")); +#endif + QObject::connect(view.engine(), SIGNAL(quit()), qApp, SLOT(quit())); + +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) + view.showFullScreen(); +#else + view.show(); +#endif + + return app.exec(); +} diff --git a/RadioTuner/build/mainwindow.cpp b/RadioTuner/build/mainwindow.cpp new file mode 100644 index 0000000..0fd7157 --- /dev/null +++ b/RadioTuner/build/mainwindow.cpp @@ -0,0 +1,39 @@ +#include "mainwindow.h" + +#include +#include + +#if defined(Q_OS_SYMBIAN) +#include +#include +#include +#include +#endif + +MainWindow::MainWindow() + : QDeclarativeView(), + m_isPortrait(false) +{ + setSource(QUrl::fromLocalFile("c://data/radiotuner/main_s60.qml")); + + QObject::connect(engine(), SIGNAL(quit()), qApp, SLOT(quit())); + +#if defined(Q_OS_SYMBIAN) + QTimer::singleShot(0, this, SLOT(lockViewMode())); +#endif +} + +#if defined(Q_OS_SYMBIAN) +void MainWindow::lockViewMode() +{ + CAknAppUi *aknAppUi = dynamic_cast(CEikonEnv::Static()->AppUi()); + + if (!aknAppUi) + return; + + if (m_isPortrait) + aknAppUi->SetOrientationL(CAknAppUi::EAppUiOrientationPortrait); + else + aknAppUi->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape); +} +#endif diff --git a/RadioTuner/build/mainwindow.h b/RadioTuner/build/mainwindow.h new file mode 100644 index 0000000..8e92912 --- /dev/null +++ b/RadioTuner/build/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +class MainWindow : public QDeclarativeView +{ + Q_OBJECT + +public: + MainWindow(); + +protected slots: +#ifdef Q_OS_SYMBIAN + void lockViewMode(); +#endif + +private: + bool m_isPortrait; +}; + +#endif diff --git a/RadioTuner/build/resource.qrc b/RadioTuner/build/resource.qrc new file mode 100644 index 0000000..5cf653c --- /dev/null +++ b/RadioTuner/build/resource.qrc @@ -0,0 +1,43 @@ + + + ../content/RadioTuner.qml + ../content/rangemodel.js + ../content/RangeStation.qml + ../content/images/n900/close.png + ../content/images/n900/bt_next_down.png + ../content/images/n900/medium_tick.png + ../content/images/n900/low_tick.png + ../content/images/n900/bt_prev_down.png + ../content/images/n900/scala_glass.png + ../content/images/n900/scala_ticks.png + ../content/images/n900/bt_next.png + ../content/images/n900/top.png + ../content/images/n900/scala_bg.png + ../content/images/n900/bt_prev.png + ../content/images/n900/bt_rdsname_arrow.png + ../content/images/n900/high_tick.png + ../content/images/n900/bottom.png + ../content/images/n900/scala_rdslabel.png + ../content/images/n900/scala_needle.png + ../content/images/s60/close.png + ../content/images/s60/bt_next_down.png + ../content/images/s60/medium_tick.png + ../content/images/s60/low_tick.png + ../content/images/s60/bt_prev_down.png + ../content/images/s60/scala_glass.png + ../content/images/s60/scala_ticks.png + ../content/images/s60/bt_next.png + ../content/images/s60/top.png + ../content/images/s60/scala_bg.png + ../content/images/s60/bt_prev.png + ../content/images/s60/bt_rdsname_arrow.png + ../content/images/s60/high_tick.png + ../content/images/s60/bottom.png + ../content/images/s60/scala_rdslabel.png + ../content/images/s60/scala_needle.png + ../content/RadioModel.qml + ../content/StationsModel.qml + ../main_s60.qml + ../main_n900.qml + + diff --git a/RadioTuner/content/RadioModel.qml b/RadioTuner/content/RadioModel.qml new file mode 100755 index 0000000..1dccbab --- /dev/null +++ b/RadioTuner/content/RadioModel.qml @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** This file is part of RadioTuner +** +** 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 + +ListModel { + id: radioModel +} diff --git a/RadioTuner/content/RadioTuner.qml b/RadioTuner/content/RadioTuner.qml new file mode 100755 index 0000000..fcc6f8c --- /dev/null +++ b/RadioTuner/content/RadioTuner.qml @@ -0,0 +1,202 @@ +/**************************************************************************** +** +** This file is part of RadioTuner +** +** 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 "rangemodel.js" as RangeFunctions + +Item { + id: root + + property real scaleFactor: root.width/800.0; + + StationsModel { + id: stationsModel + } + + Image { + id: bottomBar + source: folder+"bottom.png" + anchors.bottom: root.bottom + + Text { + id: stationName + anchors.top: parent.top + anchors.horizontalCenter: parent.horizontalCenter + anchors.topMargin: 16 * scaleFactor + color: "#ffffff" + styleColor: "#ffffff" + font.family: "Nokia Sans" + font.pixelSize: 35 * scaleFactor + } + + Text { + id: stationDial + anchors.top: stationName.bottom + anchors.horizontalCenter: parent.horizontalCenter + anchors.topMargin: -6 * scaleFactor + color: "#eaeaeb" + styleColor: "#eaeaeb" + font.family: "Nokia Sans" + font.pixelSize: 25 * scaleFactor + } + } + + Image { + id: topBar + source: folder+"top.png" + anchors.bottom: tunerBg.top + } + + Image { + id: tunerBg + source: folder+"scala_bg.png" + anchors.bottom: bottomBar.top + anchors.left: buttonPrevious.right + } + + ListModel{ + id: listModelExample + } + + + ListView { + id: radioList + anchors.fill: tunerBg + anchors.leftMargin: -15 * scaleFactor + orientation: "Horizontal" + model: RangeFunctions.createModel(stationsModel, listModelExample) + delegate: scaleDelegate + highlightMoveSpeed: -1 + highlightRangeMode: "StrictlyEnforceRange" + + onCurrentIndexChanged: { + var index = RangeFunctions.getCenterIndex(currentIndex); + + if (index >= 0 && index < radioList.model.count) { + var model = radioList.model.get(index); + if (model.stationName) { + stationName.text = model.stationName; + stationDial.text = model.station; + } + } + } + } + + Component { + id: scaleDelegate + RangeStation { + width: parseInt(29 * scaleFactor) + height: 264 * scaleFactor + stationRange: model.stationRange + kind: model.kind + station: model.station + stationName: model.stationName + } + } + + Image { + id: buttonNext + anchors.bottom: bottomBar.top + anchors.left: tunerBg.right + source: folder+"bt_next.png" + + MouseArea { + anchors.fill: parent + onClicked: { + var index = RangeFunctions.getNextStation(radioList); + if (index >= 0) + radioList.currentIndex = index; + } + } + } + + Image { + id: buttonPrevious + anchors.bottom: bottomBar.top + anchors.left: parent.left + source: folder+"bt_prev.png" + + MouseArea { + anchors.fill: parent + onClicked: { + var index = RangeFunctions.getPreviousStation(radioList); + if (index >= 0) + radioList.currentIndex = index; + } + } + } + + Image { + anchors.top: tunerBg.top + anchors.left: tunerBg.left + source: folder+"scala_glass.png" + } + + Image { + anchors.bottom: bottomBar.top + anchors.horizontalCenter: tunerBg.horizontalCenter + source: folder+"scala_needle.png" + } + + Component.onCompleted: { + var station = RangeFunctions.getStation(0); + + if (station) { + stationName.text = station.name; + stationDial.text = station.dial; + radioList.currentIndex = station.centerIndex; + } + + radioList.highlightMoveSpeed = 1000; + } + + Image { + id: bt_close + anchors.top: parent.top + anchors.right: parent.right + source: folder + "close.png" + + MouseArea { + anchors.fill: parent + onClicked: Qt.quit() + } + } +} diff --git a/RadioTuner/content/RangeStation.qml b/RadioTuner/content/RangeStation.qml new file mode 100755 index 0000000..8d1f91a --- /dev/null +++ b/RadioTuner/content/RangeStation.qml @@ -0,0 +1,105 @@ +/**************************************************************************** +** +** This file is part of RadioTuner +** +** 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: range + property string kind + property real station + property real stationRange + property string stationName + + onKindChanged: { + if (kind == "high") + background.source = folder+"high_tick.png"; + else if (kind == "medium") + background.source = folder+"medium_tick.png"; + else if (kind == "low") + background.source = folder+"low_tick.png"; + else + background.source = ""; + } + + Image { + id: background + anchors.bottom: bgText.bottom + anchors.horizontalCenter: parent.horizontalCenter + } + + Image { + id: bgText + visible: (stationName != "") + source: folder+"scala_rdslabel.png" + anchors.horizontalCenter: parent.horizontalCenter + + Text { + id: name + text: stationName + anchors.fill: parent + anchors.topMargin: 220 * scaleFactor + anchors.leftMargin: -1 * scaleFactor + horizontalAlignment: Text.AlignLeft + color: "#514C4A" + font.family: "Nokia Sans" + font.pixelSize: 23 * scaleFactor + + transform: Rotation { + id: textRotation + origin.x: 0 + origin.y: 0 + angle: 270 + } + } + } + + Text { + id: rangeText + x: -10 * scaleFactor + width: 50 * scaleFactor + text: parseInt(stationRange) + color: "#000000" + font.family: "Nokia Sans" + font.pixelSize: 25 * scaleFactor + horizontalAlignment: "AlignHCenter" + visible: (kind == "high") + } +} diff --git a/RadioTuner/content/StationsModel.qml b/RadioTuner/content/StationsModel.qml new file mode 100755 index 0000000..46fcf01 --- /dev/null +++ b/RadioTuner/content/StationsModel.qml @@ -0,0 +1,118 @@ +/**************************************************************************** +** +** This file is part of RadioTuner +** +** 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 + +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/content/images/n900/bottom.png b/RadioTuner/content/images/n900/bottom.png new file mode 100755 index 0000000..854266d Binary files /dev/null and b/RadioTuner/content/images/n900/bottom.png differ diff --git a/RadioTuner/content/images/n900/bt_next.png b/RadioTuner/content/images/n900/bt_next.png new file mode 100755 index 0000000..8951976 Binary files /dev/null and b/RadioTuner/content/images/n900/bt_next.png differ diff --git a/RadioTuner/content/images/n900/bt_next_down.png b/RadioTuner/content/images/n900/bt_next_down.png new file mode 100755 index 0000000..1a476df Binary files /dev/null and b/RadioTuner/content/images/n900/bt_next_down.png differ diff --git a/RadioTuner/content/images/n900/bt_prev.png b/RadioTuner/content/images/n900/bt_prev.png new file mode 100755 index 0000000..754f9e9 Binary files /dev/null and b/RadioTuner/content/images/n900/bt_prev.png differ diff --git a/RadioTuner/content/images/n900/bt_prev_down.png b/RadioTuner/content/images/n900/bt_prev_down.png new file mode 100755 index 0000000..1e0d353 Binary files /dev/null and b/RadioTuner/content/images/n900/bt_prev_down.png differ diff --git a/RadioTuner/content/images/n900/bt_rdsname_arrow.png b/RadioTuner/content/images/n900/bt_rdsname_arrow.png new file mode 100755 index 0000000..62a85ec Binary files /dev/null and b/RadioTuner/content/images/n900/bt_rdsname_arrow.png differ diff --git a/RadioTuner/content/images/n900/close.png b/RadioTuner/content/images/n900/close.png new file mode 100755 index 0000000..e86141a Binary files /dev/null and b/RadioTuner/content/images/n900/close.png differ diff --git a/RadioTuner/content/images/n900/high_tick.png b/RadioTuner/content/images/n900/high_tick.png new file mode 100755 index 0000000..6f966c6 Binary files /dev/null and b/RadioTuner/content/images/n900/high_tick.png differ diff --git a/RadioTuner/content/images/n900/low_tick.png b/RadioTuner/content/images/n900/low_tick.png new file mode 100755 index 0000000..f4aa2c1 Binary files /dev/null and b/RadioTuner/content/images/n900/low_tick.png differ diff --git a/RadioTuner/content/images/n900/medium_tick.png b/RadioTuner/content/images/n900/medium_tick.png new file mode 100755 index 0000000..f03aa10 Binary files /dev/null and b/RadioTuner/content/images/n900/medium_tick.png differ diff --git a/RadioTuner/content/images/n900/scala_bg.png b/RadioTuner/content/images/n900/scala_bg.png new file mode 100755 index 0000000..3c63cb6 Binary files /dev/null and b/RadioTuner/content/images/n900/scala_bg.png differ diff --git a/RadioTuner/content/images/n900/scala_glass.png b/RadioTuner/content/images/n900/scala_glass.png new file mode 100755 index 0000000..639c2b7 Binary files /dev/null and b/RadioTuner/content/images/n900/scala_glass.png differ diff --git a/RadioTuner/content/images/n900/scala_needle.png b/RadioTuner/content/images/n900/scala_needle.png new file mode 100755 index 0000000..3a14938 Binary files /dev/null and b/RadioTuner/content/images/n900/scala_needle.png differ diff --git a/RadioTuner/content/images/n900/scala_rdslabel.png b/RadioTuner/content/images/n900/scala_rdslabel.png new file mode 100755 index 0000000..a2ec211 Binary files /dev/null and b/RadioTuner/content/images/n900/scala_rdslabel.png differ diff --git a/RadioTuner/content/images/n900/scala_ticks.png b/RadioTuner/content/images/n900/scala_ticks.png new file mode 100755 index 0000000..0e8dc81 Binary files /dev/null and b/RadioTuner/content/images/n900/scala_ticks.png differ diff --git a/RadioTuner/content/images/n900/top.png b/RadioTuner/content/images/n900/top.png new file mode 100755 index 0000000..cdf855f Binary files /dev/null and b/RadioTuner/content/images/n900/top.png differ diff --git a/RadioTuner/content/images/s60/bottom.png b/RadioTuner/content/images/s60/bottom.png new file mode 100755 index 0000000..1c71e2e Binary files /dev/null and b/RadioTuner/content/images/s60/bottom.png differ diff --git a/RadioTuner/content/images/s60/bt_next.png b/RadioTuner/content/images/s60/bt_next.png new file mode 100755 index 0000000..3d32204 Binary files /dev/null and b/RadioTuner/content/images/s60/bt_next.png differ diff --git a/RadioTuner/content/images/s60/bt_next_down.png b/RadioTuner/content/images/s60/bt_next_down.png new file mode 100755 index 0000000..a1349c5 Binary files /dev/null and b/RadioTuner/content/images/s60/bt_next_down.png differ diff --git a/RadioTuner/content/images/s60/bt_prev.png b/RadioTuner/content/images/s60/bt_prev.png new file mode 100755 index 0000000..640b1d2 Binary files /dev/null and b/RadioTuner/content/images/s60/bt_prev.png differ diff --git a/RadioTuner/content/images/s60/bt_prev_down.png b/RadioTuner/content/images/s60/bt_prev_down.png new file mode 100755 index 0000000..6760442 Binary files /dev/null and b/RadioTuner/content/images/s60/bt_prev_down.png differ diff --git a/RadioTuner/content/images/s60/bt_rdsname_arrow.png b/RadioTuner/content/images/s60/bt_rdsname_arrow.png new file mode 100755 index 0000000..d4ecb5f Binary files /dev/null and b/RadioTuner/content/images/s60/bt_rdsname_arrow.png differ diff --git a/RadioTuner/content/images/s60/close.png b/RadioTuner/content/images/s60/close.png new file mode 100755 index 0000000..5054c33 Binary files /dev/null and b/RadioTuner/content/images/s60/close.png differ diff --git a/RadioTuner/content/images/s60/high_tick.png b/RadioTuner/content/images/s60/high_tick.png new file mode 100755 index 0000000..b7af7e0 Binary files /dev/null and b/RadioTuner/content/images/s60/high_tick.png differ diff --git a/RadioTuner/content/images/s60/low_tick.png b/RadioTuner/content/images/s60/low_tick.png new file mode 100755 index 0000000..b98d3cc Binary files /dev/null and b/RadioTuner/content/images/s60/low_tick.png differ diff --git a/RadioTuner/content/images/s60/medium_tick.png b/RadioTuner/content/images/s60/medium_tick.png new file mode 100755 index 0000000..93bcbf2 Binary files /dev/null and b/RadioTuner/content/images/s60/medium_tick.png differ diff --git a/RadioTuner/content/images/s60/scala_bg.png b/RadioTuner/content/images/s60/scala_bg.png new file mode 100755 index 0000000..e1e6035 Binary files /dev/null and b/RadioTuner/content/images/s60/scala_bg.png differ diff --git a/RadioTuner/content/images/s60/scala_glass.png b/RadioTuner/content/images/s60/scala_glass.png new file mode 100755 index 0000000..e8d6398 Binary files /dev/null and b/RadioTuner/content/images/s60/scala_glass.png differ diff --git a/RadioTuner/content/images/s60/scala_needle.png b/RadioTuner/content/images/s60/scala_needle.png new file mode 100755 index 0000000..537270e Binary files /dev/null and b/RadioTuner/content/images/s60/scala_needle.png differ diff --git a/RadioTuner/content/images/s60/scala_rdslabel.png b/RadioTuner/content/images/s60/scala_rdslabel.png new file mode 100755 index 0000000..7105393 Binary files /dev/null and b/RadioTuner/content/images/s60/scala_rdslabel.png differ diff --git a/RadioTuner/content/images/s60/scala_ticks.png b/RadioTuner/content/images/s60/scala_ticks.png new file mode 100755 index 0000000..09a733a Binary files /dev/null and b/RadioTuner/content/images/s60/scala_ticks.png differ diff --git a/RadioTuner/content/images/s60/top.png b/RadioTuner/content/images/s60/top.png new file mode 100755 index 0000000..ae15ff3 Binary files /dev/null and b/RadioTuner/content/images/s60/top.png differ diff --git a/RadioTuner/content/rangemodel.js b/RadioTuner/content/rangemodel.js new file mode 100755 index 0000000..bf99c98 --- /dev/null +++ b/RadioTuner/content/rangemodel.js @@ -0,0 +1,119 @@ +/**************************************************************************** +** +** This file is part of RadioTuner +** +** 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 middleRange = 11; +var startRange = 860; +var finalRange = 1050; +var stations = []; +var currentStation = 0; + + +function createModel(stationsModel, listModelExample) +{ + //var component = Qt.createComponent("RadioModel.qml"); + //var model = component.createObject(root); + + var model = listModelExample; + + var stationNames = []; + for (var i = 0; i < stationsModel.count; i++) { + var item = stationsModel.get(i); + stationNames[item.dial] = item.name; + } + + var k = 0; + for (var i = startRange; i <= finalRange; i++, k++) { + var range = i / 10.0; + var kind = ((i % 10 == 0) ? "high" : (i % 5 == 0) ? "medium" : "low"); + + if (range in stationNames) { + var station = new Object(); + station.index = k; + station.centerIndex = k - middleRange; + station.dial = range; + station.name = stationNames[range]; + stations.push(station); + + model.append({stationRange: range, kind: kind, station: station.dial, stationName: station.name}); + } else { + model.append({stationRange: range, kind: kind, station: -1, stationName: ""}); + } + } + + return model; +} + +function getStation(index) +{ + return stations[index]; +} + +function getCenterIndex(currentIndex) +{ + return currentIndex + middleRange; +} + +function getNextStation(radiosList) +{ + var model = radiosList.model; + var currentIndex = getCenterIndex(radiosList.currentIndex); + + var total = model.count; + for (var i = currentIndex; i < total; i++) { + if (i != currentIndex && model.get(i).station >= 0) + return i - middleRange; + } + + return -1; +} + +function getPreviousStation(radiosList) +{ + var model = radiosList.model; + var currentIndex = getCenterIndex(radiosList.currentIndex); + + for (var i = currentIndex; i >= 0; i--) { + if (i != currentIndex && model.get(i).station >= 0) + return i - middleRange; + } + + return -1; +} diff --git a/RadioTuner/debian/changelog b/RadioTuner/debian/changelog new file mode 100755 index 0000000..630283b --- /dev/null +++ b/RadioTuner/debian/changelog @@ -0,0 +1,5 @@ +radiotuner (1.0-maemo1) unstable; urgency=low + + * Initial release. + + -- Anselmo Lacerda S. de Melo Fri, 16 Aug 2010 10:20:34 -0300 diff --git a/RadioTuner/debian/compat b/RadioTuner/debian/compat new file mode 100755 index 0000000..7ed6ff8 --- /dev/null +++ b/RadioTuner/debian/compat @@ -0,0 +1 @@ +5 diff --git a/RadioTuner/debian/control b/RadioTuner/debian/control new file mode 100755 index 0000000..5af8b26 --- /dev/null +++ b/RadioTuner/debian/control @@ -0,0 +1,12 @@ +Source: radiotuner +Section: user/apps +Priority: optional +Maintainer: Anselmo Lacerda S. de Melo +Build-Depends: debhelper (>= 4) +Standards-Version: 3.8.1 + +Package: radiotuner +Architecture: any +Depends: libqt4-declarative +Maemo-Display-Name: RadioTuner +Description: radiotuner diff --git a/RadioTuner/debian/copyright b/RadioTuner/debian/copyright new file mode 100644 index 0000000..1205881 --- /dev/null +++ b/RadioTuner/debian/copyright @@ -0,0 +1,44 @@ +This package was debianized by Anselmo Melo on +Tue, 24 Aug 2010 11:08:33 -0300. + +Upstream Author: Ian Andrade + +Copyright: 2010 Nokia Corporation and/or its subsidiary(-ies). + All rights reserved. + Contact: Nokia Corporation (qt-info@nokia.com) + +License: + 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." + + +The Debian packaging is (C) 2010, Anselmo Melo and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. diff --git a/RadioTuner/debian/rules b/RadioTuner/debian/rules new file mode 100755 index 0000000..38067b9 --- /dev/null +++ b/RadioTuner/debian/rules @@ -0,0 +1,43 @@ +#!/usr/bin/make -f + +configure: + dh_testdir + +build: build-stamp + /usr/bin/qmake + make + +build-stamp: configure + dh_testdir + +clean: + dh_testdir + dh_testroot + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + install -D -m 755 $(CURDIR)/build/radiotuner $(CURDIR)/debian/radiotuner/usr/bin/radiotuner + install -D -m 644 $(CURDIR)/radiotuner.desktop $(CURDIR)/debian/radiotuner/usr/share/applications/hildon/radiotuner.desktop + install -D -m 644 $(CURDIR)/icons/radiotuner.png $(CURDIR)/debian/radiotuner/usr/share/pixmaps/radiotuner.png + +binary-indep: build install + +binary-arch: build install + dh_testdir + dh_testroot + dh_link + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/RadioTuner/icons/radiotuner.png b/RadioTuner/icons/radiotuner.png new file mode 100755 index 0000000..cd582c2 Binary files /dev/null and b/RadioTuner/icons/radiotuner.png differ diff --git a/RadioTuner/icons/radiotuner.svg b/RadioTuner/icons/radiotuner.svg new file mode 100755 index 0000000..ce5099b --- /dev/null +++ b/RadioTuner/icons/radiotuner.svg @@ -0,0 +1,372 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RadioTuner/images/.DS_Store b/RadioTuner/images/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/RadioTuner/images/.DS_Store and /dev/null differ diff --git a/RadioTuner/images/bottom.png b/RadioTuner/images/bottom.png deleted file mode 100755 index 854266d..0000000 Binary files a/RadioTuner/images/bottom.png and /dev/null differ diff --git a/RadioTuner/images/bt_next.png b/RadioTuner/images/bt_next.png deleted file mode 100755 index 8951976..0000000 Binary files a/RadioTuner/images/bt_next.png and /dev/null differ diff --git a/RadioTuner/images/bt_next_down.png b/RadioTuner/images/bt_next_down.png deleted file mode 100755 index 1a476df..0000000 Binary files a/RadioTuner/images/bt_next_down.png and /dev/null differ diff --git a/RadioTuner/images/bt_prev.png b/RadioTuner/images/bt_prev.png deleted file mode 100755 index 754f9e9..0000000 Binary files a/RadioTuner/images/bt_prev.png and /dev/null differ diff --git a/RadioTuner/images/bt_prev_down.png b/RadioTuner/images/bt_prev_down.png deleted file mode 100755 index 1e0d353..0000000 Binary files a/RadioTuner/images/bt_prev_down.png and /dev/null differ diff --git a/RadioTuner/images/bt_rdsname_arrow.png b/RadioTuner/images/bt_rdsname_arrow.png deleted file mode 100755 index 62a85ec..0000000 Binary files a/RadioTuner/images/bt_rdsname_arrow.png and /dev/null differ diff --git a/RadioTuner/images/high_tick.png b/RadioTuner/images/high_tick.png deleted file mode 100644 index 6f966c6..0000000 Binary files a/RadioTuner/images/high_tick.png and /dev/null differ diff --git a/RadioTuner/images/low_tick.png b/RadioTuner/images/low_tick.png deleted file mode 100644 index f4aa2c1..0000000 Binary files a/RadioTuner/images/low_tick.png and /dev/null differ diff --git a/RadioTuner/images/medium_tick.png b/RadioTuner/images/medium_tick.png deleted file mode 100644 index f03aa10..0000000 Binary files a/RadioTuner/images/medium_tick.png and /dev/null differ diff --git a/RadioTuner/images/placeholder_n900_bar.png b/RadioTuner/images/placeholder_n900_bar.png deleted file mode 100644 index ae34d72..0000000 Binary files a/RadioTuner/images/placeholder_n900_bar.png and /dev/null differ diff --git a/RadioTuner/images/scala_bg.png b/RadioTuner/images/scala_bg.png deleted file mode 100755 index 3c63cb6..0000000 Binary files a/RadioTuner/images/scala_bg.png and /dev/null differ diff --git a/RadioTuner/images/scala_glass.png b/RadioTuner/images/scala_glass.png deleted file mode 100755 index 639c2b7..0000000 Binary files a/RadioTuner/images/scala_glass.png and /dev/null differ diff --git a/RadioTuner/images/scala_needle.png b/RadioTuner/images/scala_needle.png deleted file mode 100755 index 3a14938..0000000 Binary files a/RadioTuner/images/scala_needle.png and /dev/null differ diff --git a/RadioTuner/images/scala_rdslabel.png b/RadioTuner/images/scala_rdslabel.png deleted file mode 100755 index a2ec211..0000000 Binary files a/RadioTuner/images/scala_rdslabel.png and /dev/null differ diff --git a/RadioTuner/images/scala_ticks.png b/RadioTuner/images/scala_ticks.png deleted file mode 100755 index 0e8dc81..0000000 Binary files a/RadioTuner/images/scala_ticks.png and /dev/null differ diff --git a/RadioTuner/images/top.png b/RadioTuner/images/top.png deleted file mode 100755 index defa47c..0000000 Binary files a/RadioTuner/images/top.png and /dev/null differ diff --git a/RadioTuner/main_n900.qml b/RadioTuner/main_n900.qml new file mode 100755 index 0000000..7bd67fc --- /dev/null +++ b/RadioTuner/main_n900.qml @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** This file is part of RadioTuner +** +** 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 "content" + +RadioTuner { + property string folder: "images/n900/"; + + width: 800 + height: 480 +} diff --git a/RadioTuner/main_s60.qml b/RadioTuner/main_s60.qml new file mode 100755 index 0000000..f57dc20 --- /dev/null +++ b/RadioTuner/main_s60.qml @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** This file is part of RadioTuner +** +** 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 "content" + +RadioTuner { + property string folder: "images/s60/"; + + width: 640 + height: 360 +} diff --git a/RadioTuner/radiotuner.desktop b/RadioTuner/radiotuner.desktop new file mode 100755 index 0000000..77beeb4 --- /dev/null +++ b/RadioTuner/radiotuner.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Name=Radio Tuner +Categories=Applications +Exec=/usr/bin/radiotuner +Icon=radiotuner +X-Icon-path=/usr/share/pixmaps/ +X-Osso-Type=application/x-executable diff --git a/RadioTuner/radiotuner.pro b/RadioTuner/radiotuner.pro new file mode 100644 index 0000000..5d88636 --- /dev/null +++ b/RadioTuner/radiotuner.pro @@ -0,0 +1,2 @@ +TEMPLATE = subdirs +SUBDIRS = build diff --git a/RadioTuner/rangemodel.js b/RadioTuner/rangemodel.js deleted file mode 100644 index 88aa557..0000000 --- a/RadioTuner/rangemodel.js +++ /dev/null @@ -1,93 +0,0 @@ -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); -} - -- cgit v1.2.3