Added Pulse Graphics
This commit is contained in:
parent
b4129f98e2
commit
6f538215ba
9 changed files with 17 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue