예제 #1
0
def main():
	app = QApplication(sys.argv)
	heartRateIDs = (int("16C0",16),int("0483",16))
	bloodPressureIDs = (000,000)
	sensorIcon = SensorIcon.SensorIcon(heartRateIDs,bloodPressureIDs)
	weightScale = WeightScale.WeightScale()	
	nurse1 = nurse.Nurse()
	patient1 = patient.Patient()
	visit1 = Visit.Visit()
	symptom1 = symptom.Symptom()
	symptomList = SympList()
	view = Courier()
	view.rootContext().setContextProperty('symptom', symptom)
	view.rootContext().setContextProperty('patient', patient1)
	view.rootContext().setContextProperty('nurse', nurse1) #this needs to happen before setsource or errors get thrown
	view.rootContext().setContextProperty('visit', visit1)
	view.rootContext().setContextProperty('sensorIcon',sensorIcon)
	view.rootContext().setContextProperty('weightScale',weightScale)	
	patientList = dbTools.get_all_patients()
	patients = PatList(patientList)
	view.rootContext().setContextProperty('patientListModel', patients)
	view.setSource('QML/main.qml')
	view.show()
	app.exec_()
	sensorIcon._set_running(False)
	sys.exit()
예제 #2
0
	def update(self):
		self._patients = dbTools.get_all_patients()