30 wxCommandEvent e{ EVT_PROJECT_SETTINGS_CHANGE };
31 e.SetInt(
static_cast<int>( code ) );
32 e.SetExtraLong( previousValue );
33 project.ProcessEvent( e );
40 auto result = std::make_shared< ProjectSettings >( project );
60 gPrefs->
Read(wxT(
"/SelectionFormat"), wxT(
"")))
64 gPrefs->
Read(wxT(
"/FrequencySelectionFormatName"), wxT(
"")) )
68 gPrefs->
Read(wxT(
"/BandwidthSelectionFormatName"), wxT(
"")) )
72 gPrefs->
Read(wxT(
"/AudioTimeFormat"), wxT(
"hh:mm:ss")))
75, mCurrentBrushRadius ( 5 )
79 bool multiToolActive =
false;
80 gPrefs->Read(wxT(
"/GUI/ToolBars/Tools/MultiToolActive"), &multiToolActive);
99 gPrefs->Read(wxT(
"/GUI/TracksFitVerticallyZoomed"),
111 mRate = QualityDefaultSampleRate.Read();
114 bar.SetRate( mRate );
182#ifdef EXPERIMENTAL_SYNC_LOCK
201 xmlFile.WriteAttr(wxT(
"snapto"),
settings.GetSnapTo() ? wxT(
"on") : wxT(
"off"));
202 xmlFile.WriteAttr(wxT(
"selectionformat"),
203 settings.GetSelectionFormat().Internal());
204 xmlFile.WriteAttr(wxT(
"frequencyformat"),
205 settings.GetFrequencySelectionFormatName().Internal());
206 xmlFile.WriteAttr(wxT(
"bandwidthformat"),
207 settings.GetBandwidthSelectionFormatName().Internal());
217 {
"snapto", [](
auto &
settings,
auto value){
218 settings.SetSnapTo(value.ToWString() == wxT(
"on") ? true :
false);
220 {
"selectionformat", [](
auto &
settings,
auto value){
224 {
"frequencyformat", [](
auto &
settings,
auto value){
225 settings.SetFrequencySelectionFormatName(
229 {
"bandwidthformat", [](
auto &
settings,
auto value){
230 settings.SetBandwidthSelectionFormatName(
gPrefs Read(wxT("/GUI/VerticalZooming"), &bVZoom, false)
static const AudacityProject::AttachedObjects::RegisteredFactory sProjectSettingsKey
static ProjectFileIORegistry::AttributeWriterEntry entry
wxDEFINE_EVENT(EVT_PROJECT_SETTINGS_CHANGE, wxCommandEvent)
static ProjectFileIORegistry::AttributeReaderEntries entries
static Settings & settings()
ChoiceSetting TracksBehaviorsSolo
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Client code makes static instance from a factory of attachments; passes it to Get or Find as a retrie...
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
NumericConverter provides the advanced formatting control used in the selection bar of Audacity.
static NumericFormatSymbol LookupFormat(Type type, const wxString &id)
Holds various per-project settings values, and sends events to the project when certain values change...
static ProjectSettings & Get(AudacityProject &project)
ProjectSettings(AudacityProject &project)
NumericFormatSymbol mBandwidthSelectionFormatName
const NumericFormatSymbol & GetBandwidthSelectionFormatName() const
bool mTracksFitVerticallyZoomed
void SetSyncLock(bool flag)
const NumericFormatSymbol & GetFrequencySelectionFormatName() const
AudacityProject & mProject
bool IsSyncLocked() const
const NumericFormatSymbol & GetSelectionFormat() const
void SetSelectionFormat(const NumericFormatSymbol &format)
NumericFormatSymbol mAudioTimeFormat
NumericFormatSymbol mSelectionFormat
void UpdatePrefs() override
void SetBandwidthSelectionFormatName(const NumericFormatSymbol &format)
void SetAudioTimeFormat(const NumericFormatSymbol &format)
const NumericFormatSymbol & GetAudioTimeFormat() const
void SetFrequencySelectionFormatName(const NumericFormatSymbol &format)
NumericFormatSymbol mFrequencySelectionFormatName
static SelectionBar & Get(AudacityProject &project)
static TrackList & Get(AudacityProject &project)
Base class for XMLFileWriter and XMLStringWriter that provides the general functionality for creating...
void Notify(AudacityProject &project, ProjectSettings::EventCode code, long previousValue)
Typically statically constructed.