def load_spins_wizard(self, event=None): """The spin loading wizard. @keyword event: The wx event. @type event: wx event """ # No current data pipe. if not cdp_name(): gui_raise(RelaxNoPipeError()) return # Change the cursor to busy. wx.BeginBusyCursor() # Initialise a wizard. self.wizard = Wiz_window(parent=self, size_x=1000, size_y=800, title="Load spins") self.page_indices = {} # The loading method page. self.page_method = Load_method_page(self.wizard) self.page_indices['method'] = self.wizard.add_page(self.page_method, apply_button=True, skip_button=False) self.wizard.set_seq_next_fn(self.page_indices['method'], self.wizard_page_after_load_method) # The sequence.read page. page = uf_store['sequence.read'].create_page(self.wizard) self.page_indices['sequence.read'] = self.wizard.add_page(page, skip_button=True) self.wizard.set_seq_next_fn(self.page_indices['sequence.read'], self.wizard_page_after_sequence_read) # The structure.read_pdb page. page = uf_store['structure.read_pdb'].create_page(self.wizard) self.page_indices['structure.read_pdb'] = self.wizard.add_page(page, skip_button=True) self.wizard.set_seq_next_fn(self.page_indices['structure.read_pdb'], self.wizard_page_after_structure_read) # The structure.read_xyz page. page = uf_store['structure.read_xyz'].create_page(self.wizard) self.page_indices['structure.read_xyz'] = self.wizard.add_page(page, skip_button=True) self.wizard.set_seq_next_fn(self.page_indices['structure.read_xyz'], self.wizard_page_after_structure_read) # The spectrum.read_spins page. page = uf_store['spectrum.read_spins'].create_page(self.wizard) self.page_indices['spectrum.read_spins'] = self.wizard.add_page(page, skip_button=True) self.wizard.set_seq_next_fn(self.page_indices['spectrum.read_spins'], self.wizard_page_after_sequence_read) # The structure.load_spins page. page = uf_store['structure.load_spins'].create_page(self.wizard) self.page_indices['structure.load_spins'] = self.wizard.add_page(page) # The termination page. page = Finish_page(self.wizard) self.page_indices['fin'] = self.wizard.add_page(page, apply_button=False, skip_button=False) # Reset the cursor. if wx.IsBusy(): wx.EndBusyCursor() # Run the wizard. self.wizard.run()
def action_export_bmrb(self, event=None): """Export the contents of the current data pipe for BMRB deposition. @keyword event: The wx event. @type event: wx event """ # No current data pipe. if not cdp_name(): gui_raise(RelaxNoPipeError()) return # Open the export window. Export_bmrb_window(self)
def load_spins_wizard(self, event=None): """The spin loading wizard. @keyword event: The wx event. @type event: wx event """ # No current data pipe. if not cdp_name(): gui_raise(RelaxNoPipeError()) return # Change the cursor to busy. wx.BeginBusyCursor() # Destroy the spin loading wizard, if it exists. if hasattr(self, 'wizard'): self.wizard.Destroy() # Initialise a wizard. self.wizard = Wiz_window(parent=self, size_x=1000, size_y=750, title="Load spins") self.page_indices = {} # The loading method page. self.page_method = Load_method_page(self.wizard) self.page_indices['method'] = self.wizard.add_page(self.page_method, apply_button=True, skip_button=False) self.wizard.set_seq_next_fn(self.page_indices['method'], self.wizard_page_after_load_method) # The sequence.read page. page = uf_store['sequence.read'].create_page(self.wizard) self.page_indices['sequence.read'] = self.wizard.add_page(page, skip_button=True) self.wizard.set_seq_next_fn(self.page_indices['sequence.read'], self.wizard_page_after_sequence_read) # The structure.read_pdb page. page = uf_store['structure.read_pdb'].create_page(self.wizard) self.page_indices['structure.read_pdb'] = self.wizard.add_page(page, skip_button=True) self.wizard.set_seq_next_fn(self.page_indices['structure.read_pdb'], self.wizard_page_after_structure_read) # The structure.read_xyz page. page = uf_store['structure.read_xyz'].create_page(self.wizard) self.page_indices['structure.read_xyz'] = self.wizard.add_page(page, skip_button=True) self.wizard.set_seq_next_fn(self.page_indices['structure.read_xyz'], self.wizard_page_after_structure_read) # The spectrum.read_spins page. page = uf_store['spectrum.read_spins'].create_page(self.wizard) self.page_indices['spectrum.read_spins'] = self.wizard.add_page(page, skip_button=True) self.wizard.set_seq_next_fn(self.page_indices['spectrum.read_spins'], self.wizard_page_after_sequence_read) # The structure.load_spins page. page = uf_store['structure.load_spins'].create_page(self.wizard) self.page_indices['structure.load_spins'] = self.wizard.add_page(page) # The termination page. page = Finish_page(self.wizard) self.page_indices['fin'] = self.wizard.add_page(page, apply_button=False, skip_button=False) # Reset the cursor. if wx.IsBusy(): wx.EndBusyCursor() # Run the wizard. self.wizard.run()