diff --git a/blipblop/ui/centralwidget.py b/blipblop/ui/centralwidget.py index 8a830dc..0780b5f 100644 --- a/blipblop/ui/centralwidget.py +++ b/blipblop/ui/centralwidget.py @@ -26,7 +26,7 @@ class CentralWidget(QWidget): self._auditory_screen.task_aborted.connect(self.on_task_aborted) self._results_screen = ResultsScreen(self) - #self._results_screen.close_signal.connect(self.on_show_results) + self._results_screen.back_signal.connect(self.on_task_aborted) self._stack = QStackedLayout(self) self._stack.addWidget(self._start_screen) # 0 @@ -75,11 +75,11 @@ class CentralWidget(QWidget): def on_auditory_task_done(self): task_results = MeasurementResults("Auditory task") task_results.starttime = self._task_start - task_results.results = self._visual_screen.results + task_results.results = self._auditory_screen.results self._task_results.append(task_results) - self._visual_screen.reset + self._auditory_screen.reset self._stack.setCurrentIndex(0) def on_show_results(self): - print(self._task_results) - pass \ No newline at end of file + self._results_screen.set_results(self._task_results) + self._stack.setCurrentIndex(3) diff --git a/blipblop/ui/mainwindow.py b/blipblop/ui/mainwindow.py index bbe4729..172d4bb 100644 --- a/blipblop/ui/mainwindow.py +++ b/blipblop/ui/mainwindow.py @@ -1,7 +1,7 @@ import sys -from PyQt5.QtWidgets import QApplication, QWidget, QMainWindow, QMenuBar, QToolBar, QAction, QStatusBar, QSizePolicy +from PyQt5.QtWidgets import QWidget, QMainWindow, QMenuBar, QToolBar, QAction, QStatusBar, QSizePolicy from PyQt5.QtGui import QKeySequence -from PyQt5.QtCore import QSize, QSettings, Qt +from PyQt5.QtCore import QSize, Qt import blipblop.constants as cnst from blipblop.ui.help import HelpDialog @@ -37,7 +37,7 @@ class BlipBlop(QMainWindow): self._results_action = QAction(cnst.get_icon("nix_data_frame"), "Show results", self) self._results_action.setStatusTip("Show results as table") - self._results_action.setShortcut(QKeySequence("Ctrl+t")) + self._results_action.setShortcut(QKeySequence("Ctrl+r")) self._results_action.setEnabled(True) self._results_action.triggered.connect(self.on_results) @@ -98,6 +98,8 @@ class BlipBlop(QMainWindow): task_menu.addSeparator() task_menu.addAction(self._visual_task_action) task_menu.addAction(self._auditory_task_action) + task_menu.addSeparator() + task_menu.addAction(self._results_action) help_menu = menu.addMenu("&Help") help_menu.addAction(self._about_action)