Audacity 3.2.0
WaveformSettings.h
Go to the documentation of this file.
1/**********************************************************************
2
3Audacity: A Digital Audio Editor
4
5WaveformSettings.h
6
7Paul Licameli
8
9**********************************************************************/
10
11#ifndef __AUDACITY_WAVEFORM_SETTINGS__
12#define __AUDACITY_WAVEFORM_SETTINGS__
13
14#include "Prefs.h"
15
17
18class AUDACITY_DLL_API WaveformSettings : public PrefsListener
19{
20public:
21
22 // Singleton for settings that are not per-track
23 class AUDACITY_DLL_API Globals
24 {
25 public:
26 static Globals &Get();
27 void SavePrefs();
28
29 private:
30 Globals();
31 void LoadPrefs();
32 };
33
34 static WaveformSettings &defaults();
37 WaveformSettings& operator= (const WaveformSettings &other);
39
40 bool IsDefault() const
41 {
42 return this == &defaults();
43 }
44
45 bool Validate(bool quiet);
46 void LoadPrefs();
47 void SavePrefs();
48 void Update();
49
50 void UpdatePrefs() override;
51
52 void ConvertToEnumeratedDBRange();
53 void ConvertToActualDBRange();
54 void NextLowerDBRange();
55 void NextHigherDBRange();
56
57 typedef int ScaleType;
58 enum ScaleTypeValues : int {
61
63 };
64
65 static const EnumValueSymbols &GetScaleNames();
66
69
70 // Convenience
71 bool isLinear() const { return stLinear == scaleType; }
72};
73#endif
A listener notified of changes in preferences.
Definition: Prefs.h:543
virtual void UpdatePrefs()=0
Definition: Prefs.cpp:124
Waveform settings, either for one track or as defaults.
bool isLinear() const
bool IsDefault() const
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
Definition: BasicUI.cpp:26