Skip to content

Commit

Permalink
更正 (main) 为 (mainWindow)
Browse files Browse the repository at this point in the history
  • Loading branch information
HaujetZhao committed Aug 15, 2020
1 parent 51abccf commit 331006b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 29 deletions.
44 changes: 22 additions & 22 deletions QuickCut/QuickCut.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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()

Expand Down Expand Up @@ -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()

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -4514,7 +4514,7 @@ def write(self, text):
############# 子窗口 ################

class Console(QMainWindow):
# 这个 console 是个子窗口,调用的时候要指定父窗口。例如:window = Console(main)
# 这个 console 是个子窗口,调用的时候要指定父窗口。例如:window = Console(mainWindow)
# 里面包含一个 OutputBox, 可以将信号导到它的 print 方法。
thread = None

Expand Down Expand Up @@ -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 # 零代表半自动模式
Expand Down Expand Up @@ -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) # 将 子进程中的输出信号 连接到 新窗口输出控件的输出槽
Expand Down
13 changes: 6 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# 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 前打包用的


from setuptools import setup, find_packages
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=(
'一款轻量、强大、好用的视频处理软件。'
),
Expand All @@ -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',
Expand All @@ -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)',
Expand Down

0 comments on commit 331006b

Please sign in to comment.