def run(instrument: InstrumentDevice.Instrument) -> None: panel_id = "simulator-instrument-panel" name = _("Simulator Instrument") Workspace.WorkspaceManager().register_panel(InstrumentControlPanel, panel_id, name, ["left", "right"], "left", {"instrument": instrument})
def run(): Registry.register_component(LiberTEMUI(), {'libertem-panel'}) panel_properties = {'panel_type': 'libertem-panel'} Workspace.WorkspaceManager().register_panel(LiberTEMPanel, 'libertem-processing-panel', _('LiberTEM'), ['left', 'right'], 'right', panel_properties)
def __init__(self, ui, set_global=True, resources_path=None): super().__init__(ui) logging.getLogger("migration").setLevel(logging.ERROR) global app ui.set_application_info("Nion Swift", "Nion", "nion.com") self.ui.persistence_root = "3" # sets of preferences self.__resources_path = resources_path self.version_str = "0.14.7" self.workspace_dir = None self.document_model_available_event = Event.Event() self.__event_loop = None if True or set_global: app = self # hack to get the single instance set. hmm. better way? self.__document_model = None # a list of document controllers in the application. self.__document_controllers = [] self.__menu_handlers = [] # map these document controller events to listener tokens. # when the document controller closes, remove its listeners and # then remove it from the list of document controllers. # when the document controller requests a new document controller, # respond in this class by creating a new document controller. self.__did_close_event_listeners = dict() self.__create_new_event_listeners = dict() workspace_manager = Workspace.WorkspaceManager() workspace_manager.register_panel(SessionPanel.SessionPanel, "session-panel", _("Session"), ["left", "right"], "right", {"min-width": 320, "height": 80}) workspace_manager.register_panel(DataPanel.DataPanel, "data-panel", _("Data Panel"), ["left", "right"], "left", {"min-width": 320, "height": 400}) workspace_manager.register_panel(HistogramPanel.HistogramPanel, "histogram-panel", _("Histogram"), ["left", "right"], "right", {"min-width": 320, "height": 140}) workspace_manager.register_panel(InfoPanel.InfoPanel, "info-panel", _("Info"), ["left", "right"], "right", {"min-width": 320, "height": 60}) workspace_manager.register_panel(Inspector.InspectorPanel, "inspector-panel", _("Inspector"), ["left", "right"], "right", {"min-width": 320}) workspace_manager.register_panel(Task.TaskPanel, "task-panel", _("Task Panel"), ["left", "right"], "right", {"min-width": 320}) workspace_manager.register_panel(Panel.OutputPanel, "output-panel", _("Output"), ["bottom"], "bottom", {"min-width": 480, "min-height": 200}) workspace_manager.register_panel(ToolbarPanel.ToolbarPanel, "toolbar-panel", _("Toolbar"), ["top"], "top", {"height": 30}) workspace_manager.register_panel(MetadataPanel.MetadataPanel, "metadata-panel", _("Metadata"), ["left", "right"], "right", {"width": 320, "height": 8}) workspace_manager.register_filter_panel(FilterPanel.FilterPanel)
sources_column = u.create_column(items="video_sources.items", item_component_id="section", spacing=8) sources_content = u.create_scroll_area(u.create_column(sources_column, u.create_stretch())) video_source_types = [video_device_factory.display_name for video_device_factory in video_device_factories] video_source_type_combo = u.create_combo_box(items=video_source_types, current_index="@binding(video_source_type_index.value)") button_row = u.create_row(u.create_stretch(), video_source_type_combo, u.create_push_button(text=_("New"), on_clicked="create_new_video_device"), spacing=8) content = u.create_column(sources_content, button_row) return Declarative.DeclarativeWidget(ui, event_loop, Handler(content, self.__video_configuration.video_sources)) workspace_manager = Workspace.WorkspaceManager() workspace_manager.register_panel(VideoSourcePanel, "video-source-control-panel", _("Video Source"), ["left", "right"], "left") video_preference_panel = VideoPreferencePanel(video_base.video_configuration) PreferencesDialog.PreferencesManager().register_preference_pane(video_preference_panel) hardware_source_added_event_listener = None hardware_source_removed_event_listener = None def run(): global hardware_source_added_event_listener, hardware_source_removed_event_listener hardware_control_panels = dict() def register_hardware_panel(hardware_source): if hardware_source.features.get("is_video", False): panel_id = "video-control-panel-" + hardware_source.hardware_source_id
def __init__(self, ui, set_global=True, resources_path=None): super().__init__(ui) self.__class__.count += 1 # reset these values for tests. otherwise tests run slower after app.start is called in any previous test. DocumentModel.DocumentModel.computation_min_period = 0.0 DocumentModel.DocumentModel.computation_min_factor = 0.0 logging.getLogger("migration").setLevel(logging.ERROR) logging.getLogger("loader").setLevel(logging.ERROR) global app ui.set_application_info("Nion Swift", "Nion", "nion.com") self.ui.persistence_root = "3" # sets of preferences self.__resources_path = resources_path self.version_str = "0.15.2" self.document_model_available_event = Event.Event() if True or set_global: app = self # hack to get the single instance set. hmm. better way? self.__profile = None self.__document_model = None self.__menu_handlers = [] Registry.register_component( Inspector.DeclarativeImageChooserConstructor(self), {"declarative_constructor"}) Registry.register_component( Inspector.DeclarativeDataSourceChooserConstructor(self), {"declarative_constructor"}) workspace_manager = Workspace.WorkspaceManager() workspace_manager.register_panel(SessionPanel.SessionPanel, "session-panel", _("Session"), ["left", "right"], "right", { "min-width": 320, "height": 80 }) workspace_manager.register_panel(ProjectPanel.CollectionsPanel, "collections-panel", _("Collections"), ["left", "right"], "left", { "min-width": 320, "min-height": 200 }) workspace_manager.register_panel(DataPanel.DataPanel, "data-panel", _("Data Panel"), ["left", "right"], "left", { "min-width": 320, "min-height": 320 }) workspace_manager.register_panel(HistogramPanel.HistogramPanel, "histogram-panel", _("Histogram"), ["left", "right"], "right", { "min-width": 320, "height": 140 }) workspace_manager.register_panel(InfoPanel.InfoPanel, "info-panel", _("Info"), ["left", "right"], "right", { "min-width": 320, "height": 60 }) workspace_manager.register_panel(Inspector.InspectorPanel, "inspector-panel", _("Inspector"), ["left", "right"], "right", {"min-width": 320}) workspace_manager.register_panel(Task.TaskPanel, "task-panel", _("Task Panel"), ["left", "right"], "right", {"min-width": 320}) workspace_manager.register_panel(Panel.OutputPanel, "output-panel", _("Output"), ["bottom"], "bottom", { "min-width": 480, "min-height": 200 }) workspace_manager.register_panel(ToolbarPanel.ToolbarPanel, "toolbar-panel", _("Toolbar"), ["top"], "top", {"height": 30}) workspace_manager.register_panel(MetadataPanel.MetadataPanel, "metadata-panel", _("Metadata"), ["left", "right"], "right", { "width": 320, "height": 8 }) workspace_manager.register_filter_panel(FilterPanel.FilterPanel)
def run(): panel_name = name+"-control-panel" workspace_manager = Workspace.WorkspaceManager() workspace_manager.register_panel(MultipleShiftEELSAcquireControlView, panel_name, disp_name, ["left", "right"], "left")