Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
accessibility_movie_2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵心治
accessibility_movie_2
Commits
a41348f6
Commit
a41348f6
authored
Nov 11, 2022
by
xuanweiace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化1:对话框取消后不抹掉文本
优化2:只有旁白tab可编辑 功能1:打开未完成的工程,询问是否继续检测 功能2:主窗口标题,显示工程名 修复1:同时多次运行旁白检测造成的bug
parent
37fd21ce
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
888 additions
and
136 deletions
+888
-136
assemble_dialog.py
assemble_dialog.py
+4
-5
detect_dialog.py
detect_dialog.py
+7
-7
main_window.py
main_window.py
+31
-14
main_window.ui
main_window.ui
+16
-36
main_window_ui.py
main_window_ui.py
+70
-67
management.py
management.py
+2
-0
prompt_dialog.py
prompt_dialog.py
+4
-2
start.py
start.py
+5
-1
synthesis.py
synthesis.py
+4
-4
主main_window.ui
主main_window.ui
+745
-0
No files found.
assemble_dialog.py
View file @
a41348f6
...
...
@@ -46,7 +46,7 @@ class Assemble_Dialog(QDialog, Ui_Dialog):
def
openFile
(
self
):
file_info
=
QFileDialog
.
getOpenFileNames
(
self
,
'选择视频'
,
os
.
getcwd
(),
"All Files(*);;Text Files(*.txt)"
)
file_name
,
ok
=
validate_and_get_filepath
(
file_info
)
if
ok
:
if
ok
and
file_name
!=
""
:
self
.
lineEdit
.
setText
(
file_name
)
def
openTableFile
(
self
):
...
...
@@ -58,15 +58,14 @@ class Assemble_Dialog(QDialog, Ui_Dialog):
print
(
file_info
)
file_name
,
ok
=
validate_and_get_filepath
(
file_info
)
print
(
file_name
,
ok
)
if
ok
:
if
ok
and
file_name
!=
""
:
self
.
lineEdit_2
.
setText
(
file_name
)
def
start_assemble
(
self
):
print
(
"start_assemble"
)
video_path
=
self
.
lineEdit
.
text
()
# 现在是默认 输出的音频和字幕路径和视频路径一致
audio_dir
=
os
.
path
.
dirname
(
self
.
lineEdit
.
text
())
# audio_dir = replace_path_suffix(self.lineEdit.text(), "")
# 默认 输出的音频是工程目录+/output
audio_dir
=
self
.
projectContext
.
project_base_dir
+
"output/"
sheet_path
=
self
.
lineEdit_2
.
text
()
speaker_info
=
self
.
lineEdit_3
.
text
()
speed_info
=
self
.
lineEdit_4
.
text
()
...
...
detect_dialog.py
View file @
a41348f6
...
...
@@ -6,7 +6,7 @@ from PyQt5.QtWidgets import *;
from
detect_dialog_ui
import
Ui_Dialog
from
utils
import
validate_and_get_filepath
,
replace_path_suffix
from
prompt_dialog
import
Prompt_Dialog
class
Detect_Dialog
(
QDialog
,
Ui_Dialog
):
...
...
@@ -22,7 +22,7 @@ class Detect_Dialog(QDialog, Ui_Dialog):
self
.
pushButton
.
clicked
.
connect
(
self
.
openFile
)
self
.
pushButton_2
.
clicked
.
connect
(
self
.
openTableFile
)
self
.
buttonBox
.
button
(
QDialogButtonBox
.
StandardButton
.
Ok
)
.
clicked
.
connect
(
self
.
start_detect
)
self
.
prompt_dialog
=
Prompt_Dialog
()
def
init_self
(
self
):
self
.
lineEdit
.
setText
(
self
.
projectContext
.
video_path
)
self
.
lineEdit_2
.
setText
(
self
.
projectContext
.
excel_path
)
...
...
@@ -31,9 +31,8 @@ class Detect_Dialog(QDialog, Ui_Dialog):
root_dir
=
os
.
getcwd
()
if
self
.
projectContext
.
video_path
is
None
else
os
.
path
.
dirname
(
self
.
projectContext
.
video_path
)
file_info
=
QFileDialog
.
getOpenFileNames
(
self
,
'选择视频'
,
root_dir
,
"Video Files(*.mp4 *.rmvb *mkv *avi)"
)
file_name
,
ok
=
validate_and_get_filepath
(
file_info
)
if
ok
:
if
ok
and
file_name
!=
""
:
self
.
lineEdit
.
setText
(
file_name
)
self
.
lineEdit_2
.
setText
(
replace_path_suffix
(
file_info
[
0
][
0
],
".xlsx"
))
def
openTableFile
(
self
):
now_path
=
os
.
path
.
join
(
os
.
getcwd
(),
self
.
lineEdit
.
text
())
...
...
@@ -43,7 +42,7 @@ class Detect_Dialog(QDialog, Ui_Dialog):
print
(
file_info
)
file_name
,
ok
=
validate_and_get_filepath
(
file_info
)
print
(
file_name
,
ok
)
if
ok
:
if
ok
and
file_name
!=
""
:
self
.
lineEdit_2
.
setText
(
file_name
)
def
start_detect
(
self
):
...
...
@@ -53,9 +52,10 @@ class Detect_Dialog(QDialog, Ui_Dialog):
# 版本2.0:
# 在主窗口启动时,就启动一个QThread,专门接收该信号并进行检测,
# 发出该信号后,由QThread和主窗口同时接收,然后让他俩通过信号交互即可。
if
self
.
lineEdit
.
text
()
!=
""
and
self
.
lineEdit_2
.
text
()
!=
""
:
self
.
start_detect_signal
.
emit
(
self
.
lineEdit
.
text
(),
self
.
lineEdit_2
.
text
())
else
:
self
.
prompt_dialog
.
show_with_msg
(
"检测路径不能为空"
)
if
__name__
==
'__main__'
:
app
=
QApplication
(
sys
.
argv
)
...
...
main_window.py
View file @
a41348f6
...
...
@@ -66,6 +66,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
# 提示框
self
.
prompt_dialog
=
Prompt_Dialog
()
self
.
continue_detect_prompt_dialog
=
Prompt_Dialog
(
self
.
continue_detect
)
# 操作框
self
.
operation_dialog
=
Operation_Dialog
(
self
)
...
...
@@ -137,6 +138,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
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
)
"""
视频相关信息
...
...
@@ -251,6 +253,9 @@ class MainWindow(QMainWindow, Ui_MainWindow):
# 更新工程信息
self
.
projectContext
.
Init
(
project_path
)
# 如果嗅探到旁白检测未完成,则询问是否继续
if
self
.
projectContext
.
detected
==
True
and
self
.
projectContext
.
nd_process
<
1
:
self
.
continue_detect_prompt_dialog
.
show_with_msg
(
"您的上次任务未完成,是否继续检测?"
)
self
.
update_ui
()
# 重写关闭Mmainwindow窗口
...
...
@@ -314,7 +319,11 @@ class MainWindow(QMainWindow, Ui_MainWindow):
QApplication
.
exit
(
MainWindow
.
EXIT_CODE_REBOOT
)
else
:
# 直接在当前界面刷新
project_name
=
os
.
path
.
basename
(
project_path
)
self
.
setWindowTitle
(
f
"无障碍电影制作软件(当前工程为:{project_name})"
)
self
.
projectContext
.
Init
(
project_path
)
if
self
.
projectContext
.
detected
==
True
and
self
.
projectContext
.
nd_process
<
1
:
self
.
continue_detect_prompt_dialog
.
show_with_msg
(
"您的上次任务未完成,是否继续检测?"
)
self
.
update_ui
()
...
...
@@ -367,6 +376,9 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self
.
playVideo
()
# 播放视频
self
.
action_insert_aside_from_now
.
setEnabled
(
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
)
def
start_detect
(
self
,
video_path
,
book_path
):
"""检测旁白
...
...
@@ -376,6 +388,10 @@ class MainWindow(QMainWindow, Ui_MainWindow):
函数运行过程中实时监测函数的运行情况,如果发现函数报错,则中断线程,弹出报错窗口,否则等待函数正常结束,并更新UI中的组件。
"""
# 检查是否已有线程在运行旁白检测
if
self
.
threads
!=
[]:
self
.
show_warning_msg_box
(
"请勿重复检测!"
)
return
# 检测各种输入的合理性
if
len
(
video_path
)
==
0
:
self
.
show_warning_msg_box
(
"请输入视频文件路径"
)
...
...
@@ -758,8 +774,8 @@ class MainWindow(QMainWindow, Ui_MainWindow):
# 只有Content页的字幕列和 Aside页的字幕列 可编辑
def
checkIfTableItemCanChange
(
self
,
table
:
QTableWidget
,
i
:
int
,
j
:
int
):
if
table
.
objectName
()
==
self
.
all_tableWidget
.
objectName
()
and
j
in
constant
.
Content
.
ActivateColumns
:
return
True
#
if table.objectName() == self.all_tableWidget.objectName() and j in constant.Content.ActivateColumns:
#
return True
if
table
.
objectName
()
==
self
.
pb_tableWidget
.
objectName
()
and
j
in
constant
.
Aside
.
ActivateColumns
:
return
True
return
False
...
...
@@ -1043,6 +1059,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self
.
label_2
.
setText
(
cur_time
+
"/"
+
duration_time
)
# video_timer触发timeout信号的时候,会执行该函数,修改高亮行
def
change_table_select_rows
(
self
):
cur_time
=
self
.
player
.
position
()
/
1000
if
self
.
curTab
==
0
:
...
...
@@ -1051,18 +1068,18 @@ class MainWindow(QMainWindow, Ui_MainWindow):
if
utils
.
trans_to_seconds
(
all_elements
[
i
]
.
st_time_sec
)
<=
cur_time
:
self
.
all_tableWidget
.
selectRow
(
i
)
break
elif
self
.
curTab
==
1
:
subtitle_list
=
self
.
projectContext
.
subtitle_list
for
i
in
range
(
len
(
subtitle_list
)
-
1
,
-
1
,
-
1
):
if
utils
.
trans_to_seconds
(
subtitle_list
[
i
]
.
st_time_sec
)
<=
cur_time
:
self
.
zm_tableWidget
.
selectRow
(
i
)
break
else
:
aside_list
=
self
.
projectContext
.
aside_list
for
i
in
range
(
len
(
aside_list
)
-
1
,
-
1
,
-
1
):
if
utils
.
trans_to_seconds
(
aside_list
[
i
]
.
st_time_sec
)
<=
cur_time
:
self
.
pb_tableWidget
.
selectRow
(
i
)
break
#
elif self.curTab == 1:
#
subtitle_list = self.projectContext.subtitle_list
#
for i in range(len(subtitle_list) - 1, -1, -1):
#
if utils.trans_to_seconds(subtitle_list[i].st_time_sec) <= cur_time:
#
self.zm_tableWidget.selectRow(i)
#
break
#
else:
#
aside_list = self.projectContext.aside_list
#
for i in range(len(aside_list) - 1, -1, -1):
#
if utils.trans_to_seconds(aside_list[i].st_time_sec) <= cur_time:
#
self.pb_tableWidget.selectRow(i)
#
break
def
player_change_slot
(
self
,
new_duration
:
int
):
# 在【打开工程】操作的时候,设置sld_video的最大值为电影秒数。
...
...
main_window.ui
View file @
a41348f6
...
...
@@ -6,8 +6,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
9
2
4
</width>
<height>
7
63
</height>
<width>
9
4
4
</width>
<height>
7
12
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
...
...
@@ -23,13 +23,13 @@
}
</string>
</property>
<widget
class=
"QWidget"
name=
"centralwidget"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
stretch=
"8"
>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
stretch=
"5,
1
"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
stretch=
"5,
2
"
>
<item>
<layout
class=
"QHBoxLayout"
name=
"shuiping"
stretch=
"3,5"
>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
stretch=
"8,1,
1
"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
stretch=
"8,1,
0
"
>
<item>
<widget
class=
"myVideoWidget"
name=
"wgt_video"
native=
"true"
>
<property
name=
"minimumSize"
>
...
...
@@ -144,7 +144,7 @@
</widget>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_5"
stretch=
"2,1,
2
,1,1,1"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_5"
stretch=
"2,1,
0
,1,1,1"
>
<item>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"maximumSize"
>
...
...
@@ -324,18 +324,11 @@
</layout>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_6"
stretch=
"0
,0
"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_6"
stretch=
"0"
>
<item>
<widget
class=
"QPushButton"
name=
"
pickStart
"
>
<widget
class=
"QPushButton"
name=
"
insert_aside_from_now_btn
"
>
<property
name=
"text"
>
<string>
选择开始时间
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"pickEnd"
>
<property
name=
"text"
>
<string>
选择终止时间
</string>
<string>
当前位置插入旁白
</string>
</property>
</widget>
</item>
...
...
@@ -420,7 +413,7 @@
</item>
<item>
<widget
class=
"QWidget"
name=
"verticalWidget_2"
native=
"true"
>
<layout
class=
"QVBoxLayout"
name=
"chuizhi"
>
<layout
class=
"QVBoxLayout"
name=
"chuizhi"
stretch=
"1,2,1,2"
>
<item>
<widget
class=
"QLabel"
name=
"zm_label"
>
<property
name=
"sizePolicy"
>
...
...
@@ -505,19 +498,6 @@
</item>
</layout>
</item>
<item>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QLabel"
name=
"pb_label"
>
<property
name=
"sizePolicy"
>
...
...
@@ -584,8 +564,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
9
2
4
</width>
<height>
2
2
</height>
<width>
9
4
4
</width>
<height>
2
6
</height>
</rect>
</property>
<widget
class=
"QMenu"
name=
"menu"
>
...
...
@@ -617,8 +597,8 @@
<property
name=
"title"
>
<string>
功能按键
</string>
</property>
<addaction
name=
"action
a
_3"
/>
<addaction
name=
"action
a
_4"
/>
<addaction
name=
"action_3"
/>
<addaction
name=
"action_4"
/>
<addaction
name=
"separator"
/>
<addaction
name=
"action_refresh_tab"
/>
</widget>
...
...
@@ -662,12 +642,12 @@
<string>
重做
</string>
</property>
</action>
<action
name=
"action
a
_3"
>
<action
name=
"action_3"
>
<property
name=
"text"
>
<string>
旁白区间检测
</string>
</property>
</action>
<action
name=
"action
a
_4"
>
<action
name=
"action_4"
>
<property
name=
"text"
>
<string>
旁白音频合成
</string>
</property>
...
...
main_window_ui.py
View file @
a41348f6
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '
d:\AddCaption\cur_version\accessibility_movie_2\main_window_modified
.ui'
# Form implementation generated from reading ui file '
main_window
.ui'
#
# Created by: PyQt5 UI code generator 5.1
5.4
# Created by: PyQt5 UI code generator 5.1
2
#
# 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
from
myVideoWidget
import
myVideoWidget
from
myvideoslider
import
myVideoSlider
from
mywidgetcontents
import
myWidgetContents
class
Ui_MainWindow
(
object
):
def
setupUi
(
self
,
MainWindow
):
MainWindow
.
setObjectName
(
"MainWindow"
)
MainWindow
.
resize
(
9
39
,
763
)
MainWindow
.
resize
(
9
44
,
712
)
MainWindow
.
setStyleSheet
(
"QMainWindow:{
\n
"
" border: 2px groove gray;
\n
"
" border-radius: 25px;
\n
"
...
...
@@ -38,15 +33,20 @@ class Ui_MainWindow(object):
self
.
wgt_video
=
myVideoWidget
(
self
.
centralwidget
)
self
.
wgt_video
.
setMinimumSize
(
QtCore
.
QSize
(
410
,
200
))
self
.
wgt_video
.
setMaximumSize
(
QtCore
.
QSize
(
16777215
,
16777215
))
self
.
wgt_video
.
setStyleSheet
(
"background-color: #000"
)
palette
=
QtGui
.
QPalette
()
brush
=
QtGui
.
QBrush
(
QtGui
.
QColor
(
255
,
255
,
255
))
brush
=
QtGui
.
QBrush
(
QtGui
.
QColor
(
0
,
0
,
0
))
brush
.
setStyle
(
QtCore
.
Qt
.
SolidPattern
)
palette
.
setBrush
(
QtGui
.
QPalette
.
Active
,
QtGui
.
QPalette
.
Button
,
brush
)
brush
=
QtGui
.
QBrush
(
QtGui
.
QColor
(
0
,
0
,
0
))
brush
.
setStyle
(
QtCore
.
Qt
.
SolidPattern
)
palette
.
setBrush
(
QtGui
.
QPalette
.
Active
,
QtGui
.
QPalette
.
Base
,
brush
)
brush
=
QtGui
.
QBrush
(
QtGui
.
QColor
(
0
,
0
,
0
))
brush
.
setStyle
(
QtCore
.
Qt
.
SolidPattern
)
palette
.
setBrush
(
QtGui
.
QPalette
.
Active
,
QtGui
.
QPalette
.
Window
,
brush
)
brush
=
QtGui
.
QBrush
(
QtGui
.
QColor
(
255
,
255
,
255
))
brush
=
QtGui
.
QBrush
(
QtGui
.
QColor
(
0
,
0
,
0
))
brush
.
setStyle
(
QtCore
.
Qt
.
SolidPattern
)
palette
.
setBrush
(
QtGui
.
QPalette
.
Inactive
,
QtGui
.
QPalette
.
Button
,
brush
)
brush
=
QtGui
.
QBrush
(
QtGui
.
QColor
(
0
,
0
,
0
))
brush
.
setStyle
(
QtCore
.
Qt
.
SolidPattern
)
palette
.
setBrush
(
QtGui
.
QPalette
.
Inactive
,
QtGui
.
QPalette
.
Base
,
brush
)
brush
=
QtGui
.
QBrush
(
QtGui
.
QColor
(
0
,
0
,
0
))
...
...
@@ -54,12 +54,16 @@ class Ui_MainWindow(object):
palette
.
setBrush
(
QtGui
.
QPalette
.
Inactive
,
QtGui
.
QPalette
.
Window
,
brush
)
brush
=
QtGui
.
QBrush
(
QtGui
.
QColor
(
0
,
0
,
0
))
brush
.
setStyle
(
QtCore
.
Qt
.
SolidPattern
)
palette
.
setBrush
(
QtGui
.
QPalette
.
Disabled
,
QtGui
.
QPalette
.
Button
,
brush
)
brush
=
QtGui
.
QBrush
(
QtGui
.
QColor
(
0
,
0
,
0
))
brush
.
setStyle
(
QtCore
.
Qt
.
SolidPattern
)
palette
.
setBrush
(
QtGui
.
QPalette
.
Disabled
,
QtGui
.
QPalette
.
Base
,
brush
)
brush
=
QtGui
.
QBrush
(
QtGui
.
QColor
(
0
,
0
,
0
))
brush
.
setStyle
(
QtCore
.
Qt
.
SolidPattern
)
palette
.
setBrush
(
QtGui
.
QPalette
.
Disabled
,
QtGui
.
QPalette
.
Window
,
brush
)
self
.
wgt_video
.
setPalette
(
palette
)
self
.
wgt_video
.
setAutoFillBackground
(
True
)
self
.
wgt_video
.
setAutoFillBackground
(
False
)
self
.
wgt_video
.
setStyleSheet
(
"background-color: #000"
)
self
.
wgt_video
.
setObjectName
(
"wgt_video"
)
self
.
verticalLayout_2
.
addWidget
(
self
.
wgt_video
)
self
.
horizontalLayout_5
=
QtWidgets
.
QHBoxLayout
()
...
...
@@ -71,11 +75,11 @@ class Ui_MainWindow(object):
spacerItem
=
QtWidgets
.
QSpacerItem
(
25
,
20
,
QtWidgets
.
QSizePolicy
.
Expanding
,
QtWidgets
.
QSizePolicy
.
Minimum
)
self
.
horizontalLayout_5
.
addItem
(
spacerItem
)
self
.
btn_play
=
QtWidgets
.
QPushButton
(
self
.
centralwidget
)
#
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
#
sizePolicy.setHorizontalStretch(0)
#
sizePolicy.setVerticalStretch(0)
#
sizePolicy.setHeightForWidth(self.btn_play.sizePolicy().hasHeightForWidth())
#
self.btn_play.setSizePolicy(sizePolicy)
sizePolicy
=
QtWidgets
.
QSizePolicy
(
QtWidgets
.
QSizePolicy
.
Minimum
,
QtWidgets
.
QSizePolicy
.
Minimum
)
sizePolicy
.
setHorizontalStretch
(
0
)
sizePolicy
.
setVerticalStretch
(
0
)
sizePolicy
.
setHeightForWidth
(
self
.
btn_play
.
sizePolicy
()
.
hasHeightForWidth
())
self
.
btn_play
.
setSizePolicy
(
sizePolicy
)
self
.
btn_play
.
setMinimumSize
(
QtCore
.
QSize
(
30
,
30
))
self
.
btn_play
.
setMaximumSize
(
QtCore
.
QSize
(
30
,
30
))
self
.
btn_play
.
setStyleSheet
(
"QPushButton {
\n
"
...
...
@@ -90,14 +94,14 @@ class Ui_MainWindow(object):
" padding: 5px;
\n
"
" }
\n
"
"
\n
"
"QPushButton:hover {
\n
"
"
QPushButton:hover {
\n
"
" background: qradialgradient(
\n
"
" cx: 0.3, cy: -0.4, fx: 0.3, fy: -0.4,
\n
"
" radius: 1.35, stop: 0 #fff, stop: 1 #bbb
\n
"
" );
\n
"
" }
\n
"
"
\n
"
"QPushButton:pressed {
\n
"
"
QPushButton:pressed {
\n
"
" border-style: inset;
\n
"
" background: qradialgradient(
\n
"
" cx: 0.4, cy: -0.1, fx: 0.4, fy: -0.1,
\n
"
...
...
@@ -117,53 +121,51 @@ class Ui_MainWindow(object):
self
.
sld_audio
=
QtWidgets
.
QSlider
(
self
.
centralwidget
)
self
.
sld_audio
.
setMinimumSize
(
QtCore
.
QSize
(
0
,
24
))
self
.
sld_audio
.
setMaximumSize
(
QtCore
.
QSize
(
80
,
24
))
self
.
sld_audio
.
setSingleStep
(
5
)
self
.
sld_audio
.
setProperty
(
"value"
,
100
)
self
.
sld_audio
.
setStyleSheet
(
"QSlider:horizontal {
\n
"
" min-height: 24px;
\n
"
" max-height: 24px;
\n
"
"}
\n
"
"
}
\n
"
"
\n
"
"QSlider:vertical {
\n
"
"
QSlider:vertical {
\n
"
" min-width: 24px;
\n
"
" max-width: 24px;
\n
"
"}
\n
"
"
}
\n
"
"
\n
"
"QSlider::groove:horizontal {
\n
"
"
QSlider::groove:horizontal {
\n
"
" height: 4px;
\n
"
" background: #393939;
\n
"
" margin: 0 12px;
\n
"
"}
\n
"
"
}
\n
"
"
\n
"
"QSlider::groove:vertical {
\n
"
"
QSlider::groove:vertical {
\n
"
" width: 4px;
\n
"
" background: #393939;
\n
"
" margin: 12px 0;
\n
"
" border-radius: 24px;
\n
"
"}
\n
"
"
}
\n
"
"
\n
"
"QSlider::handle:horizontal {
\n
"
"
QSlider::handle:horizontal {
\n
"
" image: url(images/slider.svg);
\n
"
" width: 12px;
\n
"
" height: 12px;
\n
"
" margin: -24px -12px;
\n
"
"}
\n
"
"
}
\n
"
"
\n
"
"QSlider::handle:vertical {
\n
"
"
QSlider::handle:vertical {
\n
"
" image: url(images/slider.svg);
\n
"
" border-radius: 24px;
\n
"
" width: 12px;
\n
"
" height: 12px;
\n
"
" margin: -12px -24px;
\n
"
"}
\n
"
"
}
\n
"
"
\n
"
"QSlider::add-page {
\n
"
"background: #232629;
\n
"
"}
\n
"
"
QSlider::add-page {
\n
"
"
background: #232629;
\n
"
"
}
\n
"
"
\n
"
"QSlider::sub-page {
\n
"
"background: #ffd740;
\n
"
"}"
)
"
QSlider::sub-page {
\n
"
"
background: #ffd740;
\n
"
"
}"
)
self
.
sld_audio
.
setOrientation
(
QtCore
.
Qt
.
Horizontal
)
self
.
sld_audio
.
setObjectName
(
"sld_audio"
)
self
.
horizontalLayout_5
.
addWidget
(
self
.
sld_audio
)
...
...
@@ -172,23 +174,18 @@ class Ui_MainWindow(object):
self
.
horizontalLayout_5
.
addWidget
(
self
.
lab_audio
)
self
.
horizontalLayout_5
.
setStretch
(
0
,
2
)
self
.
horizontalLayout_5
.
setStretch
(
1
,
1
)
self
.
horizontalLayout_5
.
setStretch
(
2
,
2
)
self
.
horizontalLayout_5
.
setStretch
(
3
,
1
)
self
.
horizontalLayout_5
.
setStretch
(
4
,
1
)
self
.
horizontalLayout_5
.
setStretch
(
5
,
1
)
self
.
verticalLayout_2
.
addLayout
(
self
.
horizontalLayout_5
)
self
.
horizontalLayout_6
=
QtWidgets
.
QHBoxLayout
()
self
.
horizontalLayout_6
.
setObjectName
(
"horizontalLayout_6"
)
self
.
pickStart
=
QtWidgets
.
QPushButton
(
self
.
centralwidget
)
self
.
pickStart
.
setObjectName
(
"pickStart"
)
self
.
horizontalLayout_6
.
addWidget
(
self
.
pickStart
)
self
.
pickEnd
=
QtWidgets
.
QPushButton
(
self
.
centralwidget
)
self
.
pickEnd
.
setObjectName
(
"pickEnd"
)
self
.
horizontalLayout_6
.
addWidget
(
self
.
pickEnd
)
self
.
insert_aside_from_now_btn
=
QtWidgets
.
QPushButton
(
self
.
centralwidget
)
self
.
insert_aside_from_now_btn
.
setObjectName
(
"insert_aside_from_now_btn"
)
self
.
horizontalLayout_6
.
addWidget
(
self
.
insert_aside_from_now_btn
)
self
.
verticalLayout_2
.
addLayout
(
self
.
horizontalLayout_6
)
self
.
verticalLayout_2
.
setStretch
(
0
,
8
)
self
.
verticalLayout_2
.
setStretch
(
1
,
1
)
self
.
verticalLayout_2
.
setStretch
(
2
,
1
)
self
.
shuiping
.
addLayout
(
self
.
verticalLayout_2
)
self
.
tabWidget
=
QtWidgets
.
QTabWidget
(
self
.
centralwidget
)
self
.
tabWidget
.
setEnabled
(
True
)
...
...
@@ -256,10 +253,10 @@ class Ui_MainWindow(object):
self
.
scrollArea
.
setWidgetResizable
(
False
)
self
.
scrollArea
.
setObjectName
(
"scrollArea"
)
self
.
scrollAreaWidgetContents
=
myWidgetContents
()
self
.
scrollAreaWidgetContents
.
setGeometry
(
QtCore
.
QRect
(
0
,
0
,
8
00
,
40
))
self
.
scrollAreaWidgetContents
.
setGeometry
(
QtCore
.
QRect
(
0
,
0
,
8
27
,
64
))
self
.
scrollAreaWidgetContents
.
setObjectName
(
"scrollAreaWidgetContents"
)
self
.
sld_video
=
myVideoSlider
(
self
.
scrollAreaWidgetContents
)
self
.
sld_video
.
setGeometry
(
QtCore
.
QRect
(
10
,
20
,
790
,
3
0
))
self
.
sld_video
.
setGeometry
(
QtCore
.
QRect
(
10
,
30
,
811
,
2
0
))
self
.
sld_video
.
setMinimumSize
(
QtCore
.
QSize
(
410
,
0
))
self
.
sld_video
.
setMaximumSize
(
QtCore
.
QSize
(
16777215
,
20
))
self
.
sld_video
.
setMaximum
(
100
)
...
...
@@ -276,8 +273,6 @@ class Ui_MainWindow(object):
self
.
zm_slider_layout
.
setStretch
(
0
,
15
)
self
.
zm_slider_layout
.
setStretch
(
1
,
1
)
self
.
chuizhi
.
addLayout
(
self
.
zm_slider_layout
)
spacerItem2
=
QtWidgets
.
QSpacerItem
(
20
,
40
,
QtWidgets
.
QSizePolicy
.
Minimum
,
QtWidgets
.
QSizePolicy
.
Expanding
)
self
.
chuizhi
.
addItem
(
spacerItem2
)
self
.
pb_label
=
QtWidgets
.
QLabel
(
self
.
verticalWidget_2
)
sizePolicy
=
QtWidgets
.
QSizePolicy
(
QtWidgets
.
QSizePolicy
.
Preferred
,
QtWidgets
.
QSizePolicy
.
Preferred
)
sizePolicy
.
setHorizontalStretch
(
0
)
...
...
@@ -306,13 +301,18 @@ class Ui_MainWindow(object):
self
.
kd_slider
.
setObjectName
(
"kd_slider"
)
self
.
kd_slider_layout
.
addWidget
(
self
.
kd_slider
)
self
.
chuizhi
.
addLayout
(
self
.
kd_slider_layout
)
self
.
chuizhi
.
setStretch
(
0
,
1
)
self
.
chuizhi
.
setStretch
(
1
,
2
)
self
.
chuizhi
.
setStretch
(
2
,
1
)
self
.
chuizhi
.
setStretch
(
3
,
2
)
self
.
verticalLayout
.
addWidget
(
self
.
verticalWidget_2
)
self
.
verticalLayout
.
setStretch
(
0
,
5
)
self
.
verticalLayout
.
setStretch
(
1
,
1
)
self
.
verticalLayout
.
setStretch
(
1
,
2
)
self
.
horizontalLayout
.
addLayout
(
self
.
verticalLayout
)
self
.
horizontalLayout
.
setStretch
(
0
,
8
)
MainWindow
.
setCentralWidget
(
self
.
centralwidget
)
self
.
menubar
=
QtWidgets
.
QMenuBar
(
MainWindow
)
self
.
menubar
.
setGeometry
(
QtCore
.
QRect
(
0
,
0
,
9
39
,
26
))
self
.
menubar
.
setGeometry
(
QtCore
.
QRect
(
0
,
0
,
9
44
,
26
))
self
.
menubar
.
setObjectName
(
"menubar"
)
self
.
menu
=
QtWidgets
.
QMenu
(
self
.
menubar
)
self
.
menu
.
setObjectName
(
"menu"
)
...
...
@@ -344,8 +344,8 @@ class Ui_MainWindow(object):
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_refresh_tab
=
QtWidgets
.
QAction
(
MainWindow
)
self
.
action_refresh_tab
.
setObjectName
(
"action_refresh_tab"
)
self
.
action_operate
=
QtWidgets
.
QAction
(
MainWindow
)
self
.
action_operate
.
setObjectName
(
"action_operate"
)
self
.
action_export
=
QtWidgets
.
QAction
(
MainWindow
)
...
...
@@ -366,15 +366,15 @@ 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
.
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_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()
#
self.menu_3.addAction(self.action_refresh_tab)
self
.
menu_3
.
addSeparator
()
self
.
menu_3
.
addAction
(
self
.
action_refresh_tab
)
self
.
menubar
.
addAction
(
self
.
menu
.
menuAction
())
self
.
menubar
.
addAction
(
self
.
menu_2
.
menuAction
())
self
.
menubar
.
addAction
(
self
.
menu_3
.
menuAction
())
...
...
@@ -388,8 +388,7 @@ class Ui_MainWindow(object):
MainWindow
.
setWindowTitle
(
_translate
(
"MainWindow"
,
"MainWindow"
))
self
.
label_2
.
setText
(
_translate
(
"MainWindow"
,
"00:00/00:00"
))
self
.
lab_audio
.
setText
(
_translate
(
"MainWindow"
,
"音量:100
%
"
))
self
.
pickStart
.
setText
(
_translate
(
"MainWindow"
,
"选择开始时间"
))
self
.
pickEnd
.
setText
(
_translate
(
"MainWindow"
,
"选择终止时间"
))
self
.
insert_aside_from_now_btn
.
setText
(
_translate
(
"MainWindow"
,
"当前位置插入旁白"
))
self
.
tabWidget
.
setTabText
(
self
.
tabWidget
.
indexOf
(
self
.
all_tab
),
_translate
(
"MainWindow"
,
"字幕旁白"
))
self
.
tabWidget
.
setTabText
(
self
.
tabWidget
.
indexOf
(
self
.
zm_tab
),
_translate
(
"MainWindow"
,
"字幕"
))
self
.
tabWidget
.
setTabText
(
self
.
tabWidget
.
indexOf
(
self
.
pb_tab
),
_translate
(
"MainWindow"
,
"旁白"
))
...
...
@@ -399,20 +398,24 @@ class Ui_MainWindow(object):
self
.
menu
.
setTitle
(
_translate
(
"MainWindow"
,
"文件"
))
self
.
menu_2
.
setTitle
(
_translate
(
"MainWindow"
,
"编辑"
))
self
.
menu_3
.
setTitle
(
_translate
(
"MainWindow"
,
"功能按键"
))
self
.
action_create
.
setText
(
_translate
(
"MainWindow"
,
"新建
"
))
self
.
setting
.
setText
(
_translate
(
"MainWindow"
,
"设置
"
))
self
.
action_open_project
.
setText
(
_translate
(
"MainWindow"
,
"打开"
))
self
.
import_movie
.
setText
(
_translate
(
"MainWindow"
,
"视频导入"
))
self
.
actions
.
setText
(
_translate
(
"MainWindow"
,
"内容导出"
))
self
.
action_save
.
setText
(
_translate
(
"MainWindow"
,
"保存并备份"
))
self
.
setting
.
setText
(
_translate
(
"MainWindow"
,
"设置"
))
self
.
action_undo
.
setText
(
_translate
(
"MainWindow"
,
"撤销"
))
self
.
action_redo
.
setText
(
_translate
(
"MainWindow"
,
"重做"
))
self
.
action_insert_aside_from_now
.
setText
(
_translate
(
"MainWindow"
,
"当前位置插入旁白"
))
self
.
action_operate
.
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_refresh_tab
.
setText
(
_translate
(
"MainWindow"
,
"刷新且保存表格"
))
self
.
action_operate
.
setText
(
_translate
(
"MainWindow"
,
"操作表格"
))
self
.
action_export
.
setText
(
_translate
(
"MainWindow"
,
"导出"
))
# self.action_insert_subtitle_from_now.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"
,
"新建"
))
from
myVideoWidget
import
myVideoWidget
from
myvideoslider
import
myVideoSlider
from
mywidgetcontents
import
myWidgetContents
management.py
View file @
a41348f6
...
...
@@ -160,6 +160,8 @@ class ProjectContext:
self
.
project_base_dir
=
project_dir
self
.
load_conf
()
def
load_conf
(
self
):
this_conf_path
=
os
.
path
.
join
(
self
.
project_base_dir
,
'conf.ini'
)
if
self
.
project_base_dir
is
not
None
else
self
.
conf_path
# 如果当前工程里还没有对应的配置文件,那么选择使用全局的配置文件进行初始化,否则就使用当前工程的配置文件
...
...
prompt_dialog.py
View file @
a41348f6
...
...
@@ -20,14 +20,15 @@ class Prompt_Dialog(QDialog, Ui_Dialog):
#开始检测信号,传参分别是movie路径和输出表格路径
show_dialog_signal
=
pyqtSignal
(
str
)
def
__init__
(
self
):
def
__init__
(
self
,
ok_func
=
None
):
super
(
Prompt_Dialog
,
self
)
.
__init__
()
self
.
setupUi
(
self
)
self
.
setWindowTitle
(
"提示框"
)
self
.
buttonBox
.
button
(
QDialogButtonBox
.
StandardButton
.
Ok
)
.
setText
(
"确认"
)
self
.
buttonBox
.
button
(
QDialogButtonBox
.
StandardButton
.
Cancel
)
.
setText
(
"取消"
)
self
.
show_dialog_signal
.
connect
(
self
.
show_with_msg
)
if
ok_func
!=
None
:
self
.
buttonBox
.
button
(
QDialogButtonBox
.
StandardButton
.
Ok
)
.
clicked
.
connect
(
ok_func
)
def
show_with_msg
(
self
,
msg
):
self
.
label
.
setText
(
msg
)
self
.
show
()
\ No newline at end of file
start.py
View file @
a41348f6
...
...
@@ -34,7 +34,11 @@ if __name__ == '__main__':
app
=
QApplication
(
sys
.
argv
)
app
.
setWindowIcon
(
QIcon
(
"./images/eagle_2.ico"
))
mainWindow
=
MainWindow
(
project_path
)
mainWindow
.
setWindowTitle
(
"无障碍电影制作软件"
)
if
project_path
==
None
or
project_path
==
""
:
mainWindow
.
setWindowTitle
(
f
"无障碍电影制作软件(请打开或新建工程)"
)
else
:
project_name
=
os
.
path
.
basename
(
project_path
)
mainWindow
.
setWindowTitle
(
f
"无障碍电影制作软件(当前工程为:{project_name})"
)
mainWindow
.
renew_signal
.
connect
(
change_project_path
)
apply_stylesheet
(
app
,
theme
=
'dark_amber.xml'
)
# app.setStyleSheet(qdarkstyle.load_stylesheet(qt_api=os.environ['PYQTGRAPH_QT_LIB']))
...
...
synthesis.py
View file @
a41348f6
...
...
@@ -51,9 +51,9 @@ class SynthesisProcessor(QWidget):
if
len
(
audio_dir
)
==
0
:
self
.
show_warning_signal
.
emit
(
"请选择音频存放路径"
)
return
elif
not
os
.
path
.
exists
(
audio_dir
):
self
.
show_warning_signal
.
emit
(
"当前音频存放路径有误,请检查一遍"
)
return
#
elif not os.path.exists(audio_dir):
#
self.show_warning_signal.emit("当前音频存放路径有误,请检查一遍")
#
return
if
len
(
caption_path
)
==
0
:
self
.
show_warning_signal
.
emit
(
"请选择字幕文件存放路径"
)
return
...
...
@@ -76,7 +76,7 @@ class SynthesisProcessor(QWidget):
self
.
threads
=
threads
from
speech_synthesis
import
ss_and_export
t
=
RunThread
(
funcName
=
ss_and_export
,
args
=
(
video_path
,
sheet_path
,
audio_dir
+
"output/"
,
speed
,
args
=
(
video_path
,
sheet_path
,
audio_dir
,
speed
,
caption_path
,
speaker_name
,
state
),
name
=
"ssAndExport"
)
t
.
setDaemon
(
True
)
...
...
主main_window.ui
0 → 100644
View file @
a41348f6
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
MainWindow
</class>
<widget
class=
"QMainWindow"
name=
"MainWindow"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
924
</width>
<height>
763
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
MainWindow
</string>
</property>
<property
name=
"styleSheet"
>
<string
notr=
"true"
>
QMainWindow:{
border: 2px groove gray;
border-radius: 25px;
border-style: outset;
background: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5, stop:0 rgba(0, 0, 0, 0), stop:0.52 rgba(0, 0, 0, 0), stop:0.565 rgba(82, 121, 76, 33), stop:0.65 rgba(159, 235, 148, 64), stop:0.721925 rgba(255, 238, 150, 129), stop:0.77 rgba(255, 128, 128, 204), stop:0.89 rgba(191, 128, 255, 64), stop:1 rgba(0, 0, 0, 0));
padding: 5px;
}
</string>
</property>
<widget
class=
"QWidget"
name=
"centralwidget"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
stretch=
"5,1"
>
<item>
<layout
class=
"QHBoxLayout"
name=
"shuiping"
stretch=
"3,5"
>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
stretch=
"8,1,1"
>
<item>
<widget
class=
"myVideoWidget"
name=
"wgt_video"
native=
"true"
>
<property
name=
"minimumSize"
>
<size>
<width>
410
</width>
<height>
200
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
16777215
</width>
<height>
16777215
</height>
</size>
</property>
<property
name=
"palette"
>
<palette>
<active>
<colorrole
role=
"Button"
>
<brush
brushstyle=
"SolidPattern"
>
<color
alpha=
"255"
>
<red>
0
</red>
<green>
0
</green>
<blue>
0
</blue>
</color>
</brush>
</colorrole>
<colorrole
role=
"Base"
>
<brush
brushstyle=
"SolidPattern"
>
<color
alpha=
"255"
>
<red>
0
</red>
<green>
0
</green>
<blue>
0
</blue>
</color>
</brush>
</colorrole>
<colorrole
role=
"Window"
>
<brush
brushstyle=
"SolidPattern"
>
<color
alpha=
"255"
>
<red>
0
</red>
<green>
0
</green>
<blue>
0
</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole
role=
"Button"
>
<brush
brushstyle=
"SolidPattern"
>
<color
alpha=
"255"
>
<red>
0
</red>
<green>
0
</green>
<blue>
0
</blue>
</color>
</brush>
</colorrole>
<colorrole
role=
"Base"
>
<brush
brushstyle=
"SolidPattern"
>
<color
alpha=
"255"
>
<red>
0
</red>
<green>
0
</green>
<blue>
0
</blue>
</color>
</brush>
</colorrole>
<colorrole
role=
"Window"
>
<brush
brushstyle=
"SolidPattern"
>
<color
alpha=
"255"
>
<red>
0
</red>
<green>
0
</green>
<blue>
0
</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole
role=
"Button"
>
<brush
brushstyle=
"SolidPattern"
>
<color
alpha=
"255"
>
<red>
0
</red>
<green>
0
</green>
<blue>
0
</blue>
</color>
</brush>
</colorrole>
<colorrole
role=
"Base"
>
<brush
brushstyle=
"SolidPattern"
>
<color
alpha=
"255"
>
<red>
0
</red>
<green>
0
</green>
<blue>
0
</blue>
</color>
</brush>
</colorrole>
<colorrole
role=
"Window"
>
<brush
brushstyle=
"SolidPattern"
>
<color
alpha=
"255"
>
<red>
0
</red>
<green>
0
</green>
<blue>
0
</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property
name=
"autoFillBackground"
>
<bool>
false
</bool>
</property>
<property
name=
"styleSheet"
>
<string
notr=
"true"
>
background-color: #000
</string>
</property>
</widget>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_5"
stretch=
"2,1,2,1,1,1"
>
<item>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"maximumSize"
>
<size>
<width>
150
</width>
<height>
16777215
</height>
</size>
</property>
<property
name=
"text"
>
<string>
00:00/00:00
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer_2"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
25
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QPushButton"
name=
"btn_play"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Minimum"
vsizetype=
"Minimum"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"minimumSize"
>
<size>
<width>
30
</width>
<height>
30
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
30
</width>
<height>
30
</height>
</size>
</property>
<property
name=
"styleSheet"
>
<string
notr=
"true"
>
QPushButton {
color: #fff;
border: 2px groove gray;
border-radius: 15px;
border-style: outset;
background: qradialgradient(
cx: 0.3, cy: -0.4, fx: 0.3, fy: -0.4,
radius: 1.35, stop: 0 #fff, stop: 1 #888
);
padding: 5px;
}
QPushButton:hover {
background: qradialgradient(
cx: 0.3, cy: -0.4, fx: 0.3, fy: -0.4,
radius: 1.35, stop: 0 #fff, stop: 1 #bbb
);
}
QPushButton:pressed {
border-style: inset;
background: qradialgradient(
cx: 0.4, cy: -0.1, fx: 0.4, fy: -0.1,
radius: 1.35, stop: 0 #fff, stop: 1 #ddd
);
}
</string>
</property>
<property
name=
"text"
>
<string/>
</property>
<property
name=
"icon"
>
<iconset>
<normaloff>
images/播放.svg
</normaloff>
<selectedon>
images/暂停.svg
</selectedon>
images/播放.svg
</iconset>
</property>
<property
name=
"iconSize"
>
<size>
<width>
30
</width>
<height>
30
</height>
</size>
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
30
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QSlider"
name=
"sld_audio"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
24
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
80
</width>
<height>
24
</height>
</size>
</property>
<property
name=
"styleSheet"
>
<string
notr=
"true"
>
QSlider:horizontal {
min-height: 24px;
max-height: 24px;
}
QSlider:vertical {
min-width: 24px;
max-width: 24px;
}
QSlider::groove:horizontal {
height: 4px;
background: #393939;
margin: 0 12px;
}
QSlider::groove:vertical {
width: 4px;
background: #393939;
margin: 12px 0;
border-radius: 24px;
}
QSlider::handle:horizontal {
image: url(images/slider.svg);
width: 12px;
height: 12px;
margin: -24px -12px;
}
QSlider::handle:vertical {
image: url(images/slider.svg);
border-radius: 24px;
width: 12px;
height: 12px;
margin: -12px -24px;
}
QSlider::add-page {
background: #232629;
}
QSlider::sub-page {
background: #ffd740;
}
</string>
</property>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"lab_audio"
>
<property
name=
"text"
>
<string>
音量:100%
</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_6"
stretch=
"5,5,1"
>
<item>
<widget
class=
"QPushButton"
name=
"pickStart"
>
<property
name=
"text"
>
<string>
选择开始时间
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"pickEnd"
>
<property
name=
"text"
>
<string>
选择终止时间
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"pickCancel"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Minimum"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string>
取消
</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<widget
class=
"QTabWidget"
name=
"tabWidget"
>
<property
name=
"enabled"
>
<bool>
true
</bool>
</property>
<property
name=
"contextMenuPolicy"
>
<enum>
Qt::DefaultContextMenu
</enum>
</property>
<property
name=
"styleSheet"
>
<string
notr=
"true"
/>
</property>
<property
name=
"tabPosition"
>
<enum>
QTabWidget::North
</enum>
</property>
<property
name=
"tabShape"
>
<enum>
QTabWidget::Triangular
</enum>
</property>
<property
name=
"currentIndex"
>
<number>
0
</number>
</property>
<property
name=
"iconSize"
>
<size>
<width>
20
</width>
<height>
20
</height>
</size>
</property>
<property
name=
"elideMode"
>
<enum>
Qt::ElideNone
</enum>
</property>
<property
name=
"movable"
>
<bool>
false
</bool>
</property>
<property
name=
"tabBarAutoHide"
>
<bool>
false
</bool>
</property>
<widget
class=
"QWidget"
name=
"all_tab"
>
<property
name=
"enabled"
>
<bool>
true
</bool>
</property>
<attribute
name=
"title"
>
<string>
字幕旁白
</string>
</attribute>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_4"
>
<item>
<widget
class=
"QTableWidget"
name=
"all_tableWidget"
/>
</item>
</layout>
</widget>
<widget
class=
"QWidget"
name=
"zm_tab"
>
<property
name=
"enabled"
>
<bool>
true
</bool>
</property>
<attribute
name=
"title"
>
<string>
字幕
</string>
</attribute>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_2"
>
<item>
<widget
class=
"QTableWidget"
name=
"zm_tableWidget"
/>
</item>
</layout>
</widget>
<widget
class=
"QWidget"
name=
"pb_tab"
>
<attribute
name=
"title"
>
<string>
旁白
</string>
</attribute>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_3"
>
<item>
<widget
class=
"QTableWidget"
name=
"pb_tableWidget"
/>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</item>
<item>
<widget
class=
"QWidget"
name=
"verticalWidget_2"
native=
"true"
>
<layout
class=
"QVBoxLayout"
name=
"chuizhi"
>
<item>
<widget
class=
"QLabel"
name=
"zm_label"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string>
时间轴
</string>
</property>
</widget>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"zm_slider_layout"
stretch=
"15,1"
>
<item>
<widget
class=
"QScrollArea"
name=
"scrollArea"
>
<property
name=
"horizontalScrollBarPolicy"
>
<enum>
Qt::ScrollBarAlwaysOn
</enum>
</property>
<property
name=
"widgetResizable"
>
<bool>
false
</bool>
</property>
<widget
class=
"myWidgetContents"
name=
"scrollAreaWidgetContents"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
827
</width>
<height>
64
</height>
</rect>
</property>
<widget
class=
"myVideoSlider"
name=
"sld_video"
>
<property
name=
"geometry"
>
<rect>
<x>
10
</x>
<y>
30
</y>
<width>
811
</width>
<height>
20
</height>
</rect>
</property>
<property
name=
"minimumSize"
>
<size>
<width>
410
</width>
<height>
0
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
16777215
</width>
<height>
20
</height>
</size>
</property>
<property
name=
"maximum"
>
<number>
100
</number>
</property>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"tickPosition"
>
<enum>
QSlider::TicksAbove
</enum>
</property>
<property
name=
"tickInterval"
>
<number>
1
</number>
</property>
</widget>
</widget>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"lab_video"
>
<property
name=
"maximumSize"
>
<size>
<width>
16777215
</width>
<height>
50
</height>
</size>
</property>
<property
name=
"text"
>
<string>
00:00
</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QLabel"
name=
"pb_label"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string>
刻度
</string>
</property>
</widget>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"kd_slider_layout"
>
<item>
<widget
class=
"QSlider"
name=
"kd_slider"
>
<property
name=
"enabled"
>
<bool>
true
</bool>
</property>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Expanding"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"cursor"
>
<cursorShape>
SizeHorCursor
</cursorShape>
</property>
<property
name=
"mouseTracking"
>
<bool>
false
</bool>
</property>
<property
name=
"focusPolicy"
>
<enum>
Qt::NoFocus
</enum>
</property>
<property
name=
"minimum"
>
<number>
1
</number>
</property>
<property
name=
"maximum"
>
<number>
100
</number>
</property>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"tickPosition"
>
<enum>
QSlider::TicksAbove
</enum>
</property>
<property
name=
"tickInterval"
>
<number>
1
</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget
class=
"QMenuBar"
name=
"menubar"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
924
</width>
<height>
26
</height>
</rect>
</property>
<widget
class=
"QMenu"
name=
"menu"
>
<property
name=
"title"
>
<string>
文件
</string>
</property>
<addaction
name=
"action_create"
/>
<addaction
name=
"action_open_project"
/>
<addaction
name=
"separator"
/>
<addaction
name=
"import_movie"
/>
<addaction
name=
"action_export"
/>
<addaction
name=
"separator"
/>
<addaction
name=
"action_save"
/>
<addaction
name=
"setting"
/>
</widget>
<widget
class=
"QMenu"
name=
"menu_2"
>
<property
name=
"title"
>
<string>
编辑
</string>
</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"
>
<string>
功能按键
</string>
</property>
<addaction
name=
"action_3"
/>
<addaction
name=
"action_4"
/>
<addaction
name=
"separator"
/>
<addaction
name=
"action_refresh_tab"
/>
</widget>
<addaction
name=
"menu"
/>
<addaction
name=
"menu_2"
/>
<addaction
name=
"menu_3"
/>
</widget>
<widget
class=
"QStatusBar"
name=
"statusbar"
/>
<action
name=
"setting"
>
<property
name=
"text"
>
<string>
设置
</string>
</property>
</action>
<action
name=
"action_open_project"
>
<property
name=
"text"
>
<string>
打开
</string>
</property>
</action>
<action
name=
"import_movie"
>
<property
name=
"text"
>
<string>
视频导入
</string>
</property>
</action>
<action
name=
"actions"
>
<property
name=
"text"
>
<string>
内容导出
</string>
</property>
</action>
<action
name=
"action_save"
>
<property
name=
"text"
>
<string>
保存并备份
</string>
</property>
</action>
<action
name=
"action_undo"
>
<property
name=
"text"
>
<string>
撤销
</string>
</property>
</action>
<action
name=
"action_redo"
>
<property
name=
"text"
>
<string>
重做
</string>
</property>
</action>
<action
name=
"action_3"
>
<property
name=
"text"
>
<string>
旁白区间检测
</string>
</property>
</action>
<action
name=
"action_4"
>
<property
name=
"text"
>
<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>
</property>
</action>
<action
name=
"action_operate"
>
<property
name=
"text"
>
<string>
操作表格
</string>
</property>
</action>
<action
name=
"action_export"
>
<property
name=
"text"
>
<string>
导出
</string>
</property>
</action>
<action
name=
"action_insert_aside_from_now"
>
<property
name=
"text"
>
<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>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
<class>
myVideoWidget
</class>
<extends>
QWidget
</extends>
<header>
myVideoWidget.h
</header>
<container>
1
</container>
</customwidget>
<customwidget>
<class>
myVideoSlider
</class>
<extends>
QSlider
</extends>
<header>
myvideoslider.h
</header>
</customwidget>
<customwidget>
<class>
myWidgetContents
</class>
<extends>
QWidget
</extends>
<header>
mywidgetcontents.h
</header>
<container>
1
</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment