KMFastToolCollectionViewItem.swift 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. //
  2. // KMFastToolCollectionViewItem.swift
  3. // PDF Reader Pro
  4. //
  5. // Created by wanjun on 2022/10/20.
  6. //
  7. import Cocoa
  8. public enum DataNavigationViewButtonActionType : Int, CaseIterable {
  9. case Batch = 0 // 批量处理
  10. case ConvertPDF // 转换PDF
  11. case ImageToPDF // 图片转PDF
  12. case MergePDF // 合并
  13. case Compression // 压缩
  14. case Security // 安全
  15. case PDFToPPT // PDF转PPT
  16. case PDFToExcel // PDF转Excel
  17. case PDFToWord // PDF转Word
  18. case PDFToImage // PDF转图片
  19. case Watermark // 水印
  20. case Background // 背景
  21. case HeaderAndFooter// 页眉页脚
  22. case BatesCode // 贝茨码
  23. case Print // 打印
  24. case PrintMultipage // 多页
  25. case PrintPoster // 海报
  26. case PrintBooklet // 小册子
  27. case BatchRemove // 批量移除
  28. case Insert // 插入
  29. case BreakUp // 拆分
  30. case Extract // 提取
  31. case MarkCipher // 标记密文
  32. case PageEdit // 页面编辑
  33. case OCR // 批量OCR
  34. case AutomaticFormRecognition //表单自动识别
  35. case FileCompare // 文件对比
  36. case ComparativeTable // 比较表
  37. case equity // 权益弹窗
  38. case AITools //AI Tools
  39. }
  40. class KMFastToolMode: NSObject {
  41. var toolImageName: String? //图片名称
  42. var toolTitle: String? //主标题
  43. var toolSubtitle: String? //副标题
  44. class func toolModeData(type: DataNavigationViewButtonActionType) -> KMFastToolMode {
  45. let mode: KMFastToolMode = KMFastToolMode()
  46. switch type {
  47. case .Batch:
  48. mode.toolTitle = NSLocalizedString("Batch", comment: "")
  49. mode.toolSubtitle = NSLocalizedString("content content content content content content content content", comment: "")
  50. mode.toolImageName = "icon_pdftools_batch"
  51. break
  52. case .OCR:
  53. mode.toolTitle = NSLocalizedString("OCR", comment: "")
  54. mode.toolSubtitle = NSLocalizedString("Recognize text from image or scanned PDF with OCR", comment: "")
  55. mode.toolImageName = "icon_pdftools_ocr"
  56. break
  57. case .ConvertPDF:
  58. mode.toolTitle = NSLocalizedString("Convert PDF", comment: "")
  59. mode.toolSubtitle = NSLocalizedString("Convert PDFs to Word/HTML/TXT/JPEG/PNG files", comment: "")
  60. mode.toolImageName = "icon_pdftools_convert"
  61. break
  62. case .ImageToPDF:
  63. mode.toolTitle = NSLocalizedString("Image To PDF", comment: "")
  64. mode.toolSubtitle = NSLocalizedString("Convert JPEG/JPG/PNG/TIFF/BMP/PSD files to PDF", comment: "")
  65. mode.toolImageName = "icon_pdftools_image"
  66. break
  67. case .MergePDF:
  68. mode.toolTitle = NSLocalizedString("Merge", comment: "")
  69. mode.toolSubtitle = NSLocalizedString("Combine multiple documents into a new PDF file", comment: "")
  70. mode.toolImageName = "icon_pdftools_merge"
  71. break
  72. case .Compression:
  73. mode.toolTitle = NSLocalizedString("Compress", comment: "")
  74. mode.toolSubtitle = NSLocalizedString("Reduce files size to make sure you can easily send them by mail", comment: "")
  75. mode.toolImageName = "icon_pdftools_compress"
  76. break
  77. case .Security:
  78. mode.toolTitle = NSLocalizedString("Security", comment: "")
  79. mode.toolSubtitle = NSLocalizedString("Limit access to PDFs, restrict copying and printing permission with passwords", comment: "")
  80. mode.toolImageName = "icon_pdftools_security"
  81. break
  82. case .FileCompare:
  83. mode.toolTitle = NSLocalizedString("Compare", comment: "")
  84. mode.toolSubtitle = NSLocalizedString("content content content content content content content content", comment: "")
  85. mode.toolImageName = "icon_pdftools_compare"
  86. break
  87. case .PDFToPPT:
  88. mode.toolTitle = NSLocalizedString("PDF To PPT", comment: "")
  89. mode.toolSubtitle = NSLocalizedString("Turn your PDF into a formatted PPT file that you can edit", comment: "")
  90. mode.toolImageName = "icon_pdftools_pdfToPPT"
  91. break
  92. case .PDFToExcel:
  93. mode.toolTitle = NSLocalizedString("PDF To Excel", comment: "")
  94. mode.toolSubtitle = NSLocalizedString("Turn PDF table into a formatted Excel file", comment: "")
  95. mode.toolImageName = "icon_pdftools_pdfToExcel"
  96. break
  97. case .PDFToWord:
  98. mode.toolTitle = NSLocalizedString("PDF To Word", comment: "")
  99. mode.toolSubtitle = NSLocalizedString("Convert PDF to Word, fonts & formatting get converted", comment: "")
  100. mode.toolImageName = "icon_pdftools_pdfToWord"
  101. break
  102. case .PDFToImage:
  103. mode.toolTitle = NSLocalizedString("PDF To Image", comment: "")
  104. mode.toolSubtitle = NSLocalizedString("Convert PDF to image, such as JPEG, JPG, PNG, GIF, TIFF, TAG,BMP", comment: "")
  105. mode.toolImageName = "icon_pdftools_pdfToImage"
  106. break
  107. case .Watermark:
  108. mode.toolTitle = NSLocalizedString("Watermark", comment: "")
  109. mode.toolSubtitle = NSLocalizedString("Protect PDFs with image/text watermarks from plagiarism", comment: "")
  110. mode.toolImageName = "icon_pdftools_watermark"
  111. break
  112. case .Background:
  113. mode.toolTitle = NSLocalizedString("Background", comment: "")
  114. mode.toolSubtitle = NSLocalizedString("Customize PDFs background with colors or images", comment: "")
  115. mode.toolImageName = "icon_pdftools_background"
  116. break
  117. case .HeaderAndFooter:
  118. mode.toolTitle = NSLocalizedString("Header & Footer", comment: "")
  119. mode.toolSubtitle = NSLocalizedString("Customize PDFs header&footer or add page number", comment: "")
  120. mode.toolImageName = "icon_pdftools_headerfooter"
  121. break
  122. case .BatesCode:
  123. mode.toolTitle = NSLocalizedString("Bates Numbers", comment: "")
  124. mode.toolSubtitle = NSLocalizedString("Easily retrieval indexing legal document by Bates Numbers", comment: "")
  125. mode.toolImageName = "icon_pdftools_batesnumbers"
  126. break
  127. case .Print:
  128. mode.toolTitle = NSLocalizedString("Print", comment: "")
  129. mode.toolSubtitle = NSLocalizedString("Powerful PDF printer allows to print PDF from any computer without much hassle", comment: "")
  130. mode.toolImageName = "icon_pdftools_print"
  131. break
  132. case .BatchRemove:
  133. mode.toolTitle = NSLocalizedString("Batch Remove", comment: "")
  134. mode.toolSubtitle = NSLocalizedString("content content content content content content content content", comment: "")
  135. mode.toolImageName = "icon_pdftools_remove"
  136. break
  137. case .Insert:
  138. mode.toolTitle = NSLocalizedString("Insert", comment: "")
  139. mode.toolSubtitle = NSLocalizedString("Insert blank pages to PDF or insert a new file", comment: "")
  140. mode.toolImageName = "icon_pdftools_insert"
  141. break
  142. case .BreakUp:
  143. mode.toolTitle = NSLocalizedString("Split", comment: "")
  144. mode.toolSubtitle = NSLocalizedString("content content content content content content content content", comment: "")
  145. mode.toolImageName = "icon_pdftools_split"
  146. break
  147. case .Extract:
  148. mode.toolTitle = NSLocalizedString("Extract", comment: "")
  149. mode.toolSubtitle = NSLocalizedString("Extract selected pages to a new PDF", comment: "")
  150. mode.toolImageName = "icon_pdftools_extract"
  151. break
  152. case .MarkCipher:
  153. mode.toolTitle = NSLocalizedString("Redact", comment: "")
  154. mode.toolSubtitle = NSLocalizedString("content content content content content content content content", comment: "")
  155. mode.toolImageName = "icon_pdftools_reduct"
  156. break
  157. case .AutomaticFormRecognition:
  158. mode.toolTitle = NSLocalizedString("Form Filed Recognition", comment: "")
  159. mode.toolSubtitle = NSLocalizedString("content content content content content content content content", comment: "")
  160. mode.toolImageName = "icon_pdftools_formfiledrecognition"
  161. break
  162. case .PageEdit:
  163. mode.toolTitle = NSLocalizedString("Page Edit", comment: "")
  164. mode.toolSubtitle = NSLocalizedString("Delete/Rotate/Copy/Paste PDF pages", comment: "")
  165. mode.toolImageName = "icon_pdftools_pageEdit"
  166. break
  167. case .ComparativeTable:
  168. break
  169. case .equity:
  170. break
  171. case .PrintMultipage:
  172. break
  173. case .PrintPoster:
  174. break
  175. case .PrintBooklet:
  176. break
  177. case .AITools:
  178. break
  179. }
  180. return mode
  181. }
  182. }
  183. class KMFastToolCollectionViewItem: NSCollectionViewItem {
  184. }