Commit d949532b authored by xuanweiace's avatar xuanweiace

feat:在【操作表格】中可以获取当前电影时间作为起始时间或者终止时间

fix: 若干bug和体验问题
parent 4cab3e60
......@@ -133,13 +133,14 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.action_undo.setEnabled(False)
self.action_redo.triggered.connect(self.redo_slot)
self.action_redo.setEnabled(False)
self.action_view_history.triggered.connect(self.view_history_slot)
# 暂时去掉了
# self.action_view_history.triggered.connect(self.view_history_slot)
self.action_operate.triggered.connect(self.operate_slot)
self.action_operate.setEnabled(False)
self.action_insert_aside_from_now.triggered.connect(self.insert_aside_from_now_slot)
self.action_insert_aside_from_now.setEnabled(False)
self.insert_aside_from_now_btn.clicked.connect(self.insert_aside_from_now_slot)
self.insert_aside_from_now_btn.setEnabled(False)
"""
视频相关信息
"""
......@@ -253,10 +254,11 @@ class MainWindow(QMainWindow, Ui_MainWindow):
# 更新工程信息
self.projectContext.Init(project_path)
self.update_ui()
# 如果嗅探到旁白检测未完成,则询问是否继续
if self.projectContext.detected == True and self.projectContext.nd_process < 1:
self.continue_detect_prompt_dialog.show_with_msg("您的上次任务未完成,是否继续检测?")
self.update_ui()
# 重写关闭Mmainwindow窗口
def closeEvent(self, event):
......@@ -341,6 +343,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.action_export.setEnabled(True)
self.action_operate.setEnabled(True)
self.action_insert_aside_from_now.setEnabled(True)
self.insert_aside_from_now_btn.setEnabled(True)
# todo: 后续这段代码公共的可以抽出来
......@@ -375,7 +378,8 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.player.setMedia(QMediaContent(QUrl(video_path))) # 选取视频文件
self.playVideo() # 播放视频
self.action_insert_aside_from_now.setEnabled(True)
self.insert_aside_from_now_btn.setEnabled(True)
self.continue_detect_prompt_dialog.setModal(True)
def continue_detect(self):
print(f"继续检测,video_path={self.projectContext.video_path}, book_path={self.projectContext.excel_path}")
self.start_detect(self.projectContext.video_path, self.projectContext.excel_path)
......@@ -712,7 +716,6 @@ class MainWindow(QMainWindow, Ui_MainWindow):
user_operation=True的情况:用户双击操作表格,通过【操作表格】进行增删改,通过【在此处添加旁白】来添加一行
initial_ing为true时,不会生成音频,不会写入历史记录
"""
print("set一次")
if not user_operation:
self.projectContext.initial_ing = True
subtitle_list = self.projectContext.subtitle_list
......@@ -1076,6 +1079,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.pb_tableWidget.setItem(
row, constant.Aside.AsideColumnNumber, item)
# debug用的,现在暂时没啥用
def view_history_slot(self):
print("=="*10)
print("self.sld_video.maximumSize", self.sld_video.maximumSize(),
......@@ -1151,6 +1155,10 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.operation_dialog.show()
def insert_aside_from_now_slot(self):
if self.player.duration() == 0 or self.projectContext.project_base_dir in [None, ""]:
self.prompt_dialog.show_with_msg("插入失败!未检测到视频或工程!")
return
print("self.player.position()", self.player.position())
cur_time = round(self.player.position()/1000, 2)
idx = self.calculate_element_row(cur_time)
print("[insert_aside_from_now_slot] idx=", idx)
......
......@@ -309,6 +309,9 @@
background: #ffd740;
}</string>
</property>
<property name="value">
<number>99</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
......@@ -587,11 +590,9 @@
</property>
<addaction name="action_undo"/>
<addaction name="action_redo"/>
<addaction name="action_view_history"/>
<addaction name="separator"/>
<addaction name="action_insert_aside_from_now"/>
<addaction name="action_operate"/>
<addaction name="action_insert_subtitle_from_now"/>
</widget>
<widget class="QMenu" name="menu_3">
<property name="title">
......@@ -652,11 +653,6 @@
<string>旁白音频合成</string>
</property>
</action>
<action name="action_view_history">
<property name="text">
<string>----</string>
</property>
</action>
<action name="action_refresh_tab">
<property name="text">
<string>刷新且保存表格</string>
......@@ -677,11 +673,6 @@
<string>当前位置插入旁白</string>
</property>
</action>
<action name="action_insert_subtitle_from_now">
<property name="text">
<string>当前位置插入字幕</string>
</property>
</action>
<action name="action_create">
<property name="text">
<string>新建</string>
......
......@@ -166,6 +166,7 @@ class Ui_MainWindow(object):
" QSlider::sub-page {\n"
" background: #ffd740;\n"
" }")
self.sld_audio.setProperty("value", 99)
self.sld_audio.setOrientation(QtCore.Qt.Horizontal)
self.sld_audio.setObjectName("sld_audio")
self.horizontalLayout_5.addWidget(self.sld_audio)
......@@ -342,8 +343,6 @@ class Ui_MainWindow(object):
self.action_3.setObjectName("action_3")
self.action_4 = QtWidgets.QAction(MainWindow)
self.action_4.setObjectName("action_4")
self.action_view_history = QtWidgets.QAction(MainWindow)
self.action_view_history.setObjectName("action_view_history")
self.action_refresh_tab = QtWidgets.QAction(MainWindow)
self.action_refresh_tab.setObjectName("action_refresh_tab")
self.action_operate = QtWidgets.QAction(MainWindow)
......@@ -352,8 +351,6 @@ class Ui_MainWindow(object):
self.action_export.setObjectName("action_export")
self.action_insert_aside_from_now = QtWidgets.QAction(MainWindow)
self.action_insert_aside_from_now.setObjectName("action_insert_aside_from_now")
self.action_insert_subtitle_from_now = QtWidgets.QAction(MainWindow)
self.action_insert_subtitle_from_now.setObjectName("action_insert_subtitle_from_now")
self.action_create = QtWidgets.QAction(MainWindow)
self.action_create.setObjectName("action_create")
self.menu.addAction(self.action_create)
......@@ -366,11 +363,9 @@ class Ui_MainWindow(object):
self.menu.addAction(self.setting)
self.menu_2.addAction(self.action_undo)
self.menu_2.addAction(self.action_redo)
self.menu_2.addAction(self.action_view_history)
self.menu_2.addSeparator()
self.menu_2.addAction(self.action_insert_aside_from_now)
self.menu_2.addAction(self.action_operate)
self.menu_2.addAction(self.action_insert_subtitle_from_now)
self.menu_3.addAction(self.action_3)
self.menu_3.addAction(self.action_4)
self.menu_3.addSeparator()
......@@ -407,12 +402,10 @@ class Ui_MainWindow(object):
self.action_redo.setText(_translate("MainWindow", "重做"))
self.action_3.setText(_translate("MainWindow", "旁白区间检测"))
self.action_4.setText(_translate("MainWindow", "旁白音频合成"))
self.action_view_history.setText(_translate("MainWindow", "----"))
self.action_refresh_tab.setText(_translate("MainWindow", "刷新且保存表格"))
self.action_operate.setText(_translate("MainWindow", "操作表格"))
self.action_export.setText(_translate("MainWindow", "导出"))
self.action_insert_aside_from_now.setText(_translate("MainWindow", "当前位置插入旁白"))
self.action_insert_subtitle_from_now.setText(_translate("MainWindow", "当前位置插入字幕"))
self.action_create.setText(_translate("MainWindow", "新建"))
......
......@@ -6,6 +6,7 @@ from PyQt5.QtWidgets import *
import utils
from operation_dialog_ui import Ui_Dialog
# from main_window import MainWindow
# todo 注意,删除行,添加行,暂不支持【撤销与重做】功能!!!
......@@ -28,6 +29,11 @@ class Operation_Dialog(QDialog, Ui_Dialog):
# 如果是【修改一行】,选择行的时候要瞬间更新成目前行的内容
self.pushButton_3.clicked.connect(self.fill_row_info_slot)
self.pickStartPos.clicked.connect(self.pick_start_pos_slot)
self.pickEndPos.clicked.connect(self.pick_end_pos_slot)
self.buttonBox.setEnabled(False)
self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).clicked.connect(
self.start_operation_slot)
......@@ -44,6 +50,14 @@ class Operation_Dialog(QDialog, Ui_Dialog):
self.zmpb_change_slot()
self.adddel_change_slot()
def pick_start_pos_slot(self):
time = utils.transfer_second_to_time(str(self.mainWindow.player.position()/1000))
self.lineEdit_2.setText(time)
def pick_end_pos_slot(self):
time = utils.transfer_second_to_time(str(self.mainWindow.player.position()/1000))
self.lineEdit_3.setText(time)
def zmpb_change_slot(self):
# 如果是删除,则直接return
if self.comboBox_2.currentText() == "删除一行":
......
......@@ -6,38 +6,87 @@
<rect>
<x>0</x>
<y>0</y>
<width>574</width>
<height>384</height>
<width>711</width>
<height>502</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1,0,0,0">
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,1">
<layout class="QGridLayout" name="gridLayout" columnstretch="0,0,0,0,0">
<item row="1" column="3" colspan="2">
<widget class="QPushButton" name="pushButton_3">
<property name="text">
<string>填充
行信息</string>
</property>
</widget>
</item>
<item row="6" column="4">
<widget class="QComboBox" name="comboBox_3">
<property name="enabled">
<bool>true</bool>
</property>
<property name="editable">
<bool>false</bool>
</property>
</widget>
</item>
<item row="8" column="4">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string/>
</property>
<property name="toolTipDuration">
<number>-1</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Ok</set>
</property>
<property name="centerButtons">
<bool>false</bool>
</property>
</widget>
</item>
<item row="6" column="3">
<widget class="QLabel" name="label_14">
<property name="text">
<string>语速:</string>
</property>
</widget>
</item>
<item row="8" column="1" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,1,1">
<property name="topMargin">
<number>0</number>
</property>
<item>
<widget class="QComboBox" name="comboBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="editable">
<bool>false</bool>
<widget class="QPushButton" name="pushButton_2">
<property name="text">
<string>修改</string>
</property>
<item>
<property name="text">
<string>字幕</string>
</property>
</item>
<item>
<property name="text">
<string>旁白</string>
</property>
</item>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
......@@ -49,8 +98,22 @@
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>检测</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="6" column="2">
<widget class="QLabel" name="label_11">
<property name="text">
<string>*请填文字</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QComboBox" name="comboBox_2">
<item>
......@@ -70,15 +133,19 @@
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<item row="5" column="2">
<widget class="QLabel" name="label_12">
<property name="text">
<string>我想操作第</string>
<string>*请填数字,必须是不超过100的正整数</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineEdit"/>
<item row="3" column="2">
<widget class="QLabel" name="label_9">
<property name="text">
<string>*请填数字,最多保留两位小数</string>
</property>
</widget>
</item>
<item row="1" column="2">
<layout class="QVBoxLayout" name="verticalLayout">
......@@ -103,39 +170,69 @@
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>起始时间:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEdit_2"/>
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,1">
<item>
<widget class="QComboBox" name="comboBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="editable">
<bool>false</bool>
</property>
<item>
<property name="text">
<string>字幕</string>
</property>
</item>
<item>
<property name="text">
<string>旁白</string>
</property>
</item>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_8">
<item row="5" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>*请填数字,最多保留两位小数</string>
<string>推荐字数:</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>结束时间:</string>
<item row="6" column="1">
<widget class="QLineEdit" name="lineEdit_6">
<property name="enabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="lineEdit_3">
<property name="enabled">
<bool>true</bool>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEdit_2"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>起始时间:</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLabel" name="label_9">
<item row="2" column="2">
<widget class="QLabel" name="label_8">
<property name="text">
<string>*请填数字,最多保留两位小数</string>
</property>
......@@ -148,13 +245,6 @@
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="lineEdit_4">
<property name="enabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QLabel" name="label_10">
<property name="text">
......@@ -162,10 +252,10 @@
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>推荐字数:</string>
<item row="4" column="1">
<widget class="QLineEdit" name="lineEdit_4">
<property name="enabled">
<bool>true</bool>
</property>
</widget>
</item>
......@@ -176,124 +266,48 @@
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QLabel" name="label_12">
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>*请填数字,必须是不超过100的正整数</string>
<string>我想操作第</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_7">
<item row="1" column="1">
<widget class="QLineEdit" name="lineEdit"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>旁白</string>
<string>结束时间</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLineEdit" name="lineEdit_6">
<item row="3" column="1">
<widget class="QLineEdit" name="lineEdit_3">
<property name="enabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="2">
<widget class="QLabel" name="label_11">
<item row="6" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>*请填文字</string>
<string>旁白:</string>
</property>
</widget>
</item>
<item row="6" column="3">
<widget class="QLabel" name="label_14">
<item row="2" column="3">
<widget class="QPushButton" name="pickStartPos">
<property name="text">
<string>语速:</string>
<string>取当前位置</string>
</property>
</widget>
</item>
<item row="6" column="4">
<widget class="QComboBox" name="comboBox_3">
<property name="enabled">
<bool>true</bool>
</property>
<property name="editable">
<bool>false</bool>
</property>
</widget>
</item>
<item row="8" column="4">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string/>
</property>
<property name="toolTipDuration">
<number>-1</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Ok</set>
</property>
<property name="centerButtons">
<bool>false</bool>
</property>
</widget>
</item>
<item row="8" column="1" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,1,1">
<property name="topMargin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="pushButton_2">
<property name="text">
<string>修改</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>检测</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="3" colspan="2">
<widget class="QPushButton" name="pushButton_3">
<item row="3" column="3">
<widget class="QPushButton" name="pickEndPos">
<property name="text">
<string>填充
行信息</string>
<string>取当前位置</string>
</property>
</widget>
</item>
......
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'd:\AddCaption\cur_version\accessibility_movie_2\operation_dialog.ui'
# Form implementation generated from reading ui file 'operation_dialog.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
# Created by: PyQt5 UI code generator 5.12
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
......@@ -14,35 +12,65 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(734, 437)
Dialog.resize(711, 502)
self.gridLayout = QtWidgets.QGridLayout(Dialog)
self.gridLayout.setObjectName("gridLayout")
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.comboBox = QtWidgets.QComboBox(Dialog)
self.comboBox.setEnabled(True)
self.comboBox.setEditable(False)
self.comboBox.setObjectName("comboBox")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.horizontalLayout.addWidget(self.comboBox)
self.pushButton_3 = QtWidgets.QPushButton(Dialog)
self.pushButton_3.setObjectName("pushButton_3")
self.gridLayout.addWidget(self.pushButton_3, 1, 3, 1, 2)
self.comboBox_3 = QtWidgets.QComboBox(Dialog)
self.comboBox_3.setEnabled(True)
self.comboBox_3.setEditable(False)
self.comboBox_3.setObjectName("comboBox_3")
self.gridLayout.addWidget(self.comboBox_3, 6, 4, 1, 1)
self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
self.buttonBox.setEnabled(False)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.buttonBox.sizePolicy().hasHeightForWidth())
self.buttonBox.setSizePolicy(sizePolicy)
self.buttonBox.setMinimumSize(QtCore.QSize(0, 0))
self.buttonBox.setToolTip("")
self.buttonBox.setToolTipDuration(-1)
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Ok)
self.buttonBox.setCenterButtons(False)
self.buttonBox.setObjectName("buttonBox")
self.gridLayout.addWidget(self.buttonBox, 8, 4, 1, 1)
self.label_14 = QtWidgets.QLabel(Dialog)
self.label_14.setObjectName("label_14")
self.gridLayout.addWidget(self.label_14, 6, 3, 1, 1)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setContentsMargins(-1, 0, -1, -1)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.pushButton_2 = QtWidgets.QPushButton(Dialog)
self.pushButton_2.setObjectName("pushButton_2")
self.horizontalLayout_2.addWidget(self.pushButton_2)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem)
self.horizontalLayout.setStretch(0, 1)
self.horizontalLayout.setStretch(1, 1)
self.gridLayout.addLayout(self.horizontalLayout, 0, 1, 1, 1)
self.horizontalLayout_2.addItem(spacerItem)
self.pushButton = QtWidgets.QPushButton(Dialog)
self.pushButton.setObjectName("pushButton")
self.horizontalLayout_2.addWidget(self.pushButton)
self.horizontalLayout_2.setStretch(0, 1)
self.horizontalLayout_2.setStretch(1, 1)
self.horizontalLayout_2.setStretch(2, 1)
self.gridLayout.addLayout(self.horizontalLayout_2, 8, 1, 1, 2)
self.label_11 = QtWidgets.QLabel(Dialog)
self.label_11.setObjectName("label_11")
self.gridLayout.addWidget(self.label_11, 6, 2, 1, 1)
self.comboBox_2 = QtWidgets.QComboBox(Dialog)
self.comboBox_2.setObjectName("comboBox_2")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.gridLayout.addWidget(self.comboBox_2, 0, 2, 1, 1)
self.label = QtWidgets.QLabel(Dialog)
self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 1, 0, 1, 1)
self.lineEdit = QtWidgets.QLineEdit(Dialog)
self.lineEdit.setObjectName("lineEdit")
self.gridLayout.addWidget(self.lineEdit, 1, 1, 1, 1)
self.label_12 = QtWidgets.QLabel(Dialog)
self.label_12.setObjectName("label_12")
self.gridLayout.addWidget(self.label_12, 5, 2, 1, 1)
self.label_9 = QtWidgets.QLabel(Dialog)
self.label_9.setObjectName("label_9")
self.gridLayout.addWidget(self.label_9, 3, 2, 1, 1)
self.verticalLayout = QtWidgets.QVBoxLayout()
self.verticalLayout.setObjectName("verticalLayout")
self.label_2 = QtWidgets.QLabel(Dialog)
......@@ -55,97 +83,72 @@ class Ui_Dialog(object):
self.label_13.setObjectName("label_13")
self.verticalLayout.addWidget(self.label_13)
self.gridLayout.addLayout(self.verticalLayout, 1, 2, 1, 1)
self.label_3 = QtWidgets.QLabel(Dialog)
self.label_3.setObjectName("label_3")
self.gridLayout.addWidget(self.label_3, 2, 0, 1, 1)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.comboBox = QtWidgets.QComboBox(Dialog)
self.comboBox.setEnabled(True)
self.comboBox.setEditable(False)
self.comboBox.setObjectName("comboBox")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.horizontalLayout.addWidget(self.comboBox)
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem1)
self.horizontalLayout.setStretch(0, 1)
self.horizontalLayout.setStretch(1, 1)
self.gridLayout.addLayout(self.horizontalLayout, 0, 1, 1, 1)
self.label_6 = QtWidgets.QLabel(Dialog)
self.label_6.setObjectName("label_6")
self.gridLayout.addWidget(self.label_6, 5, 0, 1, 1)
self.lineEdit_6 = QtWidgets.QLineEdit(Dialog)
self.lineEdit_6.setEnabled(True)
self.lineEdit_6.setObjectName("lineEdit_6")
self.gridLayout.addWidget(self.lineEdit_6, 6, 1, 1, 1)
self.lineEdit_2 = QtWidgets.QLineEdit(Dialog)
self.lineEdit_2.setObjectName("lineEdit_2")
self.gridLayout.addWidget(self.lineEdit_2, 2, 1, 1, 1)
self.label_3 = QtWidgets.QLabel(Dialog)
self.label_3.setObjectName("label_3")
self.gridLayout.addWidget(self.label_3, 2, 0, 1, 1)
self.label_8 = QtWidgets.QLabel(Dialog)
self.label_8.setObjectName("label_8")
self.gridLayout.addWidget(self.label_8, 2, 2, 1, 1)
self.label_4 = QtWidgets.QLabel(Dialog)
self.label_4.setObjectName("label_4")
self.gridLayout.addWidget(self.label_4, 3, 0, 1, 1)
self.lineEdit_3 = QtWidgets.QLineEdit(Dialog)
self.lineEdit_3.setEnabled(True)
self.lineEdit_3.setObjectName("lineEdit_3")
self.gridLayout.addWidget(self.lineEdit_3, 3, 1, 1, 1)
self.label_9 = QtWidgets.QLabel(Dialog)
self.label_9.setObjectName("label_9")
self.gridLayout.addWidget(self.label_9, 3, 2, 1, 1)
self.label_5 = QtWidgets.QLabel(Dialog)
self.label_5.setObjectName("label_5")
self.gridLayout.addWidget(self.label_5, 4, 0, 1, 1)
self.label_10 = QtWidgets.QLabel(Dialog)
self.label_10.setObjectName("label_10")
self.gridLayout.addWidget(self.label_10, 4, 2, 1, 1)
self.lineEdit_4 = QtWidgets.QLineEdit(Dialog)
self.lineEdit_4.setEnabled(True)
self.lineEdit_4.setObjectName("lineEdit_4")
self.gridLayout.addWidget(self.lineEdit_4, 4, 1, 1, 1)
self.label_10 = QtWidgets.QLabel(Dialog)
self.label_10.setObjectName("label_10")
self.gridLayout.addWidget(self.label_10, 4, 2, 1, 1)
self.label_6 = QtWidgets.QLabel(Dialog)
self.label_6.setObjectName("label_6")
self.gridLayout.addWidget(self.label_6, 5, 0, 1, 1)
self.lineEdit_5 = QtWidgets.QLineEdit(Dialog)
self.lineEdit_5.setEnabled(True)
self.lineEdit_5.setObjectName("lineEdit_5")
self.gridLayout.addWidget(self.lineEdit_5, 5, 1, 1, 1)
self.label_12 = QtWidgets.QLabel(Dialog)
self.label_12.setObjectName("label_12")
self.gridLayout.addWidget(self.label_12, 5, 2, 1, 1)
self.label = QtWidgets.QLabel(Dialog)
self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 1, 0, 1, 1)
self.lineEdit = QtWidgets.QLineEdit(Dialog)
self.lineEdit.setObjectName("lineEdit")
self.gridLayout.addWidget(self.lineEdit, 1, 1, 1, 1)
self.label_4 = QtWidgets.QLabel(Dialog)
self.label_4.setObjectName("label_4")
self.gridLayout.addWidget(self.label_4, 3, 0, 1, 1)
self.lineEdit_3 = QtWidgets.QLineEdit(Dialog)
self.lineEdit_3.setEnabled(True)
self.lineEdit_3.setObjectName("lineEdit_3")
self.gridLayout.addWidget(self.lineEdit_3, 3, 1, 1, 1)
self.label_7 = QtWidgets.QLabel(Dialog)
self.label_7.setObjectName("label_7")
self.gridLayout.addWidget(self.label_7, 6, 0, 1, 1)
self.lineEdit_6 = QtWidgets.QLineEdit(Dialog)
self.lineEdit_6.setEnabled(True)
self.lineEdit_6.setObjectName("lineEdit_6")
self.gridLayout.addWidget(self.lineEdit_6, 6, 1, 1, 1)
self.label_11 = QtWidgets.QLabel(Dialog)
self.label_11.setObjectName("label_11")
self.gridLayout.addWidget(self.label_11, 6, 2, 1, 1)
self.label_14 = QtWidgets.QLabel(Dialog)
self.label_14.setObjectName("label_14")
self.gridLayout.addWidget(self.label_14, 6, 3, 1, 1)
self.comboBox_3 = QtWidgets.QComboBox(Dialog)
self.comboBox_3.setEnabled(True)
self.comboBox_3.setEditable(False)
self.comboBox_3.setObjectName("comboBox_3")
self.gridLayout.addWidget(self.comboBox_3, 6, 4, 1, 1)
self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
self.buttonBox.setEnabled(False)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.buttonBox.sizePolicy().hasHeightForWidth())
self.buttonBox.setSizePolicy(sizePolicy)
self.buttonBox.setMinimumSize(QtCore.QSize(0, 0))
self.buttonBox.setToolTip("")
self.buttonBox.setToolTipDuration(-1)
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Ok)
self.buttonBox.setCenterButtons(False)
self.buttonBox.setObjectName("buttonBox")
self.gridLayout.addWidget(self.buttonBox, 8, 4, 1, 1)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setContentsMargins(-1, 0, -1, -1)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.pushButton_2 = QtWidgets.QPushButton(Dialog)
self.pushButton_2.setObjectName("pushButton_2")
self.horizontalLayout_2.addWidget(self.pushButton_2)
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_2.addItem(spacerItem1)
self.pushButton = QtWidgets.QPushButton(Dialog)
self.pushButton.setObjectName("pushButton")
self.horizontalLayout_2.addWidget(self.pushButton)
self.horizontalLayout_2.setStretch(0, 1)
self.horizontalLayout_2.setStretch(1, 1)
self.horizontalLayout_2.setStretch(2, 1)
self.gridLayout.addLayout(self.horizontalLayout_2, 8, 1, 1, 2)
self.pushButton_3 = QtWidgets.QPushButton(Dialog)
self.pushButton_3.setObjectName("pushButton_3")
self.gridLayout.addWidget(self.pushButton_3, 1, 3, 1, 2)
self.gridLayout.setColumnStretch(1, 1)
self.pickStartPos = QtWidgets.QPushButton(Dialog)
self.pickStartPos.setObjectName("pickStartPos")
self.gridLayout.addWidget(self.pickStartPos, 2, 3, 1, 1)
self.pickEndPos = QtWidgets.QPushButton(Dialog)
self.pickEndPos.setObjectName("pickEndPos")
self.gridLayout.addWidget(self.pickEndPos, 3, 3, 1, 1)
self.retranslateUi(Dialog)
QtCore.QMetaObject.connectSlotsByName(Dialog)
......@@ -153,25 +156,30 @@ class Ui_Dialog(object):
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
self.comboBox.setItemText(0, _translate("Dialog", "字幕"))
self.comboBox.setItemText(1, _translate("Dialog", "旁白"))
self.pushButton_3.setText(_translate("Dialog", "填充\n"
"行信息"))
self.label_14.setText(_translate("Dialog", "语速:"))
self.pushButton_2.setText(_translate("Dialog", "修改"))
self.pushButton.setText(_translate("Dialog", "检测"))
self.label_11.setText(_translate("Dialog", "*请填文字"))
self.comboBox_2.setItemText(0, _translate("Dialog", "增加一行"))
self.comboBox_2.setItemText(1, _translate("Dialog", "修改一行"))
self.comboBox_2.setItemText(2, _translate("Dialog", "删除一行"))
self.label.setText(_translate("Dialog", "我想操作第"))
self.label_12.setText(_translate("Dialog", "*请填数字,必须是不超过100的正整数"))
self.label_9.setText(_translate("Dialog", "*请填数字,最多保留两位小数"))
self.label_2.setText(_translate("Dialog", "行(如果操作是增加,则在该行后面增加)"))
self.label_13.setText(_translate("Dialog", "*需要填在【字幕旁白】页面中的行数"))
self.comboBox.setItemText(0, _translate("Dialog", "字幕"))
self.comboBox.setItemText(1, _translate("Dialog", "旁白"))
self.label_6.setText(_translate("Dialog", "推荐字数:"))
self.label_3.setText(_translate("Dialog", "起始时间:"))
self.label_8.setText(_translate("Dialog", "*请填数字,最多保留两位小数"))
self.label_4.setText(_translate("Dialog", "结束时间:"))
self.label_9.setText(_translate("Dialog", "*请填数字,最多保留两位小数"))
self.label_5.setText(_translate("Dialog", "字幕:"))
self.label_10.setText(_translate("Dialog", "*请填文字"))
self.label_6.setText(_translate("Dialog", "推荐字数:"))
self.label_12.setText(_translate("Dialog", "*请填数字"))
self.label.setText(_translate("Dialog", "我想操作第"))
self.label_4.setText(_translate("Dialog", "结束时间:"))
self.label_7.setText(_translate("Dialog", "旁白:"))
self.label_11.setText(_translate("Dialog", "*请填文字"))
self.label_14.setText(_translate("Dialog", "语速:"))
self.pushButton_2.setText(_translate("Dialog", "修改"))
self.pushButton.setText(_translate("Dialog", "检测"))
self.pushButton_3.setText(_translate("Dialog", "填充\n行信息"))
self.pickStartPos.setText(_translate("Dialog", "取当前位置"))
self.pickEndPos.setText(_translate("Dialog", "取当前位置"))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment