diff --git a/src/nqrduck_broadband/controller.py b/src/nqrduck_broadband/controller.py index c448fd7..75aeebc 100644 --- a/src/nqrduck_broadband/controller.py +++ b/src/nqrduck_broadband/controller.py @@ -17,20 +17,20 @@ class BroadbandController(ModuleController): def change_start_frequency(self, value): value = float(value) if value > self.MIN_FREQUENCY: - self._module._model.start_frequency = value + self.module._model.start_frequency = value else: - self._module._model.start_frequency = self.MIN_FREQUENCY + self.module._model.start_frequency = self.MIN_FREQUENCY @pyqtSlot(str) def change_stop_frequency(self, value): value = float(value) if value < self.MAX_FREQUENCY: - self._module._model.stop_frequency = value + self.module._model.stop_frequency = value else: - self._module._model.stop_frequency = self.MAX_FREQUENCY + self.module._model.stop_frequency = self.MAX_FREQUENCY @pyqtSlot() - def start_measurement_clicked(self): + def start_measurement(self): logger.debug("Start measurement clicked") self._module.nqrduck_signal.emit("start_measurement", "") \ No newline at end of file diff --git a/src/nqrduck_broadband/view.py b/src/nqrduck_broadband/view.py index 66f605a..ab1451d 100644 --- a/src/nqrduck_broadband/view.py +++ b/src/nqrduck_broadband/view.py @@ -26,23 +26,23 @@ class BroadbandView(ModuleView): def _connect_signals(self) -> None: self._ui_form.start_frequencyField.editingFinished.connect( - lambda: self._module._controller.change_start_frequency( + lambda: self.module._controller.change_start_frequency( self._ui_form.start_frequencyField.text() ) ) self._ui_form.stop_frequencyField.editingFinished.connect( - lambda: self._module._controller.change_stop_frequency( + lambda: self.module._controller.change_stop_frequency( self._ui_form.stop_frequencyField.text() ) ) - self._module._model.start_frequency_changed.connect(self.on_start_frequency_change) - self._module._model.stop_frequency_changed.connect(self.on_stop_frequency_change) + self.module._model.start_frequency_changed.connect(self.on_start_frequency_change) + self.module._model.stop_frequency_changed.connect(self.on_stop_frequency_change) - self._ui_form.start_measurementButton.clicked.connect(lambda: self.start_measurement_clicked()) - self.start_measurement.connect(lambda: self._module._controller.start_measurement_clicked()) + self._ui_form.start_measurementButton.clicked.connect(lambda: self._start_measurement_clicked()) + self.start_measurement.connect(lambda: self.module._controller.start_measurement()) - def start_measurement_clicked(self): + def _start_measurement_clicked(self): # Create a QMessageBox object msg_box = QMessageBox() msg_box.setText("Start the measurement?")