GUI: main_window.py added second axis camera to views. WIP
This commit is contained in:
@@ -108,13 +108,34 @@ class MainWindow(QMainWindow):
|
||||
|
||||
self.sample_camera = SampleCameraImageLabel(geom=geom, raster=self.raster, parent=top_widget, default_image=default_image)
|
||||
|
||||
self.beamline_view_container = QWidget(parent=top_widget)
|
||||
self.beamline_view_layout = QHBoxLayout(self.beamline_view_container)
|
||||
self.beamline_view_layout.setContentsMargins(0,0,0,0)
|
||||
self.beamline_view_layout.setSpacing(6)
|
||||
|
||||
self.beamline_view_1_combined = VideoGraphicsView()
|
||||
self.beamline_view_2_combined = VideoGraphicsView()
|
||||
self.beamline_view_layout.addWidget(self.beamline_view_1_combined)
|
||||
self.beamline_view_layout.addWidget(self.beamline_view_2_combined)
|
||||
|
||||
self.beamline_view = VideoGraphicsView()
|
||||
self.beamline_camera_thread = VideoThread(ip="x06da-axis-1.psi.ch")
|
||||
self.beamline_camera_thread.frame_ready.connect(self.beamline_view.update_frame)
|
||||
self.beamline_camera_thread.frame_ready.connect(self.beamline_view_2_combined.update_frame)
|
||||
self.beamline_camera_thread.start()
|
||||
self.beamline_view_layout.addWidget(self.beamline_view)
|
||||
|
||||
self.gonio_view = VideoGraphicsView()
|
||||
self.gonio_camera_thread = VideoThread(ip="axis-accc8ed2972e.psi.ch")
|
||||
self.gonio_camera_thread.frame_ready.connect(self.gonio_view.update_frame)
|
||||
self.gonio_camera_thread.frame_ready.connect(self.beamline_view_1_combined.update_frame)
|
||||
self.gonio_camera_thread.start()
|
||||
self.beamline_view_layout.addWidget(self.gonio_view)
|
||||
|
||||
self.video_tab.addTab(self.sample_camera, "Sample camera")
|
||||
self.video_tab.addTab(self.gonio_view, "Gonio camera")
|
||||
self.video_tab.addTab(self.beamline_view, "Beamline view")
|
||||
self.video_tab.addTab(self.beamline_view_container, "Beamline combined view")
|
||||
|
||||
top_widget_layout.addWidget(self.video_tab)
|
||||
|
||||
@@ -323,6 +344,9 @@ class MainWindow(QMainWindow):
|
||||
self.face_panel.face_detection.connect(self.daq.face_detection)
|
||||
self.daq.face_detection_result.connect(self.face_panel.update_plot)
|
||||
|
||||
self.status_bar.get_all_pgroups.connect(self.daq.get_all_pgroups)
|
||||
self.daq.staff_pgroups_loaded.connect(self.status_bar.staff_pgroups_loaded)
|
||||
|
||||
def create_menu_bar(self):
|
||||
"""Create a menu bar with File->Quit and Help->About."""
|
||||
# Main menu bar
|
||||
@@ -389,6 +413,7 @@ class MainWindow(QMainWindow):
|
||||
|
||||
@Slot()
|
||||
def mount_view(self):
|
||||
#WIP set view to beamline combined view
|
||||
self.video_tab.setCurrentIndex(1)
|
||||
|
||||
@Slot()
|
||||
@@ -416,3 +441,5 @@ class MainWindow(QMainWindow):
|
||||
self.prediction_thread.stop()
|
||||
if self.beamline_camera_thread is not None:
|
||||
self.beamline_camera_thread.stop()
|
||||
if self.gonio_camera_thread is not None:
|
||||
self.gonio_camera_thread.stop()
|
||||
|
||||
Reference in New Issue
Block a user