Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleOCR
提交
5d79a467
P
PaddleOCR
项目概览
s920243400
/
PaddleOCR
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleOCR
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleOCR
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5d79a467
编写于
1月 22, 2022
作者:
H
HinGwenWoong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Show label count in the dock title
上级
8091e348
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
13 addition
and
2 deletion
+13
-2
PPOCRLabel/PPOCRLabel.py
PPOCRLabel/PPOCRLabel.py
+13
-2
未找到文件。
PPOCRLabel/PPOCRLabel.py
浏览文件 @
5d79a467
...
@@ -191,7 +191,8 @@ class MainWindow(QMainWindow):
...
@@ -191,7 +191,8 @@ class MainWindow(QMainWindow):
# Connect to itemChanged to detect checkbox changes.
# Connect to itemChanged to detect checkbox changes.
self
.
labelList
.
itemChanged
.
connect
(
self
.
labelItemChanged
)
self
.
labelList
.
itemChanged
.
connect
(
self
.
labelItemChanged
)
self
.
labelListDock
=
QDockWidget
(
getStr
(
'recognitionResult'
),
self
)
self
.
labelListDockName
=
getStr
(
'recognitionResult'
)
self
.
labelListDock
=
QDockWidget
(
self
.
labelListDockName
,
self
)
self
.
labelListDock
.
setWidget
(
self
.
labelList
)
self
.
labelListDock
.
setWidget
(
self
.
labelList
)
self
.
labelListDock
.
setFeatures
(
QDockWidget
.
NoDockWidgetFeatures
)
self
.
labelListDock
.
setFeatures
(
QDockWidget
.
NoDockWidgetFeatures
)
listLayout
.
addWidget
(
self
.
labelListDock
)
listLayout
.
addWidget
(
self
.
labelListDock
)
...
@@ -204,7 +205,8 @@ class MainWindow(QMainWindow):
...
@@ -204,7 +205,8 @@ class MainWindow(QMainWindow):
self
.
BoxList
.
itemDoubleClicked
.
connect
(
self
.
editBox
)
self
.
BoxList
.
itemDoubleClicked
.
connect
(
self
.
editBox
)
# Connect to itemChanged to detect checkbox changes.
# Connect to itemChanged to detect checkbox changes.
self
.
BoxList
.
itemChanged
.
connect
(
self
.
boxItemChanged
)
self
.
BoxList
.
itemChanged
.
connect
(
self
.
boxItemChanged
)
self
.
BoxListDock
=
QDockWidget
(
getStr
(
'detectionBoxposition'
),
self
)
self
.
BoxListDockName
=
getStr
(
'detectionBoxposition'
)
self
.
BoxListDock
=
QDockWidget
(
self
.
BoxListDockName
,
self
)
self
.
BoxListDock
.
setWidget
(
self
.
BoxList
)
self
.
BoxListDock
.
setWidget
(
self
.
BoxList
)
self
.
BoxListDock
.
setFeatures
(
QDockWidget
.
NoDockWidgetFeatures
)
self
.
BoxListDock
.
setFeatures
(
QDockWidget
.
NoDockWidgetFeatures
)
listLayout
.
addWidget
(
self
.
BoxListDock
)
listLayout
.
addWidget
(
self
.
BoxListDock
)
...
@@ -976,6 +978,10 @@ class MainWindow(QMainWindow):
...
@@ -976,6 +978,10 @@ class MainWindow(QMainWindow):
action
.
setEnabled
(
True
)
action
.
setEnabled
(
True
)
self
.
updateComboBox
()
self
.
updateComboBox
()
# update show counting
self
.
BoxListDock
.
setWindowTitle
(
self
.
BoxListDockName
+
f
" (
{
self
.
BoxList
.
count
()
}
)"
)
self
.
labelListDock
.
setWindowTitle
(
self
.
labelListDockName
+
f
" (
{
self
.
labelList
.
count
()
}
)"
)
def
remLabels
(
self
,
shapes
):
def
remLabels
(
self
,
shapes
):
if
shapes
is
None
:
if
shapes
is
None
:
# print('rm empty label')
# print('rm empty label')
...
@@ -1339,6 +1345,9 @@ class MainWindow(QMainWindow):
...
@@ -1339,6 +1345,9 @@ class MainWindow(QMainWindow):
if
len
(
select_indexes
)
>
0
:
if
len
(
select_indexes
)
>
0
:
self
.
file_dock
.
setWindowTitle
(
self
.
fileListName
+
f
" (
{
select_indexes
[
0
].
row
()
+
1
}
"
self
.
file_dock
.
setWindowTitle
(
self
.
fileListName
+
f
" (
{
select_indexes
[
0
].
row
()
+
1
}
"
f
"/
{
self
.
fileListWidget
.
count
()
}
)"
)
f
"/
{
self
.
fileListWidget
.
count
()
}
)"
)
# update show counting
self
.
BoxListDock
.
setWindowTitle
(
self
.
BoxListDockName
+
f
" (
{
self
.
BoxList
.
count
()
}
)"
)
self
.
labelListDock
.
setWindowTitle
(
self
.
labelListDockName
+
f
" (
{
self
.
labelList
.
count
()
}
)"
)
self
.
canvas
.
setFocus
(
True
)
self
.
canvas
.
setFocus
(
True
)
return
True
return
True
...
@@ -1745,6 +1754,8 @@ class MainWindow(QMainWindow):
...
@@ -1745,6 +1754,8 @@ class MainWindow(QMainWindow):
if
self
.
noShapes
():
if
self
.
noShapes
():
for
action
in
self
.
actions
.
onShapesPresent
:
for
action
in
self
.
actions
.
onShapesPresent
:
action
.
setEnabled
(
False
)
action
.
setEnabled
(
False
)
self
.
BoxListDock
.
setWindowTitle
(
self
.
BoxListDockName
+
f
" (
{
self
.
BoxList
.
count
()
}
)"
)
self
.
labelListDock
.
setWindowTitle
(
self
.
labelListDockName
+
f
" (
{
self
.
labelList
.
count
()
}
)"
)
def
chshapeLineColor
(
self
):
def
chshapeLineColor
(
self
):
color
=
self
.
colorDialog
.
getColor
(
self
.
lineColor
,
u
'Choose line color'
,
color
=
self
.
colorDialog
.
getColor
(
self
.
lineColor
,
u
'Choose line color'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录