![]() |
Audacity 3.2.0
|
#include <FileConfig.h>
Public Member Functions | |
FileConfig (const wxString &appName=wxEmptyString, const wxString &vendorName=wxEmptyString, const wxString &localFilename=wxEmptyString, const wxString &globalFilename=wxEmptyString, long style=wxCONFIG_USE_LOCAL_FILE|wxCONFIG_USE_GLOBAL_FILE, const wxMBConv &conv=wxConvAuto()) | |
void | Init () |
virtual | ~FileConfig () |
virtual void | SetPath (const wxString &strPath) wxOVERRIDE |
virtual const wxString & | GetPath () const wxOVERRIDE |
virtual bool | GetFirstGroup (wxString &str, long &lIndex) const wxOVERRIDE |
virtual bool | GetNextGroup (wxString &str, long &lIndex) const wxOVERRIDE |
virtual bool | GetFirstEntry (wxString &str, long &lIndex) const wxOVERRIDE |
virtual bool | GetNextEntry (wxString &str, long &lIndex) const wxOVERRIDE |
virtual size_t | GetNumberOfEntries (bool bRecursive=false) const wxOVERRIDE |
virtual size_t | GetNumberOfGroups (bool bRecursive=false) const wxOVERRIDE |
virtual bool | HasGroup (const wxString &strName) const wxOVERRIDE |
virtual bool | HasEntry (const wxString &strName) const wxOVERRIDE |
virtual bool | Flush (bool bCurrentOnly=false) wxOVERRIDE |
virtual bool | RenameEntry (const wxString &oldName, const wxString &newName) wxOVERRIDE |
virtual bool | RenameGroup (const wxString &oldName, const wxString &newName) wxOVERRIDE |
virtual bool | DeleteEntry (const wxString &key, bool bDeleteGroupIfEmpty=true) wxOVERRIDE |
virtual bool | DeleteGroup (const wxString &key) wxOVERRIDE |
virtual bool | DeleteAll () wxOVERRIDE |
void | SetVersionKeysInit (int major, int minor, int micro) |
void | GetVersionKeysInit (int &major, int &minor, int µ) const |
Protected Member Functions | |
virtual bool | DoReadString (const wxString &key, wxString *pStr) const wxOVERRIDE |
virtual bool | DoReadLong (const wxString &key, long *pl) const wxOVERRIDE |
virtual bool | DoWriteString (const wxString &key, const wxString &szValue) wxOVERRIDE |
virtual bool | DoWriteLong (const wxString &key, long lValue) wxOVERRIDE |
virtual void | Warn () |
const FilePath & | GetFilePath () const |
Private Attributes | |
const wxString | mAppName |
const wxString | mVendorName |
const wxString | mLocalFilename |
const wxString | mGlobalFilename |
const long | mStyle |
std::unique_ptr< wxMBConv > | mConv |
std::unique_ptr< wxFileConfig > | mConfig |
int | mVersionMajorKeyInit {} |
int | mVersionMinorKeyInit {} |
int | mVersionMicroKeyInit {} |
bool | mDirty |
Definition at line 20 of file FileConfig.h.
FileConfig::FileConfig | ( | const wxString & | appName = wxEmptyString , |
const wxString & | vendorName = wxEmptyString , |
||
const wxString & | localFilename = wxEmptyString , |
||
const wxString & | globalFilename = wxEmptyString , |
||
long | style = wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_GLOBAL_FILE , |
||
const wxMBConv & | conv = wxConvAuto() |
||
) |
Definition at line 28 of file FileConfig.cpp.
|
virtual |
Definition at line 88 of file FileConfig.cpp.
References mDirty.
|
virtual |
Definition at line 229 of file FileConfig.cpp.
References mConfig, and mDirty.
Referenced by ResetPreferences().
|
virtual |
Definition at line 209 of file FileConfig.cpp.
References key, mConfig, and mDirty.
Referenced by KeyConfigPrefs::Commit(), ModuleSettings::GetModuleStatus(), AudacityApp::OnExit(), KeyConfigPrefs::OnImportDefaults(), anonymous_namespace{AudacityApp.cpp}::PopulatePreferences(), PluginManager::RemoveConfig(), ToolBarConfiguration::Write(), and Importer::WriteImportItems().
|
virtual |
Definition at line 219 of file FileConfig.cpp.
References key, mConfig, and mDirty.
Referenced by TagsEditorDialog::OnSaveDefaults(), anonymous_namespace{AudacityApp.cpp}::PopulatePreferences(), and PluginManager::RemoveConfigSubgroup().
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
Definition at line 143 of file FileConfig.cpp.
References mConfig, mDirty, mLocalFilename, and Warn().
Referenced by SetPreferenceCommand::Apply(), ApplyMacroDialog::ApplyMacroToProject(), ProjectSelectionManager::AS_SetSelectionFormat(), AudacityApp::AssociateFileTypes(), ScreenshotCommand::CapturePreferences(), DeviceToolBar::ChangeHost(), AudioSetupToolBar::ChangeHost(), ExportMP3::CheckFileName(), cloud::audiocom::UserService::ClearUserData(), SettingTransaction::Commit(), DevicePrefs::Commit(), GUIPrefs::Commit(), KeyConfigPrefs::Commit(), TracksPrefs::Commit(), cloud::audiocom::OAuthService::DoAuthorise(), ToolsToolBar::DoToolChanged(), cloud::audiocom::UserService::DownloadAvatar(), AudioSetupToolBar::FillHostDevices(), DeviceToolBar::FillHostDevices(), MP3Exporter::FindLibrary(), AudioIO::Init(), EffectNoiseRemoval::Init(), MP3ExportProcessor::Initialize(), UpdateManager::IsTimeForUpdatesChecking(), LoadFFmpeg(), EnumSettingBase::Migrate(), SpectrogramSettings::ColorSchemeEnumSetting::Migrate(), TracksViewModeEnumSetting::Migrate(), ViewActions::Handler::OnAdvancedVZoom(), ApplyMacroDialog::OnApplyToFiles(), AdornedRulerPanel::OnAutoScroll(), PrefsDialog::OnCancel(), BrowserDialog::OnClose(), ScreenshotBigDialog::OnClose(), FrequencyPlotDialog::OnCloseButton(), ScreenshotBigDialog::OnCloseWindow(), AudioPasteDialog::OnContinue(), ScreenshotBigDialog::OnDirChoose(), SplashDialog::OnDontShow(), AudacityApp::OnExit(), KeyConfigPrefs::OnImportDefaults(), anonymous_namespace{TrackMenus.cpp}::OnMoveSelectionWithTracks(), PrefsDialog::OnOK(), ExportFFmpegOptions::OnOK(), SoundActivatedRecordDialog::OnOK(), TagsEditorDialog::OnOk(), TimerRecordDialog::OnOK(), FFmpegNotFoundDialog::OnOk(), MeterPanel::OnPreferences(), anonymous_namespace{PluginMenus.cpp}::OnResetConfig(), TagsEditorDialog::OnSaveDefaults(), LabelTrackMenuTable::OnSetFont(), ViewActions::Handler::OnShowClipping(), ViewActions::Handler::OnShowExtraMenus(), ViewActions::Handler::OnShowNameOverlay(), anonymous_namespace{TrackMenus.cpp}::OnSyncLock(), AdornedRulerPanel::OnSyncSelToQuickPlay(), anonymous_namespace{TransportMenus.cpp}::OnTogglePlayRecording(), anonymous_namespace{TransportMenus.cpp}::OnToggleSoundActivated(), anonymous_namespace{TransportMenus.cpp}::OnToggleSWPlaythrough(), anonymous_namespace{LabelMenus.cpp}::OnToggleTypeToCreateLabel(), FFmpegImportPlugin::Open(), Registry::OrderingPreferenceInitializer::operator()(), anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::PopulateOrExchange(), anonymous_namespace{AudacityApp.cpp}::PopulatePreferences(), EffectNoiseReduction::Settings::PrefsIO(), ProjectRate::ProjectRate(), ReadSnapTo(), PluginManager::RemoveConfig(), PluginManager::RemoveConfigSubgroup(), CommandManager::RemoveDuplicateShortcuts(), MacrosWindow::SaveChanges(), DependencyDialog::SaveFutureActionChoice(), GlobalPrefsDialog::SavePreferredPage(), PluginManager::SetConfigValue(), Importer::SetDefaultOpenType(), AudioSetupToolBar::SetDevices(), DeviceToolBar::SetDevices(), Importer::SetLastOpenType(), ProjectTimeSignature::SetLowerTimeSignature(), ModuleSettings::SetModuleStatus(), TracksPrefs::SetPinnedHeadPositionPreference(), TracksPrefs::SetPinnedHeadPreference(), Journal::SetRecordEnabled(), ProjectSnap::SetSnapMode(), ProjectSnap::SetSnapTo(), ProjectTimeSignature::SetTempo(), ProjectTimeSignature::SetUpperTimeSignature(), HelpSystem::ShowHelp(), EffectNoiseRemoval::ShowHostInterface(), ShowWarningDialog(), ProjectSelectionManager::SSBL_SetBandwidthSelectionFormatName(), ProjectSelectionManager::SSBL_SetFrequencySelectionFormatName(), UpdateManager::Start(), ProjectSelectionManager::TT_SetAudioTimeFormat(), cloud::audiocom::OAuthService::UnlinkAccount(), EQCurveReader::UpdateDefaultCurves(), anonymous_namespace{SelectionBar.cpp}::UpdateSelectionMode(), cloud::audiocom::UserService::UpdateUserData(), Registry::Visit(), ToolManager::WriteConfig(), Importer::WriteImportItems(), and LabelDialog::WriteSize().
|
inlineprotected |
Definition at line 81 of file FileConfig.h.
Referenced by AudacityFileConfig::Warn().
|
virtual |
Definition at line 113 of file FileConfig.cpp.
Referenced by ModulePrefs::GetAllModuleStatuses(), and Tags::LoadDefaults().
|
virtual |
Definition at line 103 of file FileConfig.cpp.
Referenced by PluginManager::LoadGroup(), and anonymous_namespace{AudacityApp.cpp}::PopulatePreferences().
|
virtual |
Definition at line 118 of file FileConfig.cpp.
Referenced by ModulePrefs::GetAllModuleStatuses(), and Tags::LoadDefaults().
|
virtual |
Definition at line 108 of file FileConfig.cpp.
Referenced by PluginManager::LoadGroup(), and anonymous_namespace{AudacityApp.cpp}::PopulatePreferences().
|
virtual |
Definition at line 123 of file FileConfig.cpp.
References mConfig.
|
virtual |
Definition at line 128 of file FileConfig.cpp.
References mConfig.
|
virtual |
Definition at line 98 of file FileConfig.cpp.
References mConfig.
Referenced by PluginManager::GetSubgroups(), Tags::LoadDefaults(), anonymous_namespace{AudacityApp.cpp}::PopulatePreferences(), ToolManager::ReadConfig(), and ToolManager::WriteConfig().
|
inline |
Definition at line 56 of file FileConfig.h.
Referenced by AudacityApp::InitPart2(), and ToolManager::ReadConfig().
|
virtual |
Definition at line 138 of file FileConfig.cpp.
References mConfig.
Referenced by KeyConfigPrefs::Commit(), DeduceSnapTo(), CommandManager::NewIdentifier(), ReadSnapMode(), and ReadSnapTo().
|
virtual |
Definition at line 133 of file FileConfig.cpp.
References mConfig.
void FileConfig::Init | ( | ) |
Definition at line 45 of file FileConfig.cpp.
References mAppName, mConfig, mConv, mGlobalFilename, mLocalFilename, mStyle, mVendorName, and Warn().
Referenced by AudacityFileConfig::Create().
|
virtual |
|
virtual |
|
virtual |
Definition at line 93 of file FileConfig.cpp.
References mConfig.
Referenced by ModulePrefs::GetAllModuleStatuses(), PluginManager::GetSubgroups(), Tags::LoadDefaults(), PluginManager::LoadGroup(), CommandManager::NewIdentifier(), anonymous_namespace{AudacityApp.cpp}::PopulatePreferences(), ToolManager::ReadConfig(), PluginManager::SaveGroup(), and ToolManager::WriteConfig().
|
inline |
Definition at line 50 of file FileConfig.h.
Referenced by anonymous_namespace{AudacityApp.cpp}::PopulatePreferences().
|
protectedvirtual |
Override to notify the user of error conditions involving writability of config files. Default implementation does nothing
Reimplemented in AudacityFileConfig.
Definition at line 288 of file FileConfig.cpp.
Referenced by Flush(), and Init().
|
private |
Definition at line 84 of file FileConfig.h.
Referenced by Init().
|
private |
Definition at line 91 of file FileConfig.h.
Referenced by DeleteAll(), DeleteEntry(), DeleteGroup(), DoReadLong(), DoReadString(), DoWriteLong(), DoWriteString(), Flush(), GetFirstEntry(), GetFirstGroup(), GetNextEntry(), GetNextGroup(), GetNumberOfEntries(), GetNumberOfGroups(), GetPath(), HasEntry(), HasGroup(), Init(), RenameEntry(), RenameGroup(), and SetPath().
|
private |
Definition at line 89 of file FileConfig.h.
Referenced by Init().
|
private |
Definition at line 99 of file FileConfig.h.
Referenced by DeleteAll(), DeleteEntry(), DeleteGroup(), DoWriteLong(), DoWriteString(), Flush(), RenameEntry(), RenameGroup(), and ~FileConfig().
|
private |
Definition at line 87 of file FileConfig.h.
Referenced by Init().
|
private |
Definition at line 86 of file FileConfig.h.
|
private |
Definition at line 88 of file FileConfig.h.
Referenced by Init().
|
private |
Definition at line 85 of file FileConfig.h.
Referenced by Init().
|
private |
Definition at line 95 of file FileConfig.h.
|
private |
Definition at line 97 of file FileConfig.h.
|
private |
Definition at line 96 of file FileConfig.h.