Audacity 3.2.0
|
#include <Prefs.h>
Public Member Functions | |
template<typename Key > | |
EnumSettingBase (Key &&key, EnumValueSymbols symbols, long defaultSymbol, std::vector< int > intValues, const wxString &oldKey={}) | |
Public Member Functions inherited from ChoiceSetting | |
ChoiceSetting (const SettingPath &, EnumValueSymbols, long=-1)=delete | |
ChoiceSetting (TransactionalSettingBase &key, EnumValueSymbols symbols, long defaultSymbol=-1) | |
ChoiceSetting (const SettingBase &key, EnumValueSymbols symbols, long defaultSymbol=-1) | |
const wxString & | Key () const |
const EnumValueSymbol & | Default () const |
const EnumValueSymbols & | GetSymbols () const |
wxString | Read () const |
wxString | ReadWithDefault (const wxString &) const |
bool | Write (const wxString &value) |
void | SetDefault (long value) |
Protected Member Functions | |
int | ReadInt () const |
int | ReadIntWithDefault (int defaultValue) const |
bool | WriteInt (int code) |
size_t | FindInt (int code) const |
void | Migrate (wxString &) override |
Protected Member Functions inherited from ChoiceSetting | |
size_t | Find (const wxString &value) const |
virtual void | Migrate (wxString &) |
Private Attributes | |
std::vector< int > | mIntValues |
const wxString | mOldKey |
Additional Inherited Members | |
Protected Attributes inherited from ChoiceSetting | |
const wxString | mKey |
const EnumValueSymbols | mSymbols |
TransactionalSettingBase *const | mpOtherSettings {} |
bool | mMigrated { false } |
long | mDefaultSymbol |
Extends ChoiceSetting with a corresponding table of integer codes (generally not equal to their table positions), and optionally an old preference key path that stored integer codes, to be migrated into one that stores internal string values instead
|
inline |
intValues.size() == symbols.size()
Definition at line 477 of file Prefs.h.
|
protected |
Definition at line 467 of file Prefs.cpp.
References mIntValues.
Referenced by Migrate(), ReadIntWithDefault(), and WriteInt().
|
overrideprotectedvirtual |
Reimplemented from ChoiceSetting.
Reimplemented in SpectrogramSettings::ColorSchemeEnumSetting.
Definition at line 475 of file Prefs.cpp.
References FindInt(), audacity::BasicSettings::Flush(), gPrefs, ChoiceSetting::mDefaultSymbol, mOldKey, ChoiceSetting::mSymbols, audacity::BasicSettings::Read(), and ChoiceSetting::Write().
|
protected |
Definition at line 444 of file Prefs.cpp.
References ChoiceSetting::Find(), mIntValues, and ChoiceSetting::Read().
|
protected |
Definition at line 452 of file Prefs.cpp.
References ChoiceSetting::Find(), FindInt(), mIntValues, ChoiceSetting::mSymbols, and ChoiceSetting::ReadWithDefault().
|
protected |
Definition at line 502 of file Prefs.cpp.
References FindInt(), Internal, ChoiceSetting::mSymbols, and ChoiceSetting::Write().
|
private |
Definition at line 507 of file Prefs.h.
Referenced by FindInt(), ReadInt(), and ReadIntWithDefault().
|
private |