From 331006b066370a08c8df04188aeb26a84bde18b3 Mon Sep 17 00:00:00 2001 From: HaujetZhao <1292756898@qq.com> Date: Sat, 15 Aug 2020 10:53:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=AD=A3=20(main)=20=E4=B8=BA=20(main?= =?UTF-8?q?Window)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QuickCut/QuickCut.py | 44 ++++++++++++++++++++++---------------------- setup.py | 13 ++++++------- 2 files changed, 28 insertions(+), 29 deletions(-) diff --git a/QuickCut/QuickCut.py b/QuickCut/QuickCut.py index 238b07f..2710765 100644 --- a/QuickCut/QuickCut.py +++ b/QuickCut/QuickCut.py @@ -2052,12 +2052,12 @@ def onSubtitleSplitRunButtonClicked(self): subtitleOffset = self.subtitleOffsetBox.value() if inputFile != '' and subtitleFile != '': - window = Console(main) + window = Console(mainWindow) output = window.consoleBox outputForFFmpeg = window.consoleBoxForFFmpeg - thread = SubtitleSplitVideoThread(main) + thread = SubtitleSplitVideoThread(mainWindow) thread.ffmpegOutputOption = self.ffmpegOutputOptionBox.currentText() @@ -2093,12 +2093,12 @@ def onDurationSplitRunButtonClicked(self): cutEndTime = self.durationSplitVideoEndTimeBox.text() if inputFile != '' and durationPerClip != '': - window = Console(main) + window = Console(mainWindow) output = window.consoleBox outputForFFmpeg = window.consoleBoxForFFmpeg - thread = DurationSplitVideoThread(main) + thread = DurationSplitVideoThread(mainWindow) thread.ffmpegOutputOption = self.ffmpegOutputOptionBox.currentText() @@ -2133,12 +2133,12 @@ def onSizeSplitRunButtonClicked(self): cutEndTime = self.sizeSplitVideoEndTimeBox.text() if inputFile != '' and sizePerClip != '': - window = Console(main) + window = Console(mainWindow) output = window.consoleBox outputForFFmpeg = window.consoleBoxForFFmpeg - thread = SizeSplitVideoThread(main) + thread = SizeSplitVideoThread(mainWindow) thread.ffmpegOutputOption = self.ffmpegOutputOptionBox.currentText() @@ -2665,7 +2665,7 @@ def annieCheckInfoButtonClicked(self): finalCommand += ''' -i %s''' % self.annieInputBox.text() thread = CommandThread() thread.command = finalCommand - window = Console(main) + window = Console(mainWindow) window.thread = thread output = window.consoleBox outputForFFmpeg = window.consoleBoxForFFmpeg @@ -2684,7 +2684,7 @@ def youGetCheckInfoButtonClicked(self): finalCommand += ''' -i %s''' % self.youGetInputBox.text() thread = CommandThread() thread.command = finalCommand - window = Console(main) + window = Console(mainWindow) window.thread = thread output = window.consoleBox outputForFFmpeg = window.consoleBoxForFFmpeg @@ -2703,7 +2703,7 @@ def youTubeDlCheckInfoButtonClicked(self): finalCommand += ''' -F %s''' % self.youTubeDlInputBox.text() thread = CommandThread() thread.command = finalCommand - window = Console(main) + window = Console(mainWindow) window.thread = thread output = window.consoleBox outputForFFmpeg = window.consoleBoxForFFmpeg @@ -2732,7 +2732,7 @@ def annieDownloadButtonClicked(self): finalCommand += ''' %s''' % self.annieInputBox.text() thread = CommandThread() thread.command = finalCommand - window = Console(main) + window = Console(mainWindow) window.thread = thread output = window.consoleBox outputForFFmpeg = window.consoleBoxForFFmpeg @@ -2757,7 +2757,7 @@ def youGetDownloadButtonClicked(self): finalCommand += ''' %s''' % self.youGetInputBox.text() thread = CommandThread() thread.command = finalCommand - window = Console(main) + window = Console(mainWindow) window.thread = thread output = window.consoleBox outputForFFmpeg = window.consoleBoxForFFmpeg @@ -2787,7 +2787,7 @@ def youTubeDlDownloadButtonClicked(self): finalCommand += ''' %s''' % self.youTubeDlInputBox.text() thread = CommandThread() thread.command = finalCommand - window = Console(main) + window = Console(mainWindow) window.thread = thread output = window.consoleBox outputForFFmpeg = window.consoleBoxForFFmpeg @@ -3179,12 +3179,12 @@ def subtitleKeywordAutocutSwitchClicked(self): def runButtonClicked(self): if self.inputLineEdit.text() != '' and self.outputLineEdit.text() != '': - window = Console(main) + window = Console(mainWindow) output = window.consoleBox outputForFFmpeg = window.consoleBoxForFFmpeg - thread = AutoEditThread(main) + thread = AutoEditThread(mainWindow) thread.output = output thread.inputFile = self.inputLineEdit.text() thread.outputFile = self.outputLineEdit.text() @@ -3433,12 +3433,12 @@ def fileTranscribeSubtitleInputEditChanged(self): def fileTranscribeSubtitleRunButtonClicked(self): if self.fileTranscribeSubtitleInputEdit.text() != '': - window = Console(main) + window = Console(mainWindow) output = window.consoleBox outputForFFmpeg = window.consoleBoxForFFmpeg - thread = FileTranscribeAutoSrtThread(main) + thread = FileTranscribeAutoSrtThread(mainWindow) thread.inputFile = self.fileTranscribeSubtitleInputEdit.text() @@ -3545,7 +3545,7 @@ def initializeVoiceInputMethodSubtitle(self, mode): ffmpegWavGenThread.startTime = startTime ffmpegWavGenThread.endTime = endTime - window = VoiceInputMethodTranscribeSubtitleWindow(main) # 新窗口 + window = VoiceInputMethodTranscribeSubtitleWindow(mainWindow) # 新窗口 output = window.hintConsoleBox window.thread = thread @@ -3934,7 +3934,7 @@ def installYouGetAndYouTubeDl(self): command = 'pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && pip install you-get youtube-dl' thread = YouGetYoutubeDlInstallThread() thread.command = command - window = Console(main) + window = Console(mainWindow) window.thread = thread thread.signal.connect(window.consoleBox.print) thread.signalForFFmpeg.connect(window.consoleBoxForFFmpeg.print) @@ -4514,7 +4514,7 @@ def write(self, text): ############# 子窗口 ################ class Console(QMainWindow): - # 这个 console 是个子窗口,调用的时候要指定父窗口。例如:window = Console(main) + # 这个 console 是个子窗口,调用的时候要指定父窗口。例如:window = Console(mainWindow) # 里面包含一个 OutputBox, 可以将信号导到它的 print 方法。 thread = None @@ -4569,7 +4569,7 @@ def closeEvent(self, a0: QCloseEvent) -> None: pass class VoiceInputMethodTranscribeSubtitleWindow(QMainWindow): - # 这是个子窗口,调用的时候要指定父窗口。例如:window = Console(main) + # 这是个子窗口,调用的时候要指定父窗口。例如:window = Console(mainWindow) # 里面包含一个 OutputBox, 可以将信号导到它的 print 方法。 thread = None mode = 0 # 零代表半自动模式 @@ -7280,13 +7280,13 @@ def execute(command): # if system == 'Windows': # os.system('start cmd /k ' + command) # else: - # console = Console(main) + # console = Console(mainWindow) # console.runCommand(command) # 新方法,执行子进程,在新窗口输出 thread = CommandThread() # 新建一个子进程 thread.command = command # 将要执行的命令赋予子进程 - window = Console(main) # 显示一个新窗口,用于显示子进程的输出 + window = Console(mainWindow) # 显示一个新窗口,用于显示子进程的输出 output = window.consoleBox # 获得新窗口中的输出控件 outputForFFmpeg = window.consoleBoxForFFmpeg thread.signal.connect(output.print) # 将 子进程中的输出信号 连接到 新窗口输出控件的输出槽 diff --git a/setup.py b/setup.py index b48a972..77847a1 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ # coding=utf-8 # python setup.py sdist build # python setup.py sdist –formats = gztar,zip -# twine upload "dist/Quick Cut-1.6.5.tar.gz" +# twine upload "dist/Quick Cut-1.6.6.post3.tar.gz" # 这是用于上传 pypi 前打包用的 @@ -9,13 +9,13 @@ import pathlib here = pathlib.Path(__file__).parent.resolve() -with open('QuickCut/README.md', 'r', encoding='utf-8') as f: +with open('README.md', 'r', encoding='utf-8') as f: long_description = f.read() setup( name='Quick Cut', - version='1.6.5', + version='1.6.6.post3', description=( '一款轻量、强大、好用的视频处理软件。' ), @@ -42,19 +42,18 @@ 'auditok', 'pymediainfo' ], - packages=['QuickCut', 'QuickCut/assets', 'QuickCut/languages', 'QuickCut/misc'], # 需要打包的本地包(package) + packages=['QuickCut', 'QuickCut/languages', 'QuickCut/misc'], # 需要打包的本地包(package) package_data={ # 每个本地包中需要包含的另外的文件 'QuickCut': ['*.md', '*.ico', '*.icns', 'style.css', 'sponsor.jpg'], - 'QuickCut/assets':['*.*'], 'QuickCut/languages':['*.*'], 'QuickCut/misc':['README*.html', 'assets/*.*']}, entry_points={ # Optional - 'console_scripts': [ + 'gui_scripts': [ 'QuickCut=QuickCut.QuickCut:main', 'Quick-Cut=QuickCut.QuickCut:main', 'Quickcut=QuickCut.QuickCut:main', @@ -74,7 +73,7 @@ # Indicate who your project is intended for 'Intended Audience :: End Users/Desktop', - 'Topic :: Artistic Software', + 'Topic :: Multimedia :: Video', # Pick your license as you wish 'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',