Audacity  3.0.3
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 dependency graph for ProjectSettings.cpp:

Go to the source code of this file.

Namespaces

 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::WriterEntry entry
 
static ProjectFileIORegistry::AttributeReaderEntries entries
 

Function Documentation

◆ wxDEFINE_EVENT()

wxDEFINE_EVENT ( EVT_PROJECT_SETTINGS_CHANGE  ,
wxCommandEvent   
)

Variable Documentation

◆ entries

Initial value:
{
{ L"snapto", [](auto &settings, auto value){
settings.SetSnapTo(wxString(value) == wxT("on") ? true : false);
} },
{ L"selectionformat", [](auto &settings, auto value){
settings.SetSelectionFormat(
} },
{ L"frequencyformat", [](auto &settings, auto value){
settings.SetFrequencySelectionFormatName(
} },
{ L"bandwidthformat", [](auto &settings, auto value){
settings.SetBandwidthSelectionFormatName(
} },
} }

Definition at line 210 of file ProjectSettings.cpp.

Referenced by EffectUIHost::Initialize(), and 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());
}
}

Definition at line 197 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 37 of file ProjectSettings.cpp.

Referenced by ProjectSettings::Get().

XMLWriter
Base class for XMLFileWriter and XMLStringWriter that provides the general functionality for creating...
Definition: XMLWriter.h:23
ProjectSettings::Get
static ProjectSettings & Get(AudacityProject &project)
Definition: ProjectSettings.cpp:44
NumericConverter::BANDWIDTH
@ BANDWIDTH
Definition: NumericTextCtrl.h:55
NumericConverter::LookupFormat
static NumericFormatSymbol LookupFormat(Type type, const wxString &id)
Definition: NumericTextCtrl.cpp:704
NumericConverter::TIME
@ TIME
Definition: NumericTextCtrl.h:52
NumericConverter::FREQUENCY
@ FREQUENCY
Definition: NumericTextCtrl.h:54
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:92
settings
static Settings & settings()
Definition: TrackInfo.cpp:86
ProjectSettings
Holds various per-project settings values, and sends events to the project when certain values change...
Definition: ProjectSettings.h:60