1
2
3
4
5 import wx
6
9
10 from Gnumed.wxpython import gmEMRStructWidgets
11
12
13 kwds["style"] = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX|wx.THICK_FRAME
14 wx.Dialog.__init__(self, *args, **kwds)
15 self.LBL_encounter = wx.StaticText(self, -1, "")
16 self.LBL_source_episode = wx.StaticText(self, -1, "")
17 self._PRW_episode_selector = gmEMRStructWidgets.cEpisodeSelectionPhraseWheel(self, -1, "", style=wx.NO_BORDER)
18 self.LBL_narrative = wx.StaticText(self, -1, "")
19 self.__BTN_move = wx.Button(self, wx.ID_YES, _("Move"))
20 self.__BTN_cancel = wx.Button(self, wx.ID_CANCEL, _("Cancel"))
21
22 self.__set_properties()
23 self.__do_layout()
24
25 self.Bind(wx.EVT_BUTTON, self._on_move_button_pressed, id=wx.ID_YES)
26
27
29
30 self.SetTitle(_("Moving narrative to another episode"))
31 self.SetSize((500, 650))
32 self._PRW_episode_selector.SetToolTipString(_("Select the episode you want to move the narrative to."))
33 self._PRW_episode_selector.SetFocus()
34 self.__BTN_move.SetToolTipString(_("Move the narrative from the source to the target episode."))
35 self.__BTN_cancel.SetToolTipString(_("Cancel moving the narrative entries and leave them where they are."))
36 self.__BTN_cancel.SetDefault()
37
38
40
41 __szr_main = wx.BoxSizer(wx.VERTICAL)
42 __szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
43 __gszr_details = wx.FlexGridSizer(4, 2, 2, 5)
44 __lbl_encounter = wx.StaticText(self, -1, _("Encounter"))
45 __gszr_details.Add(__lbl_encounter, 0, wx.ALIGN_CENTER_VERTICAL, 0)
46 __gszr_details.Add(self.LBL_encounter, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
47 __lbl_source_episode = wx.StaticText(self, -1, _("Source episode"))
48 __lbl_source_episode.SetToolTipString(_("The episode the displayed narrative currently belongs to."))
49 __gszr_details.Add(__lbl_source_episode, 0, wx.ALIGN_CENTER_VERTICAL, 0)
50 __gszr_details.Add(self.LBL_source_episode, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
51 __lbl_target_episode = wx.StaticText(self, -1, _("Target episode"))
52 __lbl_target_episode.SetToolTipString(_("The episode you want to move the displayed narrative to."))
53 __gszr_details.Add(__lbl_target_episode, 0, wx.ALIGN_CENTER_VERTICAL, 0)
54 __gszr_details.Add(self._PRW_episode_selector, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
55 __lbl_narrative = wx.StaticText(self, -1, _("Narrative"))
56 __gszr_details.Add(__lbl_narrative, 0, wx.ALIGN_CENTER_VERTICAL, 0)
57 __gszr_details.Add(self.LBL_narrative, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
58 __gszr_details.AddGrowableRow(4)
59 __gszr_details.AddGrowableCol(1)
60 __szr_main.Add(__gszr_details, 1, wx.ALL|wx.EXPAND, 5)
61 __szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)
62 __szr_buttons.Add(self.__BTN_move, 0, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
63 __szr_buttons.Add(self.__BTN_cancel, 0, wx.LEFT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
64 __szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)
65 __szr_main.Add(__szr_buttons, 0, wx.ALL|wx.EXPAND, 5)
66 self.SetSizer(__szr_main)
67 self.Layout()
68 self.Centre()
69
70
72 print "Event handler `_on_move_button_pressed' not implemented"
73 event.Skip()
74
75
76