1 """GNUmed measurement widgets.
2 """
3
4 __version__ = "$Revision: 0.1 $"
5 __author__ = "Sebastian Hilbert <Sebastian.Hilbert@gmx.net>"
6 __license__ = "GPL"
7
8 import sys, logging, datetime as pyDT, decimal, StringIO
9
10 import wx
11
12 if __name__ == '__main__':
13 sys.path.insert(0, '../../')
14
15 from Gnumed.business import gmPerson
16 from Gnumed.pycommon import gmDispatcher, gmMatchProvider
17 from Gnumed.wxpython import gmRegetMixin, gmGuiHelpers, gmPatSearchWidgets
18 """
19 Now import the Panel that holds your widgets you designed with wxglade
20 adapt the name of the files and panel to match those you define in
21 wxglade
22 """
23 from Gnumed.wxGladeWidgets import wxgExamplePluginPnl
24
25 _log = logging.getLogger('gm.ui')
26 _log.info(__version__)
27
28 -class cExamplePluginPnl(wxgExamplePluginPnl.wxgExamplePluginPnl, gmRegetMixin.cRegetOnPaintMixin):
29 """Panel holding a number of widgets. Used as notebook page."""
35
36
37
39 gmDispatcher.connect(signal = u'pre_patient_selection', receiver = self._on_pre_patient_selection)
40 gmDispatcher.connect(signal = u'post_patient_selection', receiver = self._schedule_data_reget)
41
43 wx.CallAfter(self.__on_pre_patient_selection)
44
47
49 _log.info('repopulate ui')
50 self._populate_with_data()
51
52
53
56
57
58
59
61 """ uncomment the following lines if you need the current patient in your plugin"""
62
63
64
65
66
67
68 self._TCTRL_template.SetValue('you did it!')
69 return True
70
71
72
73 if __name__ == '__main__':
74
75 from Gnumed.pycommon import gmLog2, gmDateTime, gmI18N
76
77 gmI18N.activate_locale()
78 gmI18N.install_domain()
79 gmDateTime.init()
80
82 pass
83
84
85 if (len(sys.argv) > 1) and (sys.argv[1] == 'test'):
86 show_template_pnl()
87