Skip to content

Commit

Permalink
adding and connecting action to show/hide daq_viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
seb5g committed Jun 20, 2024
1 parent 578f2f3 commit 731146c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pymodaq_plugins_teaching/app/beam_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def setup_docks(self):
cam_window.setCentralWidget(dockarea)
self.camera_viewer = DAQ_Viewer(dockarea, title='BSCamera', daq_type='DAQ2D')
self.camera_viewer.detector = 'BSCamera'
cam_window.show()
#cam_window.show()

self.camera_viewer.init_hardware()
QtWidgets.QApplication.processEvents()
Expand All @@ -73,11 +73,16 @@ def setup_actions(self):
"""
self.add_action('grab', 'Grab', 'camera', "Grab from camera", checkable=True)
self.add_action('quit', 'Quit', 'close2', "Quit program")
self.add_action('show', 'Show/hide', 'read2', "Show Hide DAQViewer", checkable=True)

def connect_things(self):
"""Connect actions and/or other widgets signal to methods"""
self.connect_action('grab', self.camera_viewer.grab)
self.connect_action('quit', self.quit_app)
self.connect_action('show', self.show_viewer)

def show_viewer(self, do_show: bool):
self.camera_viewer.parent.parent().setVisible(do_show)

def quit_app(self):
self.camera_viewer.quit_fun()
Expand Down

0 comments on commit 731146c

Please sign in to comment.