70 lines
1.3 KiB
C++
70 lines
1.3 KiB
C++
/**********************************************************************
|
|
|
|
Audacity: A Digital Audio Editor
|
|
|
|
WaveformSettings.h
|
|
|
|
Paul Licameli
|
|
|
|
**********************************************************************/
|
|
|
|
#ifndef __AUDACITY_WAVEFORM_SETTINGS__
|
|
#define __AUDACITY_WAVEFORM_SETTINGS__
|
|
|
|
class wxArrayStringEx;
|
|
|
|
class WaveformSettings
|
|
{
|
|
public:
|
|
|
|
// Singleton for settings that are not per-track
|
|
class Globals
|
|
{
|
|
public:
|
|
static Globals &Get();
|
|
void SavePrefs();
|
|
|
|
private:
|
|
Globals();
|
|
void LoadPrefs();
|
|
};
|
|
|
|
static WaveformSettings &defaults();
|
|
WaveformSettings();
|
|
WaveformSettings(const WaveformSettings &other);
|
|
WaveformSettings& operator= (const WaveformSettings &other);
|
|
~WaveformSettings();
|
|
|
|
bool IsDefault() const
|
|
{
|
|
return this == &defaults();
|
|
}
|
|
|
|
bool Validate(bool quiet);
|
|
void LoadPrefs();
|
|
void SavePrefs();
|
|
void Update();
|
|
|
|
void ConvertToEnumeratedDBRange();
|
|
void ConvertToActualDBRange();
|
|
void NextLowerDBRange();
|
|
void NextHigherDBRange();
|
|
|
|
typedef int ScaleType;
|
|
enum ScaleTypeValues : int {
|
|
stLinear,
|
|
stLogarithmic,
|
|
|
|
stNumScaleTypes,
|
|
};
|
|
|
|
static const wxArrayStringEx &GetScaleNames();
|
|
|
|
ScaleType scaleType;
|
|
int dBRange;
|
|
|
|
// Convenience
|
|
bool isLinear() const { return stLinear == scaleType; }
|
|
};
|
|
#endif
|