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

# Source Code for Module Gnumed.wxGladeWidgets.wxgProviderInboxPnl

      1  #!/usr/bin/env python
      2  # -*- coding: utf8 -*-
      3  # generated by wxGlade 0.6.3 from "/home/ncq/Projekte/gm-cvs/branches/HEAD/gnumed/gnumed/client/wxg/wxgProviderInboxPnl.wxg"
      4
      5  import wx
      6
      7  # begin wxGlade: extracode
      8  # end wxGlade
      9
     10
     11
     12 -class wxgProviderInboxPnl(wx.ScrolledWindow):
     13 -    def __init__(self, *args, **kwds):
     14
     15          from Gnumed.wxpython import gmListWidgets
     16
     17          # begin wxGlade: wxgProviderInboxPnl.__init__
     18          kwds["style"] = wx.TAB_TRAVERSAL
     19          wx.ScrolledWindow.__init__(self, *args, **kwds)
     20          self._msg_welcome = wx.StaticText(self, -1, _("Programmer must override this text."))
     21          self._RBTN_all_messages = wx.RadioButton(self, -1, _("A&ll"), style=wx.RB_GROUP)
     22          self._RBTN_overdue_messages = wx.RadioButton(self, -1, _("&Overdue"))
     23          self._RBTN_scheduled_messages = wx.RadioButton(self, -1, _("&Scheduled"))
     24          self._RBTN_unscheduled_messages = wx.RadioButton(self, -1, _("&Unscheduled"))
     25          self._RBTN_expired_messages = wx.RadioButton(self, -1, _("&Expired"))
     26          self._CHBOX_active_patient = wx.CheckBox(self, -1, _("Active patient"))
     27          self._CHBOX_active_provider = wx.CheckBox(self, -1, _("Yours"))
     28          self._BTN_add = wx.Button(self, -1, _("&Add"), style=wx.BU_EXACTFIT)
     29          self._LCTRL_provider_inbox = gmListWidgets.cReportListCtrl(self, -1, style=wx.LC_REPORT | wx.LC_SINGLE_SEL | wx.SIMPLE_BORDER)
     30          self._TXT_inbox_item_comment = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE | wx.TE_READONLY | wx.HSCROLL | wx.TE_LINEWRAP | wx.TE_WORDWRAP)
     31
     32          self.__set_properties()
     33          self.__do_layout()
     34
     35          self.Bind(wx.EVT_RADIOBUTTON, self._on_message_range_radiobutton_selected, self._RBTN_all_messages)
     36          self.Bind(wx.EVT_RADIOBUTTON, self._on_message_range_radiobutton_selected, self._RBTN_overdue_messages)
     37          self.Bind(wx.EVT_RADIOBUTTON, self._on_message_range_radiobutton_selected, self._RBTN_scheduled_messages)
     38          self.Bind(wx.EVT_RADIOBUTTON, self._on_message_range_radiobutton_selected, self._RBTN_unscheduled_messages)
     39          self.Bind(wx.EVT_RADIOBUTTON, self._on_message_range_radiobutton_selected, self._RBTN_expired_messages)
     40          self.Bind(wx.EVT_CHECKBOX, self._on_active_patient_checkbox_ticked, self._CHBOX_active_patient)
     41          self.Bind(wx.EVT_CHECKBOX, self._on_active_provider_checkbox_ticked, self._CHBOX_active_provider)
     42          self.Bind(wx.EVT_BUTTON, self._on_add_button_pressed, self._BTN_add)
     43          self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._lst_item_selected, self._LCTRL_provider_inbox)
     44          self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self._lst_item_activated, self._LCTRL_provider_inbox)
     45          self.Bind(wx.EVT_LIST_ITEM_FOCUSED, self._lst_item_focused, self._LCTRL_provider_inbox)
     46          self.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self._lst_item_right_clicked, self._LCTRL_provider_inbox)
     47          # end wxGlade
     48
     49 -    def __set_properties(self):
     50          # begin wxGlade: wxgProviderInboxPnl.__set_properties
     51          self.SetScrollRate(10, 10)
     52          self._msg_welcome.SetFont(wx.Font(11, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
     53          self._RBTN_all_messages.SetToolTipString(_("Show all (but expired) messages."))
     54          self._RBTN_all_messages.SetValue(1)
     55          self._RBTN_overdue_messages.SetToolTipString(_("Show overdue messages only."))
     56          self._RBTN_scheduled_messages.SetToolTipString(_("Show scheduled (future-due) messages only."))
     57          self._RBTN_unscheduled_messages.SetToolTipString(_("Show unscheduled (no due date) messages only."))
     58          self._RBTN_expired_messages.SetToolTipString(_("Show expired (expiry date has passed) messages only."))
     59          self._CHBOX_active_patient.SetToolTipString(_("Include only messages about the active patient."))
     60          self._CHBOX_active_patient.Enable(False)
     61          self._CHBOX_active_provider.SetToolTipString(_("Include only messages explicitely for you (rather than also to all providers)."))
     62          self._CHBOX_active_provider.SetValue(1)
     63          self._BTN_add.SetToolTipString(_("Add a new message."))
     64          self._LCTRL_provider_inbox.SetFocus()
     65          self._TXT_inbox_item_comment.SetToolTipString(_("This shows the entirety of the selected message in your Inbox."))
     66          self._TXT_inbox_item_comment.Enable(False)
     67          # end wxGlade
     68
     69 -    def __do_layout(self):
     70          # begin wxGlade: wxgProviderInboxPnl.__do_layout
     71          __szr_main = wx.BoxSizer(wx.VERTICAL)
     72          __szr_items = wx.BoxSizer(wx.HORIZONTAL)
     73          __szr_main.Add(self._msg_welcome, 0, 0, 0)
     74          __line_top = wx.StaticLine(self, -1)
     75          __szr_main.Add(__line_top, 0, wx.TOP | wx.BOTTOM | wx.EXPAND, 5)
     76          __lbl_items = wx.StaticText(self, -1, _("Messages:"))
     77          __szr_items.Add(__lbl_items, 0, wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
     78          __szr_items.Add(self._RBTN_all_messages, 0, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
     79          __szr_items.Add(self._RBTN_overdue_messages, 0, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
     80          __szr_items.Add(self._RBTN_scheduled_messages, 0, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
     81          __szr_items.Add(self._RBTN_unscheduled_messages, 0, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
     82          __szr_items.Add(self._RBTN_expired_messages, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
     83          __vline1_options = wx.StaticLine(self, -1, style=wx.LI_VERTICAL)
     84          __szr_items.Add(__vline1_options, 0, wx.LEFT | wx.RIGHT | wx.EXPAND, 3)
     85          __lbl_audience = wx.StaticText(self, -1, _("Only:"))
     86          __szr_items.Add(__lbl_audience, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
     87          __szr_items.Add(self._CHBOX_active_patient, 0, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
     88          __szr_items.Add(self._CHBOX_active_provider, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 3)
     89          __vline2_options = wx.StaticLine(self, -1, style=wx.LI_VERTICAL)
     90          __szr_items.Add(__vline2_options, 0, wx.LEFT | wx.RIGHT | wx.EXPAND, 3)
     91          __szr_items.Add((20, 20), 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
     92          __szr_items.Add(self._BTN_add, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
     93          __szr_main.Add(__szr_items, 0, wx.BOTTOM | wx.EXPAND, 5)
     94          __szr_main.Add(self._LCTRL_provider_inbox, 3, wx.EXPAND, 0)
     95          __szr_main.Add(self._TXT_inbox_item_comment, 1, wx.EXPAND, 0)
     96          self.SetSizer(__szr_main)
     97          __szr_main.Fit(self)
     98          # end wxGlade
     99
    100 -    def _lst_item_activated(self, event): # wxGlade: wxgProviderInboxPnl.<event_handler>
    101          print "Event handler `_lst_item_activated' not implemented!"
    102          event.Skip()
    103
    104 -    def _lst_item_focused(self, event): # wxGlade: wxgProviderInboxPnl.<event_handler>
    105          print "Event handler `_lst_item_focused' not implemented!"
    106          event.Skip()
    107
    108 -    def _lst_item_right_clicked(self, event): # wxGlade: wxgProviderInboxPnl.<event_handler>
    109          print "Event handler `_lst_item_right_clicked' not implemented!"
    110          event.Skip()
    111
    112 -    def _lst_item_selected(self, event): # wxGlade: wxgProviderInboxPnl.<event_handler>
    113          print "Event handler `_lst_item_selected' not implemented"
    114          event.Skip()
    115
    116 -    def _on_add_button_pressed(self, event): # wxGlade: wxgProviderInboxPnl.<event_handler>
    117          print "Event handler `_on_add_button_pressed' not implemented"
    118          event.Skip()
    119
    120 -    def _on_active_patient_checkbox_ticked(self, event):  # wxGlade: wxgProviderInboxPnl.<event_handler>
    121          print "Event handler `_on_active_patient_checkbox_ticked' not implemented"
    122          event.Skip()
    123
    124 -    def _on_active_provider_checkbox_ticked(self, event):  # wxGlade: wxgProviderInboxPnl.<event_handler>
    125          print "Event handler `_on_active_provider_checkbox_ticked' not implemented"
    126          event.Skip()
    127
    128 -    def _on_message_range_radiobutton_selected(self, event):  # wxGlade: wxgProviderInboxPnl.<event_handler>
    129          print "Event handler `_on_message_range_radiobutton_selected' not implemented"
    130          event.Skip()
    131
    132  # end of class wxgProviderInboxPnl
    133