KMBatchSettingItemView.swift 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //
  2. // KMBatchSettingItemView.swift
  3. // PDF Master
  4. //
  5. // Created by lizhe on 2023/1/16.
  6. //
  7. import Cocoa
  8. typealias KMBatchSettingItemViewExport = (_ view: NSView, _ data: KMBatchSettingItemViewModel) -> ()
  9. class KMBatchSettingItemView: BaseXibView {
  10. var type: KMBatchCollectionViewType = .unknow
  11. var subType: Any?
  12. var filesData: [KMBatchProcessingTableViewModel] = [] {
  13. didSet {
  14. self.reloadData()
  15. }
  16. }
  17. var isDisable: Bool = false {
  18. didSet {
  19. self.bacthProcessingNotification()
  20. }
  21. }
  22. var batchExport: KMBatchSettingItemViewExport?
  23. deinit {
  24. NotificationCenter.default.removeObserver(self)
  25. }
  26. override func draw(_ dirtyRect: NSRect) {
  27. super.draw(dirtyRect)
  28. // Drawing code here.
  29. }
  30. func reloadData() {
  31. }
  32. override func setup() {
  33. super.setup()
  34. // NotificationCenter.default.addObserver(self, selector: #selector(bacthProcessingNotification), name: NSNotification.Name(kBacthProcessNotification), object: nil)
  35. }
  36. func bacthProcessingNotification() {
  37. }
  38. }