Updated all slots with decorator.

This commit is contained in:
jupfi 2023-06-30 09:33:32 +02:00
parent f1fcd97c43
commit 5aacebfa30
3 changed files with 5 additions and 1 deletions

View file

@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "nqrduck-broadband"
version = "0.0.9"
version = "0.0.10"
authors = [
{ name="Julia Pfitzer", email="git@jupfi.me" },
]

View file

@ -1,3 +1,4 @@
from PyQt5.QtCore import pyqtSlot
from nqrduck.module.module_controller import ModuleController
@ -8,6 +9,7 @@ class BroadbandController(ModuleController):
def __init__(self, model):
super().__init__(model)
@pyqtSlot(str)
def change_start_frequency(self, value):
value = float(value)
if value > self.MIN_FREQUENCY:
@ -15,6 +17,7 @@ class BroadbandController(ModuleController):
else:
self._model_start_frequency = self.MIN_FREQUENCY
@pyqtSlot(str)
def change_stop_frequency(self, value):
value = float(value)
if value < self.MAX_FREQUENCY:

View file

@ -57,6 +57,7 @@ class BroadbandView(ModuleView):
self._ui_form.broadbandPlot.canvas.draw()
self._ui_form.broadbandPlot.canvas.flush_events()
@pyqtSlot(float)
def on_stop_frequency_change(self, stop_frequency):
self._ui_form.broadbandPlot.canvas.ax.set_xlim(right=stop_frequency)
self._ui_form.broadbandPlot.canvas.draw()