From d01a4df546b553128400f6c68eefa8368b4113a8 Mon Sep 17 00:00:00 2001 From: Rubén Beltrán del Río Date: Fri, 27 Mar 2026 16:10:46 +0100 Subject: Use actual components for preference pages --- src/actions.rs | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'src/actions.rs') diff --git a/src/actions.rs b/src/actions.rs index 09b7d4b..e5ea0e5 100644 --- a/src/actions.rs +++ b/src/actions.rs @@ -18,6 +18,7 @@ use std::path::PathBuf; use wmap_renderer::StageType; use crate::preferences::UserPreferences; +use crate::preferences::models::StageLabel; #[derive(Debug, Clone, Copy)] pub enum ImageFormat { @@ -74,3 +75,38 @@ pub enum Action { PreferencesWindowClosed, ReloadPreferences, } + +#[derive(Debug, Clone)] +pub enum PreferencesAction { + // General page actions + Export, + Import, + ImportFromFile(PathBuf), + ExportToFile(PathBuf), + ResetToDefaults, + + // Preference updates from pages + SetShowMapBackground(bool), + SetUseCustomFont(bool), + SetCustomFontName(String), + SetDefaultExportFormat(String), + SetUseSmartLabelPositioning(bool), + + SetUseCustomEditorFont(bool), + SetCustomEditorFontName(String), + SetEditorFontSize(f64), + SetSoftWrapLines(bool), + + // Templates + AddTemplate(String), + RemoveTemplate(uuid::Uuid), + SetTemplateContent(uuid::Uuid, String), + SetTemplateName(uuid::Uuid, String), + SetDefaultTemplate(uuid::Uuid), + + // Custom stages + AddCustomStage, + RemoveCustomStage(uuid::Uuid), + SetCustomStageName(uuid::Uuid, String), + SetCustomStageLabel(uuid::Uuid, StageLabel, String), +} -- cgit