Skip to content

Commit

Permalink
Re-connected the bss button in the status window.
Browse files Browse the repository at this point in the history
  • Loading branch information
canismarko committed Jun 23, 2024
1 parent 075fe26 commit 9c3def8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
9 changes: 8 additions & 1 deletion src/firefly/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ def setup_window_actions(self):
display_file=ui_dir / "status.py",
WindowClass=PlanMainWindow,
)
self.actions.status.window_created.connect(self.finalize_status_window)
# Actions for executing plans
self.actions.plans = {
"count": WindowAction(
Expand Down Expand Up @@ -255,7 +256,7 @@ def setup_window_actions(self):
text="Scheduling (&BSS)",
display_file=ui_dir / "bss.py",
WindowClass=FireflyMainWindow,
icon=qta.icon("mdi.calendar-account"),
icon=qta.icon("fa5s.calendar"),
)
# Action for shoing the IOC start/restart/stop window
self.actions.iocs = WindowAction(
Expand Down Expand Up @@ -311,6 +312,12 @@ async def finalize_new_window(self, action):
# Send the current devices to the window
await action.window.update_devices(self.registry)

def finalize_status_window(self, action):
"""Connect up signals that are specific to the voltmeters window."""
display = action.window.display_widget()
display.ui.bss_modify_button.clicked.connect(self.actions.bss.trigger)
# display.details_window_requested.connect

def finalize_voltmeter_window(self, action):
"""Connect up signals that are specific to the voltmeters window."""
def launch_ion_chamber_window(ic_name):
Expand Down
1 change: 1 addition & 0 deletions src/firefly/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def add_shutter_widgets(self):

def customize_ui(self):
self.ui.bss_modify_button.clicked.connect(self.bss_window_requested.emit)
self.ui.bss_modify_button.setIcon(qta.icon("fa5s.calendar"))
self.add_shutter_widgets()

def ui_filename(self):
Expand Down
9 changes: 3 additions & 6 deletions src/firefly/status.ui
Original file line number Diff line number Diff line change
Expand Up @@ -608,15 +608,12 @@
</spacer>
</item>
<item>
<widget class="PyDMPushButton" name="bss_modify_button">
<property name="enabled">
<bool>true</bool>
</property>
<widget class="QPushButton" name="bss_modify_button">
<property name="toolTip">
<string/>
<string>Load the window for changing beamline scheduling system (BSS) details.</string>
</property>
<property name="text">
<string>Modify</string>
<string>BSS</string>
</property>
</widget>
</item>
Expand Down

0 comments on commit 9c3def8

Please sign in to comment.