Index: sources/gui/qml/compounds/BPHREntry.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -rc1d0546e2d1a51ff919b2172ce647003359f0853 --- sources/gui/qml/compounds/BPHREntry.qml (.../BPHREntry.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/compounds/BPHREntry.qml (.../BPHREntry.qml) (revision c1d0546e2d1a51ff919b2172ce647003359f0853) @@ -46,40 +46,45 @@ && _heartRate .isValid && _private.isBloodPressureCompareValid - signal clicked() - width : _container.width height : _container.height function setFocus(vShowKeyboard) { if(vShowKeyboard) { firstInput.textInput.forceActiveFocus() - _keyboard.setVisible(true) + _keyboard.setVisible(false) + numPad.show() } } QtObject { id: _private property bool isBloodPressureCompareValid : (parseInt(_bloodPressureDiastolic.text) <= parseInt(_bloodPressureSystolic.text)) } - anchors.horizontalCenter: parent.horizontalCenter - y : Qt.inputMethod.visible && _keyboard.visible ? _root.topMarginContent : ( ( _root.contentRectHeight - _container.height ) / 2 ) - Behavior on y { NumberAnimation { duration: Variables.keybardAnimationDuration } } + anchors.fill: parent Row { id: _container spacing: 50 anchors.centerIn: parent - Column { spacing : 25 + Column { + spacing : 25 leftPadding : _root.titleIndent - Row { spacing : 10 + Row { + spacing : 10 TextEntry { id : _bloodPressureSystolic text : Variables.notSetVariable(vTreatmentVitals.systolic, 0) label.text : qsTr("Blood Pressure") label.width : _root.labelWidth validator : IntValidator { bottom: vTreatmentVitals.systolicMin; top : vTreatmentVitals.systolicMax } - onClicked : _root.clicked() nextInput : _bloodPressureDiastolic textInput.color: (textInput.acceptableInput && _private.isBloodPressureCompareValid) ? Colors.textMain : Colors.red + useQtNumPad : false + + onClicked : numPad.open ( _bloodPressureSystolic, + qsTr("Systolic"), + vTreatmentVitals.systolicMin, + vTreatmentVitals.systolicMax, + Variables.unitTextBloodPressure) } Label { text : "/" @@ -89,25 +94,40 @@ text : Variables.notSetVariable(vTreatmentVitals.diastolic, 0) label.width : 0 validator : IntValidator { bottom: vTreatmentVitals.diastolicMin; top : vTreatmentVitals.diastolicMax } - onClicked : _root.clicked() nextInput : _heartRate textInput.color: (textInput.acceptableInput && _private.isBloodPressureCompareValid) ? Colors.textMain : Colors.red + useQtNumPad : false + + onClicked : numPad.open ( _bloodPressureDiastolic, + qsTr("Diastolic"), + vTreatmentVitals.diastolicMin, + _bloodPressureSystolic.textInput.acceptableInput && + _bloodPressureSystolic.text < vTreatmentVitals.diastolicMax ? _bloodPressureSystolic.text : + vTreatmentVitals.diastolicMax, + Variables.unitTextBloodPressure) } Label { - text : qsTr("mmHg") + text : Variables.unitTextBloodPressure width : unitWidth } } - Row { spacing : 10 + Row { + spacing : 10 TextEntry { id : _heartRate text : Variables.notSetVariable(vTreatmentVitals.heartRate, 0) label.text : qsTr("Heart Rate") label.width : _root.labelWidth - onClicked : _root.clicked() validator : IntValidator { bottom: vTreatmentVitals.heartRateMin; top : vTreatmentVitals.heartRateMax } + useQtNumPad : false + + onClicked : numPad.open ( _heartRate, + qsTr("Heart Rate"), + vTreatmentVitals.heartRateMin, + vTreatmentVitals.heartRateMax, + Variables.unitTextHeartBeat) } Label { - text : qsTr("BPM") + text : Variables.unitTextHeartBeat width : unitWidth } }