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

# Source Code for Module Gnumed.wxGladeWidgets.wxgSelectablySortedDocTreePnl

     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/wxgSelectablySortedDocTreePnl.wxg"
     4
     5  import wx
     6
     7  # begin wxGlade: extracode
     8  # end wxGlade
     9
    10
    11
    12 -class wxgSelectablySortedDocTreePnl(wx.ScrolledWindow):
    13 -    def __init__(self, *args, **kwds):
    14
    15          from Gnumed.wxpython import gmDocumentWidgets
    16
    17          # begin wxGlade: wxgSelectablySortedDocTreePnl.__init__
    18          kwds["style"] = wx.TAB_TRAVERSAL
    19          wx.ScrolledWindow.__init__(self, *args, **kwds)
    20          self._rbtn_sort_by_age = wx.RadioButton(self, -1, _("age"), style=wx.RB_GROUP)
    21          self._rbtn_sort_by_review = wx.RadioButton(self, -1, _("review status"))
    22          self._rbtn_sort_by_episode = wx.RadioButton(self, -1, _("episode"))
    23          self._rbtn_sort_by_issue = wx.RadioButton(self, -1, _("health issue"))
    24          self._rbtn_sort_by_type = wx.RadioButton(self, -1, _("type"))
    25          self._doc_tree = gmDocumentWidgets.cDocTree(self, -1)
    26
    27          self.__set_properties()
    28          self.__do_layout()
    29
    30          self.Bind(wx.EVT_RADIOBUTTON, self._on_sort_by_age_selected, self._rbtn_sort_by_age)
    31          self.Bind(wx.EVT_RADIOBUTTON, self._on_sort_by_review_selected, self._rbtn_sort_by_review)
    32          self.Bind(wx.EVT_RADIOBUTTON, self._on_sort_by_episode_selected, self._rbtn_sort_by_episode)
    33          self.Bind(wx.EVT_RADIOBUTTON, self._on_sort_by_issue_selected, self._rbtn_sort_by_issue)
    34          self.Bind(wx.EVT_RADIOBUTTON, self._on_sort_by_type_selected, self._rbtn_sort_by_type)
    35          # end wxGlade
    36
    37 -    def __set_properties(self):
    38          # begin wxGlade: wxgSelectablySortedDocTreePnl.__set_properties
    39          self.SetScrollRate(10, 10)
    40          self._rbtn_sort_by_age.SetToolTipString(_("Sort newest documents to top of tree."))
    41          self._rbtn_sort_by_age.SetValue(1)
    42          self._rbtn_sort_by_review.SetToolTipString(_("Sort unreviewed documents to top of tree."))
    43          self._rbtn_sort_by_episode.SetToolTipString(_("Sort documents by the episode they belong to."))
    44          self._rbtn_sort_by_issue.SetToolTipString(_("Sort documents by the health issue they belong to."))
    45          self._rbtn_sort_by_type.SetToolTipString(_("Sort documents by their type."))
    46          # end wxGlade
    47
    48 -    def __do_layout(self):
    49          # begin wxGlade: wxgSelectablySortedDocTreePnl.__do_layout
    50          __szr_main = wx.BoxSizer(wx.VERTICAL)
    51          __szr_top_radio = wx.BoxSizer(wx.HORIZONTAL)
    52          __lbl_sort = wx.StaticText(self, -1, _("Sort documents by"))
    53          __szr_top_radio.Add(__lbl_sort, 0, wx.LEFT|wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5)
    54          __szr_top_radio.Add(self._rbtn_sort_by_age, 0, wx.LEFT|wx.ALIGN_CENTER_VERTICAL, 10)
    55          __szr_top_radio.Add(self._rbtn_sort_by_review, 0, wx.LEFT|wx.ALIGN_CENTER_VERTICAL, 10)
    56          __szr_top_radio.Add(self._rbtn_sort_by_episode, 0, wx.LEFT|wx.ALIGN_CENTER_VERTICAL, 10)
    57          __szr_top_radio.Add(self._rbtn_sort_by_issue, 0, wx.LEFT|wx.ALIGN_CENTER_VERTICAL, 10)
    58          __szr_top_radio.Add(self._rbtn_sort_by_type, 0, wx.LEFT|wx.ALIGN_CENTER_VERTICAL, 10)
    59          __szr_main.Add(__szr_top_radio, 0, wx.EXPAND, 0)
    60          __hline_middle = wx.StaticLine(self, -1)
    61          __szr_main.Add(__hline_middle, 0, wx.EXPAND, 0)
    62          __szr_main.Add(self._doc_tree, 1, wx.EXPAND, 0)
    63          self.SetSizer(__szr_main)
    64          __szr_main.Fit(self)
    65          # end wxGlade
    66
    67 -    def _on_sort_by_age_selected(self, event): # wxGlade: wxgSelectablySortedDocTreePnl.<event_handler>
    68          print "Event handler `_on_sort_by_age_selected' not implemented!"
    69          event.Skip()
    70
    71 -    def _on_sort_by_review_selected(self, event): # wxGlade: wxgSelectablySortedDocTreePnl.<event_handler>
    72          print "Event handler `_on_sort_by_review_selected' not implemented!"
    73          event.Skip()
    74
    75 -    def _on_sort_by_episode_selected(self, event): # wxGlade: wxgSelectablySortedDocTreePnl.<event_handler>
    76          print "Event handler `_on_sort_by_episode_selected' not implemented!"
    77          event.Skip()
    78
    79 -    def _on_sort_by_issue_selected(self, event): # wxGlade: wxgSelectablySortedDocTreePnl.<event_handler>
    80          print "Event handler `_on_sort_by_issue_selected' not implemented!"
    81          event.Skip()
    82
    83 -    def _on_sort_by_type_selected(self, event): # wxGlade: wxgSelectablySortedDocTreePnl.<event_handler>
    84          print "Event handler `_on_sort_by_type_selected' not implemented!"
    85          event.Skip()
    86
    87  # end of class wxgSelectablySortedDocTreePnl
    88