From 907ae0aa5091e983e45fae40b75eb9492a0e67c4 Mon Sep 17 00:00:00 2001 From: jupfi Date: Thu, 30 May 2024 16:06:01 +0200 Subject: [PATCH] Added selection setting to visual creation. --- src/nqrduck_spectrometer/base_spectrometer_model.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/nqrduck_spectrometer/base_spectrometer_model.py b/src/nqrduck_spectrometer/base_spectrometer_model.py index 0354863..9cffff6 100644 --- a/src/nqrduck_spectrometer/base_spectrometer_model.py +++ b/src/nqrduck_spectrometer/base_spectrometer_model.py @@ -3,8 +3,8 @@ import logging from PyQt6.QtCore import QSettings from nqrduck.module.module_model import ModuleModel -from quackseq.spectrometer.spectrometer_settings import FloatSetting, BooleanSetting, IntSetting, StringSetting -from .visual_settings import VisualFloatSetting, VisualIntSetting, VisualBooleanSetting, VisualStringSetting +from quackseq.spectrometer.spectrometer_settings import FloatSetting, BooleanSetting, IntSetting, StringSetting, SelectionSetting +from .visual_settings import VisualFloatSetting, VisualIntSetting, VisualBooleanSetting, VisualStringSetting, VisualSelectionSetting logger = logging.getLogger(__name__) @@ -57,6 +57,9 @@ class BaseSpectrometerModel(ModuleModel): elif isinstance(setting, StringSetting): self.quackseq_visuals[name] = VisualStringSetting(setting) + elif isinstance(setting, SelectionSetting): + self.quackseq_visuals[name] = VisualSelectionSetting(setting) + else: logger.error(f"Setting type {type(setting)} not supported")