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

# Source Code for Module Gnumed.wxGladeWidgets.wxgFormDisposalDlg

      1  #!/usr/bin/env python
      2  # -*- coding: UTF-8 -*-
      3  #
      4  # generated by wxGlade 0.6.7+
      5  #
      6
      7  import wx
      8
      9  # begin wxGlade: dependencies
     10  import gettext
     11  # end wxGlade
     12
     13  # begin wxGlade: extracode
     14  from Gnumed.wxpython.gmEMRStructWidgets import cEpisodeSelectionPhraseWheel
     15  from Gnumed.wxpython.gmListWidgets import cReportListCtrl
     16  from Gnumed.wxpython.gmPhraseWheel import cPhraseWheel
     17  from Gnumed.wxpython.gmTextCtrl import cTextCtrl
     18  # end wxGlade
     19
     20
     21 -class wxgFormDisposalDlg(wx.Dialog):
     22 -        def __init__(self, *args, **kwds):
     23                  # begin wxGlade: wxgFormDisposalDlg.__init__
     24                  kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER | wx.THICK_FRAME
     25                  wx.Dialog.__init__(self, *args, **kwds)
     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.LC_REPORT | wx.NO_BORDER)
     28                  self._BTN_show_forms = wx.Button(self, wx.ID_ANY, _("Show"), style=wx.BU_EXACTFIT)
     29                  self._BTN_delete_forms = wx.Button(self, wx.ID_ANY, _("Delete"), style=wx.BU_EXACTFIT)
     30                  self._LBL_print = wx.StaticText(self, wx.ID_ANY, _("Print"))
     31                  self._CHBOX_print = wx.CheckBox(self, wx.ID_ANY, _("to printer"))
     32                  self._BTN_print = wx.Button(self, wx.ID_ANY, _("Now (&P)"), style=wx.BU_EXACTFIT)
     33                  self._LBL_mail = wx.StaticText(self, wx.ID_ANY, _("Mail"))
     34                  self._CHBOX_mail = wx.CheckBox(self, wx.ID_ANY, _("to recipients"))
     35                  self._BTN_mail = wx.Button(self, wx.ID_ANY, _("Now (&M)"), style=wx.BU_EXACTFIT)
     36                  self._LBL_fax = wx.StaticText(self, wx.ID_ANY, _("Fax to"))
     37                  self._PRW_fax = cPhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     38                  self._BTN_fax = wx.Button(self, wx.ID_ANY, _("Now (&F)"), style=wx.BU_EXACTFIT)
     39                  self._LBL_tray = wx.StaticText(self, wx.ID_ANY, _("Tray"))
     40                  self._CHBOX_tray = wx.CheckBox(self, wx.ID_ANY, _("export"))
     41                  self._BTN_tray = wx.Button(self, wx.ID_ANY, _("Now (&T)"), style=wx.BU_EXACTFIT)
     42                  self._LBL_archive = wx.StaticText(self, wx.ID_ANY, _("Archive\nunder"))
     43                  self._PRW_episode = cEpisodeSelectionPhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     44                  self._BTN_archive = wx.Button(self, wx.ID_ANY, _("Now (&A)"), style=wx.BU_EXACTFIT)
     45                  self._LBL_save = wx.StaticText(self, wx.ID_ANY, _("Save"))
     46                  self._CHBOX_save = wx.CheckBox(self, wx.ID_ANY, _("to file(s)"))
     47                  self._BTN_save = wx.Button(self, wx.ID_ANY, _("Now (&S)"), style=wx.BU_EXACTFIT)
     48                  self._TCTRL_soap = cTextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     49                  self._BTN_OK = wx.Button(self, wx.ID_OK, "")
     50                  self._BTN_cancel = wx.Button(self, wx.ID_CANCEL, "")
     51
     52                  self.__set_properties()
     53                  self.__do_layout()
     54
     55                  self.Bind(wx.EVT_BUTTON, self._on_show_forms_button_pressed, self._BTN_show_forms)
     56                  self.Bind(wx.EVT_BUTTON, self._on_delete_forms_button_pressed, self._BTN_delete_forms)
     57                  self.Bind(wx.EVT_BUTTON, self._on_print_button_pressed, self._BTN_print)
     58                  self.Bind(wx.EVT_BUTTON, self._on_mail_button_pressed, self._BTN_mail)
     59                  self.Bind(wx.EVT_BUTTON, self._on_fax_button_pressed, self._BTN_fax)
     60                  self.Bind(wx.EVT_BUTTON, self._on_tray_button_pressed, self._BTN_tray)
     61                  self.Bind(wx.EVT_BUTTON, self._on_archive_button_pressed, self._BTN_archive)
     62                  self.Bind(wx.EVT_BUTTON, self._on_save_button_pressed, self._BTN_save)
     63                  self.Bind(wx.EVT_BUTTON, self._on_ok_button_pressed, self._BTN_OK)
     64                  # end wxGlade
     65
     66 -        def __set_properties(self):
     67                  # begin wxGlade: wxgFormDisposalDlg.__set_properties
     68                  self.SetTitle(_("Form handling"))
     69                  self.SetSize((550, 500))
     70                  self._BTN_show_forms.SetToolTipString(_("Show the selected form(s)."))
     71                  self._BTN_delete_forms.SetToolTipString(_("Delete the selected forms from the list."))
     72                  self._CHBOX_print.SetToolTipString(_("Check here for printing."))
     73                  self._BTN_print.SetToolTipString(_("Print immediately without further ado."))
     74                  self._BTN_print.SetDefault()
     75                  self._BTN_mail.SetToolTipString(_("Mail immediately without further ado."))
     76                  self._PRW_fax.SetToolTipString(_("Enter a fax number here."))
     77                  self._BTN_fax.SetToolTipString(_("Fax immediately without further ado."))
     78                  self._CHBOX_tray.SetToolTipString(_("Check here if you want to put a copy into the export tray."))
     79                  self._BTN_tray.SetToolTipString(_("Put into export tray immediately without further ado."))
     80                  self._PRW_episode.SetToolTipString(_("Select episode under which to archive a copy of the document(s)."))
     81                  self._BTN_archive.SetToolTipString(_("Put copy into archive without further ado."))
     82                  self._CHBOX_save.SetToolTipString(_("Check here to save document(s) to file(s)."))
     83                  self._BTN_save.SetToolTipString(_("Save to file(s) immediately without further ado."))
     84                  self._TCTRL_soap.SetToolTipString(_("Enter a SOAP note to be put into the chart."))
     85                  self._BTN_OK.SetToolTipString(_("Act on the document(s) according to the above."))
     86                  self._BTN_cancel.SetToolTipString(_("Cancel any actions and close dialog."))
     87                  # end wxGlade
     88
     89 -        def __do_layout(self):
     90                  # begin wxGlade: wxgFormDisposalDlg.__do_layout
     91                  __szr_main = wx.BoxSizer(wx.VERTICAL)
     92                  sizer_1 = wx.BoxSizer(wx.HORIZONTAL)
     93                  __szr_grid = wx.FlexGridSizer(7, 3, 2, 2)
     94                  __szr_forms = wx.BoxSizer(wx.HORIZONTAL)
     95                  __szr_forms_buttons = wx.BoxSizer(wx.VERTICAL)
     96                  __szr_main.Add(self._LBL_msg, 0, wx.ALL | wx.EXPAND, 3)
     97                  __szr_forms.Add(self._LCTRL_forms, 1, wx.RIGHT | wx.EXPAND, 5)
     98                  __szr_forms_buttons.Add((20, 20), 1, wx.EXPAND, 0)
     99                  __szr_forms_buttons.Add(self._BTN_show_forms, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALIGN_CENTER_VERTICAL, 0)
    100                  __szr_forms_buttons.Add(self._BTN_delete_forms, 0, wx.TOP | wx.ALIGN_CENTER_HORIZONTAL | wx.ALIGN_CENTER_VERTICAL, 3)
    101                  __szr_forms_buttons.Add((20, 20), 1, wx.EXPAND, 0)
    102                  __szr_forms.Add(__szr_forms_buttons, 0, wx.EXPAND, 0)
    103                  __szr_main.Add(__szr_forms, 1, wx.LEFT | wx.RIGHT | wx.TOP | wx.EXPAND, 3)
    104                  __szr_grid.Add(self._LBL_print, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    105                  __szr_grid.Add(self._CHBOX_print, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    106                  __szr_grid.Add(self._BTN_print, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALIGN_CENTER_VERTICAL, 0)
    107                  __szr_grid.Add(self._LBL_mail, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    108                  __szr_grid.Add(self._CHBOX_mail, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    109                  __szr_grid.Add(self._BTN_mail, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALIGN_CENTER_VERTICAL, 0)
    110                  __szr_grid.Add(self._LBL_fax, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    111                  __szr_grid.Add(self._PRW_fax, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    112                  __szr_grid.Add(self._BTN_fax, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALIGN_CENTER_VERTICAL, 0)
    113                  __szr_grid.Add(self._LBL_tray, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    114                  __szr_grid.Add(self._CHBOX_tray, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    115                  __szr_grid.Add(self._BTN_tray, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALIGN_CENTER_VERTICAL, 0)
    116                  __szr_grid.Add(self._LBL_archive, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    117                  __szr_grid.Add(self._PRW_episode, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    118                  __szr_grid.Add(self._BTN_archive, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALIGN_CENTER_VERTICAL, 0)
    119                  __szr_grid.Add(self._LBL_save, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    120                  __szr_grid.Add(self._CHBOX_save, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    121                  __szr_grid.Add(self._BTN_save, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALIGN_CENTER_VERTICAL, 0)
    122                  __lbl_soap = wx.StaticText(self, wx.ID_ANY, _("Note"))
    123                  __szr_grid.Add(__lbl_soap, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    124                  __szr_grid.Add(self._TCTRL_soap, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    125                  __szr_grid.Add((20, 20), 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    126                  __szr_grid.AddGrowableCol(1)
    127                  __szr_main.Add(__szr_grid, 1, wx.ALL | wx.EXPAND, 3)
    128                  sizer_1.Add((20, 20), 2, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    129                  sizer_1.Add(self._BTN_OK, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    130                  sizer_1.Add((20, 20), 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    131                  sizer_1.Add(self._BTN_cancel, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    132                  sizer_1.Add((20, 20), 2, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    133                  __szr_main.Add(sizer_1, 0, wx.ALL | wx.EXPAND, 3)
    134                  self.SetSizer(__szr_main)
    135                  self.Layout()
    136                  # end wxGlade
    137
    138 -        def _on_show_forms_button_pressed(self, event):  # wxGlade: wxgFormDisposalDlg.<event_handler>
    139                  print "Event handler '_on_show_forms_button_pressed' not implemented!"
    140                  event.Skip()
    141
    142 -        def _on_delete_forms_button_pressed(self, event):  # wxGlade: wxgFormDisposalDlg.<event_handler>
    143                  print "Event handler '_on_delete_forms_button_pressed' not implemented!"
    144                  event.Skip()
    145
    146 -        def _on_print_button_pressed(self, event):  # wxGlade: wxgFormDisposalDlg.<event_handler>
    147                  print "Event handler '_on_print_button_pressed' not implemented!"
    148                  event.Skip()
    149
    150 -        def _on_mail_button_pressed(self, event):  # wxGlade: wxgFormDisposalDlg.<event_handler>
    151                  print "Event handler '_on_mail_button_pressed' not implemented!"
    152                  event.Skip()
    153
    154 -        def _on_fax_button_pressed(self, event):  # wxGlade: wxgFormDisposalDlg.<event_handler>
    155                  print "Event handler '_on_fax_button_pressed' not implemented!"
    156                  event.Skip()
    157
    158 -        def _on_tray_button_pressed(self, event):  # wxGlade: wxgFormDisposalDlg.<event_handler>
    159                  print "Event handler '_on_tray_button_pressed' not implemented!"
    160                  event.Skip()
    161
    162 -        def _on_archive_button_pressed(self, event):  # wxGlade: wxgFormDisposalDlg.<event_handler>
    163                  print "Event handler '_on_archive_button_pressed' not implemented!"
    164                  event.Skip()
    165
    166 -        def _on_save_button_pressed(self, event):  # wxGlade: wxgFormDisposalDlg.<event_handler>
    167                  print "Event handler '_on_save_button_pressed' not implemented!"
    168                  event.Skip()
    169
    170 -        def _on_ok_button_pressed(self, event):  # wxGlade: wxgFormDisposalDlg.<event_handler>
    171                  print "Event handler '_on_ok_button_pressed' not implemented!"
    172                  event.Skip()
    173
    174  # end of class wxgFormDisposalDlg
    175  if __name__ == "__main__":
    176          gettext.install("app") # replace with the appropriate catalog name
    177
    178          app = wx.PySimpleApp(0)
    179          wx.InitAllImageHandlers()
    180          dialog_1 = wxgFormDisposalDlg(None, wx.ID_ANY, "")
    181          app.SetTopWindow(dialog_1)
    182          dialog_1.Show()
    183          app.MainLoop()
    184