1
2
3
4
5 import wx
6 import wx.grid
7
8
9
10
11
12
15
16 from Gnumed.wxpython import gmMeasurementWidgets
17
18
19 kwds["style"] = wx.NO_BORDER|wx.TAB_TRAVERSAL
20 wx.ScrolledWindow.__init__(self, *args, **kwds)
21 self.data_grid = gmMeasurementWidgets.cMeasurementsGrid(self, -1, size=(1, 1))
22 self._BTN_add = wx.Button(self, wx.ID_ADD, "")
23 self._RBTN_my_unsigned = wx.RadioButton(self, -1, _("&Your unsigned"))
24 self._RBTN_all_unsigned = wx.RadioButton(self, -1, _("&All unsigned"))
25 self._BTN_select = wx.Button(self, -1, _("&Select"))
26 self._BTN_review = wx.Button(self, -1, _("&Actions ... "))
27
28 self.__set_properties()
29 self.__do_layout()
30
31 self.Bind(wx.EVT_BUTTON, self._on_add_button_pressed, self._BTN_add)
32 self.Bind(wx.EVT_BUTTON, self._on_select_button_pressed, self._BTN_select)
33 self.Bind(wx.EVT_BUTTON, self._on_review_button_pressed, self._BTN_review)
34
35
37
38 self.SetScrollRate(10, 10)
39 self._BTN_add.SetToolTipString(_("Add measurments."))
40 self._RBTN_my_unsigned.SetToolTipString(_("Apply selection to those unsigned results for which you are to take responsibility."))
41 self._RBTN_all_unsigned.SetToolTipString(_("Apply selection to all unsigned results."))
42 self._BTN_select.SetToolTipString(_("Select results according to your choice on the left.\n\nThis will override any previous selection.\n\nNote that you can also select cells, rows, or columns manually within the table."))
43 self._BTN_review.SetToolTipString(_("Invoke actions on the selected measurements."))
44
45
47
48 __szr_main = wx.BoxSizer(wx.VERTICAL)
49 __szr_bottom = wx.BoxSizer(wx.HORIZONTAL)
50 __szr_main.Add(self.data_grid, 1, wx.LEFT|wx.RIGHT|wx.TOP|wx.EXPAND, 5)
51 __hline_buttons = wx.StaticLine(self, -1)
52 __szr_main.Add(__hline_buttons, 0, wx.ALL|wx.EXPAND, 5)
53 __szr_bottom.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL, 0)
54 __szr_bottom.Add(self._BTN_add, 0, wx.ALIGN_CENTER_VERTICAL, 5)
55 __szr_bottom.Add((20, 20), 2, wx.ALIGN_CENTER_VERTICAL, 0)
56 __szr_bottom.Add(self._RBTN_my_unsigned, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 3)
57 __szr_bottom.Add(self._RBTN_all_unsigned, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 3)
58 __szr_bottom.Add(self._BTN_select, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5)
59 __szr_bottom.Add(self._BTN_review, 0, wx.ALIGN_CENTER_VERTICAL, 0)
60 __szr_bottom.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL, 0)
61 __szr_main.Add(__szr_bottom, 0, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.EXPAND, 5)
62 self.SetSizer(__szr_main)
63 __szr_main.Fit(self)
64
65
67 print "Event handler `_on_select_unsigned_button_pressed' not implemented!"
68 event.Skip()
69
71 print "Event handler `_on_select_your_unsigned_results_button_pressed' not implemented!"
72 event.Skip()
73
75 print "Event handler `_on_review_button_pressed' not implemented!"
76 event.Skip()
77
79 print "Event handler `_on_select_my_unsigned_results_button_pressed' not implemented"
80 event.Skip()
81
83 print "Event handler `_on_select_all_unsigned_results_button_pressed' not implemented"
84 event.Skip()
85
87 print "Event handler `_on_select_button_pressed' not implemented"
88 event.Skip()
89
91 print "Event handler `_on_add_button_pressed' not implemented"
92 event.Skip()
93
94
95