1
2
3
4
5 import wx
6
7
8
9
10
11
14
15 from Gnumed.wxpython import gmDocumentWidgets
16
17
18 kwds["style"] = wx.TAB_TRAVERSAL
19 wx.ScrolledWindow.__init__(self, *args, **kwds)
20 self._rbtn_sort_by_age = wx.RadioButton(self, -1, _("age"), style=wx.RB_GROUP)
21 self._rbtn_sort_by_review = wx.RadioButton(self, -1, _("review status"))
22 self._rbtn_sort_by_episode = wx.RadioButton(self, -1, _("episode"))
23 self._rbtn_sort_by_issue = wx.RadioButton(self, -1, _("health issue"))
24 self._rbtn_sort_by_type = wx.RadioButton(self, -1, _("type"))
25 self._doc_tree = gmDocumentWidgets.cDocTree(self, -1)
26
27 self.__set_properties()
28 self.__do_layout()
29
30 self.Bind(wx.EVT_RADIOBUTTON, self._on_sort_by_age_selected, self._rbtn_sort_by_age)
31 self.Bind(wx.EVT_RADIOBUTTON, self._on_sort_by_review_selected, self._rbtn_sort_by_review)
32 self.Bind(wx.EVT_RADIOBUTTON, self._on_sort_by_episode_selected, self._rbtn_sort_by_episode)
33 self.Bind(wx.EVT_RADIOBUTTON, self._on_sort_by_issue_selected, self._rbtn_sort_by_issue)
34 self.Bind(wx.EVT_RADIOBUTTON, self._on_sort_by_type_selected, self._rbtn_sort_by_type)
35
36
38
39 self.SetScrollRate(10, 10)
40 self._rbtn_sort_by_age.SetToolTipString(_("Sort newest documents to top of tree."))
41 self._rbtn_sort_by_age.SetValue(1)
42 self._rbtn_sort_by_review.SetToolTipString(_("Sort unreviewed documents to top of tree."))
43 self._rbtn_sort_by_episode.SetToolTipString(_("Sort documents by the episode they belong to."))
44 self._rbtn_sort_by_issue.SetToolTipString(_("Sort documents by the health issue they belong to."))
45 self._rbtn_sort_by_type.SetToolTipString(_("Sort documents by their type."))
46
47
49
50 __szr_main = wx.BoxSizer(wx.VERTICAL)
51 __szr_top_radio = wx.BoxSizer(wx.HORIZONTAL)
52 __lbl_sort = wx.StaticText(self, -1, _("Sort documents by"))
53 __szr_top_radio.Add(__lbl_sort, 0, wx.LEFT|wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5)
54 __szr_top_radio.Add(self._rbtn_sort_by_age, 0, wx.LEFT|wx.ALIGN_CENTER_VERTICAL, 10)
55 __szr_top_radio.Add(self._rbtn_sort_by_review, 0, wx.LEFT|wx.ALIGN_CENTER_VERTICAL, 10)
56 __szr_top_radio.Add(self._rbtn_sort_by_episode, 0, wx.LEFT|wx.ALIGN_CENTER_VERTICAL, 10)
57 __szr_top_radio.Add(self._rbtn_sort_by_issue, 0, wx.LEFT|wx.ALIGN_CENTER_VERTICAL, 10)
58 __szr_top_radio.Add(self._rbtn_sort_by_type, 0, wx.LEFT|wx.ALIGN_CENTER_VERTICAL, 10)
59 __szr_main.Add(__szr_top_radio, 0, wx.EXPAND, 0)
60 __hline_middle = wx.StaticLine(self, -1)
61 __szr_main.Add(__hline_middle, 0, wx.EXPAND, 0)
62 __szr_main.Add(self._doc_tree, 1, wx.EXPAND, 0)
63 self.SetSizer(__szr_main)
64 __szr_main.Fit(self)
65
66
68 print "Event handler `_on_sort_by_age_selected' not implemented!"
69 event.Skip()
70
72 print "Event handler `_on_sort_by_review_selected' not implemented!"
73 event.Skip()
74
76 print "Event handler `_on_sort_by_episode_selected' not implemented!"
77 event.Skip()
78
80 print "Event handler `_on_sort_by_issue_selected' not implemented!"
81 event.Skip()
82
84 print "Event handler `_on_sort_by_type_selected' not implemented!"
85 event.Skip()
86
87
88