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 citations GUI element for listing the citations relevant for the analysis."""
25
26
27 from graphics import fetch_icon
28 from gui.components.base_list import Base_list
29 from gui.string_conv import str_to_gui
30 from gui.uf_objects import Uf_storage; uf_store = Uf_storage()
31
32
34 """The GUI element for listing the citations relevant for the analysis."""
35
37 """Launch the bmrb.citation user function.
38
39 @param event: The wx event.
40 @type event: wx event
41 """
42
43
44 uf_store['bmrb.citation'](wx_parent=self.parent)
45
46
48 """Override the base variables."""
49
50
51 self.title = "Citations"
52 self.observer_base_name = "citations"
53 self.button_placement = 'bottom'
54
55
56 self.columns = [
57 "Citation ID"
58 ]
59
60
61 self.button_info = [
62 {
63 'object': 'button_add',
64 'label': ' Add',
65 'icon': fetch_icon('oxygen.actions.list-add-relax-blue', "22x22"),
66 'method': self.action_bmrb_citation,
67 'tooltip': "Specify a citation to be added the BMRB data file."
68 }
69 ]
70
71
73 """Method called from self.build_element_safe() to update the list data."""
74
75
76 n = 0
77 if hasattr(cdp, 'exp_info') and hasattr(cdp.exp_info, 'citations'):
78 n = len(cdp.exp_info.citations)
79 for i in range(n):
80
81 self.element.InsertStringItem(i, str_to_gui(cdp.exp_info.citations[i].cite_id))
82