def openfiles(self, paths=None, operation=None, operationname=None): self.activate() if type(paths) is not list: paths = [paths] widget = widgets.OOMTabItem(itemclass=widgets.xasviewer, paths=paths) self.centerwidget.addTab(widget, os.path.basename(paths[0])) self.centerwidget.setCurrentWidget(widget)
def openfiles(self, files, operation=None, operationname=None): self.activate() widget = widgets.OOMTabItem(itemclass=widgets.timelineViewer, files=files, toolbar=self.toolbar) self.centerwidget.addTab(widget, 'Timeline: ' + os.path.basename(files[0]) + ', ...') self.centerwidget.setCurrentWidget(widget) self.getCurrentTab().sigAddTimelineData.connect(self.unpack) self.getCurrentTab().sigClearTimeline.connect(self.bottomwidget.clearData)
def opendata(self, data=None, operation=None, operationname=None): self.activate() dimg = loader.datadiffimage2(data=data) widget = widgets.OOMTabItem(itemclass=widgets.dimgViewer, dimg=dimg, operation=operation, operationname=operationname, plotwidget=self.bottomwidget, toolbar=self.toolbar) self.centerwidget.addTab(widget, 'Imported data') self.centerwidget.setCurrentWidget(widget)
def openfiles(self, paths=None, operation=None, operationname=None): self.activate() if type(paths) is not list: paths = [paths] widget = widgets.OOMTabItem(itemclass=widgets.dimgViewer, src=paths, operation=operation, operationname=operationname, plotwidget=self.bottomwidget, toolbar=self.toolbar) self.centerwidget.addTab(widget, os.path.basename(paths[0])) self.centerwidget.setCurrentWidget(widget)