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