Index: leahi.qrc
===================================================================
diff -u -r85a447e435dc30e3a6f6c8a41d30d26467548be0 -rd3c42a4b5e5858503ac3102b9b1bfeab81235762
--- leahi.qrc (.../leahi.qrc) (revision 85a447e435dc30e3a6f6c8a41d30d26467548be0)
+++ leahi.qrc (.../leahi.qrc) (revision d3c42a4b5e5858503ac3102b9b1bfeab81235762)
@@ -164,7 +164,6 @@
sources/gui/qml/components/HeaderBar.qml
sources/gui/qml/components/HeaderBarPopup.qml
sources/gui/qml/components/AlarmButtonRow.qml
- sources/gui/qml/components/NumPad.qml
sources/gui/qml/compounds/PressureRangeSlider.qml
@@ -173,6 +172,7 @@
sources/gui/qml/compounds/CheckListView.qml
sources/gui/qml/compounds/TouchGrid.qml
sources/gui/qml/compounds/BPHREntry.qml
+ sources/gui/qml/compounds/NumPad.qml
qtquickcontrols2.conf
Index: sources/gui/qml/components/ModalDialog.qml
===================================================================
diff -u -ree27c59d21daf9ad067d3cb5327fadd7c73b9838 -rd3c42a4b5e5858503ac3102b9b1bfeab81235762
--- sources/gui/qml/components/ModalDialog.qml (.../ModalDialog.qml) (revision ee27c59d21daf9ad067d3cb5327fadd7c73b9838)
+++ sources/gui/qml/components/ModalDialog.qml (.../ModalDialog.qml) (revision d3c42a4b5e5858503ac3102b9b1bfeab81235762)
@@ -21,7 +21,7 @@
// Project
// Qml imports
import "qrc:/globals"
-import "qrc:/components"
+import "qrc:/compounds"
/*!
* \brief The parent item for modal dialogs
Fisheye: Tag d3c42a4b5e5858503ac3102b9b1bfeab81235762 refers to a dead (removed) revision in file `sources/gui/qml/components/NumPad.qml'.
Fisheye: No comparison available. Pass `N' to diff?
Index: sources/gui/qml/compounds/NumPad.qml
===================================================================
diff -u
--- sources/gui/qml/compounds/NumPad.qml (revision 0)
+++ sources/gui/qml/compounds/NumPad.qml (revision d3c42a4b5e5858503ac3102b9b1bfeab81235762)
@@ -0,0 +1,249 @@
+/*!
+ *
+ * Copyright (c) 2020-2025 Diality Inc. - All Rights Reserved.
+ * \copyright
+ * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN
+ * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER.
+ *
+ * \file NumPad.qml
+ * \author (last) Nico Ramirez
+ * \date (last) 28-Aug-2025
+ * \author (original) Nico Ramirez
+ * \date (original) 28-Aug-2025
+ *
+ */
+
+import QtQuick 2.12
+import QtQuick.Controls 2.12
+import QtGraphicalEffects 1.12
+
+import "qrc:/components"
+import "qrc:/globals"
+
+Rectangle { id: _root
+ property var settingValue : undefined
+ property alias unit : _unitText.text
+ property alias range : _range.text
+ property alias title : _title.text
+
+ property alias displayValue : _valueLabel.text
+ property int precision : 0
+ property var getter : null
+ property var setter : null
+ property var validator : null
+ readonly property bool isValueValid : validator ? validator(valueInt) : true
+ readonly property var valueInt : isNaN(parseInt(_valueLabel.text)) ? undefined : parseInt(_valueLabel.text)
+ readonly property string backSpace : "qrc:/images/iBackspace"
+ property bool isOpened : false
+
+ width : 450
+ height : 500
+ visible : false
+ radius : 9
+ color : Colors.backgroundMain
+ x : Math.round((Variables.applicationWidth - _root.width) / 2)
+ y : Math.round((Variables.applicationHeight - _root.height) / 2)
+
+ onVisibleChanged : if ( ! _root.visible ) { reset() }
+ onDisplayValueChanged : if ( _root.setter ) { _root.setter( _valueLabel.text ) }
+ onSettingValueChanged : _valueLabel.text = _root.settingValue !== undefined ? _root.settingValue : ""
+
+ signal cancel()
+
+ // slide animation
+ Behavior on x { NumberAnimation { duration: Variables.keybardAnimationDuration } }
+
+ function open(entry, title, min, max, unit) {
+ reset()
+ _root.settingValue = Qt.binding(function () { return entry.text })
+ _root.title = title
+ _root.unit = unit
+ _root.range = min.isEmpty &&
+ max.isEmpty ? "" : ("%1 %2 - %3") .arg(qsTr("Range:"))
+ .arg(min)
+ .arg(max)
+ _root.getter = entry.text
+ _root.setter = function (value) { entry.text = value }
+ _root.validator = function (value) { { return value >= min && value <= max } }
+ _keyboard.setVisible(false)
+ show()
+ }
+
+ function show() {
+ if ( ! _root.visible ) { _root.visible = true }
+ if ( ! isOpened ) {
+ x = x + _root.width
+ isOpened = true
+ }
+ }
+
+ function hide() {
+ if ( isOpened ) {
+ x = x - _root.width
+ isOpened = false
+ }
+ else if ( _root.visible ) { _root.visible = false }
+ }
+
+ function reset() {
+ _numPadGrid.replaceValueText = true
+ _root.getter = null
+ _root.setter = null
+ _root.displayValue = ""
+ }
+
+ TouchRect { id : _sliderButton
+ anchors {
+ verticalCenter : parent.verticalCenter
+ left : parent.right
+ leftMargin : height / 2 * -1
+ }
+ z : -1
+ height : 80
+ width : height
+ radius : height
+ border.color : Colors.transparent
+ backgroundColor : "#455B78"
+ onPressed : isOpened ? hide() : show()
+
+ Image { id : _iconImage
+ anchors {
+ verticalCenter : parent.verticalCenter
+ right : parent.right
+ rightMargin : 10
+ }
+ height : 30
+ width : 30
+ fillMode: Image.PreserveAspectFit
+ source : isOpened ? "qrc:/images/iChevronLeft" :
+ "qrc:/images/iChevronRight"
+ }
+ }
+
+ Text { id: _title
+ anchors {
+ top : _root.top
+ topMargin : 10
+ horizontalCenter: _root.horizontalCenter
+ }
+ font {
+ pixelSize : 26
+ weight : Font.Medium
+ }
+ color : "white"
+ }
+
+ Text { id: _range
+ anchors {
+ top : _title.bottom
+ topMargin : 10
+ horizontalCenter: parent.horizontalCenter
+ }
+ font {
+ pixelSize : 20
+ weight : Font.Medium
+ }
+ color : "#E0CDA9"
+ }
+
+ Rectangle { id: _numRect
+ anchors {
+ top : _root.top
+ topMargin : Variables.defaultMargin * 4.5
+ horizontalCenter: _root.horizontalCenter
+ }
+ width : 300
+ height : 75
+ radius : 10
+ color : "#324867"
+
+ Text { id: _valueLabel
+ anchors.centerIn: parent
+ font {
+ pixelSize : 65
+ weight : Font.DemiBold
+ }
+ color : isValueValid ? "white" : "gray"
+ text : ""
+ }
+ }
+
+ Rectangle {
+ anchors {
+ top : _root.top
+ bottom : _root.bottom
+ right : _root.left
+ rightMargin : -10
+ }
+ width : 20
+ color : _root.color
+ }
+
+ Text { id: _unitText
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ top : _numRect.bottom
+ topMargin : 5
+ }
+ font.pixelSize : 18
+ color : "white"
+ }
+
+ Grid { id: _numPadGrid
+ anchors {
+ left : _root.left
+ right : _root.right
+ bottom : _root.bottom
+ margins : _numRect.visible ? 20 : 70
+ }
+ columns : 3
+ columnSpacing : 2
+ rows : 4
+ rowSpacing : 2
+ height : 275
+
+ property bool replaceValueText: true
+ property int cellWidth : _numPadGrid.width / columns
+ property int cellHeight : _numPadGrid.height / rows
+
+ Repeater {
+ model: [ "7", "8", "9",
+ "4", "5", "6",
+ "1", "2", "3",
+ ".", "0", backSpace ]
+
+ delegate: Button { id: _keyButton
+ width : _numPadGrid.cellWidth
+ height : _numPadGrid.cellHeight
+ palette.buttonText : enabled ? "white" : "dimgrey"
+ text : modelData === backSpace ? "" : modelData
+ icon.source : modelData === backSpace ? modelData : ""
+ icon.width : 40
+ icon.height : 40
+ enabled : modelData === "." ? precision > 0 : true
+ font.pixelSize : 30
+ background: Rectangle { id: _keyBackground
+ color : _keyButton.pressed ? Colors.backgroundButtonSelectDark :
+ modelData === backSpace ? Qt.darker ("#263B57", 1.05) :
+ "#263B57"
+ }
+
+ onPressed: {
+ if (modelData === backSpace ) {
+ _numPadGrid.replaceValueText = false
+ _valueLabel.text = _valueLabel.text.substr(0, _valueLabel.text.length - 1)
+ }
+ else {
+ if (_numPadGrid.replaceValueText) {
+ _valueLabel.text = _keyButton.text
+ _numPadGrid.replaceValueText = false
+ }
+ else if (_valueLabel.text.length < 3) {
+ _valueLabel.text += _keyButton.text
+ }
+ }
+ }
+ }
+ }
+ }
+}
Index: sources/model/td/data/treatment/MTreatmentVitalsData.h
===================================================================
diff -u -r21ce57716379c74355e4d268097b1b44bb59170c -rd3c42a4b5e5858503ac3102b9b1bfeab81235762
--- sources/model/td/data/treatment/MTreatmentVitalsData.h (.../MTreatmentVitalsData.h) (revision 21ce57716379c74355e4d268097b1b44bb59170c)
+++ sources/model/td/data/treatment/MTreatmentVitalsData.h (.../MTreatmentVitalsData.h) (revision d3c42a4b5e5858503ac3102b9b1bfeab81235762)
@@ -32,7 +32,7 @@
* | ||
* | #1:(U32) | \ref Data::mSystolic |
* | #2:(U32) | \ref Data::mDiastolic |
- * | #3:(U32) | \ref Data::mHearRate |
+ * | #3:(U32) | \ref Data::mHeartRate |
*
* \sa Data
* \sa MAdjustVitalsReq: Vitals Request