Преглед изворни кода

【编辑工具】压缩数据结构完善

lizhe пре 1 дан
родитељ
комит
f7ae1aeb9f
12 измењених фајлова са 213 додато и 70 уклоњено
  1. 9 1
      PDF Office/PDF Master/Class/Batch/WindowController/VC/Compress/KMBatchOperateCompressSettingViewController.swift
  2. 7 0
      PDF Office/PDF Master/Class/Batch/WindowController/VC/Compress/KMBatchOperateNewCompressViewController.swift
  3. 24 0
      PDF Office/PDF Master/Class/Batch/WindowController/VC/Compress/SettingView/Model/KMCompressSettingCellModel.swift
  4. 101 13
      PDF Office/PDF Master/Class/Batch/WindowController/VC/Compress/SettingView/Model/KMCompressSettingModel.swift
  5. 1 1
      PDF Office/PDF Master/Class/Batch/WindowController/VC/Compress/SettingView/View/Tableview/Base/KMBaseCompressTableCellView.swift
  6. 1 1
      PDF Office/PDF Master/Class/Batch/WindowController/VC/Compress/SettingView/View/Tableview/Cell/KMCompressDiscardPanelTableCellView.swift
  7. 1 1
      PDF Office/PDF Master/Class/Batch/WindowController/VC/Compress/SettingView/View/Tableview/Cell/KMCompressFontsPanelTableCellView.swift
  8. 1 1
      PDF Office/PDF Master/Class/Batch/WindowController/VC/Compress/SettingView/View/Tableview/Cell/KMCompressImagesPanelTableCellView.swift
  9. 1 1
      PDF Office/PDF Master/Class/Batch/WindowController/VC/Compress/SettingView/View/Tableview/Cell/KMCompressModesTableCellView.swift
  10. 42 36
      PDF Office/PDF Master/Class/Batch/WindowController/VC/Compress/SettingView/View/Tableview/KMCompressSettingTableView.swift
  11. 9 7
      PDF Office/PDF Master/Class/Batch/WindowController/VC/Compress/View/KMBatchOperateCompressView.swift
  12. 16 8
      PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj

+ 9 - 1
PDF Office/PDF Master/Class/Batch/WindowController/VC/Compress/KMBatchOperateCompressSettingViewController.swift

@@ -20,6 +20,11 @@ class KMBatchOperateCompressSettingViewController: KMBaseViewController {
     var cancelAction: KMBatchOperateCompressSettingViewCancelAction?
     var doneAction: KMBatchOperateCompressSettingViewDoneAction?
     
+    var model: KMCompressSettingModel = KMCompressSettingModel(modelsType: .standard) {
+        didSet {
+            self.reloadData()
+        }
+    }
     
     override func viewDidLoad() {
         super.viewDidLoad()
@@ -41,7 +46,10 @@ class KMBatchOperateCompressSettingViewController: KMBaseViewController {
         DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
             self.showAlert("Less than 7 items selected; compression quality may be affected")
         }
-        
+    }
+    
+    func reloadData() {
+        self.settingView.model = model
     }
 
     func showAlert(_ string: String) {

+ 7 - 0
PDF Office/PDF Master/Class/Batch/WindowController/VC/Compress/KMBatchOperateNewCompressViewController.swift

@@ -13,10 +13,17 @@ class KMBatchOperateNewCompressViewController: KMBatchOperateBaseViewController
     @IBOutlet weak var compressButton: NSButton!
     @IBOutlet weak var compressView: KMBatchOperateCompressView!
     
+    var model: KMCompressSettingModel = KMCompressSettingModel(modelsType: .standard)
+    
     
     override func viewDidLoad() {
         super.viewDidLoad()
         // Do view setup here.
+        
+        self.compressView.model = model
+        self.compressView.selectTypeAction = { view, tModel in
+            
+        }
     }
 }
 

+ 24 - 0
PDF Office/PDF Master/Class/Batch/WindowController/VC/Compress/SettingView/Model/KMCompressSettingCellModel.swift

@@ -0,0 +1,24 @@
+//
+//  KMCompressSettingCellModel.swift
+//  PDF Reader Pro
+//
+//  Created by lizhe on 2024/11/18.
+//
+
+import Cocoa
+enum KMCompressSettingPanelType: Int {
+    case modes = 0
+    case images
+    case fonts
+    case discardObject
+    case discardUserData
+    case discardOtherData
+}
+
+class KMCompressSettingCellModel: NSObject {
+    var title: String = ""
+    var type: KMCompressSettingPanelType = .modes
+    var selectIndexSet: NSIndexSet = .init(index: 0)
+    var content: Any? = nil
+    var heightOfRow: CGFloat = 20
+}

+ 101 - 13
PDF Office/PDF Master/Class/Batch/WindowController/VC/Compress/SettingView/Model/KMCompressSettingModel.swift

@@ -2,7 +2,7 @@
 //  KMCompressSettingModel.swift
 //  PDF Reader Pro
 //
-//  Created by lizhe on 2024/11/18.
+//  Created by lizhe on 2024/11/21.
 //
 
 import Cocoa
@@ -13,13 +13,10 @@ enum KMCompressModelsType: Int {
     case custom
 }
 
-enum KMCompressSettingPanelType: Int {
-    case modes = 0
-    case images
-    case fonts
-    case discardObject
-    case discardUserData
-    case discardOtherData
+enum KMCompressImageQualityType: Int {
+    case low = 0 //20
+    case medium  //60
+    case hight   //100
 }
 
 struct KMCompressObjectOptions: OptionSet {
@@ -52,9 +49,100 @@ struct KMCompressOtherDataOptions: OptionSet {
 }
 
 class KMCompressSettingModel: NSObject {
-    var title: String = ""
-    var type: KMCompressSettingPanelType = .modes
-    var selectIndexSet: NSIndexSet = .init(index: 0)
-    var content: Any? = nil
-    var heightOfRow: CGFloat = 20
+    // MARK: - 属性
+    var modelsType: KMCompressModelsType = .standard
+    var ppi: Int = 150
+    var maxPpi: Int = 220
+    var fontUnembed: Bool = true
+    var imageQualityType: KMCompressImageQualityType = .medium
+    var objectOptions: KMCompressObjectOptions = .formAndAction
+    var userDataOptions: KMCompressUserDataOptions = .commentsFormAndMultimedia
+    var otherDataOptions: KMCompressOtherDataOptions = .invalidBookmarks
+    private var isCustom: Bool = false
+
+    // MARK: - UserDefaults 键值
+    private static let userDefaultsKey = "KMCompressCustomSettings"
+
+    // MARK: - 初始化
+    init(modelsType: KMCompressModelsType) {
+        super.init()
+        configure(for: modelsType)
+    }
+
+    private func configure(for modelsType: KMCompressModelsType) {
+        self.modelsType = modelsType
+        self.isCustom = false
+        
+        switch modelsType {
+        case .standard:
+            self.ppi = 150
+            self.maxPpi = 220
+            self.fontUnembed = true
+            self.imageQualityType = .medium
+            self.objectOptions = [.formAndAction, .javaScript, .thumbnails, .documentTags]
+            self.userDataOptions = [.commentsFormAndMultimedia, .documentInfomationAndMetadata, .allObject, .fileAttachments]
+            self.otherDataOptions = [.invalidLinks, .invalidBookmarks, .unrefrencedNamedDestinations, .pageContent]
+        case .mobile:
+            self.ppi = 95
+            self.maxPpi = 144
+            self.fontUnembed = true
+            self.imageQualityType = .hight
+            self.objectOptions = [.thumbnails]
+            self.userDataOptions = [.allObject]
+            self.otherDataOptions = [.invalidLinks, .invalidBookmarks, .unrefrencedNamedDestinations, .pageContent]
+        case .custom:
+            self.loadFromUserDefaults()
+        }
+    }
+    
+    // MARK: - 自定义参数保存
+    func updateCustomSettings(ppi: Int? = nil, maxPpi: Int? = nil, fontUnembed: Bool? = nil,
+                              imageQualityType: KMCompressImageQualityType? = nil,
+                              objectOptions: KMCompressObjectOptions? = nil,
+                              userDataOptions: KMCompressUserDataOptions? = nil,
+                              otherDataOptions: KMCompressOtherDataOptions? = nil) {
+        self.modelsType = .custom
+        self.isCustom = true
+        
+        // 更新传入的参数
+        if let ppi = ppi { self.ppi = ppi }
+        if let maxPpi = maxPpi { self.maxPpi = maxPpi }
+        if let fontUnembed = fontUnembed { self.fontUnembed = fontUnembed }
+        if let imageQualityType = imageQualityType { self.imageQualityType = imageQualityType }
+        if let objectOptions = objectOptions { self.objectOptions = objectOptions }
+        if let userDataOptions = userDataOptions { self.userDataOptions = userDataOptions }
+        if let otherDataOptions = otherDataOptions { self.otherDataOptions = otherDataOptions }
+        
+        self.saveToUserDefaults()
+    }
+
+    // MARK: - 保存自定义参数到 UserDefaults
+    func saveToUserDefaults() {
+        let settings: [String: Any] = [
+            "modelsType": modelsType.rawValue,
+            "ppi": ppi,
+            "maxPpi": maxPpi,
+            "fontUnembed": fontUnembed,
+            "imageQualityType": imageQualityType.rawValue,
+            "objectOptions": objectOptions.rawValue,
+            "userDataOptions": userDataOptions.rawValue,
+            "otherDataOptions": otherDataOptions.rawValue
+        ]
+        UserDefaults.standard.set(settings, forKey: KMCompressSettingModel.userDefaultsKey)
+    }
+
+    // MARK: - 从 UserDefaults 加载自定义参数
+    func loadFromUserDefaults() {
+        guard let settings = UserDefaults.standard.dictionary(forKey: KMCompressSettingModel.userDefaultsKey) else { return }
+        
+//        let model = KMCompressSettingModel(modelsType: .custom)
+        self.modelsType = KMCompressModelsType(rawValue: settings["modelsType"] as? Int ?? 0) ?? .custom
+        self.ppi = settings["ppi"] as? Int ?? 150
+        self.maxPpi = settings["maxPpi"] as? Int ?? 220
+        self.fontUnembed = settings["fontUnembed"] as? Bool ?? true
+        self.imageQualityType = KMCompressImageQualityType(rawValue: settings["imageQualityType"] as? Int ?? 0) ?? .medium
+        self.objectOptions = KMCompressObjectOptions(rawValue: settings["objectOptions"] as? Int ?? 0)
+        self.userDataOptions = KMCompressUserDataOptions(rawValue: settings["userDataOptions"] as? Int ?? 0)
+        self.otherDataOptions = KMCompressOtherDataOptions(rawValue: settings["otherDataOptions"] as? Int ?? 0)
+    }
 }

+ 1 - 1
PDF Office/PDF Master/Class/Batch/WindowController/VC/Compress/SettingView/View/Tableview/Base/KMBaseCompressTableCellView.swift

@@ -9,7 +9,7 @@ import Cocoa
 
 typealias KMBaseCompressTableCellViewActionBlock = (_ view: KMBaseCompressTableCellView, _ model: KMCompressSettingModel) -> Void
 class KMBaseCompressTableCellView: NSTableCellView {
-    var model: KMCompressSettingModel?
+    var model: KMCompressSettingCellModel?
     var actionBlock: KMBaseCompressTableCellViewActionBlock?
     
     @IBOutlet weak var buttonConetntView: NSView!

+ 1 - 1
PDF Office/PDF Master/Class/Batch/WindowController/VC/Compress/SettingView/View/Tableview/Cell/KMCompressDiscardPanelTableCellView.swift

@@ -11,7 +11,7 @@ class KMCompressDiscardPanelTableCellView: KMBaseCompressTableCellView, NibLoada
 
     @IBOutlet weak var titleLabel: NSTextField!
     
-    override var model: KMCompressSettingModel? {
+    override var model: KMCompressSettingCellModel? {
         didSet {
             self.reloadData()
         }

+ 1 - 1
PDF Office/PDF Master/Class/Batch/WindowController/VC/Compress/SettingView/View/Tableview/Cell/KMCompressFontsPanelTableCellView.swift

@@ -12,7 +12,7 @@ class KMCompressFontsPanelTableCellView: KMBaseCompressTableCellView, NibLoadabl
     @IBOutlet weak var titleLabel: NSTextField!
     @IBOutlet weak var fontButton: NSButton!
     
-    override var model: KMCompressSettingModel? {
+    override var model: KMCompressSettingCellModel? {
         didSet {
             self.reloadData()
         }

+ 1 - 1
PDF Office/PDF Master/Class/Batch/WindowController/VC/Compress/SettingView/View/Tableview/Cell/KMCompressImagesPanelTableCellView.swift

@@ -15,7 +15,7 @@ class KMCompressImagesPanelTableCellView: KMBaseCompressTableCellView, NibLoadab
     @IBOutlet weak var imagePPIAlertLabel: NSTextField!
     @IBOutlet weak var imageAbovePPIAlertLabel: NSTextField!
     
-    override var model: KMCompressSettingModel? {
+    override var model: KMCompressSettingCellModel? {
         didSet {
             self.reloadData()
         }

+ 1 - 1
PDF Office/PDF Master/Class/Batch/WindowController/VC/Compress/SettingView/View/Tableview/Cell/KMCompressModesTableCellView.swift

@@ -12,7 +12,7 @@ class KMCompressModesTableCellView: KMBaseCompressTableCellView, NibLoadable {
     @IBOutlet weak var titleLabel: NSTextField!
     @IBOutlet weak var comboBox: NSComboBox!
     
-    override var model: KMCompressSettingModel? {
+    override var model: KMCompressSettingCellModel? {
         didSet {
             self.reloadData()
         }

+ 42 - 36
PDF Office/PDF Master/Class/Batch/WindowController/VC/Compress/SettingView/View/Tableview/KMCompressSettingTableView.swift

@@ -11,7 +11,13 @@ class KMCompressSettingTableView: KMBaseXibView {
     @IBOutlet weak var tableView: NSTableView!
     @IBOutlet weak var scrollView: NSScrollView!
     
-    var datas: [KMCompressSettingModel] = []
+    var model: KMCompressSettingModel = KMCompressSettingModel(modelsType: .standard) {
+        didSet {
+            self.reloadData()
+        }
+    }
+    
+    var datas: [KMCompressSettingCellModel] = []
         
     override func setup() {
         self.tableView.register(.init(nibNamed: "KMCompressModesTableCellView", bundle: nil), forIdentifier: .init("KMCompressModesTableCellView"))
@@ -26,55 +32,55 @@ class KMCompressSettingTableView: KMBaseXibView {
     }
     
     override func reloadData() {
-        var model = KMCompressSettingModel()
-        model.title = NSLocalizedString("Models", comment: "")
-        model.heightOfRow = 48
-        self.datas.append(model)
+        var cellModel = KMCompressSettingCellModel()
+        cellModel.title = NSLocalizedString("Models", comment: "")
+        cellModel.heightOfRow = 48
+        self.datas.append(cellModel)
         
-        model = KMCompressSettingModel()
-        model.type = .images
-        model.title = NSLocalizedString("Image Panel", comment: "")
-        model.heightOfRow = 90
-        self.datas.append(model)
+        cellModel = KMCompressSettingCellModel()
+        cellModel.type = .images
+        cellModel.title = NSLocalizedString("Image Panel", comment: "")
+        cellModel.heightOfRow = 90
+        self.datas.append(cellModel)
         
-        model = KMCompressSettingModel()
-        model.type = .fonts
-        model.title = NSLocalizedString("Fonts Panel", comment: "")
-        model.heightOfRow = 90
-        model.content = "Unembed Any Font"
-        self.datas.append(model)
+        cellModel = KMCompressSettingCellModel()
+        cellModel.type = .fonts
+        cellModel.title = NSLocalizedString("Fonts Panel", comment: "")
+        cellModel.heightOfRow = 90
+        cellModel.content = "Unembed Any Font"
+        self.datas.append(cellModel)
         
-        model = KMCompressSettingModel()
-        model.type = .discardObject
-        model.title = NSLocalizedString("Discard Objects Panel", comment: "")
-        model.heightOfRow = 205
-        model.content = ["Discard all form submission, import and reset actions",
+        cellModel = KMCompressSettingCellModel()
+        cellModel.type = .discardObject
+        cellModel.title = NSLocalizedString("Discard Objects Panel", comment: "")
+        cellModel.heightOfRow = 205
+        cellModel.content = ["Discard all form submission, import and reset actions",
                          "Discard all JavaScript actions",
                          "Discard embedded page thumbnails",
                          "Discard document tags",
                          "Discard bookmarks"]
-        self.datas.append(model)
+        self.datas.append(cellModel)
         
-        model = KMCompressSettingModel()
-        model.type = .discardUserData
-        model.title = NSLocalizedString("Discard User Data Panel", comment: "")
-        model.heightOfRow = 205
-        model.content = ["Discard all comments, forms and multimedia",
+        cellModel = KMCompressSettingCellModel()
+        cellModel.type = .discardUserData
+        cellModel.title = NSLocalizedString("Discard User Data Panel", comment: "")
+        cellModel.heightOfRow = 205
+        cellModel.content = ["Discard all comments, forms and multimedia",
                          "Discard document information and metadata",
                          "Discard all object data",
                          "Discard file attachments",
                          "Discard hidden layer content and flatten visible layers"]
-        self.datas.append(model)
+        self.datas.append(cellModel)
         
-        model = KMCompressSettingModel()
-        model.type = .discardOtherData
-        model.title = NSLocalizedString("Discard Other Data", comment: "")
-        model.heightOfRow = 173
-        model.content = ["Discard invalid bookmarks",
+        cellModel = KMCompressSettingCellModel()
+        cellModel.type = .discardOtherData
+        cellModel.title = NSLocalizedString("Discard Other Data", comment: "")
+        cellModel.heightOfRow = 173
+        cellModel.content = ["Discard invalid bookmarks",
                          "Discard invalid links",
                          "Discard unreferenced named destinations",
                          "Optimize page content"]
-        self.datas.append(model)
+        self.datas.append(cellModel)
         
         self.tableView.reloadData()
     }
@@ -91,7 +97,7 @@ extension KMCompressSettingTableView: NSTableViewDelegate, NSTableViewDataSource
     func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? {
         var cell: KMBaseCompressTableCellView?
         if self.datas.count > row {
-            let model: KMCompressSettingModel = self.datas[row]
+            let model: KMCompressSettingCellModel = self.datas[row]
             switch model.type {
             case .modes:
                 cell = tableView.makeView(withIdentifier: .init("KMCompressModesTableCellView"), owner: self) as? KMBaseCompressTableCellView
@@ -136,7 +142,7 @@ extension KMCompressSettingTableView: NSTableViewDelegate, NSTableViewDataSource
     
     func tableView(_ tableView: NSTableView, heightOfRow row: Int) -> CGFloat {
         if self.datas.count > row {
-            let model: KMCompressSettingModel = self.datas[row]
+            let model: KMCompressSettingCellModel = self.datas[row]
             return model.heightOfRow
         }
         return 20.0

+ 9 - 7
PDF Office/PDF Master/Class/Batch/WindowController/VC/Compress/View/KMBatchOperateCompressView.swift

@@ -7,7 +7,7 @@
 
 import Cocoa
 
-typealias KMBatchOperateCompressViewSelectTypeBlcok = (_ view: KMBatchOperateCompressView, _ type: KMCompressModelsType) -> Void
+typealias KMBatchOperateCompressViewSelectTypeBlcok = (_ view: KMBatchOperateCompressView, _ model: KMCompressSettingModel) -> Void
 class KMBatchOperateCompressView: KMBaseXibView {
 
     @IBOutlet weak var standardButton: NSButton!
@@ -19,9 +19,9 @@ class KMBatchOperateCompressView: KMBaseXibView {
     var popOver: NSPopover!
     
     var selectTypeAction: KMBatchOperateCompressViewSelectTypeBlcok?
-    var type: KMCompressModelsType = .standard {
+    var model: KMCompressSettingModel = KMCompressSettingModel(modelsType: .standard) {
         didSet {
-            self.updateType(type: type)
+            self.reloadData()
         }
     }
     
@@ -74,7 +74,7 @@ class KMBatchOperateCompressView: KMBaseXibView {
     }
     
     override func reloadData() {
-        self.updateType(type: type)
+        self.updateType(type: model.modelsType)
     }
     
     func updateType(type: KMCompressModelsType) {
@@ -99,7 +99,7 @@ extension KMBatchOperateCompressView {
         
         guard let callBack = selectTypeAction else { return }
         
-        callBack(self, .standard)
+        callBack(self, model)
     }
     
     @IBAction func mobileButtonAction(_ sender: Any) {
@@ -107,7 +107,7 @@ extension KMBatchOperateCompressView {
         
         guard let callBack = selectTypeAction else { return }
         
-        callBack(self, .mobile)
+        callBack(self, model)
     }
     
     @IBAction func customButtonAction(_ sender: Any) {
@@ -115,7 +115,7 @@ extension KMBatchOperateCompressView {
         
         guard let callBack = selectTypeAction else { return }
         
-        callBack(self, .custom)
+        callBack(self, model)
     }
     
     @IBAction func settingButtonAction(_ sender: Any) {
@@ -128,6 +128,8 @@ extension KMBatchOperateCompressView {
         let currentWindow = NSWindow.currentWindow()
         currentWindow.beginSheet(window)
         
+        controller.model = self.model
+        
         controller.cancelAction = { resultControler in
             currentWindow.endSheet(window)
         }

+ 16 - 8
PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj

@@ -2311,9 +2311,9 @@
 		ADC59BC42CEB0916002F819D /* KMBatchOperateCompressView.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADC59BC32CEB0916002F819D /* KMBatchOperateCompressView.xib */; };
 		ADC59BC52CEB0916002F819D /* KMBatchOperateCompressView.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADC59BC32CEB0916002F819D /* KMBatchOperateCompressView.xib */; };
 		ADC59BC62CEB0916002F819D /* KMBatchOperateCompressView.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADC59BC32CEB0916002F819D /* KMBatchOperateCompressView.xib */; };
-		ADC59BC92CEB2B07002F819D /* KMCompressSettingModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADC59BC82CEB2B07002F819D /* KMCompressSettingModel.swift */; };
-		ADC59BCA2CEB2B07002F819D /* KMCompressSettingModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADC59BC82CEB2B07002F819D /* KMCompressSettingModel.swift */; };
-		ADC59BCB2CEB2B07002F819D /* KMCompressSettingModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADC59BC82CEB2B07002F819D /* KMCompressSettingModel.swift */; };
+		ADC59BC92CEB2B07002F819D /* KMCompressSettingCellModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADC59BC82CEB2B07002F819D /* KMCompressSettingCellModel.swift */; };
+		ADC59BCA2CEB2B07002F819D /* KMCompressSettingCellModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADC59BC82CEB2B07002F819D /* KMCompressSettingCellModel.swift */; };
+		ADC59BCB2CEB2B07002F819D /* KMCompressSettingCellModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADC59BC82CEB2B07002F819D /* KMCompressSettingCellModel.swift */; };
 		ADC63E372A49813E00854E02 /* KMSubscribeSuccessWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADC63E352A49813E00854E02 /* KMSubscribeSuccessWindowController.swift */; };
 		ADC63E382A49813E00854E02 /* KMSubscribeSuccessWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADC63E352A49813E00854E02 /* KMSubscribeSuccessWindowController.swift */; };
 		ADC63E392A49813E00854E02 /* KMSubscribeSuccessWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADC63E352A49813E00854E02 /* KMSubscribeSuccessWindowController.swift */; };
@@ -2419,6 +2419,9 @@
 		ADD5AE592A64DD2600C14249 /* KMPurchaseAlertView.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADD5AE582A64DD2600C14249 /* KMPurchaseAlertView.xib */; };
 		ADD5AE5A2A64DD2600C14249 /* KMPurchaseAlertView.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADD5AE582A64DD2600C14249 /* KMPurchaseAlertView.xib */; };
 		ADD5AE5B2A64DD2600C14249 /* KMPurchaseAlertView.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADD5AE582A64DD2600C14249 /* KMPurchaseAlertView.xib */; };
+		ADD68D062CEF0A2000F7DD41 /* KMCompressSettingModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD68D052CEF0A2000F7DD41 /* KMCompressSettingModel.swift */; };
+		ADD68D072CEF0A2000F7DD41 /* KMCompressSettingModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD68D052CEF0A2000F7DD41 /* KMCompressSettingModel.swift */; };
+		ADD68D082CEF0A2000F7DD41 /* KMCompressSettingModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD68D052CEF0A2000F7DD41 /* KMCompressSettingModel.swift */; };
 		ADDDCE212B43A32A005B4AB5 /* AppSandboxFileAccessPersist.m in Sources */ = {isa = PBXBuildFile; fileRef = ADDDCE1C2B43A32A005B4AB5 /* AppSandboxFileAccessPersist.m */; };
 		ADDDCE222B43A32A005B4AB5 /* AppSandboxFileAccessPersist.m in Sources */ = {isa = PBXBuildFile; fileRef = ADDDCE1C2B43A32A005B4AB5 /* AppSandboxFileAccessPersist.m */; };
 		ADDDCE232B43A32A005B4AB5 /* AppSandboxFileAccessPersist.m in Sources */ = {isa = PBXBuildFile; fileRef = ADDDCE1C2B43A32A005B4AB5 /* AppSandboxFileAccessPersist.m */; };
@@ -6589,7 +6592,7 @@
 		ADC59BBA2CEAE1FE002F819D /* KMCompressDiscardPanelTableCellView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMCompressDiscardPanelTableCellView.xib; sourceTree = "<group>"; };
 		ADC59BBF2CEB0908002F819D /* KMBatchOperateCompressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMBatchOperateCompressView.swift; sourceTree = "<group>"; };
 		ADC59BC32CEB0916002F819D /* KMBatchOperateCompressView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMBatchOperateCompressView.xib; sourceTree = "<group>"; };
-		ADC59BC82CEB2B07002F819D /* KMCompressSettingModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMCompressSettingModel.swift; sourceTree = "<group>"; };
+		ADC59BC82CEB2B07002F819D /* KMCompressSettingCellModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMCompressSettingCellModel.swift; sourceTree = "<group>"; };
 		ADC63E352A49813E00854E02 /* KMSubscribeSuccessWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMSubscribeSuccessWindowController.swift; sourceTree = "<group>"; };
 		ADC63E362A49813E00854E02 /* KMSubscribeSuccessWindowController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMSubscribeSuccessWindowController.xib; sourceTree = "<group>"; };
 		ADC63E3E2A49816900854E02 /* KMSubscribeSuccessView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMSubscribeSuccessView.swift; sourceTree = "<group>"; };
@@ -6626,6 +6629,7 @@
 		ADD56F562BB3F48200E87ED9 /* KMFreeTextStylesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KMFreeTextStylesViewController.h; sourceTree = "<group>"; };
 		ADD5AE542A64D31200C14249 /* KMPurchaseAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPurchaseAlertView.swift; sourceTree = "<group>"; };
 		ADD5AE582A64DD2600C14249 /* KMPurchaseAlertView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMPurchaseAlertView.xib; sourceTree = "<group>"; };
+		ADD68D052CEF0A2000F7DD41 /* KMCompressSettingModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMCompressSettingModel.swift; sourceTree = "<group>"; };
 		ADDDCE1B2B43A32A005B4AB5 /* AppSandboxFileAccess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppSandboxFileAccess.h; sourceTree = "<group>"; };
 		ADDDCE1C2B43A32A005B4AB5 /* AppSandboxFileAccessPersist.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppSandboxFileAccessPersist.m; sourceTree = "<group>"; };
 		ADDDCE1D2B43A32A005B4AB5 /* AppSandboxFileAccessOpenSavePanelDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppSandboxFileAccessOpenSavePanelDelegate.h; sourceTree = "<group>"; };
@@ -10850,7 +10854,8 @@
 		ADC59BC72CEB2907002F819D /* Model */ = {
 			isa = PBXGroup;
 			children = (
-				ADC59BC82CEB2B07002F819D /* KMCompressSettingModel.swift */,
+				ADC59BC82CEB2B07002F819D /* KMCompressSettingCellModel.swift */,
+				ADD68D052CEF0A2000F7DD41 /* KMCompressSettingModel.swift */,
 			);
 			path = Model;
 			sourceTree = "<group>";
@@ -17086,6 +17091,7 @@
 				BBE78F1F2B3875B50071AC1A /* KMLeftSideViewController+Search.swift in Sources */,
 				9FA693A82987C0590055488A /* KMStepperView.swift in Sources */,
 				BBC745F2295F0DD00072C2ED /* KMCropSettingPageSizeView.swift in Sources */,
+				ADD68D062CEF0A2000F7DD41 /* KMCompressSettingModel.swift in Sources */,
 				F3599222292CA27B000D25DE /* CPDFListViewRuntime.m in Sources */,
 				BB1331542AD7A6A1008F6791 /* KMFileAttribute.swift in Sources */,
 				BB0A55182A3074F400B6E84B /* KMHoverView.swift in Sources */,
@@ -17154,7 +17160,7 @@
 				ADAFDA762AEB5FCD00F084BC /* KMHomeHistoryCollectionItem.swift in Sources */,
 				BBEC00BF295C306400A26C98 /* KMBatesPropertyController.swift in Sources */,
 				BB93CDE52AE757A000B29C57 /* KMToolbarItemView.swift in Sources */,
-				ADC59BC92CEB2B07002F819D /* KMCompressSettingModel.swift in Sources */,
+				ADC59BC92CEB2B07002F819D /* KMCompressSettingCellModel.swift in Sources */,
 				89E4E6EC2963D1B7002DBA6F /* KMColorPickerViewController.m in Sources */,
 				BB6EA2972B70AF48000D4490 /* KMConvertCompareViewController.m in Sources */,
 				BB71853D2C2B0A7C00C1156B /* KMEditPDFToolbarView.swift in Sources */,
@@ -18767,6 +18773,7 @@
 				BB3EAEAE293E3D6000D92407 /* KMConvertBaseWindowController.swift in Sources */,
 				BB8810D72B4F984000AFA63E /* JSONKit.m in Sources */,
 				ADDF83242B391A5C00A81A4E /* CDSDrawView.m in Sources */,
+				ADD68D072CEF0A2000F7DD41 /* KMCompressSettingModel.swift in Sources */,
 				ADFCEB722B4FC1410001EBAF /* KMAdsManager.swift in Sources */,
 				BBEDC22C2B98407000970C54 /* CPDFAction+KMExtension.swift in Sources */,
 				BB1BFF5E2AE9F1FF003EB179 /* KMBatchOperateBaseWindowController.swift in Sources */,
@@ -18971,7 +18978,7 @@
 				BBA19F4029ADE40A001A285A /* KMCellEmptyView.m in Sources */,
 				89316823296D73CC0073EA59 /* KMSignatureAnnotationViewController.m in Sources */,
 				ADDF83422B391A5C00A81A4E /* DSignatureConfigWindowController.swift in Sources */,
-				ADC59BCA2CEB2B07002F819D /* KMCompressSettingModel.swift in Sources */,
+				ADC59BCA2CEB2B07002F819D /* KMCompressSettingCellModel.swift in Sources */,
 				AD055E7F2B88294F0035F824 /* SKBookmarkSheetController.m in Sources */,
 				BB88E43C294023CB002B3655 /* KMDocumentModel.swift in Sources */,
 				BBB14A6429792D6900936EDB /* KMRedactPageRangeContentView.swift in Sources */,
@@ -19763,7 +19770,7 @@
 				BB3A42982B4BC72C006D0642 /* KMNotesPanelController.swift in Sources */,
 				9F0CB4E72986557F00007028 /* KMDesignToken+PaddingRight.swift in Sources */,
 				BB853C842AF8BAF0009C20C1 /* KMSetPasswordObject.swift in Sources */,
-				ADC59BCB2CEB2B07002F819D /* KMCompressSettingModel.swift in Sources */,
+				ADC59BCB2CEB2B07002F819D /* KMCompressSettingCellModel.swift in Sources */,
 				BBD1F789296FAC7C00343885 /* KMPageEditSettingBaseView.swift in Sources */,
 				BB2C6ACF28F41BA000478A33 /* CPDFListView.m in Sources */,
 				BB6013822AD38E0100A76FB2 /* CPDFTextAnnotation+PDFListView.swift in Sources */,
@@ -19792,6 +19799,7 @@
 				9F1FE4BF29406E4700E952CA /* URLDropTarget.m in Sources */,
 				9FF816DF2AFA5B8E0087EFC5 /* KMAnnotationTableViewController.swift in Sources */,
 				9F0CB52F298656D900007028 /* KMDesignToken+BorderWidthRight.swift in Sources */,
+				ADD68D082CEF0A2000F7DD41 /* KMCompressSettingModel.swift in Sources */,
 				9FF371D72C69B8CA005F9CC5 /* CAreaMeasureInfoWindowController.swift in Sources */,
 				ADDEEA602AD39DC500EF675D /* KMSignatureManager.swift in Sources */,
 				BBBE208D2B21649100509C4E /* KMPDFEditWindowController.swift in Sources */,