def edit_root_dataframe(self): QtWidgets.QMessageBox.warning( self, 'Proceed with caution!', 'You are about to edit the project DataFrame, be careful!\n' 'If you make a mistake press "Close"') df = objecteditor.oedit(get_project_manager().get_dataframe()) if df is not None: get_project_manager().set_dataframe(df)
def open_workEnv_editor(self): self.vi.viewer.status_bar_label.showMessage( 'Please wait, loading editor interface...') # if hasattr(self.vi.viewer.workEnv.roi_manager, 'roi_list'): # roi_list = self.vi.viewer.workEnv.roi_manager.roi_list # else: # roi_list = None # d = {'custom_columns_dict': self.vi.viewer.workEnv.custom_columns_dict, # 'isEmpty': self.vi.viewer.workEnv.isEmpty, # 'imgdata': self.vi.viewer.workEnv.imgdata.seq, # 'meta_data': self.vi.viewer.workEnv.imgdata.meta, # 'roi_list': roi_list, # 'comments': self.vi.viewer.workEnv.comments, # 'origin_file': self.vi.viewer.workEnv.origin_file, # '_saved': self.vi.viewer.workEnv._saved # } try: changes = objecteditor.oedit(self.vi.viewer.workEnv) except: print(traceback.format_exc()) # QtWidgets.QMessageBox.de(self, 'Unable to open work environment editor', # 'The following error occured while trying to open the work environment editor:' # '\n', traceback.format_exc()) return if changes is not None: try: self.vi.viewer.workEnv = changes self.vi.update_workEnv() except: QtWidgets.QMessageBox.warning( self, 'Unable to apply changes', 'The following error occured while trying to save changes to the work ' 'environment. You may want to use the console and make sure your work ' 'environment has not been corrupted.' '\n' + str(traceback.format_exc())) return elif changes is None: self.vi.viewer.status_bar_label.showMessage( 'Work environment unchanged') return self.vi.viewer.status_bar_label.showMessage( 'Your edits were successfully applied to the work environment!')
def processData(self, transmission: Transmission): self.t = transmission.copy() oedit({ 'dataframe': self.t.df, 'history_trace': self.t.history_trace.history })
def view_current_dataframe(self): objecteditor.oedit(self.get_current_dataframe()[0])