diff --git a/HearingTestGUI.py b/HearingTestGUI.py index f5cd21ea7950561c52d4b6e20e2e8b38561e3181..36edae512deb9e0d1b9f23d66c4f9618818c506b 100644 --- a/HearingTestGUI.py +++ b/HearingTestGUI.py @@ -141,7 +141,9 @@ class TestWindow(QMainWindow): grid_layout = QGridLayout(self) central_widget.setLayout(grid_layout) - self.title = QLabel("Press any key to start...", self) + self.setStyleSheet("QMainWindow { background-color: black }") + self.title = QLabel("Press space bar to start...", self) + self.title.setStyleSheet("QLabel { background-color: black; color: white; font: 24pt}") self.title.setAlignment(QtCore.Qt.AlignCenter) self.log = QTextEdit() @@ -165,6 +167,7 @@ class TestWindow(QMainWindow): if event.key() == Qt.Qt.Key_F: HearingTest.max_response_time = 0.01 return + # TODO add slow mode if not self.test_running: if event.key() == Qt.Qt.Key_Escape: self.close() @@ -208,14 +211,12 @@ class TestWindow(QMainWindow): thresholds = thresholds.reshape(thresholds.shape[0], -1) # convert to 2d with open('data.csv', 'ba') as file: np.savetxt(file, thresholds.T, fmt='%.2f', delimiter=',') - # TODO store test # TODO calculate score - # TODO display test + # TODO display score self.test = None def main(): - print(sd.default.device['output']) device = sd.query_devices(sd.default.device['output']) fs = device['default_samplerate'] length = 0.5