Set percentage ranges to 5%...100%
This commit is contained in:
parent
68d7c864a8
commit
5da67a5a22
3 changed files with 14 additions and 14 deletions
|
@ -181,8 +181,8 @@ Page {
|
|||
|
||||
MySlider {
|
||||
id: highLimitSlider
|
||||
minimumValue: 21
|
||||
maximumValue: 95
|
||||
minimumValue: 6
|
||||
maximumValue: 100
|
||||
stepSize: 1
|
||||
valueText: value + "%"
|
||||
onValueChanged: {
|
||||
|
@ -206,8 +206,8 @@ Page {
|
|||
|
||||
MySlider {
|
||||
id: lowLimitSlider
|
||||
minimumValue: 20
|
||||
maximumValue: 94
|
||||
minimumValue: 5
|
||||
maximumValue: 99
|
||||
stepSize: 1
|
||||
valueText: value + "%"
|
||||
onValueChanged: {
|
||||
|
@ -260,7 +260,7 @@ Page {
|
|||
|
||||
MySlider {
|
||||
id: highAlertSlider
|
||||
minimumValue: 11
|
||||
minimumValue: 6
|
||||
maximumValue: 100
|
||||
stepSize: 1
|
||||
valueText: value + "%"
|
||||
|
@ -285,7 +285,7 @@ Page {
|
|||
|
||||
MySlider {
|
||||
id: lowAlertSlider
|
||||
minimumValue: 10
|
||||
minimumValue: 5
|
||||
maximumValue: 99
|
||||
stepSize: 1
|
||||
valueText: value + "%"
|
||||
|
|
|
@ -23,13 +23,13 @@ Settings::Settings(QObject *parent) : QObject(parent)
|
|||
qDebug() << "Using" << mySettings->fileName();
|
||||
|
||||
// Read in the values
|
||||
loadInteger(sLowAlert, &lowAlert, 10, 99);
|
||||
loadInteger(sHighAlert, &highAlert, 11, 100);
|
||||
loadInteger(sLowAlert, &lowAlert, 5, 99);
|
||||
loadInteger(sHighAlert, &highAlert, 6, 100);
|
||||
loadInteger(sHighNotificationsInterval, &highNotificationsInterval, 50, 610);
|
||||
loadInteger(sLowNotificationsInterval, &lowNotificationsInterval, 50, 610);
|
||||
loadInteger(sLimitEnabled, &limitEnabled, 0, 1);
|
||||
loadInteger(sLowLimit, &lowLimit, 20, 94);
|
||||
loadInteger(sHighLimit, &highLimit, 21, 95);
|
||||
loadInteger(sLowLimit, &lowLimit, 5, 99);
|
||||
loadInteger(sHighLimit, &highLimit, 6, 100);
|
||||
|
||||
notificationTitle = tr("Battery charge %1%");
|
||||
notificationLowText = tr("Please connect the charger.");
|
||||
|
|
|
@ -108,13 +108,13 @@ void Settings::updateConfig(QString path) {
|
|||
// Read in the values
|
||||
bool restartTimers = false;
|
||||
|
||||
loadInteger(sLowAlert, &lowAlert, 10, 99);
|
||||
loadInteger(sHighAlert, &highAlert, 11, 100);
|
||||
loadInteger(sLowAlert, &lowAlert, 5, 99);
|
||||
loadInteger(sHighAlert, &highAlert, 6, 100);
|
||||
restartTimers |= loadInteger(sHighNotificationsInterval, &highNotificationsInterval, 50, 610);
|
||||
restartTimers |= loadInteger(sLowNotificationsInterval, &lowNotificationsInterval, 50, 610);
|
||||
loadInteger(sLimitEnabled, &limitEnabled, 0, 1);
|
||||
loadInteger(sLowLimit, &lowLimit, 20, 94);
|
||||
loadInteger(sHighLimit, &highLimit, 21, 95);
|
||||
loadInteger(sLowLimit, &lowLimit, 5, 99);
|
||||
loadInteger(sHighLimit, &highLimit, 6, 100);
|
||||
|
||||
// These are translated in the GUI application
|
||||
// and delivered here via the config file
|
||||
|
|
Loading…
Reference in a new issue