1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- //
- // KMConvertPPTsWindowController.swift
- // PDF Master
- //
- // Created by tangchao on 2022/12/6.
- //
- import Cocoa
- // 转档 [PPT、RTF、Text、HTML] 窗口
- class KMConvertPPTsWindowController: KMConvertBaseWindowController {
-
- override var fileExtension: String {
- if (self.subType == 1) {
- return KMPDFConvert.pathExtension(.ppt)
- } else if (self.subType == 2) {
- return KMPDFConvert.pathExtension(.rtf)
- } else if (self.subType == 3) {
- return KMPDFConvert.pathExtension(.html)
- } else if (self.subType == 4) {
- return KMPDFConvert.pathExtension(.text)
- }
- return super.fileExtension
- }
-
- override func initDefaultValue() {
- super.initDefaultValue()
-
- if (self.subType == 1) {
- self.titleLabel.stringValue = NSLocalizedString("PDF to PPT", comment: "")
- } else if (self.subType == 2) {
- self.titleLabel.stringValue = NSLocalizedString("PDF to RTF", comment: "")
- } else if (self.subType == 3) {
- self.titleLabel.stringValue = NSLocalizedString("PDF to HTML", comment: "")
- } else if (self.subType == 4) {
- self.titleLabel.stringValue = NSLocalizedString("PDF to Text", comment: "")
- }
- }
-
- override func initSettingView() -> KMConvertSettingView? {
- return KMConvertPPTsSettingView.createFromNib()
- }
-
- override func initConvert() -> KMPDFConvert {
- if (self.subType == 1) {
- return KMPDFConvertPPT()
- } else if (self.subType == 2) {
- return KMPDFConvertRTF()
- } else if (self.subType == 3) {
- return KMPDFConvertHTML()
- } else if (self.subType == 4) {
- return KMPDFConvertText()
- }
- return super.initConvert()
- }
- }
|