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
5d79a467
"examples/community/test_tensorrt_controlnet.py" did not exist on "27062c3631b7011a5df45782b8e3d01349d1f3e9"
Commit
5d79a467
authored
Jan 22, 2022
by
HinGwenWoong
Browse files
Show label count in the dock title
parent
8091e348
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
PPOCRLabel/PPOCRLabel.py
PPOCRLabel/PPOCRLabel.py
+13
-2
No files found.
PPOCRLabel/PPOCRLabel.py
View file @
5d79a467
...
...
@@ -191,7 +191,8 @@ class MainWindow(QMainWindow):
# Connect to itemChanged to detect checkbox changes.
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
.
setFeatures
(
QDockWidget
.
NoDockWidgetFeatures
)
listLayout
.
addWidget
(
self
.
labelListDock
)
...
...
@@ -204,7 +205,8 @@ class MainWindow(QMainWindow):
self
.
BoxList
.
itemDoubleClicked
.
connect
(
self
.
editBox
)
# Connect to itemChanged to detect checkbox changes.
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
.
setFeatures
(
QDockWidget
.
NoDockWidgetFeatures
)
listLayout
.
addWidget
(
self
.
BoxListDock
)
...
...
@@ -976,6 +978,10 @@ class MainWindow(QMainWindow):
action
.
setEnabled
(
True
)
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
):
if
shapes
is
None
:
# print('rm empty label')
...
...
@@ -1339,6 +1345,9 @@ class MainWindow(QMainWindow):
if
len
(
select_indexes
)
>
0
:
self
.
file_dock
.
setWindowTitle
(
self
.
fileListName
+
f
" (
{
select_indexes
[
0
].
row
()
+
1
}
"
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
)
return
True
...
...
@@ -1745,6 +1754,8 @@ class MainWindow(QMainWindow):
if
self
.
noShapes
():
for
action
in
self
.
actions
.
onShapesPresent
:
action
.
setEnabled
(
False
)
self
.
BoxListDock
.
setWindowTitle
(
self
.
BoxListDockName
+
f
" (
{
self
.
BoxList
.
count
()
}
)"
)
self
.
labelListDock
.
setWindowTitle
(
self
.
labelListDockName
+
f
" (
{
self
.
labelList
.
count
()
}
)"
)
def
chshapeLineColor
(
self
):
color
=
self
.
colorDialog
.
getColor
(
self
.
lineColor
,
u
'Choose line color'
,
...
...
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