diff --git a/blipblop/ui/__pycache__/mainwindow.cpython-38.pyc b/blipblop/ui/__pycache__/mainwindow.cpython-38.pyc deleted file mode 100644 index 1d2da90..0000000 Binary files a/blipblop/ui/__pycache__/mainwindow.cpython-38.pyc and /dev/null differ diff --git a/blipblop/ui/centralwidget.py b/blipblop/ui/centralwidget.py index 12b9128..56807bc 100644 --- a/blipblop/ui/centralwidget.py +++ b/blipblop/ui/centralwidget.py @@ -7,26 +7,28 @@ from blipblop.ui.resultsscreen import ResultsScreen class CentralWidget(QWidget): - def __init__(self, parent=None) -> None: + def __init__(self, parent=None): super().__init__(parent=parent) - self._splash = StartScreen() + self._start_screen = StartScreen() self._visual_screen = VisualBlip(self) - self._visual_screen.close_signal.connect(self.on_plot_close) + # self._visual_screen.close_signal.connect(self.on_plot_close) self._auditory_screen = AudioBlop(self) - self._auditory_screen.close_signal.connect(self.on_plot_close) + #self._auditory_screen.close_signal.connect(self.on_plot_close) - self._results_screen = AudioBlop(self) - self._results_screen.close_signal.connect(self.on_plot_close) + self._results_screen = ResultsScreen(self) + #self._results_screen.close_signal.connect(self.on_plot_close) self._stack = QStackedLayout(self) - self._stack.addWidget(self._splash) + self._stack.addWidget(self._start_screen) self._stack.addWidget(self._visual_screen) self._stack.addWidget(self._auditory_screen) self._stack.addWidget(self._results_screen) self.setLayout(self._stack) + self._task_results = [] + self._stack.setCurrentIndex(0) def show_file_content(self): self._stack.setCurrentIndex(1) @@ -40,6 +42,5 @@ class CentralWidget(QWidget): self._stack.setCurrentIndex(1) def reset(self): - self._visual_stims_screen.reset() - self._splash.reset() + self._task_results = [] self._stack.setCurrentIndex(0) diff --git a/blipblop/ui/mainwindow.py b/blipblop/ui/mainwindow.py index f0ef405..d58b149 100644 --- a/blipblop/ui/mainwindow.py +++ b/blipblop/ui/mainwindow.py @@ -6,6 +6,7 @@ from PyQt5.QtCore import QSize, QSettings, Qt import blipblop.constants as cnst from blipblop.ui.help import HelpDialog from blipblop.ui.about import AboutDialog +from blipblop.ui.centralwidget import CentralWidget class BlipBlop(QMainWindow): @@ -19,7 +20,8 @@ class BlipBlop(QMainWindow): self.setMenuBar(QMenuBar(self)) self.create_actions() self._task_results = [] - + self._cw = CentralWidget() + self.setCentralWidget(self._cw) self.show() def create_actions(self): @@ -119,9 +121,8 @@ class BlipBlop(QMainWindow): sys.exit() def on_new(self): - self._task_results = [] - self.__ - pass + self._cw.reset() + def on_about(self): about = AboutDialog(self) diff --git a/blipblop/ui/startscreen.py b/blipblop/ui/startscreen.py index fe3b674..e818d78 100644 --- a/blipblop/ui/startscreen.py +++ b/blipblop/ui/startscreen.py @@ -37,7 +37,6 @@ class StartScreen(QWidget): l.addWidget(QLabel("Recently opened files:")) self._file_list = QListWidget(self) self._file_list.setSelectionMode(QAbstractItemView.SingleSelection) - self._file_list.itemClicked.connect(self._on_file_clicked) self._file_list.setFrameShape(QFrame.NoFrame) self.keyPressed.connect(self._on_key_pressed) l.addWidget(self._file_list)