Merge pull request #43 from nephros/health-monitor
Add health and temp support to application
This commit is contained in:
commit
065fa35523
5 changed files with 239 additions and 28 deletions
|
@ -177,9 +177,7 @@ Page {
|
||||||
}
|
}
|
||||||
MyDetailItem {
|
MyDetailItem {
|
||||||
label: qsTr("Temperature:")
|
label: qsTr("Temperature:")
|
||||||
// TODO: use weird degrees for US users
|
value: (Qt.locale().measurementSystem == Locale.ImperialUSSystem) ? Math.floor((battery.temperature / 10) * 1.8 + 32) + " F" : Math.floor(battery.temperature / 10) + " °C"
|
||||||
//value: useImperial ? celsiusToFahrenheit(battery.temperature) + " F" : Math.floor(battery.temperature / 10) + " °C"
|
|
||||||
value: Math.floor(battery.temperature / 10) + " °C"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,9 +43,11 @@ Page {
|
||||||
highLimitSlider.value = settings.highLimit
|
highLimitSlider.value = settings.highLimit
|
||||||
lowLimitSlider.value = settings.lowLimit
|
lowLimitSlider.value = settings.lowLimit
|
||||||
highAlertSlider.value = settings.highAlert
|
highAlertSlider.value = settings.highAlert
|
||||||
|
healthSelector.currentIndex = settings.healthAlert
|
||||||
lowAlertSlider.value = settings.lowAlert
|
lowAlertSlider.value = settings.lowAlert
|
||||||
highIntervalSlider.value = settings.highNotificationsInterval
|
highIntervalSlider.value = settings.highNotificationsInterval
|
||||||
lowIntervalSlider.value = settings.lowNotificationsInterval
|
lowIntervalSlider.value = settings.lowNotificationsInterval
|
||||||
|
healthIntervalSlider.value = settings.healthNotificationsInterval
|
||||||
if(logger.debug) logger.log("SettingsPage values updated")
|
if(logger.debug) logger.log("SettingsPage values updated")
|
||||||
daemonCheck.start()
|
daemonCheck.start()
|
||||||
}
|
}
|
||||||
|
@ -365,6 +367,70 @@ Page {
|
||||||
smallChange: 10
|
smallChange: 10
|
||||||
largeChange: 60
|
largeChange: 60
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
x: Theme.paddingLarge
|
||||||
|
text: qsTr("Health Notification settings")
|
||||||
|
color: Theme.highlightColor
|
||||||
|
}
|
||||||
|
Label {
|
||||||
|
text: qsTr("Display visual and audible notifications about battery health, when the battery status exceeds safe values.<br />This usually means high temperature but can be affected by other factors depending on the hardware.")
|
||||||
|
anchors {
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
leftMargin: Theme.horizontalPageMargin*2
|
||||||
|
rightMargin: Theme.horizontalPageMargin
|
||||||
|
}
|
||||||
|
color: Theme.primaryColor
|
||||||
|
font.pixelSize: Theme.fontSizeExtraSmall
|
||||||
|
wrapMode: Text.Wrap
|
||||||
|
}
|
||||||
|
|
||||||
|
SectionHeader { text: qsTr("Health notification") }
|
||||||
|
|
||||||
|
ComboBox {
|
||||||
|
id: healthSelector
|
||||||
|
width: parent.width
|
||||||
|
label: qsTr("Notify on Health status" + ":")
|
||||||
|
currentIndex: settings.healthAlert
|
||||||
|
menu: ContextMenu {
|
||||||
|
MenuItem { text: qsTr("Never") }
|
||||||
|
MenuItem { text: qsTr("Warning") }
|
||||||
|
MenuItem { text: qsTr("Critical") }
|
||||||
|
}
|
||||||
|
onValueChanged: save()
|
||||||
|
function save() {
|
||||||
|
settings.healthAlert = healthSelector.currentIndex
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SectionHeader { text: qsTr("Health notification interval") }
|
||||||
|
|
||||||
|
MySlider {
|
||||||
|
id: healthIntervalSlider
|
||||||
|
minimumValue: 50
|
||||||
|
maximumValue: 610
|
||||||
|
stepSize: 10
|
||||||
|
valueText: updateValueText()
|
||||||
|
onValueChanged: updateValueText()
|
||||||
|
function updateValueText() {
|
||||||
|
if(value == 50)
|
||||||
|
return qsTr("Once")
|
||||||
|
if(value == 610)
|
||||||
|
return qsTr("Never")
|
||||||
|
return Math.floor(value / 60) + (value % 60 < 10 ? ":0" + value % 60 : ":" + value % 60)
|
||||||
|
}
|
||||||
|
onReleased: save()
|
||||||
|
function save() {
|
||||||
|
settings.healthNotificationsInterval = value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
AdjustmentButtons {
|
||||||
|
targetSlider: healthIntervalSlider
|
||||||
|
smallChange: 10
|
||||||
|
largeChange: 60
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,8 +31,10 @@ Settings::Settings(Logger *newLogger, QObject *parent) : QObject(parent)
|
||||||
// Read in the values
|
// Read in the values
|
||||||
loadInteger(sLowAlert, lowAlert, 5, 99);
|
loadInteger(sLowAlert, lowAlert, 5, 99);
|
||||||
loadInteger(sHighAlert, highAlert, 6, 100);
|
loadInteger(sHighAlert, highAlert, 6, 100);
|
||||||
|
loadInteger(sHealthAlert, healthAlert, 0, 2);
|
||||||
loadInteger(sHighNotificationsInterval, highNotificationsInterval, 50, 610);
|
loadInteger(sHighNotificationsInterval, highNotificationsInterval, 50, 610);
|
||||||
loadInteger(sLowNotificationsInterval, lowNotificationsInterval, 50, 610);
|
loadInteger(sLowNotificationsInterval, lowNotificationsInterval, 50, 610);
|
||||||
|
loadInteger(sHealthNotificationsInterval, healthNotificationsInterval, 50, 610);
|
||||||
loadInteger(sLimitEnabled, limitEnabled, 0, 1);
|
loadInteger(sLimitEnabled, limitEnabled, 0, 1);
|
||||||
loadInteger(sLowLimit, lowLimit, 5, 99);
|
loadInteger(sLowLimit, lowLimit, 5, 99);
|
||||||
loadInteger(sHighLimit, highLimit, 6, 100);
|
loadInteger(sHighLimit, highLimit, 6, 100);
|
||||||
|
@ -43,10 +45,16 @@ Settings::Settings(Logger *newLogger, QObject *parent) : QObject(parent)
|
||||||
loadString(sNotificationTitle, notificationTitle);
|
loadString(sNotificationTitle, notificationTitle);
|
||||||
loadString(sNotificationLowText, notificationLowText);
|
loadString(sNotificationLowText, notificationLowText);
|
||||||
loadString(sNotificationHighText, notificationHighText);
|
loadString(sNotificationHighText, notificationHighText);
|
||||||
|
loadString(sNotificationHealthTitle, notificationHealthTitle);
|
||||||
|
loadString(sNotificationHealthWarnText, notificationHealthWarnText);
|
||||||
|
loadString(sNotificationHealthCritText, notificationHealthCritText);
|
||||||
|
|
||||||
saveString(sNotificationTitle, tr("Battery charge %1%"), notificationTitle);
|
saveString(sNotificationTitle, tr("Battery charge %1%"), notificationTitle);
|
||||||
saveString(sNotificationLowText, tr("Please connect the charger."), notificationLowText);
|
saveString(sNotificationLowText, tr("Please connect the charger."), notificationLowText);
|
||||||
saveString(sNotificationHighText, tr("Please disconnect the charger."), notificationHighText);
|
saveString(sNotificationHighText, tr("Please disconnect the charger."), notificationHighText);
|
||||||
|
saveString(sNotificationHealthTitle, tr("Battery health %1"), notificationHealthTitle);
|
||||||
|
saveString(sNotificationHealthWarnText, tr("Battery health is not good"), notificationHealthWarnText);
|
||||||
|
saveString(sNotificationHealthCritText, tr("Battery health is critical"), notificationHealthCritText);
|
||||||
}
|
}
|
||||||
|
|
||||||
Settings::~Settings()
|
Settings::~Settings()
|
||||||
|
@ -58,17 +66,23 @@ Settings::~Settings()
|
||||||
// Getters condensed.
|
// Getters condensed.
|
||||||
int Settings::getLowAlert() { return lowAlert; }
|
int Settings::getLowAlert() { return lowAlert; }
|
||||||
int Settings::getHighAlert() { return highAlert; }
|
int Settings::getHighAlert() { return highAlert; }
|
||||||
|
int Settings::getHealthAlert() { return healthAlert; }
|
||||||
int Settings::getHighNotificationsInterval() { return highNotificationsInterval; }
|
int Settings::getHighNotificationsInterval() { return highNotificationsInterval; }
|
||||||
int Settings::getLowNotificationsInterval() { return lowNotificationsInterval; }
|
int Settings::getLowNotificationsInterval() { return lowNotificationsInterval; }
|
||||||
|
int Settings::getHealthNotificationsInterval() { return healthNotificationsInterval; }
|
||||||
int Settings::getLowLimit() { return lowLimit; }
|
int Settings::getLowLimit() { return lowLimit; }
|
||||||
int Settings::getHighLimit() { return highLimit; }
|
int Settings::getHighLimit() { return highLimit; }
|
||||||
bool Settings::getLimitEnabled() { return limitEnabled == 1; }
|
bool Settings::getLimitEnabled() { return limitEnabled == 1; }
|
||||||
QString Settings::getLowAlertFile() { return lowAlertFile; }
|
QString Settings::getLowAlertFile() { return lowAlertFile; }
|
||||||
QString Settings::getHighAlertFile() { return highAlertFile; }
|
QString Settings::getHighAlertFile() { return highAlertFile; }
|
||||||
|
QString Settings::getHealthAlertFile() { return healthAlertFile; }
|
||||||
QString Settings::getLogFilename() { return logFilename; }
|
QString Settings::getLogFilename() { return logFilename; }
|
||||||
QString Settings::getNotificationTitle() { return notificationTitle; }
|
QString Settings::getNotificationTitle() { return notificationTitle; }
|
||||||
QString Settings::getNotificationLowText() { return notificationLowText; }
|
QString Settings::getNotificationLowText() { return notificationLowText; }
|
||||||
QString Settings::getNotificationHighText() { return notificationHighText; }
|
QString Settings::getNotificationHighText() { return notificationHighText; }
|
||||||
|
QString Settings::getNotificationHealthTitle() { return notificationHealthTitle; }
|
||||||
|
QString Settings::getNotificationHealthWarnText() { return notificationHealthWarnText; }
|
||||||
|
QString Settings::getNotificationHealthCritText() { return notificationHealthCritText; }
|
||||||
int Settings::getLogLevel() { return logLevel; }
|
int Settings::getLogLevel() { return logLevel; }
|
||||||
|
|
||||||
void Settings::setLowAlert(const int newLimit) {
|
void Settings::setLowAlert(const int newLimit) {
|
||||||
|
@ -83,6 +97,12 @@ void Settings::setHighAlert(const int newLimit) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Settings::setHealthAlert(const int newLimit) {
|
||||||
|
if(saveInteger(sHealthAlert, newLimit, healthAlert)) {
|
||||||
|
emit healthAlertChanged(healthAlert);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Settings::setHighNotificationsInterval(const int newInterval) {
|
void Settings::setHighNotificationsInterval(const int newInterval) {
|
||||||
if(saveInteger(sHighNotificationsInterval, newInterval, highNotificationsInterval)) {
|
if(saveInteger(sHighNotificationsInterval, newInterval, highNotificationsInterval)) {
|
||||||
emit highNotificationsIntervalChanged(highNotificationsInterval);
|
emit highNotificationsIntervalChanged(highNotificationsInterval);
|
||||||
|
@ -95,6 +115,12 @@ void Settings::setLowNotificationsInterval(const int newInterval) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Settings::setHealthNotificationsInterval(const int newInterval) {
|
||||||
|
if(saveInteger(sHealthNotificationsInterval, newInterval, healthNotificationsInterval)) {
|
||||||
|
emit healthNotificationsIntervalChanged(healthNotificationsInterval);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Settings::setLowLimit(const int newLimit) {
|
void Settings::setLowLimit(const int newLimit) {
|
||||||
if(saveInteger(sLowLimit, newLimit, lowLimit)) {
|
if(saveInteger(sLowLimit, newLimit, lowLimit)) {
|
||||||
emit lowLimitChanged(lowLimit);
|
emit lowLimitChanged(lowLimit);
|
||||||
|
@ -126,6 +152,21 @@ void Settings::setNotificationHighText(const QString newText) {
|
||||||
emit notificationHighTextChanged(notificationHighText);
|
emit notificationHighTextChanged(notificationHighText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Settings::setNotificationHealthTitle(const QString newText) {
|
||||||
|
if(saveString(sNotificationHealthTitle, newText, notificationTitle))
|
||||||
|
emit notificationHealthTitleChanged(notificationTitle);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Settings::setNotificationHealthWarnText(const QString newText) {
|
||||||
|
if(saveString(sNotificationHealthWarnText, newText, notificationHealthWarnText))
|
||||||
|
emit notificationHealthWarnTextChanged(notificationHealthWarnText);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Settings::setNotificationHealthCritText(const QString newText) {
|
||||||
|
if(saveString(sNotificationHealthCritText, newText, notificationHealthCritText))
|
||||||
|
emit notificationHealthCritTextChanged(notificationHealthCritText);
|
||||||
|
}
|
||||||
|
|
||||||
void Settings::setLogLevel(const int newLogLevel) {
|
void Settings::setLogLevel(const int newLogLevel) {
|
||||||
if(saveInteger(sLogLevel, newLogLevel, logLevel))
|
if(saveInteger(sLogLevel, newLogLevel, logLevel))
|
||||||
emit logLevelChanged(logLevel);
|
emit logLevelChanged(logLevel);
|
||||||
|
|
|
@ -27,16 +27,22 @@ class Settings : public QObject
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(int highAlert READ getHighAlert WRITE setHighAlert NOTIFY highAlertChanged)
|
Q_PROPERTY(int highAlert READ getHighAlert WRITE setHighAlert NOTIFY highAlertChanged)
|
||||||
Q_PROPERTY(int lowAlert READ getLowAlert WRITE setLowAlert NOTIFY lowAlertChanged)
|
Q_PROPERTY(int lowAlert READ getLowAlert WRITE setLowAlert NOTIFY lowAlertChanged)
|
||||||
|
Q_PROPERTY(int healthAlert READ getHealthAlert WRITE setHealthAlert NOTIFY healthAlertChanged)
|
||||||
Q_PROPERTY(int highNotificationsInterval READ getHighNotificationsInterval WRITE setHighNotificationsInterval NOTIFY highNotificationsIntervalChanged)
|
Q_PROPERTY(int highNotificationsInterval READ getHighNotificationsInterval WRITE setHighNotificationsInterval NOTIFY highNotificationsIntervalChanged)
|
||||||
Q_PROPERTY(int lowNotificationsInterval READ getLowNotificationsInterval WRITE setLowNotificationsInterval NOTIFY lowNotificationsIntervalChanged)
|
Q_PROPERTY(int lowNotificationsInterval READ getLowNotificationsInterval WRITE setLowNotificationsInterval NOTIFY lowNotificationsIntervalChanged)
|
||||||
|
Q_PROPERTY(int healthNotificationsInterval READ getHealthNotificationsInterval WRITE setHealthNotificationsInterval NOTIFY healthNotificationsIntervalChanged)
|
||||||
Q_PROPERTY(int highLimit READ getHighLimit WRITE setHighLimit NOTIFY highLimitChanged)
|
Q_PROPERTY(int highLimit READ getHighLimit WRITE setHighLimit NOTIFY highLimitChanged)
|
||||||
Q_PROPERTY(int lowLimit READ getLowLimit WRITE setLowLimit NOTIFY lowLimitChanged)
|
Q_PROPERTY(int lowLimit READ getLowLimit WRITE setLowLimit NOTIFY lowLimitChanged)
|
||||||
Q_PROPERTY(bool limitEnabled READ getLimitEnabled WRITE setLimitEnabled NOTIFY limitEnabledChanged)
|
Q_PROPERTY(bool limitEnabled READ getLimitEnabled WRITE setLimitEnabled NOTIFY limitEnabledChanged)
|
||||||
Q_PROPERTY(QString highAlertFile READ getHighAlertFile NOTIFY highAlertFileChanged)
|
Q_PROPERTY(QString highAlertFile READ getHighAlertFile NOTIFY highAlertFileChanged)
|
||||||
Q_PROPERTY(QString lowAlertFile READ getLowAlertFile NOTIFY lowAlertFileChanged)
|
Q_PROPERTY(QString lowAlertFile READ getLowAlertFile NOTIFY lowAlertFileChanged)
|
||||||
|
Q_PROPERTY(QString healthAlertFile READ getHealthAlertFile NOTIFY healthAlertFileChanged)
|
||||||
Q_PROPERTY(QString notificationTitle READ getNotificationTitle WRITE setNotificationTitle NOTIFY notificationTitleChanged)
|
Q_PROPERTY(QString notificationTitle READ getNotificationTitle WRITE setNotificationTitle NOTIFY notificationTitleChanged)
|
||||||
Q_PROPERTY(QString notificationLowText READ getNotificationLowText WRITE setNotificationLowText NOTIFY notificationLowTextChanged)
|
Q_PROPERTY(QString notificationLowText READ getNotificationLowText WRITE setNotificationLowText NOTIFY notificationLowTextChanged)
|
||||||
Q_PROPERTY(QString notificationHighText READ getNotificationHighText WRITE setNotificationHighText NOTIFY notificationHighTextChanged)
|
Q_PROPERTY(QString notificationHighText READ getNotificationHighText WRITE setNotificationHighText NOTIFY notificationHighTextChanged)
|
||||||
|
Q_PROPERTY(QString notificationHealthTitle READ getNotificationHealthTitle WRITE setNotificationHealthTitle NOTIFY notificationHealthTitleChanged)
|
||||||
|
Q_PROPERTY(QString notificationHealthWarnText READ getNotificationHealthWarnText WRITE setNotificationHealthWarnText NOTIFY notificationHealthWarnTextChanged)
|
||||||
|
Q_PROPERTY(QString notificationHealthCritText READ getNotificationHealthCritText WRITE setNotificationHealthCritText NOTIFY notificationHealthCritTextChanged)
|
||||||
Q_PROPERTY(QString logFilename READ getLogFilename NOTIFY logFilenameChanged)
|
Q_PROPERTY(QString logFilename READ getLogFilename NOTIFY logFilenameChanged)
|
||||||
Q_PROPERTY(int logLevel READ getLogLevel WRITE setLogLevel NOTIFY logLevelChanged)
|
Q_PROPERTY(int logLevel READ getLogLevel WRITE setLogLevel NOTIFY logLevelChanged)
|
||||||
|
|
||||||
|
@ -46,29 +52,40 @@ public:
|
||||||
|
|
||||||
int getLowAlert();
|
int getLowAlert();
|
||||||
int getHighAlert();
|
int getHighAlert();
|
||||||
|
int getHealthAlert();
|
||||||
int getHighNotificationsInterval();
|
int getHighNotificationsInterval();
|
||||||
int getLowNotificationsInterval();
|
int getLowNotificationsInterval();
|
||||||
|
int getHealthNotificationsInterval();
|
||||||
int getLowLimit();
|
int getLowLimit();
|
||||||
int getHighLimit();
|
int getHighLimit();
|
||||||
bool getLimitEnabled();
|
bool getLimitEnabled();
|
||||||
QString getLowAlertFile();
|
QString getLowAlertFile();
|
||||||
QString getHighAlertFile();
|
QString getHighAlertFile();
|
||||||
|
QString getHealthAlertFile();
|
||||||
QString getNotificationTitle();
|
QString getNotificationTitle();
|
||||||
QString getNotificationLowText();
|
QString getNotificationLowText();
|
||||||
QString getNotificationHighText();
|
QString getNotificationHighText();
|
||||||
|
QString getNotificationHealthTitle();
|
||||||
|
QString getNotificationHealthWarnText();
|
||||||
|
QString getNotificationHealthCritText();
|
||||||
QString getLogFilename();
|
QString getLogFilename();
|
||||||
int getLogLevel();
|
int getLogLevel();
|
||||||
|
|
||||||
void setLowAlert(const int newLimit);
|
void setLowAlert(const int newLimit);
|
||||||
void setHighAlert(const int newLimit);
|
void setHighAlert(const int newLimit);
|
||||||
|
void setHealthAlert(const int newLimit);
|
||||||
void setHighNotificationsInterval(const int newInterval);
|
void setHighNotificationsInterval(const int newInterval);
|
||||||
void setLowNotificationsInterval(const int newInterval);
|
void setLowNotificationsInterval(const int newInterval);
|
||||||
|
void setHealthNotificationsInterval(const int newInterval);
|
||||||
void setLowLimit(const int newLimit);
|
void setLowLimit(const int newLimit);
|
||||||
void setHighLimit(const int newLimit);
|
void setHighLimit(const int newLimit);
|
||||||
void setLimitEnabled(const bool newEnabled);
|
void setLimitEnabled(const bool newEnabled);
|
||||||
void setNotificationTitle(const QString newText);
|
void setNotificationTitle(const QString newText);
|
||||||
void setNotificationLowText(const QString newText);
|
void setNotificationLowText(const QString newText);
|
||||||
void setNotificationHighText(const QString newText);
|
void setNotificationHighText(const QString newText);
|
||||||
|
void setNotificationHealthTitle(const QString newText);
|
||||||
|
void setNotificationHealthWarnText(const QString newText);
|
||||||
|
void setNotificationHealthCritText(const QString newText);
|
||||||
void setLogLevel(const int newLogLevel);
|
void setLogLevel(const int newLogLevel);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -79,32 +96,44 @@ private:
|
||||||
// Default values
|
// Default values
|
||||||
int lowAlert = 25;
|
int lowAlert = 25;
|
||||||
int highAlert = 75;
|
int highAlert = 75;
|
||||||
|
int healthAlert = 1; // warn
|
||||||
int highNotificationsInterval = 60;
|
int highNotificationsInterval = 60;
|
||||||
int lowNotificationsInterval = 60;
|
int lowNotificationsInterval = 60;
|
||||||
|
int healthNotificationsInterval = 60;
|
||||||
int limitEnabled = 1; // Converted to boolean for QML
|
int limitEnabled = 1; // Converted to boolean for QML
|
||||||
int lowLimit = 65;
|
int lowLimit = 65;
|
||||||
int highLimit = 70;
|
int highLimit = 70;
|
||||||
QString lowAlertFile = "/usr/share/sounds/jolla-ambient/stereo/general_warning.wav";
|
QString lowAlertFile = "/usr/share/sounds/jolla-ambient/stereo/general_warning.wav";
|
||||||
QString highAlertFile = "/usr/share/sounds/jolla-ambient/stereo/positive_confirmation.wav";
|
QString highAlertFile = "/usr/share/sounds/jolla-ambient/stereo/positive_confirmation.wav";
|
||||||
|
QString healthAlertFile = lowAlertFile;
|
||||||
QString notificationTitle;
|
QString notificationTitle;
|
||||||
QString notificationLowText;
|
QString notificationLowText;
|
||||||
QString notificationHighText;
|
QString notificationHighText;
|
||||||
|
QString notificationHealthTitle;
|
||||||
|
QString notificationHealthWarnText;
|
||||||
|
QString notificationHealthCritText;
|
||||||
QString logFilename;
|
QString logFilename;
|
||||||
int logLevel;
|
int logLevel;
|
||||||
|
|
||||||
// To avoid repeating the same string over and over and over...
|
// To avoid repeating the same string over and over and over...
|
||||||
const char* sLowAlert = "lowAlert";
|
const char* sLowAlert = "lowAlert";
|
||||||
const char* sHighAlert = "highAlert";
|
const char* sHighAlert = "highAlert";
|
||||||
|
const char* sHealthAlert = "healthAlert";
|
||||||
const char* sHighNotificationsInterval = "highNotificationsInterval";
|
const char* sHighNotificationsInterval = "highNotificationsInterval";
|
||||||
const char* sLowNotificationsInterval = "lowNotificationsInterval";
|
const char* sLowNotificationsInterval = "lowNotificationsInterval";
|
||||||
|
const char* sHealthNotificationsInterval = "healthNotificationsInterval";
|
||||||
const char* sLimitEnabled = "limitEnabled";
|
const char* sLimitEnabled = "limitEnabled";
|
||||||
const char* sLowLimit = "lowLimit";
|
const char* sLowLimit = "lowLimit";
|
||||||
const char* sHighLimit = "highLimit";
|
const char* sHighLimit = "highLimit";
|
||||||
const char* sLowAlertFile = "lowAlertFile";
|
const char* sLowAlertFile = "lowAlertFile";
|
||||||
const char* sHighAlertFile = "highAlertFile";
|
const char* sHighAlertFile = "highAlertFile";
|
||||||
|
const char* sHealthAlertFile = "healthAlertFile";
|
||||||
const char* sNotificationTitle = "notificationTitle";
|
const char* sNotificationTitle = "notificationTitle";
|
||||||
const char* sNotificationLowText = "notificationLowText";
|
const char* sNotificationLowText = "notificationLowText";
|
||||||
const char* sNotificationHighText = "notificationHighText";
|
const char* sNotificationHighText = "notificationHighText";
|
||||||
|
const char* sNotificationHealthTitle = "notificationHealthTitle";
|
||||||
|
const char* sNotificationHealthWarnText = "notificationHealthWarnText";
|
||||||
|
const char* sNotificationHealthCritText = "notificationHealthCritText";
|
||||||
const char* sLogFilename = "logFilename";
|
const char* sLogFilename = "logFilename";
|
||||||
const char* sLogLevel = "logLevel";
|
const char* sLogLevel = "logLevel";
|
||||||
|
|
||||||
|
@ -117,16 +146,22 @@ private:
|
||||||
signals:
|
signals:
|
||||||
void lowAlertChanged(int);
|
void lowAlertChanged(int);
|
||||||
void highAlertChanged(int);
|
void highAlertChanged(int);
|
||||||
|
void healthAlertChanged(int);
|
||||||
void highNotificationsIntervalChanged(int);
|
void highNotificationsIntervalChanged(int);
|
||||||
void lowNotificationsIntervalChanged(int);
|
void lowNotificationsIntervalChanged(int);
|
||||||
|
void healthNotificationsIntervalChanged(int);
|
||||||
void limitEnabledChanged(bool);
|
void limitEnabledChanged(bool);
|
||||||
void lowLimitChanged(int);
|
void lowLimitChanged(int);
|
||||||
void highLimitChanged(int);
|
void highLimitChanged(int);
|
||||||
void lowAlertFileChanged(QString);
|
void lowAlertFileChanged(QString);
|
||||||
void highAlertFileChanged(QString);
|
void highAlertFileChanged(QString);
|
||||||
|
void healthAlertFileChanged(QString);
|
||||||
void notificationTitleChanged(QString);
|
void notificationTitleChanged(QString);
|
||||||
void notificationLowTextChanged(QString);
|
void notificationLowTextChanged(QString);
|
||||||
void notificationHighTextChanged(QString);
|
void notificationHighTextChanged(QString);
|
||||||
|
void notificationHealthTitleChanged(QString);
|
||||||
|
void notificationHealthWarnTextChanged(QString);
|
||||||
|
void notificationHealthCritTextChanged(QString);
|
||||||
void logFilenameChanged(QString);
|
void logFilenameChanged(QString);
|
||||||
void logLevelChanged(int);
|
void logLevelChanged(int);
|
||||||
};
|
};
|
||||||
|
|
|
@ -156,34 +156,34 @@
|
||||||
<name>LogPage</name>
|
<name>LogPage</name>
|
||||||
<message>
|
<message>
|
||||||
<source>View log</source>
|
<source>View log</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Logdatei ansehen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Update</source>
|
<source>Update</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Aktualisieren</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Copy</source>
|
<source>Copy</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Kopieren</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Log level</source>
|
<source>Log level</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Log Level</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Quiet</source>
|
<source>Quiet</source>
|
||||||
<comment>Low log setting</comment>
|
<comment>Low log setting</comment>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Still</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Verbose</source>
|
<source>Verbose</source>
|
||||||
<comment>Medium log setting</comment>
|
<comment>Medium log setting</comment>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Mittel</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Debug</source>
|
<source>Debug</source>
|
||||||
<comment>High log setting</comment>
|
<comment>High log setting</comment>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Debug</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -275,20 +275,43 @@
|
||||||
<source>Current:</source>
|
<source>Current:</source>
|
||||||
<translation>Strom:</translation>
|
<translation>Strom:</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Good</source>
|
||||||
|
<comment>Battery is OK</comment>
|
||||||
|
<translation>die Batterie ist OK</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Warm</source>
|
||||||
|
<comment>Battery is warm</comment>
|
||||||
|
<translation>die Batterie ist warm</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Overheated</source>
|
||||||
|
<comment>Battery is very hot</comment>
|
||||||
|
<translation>die Batterie ist sehr heiss</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Health:</source>
|
||||||
|
<translation>Zustand:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Temperature:</source>
|
||||||
|
<translation>Temperatur:</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>Settings</name>
|
<name>Settings</name>
|
||||||
<message>
|
<message>
|
||||||
<source>Battery charge %1%</source>
|
<source>Battery charge %1%</source>
|
||||||
<translation>Akkustand %1%</translation>
|
<translation type="vanished">Akkustand %1%</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Please connect the charger.</source>
|
<source>Please connect the charger.</source>
|
||||||
<translation>Bitte Ladegerät anschließen.</translation>
|
<translation type="vanished">Bitte Ladegerät anschließen.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Please disconnect the charger.</source>
|
<source>Please disconnect the charger.</source>
|
||||||
<translation>Bitte Ladegerät trennen.</translation>
|
<translation type="vanished">Bitte Ladegerät trennen.</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -364,7 +387,55 @@
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>View log</source>
|
<source>View log</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Logdatei ansehen</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Health Notification settings</source>
|
||||||
|
<translation>Einstellungen zur Zustandbenachrichtigung</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Display visual and audible notifications about battery health, when the battery temperature is below or above safe values.</source>
|
||||||
|
<translation type="vanished">Visuelle und akustische Benachrichtigungen zum Batteriezustand anzeigen, sobald die Temperatur über gewissen Schwellwerten liegt.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Battery health notification</source>
|
||||||
|
<translation type="vanished">Zustandsbenachrichtigung</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Warn on Health status:</source>
|
||||||
|
<translation type="vanished">Benachrichtigung bei Zustand:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>None</source>
|
||||||
|
<translation type="vanished">Keine</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Warning</source>
|
||||||
|
<translation>Warnung</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Critical</source>
|
||||||
|
<translation>Kritisch</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Battery health warning interval</source>
|
||||||
|
<translation type="vanished">Zustandsbenachrichtigungsintervall</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Display visual and audible notifications about battery health, when the battery status exceeds safe values.<br />This usually means high temperature but can be affected by other factors depending on the hardware.</source>
|
||||||
|
<translation>Visuelle und akustische Benachrichtigungen zum Batteriezustand anzeigen, sobald gewisse Schwellwerte erreicht werden.<br />Das betrifft meist die Temperatur, kann aber je nach Hardware auch andere Faktoren beinhalten.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Health notification</source>
|
||||||
|
<translation>Zustandsbenachrichtigung</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Notify on Health status:</source>
|
||||||
|
<translation>Benachrichtigung zum Zustand:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Health notification interval</source>
|
||||||
|
<translation>Zustandsbenachrichtigungsintervall</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
</TS>
|
</TS>
|
||||||
|
|
Loading…
Reference in a new issue