Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
TV_OCR
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TVOCR
TV_OCR
Commits
ce9caabf
Commit
ce9caabf
authored
Apr 19, 2022
by
mucece
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v1.0.1版本,修改页面名称,电视测试查看图片等功能,修改结束按钮的流程做到可以保存,修改音箱录音可以支持保存单条录音。
parent
52d94ff6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
14 deletions
+15
-14
TV_OCR/initial.py
+15
-14
TV_OCR/sqlite3/instruction.db
+0
-0
No files found.
TV_OCR/initial.py
View file @
ce9caabf
...
@@ -221,22 +221,26 @@ class Instruction_set(Ui_instruction, QMainWindow):
...
@@ -221,22 +221,26 @@ class Instruction_set(Ui_instruction, QMainWindow):
self
.
import_2
.
clicked
.
connect
(
self
.
import_data
)
self
.
import_2
.
clicked
.
connect
(
self
.
import_data
)
#导入音频文件按钮连接函数
#导入音频文件按钮连接函数
self
.
comboBox
.
clicked
.
connect
(
self
.
import_audio
)
self
.
comboBox
.
clicked
.
connect
(
self
.
import_audio
)
#展示指令集数据
self
.
show_data
()
#文件列表
#文件列表
self
.
file_paths
=
[]
self
.
file_paths
=
[]
self
.
driver
=
""
self
.
driver
=
QSqlDatabase
.
addDatabase
(
'QSQLITE'
)
self
.
driver
.
setDatabaseName
(
dir1
)
self
.
driver
.
open
()
self
.
model
=
MyModel
()
# 展示指令集数据
self
.
show_data
()
def
closeEvent
(
self
,
event
):
def
closeEvent
(
self
,
event
):
event
.
accept
()
event
.
accept
()
initail
.
show
()
self
.
driver
.
close
()
self
.
driver
.
close
()
initail
.
show
()
def
show_data
(
self
):
def
show_data
(
self
):
ID
,
TEXT
,
SHORTDESC
,
LONGDESC
=
range
(
4
)
ID
,
TEXT
,
SHORTDESC
,
LONGDESC
=
range
(
4
)
self
.
driver
=
QSqlDatabase
.
addDatabase
(
'QSQLITE'
)
self
.
driver
.
setDatabaseName
(
dir1
)
self
.
driver
.
open
()
self
.
model
=
MyModel
()
self
.
model
.
setTable
(
"instruction"
)
self
.
model
.
setTable
(
"instruction"
)
self
.
model
.
setSort
(
ID
,
Qt
.
AscendingOrder
)
self
.
model
.
setSort
(
ID
,
Qt
.
AscendingOrder
)
self
.
model
.
setEditStrategy
(
QSqlTableModel
.
OnRowChange
)
self
.
model
.
setEditStrategy
(
QSqlTableModel
.
OnRowChange
)
...
@@ -257,7 +261,6 @@ class Instruction_set(Ui_instruction, QMainWindow):
...
@@ -257,7 +261,6 @@ class Instruction_set(Ui_instruction, QMainWindow):
self
.
tableView
.
horizontalHeader
()
.
setSectionResizeMode
(
QHeaderView
.
Stretch
)
self
.
tableView
.
horizontalHeader
()
.
setSectionResizeMode
(
QHeaderView
.
Stretch
)
self
.
tableView
.
setModel
(
self
.
model
)
self
.
tableView
.
setModel
(
self
.
model
)
self
.
tableView
.
hideColumn
(
0
)
self
.
tableView
.
hideColumn
(
0
)
# 指令集管理里面的查询
# 指令集管理里面的查询
def
search_data
(
self
):
def
search_data
(
self
):
text
=
self
.
textEdit
.
toPlainText
()
text
=
self
.
textEdit
.
toPlainText
()
...
@@ -271,12 +274,11 @@ class Instruction_set(Ui_instruction, QMainWindow):
...
@@ -271,12 +274,11 @@ class Instruction_set(Ui_instruction, QMainWindow):
def
add_data
(
self
):
def
add_data
(
self
):
i
=
self
.
tableView
.
currentIndex
()
i
=
self
.
tableView
.
currentIndex
()
row
=
self
.
model
.
rowCount
()
row
=
self
.
model
.
rowCount
()
self
.
model
.
insertRow
(
0
)
self
.
model
.
insertRow
(
row
)
self
.
model
.
selectRow
(
0
)
self
.
model
.
selectRow
(
row
)
#跳转到第一条
#跳转到最后一条
self
.
tableView
.
selectRow
(
0
)
# self.model.select()
# self.model.select()
self
.
tableView
.
selectRow
(
row
)
# 删除数据
# 删除数据
def
delete_data
(
self
):
def
delete_data
(
self
):
index
=
self
.
tableView
.
currentIndex
()
index
=
self
.
tableView
.
currentIndex
()
...
@@ -539,7 +541,6 @@ class test_script(Ui_script, QMainWindow):
...
@@ -539,7 +541,6 @@ class test_script(Ui_script, QMainWindow):
# 判断指令集选择列表是否为空
# 判断指令集选择列表是否为空
if
initail
.
test_script
.
ui
.
textlist
.
text
()
.
strip
():
if
initail
.
test_script
.
ui
.
textlist
.
text
()
.
strip
():
test_script_list
=
initail
.
test_script
.
ui
.
textlist
.
text
()
.
strip
()
.
split
(
','
)
test_script_list
=
initail
.
test_script
.
ui
.
textlist
.
text
()
.
strip
()
.
split
(
','
)
for
i
in
test_script_list
:
for
i
in
test_script_list
:
self
.
pop
.
list
.
append
(
i
)
self
.
pop
.
list
.
append
(
i
)
self
.
pop
.
model_2
.
setStringList
(
self
.
pop
.
list
)
self
.
pop
.
model_2
.
setStringList
(
self
.
pop
.
list
)
...
...
TV_OCR/sqlite3/instruction.db
View file @
ce9caabf
No preview for this file type
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