diff options
author | Robert Griebl <robert.griebl@pelagicore.com> | 2017-02-21 17:39:44 +0100 |
---|---|---|
committer | Robert Griebl <robert.griebl@pelagicore.com> | 2017-02-21 17:40:53 +0100 |
commit | d83e05197f7b79f4ce6ec07534fd6ddef1e1d3c8 (patch) | |
tree | 8d9c26d2f481f10897d910cd55f1a7988df53007 | |
parent | 2180a504ec446627467d0e22f5f5c6fb6689c67b (diff) | |
parent | 40e26b22705f1e1ec71edcbc869e9fd9b1cfbe53 (diff) | |
download | neptune-ui-d83e05197f7b79f4ce6ec07534fd6ddef1e1d3c8.tar.gz |
Merge remote-tracking branch 'tqc/master' into 5.8
Having two diverging branches was a mistake in the first place.
Change-Id: I4877a3b78a81a26b9b9804586c4467e3778de0ff
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | apps/com.pelagicore.music/MusicProvider.qml | 13 | ||||
-rw-r--r-- | imports/shared/service/climate/ClimateService.qml | 79 | ||||
-rw-r--r-- | imports/shared/service/climate/ClimateStateMachine.qml | 2 | ||||
-rw-r--r-- | imports/system/models/ApplicationManagerInterface.qml | 7 | ||||
-rw-r--r-- | imports/system/models/VehicleModel.qml | 4 | ||||
-rw-r--r-- | sysui/Climate/AirFlow.qml | 23 | ||||
-rw-r--r-- | sysui/Climate/ClimateBar.qml | 25 | ||||
-rw-r--r-- | sysui/Climate/Ventilation.qml | 9 | ||||
-rw-r--r-- | sysui/Cluster/RightDial.qml | 9 | ||||
-rw-r--r-- | sysui/LaunchController.qml | 2 | ||||
-rw-r--r-- | sysui/dev/MonitorPanel.qml | 2 | ||||
-rw-r--r-- | sysui/dev/SystemMonitor/InfoPanel.qml | 2 |
13 files changed, 93 insertions, 88 deletions
@@ -63,10 +63,6 @@ Which configuration should be used can be controlled using the styleConfig param If the "auto" configuration doesn't work for a specific device a own configuration can be created by copying one of the existing configurations from modules/utils and place it somehwere on the filesystem. The styleConfig parameter in am-config.yaml will be intepreted as file path to a QML file and if available this StyleConfig will be loaded. -# Media - -To get the media used within the Music and Movie app, download the zipped file and place the media.db and media folder inside the home folder. The download link: https://seafile.pelagicore.net/f/3713457142/ - # Common Terms Used In The Project Common terms and their meaning is enumerated below: diff --git a/apps/com.pelagicore.music/MusicProvider.qml b/apps/com.pelagicore.music/MusicProvider.qml index 4089ee4..aa9931f 100644 --- a/apps/com.pelagicore.music/MusicProvider.qml +++ b/apps/com.pelagicore.music/MusicProvider.qml @@ -45,19 +45,22 @@ QtObject { property SqlQueryDataSource nowPlaying: SqlQueryDataSource { database: "media" - query: 'select * from music' + query: 'select distinct * from music order by random()' + onQueryChanged: root.reevaluate() } property int currentIndex: 0 property int count: nowPlaying.count - onCountChanged: { - currentIndex = -1 - currentIndex = 0 - } + property var currentEntry: nowPlaying.get(currentIndex); property url currentSource: nowPlaying.storageLocation + '/media/music/' + currentEntry.source property url currentCover: nowPlaying.storageLocation + '/media/music/' + currentEntry.cover + function reevaluate() { + currentIndex = -1 + currentIndex = 0 + } + function queryAllAlbums() { musicLibrary.query = 'select * from music group by album' } diff --git a/imports/shared/service/climate/ClimateService.qml b/imports/shared/service/climate/ClimateService.qml index ae8ce20..b762ac8 100644 --- a/imports/shared/service/climate/ClimateService.qml +++ b/imports/shared/service/climate/ClimateService.qml @@ -49,17 +49,13 @@ QtObject { property bool heat: climateControl.zoneAt.FrontLeft.seatHeater.value - onValueChanged: climateControl.zoneAt.FrontLeft.targetTemperature.value = value - onHeatChanged: climateControl.zoneAt.FrontLeft.seatHeater.value = heat - } - property Connections leftSeatTargetTempConnections: Connections { - target: climateControl.zoneAt.FrontLeft.targetTemperature - onValueChanged: leftSeat.value = - calculateUnitValue(climateControl.zoneAt.FrontLeft.targetTemperature.value) - } - property Connections leftSeatHeaterConnections: Connections { - target: climateControl.zoneAt.FrontLeft.seatHeater - onValueChanged: leftSeat.heat = climateControl.zoneAt.FrontLeft.seatHeater.value + function setValue(newValue) { + climateControl.zoneAt.FrontLeft.targetTemperature.value = newValue + } + + function setHeat(newHeat) { + climateControl.zoneAt.FrontLeft.seatHeater.value = newHeat + } } property QtObject rightSeat: QtObject { @@ -70,36 +66,39 @@ QtObject { property bool heat: climateControl.zoneAt.FrontRight.seatHeater.value - onValueChanged: climateControl.zoneAt.FrontRight.targetTemperature.value = value - onHeatChanged: climateControl.zoneAt.FrontRight.seatHeater.value = heat - } - property Connections rightSeatTargetTempConnections: Connections { - target: climateControl.zoneAt.FrontRight.targetTemperature - onValueChanged: rightSeat.value = - calculateUnitValue(climateControl.zoneAt.FrontRight.targetTemperature.value) - } - property Connections rightSeatHeaterConnections: Connections { - target: climateControl.zoneAt.FrontRight.seatHeater - onValueChanged: rightSeat.heat = climateControl.zoneAt.FrontRight.seatHeater.value + function setValue(newValue) { + climateControl.zoneAt.FrontRight.targetTemperature.value = newValue + } + + function setHeat(newHeat) { + climateControl.zoneAt.FrontRight.seatHeater.value = newHeat + } } property QtObject frontHeat: QtObject { property string symbol: "front" property bool enabled: true + + function setEnabled(newEnabled) { + enabled = newEnabled; + } } property QtObject rearHeat: QtObject { property string symbol: "rear" property bool enabled: true + + function setEnabled(newEnabled) { + enabled = newEnabled; + } } property QtObject airCondition: QtObject { property string symbol: "ac" property bool enabled: climateControl.airConditioning.value - onEnabledChanged: { - climateControl.airConditioning.value = enabled; - enabled = Qt.binding(function() { return climateControl.airConditioning.value; }); + function setEnabled(newEnabled) { + climateControl.airConditioning.value = newEnabled; } } @@ -107,24 +106,26 @@ QtObject { property string symbol: "air_quality" property bool enabled: climateControl.recirculationMode.value == ClimateControl.RecirculationOn - onEnabledChanged: { - climateControl.recirculationMode.value = enabled ? ClimateControl.RecirculationOn : ClimateControl.RecirculationOff; - enabled = Qt.binding(function() { return climateControl.recirculationMode.value == ClimateControl.RecirculationOn }); + function setEnabled(newEnabled) { + climateControl.recirculationMode.value = newEnabled ? ClimateControl.RecirculationOn : ClimateControl.RecirculationOff; } } property QtObject eco: QtObject { property string symbol: "eco" property bool enabled: false + + function setEnabled(newEnabled) { + enabled = newEnabled; + } } property QtObject steeringWheelHeat: QtObject { property string symbol: "stearing_wheel" property bool enabled: climateControl.steeringWheelHeater.value >= 5 - onEnabledChanged: { - climateControl.steeringWheelHeater.value = enabled ? 10 : 0; - enabled = Qt.binding(function() { return climateControl.steeringWheelHeater.value >= 5 }); + function setEnabled(newEnabled) { + climateControl.steeringWheelHeater.value = newEnabled ? 10 : 0; } } @@ -136,10 +137,18 @@ QtObject { property string tempSuffix: SettingsService.metric ? "°C" : "°F" property int ventilationLevels: 7 // 6 + off (0) - onVentilationChanged: climateControl.fanSpeedLevel.value = ventilation - property Connections fanSpeedLevelConnections: Connections { - target: climateControl.fanSpeedLevel - onValueChanged: ventilation = climateControl.fanSpeedLevel.value + function setVentilation(newVentilation) { + climateControl.fanSpeedLevel.value = newVentilation; + } + + property QtObject airflowDirections: QtObject { + property int directions: climateControl.airflowDirections.value + property var availableDirections: climateControl.airflowDirections.availableValues + onDirectionsChanged: climateControl.airflowDirections.value = directions + } + property Connections airflowDirectionsConnections: Connections { + target: climateControl.airflowDirections + onValueChanged: airflowDirections.directions = climateControl.airflowDirections.value } property QtObject stateMachine: ClimateStateMachine { diff --git a/imports/shared/service/climate/ClimateStateMachine.qml b/imports/shared/service/climate/ClimateStateMachine.qml index 2b36520..bfc9925 100644 --- a/imports/shared/service/climate/ClimateStateMachine.qml +++ b/imports/shared/service/climate/ClimateStateMachine.qml @@ -73,7 +73,7 @@ QtObject { id: airConditionOn onEntered: { climateControl.airConditioning.value = true - steeringWheelHeat.enabled = false + steeringWheelHeat.setEnabled(false) } DSM.SignalTransition { targetState: airConditionOff diff --git a/imports/system/models/ApplicationManagerInterface.qml b/imports/system/models/ApplicationManagerInterface.qml index 5485b5d..2dd32da 100644 --- a/imports/system/models/ApplicationManagerInterface.qml +++ b/imports/system/models/ApplicationManagerInterface.qml @@ -150,8 +150,8 @@ QtObject { //For special windows (cluster, widgets) we don't have a closing anmiation, close them directly if (type === "ivi") { - //If the item is visible the closing application hasn't been played yet and we need to wait until it is finished - if (item.visible) { + //If the item is in the closing state the closing animation hasn't been played yet and we need to wait until it is finished + if (item.state === "closing" ) { itemsToRelease.push(item) root.releaseApplicationSurface(item) } else { @@ -183,10 +183,13 @@ QtObject { var isWidget = (WindowManager.windowProperty(item, "windowType") === "widget") var isMapWidget = (WindowManager.windowProperty(item, "windowType") === "widgetMap") var isClusterWidget = (WindowManager.windowProperty(item, "windowType") === "clusterWidget") + print(":::LaunchController:::isClusterWidget", isClusterWidget) print(":::LaunchController:::isWidget", isWidget, isMapWidget) if (!isMapWidget && !isClusterWidget) { + if (windowTypes[item] === "minimized") + windowTypes[item] = "ivi" WindowManager.setWindowProperty(item, "visibility", true) root.applicationSurfaceReady(item, false) break diff --git a/imports/system/models/VehicleModel.qml b/imports/system/models/VehicleModel.qml index 9f03bd7..fb545eb 100644 --- a/imports/system/models/VehicleModel.qml +++ b/imports/system/models/VehicleModel.qml @@ -81,8 +81,8 @@ QtObject { Behavior on speed { SmoothedAnimation { - velocity: 6 - duration : 5000 + velocity: 8 + duration : 4000 easing.overshoot: 0 } } diff --git a/sysui/Climate/AirFlow.qml b/sysui/Climate/AirFlow.qml index 50d222a..3d23ab7 100644 --- a/sysui/Climate/AirFlow.qml +++ b/sysui/Climate/AirFlow.qml @@ -31,6 +31,8 @@ import QtQuick 2.1 import QtGraphicalEffects 1.0 +import QtIvi.VehicleFunctions 1.0 +import service.climate 1.0 import utils 1.0 UIElement { @@ -42,19 +44,22 @@ UIElement { PathView { id: view + property int directions: ClimateService.airflowDirections.directions + property var availableDirections: ClimateService.airflowDirections.availableDirections + + // currentIndex is updated by dragging items around *and* by explicitly setting it from + // an onClicked() handler, so keeping all the bindings working is tricky. This works. + onDirectionsChanged: currentIndex = availableDirections.indexOf(directions) + Component.onCompleted: currentIndex = availableDirections.indexOf(directions) + onCurrentIndexChanged: ClimateService.airflowDirections.directions = availableDirections[currentIndex] + width: Style.hspan(6) height: Style.vspan(3) anchors.centerIn: parent clip: true - currentIndex: 1 - - model: ListModel { - ListElement { up: 1; down: 0 } - ListElement { up: 0; down: 1 } - ListElement { up: 1; down: 1 } - } + model: availableDirections snapMode: PathView.SnapOneItem preferredHighlightBegin: 0.5 @@ -70,7 +75,7 @@ UIElement { anchors.horizontalCenterOffset: -Style.padding source: Style.symbolXS("arrow") rotation: 90 - visible: model.up + visible: view.availableDirections[index] & ClimateControl.Dashboard } Image { @@ -87,7 +92,7 @@ UIElement { anchors.verticalCenterOffset: 12 source: Style.symbolXS("arrow") rotation: 90 - visible: model.down + visible: view.availableDirections[index] & ClimateControl.Floor } MouseArea { diff --git a/sysui/Climate/ClimateBar.qml b/sysui/Climate/ClimateBar.qml index f391b6c..a300400 100644 --- a/sysui/Climate/ClimateBar.qml +++ b/sysui/Climate/ClimateBar.qml @@ -89,7 +89,7 @@ UIElement { vspan: root.collapsedVspan name: "seat_left" active: ClimateService.leftSeat.heat - onClicked: ClimateService.leftSeat.heat = !active + onClicked: ClimateService.leftSeat.setHeat(!active) anchors.left: tempLevelLeft.right anchors.verticalCenter: parent.verticalCenter } @@ -108,7 +108,7 @@ UIElement { vspan: root.collapsedVspan name: "seat_right" active: ClimateService.rightSeat.heat - onClicked: ClimateService.rightSeat.heat = !active + onClicked: ClimateService.rightSeat.setHeat(!active) anchors.right: tempLevelRight.left anchors.verticalCenter: parent.verticalCenter } @@ -135,7 +135,7 @@ UIElement { maxValue: ClimateService.leftSeat.maxValue value: ClimateService.leftSeat.value stepValue: ClimateService.leftSeat.stepValue - onValueChanged: ClimateService.leftSeat.value = value + onValueChanged: ClimateService.leftSeat.setValue(value) } Spacer { @@ -161,11 +161,7 @@ UIElement { vspan: 2 levels: ClimateService.ventilationLevels currentLevel: ClimateService.ventilation - onCurrentLevelChanged: ClimateService.ventilation = currentLevel - Connections { - target: ClimateService - onVentilationChanged: ventilation.currentLevel = ClimateService.ventilation - } + onNewLevelRequested: ClimateService.setVentilation(newLevel) } Spacer { @@ -184,7 +180,7 @@ UIElement { vspan: 5 symbolName: modelData.symbol active: modelData.enabled - onClicked: modelData.enabled = !modelData.enabled + onClicked: modelData.setEnabled(!modelData.enabled) } } } @@ -203,7 +199,7 @@ UIElement { maxValue: ClimateService.rightSeat.maxValue value: ClimateService.rightSeat.value stepValue: ClimateService.rightSeat.stepValue - onValueChanged: ClimateService.rightSeat.value = value + onValueChanged: ClimateService.rightSeat.setValue(value) } } @@ -214,13 +210,4 @@ UIElement { } } - Connections { - target: ClimateService.leftSeat - onValueChanged: leftTempSlider.value = ClimateService.leftSeat.value - } - - Connections { - target: ClimateService.rightSeat - onValueChanged: rightTempSlider.value = ClimateService.rightSeat.value - } } diff --git a/sysui/Climate/Ventilation.qml b/sysui/Climate/Ventilation.qml index c6f4bfa..f71f80e 100644 --- a/sysui/Climate/Ventilation.qml +++ b/sysui/Climate/Ventilation.qml @@ -40,16 +40,13 @@ UIElement { property int levels property int currentLevel - property bool _updateInProgress: false + onCurrentLevelChanged: view.currentIndex = currentLevel; - onCurrentLevelChanged: if (!_updateInProgress) updateLevelInternal(currentLevel); + signal newLevelRequested(int newLevel) function updateLevelInternal(newLevel) { var boundedLevel = Math.max(0, Math.min(levels - 1, newLevel)); - _updateInProgress = true; - currentLevel = boundedLevel; - _updateInProgress = false; - view.currentIndex = boundedLevel; + newLevelRequested( boundedLevel ); } MouseArea { diff --git a/sysui/Cluster/RightDial.qml b/sysui/Cluster/RightDial.qml index bd89b37..8d5cd54 100644 --- a/sysui/Cluster/RightDial.qml +++ b/sysui/Cluster/RightDial.qml @@ -156,12 +156,15 @@ Item { Image { id: fuelSymbol + width: 70 + height: 70 anchors.top: parent.top - anchors.topMargin: 60 + anchors.topMargin: 55 anchors.horizontalCenter: parent.horizontalCenter - anchors.horizontalCenterOffset: 5 + anchors.horizontalCenterOffset: 0 source: VehicleModel.rightDialIcon - scale: VehicleModel.rightIconScale + fillMode: Image.PreserveAspectFit + } Item { diff --git a/sysui/LaunchController.qml b/sysui/LaunchController.qml index 88e43aa..aeb1d9b 100644 --- a/sysui/LaunchController.qml +++ b/sysui/LaunchController.qml @@ -146,6 +146,8 @@ StackView { if (root.busy) root.completeTransition() + item.state = "closing" + if (item == root.currentItem) { var stackItem = null; if (root.depth > 2) diff --git a/sysui/dev/MonitorPanel.qml b/sysui/dev/MonitorPanel.qml index ac02390..42342f5 100644 --- a/sysui/dev/MonitorPanel.qml +++ b/sysui/dev/MonitorPanel.qml @@ -78,7 +78,7 @@ Item { Row { id: dottedLine - y: root.middleLine * root.graphHeight + y: root.graphHeight - (root.middleLine * root.graphHeight) spacing: 4 Repeater { diff --git a/sysui/dev/SystemMonitor/InfoPanel.qml b/sysui/dev/SystemMonitor/InfoPanel.qml index bc3d999..9ca0269 100644 --- a/sysui/dev/SystemMonitor/InfoPanel.qml +++ b/sysui/dev/SystemMonitor/InfoPanel.qml @@ -71,7 +71,7 @@ UIPage { vspan: 2 checkedEnabled: false iconName: "information" - titleText: "Idle load average: " + SystemMonitor.idleLoadAverage + titleText: "Idle load threshold: " + SystemMonitor.idleLoadThreshold } } |