Package Gnumed :: Package wxGladeWidgets :: Module wxgMoveNarrativeDlg |
[frames] | no frames]

# Source Code for Module Gnumed.wxGladeWidgets.wxgMoveNarrativeDlg

     1  #!/usr/bin/env python
     2  # -*- coding: UTF-8 -*-
     3  # generated by wxGlade 0.4.1 on Fri May 18 13:30:13 2007
     4
     5  import wx
     6
     7 -class wxgMoveNarrativeDlg(wx.Dialog):
     8 -    def __init__(self, *args, **kwds):
     9
    10          from Gnumed.wxpython import gmEMRStructWidgets
    11
    12          # begin wxGlade: wxgMoveNarrativeDlg.__init__
    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          # end wxGlade
    27
    28 -    def __set_properties(self):
    29          # begin wxGlade: wxgMoveNarrativeDlg.__set_properties
    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          # end wxGlade
    38
    39 -    def __do_layout(self):
    40          # begin wxGlade: wxgMoveNarrativeDlg.__do_layout
    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          # end wxGlade
    70
    71 -    def _on_move_button_pressed(self, event): # wxGlade: wxgMoveNarrativeDlg.<event_handler>
    72          print "Event handler `_on_move_button_pressed' not implemented"
    73          event.Skip()
    74
    75  # end of class wxgMoveNarrativeDlg
    76