From 3cca7e9f25166c995a9b9b7bca5beb20be969ac7 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Tue, 8 Jul 2025 10:58:56 +0200 Subject: Comment out unused preferences --- Map/Data/ExportFormats.swift | 55 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Map/Data/ExportFormats.swift (limited to 'Map/Data/ExportFormats.swift') diff --git a/Map/Data/ExportFormats.swift b/Map/Data/ExportFormats.swift new file mode 100644 index 0000000..b0b916b --- /dev/null +++ b/Map/Data/ExportFormats.swift @@ -0,0 +1,55 @@ +import SwiftUI +import UniformTypeIdentifiers + +enum ExportFormats: String, CaseIterable { + case png + case jpeg + case tiff + case bmp + case gif + + var title: String { + switch self { + case .png: + String(localized: "export_formats.png") + case .jpeg: + String(localized: "export_formats.jpeg") + case .tiff: + String(localized: "export_formats.tiff") + case .bmp: + String(localized: "export_formats.bmp") + case .gif: + String(localized: "export_formats.gif") + } + } + + var utType: UTType { + switch self { + case .png: + .png + case .jpeg: + .jpeg + case .tiff: + .tiff + case .bmp: + .bmp + case .gif: + .gif + } + } + + var fileType: NSBitmapImageRep.FileType { + switch self { + case .png: + .png + case .jpeg: + .jpeg + case .tiff: + .tiff + case .bmp: + .bmp + case .gif: + .gif + } + } +} -- cgit