KMBatchCollectionViewModel.swift 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // KMBatchCollectionViewModel.swift
  3. // PDF Master
  4. //
  5. // Created by lizhe on 2023/1/12.
  6. //
  7. import Cocoa
  8. enum KMBatchCollectionViewType: String {
  9. case unknow = "unknow"
  10. case convertPDF = "ConvertPDF"
  11. case compress = "Compress"
  12. case security = "Security"
  13. case watermark = "Watermark"
  14. case background = "Background"
  15. case headerAndFooter = "Header & Footer"
  16. case batesNumber = "Bates Number"
  17. case batchRemove = "Batch Remove"
  18. static func typeOfRawVale(value: String) -> KMBatchCollectionViewType {
  19. var type: KMBatchCollectionViewType
  20. switch value {
  21. case "ConvertPDF": type = .convertPDF
  22. case "Compress": type = .compress
  23. case "Security": type = .security
  24. case "Watermark": type = .watermark
  25. case "Background": type = .background
  26. case "Header & Footer": type = .headerAndFooter
  27. case "Bates Number": type = .batesNumber
  28. case "Batch Remove": type = .batchRemove
  29. default:
  30. type = .convertPDF
  31. }
  32. return type
  33. }
  34. }
  35. class KMBatchCollectionViewModel: NSObject {
  36. var imageString: String = ""
  37. var selectImageString: String = ""
  38. var title: String = ""
  39. var isSelect: Bool = false
  40. var type: KMBatchCollectionViewType = .convertPDF
  41. }