text:qsTr("Set the maximum and minimum target charge levels.")
color:Theme.primaryColor
font.pixelSize:Theme.fontSizeSmall
}
Slider{
id: upperChargeLimit
width:parent.width
label:qsTr("Charging limit")
minimumValue:60
maximumValue:99
stepSize:1
value:settings.upperLimit
valueText:value+"%"
onValueChanged:{
settings.upperLimit=value
if((value-2)<continueChargeLimit.value)
continueChargeLimit.value=value-2
}
}
Slider{
width:parent.width
label:qsTr("Discharging limit")
minimumValue:10
maximumValue:40
stepSize:1
value:settings.lowerLimit
valueText:value+"%"
onValueChanged:settings.lowerLimit=value
}
TextSwitch{
id: autoStopCharging
text:qsTr("Stop charging when limit reached")
description:qsTr("This option stops charging when battery has reached the percentage set in Charging limit value, and resumes charging when charge has decreased below Continue charge limit value. Generally a value close to the Charging limit value is recommened, such as 80% and 75%.")
checked:settings.limitEnabled
onCheckedChanged:settings.limitEnabled=checked
}
Slider{
id: continueChargeLimit
handleVisible:enabled
width:parent.width
label:qsTr("Resume charging limit")
minimumValue:50
maximumValue:upperChargeLimit.value-2
stepSize:1
value:settings.chargeLimit
valueText:value+"%"
onValueChanged:settings.chargeLimit=value
}
Label{
x:Theme.paddingLarge*2
width:parent.width-x*2;
wrapMode:Text.Wrap
text:qsTr("You can also independently stop and resume charging.")
color:Theme.primaryColor
font.pixelSize:Theme.fontSizeSmall
}
Row{
anchors{
left:parent.left
right:parent.right
}
height:button.height
Column{
width:parent.width/2
Button{
id: button
anchors.horizontalCenter:parent.horizontalCenter
text:qsTr("Enable")
onClicked:battery.chargingEnabled=true
}
}
Column{
width:parent.width/2
Button{
anchors.horizontalCenter:parent.horizontalCenter
text:qsTr("Disable")
onClicked:battery.chargingEnabled=false
}
}
}
Label{
x:Theme.paddingLarge
text:qsTr("Alert tests")
color:Theme.highlightColor
}
Label{
x:Theme.paddingLarge*2
width:parent.width-x*2;
wrapMode:Text.Wrap
text:qsTr("Click the buttons to test the sound and notification.")