[this](auto item) {
context_.usScanningProperties.getScanningProperty(Property::FEEDBACK_SOUND)->setState(item->getState());
item->setDescription(item->getState() ? "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_ON" : "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
- item->update();
},
GenlistItem::WidgetType::toggle});
feedbackSound_->setState(context_.usScanningProperties.getScanningProperty(Property::FEEDBACK_SOUND)->getState());
[this](auto item) {
context_.usScanningProperties.getScanningProperty(Property::FEEDBACK_VOICE)->setState(item->getState());
- item->setDescription(item->getState() ? "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_ON" : "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
- item->update(); },
+ item->setDescription(item->getState() ? "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_ON" : "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"); },
GenlistItem::WidgetType::toggle});
feedbackVoice_->setState(context_.usScanningProperties.getScanningProperty(Property::FEEDBACK_VOICE)->getState());
}
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS",
!item->getState(),
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
- item->setDescription(str);
- item->update(); },
+ item->setDescription(str); },
GenlistItem::WidgetType::toggle});
if (context_.usScanningProperties.getScanningProperty(Property::PAUSE_ON_FIRST_ITEM)->getState()) {
pauseOnFirst_->setState(true);
false,
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
pauseOnFirst_->setDescription(str);
- pauseOnFirst_->update();
}
if (!context_.usScanningProperties.getScanningProperty(Property::AUTO_SCAN)->getState())
pauseOnFirst_->disable();
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS",
!item->getState(),
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
- item->setDescription(str);
- item->update(); },
+ item->setDescription(str); },
GenlistItem::WidgetType::toggle});
if (context_.usScanningProperties.getScanningProperty(Property::TAP_DURATION)->getState()) {
false,
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
tapDuration_->setDescription(str);
- tapDuration_->update();
}
auto sglIntInterval = context_.usScanningProperties.getScanningProperty(Property::SINGLE_INTERACTION_INTERVAL)->getFirstValue<double>();
str = getValueUnitText(NULL, &sglIntInterval, "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS", !context_.usScanningProperties.getScanningProperty(Property::SINGLE_INTERACTION_INTERVAL)->getState(), "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS",
!item->getState(),
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
- item->setDescription(str);
- item->update(); },
+ item->setDescription(str); },
GenlistItem::WidgetType::toggle});
if (context_.usScanningProperties.getScanningProperty(Property::SINGLE_INTERACTION_INTERVAL)->getState()) {
false,
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
singleInteractionInterval_->setDescription(str);
- singleInteractionInterval_->update();
}
auto autoTapValue = context_.usScanningProperties.getScanningProperty(Property::AUTO_TAP)->getFirstValue<double>();
str = getValueUnitText(NULL, &autoTapValue, "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS", !context_.usScanningProperties.getScanningProperty(Property::AUTO_TAP)->getState(), "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS",
!item->getState(),
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
- item->setDescription(str);
- item->update(); },
+ item->setDescription(str); },
GenlistItem::WidgetType::toggle});
if (context_.usScanningProperties.getScanningProperty(Property::AUTO_TAP)->getState()) {
false,
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
autoTap_->setDescription(str);
- autoTap_->update();
}
auto moveIntervalValue = context_.usScanningProperties.getScanningProperty(Property::AUTO_MOVE_INTERVAL)->getFirstValue<double>();
str = getValueUnitText(NULL, &moveIntervalValue, "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS", !context_.usScanningProperties.getScanningProperty(Property::AUTO_MOVE_INTERVAL)->getState(), "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
auto moveIntervalValue = context_.usScanningProperties.getScanningProperty(Property::AUTO_MOVE_INTERVAL)->getFirstValue<double>();
auto str = getValueUnitText(NULL, &moveIntervalValue, "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS",
!item->getState(), "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
- item->setDescription(str);
- item->update(); },
+ item->setDescription(str); },
GenlistItem::WidgetType::toggle});
if (context_.usScanningProperties.getScanningProperty(Property::AUTO_MOVE_INTERVAL)->getState()) {
autoMoveInterval_->setState(true);
!context_.usScanningProperties.getScanningProperty(Property::AUTO_MOVE_INTERVAL)->getState(),
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
autoMoveInterval_->setDescription(str);
- autoMoveInterval_->update();
}
if (context_.usScanningProperties.getScanningProperty(Property::AUTO_SCAN)->getState())
autoMoveInterval_->disable();
int switch_count = setting_accessibility_universal_switch_dbus_config_get_switch_count(&self->context_.config);
self->switchesItem_->setDescription(getValueUnitText(&switch_count, NULL, "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SWITCHES", false, {}));
- self->switchesItem_->update();
}
void UniversalSwitchSettingsPage::feedbackVoiceCb()
feedbackVoice_->setDescription(
state ? "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_ON" : "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
feedbackVoice_->setState(state);
- feedbackVoice_->update();
context_.usScanningProperties.getScanningProperty(Property::FEEDBACK_VOICE)->setState(state);
});
auto nestedSetValuePagePtr = nestedSetValuePage_.get();
context_.usScanningProperties.getScanningProperty(Property::FEEDBACK_VOICE)->setSecondValue(media_level);
feedbackVoiceSpeechVolume_->setDescription(mediaLevel[item_id].first);
- feedbackVoiceSpeechVolume_->update();
}
void UniversalSwitchSettingsPage::feedbackVoiceSpeechRateChangedCb(size_t item_id)
context_.usScanningProperties.getScanningProperty(Property::FEEDBACK_VOICE)->setFirstValue(media_level);
feedbackVoiceSpeechRate_->setDescription(mediaLevel[item_id].first);
- feedbackVoiceSpeechRate_->update();
}
void UniversalSwitchSettingsPage::feedbackSoundCb()
context_.usScanningProperties.getScanningProperty(Property::FEEDBACK_SOUND)->setFirstValue(media_level);
feedbackSoundVolume_->setDescription(mediaLevel[item_id].first);
- feedbackSoundVolume_->update();
}
void UniversalSwitchSettingsPage::feedbackSoundSwitchChangedCb(bool state)
context_.usScanningProperties.getScanningProperty(Property::FEEDBACK_SOUND)->setState(state);
feedbackSound_->setState(state);
feedbackSound_->setDescription(state ? "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_ON" : "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
- feedbackSound_->update();
}
void UniversalSwitchSettingsPage::cursorColorListItemChangedCb(size_t item_id)
context_.usScanningProperties.getScanningProperty(Property::CURSOR_COLOR)->setFirstValue<int>(cursorColors[item_id].second);
cursorColor_->setDescription(cursorColors[item_id].first);
- cursorColor_->update();
}
void UniversalSwitchSettingsPage::autoMoveIntervalSwitchChangedCb(bool state)
!context_.usScanningProperties.getScanningProperty(Property::AUTO_MOVE_INTERVAL)->getState(),
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
autoMoveInterval_->setDescription(str);
- autoMoveInterval_->update();
}
void UniversalSwitchSettingsPage::autoTapSwitchChangedCb(bool state)
!state,
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
autoTap_->setDescription(str);
- autoTap_->update();
}
void UniversalSwitchSettingsPage::autoTapValueChangedCb(double value)
!context_.usScanningProperties.getScanningProperty(Property::AUTO_TAP)->getState(),
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
autoTap_->setDescription(str);
- autoTap_->update();
}
void UniversalSwitchSettingsPage::sglInactionIntervalSwitchChangedCb(bool state)
!state,
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
singleInteractionInterval_->setDescription(str);
- singleInteractionInterval_->update();
}
void UniversalSwitchSettingsPage::sglInactionIntervalValueChangedCb(double value)
context_.usScanningProperties.getScanningProperty(Property::SINGLE_INTERACTION_INTERVAL)->setFirstValue(value);
auto str = getValueUnitText(NULL, &value, "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS", !context_.usScanningProperties.getScanningProperty(Property::SINGLE_INTERACTION_INTERVAL)->getState(), "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
singleInteractionInterval_->setDescription(str);
- singleInteractionInterval_->update();
}
void UniversalSwitchSettingsPage::tapDurationSwitchChangedCb(bool state)
!state,
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
tapDuration_->setDescription(str);
- tapDuration_->update();
}
void UniversalSwitchSettingsPage::tapDurationValueChangedCb(double value)
!context_.usScanningProperties.getScanningProperty(Property::TAP_DURATION)->getState(),
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
tapDuration_->setDescription(str);
- tapDuration_->update();
}
void UniversalSwitchSettingsPage::pauseOnFirstSwitchChangedCb(bool state)
!state,
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
pauseOnFirst_->setDescription(str);
- pauseOnFirst_->update();
}
void UniversalSwitchSettingsPage::pauseOnFirstValueChangedCb(double value)
!context_.usScanningProperties.getScanningProperty(Property::PAUSE_ON_FIRST_ITEM)->getState(),
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
pauseOnFirst_->setDescription(str);
- pauseOnFirst_->update();
}
void UniversalSwitchSettingsPage::scanSpeedChangedCb(double value)
// TODO change type to avoid below cast
context_.usScanningProperties.getScanningProperty(Property::POINT_SCAN_SPEED)->setFirstValue<int>(value);
scanSpeed_->setDescription(std::to_string(static_cast<int>(value)));
- scanSpeed_->update();
}
void UniversalSwitchSettingsPage::createScanDirectionCtxPopup()
{
context_.usScanningProperties.getScanningProperty(Property::SCAN_DIRECTION)->setFirstValue(scan_dir);
scanDirection_->setDescription(getScanDirectionText(scan_dir));
- scanDirection_->update();
}
void UniversalSwitchSettingsPage::createScanMethodCtxPopup()
{
context_.usScanningProperties.getScanningProperty(Property::SCAN_METHOD)->setFirstValue(scan_method);
scanMethod_->setDescription(getScanMethodText(scan_method));
- scanMethod_->update();
}
void UniversalSwitchSettingsPage::scanNumberChangedCb(double value)
{
context_.usScanningProperties.getScanningProperty(Property::AUTO_SCAN)->setSecondValue(static_cast<int>(value));
scansNum_->setDescription(std::to_string(static_cast<double>(value)));
- scansNum_->update();
}
void UniversalSwitchSettingsPage::autoScanIntervalChangedCb(double value)
context_.usScanningProperties.getScanningProperty(Property::AUTO_SCAN)->setFirstValue(value);
autoScanInterval_->setDescription(
getValueUnitText(NULL, &value, "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS", false, {}));
- autoScanInterval_->update();
}
void UniversalSwitchSettingsPage::autoMoveIntervalValueChangedCb(double value)
!context_.usScanningProperties.getScanningProperty(Property::AUTO_MOVE_INTERVAL)->getState(),
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
autoMoveInterval_->setDescription(str);
- autoMoveInterval_->update();
}
void UniversalSwitchSettingsPage::onManageMenuOptions()