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

# Source Code for Module Gnumed.wxGladeWidgets.wxgInboxMessageEAPnl

      1  #!/usr/bin/env python
      2  # -*- coding: utf8 -*-
      3  # generated by wxGlade 0.6.3 from "/home/ncq/Projekte/gm-git/gnumed/gnumed/client/wxg/wxgInboxMessageEAPnl.wxg"
      4
      5  import wx
      6
      7  # begin wxGlade: extracode
      8  # end wxGlade
      9
     10
     11
     12 -class wxgInboxMessageEAPnl(wx.ScrolledWindow):
     13 -    def __init__(self, *args, **kwds):
     14
     15          from Gnumed.wxpython import gmProviderInboxWidgets
     16          from Gnumed.wxpython import gmStaffWidgets
     17          from Gnumed.wxpython import gmPatSearchWidgets
     18          from Gnumed.wxpython.gmDateTimeInput import cDateInputPhraseWheel
     19
     20          # begin wxGlade: wxgInboxMessageEAPnl.__init__
     21          kwds["style"] = wx.NO_BORDER | wx.TAB_TRAVERSAL
     22          wx.ScrolledWindow.__init__(self, *args, **kwds)
     23          self._TCTRL_subject = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     24          self._PRW_type = gmProviderInboxWidgets.cMessageTypePhraseWheel(self, -1, "", style=wx.NO_BORDER)
     25          self._CHBOX_send_to_me = wx.CheckBox(self, -1, _(u"&Myself … or:"))
     26          self._PRW_receiver = gmStaffWidgets.cProviderPhraseWheel(self, -1, "", style=wx.NO_BORDER)
     27          self._CHBOX_active_patient = wx.CheckBox(self, -1, _(u"&Active … or:"))
     28          self._PRW_patient = gmPatSearchWidgets.cPersonSearchCtrl(self, -1, "", style=wx.NO_BORDER)
     29          self._TCTRL_message = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE | wx.NO_BORDER)
     30          self._PRW_due = cDateInputPhraseWheel(self, -1, "", style=wx.NO_BORDER)
     31          self._PRW_expiry = cDateInputPhraseWheel(self, -1, "", style=wx.NO_BORDER)
     32          self._RBTN_normal = wx.RadioButton(self, -1, _("Normal"))
     33          self._RBTN_high = wx.RadioButton(self, -1, _("High"))
     34          self._RBTN_low = wx.RadioButton(self, -1, _("Low"))
     35
     36          self.__set_properties()
     37          self.__do_layout()
     38
     39          self.Bind(wx.EVT_CHECKBOX, self._on_send_to_me_checked, self._CHBOX_send_to_me)
     40          self.Bind(wx.EVT_CHECKBOX, self._on_active_patient_checked, self._CHBOX_active_patient)
     41          # end wxGlade
     42
     43 -    def __set_properties(self):
     44          # begin wxGlade: wxgInboxMessageEAPnl.__set_properties
     45          self.SetScrollRate(10, 10)
     46          self._TCTRL_subject.SetToolTipString(_("What this message is about."))
     47          self._PRW_type.SetToolTipString(_("The message type."))
     48          self._CHBOX_send_to_me.SetToolTipString(_("Check if this message should (also) be sent to yourself."))
     49          self._CHBOX_send_to_me.SetValue(1)
     50          self._PRW_receiver.SetToolTipString(_("Whom to (also) send this message to."))
     51          self._CHBOX_active_patient.SetToolTipString(_("Check this if this is about the active patient."))
     52          self._CHBOX_active_patient.SetValue(1)
     53          self._PRW_patient.Enable(False)
     54          self._TCTRL_message.SetToolTipString(_("A longer text detailing the message, if needed."))
     55          self._PRW_due.SetToolTipString(_("Optional: Pick a date when this message is due to be acted on."))
     56          self._PRW_expiry.SetToolTipString(_("Optional: Pick a date when this message will no longer be relevant."))
     57          self._RBTN_normal.SetToolTipString(_("Normal (standard) urgency of message."))
     58          self._RBTN_normal.SetValue(1)
     59          self._RBTN_high.SetToolTipString(_("Higher than normal (standard) urgency of message."))
     60          self._RBTN_low.SetToolTipString(_("Lower than normal (standard) urgency of message."))
     61          # end wxGlade
     62
     63 -    def __do_layout(self):
     64          # begin wxGlade: wxgInboxMessageEAPnl.__do_layout
     65          _gszr_main = wx.FlexGridSizer(8, 2, 1, 3)
     66          __szr_importance = wx.BoxSizer(wx.HORIZONTAL)
     67          __szr_patient = wx.BoxSizer(wx.HORIZONTAL)
     68          __szr_send_to = wx.BoxSizer(wx.HORIZONTAL)
     69          __lbl_subject = wx.StaticText(self, -1, _("Subject"))
     70          __lbl_subject.SetForegroundColour(wx.Colour(255, 0, 0))
     71          _gszr_main.Add(__lbl_subject, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     72          _gszr_main.Add(self._TCTRL_subject, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
     73          __lbl_category = wx.StaticText(self, -1, _("Category"))
     74          __lbl_category.SetForegroundColour(wx.Colour(255, 0, 0))
     75          _gszr_main.Add(__lbl_category, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     76          _gszr_main.Add(self._PRW_type, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
     77          __lbl_receiver = wx.StaticText(self, -1, _("Audience"))
     78          __lbl_receiver.SetForegroundColour(wx.Colour(255, 127, 0))
     79          _gszr_main.Add(__lbl_receiver, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     80          __szr_send_to.Add(self._CHBOX_send_to_me, 0, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
     81          __szr_send_to.Add(self._PRW_receiver, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
     82          _gszr_main.Add(__szr_send_to, 1, wx.EXPAND, 0)
     83          __lbl_patient = wx.StaticText(self, -1, _("Patient"))
     84          __lbl_patient.SetForegroundColour(wx.Colour(255, 127, 0))
     85          _gszr_main.Add(__lbl_patient, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     86          __szr_patient.Add(self._CHBOX_active_patient, 0, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
     87          __szr_patient.Add(self._PRW_patient, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
     88          _gszr_main.Add(__szr_patient, 1, wx.EXPAND, 0)
     89          __lbl_message = wx.StaticText(self, -1, _("Message"))
     90          _gszr_main.Add(__lbl_message, 0, wx.TOP, 3)
     91          _gszr_main.Add(self._TCTRL_message, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
     92          __lbl_due = wx.StaticText(self, -1, _("Due"))
     93          _gszr_main.Add(__lbl_due, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     94          _gszr_main.Add(self._PRW_due, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
     95          __lbl_expires = wx.StaticText(self, -1, _("Expires"))
     96          _gszr_main.Add(__lbl_expires, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     97          _gszr_main.Add(self._PRW_expiry, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
     98          __lbl_urgency = wx.StaticText(self, -1, _("Urgency"))
     99          _gszr_main.Add(__lbl_urgency, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    100          __szr_importance.Add(self._RBTN_normal, 0, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
    101          __szr_importance.Add(self._RBTN_high, 0, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
    102          __szr_importance.Add(self._RBTN_low, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    103          __szr_importance.Add((20, 20), 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    104          _gszr_main.Add(__szr_importance, 1, wx.EXPAND, 0)
    105          self.SetSizer(_gszr_main)
    106          _gszr_main.Fit(self)
    107          _gszr_main.AddGrowableRow(4)
    108          _gszr_main.AddGrowableCol(1)
    109          # end wxGlade
    110
    111 -    def _on_active_patient_checked(self, event): # wxGlade: wxgInboxMessageEAPnl.<event_handler>
    112          print "Event handler `_on_active_patient_checked' not implemented!"
    113          event.Skip()
    114
    115 -    def _on_send_to_me_checked(self, event): # wxGlade: wxgInboxMessageEAPnl.<event_handler>
    116          print "Event handler `_on_send_to_me_checked' not implemented"
    117          event.Skip()
    118
    119  # end of class wxgInboxMessageEAPnl
    120