1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 """Module containing the software GUI element for listing the software used in the analysis."""
25
26
27 from graphics import fetch_icon
28
29
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
34
36 """The GUI element for listing the software used in the analysis."""
37
39 """Launch the bmrb.software user function.
40
41 @param event: The wx event.
42 @type event: wx event
43 """
44
45
46 uf_store['bmrb.software'](wx_parent=self.parent)
47
48
50 """Launch the bmrb.software_select user function.
51
52 @param event: The wx event.
53 @type event: wx event
54 """
55
56
57 uf_store['bmrb.software_select'](wx_parent=self.parent)
58
59
61 """Override the base variables."""
62
63
64 self.title = "Software"
65 self.observer_base_name = "software"
66 self.button_placement = 'bottom'
67
68
69 self.columns = [
70 "Program name"
71 ]
72
73
74 self.button_info = [
75 {
76 'object': 'button_add',
77 'label': ' Add',
78 'icon': fetch_icon('oxygen.actions.list-add-relax-blue', "22x22"),
79 'method': self.action_bmrb_software,
80 'tooltip': "Specify the software used in the analysis."
81 }, {
82 'object': 'button_select',
83 'label': ' Select',
84 'icon': fetch_icon('oxygen.actions.edit-select', "22x22"),
85 'method': self.action_bmrb_software_select,
86 'tooltip': "Select the software used in the analysis."
87 }
88 ]
89
90
92 """Method called from self.build_element_safe() to update the list data."""
93
94
95 n = 0
96 if hasattr(cdp, 'exp_info') and hasattr(cdp.exp_info, 'software'):
97 n = len(cdp.exp_info.software)
98 for i in range(n):
99
100 self.element.InsertStringItem(i, str_to_gui(cdp.exp_info.software[i].name))
101