Gnumed.wxGladeWidgets.wxgSimpleSoapPluginPnl

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

# Source Code for Module Gnumed.wxGladeWidgets.wxgSimpleSoapPluginPnl

      1  #!/usr/bin/env python
      2  # -*- coding: utf-8 -*-
      3  # generated by wxGlade 0.6.4 from "/home/ncq/Projekte/gm-git/gnumed/gnumed/client/wxg/wxgSimpleSoapPluginPnl.wxg"
      4
      5  import wx
      6
      7  # begin wxGlade: extracode
      8  # end wxGlade
      9
     10
     11 -class wxgSimpleSoapPluginPnl(wx.ScrolledWindow):
     12 -    def __init__(self, *args, **kwds):
     13
     14          from Gnumed.wxpython.gmListWidgets import cReportListCtrl
     15          from Gnumed.wxpython.gmTextCtrl import cTextCtrl
     16
     17          # begin wxGlade: wxgSimpleSoapPluginPnl.__init__
     18          kwds["style"] = wx.NO_BORDER | wx.TAB_TRAVERSAL
     19          wx.ScrolledWindow.__init__(self, *args, **kwds)
     20          self._splitter_main = wx.SplitterWindow(self, -1, style=wx.SP_3D | wx.SP_BORDER)
     21          self.__pnl_left = wx.Panel(self._splitter_main, -1, style=wx.NO_BORDER | wx.TAB_TRAVERSAL)
     22          self._LCTRL_problems = cReportListCtrl(self.__pnl_left, -1, style=wx.LC_REPORT | wx.LC_NO_HEADER | wx.LC_SINGLE_SEL | wx.NO_BORDER)
     23          self._BTN_add_problem = wx.Button(self.__pnl_left, -1, _("&Add"), style=wx.BU_EXACTFIT)
     24          self._BTN_edit_problem = wx.Button(self.__pnl_left, -1, _("&Edit"), style=wx.BU_EXACTFIT)
     25          self._BTN_delete_problem = wx.Button(self.__pnl_left, -1, _("&Delete"), style=wx.BU_EXACTFIT)
     26          self._TCTRL_soap_problem = wx.TextCtrl(self.__pnl_left, -1, _("<above, double-click problem to start entering SOAP note>"), style=wx.TE_READONLY | wx.NO_BORDER)
     27          self._TCTRL_soap = cTextCtrl(self.__pnl_left, -1, "", style=wx.TE_MULTILINE | wx.TE_WORDWRAP | wx.NO_BORDER)
     28          self._BTN_save_soap = wx.Button(self.__pnl_left, -1, _("&Save"), style=wx.BU_EXACTFIT)
     29          self._BTN_clear_soap = wx.Button(self.__pnl_left, -1, _("&Clear"), style=wx.BU_EXACTFIT)
     30          self.__pnl_right = wx.Panel(self._splitter_main, -1, style=wx.NO_BORDER | wx.TAB_TRAVERSAL)
     31          self._CHBOX_filter_by_problem = wx.CheckBox(self.__pnl_right, -1, _("&Filter by problem"))
     32          self._TCTRL_journal = wx.TextCtrl(self.__pnl_right, -1, "", style=wx.TE_MULTILINE | wx.TE_READONLY | wx.NO_BORDER)
     33
     34          self.__set_properties()
     35          self.__do_layout()
     36
     37          self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_list_item_selected, self._LCTRL_problems)
     38          self.Bind(wx.EVT_BUTTON, self._on_add_problem_button_pressed, self._BTN_add_problem)
     39          self.Bind(wx.EVT_BUTTON, self._on_edit_problem_button_pressed, self._BTN_edit_problem)
     40          self.Bind(wx.EVT_BUTTON, self._on_delete_problem_button_pressed, self._BTN_delete_problem)
     41          self.Bind(wx.EVT_BUTTON, self._on_save_soap_button_pressed, self._BTN_save_soap)
     42          self.Bind(wx.EVT_BUTTON, self._on_clear_soap_button_pressed, self._BTN_clear_soap)
     43          self.Bind(wx.EVT_CHECKBOX, self._on_filter_by_problem_checked, self._CHBOX_filter_by_problem)
     44          # end wxGlade
     45
     46 -    def __set_properties(self):
     47          # begin wxGlade: wxgSimpleSoapPluginPnl.__set_properties
     48          self.SetScrollRate(10, 10)
     49          self._BTN_add_problem.SetToolTipString(_("Add a problem to the problem list."))
     50          self._BTN_edit_problem.SetToolTipString(_("Edit the selected problem."))
     51          self._BTN_delete_problem.SetToolTipString(_("Delete the selected problem (only possible as long as there are no SOAP notes for it)."))
     52          self._TCTRL_soap_problem.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
     53          self._TCTRL_soap_problem.SetFont(wx.Font(8, wx.DEFAULT, wx.ITALIC, wx.NORMAL, 0, ""))
     54          self._TCTRL_soap.SetToolTipString(_("Enter your SOAP note here."))
     55          self._BTN_save_soap.SetToolTipString(_("Save the current SOAP note."))
     56          self._BTN_clear_soap.SetToolTipString(_("Clear the SOAP note."))
     57          self._CHBOX_filter_by_problem.SetToolTipString(_("Check this if you want to filter the journal by the problem selected on the left."))
     58          self._CHBOX_filter_by_problem.SetValue(1)
     59          self._TCTRL_journal.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
     60          # end wxGlade
     61
     62 -    def __do_layout(self):
     63          # begin wxGlade: wxgSimpleSoapPluginPnl.__do_layout
     64          __szr_main = wx.BoxSizer(wx.VERTICAL)
     65          __szr_right = wx.BoxSizer(wx.VERTICAL)
     66          __szr_right_top = wx.BoxSizer(wx.HORIZONTAL)
     67          __szr_left = wx.BoxSizer(wx.VERTICAL)
     68          __szr_left_bottom_buttons = wx.BoxSizer(wx.HORIZONTAL)
     69          __szr_left_middle_buttons = wx.BoxSizer(wx.HORIZONTAL)
     70          __szr_left.Add(self._LCTRL_problems, 2, wx.RIGHT | wx.BOTTOM | wx.EXPAND, 2)
     71          __szr_left_middle_buttons.Add((20, 20), 1, wx.EXPAND, 0)
     72          __szr_left_middle_buttons.Add(self._BTN_add_problem, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
     73          __szr_left_middle_buttons.Add(self._BTN_edit_problem, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
     74          __szr_left_middle_buttons.Add(self._BTN_delete_problem, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     75          __szr_left_middle_buttons.Add((20, 20), 1, wx.EXPAND, 0)
     76          __szr_left.Add(__szr_left_middle_buttons, 0, wx.RIGHT | wx.BOTTOM | wx.EXPAND, 2)
     77          __szr_left.Add(self._TCTRL_soap_problem, 0, wx.RIGHT | wx.BOTTOM | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 2)
     78          __szr_left.Add(self._TCTRL_soap, 3, wx.RIGHT | wx.BOTTOM | wx.EXPAND, 2)
     79          __szr_left_bottom_buttons.Add((20, 20), 1, wx.EXPAND, 0)
     80          __szr_left_bottom_buttons.Add(self._BTN_save_soap, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
     81          __szr_left_bottom_buttons.Add(self._BTN_clear_soap, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     82          __szr_left_bottom_buttons.Add((20, 20), 1, wx.EXPAND, 0)
     83          __szr_left.Add(__szr_left_bottom_buttons, 0, wx.RIGHT | wx.EXPAND, 2)
     84          self.__pnl_left.SetSizer(__szr_left)
     85          __szr_right_top.Add(self._CHBOX_filter_by_problem, 1, wx.ALIGN_CENTER_VERTICAL, 0)
     86          __szr_right.Add(__szr_right_top, 0, wx.LEFT | wx.BOTTOM | wx.EXPAND, 2)
     87          __szr_right.Add(self._TCTRL_journal, 1, wx.LEFT | wx.BOTTOM | wx.EXPAND, 2)
     88          self.__pnl_right.SetSizer(__szr_right)
     89          self._splitter_main.SplitVertically(self.__pnl_left, self.__pnl_right)
     90          __szr_main.Add(self._splitter_main, 1, wx.ALL | wx.EXPAND, 2)
     91          self.SetSizer(__szr_main)
     92          __szr_main.Fit(self)
     93          # end wxGlade
     94
     95 -    def _on_add_problem_button_pressed(self, event):  # wxGlade: wxgSimpleSoapPluginPnl.<event_handler>
     96          print "Event handler `_on_add_problem_button_pressed' not implemented!"
     97          event.Skip()
     98
     99 -    def _on_edit_problem_button_pressed(self, event):  # wxGlade: wxgSimpleSoapPluginPnl.<event_handler>
    100          print "Event handler `_on_edit_problem_button_pressed' not implemented!"
    101          event.Skip()
    102
    103 -    def _on_save_soap_button_pressed(self, event):  # wxGlade: wxgSimpleSoapPluginPnl.<event_handler>
    104          print "Event handler `_on_save_soap_button_pressed' not implemented!"
    105          event.Skip()
    106
    107 -    def _on_clear_soap_button_pressed(self, event):  # wxGlade: wxgSimpleSoapPluginPnl.<event_handler>
    108          print "Event handler `_on_clear_soap_button_pressed' not implemented!"
    109          event.Skip()
    110
    111 -    def _on_filter_by_problem_checked(self, event):  # wxGlade: wxgSimpleSoapPluginPnl.<event_handler>
    112          print "Event handler `_on_filter_by_problem_checked' not implemented!"
    113          event.Skip()
    114
    115 -    def _on_list_item_selected(self, event):  # wxGlade: wxgSimpleSoapPluginPnl.<event_handler>
    116          print "Event handler `_on_list_item_selected' not implemented"
    117          event.Skip()
    118
    119 -    def _on_delete_problem_button_pressed(self, event):  # wxGlade: wxgSimpleSoapPluginPnl.<event_handler>
    120          print "Event handler `_on_delete_problem_button_pressed' not implemented"
    121          event.Skip()
    122
    123  # end of class wxgSimpleSoapPluginPnl
    124