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

# Source Code for Module Gnumed.wxGladeWidgets.wxgFormDisposalDlg

      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  from Gnumed.wxpython.gmListWidgets import cReportListCtrl
     15  from Gnumed.wxpython.gmPhraseWheel import cPhraseWheel
     16  from Gnumed.wxpython.gmTextCtrl import cTextCtrl
     17  # end wxGlade
     18
     19
     20 -class wxgFormDisposalDlg(wx.Dialog):
     21 -        def __init__(self, *args, **kwds):
     22                  # begin wxGlade: wxgFormDisposalDlg.__init__
     23                  kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER
     24                  wx.Dialog.__init__(self, *args, **kwds)
     25                  self.SetSize((609, 500))
     26                  self._LBL_msg = wx.StaticText(self, wx.ID_ANY, _("What would you like to do with the following document(s) ?"))
     27                  self._LCTRL_forms = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT)
     28                  self._BTN_show_forms = wx.Button(self, wx.ID_OPEN, "", style=wx.BU_EXACTFIT)
     29                  self._BTN_delete_forms = wx.Button(self, wx.ID_DELETE, "", style=wx.BU_EXACTFIT)
     30                  self._CHBOX_export = wx.CheckBox(self, wx.ID_ANY, _("to patient export area"))
     31                  self._PRW_episode = cEpisodeSelectionPhraseWheel(self, wx.ID_ANY, "")
     32                  self._TCTRL_soap = cTextCtrl(self, wx.ID_ANY, "")
     33                  self._BTN_print = wx.Button(self, wx.ID_PRINT, "")
     34                  self._BTN_remote_print = wx.Button(self, wx.ID_ANY, _("Print &queue"))
     35                  self._BTN_export = wx.Button(self, wx.ID_ANY, _("&Export only"))
     36                  self._BTN_archive = wx.Button(self, wx.ID_ANY, _("&Archive only"))
     37                  self._BTN_cancel = wx.Button(self, wx.ID_CANCEL, "")
     38
     39                  self.__set_properties()
     40                  self.__do_layout()
     41
     42                  self.Bind(wx.EVT_BUTTON, self._on_show_forms_button_pressed, self._BTN_show_forms)
     43                  self.Bind(wx.EVT_BUTTON, self._on_delete_forms_button_pressed, self._BTN_delete_forms)
     44                  self.Bind(wx.EVT_BUTTON, self._on_print_button_pressed, self._BTN_print)
     45                  self.Bind(wx.EVT_BUTTON, self._on_remote_print_button_pressed, self._BTN_remote_print)
     46                  self.Bind(wx.EVT_BUTTON, self._on_export_button_pressed, self._BTN_export)
     47                  self.Bind(wx.EVT_BUTTON, self._on_archive_button_pressed, self._BTN_archive)
     48                  # end wxGlade
     49
     50 -        def __set_properties(self):
     51                  # begin wxGlade: wxgFormDisposalDlg.__set_properties
     52                  self.SetTitle(_("Form handling"))
     53                  self.SetSize((609, 500))
     54                  self._BTN_show_forms.SetToolTip(_("Show the selected form(s)."))
     55                  self._BTN_delete_forms.SetToolTip(_("Delete the selected forms from the list."))
     56                  self._CHBOX_export.SetToolTip(_("Check here to put a copy into the export area."))
     57                  self._PRW_episode.SetToolTip(_("Select episode under which to archive a copy of the document(s)."))
     58                  self._TCTRL_soap.SetToolTip(_("Enter a SOAP note to be put into the chart."))
     59                  self._BTN_print.SetToolTip(_("Print document(s)\n(optionally copy to archive and export area)"))
     60                  self._BTN_remote_print.SetToolTip(_("Save document(s) into print queue for printing elsewhere.\n(optionally copy to archive and export area)"))
     61                  self._BTN_export.SetToolTip(_("Put into export area only.\n(no printing, no archiving)"))
     62                  self._BTN_archive.SetToolTip(_("Put copy into archive only.\n(no printing, no export area)"))
     63                  self._BTN_cancel.SetToolTip(_("Cancel any actions and close dialog."))
     64                  # end wxGlade
     65
     66 -        def __do_layout(self):
     67                  # begin wxGlade: wxgFormDisposalDlg.__do_layout
     68                  __szr_main = wx.BoxSizer(wx.VERTICAL)
     69                  __szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
     70                  __szr_grid = wx.FlexGridSizer(3, 2, 2, 2)
     71                  __szr_forms = wx.BoxSizer(wx.HORIZONTAL)
     72                  __szr_forms_buttons = wx.BoxSizer(wx.VERTICAL)
     73                  __szr_main.Add(self._LBL_msg, 0, wx.ALL | wx.EXPAND, 3)
     74                  __szr_forms.Add(self._LCTRL_forms, 1, wx.EXPAND | wx.RIGHT, 5)
     75                  __szr_forms_buttons.Add((20, 20), 1, wx.EXPAND, 0)
     76                  __szr_forms_buttons.Add(self._BTN_show_forms, 0, wx.ALIGN_CENTER, 0)
     77                  __szr_forms_buttons.Add(self._BTN_delete_forms, 0, wx.ALIGN_CENTER | wx.TOP, 3)
     78                  __szr_forms_buttons.Add((20, 20), 1, wx.EXPAND, 0)
     79                  __szr_forms.Add(__szr_forms_buttons, 0, wx.EXPAND, 0)
     80                  __szr_main.Add(__szr_forms, 1, wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, 3)
     81                  __lbl_export = wx.StaticText(self, wx.ID_ANY, _("Export"))
     82                  __szr_grid.Add(__lbl_export, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     83                  __szr_grid.Add(self._CHBOX_export, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     84                  __lbl_episode = wx.StaticText(self, wx.ID_ANY, _("Episode"))
     85                  __szr_grid.Add(__lbl_episode, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     86                  __szr_grid.Add(self._PRW_episode, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
     87                  __lbl_soap = wx.StaticText(self, wx.ID_ANY, _("Note"))
     88                  __szr_grid.Add(__lbl_soap, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     89                  __szr_grid.Add(self._TCTRL_soap, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
     90                  __szr_grid.AddGrowableCol(1)
     91                  __szr_main.Add(__szr_grid, 1, wx.ALL | wx.EXPAND, 3)
     92                  __szr_buttons.Add((20, 20), 2, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
     93                  __szr_buttons.Add(self._BTN_print, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
     94                  __szr_buttons.Add(self._BTN_remote_print, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
     95                  __szr_buttons.Add(self._BTN_export, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
     96                  __szr_buttons.Add(self._BTN_archive, 0, wx.ALIGN_CENTER, 0)
     97                  __szr_buttons.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
     98                  __szr_buttons.Add(self._BTN_cancel, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     99                  __szr_buttons.Add((20, 20), 2, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    100                  __szr_main.Add(__szr_buttons, 0, wx.ALL | wx.EXPAND, 3)
    101                  self.SetSizer(__szr_main)
    102                  self.Layout()
    103                  # end wxGlade
    104
    105 -        def _on_show_forms_button_pressed(self, event):  # wxGlade: wxgFormDisposalDlg.<event_handler>
    106                  print("Event handler '_on_show_forms_button_pressed' not implemented!")
    107                  event.Skip()
    108
    109 -        def _on_delete_forms_button_pressed(self, event):  # wxGlade: wxgFormDisposalDlg.<event_handler>
    110                  print("Event handler '_on_delete_forms_button_pressed' not implemented!")
    111                  event.Skip()
    112
    113 -        def _on_print_button_pressed(self, event):  # wxGlade: wxgFormDisposalDlg.<event_handler>
    114                  print("Event handler '_on_print_button_pressed' not implemented!")
    115                  event.Skip()
    116
    117 -        def _on_remote_print_button_pressed(self, event):  # wxGlade: wxgFormDisposalDlg.<event_handler>
    118                  print("Event handler '_on_remote_print_button_pressed' not implemented!")
    119                  event.Skip()
    120
    121 -        def _on_export_button_pressed(self, event):  # wxGlade: wxgFormDisposalDlg.<event_handler>
    122                  print("Event handler '_on_export_button_pressed' not implemented!")
    123                  event.Skip()
    124
    125 -        def _on_archive_button_pressed(self, event):  # wxGlade: wxgFormDisposalDlg.<event_handler>
    126                  print("Event handler '_on_archive_button_pressed' not implemented!")
    127                  event.Skip()
    128
    129  # end of class wxgFormDisposalDlg
    130