KMBatchCollectionViewModel.swift 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 = "Convert"
  11. case OCR = "OCR"
  12. case compress = "Compress"
  13. case security = "Security"
  14. case watermark = "Watermark"
  15. case background = "Background"
  16. case headerAndFooter = "Header & Footer"
  17. case batesNumber = "Bates"
  18. case batchRemove = "Batch Remove"
  19. case imageToPDF = "imageToPDF"
  20. static func typeOfRawVale(value: String) -> KMBatchCollectionViewType {
  21. var type: KMBatchCollectionViewType
  22. switch value {
  23. case "Convert": type = .convertPDF
  24. case "OCR": type = .OCR
  25. case "Compress": type = .compress
  26. case "Security": type = .security
  27. case "Watermark": type = .watermark
  28. case "Background": type = .background
  29. case "Header & Footer": type = .headerAndFooter
  30. case "Bates": type = .batesNumber
  31. case "Batch Remove": type = .batchRemove
  32. case "imageToPDF": type = .imageToPDF
  33. default:
  34. type = .convertPDF
  35. }
  36. return type
  37. }
  38. }
  39. class KMBatchCollectionViewModel: NSObject {
  40. var imageString: String = ""
  41. var selectImageString: String = ""
  42. var title: String = ""
  43. var isSelect: Bool = false
  44. var type: KMBatchCollectionViewType = .convertPDF
  45. var isDisable: Bool = false
  46. }