Index: denali.pro.user =================================================================== diff -u -r3a23968a5d2584f5cd036402064284295c9d46a1 -r4f572cf1b77d6188ed9bd859f6767b0daab159b3 --- denali.pro.user (.../denali.pro.user) (revision 3a23968a5d2584f5cd036402064284295c9d46a1) +++ denali.pro.user (.../denali.pro.user) (revision 4f572cf1b77d6188ed9bd859f6767b0daab159b3) @@ -1,14 +1,14 @@ - + EnvironmentId {67370740-e20f-4fc6-be45-6652e866a8bf} ProjectExplorer.Project.ActiveTarget - 1 + 0 ProjectExplorer.Project.EditorSettings Index: denali.qrc =================================================================== diff -u -r33b33328479f58fa1d6bd16b569839b9bab8c27c -r4f572cf1b77d6188ed9bd859f6767b0daab159b3 --- denali.qrc (.../denali.qrc) (revision 33b33328479f58fa1d6bd16b569839b9bab8c27c) +++ denali.qrc (.../denali.qrc) (revision 4f572cf1b77d6188ed9bd859f6767b0daab159b3) @@ -97,7 +97,8 @@ sources/gui/qml/components/RangeSlider.qml sources/gui/qml/components/MuteButton.qml sources/gui/qml/components/UpDownButton.qml - sources/gui/qml/components/FieldInput.qml + sources/gui/qml/components/DenaliTextInput.qml + sources/gui/qml/components/Keyboard.qml sources/gui/qml/compounds/PressureRangeSlider.qml @@ -142,20 +143,4 @@ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationConfirm.qml sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentPressuresLimits.qml - - sources/gui/qml/keyboard/style.qml - sources/gui/qml/keyboard/images/backspace-868482.svg - sources/gui/qml/keyboard/images/check-868482.svg - sources/gui/qml/keyboard/images/enter-868482.svg - sources/gui/qml/keyboard/images/globe-868482.svg - sources/gui/qml/keyboard/images/handwriting-868482.svg - sources/gui/qml/keyboard/images/hidekeyboard-868482.svg - sources/gui/qml/keyboard/images/search-868482.svg - sources/gui/qml/keyboard/images/shift-80c342.svg - sources/gui/qml/keyboard/images/shift-868482.svg - sources/gui/qml/keyboard/images/shift-c5d6b6.svg - sources/gui/qml/keyboard/images/textmode-868482.svg - sources/gui/qml/keyboard/images/selectionhandle-bottom.svg - - Index: main.cpp =================================================================== diff -u -r33b33328479f58fa1d6bd16b569839b9bab8c27c -r4f572cf1b77d6188ed9bd859f6767b0daab159b3 --- main.cpp (.../main.cpp) (revision 33b33328479f58fa1d6bd16b569839b9bab8c27c) +++ main.cpp (.../main.cpp) (revision 4f572cf1b77d6188ed9bd859f6767b0daab159b3) @@ -268,7 +268,6 @@ #endif qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard")); - qputenv("QT_VIRTUALKEYBOARD_STYLE", QByteArray("denali")); //! - Qt Application initialization and parameters settings // Qt Core Application parameters settings Index: sources/gui/qml/components/DenaliTextInput.qml =================================================================== diff -u --- sources/gui/qml/components/DenaliTextInput.qml (revision 0) +++ sources/gui/qml/components/DenaliTextInput.qml (revision 4f572cf1b77d6188ed9bd859f6767b0daab159b3) @@ -0,0 +1,76 @@ +/*! + * + * Copyright (c) 2019-2020 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 DenaliTextInput.qml + * \author (last) Peter Lucia + * \date (last) 07-Jan-2021 + * \author (original) Peter Lucia + * \date (original) 07-Jan-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" + +Item { id: _root + property alias textInput : _input + property alias labelText : _label.text + property alias validator : _input.validator + signal pressedEnter() + + width: Variables.textInputWidth + height: Variables.textInputHeight + + Text { id: _label + anchors { + left: parent.left + top: parent.top + } + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTextRectExtra + } + + TextInput { id: _input + anchors { + left: _label.right + } + + color: Colors.textMain + text: "" + font.pixelSize: Fonts.fontPixelTextRectExtra + selectionColor: "white" + height: parent.height + width: Variables.textInputLineWidth + horizontalAlignment: TextInput.AlignHCenter + inputMethodHints: Qt.ImhDigitsOnly + selectedTextColor: Colors.textSelected + + onFocusChanged: { + if (focus) { + selectAll() + _keyboard.setVisible(true) + } + } + + onAccepted: { + _root.pressedEnter() + } + } + + Line { + color: Colors.textEntry + width: Variables.textInputLineWidth + anchors { + top: _input.bottom + left: _input.left + } + } +} Fisheye: Tag 4f572cf1b77d6188ed9bd859f6767b0daab159b3 refers to a dead (removed) revision in file `sources/gui/qml/components/FieldInput.qml'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/gui/qml/components/Keyboard.qml =================================================================== diff -u --- sources/gui/qml/components/Keyboard.qml (revision 0) +++ sources/gui/qml/components/Keyboard.qml (revision 4f572cf1b77d6188ed9bd859f6767b0daab159b3) @@ -0,0 +1,45 @@ +// Qt +import QtQuick 2.12 +import QtQuick.VirtualKeyboard 2.1 + +// Project + +// Qml imports +import "qrc:/globals" + +/*! + * \brief Denali project Keyboard + */ +Item { id: _root + objectName: "Keyboard" // SquishQt testability + + anchors.left: parent.left + anchors.bottom: parent.bottom + height: parent.height / 2 + width: parent.width + + function setVisible(visible) { + _keyboardDialog.visible = visible + } + + ModalDialog { id: _keyboardDialog + width: parent.width + height: parent.height + visible: false + modal: false + + InputPanel { id: _keyboardInput + width: parent.width + anchors { + left: parent.left + bottom: parent.bottom + } + visible: active + onActiveChanged: { + if (!active) { + setVisible(false) + } + } + } + } +} Index: sources/gui/qml/dialogs/VitalsEntry.qml =================================================================== diff -u -r53c2c61e0a983a903aa2f0604641bf02e52e00c2 -r4f572cf1b77d6188ed9bd859f6767b0daab159b3 --- sources/gui/qml/dialogs/VitalsEntry.qml (.../VitalsEntry.qml) (revision 53c2c61e0a983a903aa2f0604641bf02e52e00c2) +++ sources/gui/qml/dialogs/VitalsEntry.qml (.../VitalsEntry.qml) (revision 4f572cf1b77d6188ed9bd859f6767b0daab159b3) @@ -16,19 +16,19 @@ // Qt import QtQuick 2.12 import QtQuick.Controls 2.12 -import QtQuick.VirtualKeyboard 2.1 // Project // Qml imports import "qrc:/globals" import "qrc:/components" /*! - * \brief Contains the Alert Dialog Implementation + * \brief Contains the Vitals Entry Implementation */ -ModalDialog { id : _root +ModalDialog { id: _root objectName: "VitalsEntry" // SquishQt testability contentItem.objectName: "VitalsEntryContent" + modal: false Rectangle { id: _titleBar; color: "transparent"; @@ -39,64 +39,55 @@ Text { id: _titleBarText color: Colors.textMain font.pixelSize: Fonts.fontPixelTitle - text: qsTr("Vitals Entry") + text: qsTr("Blood Pressure / HR Entry") anchors.centerIn: _titleBar; } } - FieldInput { id: _systolic + DenaliTextInput { id: _systolic anchors { top: _titleBar.bottom - topMargin: Variables.vitalsTopMargin - right: parent.horizontalCenter + left: parent.left + leftMargin: Variables.vitalsLeftMargin } - textInput.height: Variables.vitalsFieldInputHeight - width: Variables.vitalsFieldInputWidth - margin: Variables.vitalsMargin - validator: IntValidator{ bottom: 0; top: 500;} - labelText: "Blood Pressure (Systolic)" - } - - FieldInput { id: _diastolic - anchors { - top: _systolic.bottom - topMargin: Variables.vitalsTopMargin - right: parent.horizontalCenter + validator: IntValidator{ + bottom: Variables.vitalsEntryMin + top: Variables.vitalsEntryMax } - textInput.height: Variables.vitalsFieldInputHeight - width: Variables.vitalsFieldInputWidth - margin: Variables.vitalsMargin - validator: IntValidator{ bottom: 0; top: 500;} - labelText: "Blood Pressure (Diastolic)" + labelText: qsTr("Systolic: ") + onPressedEnter: { + _diastolic.textInput.focus = true + } } - FieldInput { id: _pulse + DenaliTextInput { id: _diastolic anchors { - top: _diastolic.bottom - topMargin: Variables.vitalsTopMargin - right: parent.horizontalCenter + top: _titleBar.bottom + left: _systolic.right } - textInput.height: Variables.vitalsFieldInputHeight - width: Variables.vitalsFieldInputWidth - margin: Variables.vitalsMargin - validator: IntValidator{ bottom: 0; top: 500;} - labelText: "Heart Rate (BPM)" + validator: IntValidator{ + bottom: Variables.vitalsEntryMin + top: Variables.vitalsEntryMax + } + labelText: qsTr("Diastolic: ") + onPressedEnter: { + _pulse.textInput.focus = true + } } - InputPanel { id: _keyboard - width: Variables.vitalsKeyboardWidth - visible: false - z: 1 - + DenaliTextInput { id: _pulse anchors { - left: _titleBar.horizontalCenter - leftMargin: Variables.vitalsKeyboardMargin - top: _titleBar.verticalCenter + top: _titleBar.bottom + left: _diastolic.right } - - onActiveChanged: { - visible = !visible + validator: IntValidator{ + bottom: Variables.vitalsEntryMin + top: Variables.vitalsEntryMax } + labelText: qsTr("Heart Rate (BPM): ") + onPressedEnter: { + _keyboard.setVisible(false) + } } Row { id: _buttons @@ -133,11 +124,4 @@ } } } - - Connections { - target: vVitals - onDidManualEntryRequest: { - _root.open() - } - } } Index: sources/gui/qml/globals/Colors.qml =================================================================== diff -u -r53c2c61e0a983a903aa2f0604641bf02e52e00c2 -r4f572cf1b77d6188ed9bd859f6767b0daab159b3 --- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 53c2c61e0a983a903aa2f0604641bf02e52e00c2) +++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 4f572cf1b77d6188ed9bd859f6767b0daab159b3) @@ -53,6 +53,7 @@ readonly property color rangeMarkerShort : "#9fb6d1" readonly property color textMain : "#FCFCFC" + readonly property color textSelected : "#000000" readonly property color textButton : "#FCFCFC" //"#E8E8E8" readonly property color textDisableButton : "#607A91" readonly property color textTickMark : "#438FEB" @@ -118,7 +119,7 @@ readonly property color createTreatmentTextReady : white readonly property color createTreatmentInvalidParam : red - readonly property color keyboardButtonBackground : "#121212" + readonly property color textEntry : "#3d8eef" // ---------- < PRS > Related Section ---------- // Alarm priority colors Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -r53c2c61e0a983a903aa2f0604641bf02e52e00c2 -r4f572cf1b77d6188ed9bd859f6767b0daab159b3 --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 53c2c61e0a983a903aa2f0604641bf02e52e00c2) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 4f572cf1b77d6188ed9bd859f6767b0daab159b3) @@ -123,13 +123,15 @@ readonly property int settingsOptionHeight : 50 readonly property int vitalsTopMargin : 30 - readonly property int vitalsMargin : 50 - readonly property int vitalsFieldInputWidth : 300 - readonly property int vitalsFieldInputHeight : 50 - readonly property int vitalsKeyboardWidth : 400 - readonly property int vitalsKeyboardMargin : 125 + readonly property int vitalsLeftMargin : 50 + readonly property int vitalsEntryMin : 0 + readonly property int vitalsEntryMax : 999 + readonly property int textInputWidth : 350 + readonly property int textInputHeight : 50 + readonly property int textInputLineWidth : 100 + // ---------- < PRS > Related Section ---------- // Min/Max readonly property int bloodFlowMin : 100 Fisheye: Tag 4f572cf1b77d6188ed9bd859f6767b0daab159b3 refers to a dead (removed) revision in file `sources/gui/qml/keyboard/images/backspace-868482.svg'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 4f572cf1b77d6188ed9bd859f6767b0daab159b3 refers to a dead (removed) revision in file `sources/gui/qml/keyboard/images/check-868482.svg'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 4f572cf1b77d6188ed9bd859f6767b0daab159b3 refers to a dead (removed) revision in file `sources/gui/qml/keyboard/images/enter-868482.svg'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 4f572cf1b77d6188ed9bd859f6767b0daab159b3 refers to a dead (removed) revision in file `sources/gui/qml/keyboard/images/globe-868482.svg'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 4f572cf1b77d6188ed9bd859f6767b0daab159b3 refers to a dead (removed) revision in file `sources/gui/qml/keyboard/images/handwriting-868482.svg'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 4f572cf1b77d6188ed9bd859f6767b0daab159b3 refers to a dead (removed) revision in file `sources/gui/qml/keyboard/images/hidekeyboard-868482.svg'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 4f572cf1b77d6188ed9bd859f6767b0daab159b3 refers to a dead (removed) revision in file `sources/gui/qml/keyboard/images/search-868482.svg'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 4f572cf1b77d6188ed9bd859f6767b0daab159b3 refers to a dead (removed) revision in file `sources/gui/qml/keyboard/images/selectionhandle-bottom.svg'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 4f572cf1b77d6188ed9bd859f6767b0daab159b3 refers to a dead (removed) revision in file `sources/gui/qml/keyboard/images/shift-80c342.svg'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 4f572cf1b77d6188ed9bd859f6767b0daab159b3 refers to a dead (removed) revision in file `sources/gui/qml/keyboard/images/shift-868482.svg'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 4f572cf1b77d6188ed9bd859f6767b0daab159b3 refers to a dead (removed) revision in file `sources/gui/qml/keyboard/images/shift-c5d6b6.svg'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 4f572cf1b77d6188ed9bd859f6767b0daab159b3 refers to a dead (removed) revision in file `sources/gui/qml/keyboard/images/textmode-868482.svg'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 4f572cf1b77d6188ed9bd859f6767b0daab159b3 refers to a dead (removed) revision in file `sources/gui/qml/keyboard/style.qml'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/gui/qml/main.qml =================================================================== diff -u -readda1cc1ad9d62aecf6b0a8e64330fad438ee0d -r4f572cf1b77d6188ed9bd859f6767b0daab159b3 --- sources/gui/qml/main.qml (.../main.qml) (revision eadda1cc1ad9d62aecf6b0a8e64330fad438ee0d) +++ sources/gui/qml/main.qml (.../main.qml) (revision 4f572cf1b77d6188ed9bd859f6767b0daab159b3) @@ -259,6 +259,10 @@ visible: true // ! _GuiView.sdIsReady || _GuiView.sdIsReadOnly } + Alert { id: _alert } + VitalsEntry { id: _vitalsEntry } + Keyboard { id: _keyboard } + Connections { target: vPowerOff onPoweroffTriggered: { switch (vpoweroff) { @@ -280,9 +284,6 @@ } } - Alert { id: _alert } - VitalsEntry { id: _vitalsEntry } - Connections { target: vAlarmStatus onAlarm_Flag_noResumeChanged : vAlarmStatus.alarm_KeepMinimized = false onAlarm_Flag_noRinsebackChanged : vAlarmStatus.alarm_KeepMinimized = false @@ -317,4 +318,11 @@ onDidAlarmEmpty: alarmHide() } + + Connections { + target: vVitals + onDidManualEntryRequest: { + _vitalsEntry.open() + } + } }