Commit d68d6c01 authored by Tom Pillot's avatar Tom Pillot
Browse files

Fix test run

parent 3e43a873
......@@ -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_())
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment