Index: sources/gui/qml/main.qml =================================================================== diff -u -r3229695c1c67de600c095d52c6f99dacfafb462d -rac23b968f565c2beeb153ca2d554b8f868634512 --- sources/gui/qml/main.qml (.../main.qml) (revision 3229695c1c67de600c095d52c6f99dacfafb462d) +++ sources/gui/qml/main.qml (.../main.qml) (revision ac23b968f565c2beeb153ca2d554b8f868634512) @@ -129,6 +129,46 @@ VDisinfectStates { id: vDisinfectStates } VTreatmentBloodFlow { id: vTreatmentBloodFlow } + Item /*VTreatmentVitals*/ /* Test View */ { id: vTreatmentVitals + property int systolic : 0 + property int systolicMin : 60 + property int systolicMax : 250 + property int diastolic : 0 + property int diastolicMin : 40 + property int diastolicMax : 200 + property int heartRate : 0 + property int heartRateMin : 40 + property int heartRateMax : 180 + property int interval : vTreatmentCreate.bloodPressureMeasureInterval + property string lastRead : "none" + property string notificationText: + qsTr("Interval:") + " " + (interval ? (interval + qsTr("min")):qsTr("off")) + + " , " + + qsTr("Last Read:") + " " + lastRead + + signal didTimeout() + + Timer { id: _timer + interval: vTreatmentVitals.interval * 60000 // to minuts + onTriggered: vTreatmentVitals.didTimeout() + } + onIntervalChanged: if (interval) _timer.start() + + function doConfirm(vSystolic, vDiastolic, vHeartReate) { + let currentDateTime = new Date() + systolic = vSystolic + diastolic = vDiastolic + heartRate = vHeartReate + lastRead = currentDateTime.toLocaleString(Qt.locale(), "yyyy/MMM/dd , HH:mm") + console.debug(vSystolic, vDiastolic, vHeartReate) + } + + function doRead(vSystolic, vDiastolic, vHeartReate) { + // simulated BLE read + doConfirm(vSystolic, vDiastolic, vHeartReate) + } + } + VTreatmentDialysateFlow { id: vTreatmentDialysateFlow } VTreatmentPressureOcclusion { id: vTreatmentPressureOcclusion } VTreatmentUltrafiltration { id: vTreatmentUltrafiltration }