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, _("All"), style=wx.RB_GROUP)
     22          self._RBTN_active_patient = wx.RadioButton(self, -1, _("Active-patient related"))
     23          self._BTN_add = wx.Button(self, -1, _("&Add"), style=wx.BU_EXACTFIT)
     24          self._LCTRL_provider_inbox = gmListWidgets.cReportListCtrl(self, -1, style=wx.LC_REPORT | wx.LC_SINGLE_SEL | wx.SIMPLE_BORDER)
     25          self._TXT_inbox_item_comment = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE | wx.TE_READONLY | wx.HSCROLL | wx.TE_LINEWRAP | wx.TE_WORDWRAP)
     26
     27          self.__set_properties()
     28          self.__do_layout()
     29
     30          self.Bind(wx.EVT_RADIOBUTTON, self._on_all_messages_radiobutton_selected, self._RBTN_all_messages)
     31          self.Bind(wx.EVT_RADIOBUTTON, self._on_active_patient_radiobutton_selected, self._RBTN_active_patient)
     32          self.Bind(wx.EVT_BUTTON, self._on_add_button_pressed, self._BTN_add)
     33          self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._lst_item_selected, self._LCTRL_provider_inbox)
     34          self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self._lst_item_activated, self._LCTRL_provider_inbox)
     35          self.Bind(wx.EVT_LIST_ITEM_FOCUSED, self._lst_item_focused, self._LCTRL_provider_inbox)
     36          self.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self._lst_item_right_clicked, self._LCTRL_provider_inbox)
     37          # end wxGlade
     38
     39 -    def __set_properties(self):
     40          # begin wxGlade: wxgProviderInboxPnl.__set_properties
     41          self.SetScrollRate(10, 10)
     42          self._RBTN_all_messages.SetToolTipString(_("Show all your messages."))
     43          self._RBTN_all_messages.SetValue(1)
     44          self._RBTN_active_patient.SetToolTipString(_("Show those of your messages which are related to the active patient."))
     45          self._RBTN_active_patient.Enable(False)
     46          self._BTN_add.SetToolTipString(_("Add a new message."))
     47          self._LCTRL_provider_inbox.SetFocus()
     48          self._TXT_inbox_item_comment.SetToolTipString(_("This shows the entirety of the selected message in your Inbox."))
     49          self._TXT_inbox_item_comment.Enable(False)
     50          # end wxGlade
     51
     52 -    def __do_layout(self):
     53          # begin wxGlade: wxgProviderInboxPnl.__do_layout
     54          __szr_main = wx.BoxSizer(wx.VERTICAL)
     55          __szr_filters = wx.BoxSizer(wx.HORIZONTAL)
     56          __szr_main.Add(self._msg_welcome, 0, 0, 0)
     57          __line_top = wx.StaticLine(self, -1)
     58          __szr_main.Add(__line_top, 0, wx.TOP | wx.BOTTOM | wx.EXPAND, 5)
     59          __lbl_filters = wx.StaticText(self, -1, _("Show messages:"))
     60          __szr_filters.Add(__lbl_filters, 0, wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
     61          __szr_filters.Add(self._RBTN_all_messages, 0, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
     62          __szr_filters.Add(self._RBTN_active_patient, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
     63          __szr_filters.Add((20, 20), 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
     64          __szr_filters.Add(self._BTN_add, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
     65          __szr_main.Add(__szr_filters, 0, wx.BOTTOM | wx.EXPAND, 5)
     66          __szr_main.Add(self._LCTRL_provider_inbox, 3, wx.EXPAND, 0)
     67          __szr_main.Add(self._TXT_inbox_item_comment, 1, wx.EXPAND, 0)
     68          self.SetSizer(__szr_main)
     69          __szr_main.Fit(self)
     70          # end wxGlade
     71
     72 -    def _on_active_patient_radiobutton_selected(self, event): # wxGlade: wxgProviderInboxPnl.<event_handler>
     73          print "Event handler `_on_active_patient_radiobutton_selected' not implemented!"
     74          event.Skip()
     75
     76 -    def _lst_item_activated(self, event): # wxGlade: wxgProviderInboxPnl.<event_handler>
     77          print "Event handler `_lst_item_activated' not implemented!"
     78          event.Skip()
     79
     80 -    def _lst_item_focused(self, event): # wxGlade: wxgProviderInboxPnl.<event_handler>
     81          print "Event handler `_lst_item_focused' not implemented!"
     82          event.Skip()
     83
     84 -    def _lst_item_right_clicked(self, event): # wxGlade: wxgProviderInboxPnl.<event_handler>
     85          print "Event handler `_lst_item_right_clicked' not implemented!"
     86          event.Skip()
     87
     88 -    def _lst_item_selected(self, event): # wxGlade: wxgProviderInboxPnl.<event_handler>
     89          print "Event handler `_lst_item_selected' not implemented"
     90          event.Skip()
     91
     92 -    def _on_all_messages_radiobutton_selected(self, event): # wxGlade: wxgProviderInboxPnl.<event_handler>
     93          print "Event handler `_on_all_messages_radiobutton_selected' not implemented"
     94          event.Skip()
     95
     96 -    def _on_add_button_pressed(self, event): # wxGlade: wxgProviderInboxPnl.<event_handler>
     97          print "Event handler `_on_add_button_pressed' not implemented"
     98          event.Skip()
     99
    100  # end of class wxgProviderInboxPnl
    101