Gnumed.wxGladeWidgets.wxgSelectablySortedDocTreePnl

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

# Source Code for Module Gnumed.wxGladeWidgets.wxgSelectablySortedDocTreePnl

      1  # -*- coding: UTF-8 -*-
      2  #
      3  # generated by wxGlade
      4  #
      5
      6  import wx
      7
      8  # begin wxGlade: dependencies
      9  import gettext
     10  # end wxGlade
     11
     12  # begin wxGlade: extracode
     13  # end wxGlade
     14
     15
     16 -class wxgSelectablySortedDocTreePnl(wx.ScrolledWindow):
     17 -        def __init__(self, *args, **kwds):
     18                  # begin wxGlade: wxgSelectablySortedDocTreePnl.__init__
     19                  kwds["style"] = kwds.get("style", 0) | wx.TAB_TRAVERSAL
     20                  wx.ScrolledWindow.__init__(self, *args, **kwds)
     21                  self._rbtn_sort_by_age = wx.RadioButton(self, wx.ID_ANY, _("Age"), style=wx.RB_GROUP)
     22                  self._rbtn_sort_by_review = wx.RadioButton(self, wx.ID_ANY, _("Review status"))
     23                  self._rbtn_sort_by_episode = wx.RadioButton(self, wx.ID_ANY, _("Episode"))
     24                  self._rbtn_sort_by_issue = wx.RadioButton(self, wx.ID_ANY, _("Health issue"))
     25                  self._rbtn_sort_by_type = wx.RadioButton(self, wx.ID_ANY, _("Type"))
     26                  self._rbtn_sort_by_org = wx.RadioButton(self, wx.ID_ANY, _("Organization"))
     27                  from Gnumed.wxpython.gmDocumentWidgets import cDocTree
     28                  self._doc_tree = cDocTree(self, wx.ID_ANY)
     29                  from Gnumed.wxpython.gmListWidgets import cReportListCtrl
     30                  self._LCTRL_details = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT)
     31                  self._TCTRL_metainfo = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_BESTWRAP | wx.TE_MULTILINE | wx.TE_READONLY)
     32
     33                  self.__set_properties()
     34                  self.__do_layout()
     35
     36                  self.Bind(wx.EVT_RADIOBUTTON, self._on_sort_by_age_selected, self._rbtn_sort_by_age)
     37                  self.Bind(wx.EVT_RADIOBUTTON, self._on_sort_by_review_selected, self._rbtn_sort_by_review)
     38                  self.Bind(wx.EVT_RADIOBUTTON, self._on_sort_by_episode_selected, self._rbtn_sort_by_episode)
     39                  self.Bind(wx.EVT_RADIOBUTTON, self._on_sort_by_issue_selected, self._rbtn_sort_by_issue)
     40                  self.Bind(wx.EVT_RADIOBUTTON, self._on_sort_by_type_selected, self._rbtn_sort_by_type)
     41                  self.Bind(wx.EVT_RADIOBUTTON, self._on_sort_by_org_selected, self._rbtn_sort_by_org)
     42                  # end wxGlade
     43
     44 -        def __set_properties(self):
     45                  # begin wxGlade: wxgSelectablySortedDocTreePnl.__set_properties
     46                  self.SetScrollRate(10, 10)
     47                  self._rbtn_sort_by_age.SetToolTip(_("Sort newest documents to top of tree."))
     48                  self._rbtn_sort_by_age.SetValue(1)
     49                  self._rbtn_sort_by_review.SetToolTip(_("Sort unreviewed documents to top of tree."))
     50                  self._rbtn_sort_by_episode.SetToolTip(_("Sort documents by the episode they belong to."))
     51                  self._rbtn_sort_by_issue.SetToolTip(_("Sort documents by the health issue they belong to."))
     52                  self._rbtn_sort_by_type.SetToolTip(_("Sort documents by their type."))
     53                  self._rbtn_sort_by_org.SetToolTip(_("Sort documents by the organization they are from."))
     54                  self._LCTRL_details.Enable(False)
     55                  self._TCTRL_metainfo.SetFont(wx.Font(8, wx.MODERN, wx.NORMAL, wx.NORMAL, 0, ""))
     56                  # end wxGlade
     57
     58 -        def __do_layout(self):
     59                  # begin wxGlade: wxgSelectablySortedDocTreePnl.__do_layout
     60                  __szr_main = wx.BoxSizer(wx.VERTICAL)
     61                  __szr_bottom = wx.BoxSizer(wx.HORIZONTAL)
     62                  __szr_details = wx.BoxSizer(wx.VERTICAL)
     63                  __szr_top_radio = wx.BoxSizer(wx.HORIZONTAL)
     64                  __lbl_sort = wx.StaticText(self, wx.ID_ANY, _("Sort documents by"))
     65                  __szr_top_radio.Add(__lbl_sort, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.RIGHT, 5)
     66                  __szr_top_radio.Add(self._rbtn_sort_by_age, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 10)
     67                  __szr_top_radio.Add(self._rbtn_sort_by_review, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 10)
     68                  __szr_top_radio.Add(self._rbtn_sort_by_episode, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 10)
     69                  __szr_top_radio.Add(self._rbtn_sort_by_issue, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 10)
     70                  __szr_top_radio.Add(self._rbtn_sort_by_type, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 10)
     71                  __szr_top_radio.Add(self._rbtn_sort_by_org, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 10)
     72                  __szr_main.Add(__szr_top_radio, 0, wx.EXPAND, 0)
     73                  __hline_middle = wx.StaticLine(self, wx.ID_ANY)
     74                  __szr_main.Add(__hline_middle, 0, wx.EXPAND, 0)
     75                  __szr_bottom.Add(self._doc_tree, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
     76                  __szr_details.Add(self._LCTRL_details, 2, wx.EXPAND, 2)
     77                  __szr_details.Add(self._TCTRL_metainfo, 1, wx.EXPAND | wx.TOP, 2)
     78                  __szr_bottom.Add(__szr_details, 1, wx.EXPAND, 0)
     79                  __szr_main.Add(__szr_bottom, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
     80                  self.SetSizer(__szr_main)
     81                  __szr_main.Fit(self)
     82                  self.Layout()
     83                  # end wxGlade
     84
     85 -        def _on_sort_by_age_selected(self, event):  # wxGlade: wxgSelectablySortedDocTreePnl.<event_handler>
     86                  print("Event handler '_on_sort_by_age_selected' not implemented!")
     87                  event.Skip()
     88
     89 -        def _on_sort_by_review_selected(self, event):  # wxGlade: wxgSelectablySortedDocTreePnl.<event_handler>
     90                  print("Event handler '_on_sort_by_review_selected' not implemented!")
     91                  event.Skip()
     92
     93 -        def _on_sort_by_episode_selected(self, event):  # wxGlade: wxgSelectablySortedDocTreePnl.<event_handler>
     94                  print("Event handler '_on_sort_by_episode_selected' not implemented!")
     95                  event.Skip()
     96
     97 -        def _on_sort_by_issue_selected(self, event):  # wxGlade: wxgSelectablySortedDocTreePnl.<event_handler>
     98                  print("Event handler '_on_sort_by_issue_selected' not implemented!")
     99                  event.Skip()
    100
    101 -        def _on_sort_by_type_selected(self, event):  # wxGlade: wxgSelectablySortedDocTreePnl.<event_handler>
    102                  print("Event handler '_on_sort_by_type_selected' not implemented!")
    103                  event.Skip()
    104
    105 -        def _on_sort_by_org_selected(self, event):  # wxGlade: wxgSelectablySortedDocTreePnl.<event_handler>
    106                  print("Event handler '_on_sort_by_org_selected' not implemented!")
    107                  event.Skip()
    108
    109  # end of class wxgSelectablySortedDocTreePnl
    110