wip Gui added tab with waveform
This commit is contained in:
@@ -5,6 +5,7 @@ from bec_lib.endpoints import MessageEndpoints
|
||||
from bec_qthemes import material_icon
|
||||
from bec_widgets import BECWidget, SafeProperty, SafeSlot
|
||||
from bec_widgets.widgets.plots.image.image import Image
|
||||
from bec_widgets.widgets.plots.waveform.waveform import Waveform
|
||||
from bec_widgets.widgets.plots.image.setting_widgets.image_roi_tree import ROIPropertyTree
|
||||
from bec_widgets.widgets.plots.roi.image_roi import BaseROI, CircularROI, RectangularROI
|
||||
from bec_widgets.widgets.utility.toggle.toggle import ToggleSwitch
|
||||
@@ -21,7 +22,8 @@ from qtpy.QtWidgets import (
|
||||
QToolButton,
|
||||
QVBoxLayout,
|
||||
QWidget,
|
||||
QTextEdit
|
||||
QTextEdit,
|
||||
QTabWidget
|
||||
)
|
||||
|
||||
logger = bec_logger.logger
|
||||
@@ -145,16 +147,21 @@ class XRayEye(BECWidget, QWidget):
|
||||
QTimer.singleShot(0, self._init_gui_trigger)
|
||||
|
||||
def _init_ui(self):
|
||||
self.core_layout = QHBoxLayout(self)
|
||||
self.root_layout = QVBoxLayout(self)
|
||||
self.tab_widget = QTabWidget(parent=self)
|
||||
self.root_layout.addWidget(self.tab_widget)
|
||||
|
||||
self.image = Image(parent=self)
|
||||
self.alignment_tab = QWidget(parent=self)
|
||||
self.core_layout = QHBoxLayout(self.alignment_tab)
|
||||
|
||||
self.image = Image(parent=self.alignment_tab)
|
||||
self.image.enable_toolbar = False # Disable default toolbar to not allow to user set anything
|
||||
self.image.inner_axes = False # Disable inner axes to maximize image area
|
||||
self.image.enable_full_colorbar = True
|
||||
self.image.plot_item.vb.invertY(True) # #TODO Invert y axis to match logic of LabView GUI
|
||||
|
||||
# Control panel on the right: vertical layout inside a fixed-width widget
|
||||
self.control_panel = QWidget(parent=self)
|
||||
self.control_panel = QWidget(parent=self.alignment_tab)
|
||||
self.control_panel_layout = QVBoxLayout(self.control_panel)
|
||||
self.control_panel_layout.setContentsMargins(0, 0, 0, 0)
|
||||
self.control_panel_layout.setSpacing(10)
|
||||
@@ -246,6 +253,14 @@ class XRayEye(BECWidget, QWidget):
|
||||
self.core_layout.addWidget(self.image)
|
||||
self.core_layout.addWidget(self.control_panel)
|
||||
|
||||
self.tab_widget.addTab(self.alignment_tab, "Alignment")
|
||||
|
||||
self.fit_tab = QWidget(parent=self)
|
||||
self.fit_layout = QVBoxLayout(self.fit_tab)
|
||||
self.waveform = Waveform(parent=self.fit_tab)
|
||||
self.fit_layout.addWidget(self.waveform)
|
||||
self.tab_widget.addTab(self.fit_tab, "Fit")
|
||||
|
||||
def _make_connections(self):
|
||||
# Fetch initial state
|
||||
self.on_live_view_enabled(True)
|
||||
|
||||
Reference in New Issue
Block a user