def __init__(self, tab_panel, tab_data): super(MirrorSettingsController, self).__init__(tab_data) self.panel = tab_panel mirror_lens = tab_data.main.lens self.panel_center = SettingsPanel(self.panel.pnl_mode_btns) self.panel_center.SetBackgroundColour(odemis.gui.BG_COLOUR_PANEL) self.panel.pnl_mode_btns.GetSizer().Add( self.panel_center, 1, border=5, flag=wx.LEFT | wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL) entry_mirrorPosition = create_setting_entry( self.panel_center, "Mirror type", mirror_lens.configuration, mirror_lens, conf={ "control_type": odemis.gui.CONTROL_COMBO, "label": "Mirror type", "tooltip": "Change the type of the mirror" }) entry_mirrorPosition.value_ctrl.SetBackgroundColour( odemis.gui.BG_COLOUR_PANEL) # remove border self.panel_center.GetSizer().GetItem(0).SetBorder(0) self.panel_center.Layout()
def setUpClass(cls): super(SettingsPanelTestCase, cls).setUpClass() parent = cls.frame.stream_bar.Parent cls.frame.stream_bar.Destroy() cls.settings_panel = SettingsPanel(parent, default_msg="Initial text!") parent.add_item(cls.settings_panel) cls.frame.Layout()
def __init__(self, tab_panel, tab_data): super(StreakCamAlignSettingsController, self).__init__(tab_data) self.panel = tab_panel main_data = tab_data.main self.streak_ccd = main_data.streak_ccd self.streak_delay = main_data.streak_delay self.streak_unit = main_data.streak_unit self.streak_lens = main_data.streak_lens self._calib_path = get_picture_folder() # path to the trigger delay calibration folder self.panel_streak = SettingsPanel(self.panel.pnl_streak) self.panel_streak.SetBackgroundColour(odemis.gui.BG_COLOUR_PANEL) self.panel.pnl_streak.GetSizer().Add(self.panel_streak, 1, border=5, flag=wx.BOTTOM | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL) entry_timeRange = create_setting_entry(self.panel_streak, "Time range", self.streak_unit.timeRange, self.streak_unit, conf={"control_type": odemis.gui.CONTROL_COMBO, "label": "Time range", "tooltip": "Time needed by the streak unit for one sweep " "from top to bottom of the readout camera chip."} ) entry_timeRange.value_ctrl.SetBackgroundColour(odemis.gui.BG_COLOUR_PANEL) self.ctrl_timeRange = entry_timeRange.value_ctrl entry_triggerDelay = create_setting_entry(self.panel_streak, "Trigger delay", self.streak_delay.triggerDelay, self.streak_delay, conf={"control_type": odemis.gui.CONTROL_FLT, "label": "Trigger delay", "tooltip": "Change the trigger delay value to " "center the image."}, change_callback=self._onUpdateTriggerDelayMD) entry_triggerDelay.value_ctrl.SetBackgroundColour(odemis.gui.BG_COLOUR_PANEL) self.ctrl_triggerDelay = entry_triggerDelay.value_ctrl entry_magnification = create_setting_entry(self.panel_streak, "Magnification", self.streak_lens.magnification, self.streak_lens, conf={"control_type": odemis.gui.CONTROL_COMBO, "label": "Magnification", "tooltip": "Change the magnification of the input" "optics for the streak camera system. \n" "Values < 1: De-magnifying \n" "Values > 1: Magnifying"}) entry_magnification.value_ctrl.SetBackgroundColour(odemis.gui.BG_COLOUR_PANEL) self.combo_magnification = entry_magnification.value_ctrl # remove border self.panel_streak.GetSizer().GetItem(0).SetBorder(0) self.panel_streak.Layout() self.panel.btn_open_streak_calib_file.Bind(wx.EVT_BUTTON, self._onOpenCalibFile) self.panel.btn_save_streak_calib_file.Bind(wx.EVT_BUTTON, self._onSaveCalibFile)
def __init__(self, fold_panel_item, default_msg, highlight_change=False, tab_data=None): self.panel = SettingsPanel(fold_panel_item, default_msg=default_msg) fold_panel_item.add_item(self.panel) self.highlight_change = highlight_change self.tab_data = tab_data self.num_entries = 0 self.entries = [] # list of SettingEntry self._subscriptions = []