Commit ccdd0da1 authored by Sanjiban Bairagya's avatar Sanjiban Bairagya Committed by Sanjiban Bairagya

Restore settings for muted-or-not, and for route-profile-selected

parent 3c3ac06a
......@@ -33,6 +33,13 @@ Item {
navigation.guidanceModeEnabled = guidanceMode;
}
Settings {
id: settings
Component.onDestruction: {
settings.setValue("Navigation", "muted", muteButton.muted)
}
}
BorderImage {
anchors.fill: infoBar
anchors.margins: -14
......@@ -55,7 +62,7 @@ Item {
CircularButton {
id: muteButton
property bool muted: false
property bool muted: settings.value("Navigation", "muted") === "true"
anchors.right: infoBar.right
anchors.rightMargin: Screen.pixelDensity * 3
......
......@@ -14,6 +14,8 @@ import QtQuick.Controls 1.3
import QtQuick.Layouts 1.1
import QtQuick.Window 2.2
import org.kde.edu.marble 0.20
Item {
id: root
......@@ -22,6 +24,13 @@ Item {
height: rowLayout.height
width: rowLayout.width
Settings {
id: settings
Component.onDestruction: {
settings.setValue("Routing", "profile", root.selectedProfile)
}
}
RowLayout {
id: rowLayout
ExclusiveGroup {
......@@ -33,17 +42,19 @@ Item {
}
RouteProfileRadioButton {
checked: true
checked: settings.value("Routing", "profile") === profile
exclusiveGroup: profileGroup
property string profile: qsTr("Car (fastest)")
imageSource: "qrc:///material/directions-car.svg"
}
RouteProfileRadioButton {
checked: settings.value("Routing", "profile") === profile
exclusiveGroup: profileGroup
property string profile: qsTr("Bicycle")
imageSource: "qrc:///material/directions-bike.svg"
}
RouteProfileRadioButton {
checked: settings.value("Routing", "profile") === profile
exclusiveGroup: profileGroup
property string profile: qsTr("Pedestrian")
imageSource: "qrc:///material/directions-walk.svg"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment