aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBramastyo Harimukti <bramastyo.harimukti.santoso@pelagicore.com>2019-01-31 15:54:12 +0100
committerBramastyo Harimukti Santoso <bramastyo.harimukti.santoso@pelagicore.com>2019-01-31 18:19:43 +0000
commit7f2d0f025fdb493bb0109011116ead2c52c64ac0 (patch)
tree2a2bae54ac1388f74ed7e9a291bc05d807465164
parentf6e8b7191736f786c8bf39636540650170d2ac6c (diff)
[tuner] some clean-ups and bring back the tuner slider
Change-Id: Idf301a18366c5e11052ac48e9d6c6e66a8550c79 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
-rw-r--r--apps/com.pelagicore.tuner/Main.qml57
-rw-r--r--apps/com.pelagicore.tuner/views/FullScreenBottomView.qml6
2 files changed, 24 insertions, 39 deletions
diff --git a/apps/com.pelagicore.tuner/Main.qml b/apps/com.pelagicore.tuner/Main.qml
index 99b398e4..df178d8e 100644
--- a/apps/com.pelagicore.tuner/Main.qml
+++ b/apps/com.pelagicore.tuner/Main.qml
@@ -42,46 +42,25 @@ import "views" 1.0
import shared.Style 1.0
import shared.Sizes 1.0
-QtObject {
- property var mainWindow: ApplicationCCWindow {
- id: mainWindow
+ApplicationCCWindow {
+ id: root
- MultiPointTouchArea {
- id: multiPoint
- anchors.fill: parent
- anchors.margins: 30
- touchPoints: [ TouchPoint { id: touchPoint1 } ]
-
- property int count: 0
- onReleased: {
- count += 1;
- mainWindow.setWindowProperty("activationCount", count);
- }
- }
-
- ScalableBorderImage {
-
- x: mainWindow.exposedRect.x
- y: mainWindow.exposedRect.y - Sizes.dp(224)
- width: mainWindow.exposedRect.width
- height: tunerAppContent.fullscreenTopHeight + mainWindow.exposedRect.y - y
- border.top: sourceSize.height - Sizes.dp(1)
-
- opacity: (mainWindow.neptuneState === "Maximized") ? 1.0 : 0.0
- Behavior on opacity { DefaultNumberAnimation {} }
- visible: opacity > 0
-
- source: Style.image("app-fullscreen-top-bg")
- }
+ Image {
+ x: root.exposedRect.x
+ y: root.exposedRect.y - Sizes.dp(224)
+ width: root.exposedRect.width
+ height: tunerAppContent.fullscreenTopHeight + root.exposedRect.y - y
+ source: Style.image("app-fullscreen-top-bg")
+ asynchronous: true
+ }
- TunerView {
- id: tunerAppContent
- x: mainWindow.exposedRect.x
- y: mainWindow.exposedRect.y
- width: mainWindow.exposedRect.width
- height: mainWindow.exposedRect.height
- rootItem: mainWindow.contentItem
- store: TunerStore { }
- }
+ TunerView {
+ id: tunerAppContent
+ x: root.exposedRect.x
+ y: root.exposedRect.y
+ width: root.exposedRect.width
+ height: root.exposedRect.height
+ rootItem: root.contentItem
+ store: TunerStore { }
}
}
diff --git a/apps/com.pelagicore.tuner/views/FullScreenBottomView.qml b/apps/com.pelagicore.tuner/views/FullScreenBottomView.qml
index 7a265c74..7290453c 100644
--- a/apps/com.pelagicore.tuner/views/FullScreenBottomView.qml
+++ b/apps/com.pelagicore.tuner/views/FullScreenBottomView.qml
@@ -64,6 +64,12 @@ Item {
musicSourcesPopup.originItemX = pos.x;
musicSourcesPopup.originItemY = pos.y;
musicSourcesPopup.visible = true;
+ } else if (currentText === "FM 1 band") {
+ root.store.freqPresets = 1;
+ } else if (currentText === "FM 2 band") {
+ root.store.freqPresets = 2;
+ } else if (currentText === "AM band") {
+ root.store.freqPresets = 0;
}
}
}