[actions and fixes]
This commit is contained in:
parent
08696619f1
commit
0b8db76f53
@ -4,7 +4,7 @@ from PyQt5.QtGui import QIcon
|
||||
from PyQt5.QtMultimedia import QMediaContent
|
||||
from PyQt5.QtCore import QUrl
|
||||
|
||||
organization = "bendalab"
|
||||
organization = "neuroetho.uni-tuebingen.de"
|
||||
application = "blipblop"
|
||||
version = 0.1
|
||||
|
||||
|
@ -22,10 +22,11 @@ class CentralWidget(QWidget):
|
||||
self._visual_screen.task_aborted.connect(self.on_task_aborted)
|
||||
|
||||
self._auditory_screen = AudioBlop(self)
|
||||
#self._auditory_screen.close_signal.connect(self.on_plot_close)
|
||||
self._auditory_screen.task_done.connect(self.on_auditory_task_done)
|
||||
self._auditory_screen.task_aborted.connect(self.on_task_aborted)
|
||||
|
||||
self._results_screen = ResultsScreen(self)
|
||||
#self._results_screen.close_signal.connect(self.on_plot_close)
|
||||
#self._results_screen.close_signal.connect(self.on_show_results)
|
||||
|
||||
self._stack = QStackedLayout(self)
|
||||
self._stack.addWidget(self._start_screen) # 0
|
||||
@ -70,6 +71,15 @@ class CentralWidget(QWidget):
|
||||
|
||||
def on_new_auditory_task(self):
|
||||
self._stack.setCurrentIndex(2)
|
||||
|
||||
def on_auditory_task_done(self):
|
||||
task_results = MeasurementResults("Auditory task")
|
||||
task_results.starttime = self._task_start
|
||||
task_results.results = self._visual_screen.results
|
||||
self._task_results.append(task_results)
|
||||
self._visual_screen.reset
|
||||
self._stack.setCurrentIndex(0)
|
||||
|
||||
def on_show_results(self):
|
||||
print(self._task_results)
|
||||
pass
|
@ -39,7 +39,7 @@ class BlipBlop(QMainWindow):
|
||||
self._results_action.setStatusTip("Show results as table")
|
||||
self._results_action.setShortcut(QKeySequence("Ctrl+t"))
|
||||
self._results_action.setEnabled(True)
|
||||
#self._results_action.triggered.connect(self.on_results)
|
||||
self._results_action.triggered.connect(self.on_results)
|
||||
|
||||
self._about_action = QAction("about")
|
||||
self._about_action.setStatusTip("Show about dialog")
|
||||
@ -125,4 +125,4 @@ class BlipBlop(QMainWindow):
|
||||
self._cw.on_new_auditory_task()
|
||||
|
||||
def on_results(self):
|
||||
self._cw.on_show_results()
|
||||
self._cw.on_show_results()
|
||||
|
@ -30,7 +30,9 @@ class StartScreen(QWidget):
|
||||
|
||||
label = QLabel("Measure your reaction times!\nselect a task")
|
||||
font = QFont()
|
||||
font.setBold(True)
|
||||
font.setPointSize(25)
|
||||
label.setStyleSheet("color: #2D4B9A")
|
||||
label.setFont(font)
|
||||
label.setAlignment(Qt.AlignCenter)
|
||||
layout.addWidget(label, 1, 2, 1, 3, Qt.AlignCenter)
|
||||
|
Loading…
Reference in New Issue
Block a user