Manages user preferences and settings persistence. More...
#include <user_settings.h>

Classes | |
| struct | Preferences |
Public Member Functions | |
| UserSettings () | |
| absl::Status | Load () |
| absl::Status | Save () |
| bool | ApplyPanelLayoutDefaultsRevision (int target_revision) |
| Preferences & | prefs () |
| const Preferences & | prefs () const |
Static Public Attributes | |
| static constexpr int | kLatestPanelLayoutDefaultsRevision = 4 |
Private Attributes | |
| Preferences | prefs_ |
| std::string | settings_file_path_ |
| std::string | legacy_settings_file_path_ |
Manages user preferences and settings persistence.
Definition at line 16 of file user_settings.h.
| yaze::editor::UserSettings::UserSettings | ( | ) |
Definition at line 920 of file user_settings.cc.
References yaze::util::PlatformPaths::GetConfigDirectory(), yaze::util::PlatformPaths::GetUserDocumentsDirectory(), legacy_settings_file_path_, LOG_WARN, and settings_file_path_.

| absl::Status yaze::editor::UserSettings::Load | ( | ) |
Definition at line 942 of file user_settings.cc.
References yaze::util::PlatformPaths::Exists(), yaze::editor::UserSettings::Preferences::font_global_scale, legacy_settings_file_path_, LOG_INFO, LOG_WARN, prefs_, Save(), settings_file_path_, yaze::editor::UserSettings::Preferences::sidebar_panel_expanded, yaze::editor::UserSettings::Preferences::sidebar_visible, and yaze::editor::UserSettings::Preferences::switch_motion_profile.
Referenced by yaze::editor::EditorManager::InitializeServices().

| absl::Status yaze::editor::UserSettings::Save | ( | ) |
Definition at line 1026 of file user_settings.cc.
References legacy_settings_file_path_, prefs_, and settings_file_path_.
Referenced by yaze::editor::MenuOrchestrator::AddAppearanceMenuItems(), yaze::editor::SettingsPanel::DrawAIAgentSettings(), yaze::editor::SettingsPanel::DrawAppearanceSettings(), yaze::editor::SettingsPanel::DrawEditorBehavior(), yaze::editor::SettingsPanel::DrawEditorShortcuts(), yaze::editor::SettingsPanel::DrawFilesystemSettings(), yaze::editor::SettingsPanel::DrawGlobalShortcuts(), yaze::editor::SettingsPanel::DrawPanelShortcuts(), yaze::editor::SettingsPanel::DrawPerformanceSettings(), Load(), yaze::editor::EditorManager::SetFontGlobalScale(), and yaze::editor::EditorManager::UpdateEditorState().
| bool yaze::editor::UserSettings::ApplyPanelLayoutDefaultsRevision | ( | int | target_revision | ) |
Definition at line 1005 of file user_settings.cc.
References yaze::editor::UserSettings::Preferences::panel_browser_category_width, yaze::editor::UserSettings::Preferences::panel_layout_defaults_revision, yaze::editor::UserSettings::Preferences::panel_visibility_state, yaze::editor::UserSettings::Preferences::pinned_panels, prefs_, yaze::editor::UserSettings::Preferences::right_panel_widths, yaze::editor::UserSettings::Preferences::saved_layouts, yaze::editor::UserSettings::Preferences::sidebar_active_category, yaze::editor::UserSettings::Preferences::sidebar_panel_expanded, yaze::editor::UserSettings::Preferences::sidebar_panel_width, and yaze::editor::UserSettings::Preferences::sidebar_visible.
Referenced by yaze::editor::EditorManager::ApplyLayoutDefaultsMigrationIfNeeded().
|
inline |
Definition at line 150 of file user_settings.h.
References prefs_.
Referenced by yaze::editor::MenuOrchestrator::AddAppearanceMenuItems(), yaze::editor::EditorManager::ApplyDefaultBackupPolicy(), yaze::editor::AgentEditor::ApplyUserSettingsDefaults(), yaze::editor::SettingsPanel::DrawAIAgentSettings(), yaze::editor::SettingsPanel::DrawAppearanceSettings(), yaze::editor::AgentEditor::DrawConfigurationPanel(), yaze::editor::SettingsPanel::DrawEditorBehavior(), yaze::editor::SettingsPanel::DrawEditorShortcuts(), yaze::editor::SettingsPanel::DrawFilesystemSettings(), yaze::editor::SettingsPanel::DrawGlobalShortcuts(), yaze::editor::EditorManager::DrawInterface(), yaze::editor::SettingsPanel::DrawPanelShortcuts(), yaze::editor::SettingsPanel::DrawPerformanceSettings(), yaze::editor::EditorManager::HandleSessionCreated(), yaze::editor::EditorManager::HandleSessionSwitched(), yaze::editor::EditorManager::Initialize(), yaze::editor::EditorManager::InitializeServices(), yaze::editor::EditorManager::LoadAssets(), yaze::editor::EditorManager::LoadAssetsLazy(), yaze::editor::EditorManager::LoadProjectWithRom(), yaze::editor::AgentEditor::MaybeAutoDetectLocalProviders(), yaze::editor::AgentEditor::RefreshModelCache(), yaze::editor::EditorManager::RefreshResourceLabelProvider(), yaze::editor::EditorManager::SaveProject(), yaze::editor::EditorManager::SaveRom(), yaze::editor::EditorManager::SetFontGlobalScale(), yaze::editor::EditorManager::SetupSidebarCallbacks(), yaze::editor::EditorManager::SetupWelcomeScreenCallbacks(), yaze::editor::EditorManager::SubscribeToEvents(), and yaze::editor::EditorManager::UpdateEditorState().
|
inline |
Definition at line 151 of file user_settings.h.
References prefs_.
|
staticconstexpr |
Definition at line 148 of file user_settings.h.
Referenced by yaze::editor::EditorManager::ApplyLayoutDefaultsMigrationIfNeeded().
|
private |
Definition at line 154 of file user_settings.h.
Referenced by ApplyPanelLayoutDefaultsRevision(), Load(), prefs(), prefs(), and Save().
|
private |
Definition at line 155 of file user_settings.h.
Referenced by Load(), Save(), and UserSettings().
|
private |
Definition at line 156 of file user_settings.h.
Referenced by Load(), Save(), and UserSettings().