14 if (!_threshold1Fact) {
15 _threshold1Fact = _createSettingsFact(threshold1Name);
18 return _threshold1Fact;
23 if (!_threshold2Fact) {
24 _threshold2Fact = _createSettingsFact(threshold2Name);
27 return _threshold2Fact;
31void BatteryIndicatorSettings::_threshold1Changed() {
35void BatteryIndicatorSettings::_threshold2Changed() {
40void BatteryIndicatorSettings::validateThreshold1() {
41 int value = threshold1()->rawValue().toInt();
46void BatteryIndicatorSettings::validateThreshold2() {
47 int value = threshold2()->rawValue().toInt();
55 threshold1()->setRawValue(17);
56 }
else if (value > 99) {
57 threshold1()->setRawValue(99);
60 if (value > threshold2()->rawValue().toInt()) {
61 threshold1()->setRawValue(value);
64 threshold1()->setRawValue(threshold2()->rawValue().toInt() + 1);
73 threshold2()->setRawValue(16);
78 if (value < threshold1()->rawValue().toInt()) {
79 threshold2()->setRawValue(value);
82 threshold2()->setRawValue(threshold1()->rawValue().toInt() - 1);
#define DECLARE_SETTINGSFACT_NO_FUNC(CLASS, NAME)
#define DECLARE_SETTINGSFACT(CLASS, NAME)
#define DECLARE_SETTINGGROUP(NAME, GROUP)
Q_INVOKABLE void setThreshold2(int value)
Q_INVOKABLE void setThreshold1(int value)
void rawValueChanged(const QVariant &value)