Trees | Indices | Help |
|
---|
|
1 ############################################################################### 2 # # 3 # Copyright (C) 2009-2011 Michael Bieri # 4 # Copyright (C) 2010-2012 Edward d'Auvergne # 5 # # 6 # This file is part of the program relax (http://www.nmr-relax.com). # 7 # # 8 # This program is free software: you can redistribute it and/or modify # 9 # it under the terms of the GNU General Public License as published by # 10 # the Free Software Foundation, either version 3 of the License, or # 11 # (at your option) any later version. # 12 # # 13 # This program is distributed in the hope that it will be useful, # 14 # but WITHOUT ANY WARRANTY; without even the implied warranty of # 15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 16 # GNU General Public License for more details. # 17 # # 18 # You should have received a copy of the GNU General Public License # 19 # along with this program. If not, see <http://www.gnu.org/licenses/>. # 20 # # 21 ############################################################################### 22 23 # Module docstring. 24 """Module containing the scripts GUI element for listing the scripts used in the analysis.""" 25 26 # relax module imports. 27 from graphics import fetch_icon 28 29 # relax GUI module imports. 30 from gui.components.base_list import Base_list 31 from gui.string_conv import str_to_gui 32 from gui.uf_objects import Uf_storage; uf_store = Uf_storage() 33 3436 """The GUI element for listing the scripts used in the analysis.""" 378439 """Launch the bmrb.script user function. 40 41 @param event: The wx event. 42 @type event: wx event 43 """ 44 45 # Launch the dialog. 46 uf_store['bmrb.script'](wx_parent=self.parent)47 4850 """Override the base variables.""" 51 52 # GUI variables. 53 self.title = "Scripts" 54 self.observer_base_name = "scripts" 55 self.button_placement = 'bottom' 56 57 # The column titles. 58 self.columns = [ 59 "Script name" 60 ] 61 62 # Button set up. 63 self.button_info = [ 64 { 65 'object': 'button_add', 66 'label': ' Add', 67 'icon': fetch_icon('oxygen.actions.list-add-relax-blue', "22x22"), 68 'method': self.action_bmrb_script, 69 'tooltip': "Specify any scripts used for the analysis." 70 } 71 ]72 7375 """Method called from self.build_element_safe() to update the list data.""" 76 77 # Expand the number of rows to match the number of entries, and add the data. 78 n = 0 79 if hasattr(cdp, 'exp_info') and hasattr(cdp.exp_info, 'scripts'): 80 n = len(cdp.exp_info.scripts) 81 for i in range(n): 82 # Set the scripts name. 83 self.element.InsertStringItem(i, str_to_gui(cdp.exp_info.scripts[i].file))
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Apr 10 15:06:15 2013 | http://epydoc.sourceforge.net |