Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tom Pillot
Thymio Game
Commits
d68d6c01
Commit
d68d6c01
authored
Jul 03, 2020
by
Tom Pillot
Browse files
Fix test run
parent
3e43a873
Changes
1
Hide whitespace changes
Inline
Side-by-side
main.py
View file @
d68d6c01
...
...
@@ -19,6 +19,16 @@ class MainWindow(qtw.QWidget):
def
show_team_window
(
self
):
self
.
team_window
=
TeamWindow
(
self
.
webcam_window
.
cam
)
self
.
scoreboard_window
=
ScoreWindow
(
self
.
team_window
.
teams
,
self
.
webcam_window
.
cam
)
# Add teams to test the application
if
len
(
sys
.
argv
)
>
1
and
sys
.
argv
[
1
]
==
"test"
:
for
tag_id
in
w
.
team_window
.
team_colors
.
keys
():
tag_str
=
str
(
tag_id
)
name
=
"Test "
+
str
(
tag_id
)
w
.
team_window
.
name_input
.
setText
(
name
)
w
.
team_window
.
tag_label
.
setText
(
tag_str
)
w
.
team_window
.
add_button
.
click
()
self
.
team_window
.
start_button
.
clicked
.
connect
(
self
.
start_activity
)
self
.
stacked_layout
.
addWidget
(
self
.
team_window
)
...
...
@@ -37,17 +47,4 @@ class MainWindow(qtw.QWidget):
if
__name__
==
'__main__'
:
app
=
qtw
.
QApplication
(
sys
.
argv
)
w
=
MainWindow
()
# Add teams to test the application
if
len
(
sys
.
argv
)
>
1
and
sys
.
argv
[
1
]
==
"test"
:
for
tag_id
in
w
.
team_window
.
team_colors
.
keys
():
tag_str
=
str
(
tag_id
)
name
=
"Test "
+
str
(
tag_id
)
w
.
team_window
.
name_input
.
setText
(
name
)
w
.
team_window
.
tag_label
.
setText
(
tag_str
)
w
.
team_window
.
add_button
.
click
()
table_name
=
w
.
team_window
.
table_model
.
data
(
w
.
team_window
.
table_model
.
index
(
0
,
w
.
team_window
.
NAME
))
table_tag_id
=
w
.
team_window
.
table_model
.
data
(
w
.
team_window
.
table_model
.
index
(
0
,
w
.
team_window
.
TAG
))
sys
.
exit
(
app
.
exec_
())
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