Exemplo n.º 1
0
	def GetWidget (self, parent):
		#Sets up the GUI by instanciating the file containing the widget that make up the layout in the plugin
		self._widget = gmExamplePluginWidgets.cExamplePluginPnl(parent, -1)
		return self._widget
Exemplo n.º 2
0
	def GetWidget (self, parent):
		#Sets up the GUI by instanciating the file containing the widget that make up the layout in the plugin
		self._widget = gmExamplePluginWidgets.cExamplePluginPnl(parent, -1)
		return self._widget
Exemplo n.º 3
0
if __name__ == '__main__':

	# GNUmed
	from Gnumed.business import gmPersonSearch
	from Gnumed.wxpython import gmPatSearchWidgets

	_log.info("starting template plugin...")

	# obtain patient
	patient = gmPersonSearch.ask_for_patient()
	if patient is None:
		print "None patient. Exiting gracefully..."
		sys.exit(0)
	gmPatSearchWidgets.set_active_patient(patient=patient)

	# display the plugin standalone
	application = wx.wx.PyWidgetTester(size = (800,600))
	widgets = gmExamplePluginWidgets.cExamplePluginPnl(application.frame, -1)

	application.frame.Show(True)
	application.MainLoop()

	# clean up
	if patient is not None:
		try:
			patient.cleanup()
		except Exception:
			print "error cleaning up patient"

	_log.info("closing example plugin...")
Exemplo n.º 4
0
	from Gnumed.business import gmPersonSearch
	from Gnumed.wxpython import gmPatSearchWidgets

	_log.info("starting template plugin...")

	try:
		# obtain patient
		patient = gmPersonSearch.ask_for_patient()
		if patient is None:
			print "None patient. Exiting gracefully..."
			sys.exit(0)
		gmPatSearchWidgets.set_active_patient(patient=patient)

		# display the plugin standalone
		application = wx.wx.PyWidgetTester(size = (800,600))
		widgets = gmExamplePluginWidgets.cExamplePluginPnl(application.frame, -1)

		application.frame.Show(True)
		application.MainLoop()

		# clean up
		if patient is not None:
			try:
				patient.cleanup()
			except:
				print "error cleaning up patient"
	except Exception:
		_log.exception("unhandled exception caught !")
		# but re-raise them
		raise