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

Source Code for Module Gnumed.wxGladeWidgets.wxgScanIdxPnl

  1  #!/usr/bin/env python 
  2  # -*- coding: ISO-8859-15 -*- 
  3  # generated by wxGlade 0.4cvs on Tue Jul  4 22:55:22 2006 
  4   
  5  import wx 
  6   
7 -class wxgScanIdxPnl(wx.Panel):
8 - def __init__(self, *args, **kwds):
9 10 from Gnumed.wxpython import gmDocumentWidgets, gmPhraseWheel, gmDateTimeInput, gmEMRStructWidgets 11 12 # begin wxGlade: wxgScanIdxPnl.__init__ 13 kwds["style"] = wx.TAB_TRAVERSAL 14 wx.Panel.__init__(self, *args, **kwds) 15 self.__szr_top_middle_staticbox = wx.StaticBox(self, -1, _("Document Properties")) 16 self.__szr_top_right_staticbox = wx.StaticBox(self, -1, _("Parts")) 17 self.__szr_top_left_btns_staticbox = wx.StaticBox(self, -1, _("Part Sources")) 18 self.__btn_scan = wx.Button(self, -1, _("&Scan page(s)")) 19 self.__btn_load = wx.Button(self, -1, _("Pick &file(s)")) 20 self._PhWheel_doc_type = gmDocumentWidgets.cDocumentTypeSelectionPhraseWheel(self, -1) 21 self._PhWheel_doc_date = gmDateTimeInput.cFuzzyTimestampInput(self, -1) 22 self._PhWheel_episode = gmEMRStructWidgets.cEpisodeSelectionPhraseWheel(self, -1) 23 self._PRW_doc_comment = gmDocumentWidgets.cDocumentCommentPhraseWheel(self, -1, "") 24 self.__lbl_reviewer = wx.StaticText(self, -1, _("Intended reviewer:")) 25 self._PhWheel_reviewer = gmPhraseWheel.cPhraseWheel(self, -1) 26 self._ChBOX_reviewed = wx.CheckBox(self, -1, _("&review and sign")) 27 self._ChBOX_abnormal = wx.CheckBox(self, -1, _("&technically abnormal")) 28 self._ChBOX_relevant = wx.CheckBox(self, -1, _("&clinically relevant")) 29 self._LBOX_doc_pages = wx.ListBox(self, -1, choices=[], style=wx.LB_SINGLE|wx.LB_HSCROLL|wx.LB_NEEDED_SB) 30 self.__btn_show_page = wx.Button(self, -1, _("Show part")) 31 self.__btn_del_page = wx.Button(self, -1, _("Remove part")) 32 self._TBOX_description = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE|wx.TE_LINEWRAP|wx.TE_WORDWRAP|wx.NO_BORDER) 33 self.__btn_save = wx.Button(self, -1, _("Save")) 34 self.__btn_discard = wx.Button(self, -1, _("Discard")) 35 36 self.__set_properties() 37 self.__do_layout() 38 39 self.Bind(wx.EVT_BUTTON, self._scan_btn_pressed, self.__btn_scan) 40 self.Bind(wx.EVT_BUTTON, self._load_btn_pressed, self.__btn_load) 41 self.Bind(wx.EVT_CHECKBOX, self._reviewed_box_checked, self._ChBOX_reviewed) 42 self.Bind(wx.EVT_BUTTON, self._show_btn_pressed, self.__btn_show_page) 43 self.Bind(wx.EVT_BUTTON, self._del_btn_pressed, self.__btn_del_page) 44 self.Bind(wx.EVT_BUTTON, self._save_btn_pressed, self.__btn_save) 45 self.Bind(wx.EVT_BUTTON, self._startover_btn_pressed, self.__btn_discard)
46 # end wxGlade 47
48 - def __set_properties(self):
49 # begin wxGlade: wxgScanIdxPnl.__set_properties 50 self.__btn_scan.SetToolTipString(_("Acquire a page from an image source (scanner, camera). This may bring up an intermediate dialog. It uses Sane (Linux) or TWAIN (Windows).")) 51 self.__btn_scan.SetFocus() 52 self.__btn_scan.SetDefault() 53 self.__btn_load.SetToolTipString(_("Add a file from the filesystem as a new part. Shows a file selector dialog.")) 54 self._PhWheel_doc_type.SetToolTipString(_("Required: The type of this document.")) 55 self._PhWheel_doc_date.SetToolTipString(_("The date when the medical information described in the document was produced. This is free text so you can add approximate dates, too, such as 3/2004 where appropriate.")) 56 self._PhWheel_episode.SetToolTipString(_("Required: The primary episode this document is to be listed under.")) 57 self._PRW_doc_comment.SetToolTipString(_("Optional: A short comment identifying the document. Good comments give an idea of the content and source of the document.")) 58 self.__lbl_reviewer.SetForegroundColour(wx.Colour(255, 0, 0)) 59 self._PhWheel_reviewer.SetToolTipString(_("Required: Enter the provider who will be notified about the new document so it can be reviewed. In most cases this is the primary doctor of the patient.")) 60 self._ChBOX_reviewed.SetToolTipString(_("Check this to mark the document as reviewed upon import. If checked you can (and must) decide on \"technically abnormal\" and \"clinically relevant\", too. The default can be set by an option.")) 61 self._ChBOX_abnormal.SetToolTipString(_("Whether this document report technically abormal results.")) 62 self._ChBOX_abnormal.Enable(False) 63 self._ChBOX_relevant.SetToolTipString(_("Whether this document reports clinically relevant results. Note that both normal and abnormal resuslts can be relevant.")) 64 self._ChBOX_relevant.Enable(False) 65 self._LBOX_doc_pages.SetToolTipString(_("This field lists the parts belonging to the current document.")) 66 self.__btn_show_page.SetToolTipString(_("View the part selected in the above list.")) 67 self.__btn_del_page.SetToolTipString(_("Remove the part selected in the above list. Will ask before physical deletion from disk.")) 68 self._TBOX_description.SetToolTipString(_("Optional: A free-text document description.")) 69 self.__btn_save.SetToolTipString(_("Save finished document.")) 70 self.__btn_discard.SetToolTipString(_("Start over (discards current data)."))
71 # end wxGlade 72
73 - def __do_layout(self):
74 # begin wxGlade: wxgScanIdxPnl.__do_layout 75 __szr_main = wx.BoxSizer(wx.VERTICAL) 76 __szr_bottom_third = wx.BoxSizer(wx.HORIZONTAL) 77 __szr_top_third = wx.BoxSizer(wx.HORIZONTAL) 78 __szr_top_right = wx.StaticBoxSizer(self.__szr_top_right_staticbox, wx.VERTICAL) 79 __szr_page_actions = wx.BoxSizer(wx.HORIZONTAL) 80 __szr_top_middle = wx.StaticBoxSizer(self.__szr_top_middle_staticbox, wx.VERTICAL) 81 __szr_top_left_btns = wx.StaticBoxSizer(self.__szr_top_left_btns_staticbox, wx.VERTICAL) 82 __szr_top_left_btns.Add(self.__btn_scan, 0, wx.EXPAND, 0) 83 __szr_top_left_btns.Add(self.__btn_load, 0, wx.EXPAND, 0) 84 __szr_top_third.Add(__szr_top_left_btns, 0, wx.LEFT|wx.EXPAND, 5) 85 __lbl_doc_type = wx.StaticText(self, -1, _("Document type:")) 86 __lbl_doc_type.SetForegroundColour(wx.Colour(255, 0, 0)) 87 __szr_top_middle.Add(__lbl_doc_type, 0, wx.LEFT|wx.TOP|wx.ALIGN_CENTER_VERTICAL, 3) 88 __szr_top_middle.Add(self._PhWheel_doc_type, 0, wx.LEFT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 3) 89 __lbl_doc_date = wx.StaticText(self, -1, _("Date document created:")) 90 __szr_top_middle.Add(__lbl_doc_date, 0, wx.LEFT|wx.TOP|wx.ALIGN_CENTER_VERTICAL, 3) 91 __szr_top_middle.Add(self._PhWheel_doc_date, 0, wx.LEFT|wx.EXPAND, 3) 92 __lbl_doc_episode = wx.StaticText(self, -1, _("Associate to episode:")) 93 __lbl_doc_episode.SetForegroundColour(wx.Colour(255, 0, 0)) 94 __szr_top_middle.Add(__lbl_doc_episode, 0, wx.LEFT|wx.TOP|wx.ALIGN_CENTER_VERTICAL, 3) 95 __szr_top_middle.Add(self._PhWheel_episode, 0, wx.LEFT|wx.EXPAND, 3) 96 __lbl_doc_comment = wx.StaticText(self, -1, _("Comment / Identification:")) 97 __szr_top_middle.Add(__lbl_doc_comment, 0, wx.LEFT|wx.TOP|wx.ALIGN_CENTER_VERTICAL, 3) 98 __szr_top_middle.Add(self._PRW_doc_comment, 0, wx.LEFT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 3) 99 __szr_top_middle.Add(self.__lbl_reviewer, 0, wx.LEFT|wx.TOP|wx.ALIGN_CENTER_VERTICAL, 3) 100 __szr_top_middle.Add(self._PhWheel_reviewer, 0, wx.LEFT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 3) 101 __szr_top_middle.Add(self._ChBOX_reviewed, 0, wx.LEFT|wx.TOP|wx.ALIGN_CENTER_VERTICAL, 3) 102 __szr_top_middle.Add(self._ChBOX_abnormal, 0, wx.LEFT, 9) 103 __szr_top_middle.Add(self._ChBOX_relevant, 0, wx.LEFT, 9) 104 __szr_top_third.Add(__szr_top_middle, 1, wx.LEFT|wx.EXPAND, 5) 105 __szr_top_right.Add(self._LBOX_doc_pages, 1, wx.LEFT|wx.EXPAND, 3) 106 __szr_page_actions.Add(self.__btn_show_page, 0, wx.RIGHT, 5) 107 __szr_page_actions.Add(self.__btn_del_page, 0, 0, 0) 108 __szr_top_right.Add(__szr_page_actions, 0, wx.TOP|wx.EXPAND, 4) 109 __szr_top_third.Add(__szr_top_right, 1, wx.LEFT|wx.EXPAND, 5) 110 __szr_main.Add(__szr_top_third, 0, wx.LEFT|wx.RIGHT|wx.EXPAND, 5) 111 __szr_main.Add(self._TBOX_description, 1, wx.ALL|wx.EXPAND, 5) 112 __szr_bottom_third.Add(self.__btn_save, 0, wx.EXPAND, 0) 113 __szr_bottom_third.Add(self.__btn_discard, 0, wx.EXPAND, 0) 114 __szr_main.Add(__szr_bottom_third, 0, wx.LEFT|wx.BOTTOM|wx.EXPAND, 5) 115 self.SetSizer(__szr_main) 116 __szr_main.Fit(self)
117 # end wxGlade 118
119 - def _scan_btn_pressed(self, event): # wxGlade: wxgScanIdxPnl.<event_handler>
120 print "Event handler `_scan_btn_pressed' not implemented!" 121 event.Skip()
122
123 - def _load_btn_pressed(self, event): # wxGlade: wxgScanIdxPnl.<event_handler>
124 print "Event handler `_load_btn_pressed' not implemented!" 125 event.Skip() 126
127 - def _reviewed_box_checked(self, event): # wxGlade: wxgScanIdxPnl.<event_handler>
128 print "Event handler `_reviewed_box_checked' not implemented!" 129 event.Skip() 130
131 - def _show_btn_pressed(self, event): # wxGlade: wxgScanIdxPnl.<event_handler>
132 print "Event handler `_show_btn_pressed' not implemented!" 133 event.Skip() 134
135 - def _del_btn_pressed(self, event): # wxGlade: wxgScanIdxPnl.<event_handler>
136 print "Event handler `_del_btn_pressed' not implemented!" 137 event.Skip() 138
139 - def _save_btn_pressed(self, event): # wxGlade: wxgScanIdxPnl.<event_handler>
140 print "Event handler `_save_btn_pressed' not implemented!" 141 event.Skip() 142
143 - def _startover_btn_pressed(self, event): # wxGlade: wxgScanIdxPnl.<event_handler>
144 print "Event handler `_startover_btn_pressed' not implemented!" 145 event.Skip() 146 147 # end of class wxgScanIdxPnl 148