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._PRW_panel = gmMeasurementWidgets.cTestPanelPRW(self, wx.ID_ANY, "", style=wx.NO_BORDER)
22 self._TCTRL_panel_comment = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
23 self._BTN_manage_panels = wx.Button(self, wx.ID_ANY, _("Manage panels"), style=wx.BU_EXACTFIT)
24 self.panel_data_grid = gmMeasurementWidgets.cMeasurementsGrid(self, wx.ID_ANY, size=(1, 1))
25 self.data_grid = gmMeasurementWidgets.cMeasurementsGrid(self, wx.ID_ANY, size=(1, 1))
26 self._BTN_add = wx.Button(self, wx.ID_ADD, "")
27 self._RBTN_my_unsigned = wx.RadioButton(self, wx.ID_ANY, _("&Your unsigned"))
28 self._RBTN_all_unsigned = wx.RadioButton(self, wx.ID_ANY, _("&All unsigned"))
29 self._BTN_select = wx.Button(self, wx.ID_ANY, _("&Select"))
30 self._BTN_review = wx.Button(self, wx.ID_ANY, _("&Actions ... "))
31
32 self.__set_properties()
33 self.__do_layout()
34
35 self.Bind(wx.EVT_BUTTON, self._on_manage_panels_button_pressed, self._BTN_manage_panels)
36 self.Bind(wx.EVT_BUTTON, self._on_add_button_pressed, self._BTN_add)
37 self.Bind(wx.EVT_BUTTON, self._on_select_button_pressed, self._BTN_select)
38 self.Bind(wx.EVT_BUTTON, self._on_review_button_pressed, self._BTN_review)
39
40
42
43 self.SetScrollRate(10, 10)
44 self._TCTRL_panel_comment.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
45 self._TCTRL_panel_comment.Enable(False)
46 self._BTN_manage_panels.SetToolTipString(_("Manage test panels."))
47 self._BTN_add.SetToolTipString(_("Add measurments."))
48 self._RBTN_my_unsigned.SetToolTipString(_("Apply selection to those unsigned results for which you are to take responsibility."))
49 self._RBTN_all_unsigned.SetToolTipString(_("Apply selection to all unsigned results."))
50 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."))
51 self._BTN_review.SetToolTipString(_("Invoke actions on the selected measurements."))
52
53
55
56 __szr_main = wx.BoxSizer(wx.VERTICAL)
57 __szr_bottom = wx.BoxSizer(wx.HORIZONTAL)
58 __szr_grids = wx.BoxSizer(wx.VERTICAL)
59 __szr_panel_options = wx.BoxSizer(wx.HORIZONTAL)
60 __lbl_display = wx.StaticText(self, wx.ID_ANY, _("Spotlight &Panel:"))
61 __szr_panel_options.Add(__lbl_display, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 5)
62 __szr_panel_options.Add(self._PRW_panel, 2, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 10)
63 __szr_panel_options.Add(self._TCTRL_panel_comment, 3, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 5)
64 __szr_panel_options.Add(self._BTN_manage_panels, 0, wx.ALIGN_CENTER_VERTICAL, 0)
65 __szr_main.Add(__szr_panel_options, 0, wx.LEFT | wx.RIGHT | wx.TOP | wx.EXPAND, 5)
66 __szr_grids.Add(self.panel_data_grid, 0, wx.EXPAND, 5)
67 __szr_grids.Add(self.data_grid, 1, wx.TOP | wx.EXPAND, 5)
68 __szr_main.Add(__szr_grids, 1, wx.LEFT | wx.RIGHT | wx.TOP | wx.EXPAND, 5)
69 __hline_buttons = wx.StaticLine(self, wx.ID_ANY)
70 __szr_main.Add(__hline_buttons, 0, wx.ALL | wx.EXPAND, 5)
71 __szr_bottom.Add((20, 20), 2, wx.ALIGN_CENTER_VERTICAL, 0)
72 __szr_bottom.Add(self._BTN_add, 0, wx.ALIGN_CENTER_VERTICAL, 5)
73 __szr_bottom.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL, 0)
74 __szr_bottom.Add(self._RBTN_my_unsigned, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
75 __szr_bottom.Add(self._RBTN_all_unsigned, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
76 __szr_bottom.Add(self._BTN_select, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 5)
77 __szr_bottom.Add(self._BTN_review, 0, wx.ALIGN_CENTER_VERTICAL, 0)
78 __szr_bottom.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL, 0)
79 __szr_main.Add(__szr_bottom, 0, wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, 5)
80 self.SetSizer(__szr_main)
81 __szr_main.Fit(self)
82
83
85 print "Event handler `_on_select_unsigned_button_pressed' not implemented!"
86 event.Skip()
87
89 print "Event handler `_on_select_your_unsigned_results_button_pressed' not implemented!"
90 event.Skip()
91
93 print "Event handler `_on_review_button_pressed' not implemented!"
94 event.Skip()
95
97 print "Event handler `_on_select_my_unsigned_results_button_pressed' not implemented"
98 event.Skip()
99
101 print "Event handler `_on_select_all_unsigned_results_button_pressed' not implemented"
102 event.Skip()
103
105 print "Event handler `_on_select_button_pressed' not implemented"
106 event.Skip()
107
109 print "Event handler `_on_add_button_pressed' not implemented"
110 event.Skip()
111
113 print "Event handler `_on_manage_panels_button_pressed' not implemented"
114 event.Skip()
115
116
117