Audacity 3.2.0
|
Waveform settings, either for one track or as defaults. More...
#include <WaveformSettings.h>
Classes | |
class | Globals |
Public Types | |
enum | ScaleTypeValues : int { stLinearAmp , stLogarithmicDb , stLinearDb , stNumScaleTypes } |
typedef int | ScaleType |
Public Types inherited from ClientData::Cloneable< Covariant, Owner > | |
using | Base = std::conditional_t< std::is_void_v< Covariant >, Cloneable, Covariant > |
using | PointerType = Owner< Base > |
Public Member Functions | |
WaveformSettings () | |
WaveformSettings (const WaveformSettings &other) | |
WaveformSettings & | operator= (const WaveformSettings &other) |
~WaveformSettings () override | |
PointerType | Clone () const override |
bool | IsDefault () const |
bool | Validate (bool quiet) |
void | LoadPrefs () |
void | SavePrefs () |
void | Update () |
void | UpdatePrefs () override |
void | ConvertToEnumeratedDBRange () |
void | ConvertToActualDBRange () |
void | NextLowerDBRange () |
void | NextHigherDBRange () |
bool | isLinear () const |
Public Member Functions inherited from PrefsListener | |
PrefsListener () | |
virtual | ~PrefsListener () |
virtual void | UpdatePrefs ()=0 |
Public Member Functions inherited from ClientData::Cloneable< Covariant, Owner > | |
Cloneable ()=default | |
Cloneable (const Cloneable &)=default | |
Cloneable & | operator= (const Cloneable &)=default |
virtual | ~Cloneable ()=default |
virtual PointerType | Clone () const =0 |
Static Public Member Functions | |
static WaveformSettings & | Get (const WaveTrack &track) |
static WaveformSettings & | Get (const WaveChannel &channel) |
static void | Set (WaveChannel &channel, std::unique_ptr< WaveformSettings > pSettings) |
Guarantee independence of settings, then assign. More... | |
static WaveformSettings & | defaults () |
static const EnumValueSymbols & | GetScaleNames () |
static void | GetRangeChoices (TranslatableStrings *pChoices, wxArrayStringEx *pCodes, int *pDefaultRangeIndex=nullptr) |
Static Public Member Functions inherited from PrefsListener | |
static void | Broadcast (int id=0) |
Call this static function to notify all PrefsListener objects. More... | |
Public Attributes | |
ScaleType | scaleType |
int | dBRange |
Static Public Attributes | |
static const wxString | waveformScaleKey |
static const wxString | dbLogValueString = wxT("dB") |
static const wxString | dbLinValueString = wxT("dBLin") |
static EnumSetting< ScaleTypeValues > | waveformScaleSetting |
Additional Inherited Members | |
Protected Member Functions inherited from PrefsListener | |
virtual void | UpdateSelectedPrefs (int id) |
Waveform settings, either for one track or as defaults.
Definition at line 22 of file WaveformSettings.h.
typedef int WaveformSettings::ScaleType |
Definition at line 78 of file WaveformSettings.h.
enum WaveformSettings::ScaleTypeValues : int |
Enumerator | |
---|---|
stLinearAmp | |
stLogarithmicDb | |
stLinearDb | |
stNumScaleTypes |
Definition at line 79 of file WaveformSettings.h.
WaveformSettings::WaveformSettings | ( | ) |
Definition at line 89 of file WaveformSettings.cpp.
References LoadPrefs().
WaveformSettings::WaveformSettings | ( | const WaveformSettings & | other | ) |
Definition at line 94 of file WaveformSettings.cpp.
|
override |
Definition at line 242 of file WaveformSettings.cpp.
|
overridevirtual |
Implements ClientData::Cloneable< Covariant, Owner >.
Definition at line 246 of file WaveformSettings.cpp.
void WaveformSettings::ConvertToActualDBRange | ( | ) |
Definition at line 177 of file WaveformSettings.cpp.
References dBRange, GetRangeChoices(), and min().
Referenced by WaveformPrefs::Commit(), NextHigherDBRange(), NextLowerDBRange(), WaveformPrefs::Validate(), and Validate().
void WaveformSettings::ConvertToEnumeratedDBRange | ( | ) |
Definition at line 162 of file WaveformSettings.cpp.
References dBRange, and GetRangeChoices().
Referenced by WaveformPrefs::Commit(), NextHigherDBRange(), NextLowerDBRange(), WaveformPrefs::OnDefaults(), WaveformPrefs::Validate(), Validate(), and WaveformPrefs::WaveformPrefs().
|
static |
Definition at line 109 of file WaveformSettings.cpp.
Referenced by WaveformPrefs::Commit(), WaveformPrefs::OnDefaults(), UpdatePrefs(), and WaveformPrefs::WaveformPrefs().
|
static |
Create waveform settings for the track on demand Mutative access to attachment even if the track argument is const
Definition at line 78 of file WaveformSettings.cpp.
References Get(), and WaveChannel::GetTrack().
|
static |
Create waveform settings for the track on demand Mutative access to attachment even if the track argument is const
Definition at line 72 of file WaveformSettings.cpp.
References key1.
Referenced by SetTrackVisualsCommand::ApplyInner(), EnvelopeHandle::Click(), WaveformPrefs::Commit(), WaveformView::DoDraw(), WaveformVRulerControls::DoHandleWheelRotation(), WaveformVRulerControls::DoUpdateVRuler(), WaveformVZoomHandle::DoZoom(), anonymous_namespace{WaveformView.cpp}::DrawClipWaveform(), SampleHandle::FindSampleEditingLevel(), for(), Get(), SampleHandle::HitTest(), WaveformVRulerMenuTable::OnWaveformScaleType(), anonymous_namespace{WaveformVRulerControls.cpp}::SetLastdBRange(), anonymous_namespace{WaveformVRulerControls.cpp}::SetLastScaleType(), EnvelopeHandle::WaveChannelHitTest(), and WaveformPrefs::WaveformPrefs().
|
static |
Definition at line 213 of file WaveformSettings.cpp.
Referenced by ConvertToActualDBRange(), ConvertToEnumeratedDBRange(), GUIPrefs::Populate(), and WaveformPrefs::Populate().
|
static |
Definition at line 202 of file WaveformSettings.cpp.
Referenced by WaveformPrefs::PopulateOrExchange().
|
inline |
Definition at line 61 of file WaveformSettings.h.
|
inline |
Definition at line 101 of file WaveformSettings.h.
Referenced by EnvelopeHandle::Click(), WaveformView::DoDraw(), and EnvelopeHandle::WaveChannelHitTest().
void WaveformSettings::LoadPrefs | ( | ) |
Definition at line 127 of file WaveformSettings.cpp.
References dBRange, DecibelScaleCutoff, Setting< T >::Read(), EnumSetting< Enum >::ReadEnum(), scaleType, Update(), Validate(), and waveformScaleSetting.
Referenced by WaveformPrefs::Commit(), and WaveformSettings().
void WaveformSettings::NextHigherDBRange | ( | ) |
Definition at line 194 of file WaveformSettings.cpp.
References ConvertToActualDBRange(), ConvertToEnumeratedDBRange(), and dBRange.
void WaveformSettings::NextLowerDBRange | ( | ) |
Definition at line 187 of file WaveformSettings.cpp.
References ConvertToActualDBRange(), ConvertToEnumeratedDBRange(), and dBRange.
WaveformSettings & WaveformSettings::operator= | ( | const WaveformSettings & | other | ) |
void WaveformSettings::SavePrefs | ( | ) |
Definition at line 139 of file WaveformSettings.cpp.
Referenced by WaveformPrefs::Commit().
|
static |
Guarantee independence of settings, then assign.
Definition at line 83 of file WaveformSettings.cpp.
References WaveChannel::GetTrack(), and key1.
Referenced by WaveformPrefs::Commit().
void WaveformSettings::Update | ( | ) |
Definition at line 143 of file WaveformSettings.cpp.
Referenced by LoadPrefs().
|
overridevirtual |
Implements PrefsListener.
Definition at line 148 of file WaveformSettings.cpp.
References dBRange, DecibelScaleCutoff, defaults(), Setting< T >::Read(), EnumSetting< Enum >::ReadEnum(), scaleType, Validate(), and waveformScaleSetting.
bool WaveformSettings::Validate | ( | bool | quiet | ) |
Definition at line 115 of file WaveformSettings.cpp.
References ConvertToActualDBRange(), ConvertToEnumeratedDBRange(), min(), scaleType, and stNumScaleTypes.
Referenced by LoadPrefs(), UpdatePrefs(), and WaveformPrefs::Validate().
|
static |
Definition at line 94 of file WaveformSettings.h.
|
static |
Definition at line 93 of file WaveformSettings.h.
Referenced by TracksViewModeEnumSetting::Migrate().
int WaveformSettings::dBRange |
Definition at line 98 of file WaveformSettings.h.
Referenced by EnvelopeHandle::Click(), ConvertToActualDBRange(), ConvertToEnumeratedDBRange(), LoadPrefs(), NextHigherDBRange(), NextLowerDBRange(), operator=(), WaveformPrefs::PopulateOrExchange(), UpdatePrefs(), and EnvelopeHandle::WaveChannelHitTest().
ScaleType WaveformSettings::scaleType |
Definition at line 97 of file WaveformSettings.h.
Referenced by SetTrackVisualsCommand::ApplyInner(), for(), LoadPrefs(), WaveformVRulerMenuTable::OnWaveformScaleType(), operator=(), WaveformPrefs::PopulateOrExchange(), UpdatePrefs(), and Validate().
|
static |
Definition at line 92 of file WaveformSettings.h.
Referenced by TracksViewModeEnumSetting::Migrate().
|
static |
Definition at line 95 of file WaveformSettings.h.
Referenced by LoadPrefs(), TracksPrefs::PopulateOrExchange(), and UpdatePrefs().