27 using Selection::Selection;
28 enum Kind { SONG, DEFAULT };
29 ThresholdMode(deluge::l10n::String newName, Kind kind_) :
Selection(newName), kind(kind_) {}
33 if (kind == DEFAULT) {
34 this->setValue(FlashStorage::defaultThresholdRecordingMode);
36 else if (currentSong) {
37 this->setValue(currentSong->thresholdRecordingMode);
41 void writeCurrentValue()
override {
42 if (kind == DEFAULT) {
43 FlashStorage::defaultThresholdRecordingMode = this->getValue<ThresholdRecordingMode>();
46 currentSong->thresholdRecordingMode = this->getValue<ThresholdRecordingMode>();
50 deluge::vector<std::string_view> getOptions(OptType optType)
override {
52 using enum l10n::String;
54 l10n::getView(STRING_FOR_DISABLED),
55 l10n::getView(STRING_FOR_LOW),
56 l10n::getView(STRING_FOR_MEDIUM),
57 l10n::getView(STRING_FOR_HIGH),