Audacity 3.2.0
Namespaces | Functions | Variables
ProjectSettings.cpp File Reference
#include "ProjectSettings.h"
#include "AudioIOBase.h"
#include "Project.h"
#include "QualitySettings.h"
#include "widgets/NumericTextCtrl.h"
#include "prefs/TracksBehaviorsPrefs.h"
#include "XMLWriter.h"
#include "XMLTagHandler.h"
Include dependency graph for ProjectSettings.cpp:

Go to the source code of this file.

Namespaces

namespace  anonymous_namespace{ProjectSettings.cpp}
 

Functions

 wxDEFINE_EVENT (EVT_PROJECT_SETTINGS_CHANGE, wxCommandEvent)
 
void anonymous_namespace{ProjectSettings.cpp}::Notify (AudacityProject &project, ProjectSettings::EventCode code, long previousValue)
 

Variables

static const AudacityProject::AttachedObjects::RegisteredFactory sProjectSettingsKey
 
static ProjectFileIORegistry::AttributeWriterEntry entry
 
static ProjectFileIORegistry::AttributeReaderEntries entries
 

Function Documentation

◆ wxDEFINE_EVENT()

wxDEFINE_EVENT ( EVT_PROJECT_SETTINGS_CHANGE  ,
wxCommandEvent   
)

Variable Documentation

◆ entries

Initial value:
{
{ "snapto", [](auto &settings, auto value){
settings.SetSnapTo(value.ToWString() == wxT("on") ? true : false);
} },
{ "selectionformat", [](auto &settings, auto value){
NumericConverter::TIME, value.ToWString()));
} },
{ "frequencyformat", [](auto &settings, auto value){
settings.SetFrequencySelectionFormatName(
NumericConverter::FREQUENCY, value.ToWString()));
} },
{ "bandwidthformat", [](auto &settings, auto value){
settings.SetBandwidthSelectionFormatName(
NumericConverter::BANDWIDTH, value.ToWString()));
} },
} }
wxT("CloseDown"))
static Settings & settings()
Definition: TrackInfo.cpp:87
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:89
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)

Definition at line 211 of file ProjectSettings.cpp.

Referenced by PrefsDialog::PrefsDialog().

◆ entry

Initial value:
{
[](const AudacityProject &project, XMLWriter &xmlFile){
auto &settings = ProjectSettings::Get(project);
xmlFile.WriteAttr(wxT("snapto"), settings.GetSnapTo() ? wxT("on") : wxT("off"));
xmlFile.WriteAttr(wxT("selectionformat"),
settings.GetSelectionFormat().Internal());
xmlFile.WriteAttr(wxT("frequencyformat"),
settings.GetFrequencySelectionFormatName().Internal());
xmlFile.WriteAttr(wxT("bandwidthformat"),
settings.GetBandwidthSelectionFormatName().Internal());
}
}
Base class for XMLFileWriter and XMLStringWriter that provides the general functionality for creating...
Definition: XMLWriter.h:26

Definition at line 198 of file ProjectSettings.cpp.

Referenced by CommandManager::AddGlobalCommand(), CommandManager::AddItem(), MacrosWindow::AddItem(), CommandManager::AddItemList(), MacroCommandsCatalog::ByCommandId(), AttachedVirtualFunction< Tag, Return, This, Arguments >::Call(), CommandManager::Check(), CommandManager::DoRepeatProcess(), CommandManager::Enable(), CommandManager::EnableUsingFlags(), CommandManager::FilterKeyEvent(), EditToolBar::ForAllButtons(), CommandManager::FormatLabelForMenu(), CommandManager::FormatLabelWithDisabledAccel(), AVDictionaryWrapper::Get(), anonymous_namespace{ScrubState.cpp}::ScrubQueue::Get(), CommandManager::GetAllCommandData(), CommandManager::GetAllCommandLabels(), CommandManager::GetAllCommandNames(), CommandManager::GetCategories(), CommandManager::GetCategoryFromName(), CommandManager::GetDefaultKeyFromName(), CommandManager::GetEnabled(), CommandManager::GetKeyFromName(), CommandManager::GetLabelFromName(), CommandManager::GetMenuBar(), ExportFLAC::GetMetadata(), CommandManager::GetNameFromNumericID(), CommandManager::GetPrefixedLabelFromName(), FileDialog::GTKFilterChanged(), CommandManager::HandleCommandEntry(), CommandManager::HandleMenuID(), CommandManager::HandleTextualCommand(), AVDictionaryWrapper::HasValue(), BuiltinCommandsModule::Initialize(), BuiltinEffectsModule::Initialize(), CommandManager::Modify(), CommandManager::NewIdentifier(), MacroCommandDialog::PopulateCommandList(), EffectsPrefs::PopulateOrExchange(), CommandParameters::ReadEnum(), anonymous_namespace{NoiseReduction.cpp}::readPrefs(), ToolsToolBar::RegenerateTooltips(), TranscriptionToolBar::RegenerateTooltips(), CommandManager::RemoveDuplicateShortcuts(), ToolManager::Reset(), CommandManager::SetCommandFlags(), FileDialog::SetFileExtension(), CommandManager::SetKeyFromIndex(), CommandManager::SetKeyFromName(), CommandManager::UpdateCheckmarks(), anonymous_namespace{NoiseReduction.cpp}::writePrefs(), and CommandManager::WriteXML().

◆ sProjectSettingsKey

const AudacityProject::AttachedObjects::RegisteredFactory sProjectSettingsKey
static
Initial value:
{
[]( AudacityProject &project ){
auto result = std::make_shared< ProjectSettings >( project );
return result;
}
}

Definition at line 38 of file ProjectSettings.cpp.

Referenced by ProjectSettings::Get().