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
4ea53be6
Commit
4ea53be6
authored
Sep 30, 2022
by
xuanweiace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:[操作窗口]增加[修改一行]功能。
upd:[保存表格到本地]功能改为异步,并默认成功。 fix:对[时间轴]进行[刻度变换]时,刻度间隔的大小乱跳的bug
parent
b032bd2f
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
168 additions
and
68 deletions
+168
-68
detect_with_ocr.py
detect_with_ocr.py
+1
-1
main_window.py
main_window.py
+9
-4
main_window.ui
main_window.ui
+3
-0
main_window_ui.py
main_window_ui.py
+1
-0
management.py
management.py
+24
-17
operation_dialog.py
operation_dialog.py
+39
-6
operation_dialog.ui
operation_dialog.ui
+57
-20
operation_dialog_ui.py
operation_dialog_ui.py
+34
-20
No files found.
detect_with_ocr.py
View file @
4ea53be6
...
@@ -345,7 +345,7 @@ def detect_with_ocr(video_path: str, book_path: str, start_time: float, end_time
...
@@ -345,7 +345,7 @@ def detect_with_ocr(video_path: str, book_path: str, start_time: float, end_time
global
up_b
,
down_b
global
up_b
,
down_b
# print("get the bounding of the narratage at time: ", datetime.datetime.now())
# print("get the bounding of the narratage at time: ", datetime.datetime.now())
# 此处start_time + 300是为了节省用户调整视频开始时间的功夫(强行跳过前5分钟)
# 此处start_time + 300是为了节省用户调整视频开始时间的功夫(强行跳过前5分钟)
up_b
,
down_b
=
get_position
(
video_path
,
start_time
)
up_b
,
down_b
=
get_position
(
video_path
,
start_time
+
300
)
# 获取并构建输出信息
# 获取并构建输出信息
table_head
=
[[
"起始时间"
,
"终止时间"
,
"字幕"
,
'建议'
,
'解说脚本'
]]
table_head
=
[[
"起始时间"
,
"终止时间"
,
"字幕"
,
'建议'
,
'解说脚本'
]]
...
...
main_window.py
View file @
4ea53be6
...
@@ -313,6 +313,8 @@ class MainWindow(QMainWindow, Ui_MainWindow):
...
@@ -313,6 +313,8 @@ class MainWindow(QMainWindow, Ui_MainWindow):
"""
"""
刻度相关
刻度相关
期望效果:
"""
"""
def
scale_change_slot
(
self
,
position
):
def
scale_change_slot
(
self
,
position
):
...
@@ -330,13 +332,14 @@ class MainWindow(QMainWindow, Ui_MainWindow):
...
@@ -330,13 +332,14 @@ class MainWindow(QMainWindow, Ui_MainWindow):
print
(
"self.sld_video"
,
self
.
sld_video
.
size
())
print
(
"self.sld_video"
,
self
.
sld_video
.
size
())
print
(
"self.scrollAreaWidgetContents"
,
self
.
scrollAreaWidgetContents
.
size
())
print
(
"self.scrollAreaWidgetContents"
,
self
.
scrollAreaWidgetContents
.
size
())
self
.
sld_video
.
resize
(
int
(
now_sld_video_size
+
10
),
self
.
sld_video
.
height
())
self
.
sld_video
.
resize
(
int
(
now_sld_video_size
+
10
),
self
.
sld_video
.
height
())
print
(
"self.sld_video.maximum()"
,
self
.
sld_video
.
maximum
())
self
.
scrollAreaWidgetContents
.
resize
(
int
(
now_sld_video_size
+
20
),
self
.
scrollAreaWidgetContents
.
height
())
self
.
scrollAreaWidgetContents
.
resize
(
int
(
now_sld_video_size
+
20
),
self
.
scrollAreaWidgetContents
.
height
())
print
(
"after===="
)
print
(
"after===="
)
print
(
"self.sld_video"
,
self
.
sld_video
.
size
())
print
(
"self.sld_video"
,
self
.
sld_video
.
size
())
print
(
"self.scrollAreaWidgetContents"
,
self
.
scrollAreaWidgetContents
.
size
())
print
(
"self.scrollAreaWidgetContents"
,
self
.
scrollAreaWidgetContents
.
size
())
print
(
"min_sld_video_size"
,
min_sld_video_size
,
"magnification"
,
magnification
,
"max_sld_video_size"
,
max_sld_video_size
)
#
print("min_sld_video_size", min_sld_video_size, "magnification", magnification, "max_sld_video_size", max_sld_video_size)
print
(
"now_sld_video_size"
,
now_sld_video_size
)
#
print("now_sld_video_size", now_sld_video_size)
print
(
"计算"
,
((
magnification
-
1
)
*
(
max_sld_video_size
-
min_sld_video_size
)
/
99
))
#
print("计算", ((magnification-1) * (max_sld_video_size - min_sld_video_size) / 99))
"""
"""
video相关
video相关
...
@@ -385,6 +388,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
...
@@ -385,6 +388,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
if
self
.
is_video_playing
==
False
:
if
self
.
is_video_playing
==
False
:
return
return
# 1、先找到要播放的音频
# 1、先找到要播放的音频
st
=
time
.
time
()
audio_path
=
None
audio_path
=
None
for
i
in
range
(
len
(
self
.
projectContext
.
aside_list
)
-
1
,
-
1
,
-
1
):
for
i
in
range
(
len
(
self
.
projectContext
.
aside_list
)
-
1
,
-
1
,
-
1
):
if
position
/
1000
>
float
(
self
.
projectContext
.
aside_list
[
i
]
.
st_time_sec
):
if
position
/
1000
>
float
(
self
.
projectContext
.
aside_list
[
i
]
.
st_time_sec
):
...
@@ -395,7 +399,8 @@ class MainWindow(QMainWindow, Ui_MainWindow):
...
@@ -395,7 +399,8 @@ class MainWindow(QMainWindow, Ui_MainWindow):
RunThread
(
funcName
=
self
.
play_audio
,
RunThread
(
funcName
=
self
.
play_audio
,
args
=
(
audio_path
,
self
.
previewed_audio
),
args
=
(
audio_path
,
self
.
previewed_audio
),
name
=
"play_audio"
)
.
start
()
name
=
"play_audio"
)
.
start
()
ed
=
time
.
time
()
print
(
"耗时:
%.2
fs"
%
(
ed
-
st
))
@staticmethod
@staticmethod
#一条语音的最长播放时间是10秒
#一条语音的最长播放时间是10秒
...
...
main_window.ui
View file @
4ea53be6
...
@@ -401,6 +401,9 @@ QPushButton:pressed {
...
@@ -401,6 +401,9 @@ QPushButton:pressed {
<property
name=
"tickPosition"
>
<property
name=
"tickPosition"
>
<enum>
QSlider::TicksAbove
</enum>
<enum>
QSlider::TicksAbove
</enum>
</property>
</property>
<property
name=
"tickInterval"
>
<number>
1
</number>
</property>
</widget>
</widget>
</widget>
</widget>
</widget>
</widget>
...
...
main_window_ui.py
View file @
4ea53be6
...
@@ -217,6 +217,7 @@ class Ui_MainWindow(object):
...
@@ -217,6 +217,7 @@ class Ui_MainWindow(object):
self
.
sld_video
.
setMaximum
(
100
)
self
.
sld_video
.
setMaximum
(
100
)
self
.
sld_video
.
setOrientation
(
QtCore
.
Qt
.
Horizontal
)
self
.
sld_video
.
setOrientation
(
QtCore
.
Qt
.
Horizontal
)
self
.
sld_video
.
setTickPosition
(
QtWidgets
.
QSlider
.
TicksAbove
)
self
.
sld_video
.
setTickPosition
(
QtWidgets
.
QSlider
.
TicksAbove
)
self
.
sld_video
.
setTickInterval
(
1
)
self
.
sld_video
.
setObjectName
(
"sld_video"
)
self
.
sld_video
.
setObjectName
(
"sld_video"
)
self
.
scrollArea
.
setWidget
(
self
.
scrollAreaWidgetContents
)
self
.
scrollArea
.
setWidget
(
self
.
scrollAreaWidgetContents
)
self
.
zm_slider_layout
.
addWidget
(
self
.
scrollArea
)
self
.
zm_slider_layout
.
addWidget
(
self
.
scrollArea
)
...
...
management.py
View file @
4ea53be6
...
@@ -288,24 +288,31 @@ class ProjectContext:
...
@@ -288,24 +288,31 @@ class ProjectContext:
raise
ValueError
raise
ValueError
def
save_excel_to_to_path
(
all_element
,
new_excel_path
,
header
,
excel_sheet_name
):
def
save_excel_to_to_path
(
all_element
,
new_excel_path
,
header
,
excel_sheet_name
):
if
os
.
path
.
exists
(
new_excel_path
):
def
save_excel_thread
(
all_element
,
new_excel_path
,
header
,
excel_sheet_name
):
os
.
remove
(
new_excel_path
)
try
:
create_sheet
(
new_excel_path
,
"旁白插入位置建议"
,
[
header
])
for
element
in
all_element
:
# element.print_self()
write_to_sheet
(
new_excel_path
,
excel_sheet_name
,
element
.
to_list
())
except
:
exception_info
=
''
.
join
(
traceback
.
format_exception
(
*
sys
.
exc_info
()))
print
(
"保存表格到路径[
%
s]失败"
%
(
new_excel_path
))
print
(
exception_info
)
return
exception_info
print
(
"保存表格到路径[
%
s]成功"
%
(
new_excel_path
))
return
None
if
os
.
path
.
exists
(
new_excel_path
):
os
.
remove
(
new_excel_path
)
try
:
create_sheet
(
new_excel_path
,
"旁白插入位置建议"
,
[
header
])
for
element
in
all_element
:
# element.print_self()
write_to_sheet
(
new_excel_path
,
excel_sheet_name
,
element
.
to_list
())
except
:
exception_info
=
''
.
join
(
traceback
.
format_exception
(
*
sys
.
exc_info
()))
print
(
"保存表格到路径[
%
s]失败"
%
(
new_excel_path
))
print
(
exception_info
)
return
exception_info
print
(
"保存表格到路径[
%
s]成功"
%
(
new_excel_path
))
return
None
t
=
RunThread
(
funcName
=
save_excel_thread
,
args
=
(
all_element
,
new_excel_path
,
header
,
excel_sheet_name
),
name
=
"save_excel"
)
t
.
setDaemon
(
True
)
t
.
start
()
def
write_to_sheet
(
path
:
str
,
sheet_name
:
str
,
value
:
list
):
def
write_to_sheet
(
path
:
str
,
sheet_name
:
str
,
value
:
list
):
"""向已存在的表格中写入一行数据
"""向已存在的表格中写入一行数据
...
...
operation_dialog.py
View file @
4ea53be6
...
@@ -21,6 +21,9 @@ class Operation_Dialog(QDialog, Ui_Dialog):
...
@@ -21,6 +21,9 @@ class Operation_Dialog(QDialog, Ui_Dialog):
self
.
pushButton
.
clicked
.
connect
(
self
.
check_validate_slot
)
self
.
pushButton
.
clicked
.
connect
(
self
.
check_validate_slot
)
self
.
pushButton_2
.
clicked
.
connect
(
self
.
remake_slot
)
self
.
pushButton_2
.
clicked
.
connect
(
self
.
remake_slot
)
#如果是【修改一行】,选择行的时候要瞬间更新成目前行的内容
self
.
pushButton_3
.
clicked
.
connect
(
self
.
row_num_change_slot
)
self
.
buttonBox
.
setEnabled
(
False
)
self
.
buttonBox
.
setEnabled
(
False
)
self
.
buttonBox
.
button
(
QDialogButtonBox
.
StandardButton
.
Ok
)
.
clicked
.
connect
(
self
.
start_operation_slot
)
self
.
buttonBox
.
button
(
QDialogButtonBox
.
StandardButton
.
Ok
)
.
clicked
.
connect
(
self
.
start_operation_slot
)
# 字幕/旁白 选择框
# 字幕/旁白 选择框
...
@@ -48,7 +51,7 @@ class Operation_Dialog(QDialog, Ui_Dialog):
...
@@ -48,7 +51,7 @@ class Operation_Dialog(QDialog, Ui_Dialog):
# 如果是删除,则只需要【行数】即可
# 如果是删除,则只需要【行数】即可
def
adddel_change_slot
(
self
):
def
adddel_change_slot
(
self
):
if
self
.
comboBox_2
.
currentText
()
==
"增加一行"
:
if
self
.
comboBox_2
.
currentText
()
in
[
"增加一行"
,
"修改一行"
]
:
self
.
zmpb_change_slot
()
self
.
zmpb_change_slot
()
else
:
else
:
for
i
in
range
(
1
,
len
(
self
.
lineEdits
)):
for
i
in
range
(
1
,
len
(
self
.
lineEdits
)):
...
@@ -63,11 +66,11 @@ class Operation_Dialog(QDialog, Ui_Dialog):
...
@@ -63,11 +66,11 @@ class Operation_Dialog(QDialog, Ui_Dialog):
# 校验行数
# 校验行数
rowCount
=
self
.
mainWindow
.
all_tableWidget
.
rowCount
()
rowCount
=
self
.
mainWindow
.
all_tableWidget
.
rowCount
()
try
:
try
:
cnt
=
int
(
self
.
lineEdit
.
text
())
row_number
=
int
(
self
.
lineEdit
.
text
())
assert
cnt
<=
rowCount
assert
1
<=
row_number
<=
rowCount
except
Exception
as
e
:
except
Exception
as
e
:
self
.
mainWindow
.
prompt_dialog
.
show_with_msg
(
"校验失败!总行数为[
%
d],你的输入为[
%
s]!!"
%
(
rowCount
,
self
.
lineEdit
.
text
()))
self
.
mainWindow
.
prompt_dialog
.
show_with_msg
(
"校验失败!总行数为[
%
d],你的输入为[
%
s]!!"
%
(
rowCount
,
self
.
lineEdit
.
text
()))
return
return
False
# 这些是只有【add】才需要检测的
# 这些是只有【add】才需要检测的
if
self
.
comboBox_2
.
currentText
()
==
"增加一行"
:
if
self
.
comboBox_2
.
currentText
()
==
"增加一行"
:
...
@@ -80,7 +83,7 @@ class Operation_Dialog(QDialog, Ui_Dialog):
...
@@ -80,7 +83,7 @@ class Operation_Dialog(QDialog, Ui_Dialog):
assert
start_time_f
<
end_time_f
assert
start_time_f
<
end_time_f
except
Exception
as
e
:
except
Exception
as
e
:
self
.
mainWindow
.
prompt_dialog
.
show_with_msg
(
"校验失败!起始时间或结束时间输入有误!!"
)
self
.
mainWindow
.
prompt_dialog
.
show_with_msg
(
"校验失败!起始时间或结束时间输入有误!!"
)
return
return
False
# 校验推荐字数
# 校验推荐字数
if
self
.
comboBox
.
currentText
()
==
"旁白"
:
if
self
.
comboBox
.
currentText
()
==
"旁白"
:
...
@@ -89,7 +92,19 @@ class Operation_Dialog(QDialog, Ui_Dialog):
...
@@ -89,7 +92,19 @@ class Operation_Dialog(QDialog, Ui_Dialog):
assert
suggest_words_count
<=
100
assert
suggest_words_count
<=
100
except
Exception
as
e
:
except
Exception
as
e
:
self
.
mainWindow
.
prompt_dialog
.
show_with_msg
(
"校验失败!推荐字数填入有误!!"
)
self
.
mainWindow
.
prompt_dialog
.
show_with_msg
(
"校验失败!推荐字数填入有误!!"
)
return
return
False
# 这些是只有【modify】才需要检测的
if
self
.
comboBox_2
.
currentText
()
==
"修改一行"
:
try
:
suggest
=
self
.
mainWindow
.
projectContext
.
all_elements
[
row_number
]
.
suggest
# 如果当前行是旁白
if
suggest
is
not
None
and
"插入旁白"
in
suggest
:
assert
self
.
comboBox
.
currentText
()
==
"旁白"
else
:
assert
self
.
comboBox
.
currentText
()
==
"字幕"
except
Exception
as
e
:
self
.
mainWindow
.
prompt_dialog
.
show_with_msg
(
"校验失败!待修改的行不是[
%
s]"
,
self
.
comboBox
.
currentText
())
return
False
# 检测通过
# 检测通过
self
.
mainWindow
.
prompt_dialog
.
show_with_msg
(
"校验成功!!"
)
self
.
mainWindow
.
prompt_dialog
.
show_with_msg
(
"校验成功!!"
)
...
@@ -126,6 +141,24 @@ class Operation_Dialog(QDialog, Ui_Dialog):
...
@@ -126,6 +141,24 @@ class Operation_Dialog(QDialog, Ui_Dialog):
else
:
else
:
self
.
start_del_signal
.
emit
(
row
,
start_time
,
end_time
,
subtitle
,
suggest
,
aside
)
self
.
start_del_signal
.
emit
(
row
,
start_time
,
end_time
,
subtitle
,
suggest
,
aside
)
def
row_num_change_slot
(
self
):
text
=
self
.
lineEdit
.
text
()
print
(
"row_num_change_slot, text:"
,
text
)
if
text
is
not
None
:
try
:
rowCount
=
self
.
mainWindow
.
all_tableWidget
.
rowCount
()
row_number
=
int
(
self
.
lineEdit
.
text
())
assert
1
<=
row_number
<=
rowCount
elem
=
self
.
mainWindow
.
projectContext
.
all_elements
[
int
(
row_number
)
-
1
]
self
.
lineEdit_2
.
setText
(
elem
.
st_time_sec
)
self
.
lineEdit_3
.
setText
(
elem
.
ed_time_sec
)
self
.
lineEdit_4
.
setText
(
elem
.
subtitle
)
self
.
lineEdit_5
.
setText
(
elem
.
suggests
[
elem
.
suggests
.
index
(
"推荐字数为"
)
+
5
:])
self
.
lineEdit_6
.
setText
(
elem
.
aside
)
except
Exception
as
e
:
print
(
"exception:"
,
e
)
pass
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
app
=
QApplication
(
sys
.
argv
)
app
=
QApplication
(
sys
.
argv
)
app
.
setWindowIcon
(
QIcon
(
"./images/eagle_2.ico"
))
app
.
setWindowIcon
(
QIcon
(
"./images/eagle_2.ico"
))
...
...
operation_dialog.ui
View file @
4ea53be6
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
<rect>
<rect>
<x>
0
</x>
<x>
0
</x>
<y>
0
</y>
<y>
0
</y>
<width>
6
35
</width>
<width>
6
80
</width>
<height>
395
</height>
<height>
427
</height>
</rect>
</rect>
</property>
</property>
<property
name=
"windowTitle"
>
<property
name=
"windowTitle"
>
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<property
name=
"geometry"
>
<property
name=
"geometry"
>
<rect>
<rect>
<x>
470
</x>
<x>
470
</x>
<y>
3
4
0
</y>
<y>
3
5
0
</y>
<width>
101
</width>
<width>
101
</width>
<height>
32
</height>
<height>
32
</height>
</rect>
</rect>
...
@@ -81,7 +81,7 @@
...
@@ -81,7 +81,7 @@
<property
name=
"geometry"
>
<property
name=
"geometry"
>
<rect>
<rect>
<x>
140
</x>
<x>
140
</x>
<y>
1
2
0
</y>
<y>
1
3
0
</y>
<width>
101
</width>
<width>
101
</width>
<height>
21
</height>
<height>
21
</height>
</rect>
</rect>
...
@@ -91,7 +91,7 @@
...
@@ -91,7 +91,7 @@
<property
name=
"geometry"
>
<property
name=
"geometry"
>
<rect>
<rect>
<x>
60
</x>
<x>
60
</x>
<y>
1
2
0
</y>
<y>
1
3
0
</y>
<width>
71
</width>
<width>
71
</width>
<height>
16
</height>
<height>
16
</height>
</rect>
</rect>
...
@@ -104,7 +104,7 @@
...
@@ -104,7 +104,7 @@
<property
name=
"geometry"
>
<property
name=
"geometry"
>
<rect>
<rect>
<x>
60
</x>
<x>
60
</x>
<y>
1
7
0
</y>
<y>
1
8
0
</y>
<width>
71
</width>
<width>
71
</width>
<height>
16
</height>
<height>
16
</height>
</rect>
</rect>
...
@@ -120,7 +120,7 @@
...
@@ -120,7 +120,7 @@
<property
name=
"geometry"
>
<property
name=
"geometry"
>
<rect>
<rect>
<x>
140
</x>
<x>
140
</x>
<y>
1
7
0
</y>
<y>
1
8
0
</y>
<width>
101
</width>
<width>
101
</width>
<height>
21
</height>
<height>
21
</height>
</rect>
</rect>
...
@@ -133,7 +133,7 @@
...
@@ -133,7 +133,7 @@
<property
name=
"geometry"
>
<property
name=
"geometry"
>
<rect>
<rect>
<x>
140
</x>
<x>
140
</x>
<y>
2
2
0
</y>
<y>
2
3
0
</y>
<width>
231
</width>
<width>
231
</width>
<height>
21
</height>
<height>
21
</height>
</rect>
</rect>
...
@@ -179,6 +179,11 @@
...
@@ -179,6 +179,11 @@
<string>
增加一行
</string>
<string>
增加一行
</string>
</property>
</property>
</item>
</item>
<item>
<property
name=
"text"
>
<string>
修改一行
</string>
</property>
</item>
<item>
<item>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
删除一行
</string>
<string>
删除一行
</string>
...
@@ -192,7 +197,7 @@
...
@@ -192,7 +197,7 @@
<property
name=
"geometry"
>
<property
name=
"geometry"
>
<rect>
<rect>
<x>
140
</x>
<x>
140
</x>
<y>
2
6
0
</y>
<y>
2
7
0
</y>
<width>
101
</width>
<width>
101
</width>
<height>
21
</height>
<height>
21
</height>
</rect>
</rect>
...
@@ -205,7 +210,7 @@
...
@@ -205,7 +210,7 @@
<property
name=
"geometry"
>
<property
name=
"geometry"
>
<rect>
<rect>
<x>
140
</x>
<x>
140
</x>
<y>
3
0
0
</y>
<y>
3
1
0
</y>
<width>
231
</width>
<width>
231
</width>
<height>
21
</height>
<height>
21
</height>
</rect>
</rect>
...
@@ -215,7 +220,7 @@
...
@@ -215,7 +220,7 @@
<property
name=
"geometry"
>
<property
name=
"geometry"
>
<rect>
<rect>
<x>
60
</x>
<x>
60
</x>
<y>
2
2
0
</y>
<y>
2
3
0
</y>
<width>
71
</width>
<width>
71
</width>
<height>
16
</height>
<height>
16
</height>
</rect>
</rect>
...
@@ -228,7 +233,7 @@
...
@@ -228,7 +233,7 @@
<property
name=
"geometry"
>
<property
name=
"geometry"
>
<rect>
<rect>
<x>
60
</x>
<x>
60
</x>
<y>
2
6
0
</y>
<y>
2
7
0
</y>
<width>
71
</width>
<width>
71
</width>
<height>
16
</height>
<height>
16
</height>
</rect>
</rect>
...
@@ -241,7 +246,7 @@
...
@@ -241,7 +246,7 @@
<property
name=
"geometry"
>
<property
name=
"geometry"
>
<rect>
<rect>
<x>
60
</x>
<x>
60
</x>
<y>
3
0
0
</y>
<y>
3
1
0
</y>
<width>
71
</width>
<width>
71
</width>
<height>
16
</height>
<height>
16
</height>
</rect>
</rect>
...
@@ -254,7 +259,7 @@
...
@@ -254,7 +259,7 @@
<property
name=
"geometry"
>
<property
name=
"geometry"
>
<rect>
<rect>
<x>
250
</x>
<x>
250
</x>
<y>
1
2
0
</y>
<y>
1
3
0
</y>
<width>
251
</width>
<width>
251
</width>
<height>
20
</height>
<height>
20
</height>
</rect>
</rect>
...
@@ -267,7 +272,7 @@
...
@@ -267,7 +272,7 @@
<property
name=
"geometry"
>
<property
name=
"geometry"
>
<rect>
<rect>
<x>
250
</x>
<x>
250
</x>
<y>
1
7
0
</y>
<y>
1
8
0
</y>
<width>
251
</width>
<width>
251
</width>
<height>
20
</height>
<height>
20
</height>
</rect>
</rect>
...
@@ -280,7 +285,7 @@
...
@@ -280,7 +285,7 @@
<property
name=
"geometry"
>
<property
name=
"geometry"
>
<rect>
<rect>
<x>
380
</x>
<x>
380
</x>
<y>
2
2
0
</y>
<y>
2
3
0
</y>
<width>
81
</width>
<width>
81
</width>
<height>
20
</height>
<height>
20
</height>
</rect>
</rect>
...
@@ -293,7 +298,7 @@
...
@@ -293,7 +298,7 @@
<property
name=
"geometry"
>
<property
name=
"geometry"
>
<rect>
<rect>
<x>
380
</x>
<x>
380
</x>
<y>
3
0
0
</y>
<y>
3
1
0
</y>
<width>
81
</width>
<width>
81
</width>
<height>
20
</height>
<height>
20
</height>
</rect>
</rect>
...
@@ -306,7 +311,7 @@
...
@@ -306,7 +311,7 @@
<property
name=
"geometry"
>
<property
name=
"geometry"
>
<rect>
<rect>
<x>
250
</x>
<x>
250
</x>
<y>
2
6
0
</y>
<y>
2
7
0
</y>
<width>
251
</width>
<width>
251
</width>
<height>
20
</height>
<height>
20
</height>
</rect>
</rect>
...
@@ -319,7 +324,7 @@
...
@@ -319,7 +324,7 @@
<property
name=
"geometry"
>
<property
name=
"geometry"
>
<rect>
<rect>
<x>
350
</x>
<x>
350
</x>
<y>
3
4
0
</y>
<y>
3
5
0
</y>
<width>
93
</width>
<width>
93
</width>
<height>
28
</height>
<height>
28
</height>
</rect>
</rect>
...
@@ -332,7 +337,7 @@
...
@@ -332,7 +337,7 @@
<property
name=
"geometry"
>
<property
name=
"geometry"
>
<rect>
<rect>
<x>
230
</x>
<x>
230
</x>
<y>
3
4
0
</y>
<y>
3
5
0
</y>
<width>
93
</width>
<width>
93
</width>
<height>
28
</height>
<height>
28
</height>
</rect>
</rect>
...
@@ -341,6 +346,38 @@
...
@@ -341,6 +346,38 @@
<string>
修改
</string>
<string>
修改
</string>
</property>
</property>
</widget>
</widget>
<widget
class=
"QLabel"
name=
"label_13"
>
<property
name=
"geometry"
>
<rect>
<x>
250
</x>
<y>
90
</y>
<width>
311
</width>
<height>
21
</height>
</rect>
</property>
<property
name=
"font"
>
<font>
<pointsize>
8
</pointsize>
</font>
</property>
<property
name=
"text"
>
<string>
*需要填在【字幕旁白】页面中的行数
</string>
</property>
</widget>
<widget
class=
"QPushButton"
name=
"pushButton_3"
>
<property
name=
"geometry"
>
<rect>
<x>
540
</x>
<y>
60
</y>
<width>
71
</width>
<height>
61
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
刷新
行信息
</string>
</property>
</widget>
</widget>
</widget>
<resources/>
<resources/>
<connections>
<connections>
...
...
operation_dialog_ui.py
View file @
4ea53be6
...
@@ -12,10 +12,10 @@ from PyQt5 import QtCore, QtGui, QtWidgets
...
@@ -12,10 +12,10 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class
Ui_Dialog
(
object
):
class
Ui_Dialog
(
object
):
def
setupUi
(
self
,
Dialog
):
def
setupUi
(
self
,
Dialog
):
Dialog
.
setObjectName
(
"Dialog"
)
Dialog
.
setObjectName
(
"Dialog"
)
Dialog
.
resize
(
6
35
,
395
)
Dialog
.
resize
(
6
80
,
427
)
self
.
buttonBox
=
QtWidgets
.
QDialogButtonBox
(
Dialog
)
self
.
buttonBox
=
QtWidgets
.
QDialogButtonBox
(
Dialog
)
self
.
buttonBox
.
setEnabled
(
False
)
self
.
buttonBox
.
setEnabled
(
False
)
self
.
buttonBox
.
setGeometry
(
QtCore
.
QRect
(
470
,
3
4
0
,
101
,
32
))
self
.
buttonBox
.
setGeometry
(
QtCore
.
QRect
(
470
,
3
5
0
,
101
,
32
))
self
.
buttonBox
.
setToolTip
(
""
)
self
.
buttonBox
.
setToolTip
(
""
)
self
.
buttonBox
.
setToolTipDuration
(
-
1
)
self
.
buttonBox
.
setToolTipDuration
(
-
1
)
self
.
buttonBox
.
setOrientation
(
QtCore
.
Qt
.
Horizontal
)
self
.
buttonBox
.
setOrientation
(
QtCore
.
Qt
.
Horizontal
)
...
@@ -32,21 +32,21 @@ class Ui_Dialog(object):
...
@@ -32,21 +32,21 @@ class Ui_Dialog(object):
self
.
label_2
.
setGeometry
(
QtCore
.
QRect
(
250
,
70
,
311
,
21
))
self
.
label_2
.
setGeometry
(
QtCore
.
QRect
(
250
,
70
,
311
,
21
))
self
.
label_2
.
setObjectName
(
"label_2"
)
self
.
label_2
.
setObjectName
(
"label_2"
)
self
.
lineEdit_2
=
QtWidgets
.
QLineEdit
(
Dialog
)
self
.
lineEdit_2
=
QtWidgets
.
QLineEdit
(
Dialog
)
self
.
lineEdit_2
.
setGeometry
(
QtCore
.
QRect
(
140
,
1
2
0
,
101
,
21
))
self
.
lineEdit_2
.
setGeometry
(
QtCore
.
QRect
(
140
,
1
3
0
,
101
,
21
))
self
.
lineEdit_2
.
setObjectName
(
"lineEdit_2"
)
self
.
lineEdit_2
.
setObjectName
(
"lineEdit_2"
)
self
.
label_3
=
QtWidgets
.
QLabel
(
Dialog
)
self
.
label_3
=
QtWidgets
.
QLabel
(
Dialog
)
self
.
label_3
.
setGeometry
(
QtCore
.
QRect
(
60
,
1
2
0
,
71
,
16
))
self
.
label_3
.
setGeometry
(
QtCore
.
QRect
(
60
,
1
3
0
,
71
,
16
))
self
.
label_3
.
setObjectName
(
"label_3"
)
self
.
label_3
.
setObjectName
(
"label_3"
)
self
.
label_4
=
QtWidgets
.
QLabel
(
Dialog
)
self
.
label_4
=
QtWidgets
.
QLabel
(
Dialog
)
self
.
label_4
.
setGeometry
(
QtCore
.
QRect
(
60
,
1
7
0
,
71
,
16
))
self
.
label_4
.
setGeometry
(
QtCore
.
QRect
(
60
,
1
8
0
,
71
,
16
))
self
.
label_4
.
setObjectName
(
"label_4"
)
self
.
label_4
.
setObjectName
(
"label_4"
)
self
.
lineEdit_3
=
QtWidgets
.
QLineEdit
(
Dialog
)
self
.
lineEdit_3
=
QtWidgets
.
QLineEdit
(
Dialog
)
self
.
lineEdit_3
.
setEnabled
(
True
)
self
.
lineEdit_3
.
setEnabled
(
True
)
self
.
lineEdit_3
.
setGeometry
(
QtCore
.
QRect
(
140
,
1
7
0
,
101
,
21
))
self
.
lineEdit_3
.
setGeometry
(
QtCore
.
QRect
(
140
,
1
8
0
,
101
,
21
))
self
.
lineEdit_3
.
setObjectName
(
"lineEdit_3"
)
self
.
lineEdit_3
.
setObjectName
(
"lineEdit_3"
)
self
.
lineEdit_4
=
QtWidgets
.
QLineEdit
(
Dialog
)
self
.
lineEdit_4
=
QtWidgets
.
QLineEdit
(
Dialog
)
self
.
lineEdit_4
.
setEnabled
(
True
)
self
.
lineEdit_4
.
setEnabled
(
True
)
self
.
lineEdit_4
.
setGeometry
(
QtCore
.
QRect
(
140
,
2
2
0
,
231
,
21
))
self
.
lineEdit_4
.
setGeometry
(
QtCore
.
QRect
(
140
,
2
3
0
,
231
,
21
))
self
.
lineEdit_4
.
setObjectName
(
"lineEdit_4"
)
self
.
lineEdit_4
.
setObjectName
(
"lineEdit_4"
)
self
.
comboBox
=
QtWidgets
.
QComboBox
(
Dialog
)
self
.
comboBox
=
QtWidgets
.
QComboBox
(
Dialog
)
self
.
comboBox
.
setEnabled
(
True
)
self
.
comboBox
.
setEnabled
(
True
)
...
@@ -60,44 +60,54 @@ class Ui_Dialog(object):
...
@@ -60,44 +60,54 @@ class Ui_Dialog(object):
self
.
comboBox_2
.
setObjectName
(
"comboBox_2"
)
self
.
comboBox_2
.
setObjectName
(
"comboBox_2"
)
self
.
comboBox_2
.
addItem
(
""
)
self
.
comboBox_2
.
addItem
(
""
)
self
.
comboBox_2
.
addItem
(
""
)
self
.
comboBox_2
.
addItem
(
""
)
self
.
comboBox_2
.
addItem
(
""
)
self
.
lineEdit_5
=
QtWidgets
.
QLineEdit
(
Dialog
)
self
.
lineEdit_5
=
QtWidgets
.
QLineEdit
(
Dialog
)
self
.
lineEdit_5
.
setEnabled
(
True
)
self
.
lineEdit_5
.
setEnabled
(
True
)
self
.
lineEdit_5
.
setGeometry
(
QtCore
.
QRect
(
140
,
2
6
0
,
101
,
21
))
self
.
lineEdit_5
.
setGeometry
(
QtCore
.
QRect
(
140
,
2
7
0
,
101
,
21
))
self
.
lineEdit_5
.
setObjectName
(
"lineEdit_5"
)
self
.
lineEdit_5
.
setObjectName
(
"lineEdit_5"
)
self
.
lineEdit_6
=
QtWidgets
.
QLineEdit
(
Dialog
)
self
.
lineEdit_6
=
QtWidgets
.
QLineEdit
(
Dialog
)
self
.
lineEdit_6
.
setEnabled
(
True
)
self
.
lineEdit_6
.
setEnabled
(
True
)
self
.
lineEdit_6
.
setGeometry
(
QtCore
.
QRect
(
140
,
3
0
0
,
231
,
21
))
self
.
lineEdit_6
.
setGeometry
(
QtCore
.
QRect
(
140
,
3
1
0
,
231
,
21
))
self
.
lineEdit_6
.
setObjectName
(
"lineEdit_6"
)
self
.
lineEdit_6
.
setObjectName
(
"lineEdit_6"
)
self
.
label_5
=
QtWidgets
.
QLabel
(
Dialog
)
self
.
label_5
=
QtWidgets
.
QLabel
(
Dialog
)
self
.
label_5
.
setGeometry
(
QtCore
.
QRect
(
60
,
2
2
0
,
71
,
16
))
self
.
label_5
.
setGeometry
(
QtCore
.
QRect
(
60
,
2
3
0
,
71
,
16
))
self
.
label_5
.
setObjectName
(
"label_5"
)
self
.
label_5
.
setObjectName
(
"label_5"
)
self
.
label_6
=
QtWidgets
.
QLabel
(
Dialog
)
self
.
label_6
=
QtWidgets
.
QLabel
(
Dialog
)
self
.
label_6
.
setGeometry
(
QtCore
.
QRect
(
60
,
2
6
0
,
71
,
16
))
self
.
label_6
.
setGeometry
(
QtCore
.
QRect
(
60
,
2
7
0
,
71
,
16
))
self
.
label_6
.
setObjectName
(
"label_6"
)
self
.
label_6
.
setObjectName
(
"label_6"
)
self
.
label_7
=
QtWidgets
.
QLabel
(
Dialog
)
self
.
label_7
=
QtWidgets
.
QLabel
(
Dialog
)
self
.
label_7
.
setGeometry
(
QtCore
.
QRect
(
60
,
3
0
0
,
71
,
16
))
self
.
label_7
.
setGeometry
(
QtCore
.
QRect
(
60
,
3
1
0
,
71
,
16
))
self
.
label_7
.
setObjectName
(
"label_7"
)
self
.
label_7
.
setObjectName
(
"label_7"
)
self
.
label_8
=
QtWidgets
.
QLabel
(
Dialog
)
self
.
label_8
=
QtWidgets
.
QLabel
(
Dialog
)
self
.
label_8
.
setGeometry
(
QtCore
.
QRect
(
250
,
1
2
0
,
251
,
20
))
self
.
label_8
.
setGeometry
(
QtCore
.
QRect
(
250
,
1
3
0
,
251
,
20
))
self
.
label_8
.
setObjectName
(
"label_8"
)
self
.
label_8
.
setObjectName
(
"label_8"
)
self
.
label_9
=
QtWidgets
.
QLabel
(
Dialog
)
self
.
label_9
=
QtWidgets
.
QLabel
(
Dialog
)
self
.
label_9
.
setGeometry
(
QtCore
.
QRect
(
250
,
1
7
0
,
251
,
20
))
self
.
label_9
.
setGeometry
(
QtCore
.
QRect
(
250
,
1
8
0
,
251
,
20
))
self
.
label_9
.
setObjectName
(
"label_9"
)
self
.
label_9
.
setObjectName
(
"label_9"
)
self
.
label_10
=
QtWidgets
.
QLabel
(
Dialog
)
self
.
label_10
=
QtWidgets
.
QLabel
(
Dialog
)
self
.
label_10
.
setGeometry
(
QtCore
.
QRect
(
380
,
2
2
0
,
81
,
20
))
self
.
label_10
.
setGeometry
(
QtCore
.
QRect
(
380
,
2
3
0
,
81
,
20
))
self
.
label_10
.
setObjectName
(
"label_10"
)
self
.
label_10
.
setObjectName
(
"label_10"
)
self
.
label_11
=
QtWidgets
.
QLabel
(
Dialog
)
self
.
label_11
=
QtWidgets
.
QLabel
(
Dialog
)
self
.
label_11
.
setGeometry
(
QtCore
.
QRect
(
380
,
3
0
0
,
81
,
20
))
self
.
label_11
.
setGeometry
(
QtCore
.
QRect
(
380
,
3
1
0
,
81
,
20
))
self
.
label_11
.
setObjectName
(
"label_11"
)
self
.
label_11
.
setObjectName
(
"label_11"
)
self
.
label_12
=
QtWidgets
.
QLabel
(
Dialog
)
self
.
label_12
=
QtWidgets
.
QLabel
(
Dialog
)
self
.
label_12
.
setGeometry
(
QtCore
.
QRect
(
250
,
2
6
0
,
251
,
20
))
self
.
label_12
.
setGeometry
(
QtCore
.
QRect
(
250
,
2
7
0
,
251
,
20
))
self
.
label_12
.
setObjectName
(
"label_12"
)
self
.
label_12
.
setObjectName
(
"label_12"
)
self
.
pushButton
=
QtWidgets
.
QPushButton
(
Dialog
)
self
.
pushButton
=
QtWidgets
.
QPushButton
(
Dialog
)
self
.
pushButton
.
setGeometry
(
QtCore
.
QRect
(
350
,
3
4
0
,
93
,
28
))
self
.
pushButton
.
setGeometry
(
QtCore
.
QRect
(
350
,
3
5
0
,
93
,
28
))
self
.
pushButton
.
setObjectName
(
"pushButton"
)
self
.
pushButton
.
setObjectName
(
"pushButton"
)
self
.
pushButton_2
=
QtWidgets
.
QPushButton
(
Dialog
)
self
.
pushButton_2
=
QtWidgets
.
QPushButton
(
Dialog
)
self
.
pushButton_2
.
setGeometry
(
QtCore
.
QRect
(
230
,
3
4
0
,
93
,
28
))
self
.
pushButton_2
.
setGeometry
(
QtCore
.
QRect
(
230
,
3
5
0
,
93
,
28
))
self
.
pushButton_2
.
setObjectName
(
"pushButton_2"
)
self
.
pushButton_2
.
setObjectName
(
"pushButton_2"
)
self
.
label_13
=
QtWidgets
.
QLabel
(
Dialog
)
self
.
label_13
.
setGeometry
(
QtCore
.
QRect
(
250
,
90
,
311
,
21
))
font
=
QtGui
.
QFont
()
font
.
setPointSize
(
8
)
self
.
label_13
.
setFont
(
font
)
self
.
label_13
.
setObjectName
(
"label_13"
)
self
.
pushButton_3
=
QtWidgets
.
QPushButton
(
Dialog
)
self
.
pushButton_3
.
setGeometry
(
QtCore
.
QRect
(
540
,
60
,
71
,
61
))
self
.
pushButton_3
.
setObjectName
(
"pushButton_3"
)
self
.
retranslateUi
(
Dialog
)
self
.
retranslateUi
(
Dialog
)
self
.
buttonBox
.
rejected
.
connect
(
Dialog
.
reject
)
self
.
buttonBox
.
rejected
.
connect
(
Dialog
.
reject
)
...
@@ -114,7 +124,8 @@ class Ui_Dialog(object):
...
@@ -114,7 +124,8 @@ class Ui_Dialog(object):
self
.
comboBox
.
setItemText
(
0
,
_translate
(
"Dialog"
,
"字幕"
))
self
.
comboBox
.
setItemText
(
0
,
_translate
(
"Dialog"
,
"字幕"
))
self
.
comboBox
.
setItemText
(
1
,
_translate
(
"Dialog"
,
"旁白"
))
self
.
comboBox
.
setItemText
(
1
,
_translate
(
"Dialog"
,
"旁白"
))
self
.
comboBox_2
.
setItemText
(
0
,
_translate
(
"Dialog"
,
"增加一行"
))
self
.
comboBox_2
.
setItemText
(
0
,
_translate
(
"Dialog"
,
"增加一行"
))
self
.
comboBox_2
.
setItemText
(
1
,
_translate
(
"Dialog"
,
"删除一行"
))
self
.
comboBox_2
.
setItemText
(
1
,
_translate
(
"Dialog"
,
"修改一行"
))
self
.
comboBox_2
.
setItemText
(
2
,
_translate
(
"Dialog"
,
"删除一行"
))
self
.
label_5
.
setText
(
_translate
(
"Dialog"
,
"字幕:"
))
self
.
label_5
.
setText
(
_translate
(
"Dialog"
,
"字幕:"
))
self
.
label_6
.
setText
(
_translate
(
"Dialog"
,
"推荐字数:"
))
self
.
label_6
.
setText
(
_translate
(
"Dialog"
,
"推荐字数:"
))
self
.
label_7
.
setText
(
_translate
(
"Dialog"
,
"旁白:"
))
self
.
label_7
.
setText
(
_translate
(
"Dialog"
,
"旁白:"
))
...
@@ -125,5 +136,8 @@ class Ui_Dialog(object):
...
@@ -125,5 +136,8 @@ class Ui_Dialog(object):
self
.
label_12
.
setText
(
_translate
(
"Dialog"
,
"*请填数字,必须是不超过100的正整数"
))
self
.
label_12
.
setText
(
_translate
(
"Dialog"
,
"*请填数字,必须是不超过100的正整数"
))
self
.
pushButton
.
setText
(
_translate
(
"Dialog"
,
"检测"
))
self
.
pushButton
.
setText
(
_translate
(
"Dialog"
,
"检测"
))
self
.
pushButton_2
.
setText
(
_translate
(
"Dialog"
,
"修改"
))
self
.
pushButton_2
.
setText
(
_translate
(
"Dialog"
,
"修改"
))
self
.
label_13
.
setText
(
_translate
(
"Dialog"
,
"*需要填在【字幕旁白】页面中的行数"
))
self
.
pushButton_3
.
setText
(
_translate
(
"Dialog"
,
"刷新
\n
"
"行信息"
))
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