aboutsummaryrefslogtreecommitdiff
path: root/src/actions.rs
diff options
context:
space:
mode:
authorRubén Beltrán del Río <jj@r.bdr.sh>2026-03-27 16:10:46 +0100
committerRubén Beltrán del Río <jj@r.bdr.sh>2026-03-30 13:39:14 +0200
commitd01a4df546b553128400f6c68eefa8368b4113a8 (patch)
treed290ca78b1215fb450ec7850a74b79fd0ae9707c /src/actions.rs
parent4dec344a7bcbf1d7d0bbbf985109df816470ecc6 (diff)
Use actual components for preference pages
Diffstat (limited to 'src/actions.rs')
-rw-r--r--src/actions.rs36
1 files changed, 36 insertions, 0 deletions
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),
+}