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

# Source Code for Module Gnumed.wxGladeWidgets.wxgSplittedEMRTreeBrowserPnl

      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 wxgSplittedEMRTreeBrowserPnl(wx.Panel):
     17 -        def __init__(self, *args, **kwds):
     18                  # begin wxGlade: wxgSplittedEMRTreeBrowserPnl.__init__
     19                  kwds["style"] = kwds.get("style", 0) | wx.TAB_TRAVERSAL
     20                  wx.Panel.__init__(self, *args, **kwds)
     21                  self._splitter_browser = wx.SplitterWindow(self, wx.ID_ANY, style=wx.SP_3D | wx.SP_BORDER)
     22                  self.__pnl_left_side = wx.Panel(self._splitter_browser, wx.ID_ANY, style=wx.BORDER_NONE | wx.TAB_TRAVERSAL)
     23                  from Gnumed.wxpython.gmEMRBrowser import cScrolledEMRTreePnl
     24                  self._pnl_emr_tree = cScrolledEMRTreePnl(self.__pnl_left_side, wx.ID_ANY, style=wx.BORDER_NONE | wx.TAB_TRAVERSAL)
     25                  self._PNL_right_side = wx.Panel(self._splitter_browser, wx.ID_ANY, style=wx.BORDER_NONE)
     26                  self._RBTN_details = wx.RadioButton(self._PNL_right_side, wx.ID_ANY, _("S&ynopsis"))
     27                  self._RBTN_journal = wx.RadioButton(self._PNL_right_side, wx.ID_ANY, _("&Journal"))
     28                  self._RBTN_revisions = wx.RadioButton(self._PNL_right_side, wx.ID_ANY, _("Revisions"))
     29                  self._BTN_switch_browse_edit = wx.Button(self._PNL_right_side, wx.ID_ANY, _("&Edit"), style=wx.BU_EXACTFIT)
     30                  self._PNL_browse = wx.Panel(self._PNL_right_side, wx.ID_ANY, style=wx.BORDER_NONE | wx.TAB_TRAVERSAL)
     31                  self._TCTRL_item_details = wx.TextCtrl(self._PNL_browse, wx.ID_ANY, "", style=wx.HSCROLL | wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_WORDWRAP)
     32                  from Gnumed.wxpython.gmVisualProgressNoteWidgets import cVisualSoapPresenterPnl
     33                  self._PNL_visual_soap = cVisualSoapPresenterPnl(self._PNL_browse, wx.ID_ANY, style=wx.BORDER_NONE)
     34                  from Gnumed.wxpython.gmNarrativeWidgets import cFancySoapEditorPnl
     35                  self._PNL_edit = cFancySoapEditorPnl(self._PNL_right_side, wx.ID_ANY, style=wx.BORDER_NONE | wx.TAB_TRAVERSAL)
     36
     37                  self.__set_properties()
     38                  self.__do_layout()
     39
     40                  self.Bind(wx.EVT_RADIOBUTTON, self._on_show_details_selected, self._RBTN_details)
     41                  self.Bind(wx.EVT_RADIOBUTTON, self._on_show_journal_selected, self._RBTN_journal)
     42                  self.Bind(wx.EVT_RADIOBUTTON, self._on_show_revisions_selected, self._RBTN_revisions)
     43                  self.Bind(wx.EVT_BUTTON, self._on_switch_browse_edit_button_pressed, self._BTN_switch_browse_edit)
     44                  # end wxGlade
     45
     46 -        def __set_properties(self):
     47                  # begin wxGlade: wxgSplittedEMRTreeBrowserPnl.__set_properties
     48                  self._pnl_emr_tree.SetScrollRate(10, 10)
     49                  self._RBTN_details.SetToolTip(_("Show succinct item synopsis."))
     50                  self._RBTN_details.SetValue(1)
     51                  self._RBTN_journal.SetToolTip(_("Show item journal."))
     52                  self._RBTN_revisions.SetToolTip(_("Show item revisions."))
     53                  self._BTN_switch_browse_edit.SetToolTip(_("Press this button to switch back and forth between browsing and entering SOAP notes."))
     54                  self._PNL_edit.Hide()
     55                  self._splitter_browser.SetMinimumPaneSize(20)
     56                  # end wxGlade
     57
     58 -        def __do_layout(self):
     59                  # begin wxGlade: wxgSplittedEMRTreeBrowserPnl.__do_layout
     60                  __szr_main = wx.BoxSizer(wx.HORIZONTAL)
     61                  __szr_right_side = wx.BoxSizer(wx.VERTICAL)
     62                  __szr_browse = wx.BoxSizer(wx.VERTICAL)
     63                  __szr_item_details_options = wx.BoxSizer(wx.HORIZONTAL)
     64                  __szr_left_side = wx.BoxSizer(wx.VERTICAL)
     65                  __szr_left_side.Add(self._pnl_emr_tree, 1, wx.EXPAND, 0)
     66                  self.__pnl_left_side.SetSizer(__szr_left_side)
     67                  __lbl_show_mode = wx.StaticText(self._PNL_right_side, wx.ID_ANY, _("Show:"))
     68                  __szr_item_details_options.Add(__lbl_show_mode, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
     69                  __szr_item_details_options.Add(self._RBTN_details, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
     70                  __szr_item_details_options.Add(self._RBTN_journal, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
     71                  __szr_item_details_options.Add(self._RBTN_revisions, 0, wx.ALIGN_CENTER_VERTICAL, 5)
     72                  __szr_item_details_options.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
     73                  __szr_item_details_options.Add(self._BTN_switch_browse_edit, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     74                  __szr_right_side.Add(__szr_item_details_options, 0, wx.EXPAND, 0)
     75                  __szr_browse.Add(self._TCTRL_item_details, 1, wx.EXPAND | wx.TOP, 3)
     76                  __szr_browse.Add(self._PNL_visual_soap, 0, wx.EXPAND, 0)
     77                  self._PNL_browse.SetSizer(__szr_browse)
     78                  __szr_right_side.Add(self._PNL_browse, 1, wx.EXPAND, 0)
     79                  __szr_right_side.Add(self._PNL_edit, 1, wx.EXPAND, 0)
     80                  self._PNL_right_side.SetSizer(__szr_right_side)
     81                  self._splitter_browser.SplitVertically(self.__pnl_left_side, self._PNL_right_side)
     82                  __szr_main.Add(self._splitter_browser, 1, wx.EXPAND, 0)
     83                  self.SetSizer(__szr_main)
     84                  __szr_main.Fit(self)
     85                  self.Layout()
     86                  # end wxGlade
     87
     88 -        def _on_show_details_selected(self, event):  # wxGlade: wxgSplittedEMRTreeBrowserPnl.<event_handler>
     89                  print("Event handler '_on_show_details_selected' not implemented!")
     90                  event.Skip()
     91
     92 -        def _on_show_journal_selected(self, event):  # wxGlade: wxgSplittedEMRTreeBrowserPnl.<event_handler>
     93                  print("Event handler '_on_show_journal_selected' not implemented!")
     94                  event.Skip()
     95
     96 -        def _on_show_revisions_selected(self, event):  # wxGlade: wxgSplittedEMRTreeBrowserPnl.<event_handler>
     97                  print("Event handler '_on_show_revisions_selected' not implemented!")
     98                  event.Skip()
     99
    100 -        def _on_switch_browse_edit_button_pressed(self, event):  # wxGlade: wxgSplittedEMRTreeBrowserPnl.<event_handler>
    101                  print("Event handler '_on_switch_browse_edit_button_pressed' not implemented!")
    102                  event.Skip()
    103
    104  # end of class wxgSplittedEMRTreeBrowserPnl
    105