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

# Source Code for Module Gnumed.wxGladeWidgets.wxgMoveNarrativeDlg

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