Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
paddle_dbnet
Commits
5c7c1f74
Commit
5c7c1f74
authored
Jan 19, 2022
by
HinGwenWoong
Browse files
show file list image count make the labelers more clear about the image situation
parent
fd7801c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
PPOCRLabel/PPOCRLabel.py
PPOCRLabel/PPOCRLabel.py
+11
-2
No files found.
PPOCRLabel/PPOCRLabel.py
View file @
5c7c1f74
...
...
@@ -180,7 +180,8 @@ class MainWindow(QMainWindow, WindowMixin):
fileListContainer
=
QWidget
()
fileListContainer
.
setLayout
(
filelistLayout
)
self
.
filedock
=
QDockWidget
(
getStr
(
'fileList'
),
self
)
self
.
fileListName
=
getStr
(
'fileList'
)
self
.
filedock
=
QDockWidget
(
self
.
fileListName
,
self
)
self
.
filedock
.
setObjectName
(
getStr
(
'files'
))
self
.
filedock
.
setWidget
(
fileListContainer
)
self
.
addDockWidget
(
Qt
.
LeftDockWidgetArea
,
self
.
filedock
)
...
...
@@ -1390,6 +1391,13 @@ class MainWindow(QMainWindow, WindowMixin):
self
.
labelList
.
setCurrentItem
(
self
.
labelList
.
item
(
self
.
labelList
.
count
()
-
1
))
self
.
labelList
.
item
(
self
.
labelList
.
count
()
-
1
).
setSelected
(
True
)
# show file list image count
select_indexes
=
self
.
fileListWidget
.
selectedIndexes
()
if
len
(
select_indexes
)
>
0
:
self
.
filedock
.
setWindowTitle
(
self
.
fileListName
+
f
" (
{
select_indexes
[
0
].
row
()
+
1
}
"
f
"/
{
self
.
fileListWidget
.
count
()
}
)"
)
self
.
canvas
.
setFocus
(
True
)
return
True
return
False
...
...
@@ -1598,7 +1606,8 @@ class MainWindow(QMainWindow, WindowMixin):
self
.
actions
.
rotateLeft
.
setEnabled
(
True
)
self
.
actions
.
rotateRight
.
setEnabled
(
True
)
self
.
fileListWidget
.
setCurrentRow
(
0
)
# set list index to first
self
.
filedock
.
setWindowTitle
(
self
.
fileListName
+
f
" (1/
{
self
.
fileListWidget
.
count
()
}
)"
)
# show image count
def
openPrevImg
(
self
,
_value
=
False
):
if
len
(
self
.
mImgList
)
<=
0
:
...
...
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