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

# Source Code for Module Gnumed.wxGladeWidgets.wxgMeasurementsReviewDlg

      1  #!/usr/bin/env python
      2  # -*- coding: utf-8 -*-
      3  # generated by wxGlade 0.6.3 from "/home/ncq/Projekte/gm-cvs/branches/HEAD/gnumed/gnumed/client/wxg/wxgMeasurementsReviewDlg.wxg"
      4
      5  import wx
      6
      7  # begin wxGlade: extracode
      8  # end wxGlade
      9
     10
     11
     12 -class wxgMeasurementsReviewDlg(wx.Dialog):
     13 -    def __init__(self, *args, **kwds):
     14          # begin wxGlade: wxgMeasurementsReviewDlg.__init__
     15          kwds["style"] = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX|wx.THICK_FRAME|wx.STAY_ON_TOP
     16          wx.Dialog.__init__(self, *args, **kwds)
     17          self.__szr_relevant_staticbox = wx.StaticBox(self, -1, _("Clinically relevant"))
     18          self.__szr_abnormal_staticbox = wx.StaticBox(self, -1, _("Technically abnormal"))
     19          self._LBL_tests = wx.StaticText(self, -1, _("... test results listing goes here ..."))
     20          self._RBTN_confirm_abnormal = wx.RadioButton(self, -1, _("Leave as is"), style=wx.RB_GROUP)
     21          self._RBTN_results_normal = wx.RadioButton(self, -1, _("&Normal"))
     22          self._RBTN_results_abnormal = wx.RadioButton(self, -1, _("A&bnormal"))
     23          self._RBTN_confirm_relevance = wx.RadioButton(self, -1, _("Leave as is"), style=wx.RB_GROUP)
     24          self._RBTN_results_not_relevant = wx.RadioButton(self, -1, _("Not relevant"))
     25          self._RBTN_results_relevant = wx.RadioButton(self, -1, _("&Relevant"))
     26          self._TCTRL_comment = wx.TextCtrl(self, -1, "")
     27          self._CHBOX_responsible = wx.CheckBox(self, -1, _("&Take responsibility"))
     28          self._BTN_sign_off = wx.Button(self, wx.ID_APPLY, "")
     29          self._BTN_cancel = wx.Button(self, wx.ID_CANCEL, "")
     30
     31          self.__set_properties()
     32          self.__do_layout()
     33
     34          self.Bind(wx.EVT_BUTTON, self._on_signoff_button_pressed, self._BTN_sign_off)
     35          # end wxGlade
     36
     37 -    def __set_properties(self):
     38          # begin wxGlade: wxgMeasurementsReviewDlg.__set_properties
     39          self.SetTitle(_("Signing off test results"))
     40          self._RBTN_confirm_abnormal.SetToolTipString(_("Select this if you want to agree with the current decision on technical abnormality of the results."))
     41          self._RBTN_confirm_abnormal.SetValue(1)
     42          self._RBTN_results_normal.SetToolTipString(_("Select this if you think the selected results are normal regardless of what the result provider said."))
     43          self._RBTN_results_abnormal.SetToolTipString(_("Select this if you think the selected results are technically abnormal - regardless of what the result provider said."))
     44          self._RBTN_confirm_relevance.SetToolTipString(_("Select this if you want to agree with the current decision on clinical relevance of the results."))
     45          self._RBTN_confirm_relevance.SetValue(1)
     46          self._RBTN_results_not_relevant.SetToolTipString(_("Select this if you think the selected results are clinically not significant."))
     47          self._RBTN_results_relevant.SetToolTipString(_("Select this if you think the selected results are cliniccally significant."))
     48          self._TCTRL_comment.SetToolTipString(_("Enter a comment on this review. Only available if the review applies to a single result only."))
     49          self._TCTRL_comment.Enable(False)
     50          self._CHBOX_responsible.SetToolTipString(_("Check this to take over responsibility for initiating action on these results."))
     51          self._BTN_sign_off.SetToolTipString(_("Sign off test results and save review status for all selected results."))
     52          self._BTN_cancel.SetToolTipString(_("Cancel and discard review, that is, do NOT sign off results."))
     53          self._BTN_cancel.SetDefault()
     54          # end wxGlade
     55
     56 -    def __do_layout(self):
     57          # begin wxGlade: wxgMeasurementsReviewDlg.__do_layout
     58          __szr_main = wx.BoxSizer(wx.VERTICAL)
     59          __szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
     60          __szr_comment = wx.BoxSizer(wx.HORIZONTAL)
     61          __szr_review = wx.BoxSizer(wx.HORIZONTAL)
     62          __szr_relevant = wx.StaticBoxSizer(self.__szr_relevant_staticbox, wx.HORIZONTAL)
     63          __szr_abnormal = wx.StaticBoxSizer(self.__szr_abnormal_staticbox, wx.HORIZONTAL)
     64          __msg_top = wx.StaticText(self, -1, _("This signing applies to ALL results currently selected in the viewer.\n\nIf you want to change the scope of the sign-off\nyou need to narrow or widen the selection of results."), style=wx.ALIGN_CENTRE)
     65          __szr_main.Add(__msg_top, 0, wx.LEFT|wx.RIGHT|wx.TOP|wx.EXPAND, 5)
     66          __hline_atop_tests = wx.StaticLine(self, -1)
     67          __szr_main.Add(__hline_atop_tests, 0, wx.ALL|wx.EXPAND, 5)
     68          __szr_main.Add(self._LBL_tests, 1, wx.LEFT|wx.RIGHT|wx.EXPAND, 5)
     69          __szr_abnormal.Add(self._RBTN_confirm_abnormal, 0, wx.EXPAND, 3)
     70          __szr_abnormal.Add(self._RBTN_results_normal, 0, wx.LEFT|wx.RIGHT|wx.EXPAND, 3)
     71          __szr_abnormal.Add(self._RBTN_results_abnormal, 0, wx.EXPAND, 0)
     72          __szr_review.Add(__szr_abnormal, 1, wx.EXPAND, 0)
     73          __szr_relevant.Add(self._RBTN_confirm_relevance, 0, wx.RIGHT|wx.EXPAND, 3)
     74          __szr_relevant.Add(self._RBTN_results_not_relevant, 0, wx.LEFT|wx.RIGHT|wx.EXPAND, 3)
     75          __szr_relevant.Add(self._RBTN_results_relevant, 0, wx.EXPAND, 3)
     76          __szr_review.Add(__szr_relevant, 1, wx.EXPAND, 0)
     77          __szr_main.Add(__szr_review, 0, wx.LEFT|wx.RIGHT|wx.TOP|wx.EXPAND, 5)
     78          __lbl_comment = wx.StaticText(self, -1, _("Comment"))
     79          __szr_comment.Add(__lbl_comment, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     80          __szr_comment.Add(self._TCTRL_comment, 1, wx.LEFT|wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
     81          __szr_comment.Add(self._CHBOX_responsible, 0, wx.EXPAND, 5)
     82          __szr_main.Add(__szr_comment, 0, wx.ALL|wx.EXPAND, 5)
     83          __szr_buttons.Add((20, 20), 2, wx.EXPAND, 5)
     84          __szr_buttons.Add(self._BTN_sign_off, 0, wx.EXPAND, 0)
     85          __szr_buttons.Add((20, 20), 1, wx.EXPAND, 5)
     86          __szr_buttons.Add(self._BTN_cancel, 0, wx.EXPAND, 0)
     87          __szr_buttons.Add((20, 20), 2, wx.EXPAND, 5)
     88          __szr_main.Add(__szr_buttons, 0, wx.ALL|wx.EXPAND, 5)
     89          self.SetSizer(__szr_main)
     90          __szr_main.Fit(self)
     91          self.Layout()
     92          self.Centre()
     93          # end wxGlade
     94
     95 -    def _on_signoff_button_pressed(self, event): # wxGlade: wxgMeasurementsReviewDlg.<event_handler>
     96          print "Event handler `_on_signoff_button_pressed' not implemented!"
     97          event.Skip()
     98
     99  # end of class wxgMeasurementsReviewDlg
    100
    101
    102  if __name__ == "__main__":
    103      import gettext
    104      gettext.install("app") # replace with the appropriate catalog name
    105
    106      app = wx.PySimpleApp(0)
    107      wx.InitAllImageHandlers()
    108      wxPanel = wxgMeasurementsReviewDlg(None, -1, "")
    109      app.SetTopWindow(wxPanel)
    110      wxPanel.Show()
    111      app.MainLoop()
    112