KMBatchCompressView.swift 940 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //
  2. // KMBatchCompressView.swift
  3. // PDF Master
  4. //
  5. // Created by lizhe on 2023/1/16.
  6. //
  7. import Cocoa
  8. import KMComponentLibrary
  9. class KMBatchCompressView: KMBatchSettingItemView {
  10. @IBOutlet weak var titleLabel: NSTextField!
  11. @IBOutlet weak var titleContentView: NSView!
  12. var data: KMBatchCompressViewModel = KMBatchCompressViewModel()
  13. override func draw(_ dirtyRect: NSRect) {
  14. super.draw(dirtyRect)
  15. // Drawing code here.
  16. }
  17. override func setup() {
  18. self.titleContentView.border(ComponentLibrary.shared.getComponentColorFromKey("colorBorder/divider"), 0.5, 0)
  19. }
  20. override func reloadData() {
  21. }
  22. }
  23. protocol KMBatchCompressViewAction {}
  24. extension KMBatchCompressView: KMBatchCompressViewAction {
  25. @IBAction func compressButtonAction(_ sender: Any) {
  26. if self.batchExport != nil {
  27. self.batchExport!(self, self.data)
  28. }
  29. }
  30. }