Added Pulse Graphics

This commit is contained in:
jupfi 2023-07-12 17:14:16 +02:00
parent b4129f98e2
commit 6f538215ba
9 changed files with 17 additions and 4 deletions

View file

@ -44,9 +44,9 @@ class TXPulse(BaseSpectrometerModel.PulseParameter):
def get_pixmap(self):
self_path = Path(__file__).parent
if self.options["TX Amplitude"].value > 0:
image_path = self_path / "resources/pulseparameter/wip_txpulse.png"
image_path = self_path / "resources/pulseparameter/TX_Pulse.png"
else:
image_path = self_path / "resources/pulseparameter/wip_no_txpulse.png"
image_path = self_path / "resources/pulseparameter/NoPulse.png"
pixmap = QPixmap(str(image_path))
return pixmap
@ -65,6 +65,19 @@ class TXPulse(BaseSpectrometerModel.PulseParameter):
class RXReadout(BaseSpectrometerModel.PulseParameter):
def __init__(self, name) -> None:
super().__init__(name)
self.add_option("RX", BooleanOption(False))
def get_pixmap(self):
self_path = Path(__file__).parent
if self.options["RX"].state == False:
image_path = self_path / "resources/pulseparameter/RXOff.png"
else:
image_path = self_path / "resources/pulseparameter/RXOn.png"
pixmap = QPixmap(str(image_path))
return pixmap
def set_options(self, options):
self.state = options
class Gate(BaseSpectrometerModel.PulseParameter):
@ -75,9 +88,9 @@ class Gate(BaseSpectrometerModel.PulseParameter):
def get_pixmap(self):
self_path = Path(__file__).parent
if self.options["Gate State"].state == False:
image_path = self_path / "resources/pulseparameter/wip_no_txpulse.png"
image_path = self_path / "resources/pulseparameter/GateOff.png"
else:
image_path = self_path / "resources/pulseparameter/wip_txpulse.png"
image_path = self_path / "resources/pulseparameter/GateOn.png"
pixmap = QPixmap(str(image_path))
return pixmap