Index: denali.pro =================================================================== diff -u -r213ca3711cd2ea573946055137532abfb55f908b -rf8321d4b6a5489f797122321a4821b4eeaaa50cb --- denali.pro (.../denali.pro) (revision 213ca3711cd2ea573946055137532abfb55f908b) +++ denali.pro (.../denali.pro) (revision f8321d4b6a5489f797122321a4821b4eeaaa50cb) @@ -14,8 +14,6 @@ DEFINES += DISABLE_KEEP_ALIVE } -DEFINES += "\"QT_MESSAGE_PATTERN=[%{type}] (%{file}:%{line}) - %{message}\"" - # The following define makes your compiler emit warnings if you use # any Qt feature that has been marked deprecated (the exact warnings # depend on your compiler). Refer to the documentation for the Index: denali.pro.user =================================================================== diff -u -r9f63306043e9a184ce3e71c573ef0a15d8644f95 -rf8321d4b6a5489f797122321a4821b4eeaaa50cb --- denali.pro.user (.../denali.pro.user) (revision 9f63306043e9a184ce3e71c573ef0a15d8644f95) +++ denali.pro.user (.../denali.pro.user) (revision f8321d4b6a5489f797122321a4821b4eeaaa50cb) @@ -1,14 +1,14 @@ - + EnvironmentId {67370740-e20f-4fc6-be45-6652e866a8bf} ProjectExplorer.Project.ActiveTarget - 0 + 1 ProjectExplorer.Project.EditorSettings @@ -89,7 +89,7 @@ Desktop Qt 5.12.5 GCC 64bit Desktop Qt 5.12.5 GCC 64bit qt.qt5.5125.gcc_64_kit - 0 + 1 0 0 @@ -1185,7 +1185,7 @@ false true - /home/denali/Projects/tmp/build/denali-Desktop_Qt_5_12_5_GCC_64bit-Debug + /home/denali/Projects/tmp/build/denali-Desktop_Qt_5_12_5_GCC_64bit-Release 1 Index: denali.qrc =================================================================== diff -u -r20a67175350b1c20f078bade73a77d48c4647832 -rf8321d4b6a5489f797122321a4821b4eeaaa50cb --- denali.qrc (.../denali.qrc) (revision 20a67175350b1c20f078bade73a77d48c4647832) +++ denali.qrc (.../denali.qrc) (revision f8321d4b6a5489f797122321a4821b4eeaaa50cb) @@ -32,6 +32,8 @@ resources/images/Wave-Minus.png resources/images/Wave-Plus.png resources/images/microsd.png + resources/images/check.png + resources/images/checkCircle.png sources/gui/qml/components/MainMenu.qml @@ -61,8 +63,10 @@ sources/gui/qml/components/ProgressCircle.qml sources/gui/qml/components/Slider.qml sources/gui/qml/components/SliderCreateTreatment.qml + sources/gui/qml/components/ConfirmTreatmentTable.qml + sources/gui/qml/components/ConfirmTreatmentSubTable.qml sources/gui/qml/components/SliderDoubleCreateTreatment.qml - sources/gui/qml/components/RectSelectCreateTreatment.qml + sources/gui/qml/components/GridSelection.qml sources/gui/qml/components/TopMenuBarCreateTreatment.qml sources/gui/qml/components/ProgressBarEx.qml sources/gui/qml/components/CloseButton.qml @@ -74,7 +78,11 @@ sources/gui/qml/components/ImageWave.qml sources/gui/qml/components/ImageClock.qml sources/gui/qml/components/ImageLogoDDarkTransparent.qml + sources/gui/qml/components/PrimingTimer.qml + ConfirmTreatmentTableEntry.qml + ProgressLine.qml sources/gui/qml/components/DebugDataColumn.qml + sources/gui/qml/components/CheckListItem.qml qtquickcontrols2.conf Index: sources/gui/qml/components/GridSelection.qml =================================================================== diff -u -r12cfad32f345ac72d777f9b97d25bdd4d0848527 -rf8321d4b6a5489f797122321a4821b4eeaaa50cb --- sources/gui/qml/components/GridSelection.qml (.../GridSelection.qml) (revision 12cfad32f345ac72d777f9b97d25bdd4d0848527) +++ sources/gui/qml/components/GridSelection.qml (.../GridSelection.qml) (revision f8321d4b6a5489f797122321a4821b4eeaaa50cb) @@ -22,6 +22,11 @@ import "qrc:/globals" import "qrc:/components" + +/*! + * \brief A selectable grid of options with customizable number of rows and columns + * where only one option is selected by the user + */ Rectangle { id: _root anchors.horizontalCenter: parent.horizontalCenter Index: sources/gui/qml/components/NotificationBar.qml =================================================================== diff -u -rd8004655ec64da6c8806b9a074a0cb07d799ddf9 -rf8321d4b6a5489f797122321a4821b4eeaaa50cb --- sources/gui/qml/components/NotificationBar.qml (.../NotificationBar.qml) (revision d8004655ec64da6c8806b9a074a0cb07d799ddf9) +++ sources/gui/qml/components/NotificationBar.qml (.../NotificationBar.qml) (revision f8321d4b6a5489f797122321a4821b4eeaaa50cb) @@ -45,12 +45,12 @@ function toggleSilence(silence, timeoutSec) { isSilenced = silence; muteTimeoutSec = !isSilenced ? 0 : timeoutSec; - _bell.source = isSilenced ? "qrc:/images/bell-off.png" : "qrc:/images/bell.png" + _bell.source = isSilenced ? "qrc:/images/iBellOff" : "qrc:/images/iBellOn" } Image { id: _icon - source: "qrc:/images/alarm.png" + source: "qrc:/images/iAlarm" anchors.right: _text.left anchors.rightMargin: Variables.notificationBarIconMargin; anchors.verticalCenter: parent.verticalCenter; @@ -69,7 +69,7 @@ Image { id: _bell - source: isSilenced ? "qrc:/images/bell-off.png" : "qrc:/images/bell.png" + source: isSilenced ? "qrc:/images/iBellOff" : "qrc:/images/iBellOn" anchors.left: _root.left anchors.leftMargin: Variables.silenceIconMargin; anchors.verticalCenter: parent.verticalCenter; Index: sources/gui/qml/components/RangeRect.qml =================================================================== diff -u -r074b32b5cc08f41f2d9ce0d021f2151b76bba5ad -rf8321d4b6a5489f797122321a4821b4eeaaa50cb --- sources/gui/qml/components/RangeRect.qml (.../RangeRect.qml) (revision 074b32b5cc08f41f2d9ce0d021f2151b76bba5ad) +++ sources/gui/qml/components/RangeRect.qml (.../RangeRect.qml) (revision f8321d4b6a5489f797122321a4821b4eeaaa50cb) @@ -26,6 +26,7 @@ Rectangle { id: _root signal clicked(var vMouseEvent) signal dragged(var vMouseEvent) + signal pressChanged() property int decimal : 0 @@ -90,5 +91,8 @@ onClicked: { _root.clicked(mouse) } + onPressedChanged: { + _root.pressChanged(); + } } } Index: sources/gui/qml/components/Slider.qml =================================================================== diff -u -r074b32b5cc08f41f2d9ce0d021f2151b76bba5ad -rf8321d4b6a5489f797122321a4821b4eeaaa50cb --- sources/gui/qml/components/Slider.qml (.../Slider.qml) (revision 074b32b5cc08f41f2d9ce0d021f2151b76bba5ad) +++ sources/gui/qml/components/Slider.qml (.../Slider.qml) (revision f8321d4b6a5489f797122321a4821b4eeaaa50cb) @@ -107,7 +107,7 @@ value = getValueOfX(x) - if ( step === 1 ) { value = parseInt(value); return; } + if ( step === 1 ) { /* keep the value and return */ return; } var start = 0 if ( ! stepSnap ) start = minimum @@ -135,6 +135,9 @@ setValue(vMouseEvent.x) progressRectClicked() } + onPressChanged: { + _root.pressChanged() + } } // used loader for performance since it may not always be required. Index: sources/gui/qml/components/SliderDoubleCreateTreatment.qml =================================================================== diff -u -r074b32b5cc08f41f2d9ce0d021f2151b76bba5ad -rf8321d4b6a5489f797122321a4821b4eeaaa50cb --- sources/gui/qml/components/SliderDoubleCreateTreatment.qml (.../SliderDoubleCreateTreatment.qml) (revision 074b32b5cc08f41f2d9ce0d021f2151b76bba5ad) +++ sources/gui/qml/components/SliderDoubleCreateTreatment.qml (.../SliderDoubleCreateTreatment.qml) (revision f8321d4b6a5489f797122321a4821b4eeaaa50cb) @@ -20,6 +20,9 @@ import "qrc:/globals" import "qrc:/components" +/*! + * \brief Two side-by-side sliders that fit the width of a normal slider component + */ Rectangle { id: _root @@ -62,8 +65,8 @@ _lowTitle.color = Colors.textMain _lowSelectedValue.color = Colors.textMain } else { - _lowTitle.color = Colors.createTrInvalidParam - _lowSelectedValue.color = Colors.createTrInvalidParam + _lowTitle.color = Colors.createTreatmentInvalidParam + _lowSelectedValue.color = Colors.createTreatmentInvalidParam } } @@ -72,8 +75,8 @@ _highTitle.color = Colors.textMain _highSelectedValue.color = Colors.textMain } else { - _highTitle.color = Colors.createTrInvalidParam - _highSelectedValue.color = Colors.createTrInvalidParam + _highTitle.color = Colors.createTreatmentInvalidParam + _highSelectedValue.color = Colors.createTreatmentInvalidParam } } @@ -112,7 +115,7 @@ step : Variables.bloodFlowResolution ticks : true onValueChanged: { - _lowSelectedValue.text = value + _root.lowUnits; + _lowSelectedValue.text = value + " " + _root.lowUnits; lowSliderChanged() } onActiveChanged: { @@ -165,7 +168,7 @@ step : Variables.bloodFlowResolution ticks : true onValueChanged: { - _highSelectedValue.text = value + _root.highUnits; + _highSelectedValue.text = value + " " + _root.highUnits; highSliderChanged() } Index: sources/gui/qml/components/TouchRect.qml =================================================================== diff -u -r305d411b4bc617d858075f5750dea487d707bebb -rf8321d4b6a5489f797122321a4821b4eeaaa50cb --- sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision 305d411b4bc617d858075f5750dea487d707bebb) +++ sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision f8321d4b6a5489f797122321a4821b4eeaaa50cb) @@ -88,7 +88,7 @@ function setSelected(isSelected) { _root.selected = isSelected if (_root.selected) { - _root.color = Colors.backgroundBtnSelectDark + _root.color = Colors.backgroundButtonSelectDark } else { _root.color = backgroundColor Index: sources/gui/qml/dialogs/NotificationDialog.qml =================================================================== diff -u -radf89000bad1a50ec33114ea76d65621a1d351d5 -rf8321d4b6a5489f797122321a4821b4eeaaa50cb --- sources/gui/qml/dialogs/NotificationDialog.qml (.../NotificationDialog.qml) (revision adf89000bad1a50ec33114ea76d65621a1d351d5) +++ sources/gui/qml/dialogs/NotificationDialog.qml (.../NotificationDialog.qml) (revision f8321d4b6a5489f797122321a4821b4eeaaa50cb) @@ -51,12 +51,12 @@ Image { id: _icon - source: "qrc:/images/alarm.png" + source: "qrc:/images/iAlarm" anchors.horizontalCenter: _title.horizontalCenter anchors.verticalCenter: _title.verticalCenter; - anchors.horizontalCenterOffset: -_title.width + Variables.dialogSVGIconOffset; - sourceSize.height: Variables.dialogSVGHeight; - sourceSize.width: Variables.dialogSVGWidth; + anchors.horizontalCenterOffset: -_title.width + Variables.dialogIconHorizontalOffset; + sourceSize.height: Variables.dialogIconHeight; + sourceSize.width: Variables.dialogIconWidth; } Text { id: _title Index: sources/gui/qml/globals/Colors.qml =================================================================== diff -u -r12cfad32f345ac72d777f9b97d25bdd4d0848527 -rf8321d4b6a5489f797122321a4821b4eeaaa50cb --- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 12cfad32f345ac72d777f9b97d25bdd4d0848527) +++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision f8321d4b6a5489f797122321a4821b4eeaaa50cb) @@ -23,88 +23,87 @@ * whcih is going to be used in the project */ QtObject { - readonly property color backgroundMain : "#1A344D" - readonly property color backgroundButtonNormal : "Transparent" - readonly property color backgroundButtonSelect : "#438FEB" - readonly property color backgroundBtnSelectDark : "#214773" - readonly property color backgroundDialog : "#254670" - readonly property color backgroundMenu : "#14314C" - readonly property color backgroundMainMenu : "#0D2639" - readonly property color backgroundDottedMenu : "#64809D" - readonly property color backgroundSlider : "#195187" + readonly property color backgroundMain : "#1A344D" + readonly property color backgroundButtonNormal : "Transparent" + readonly property color backgroundButtonSelect : "#438FEB" + readonly property color backgroundButtonSelectDark : "#214773" + readonly property color backgroundDialog : "#254670" + readonly property color backgroundMenu : "#14314C" + readonly property color backgroundMainMenu : "#0D2639" + readonly property color backgroundDottedMenu : "#64809D" + readonly property color backgroundSlider : "#195187" - readonly property color backgroundUltrafiltrationButton : "#31568F" - readonly property color textValueUltrafiltrationButtonFg: "#98aec2" + readonly property color backgroundUltrafiltrationButton : "#31568F" + readonly property color textValueUltrafiltrationButtonFg : "#98aec2" - readonly property color backgroundRangeRect : "#3e546e" - readonly property color highlightProgressBar : "#3d8eef" - readonly property color highlightMedProgressBar : "#1b2b3e" - readonly property color textProgressBar : "#88a3c5" + readonly property color backgroundRangeRect : "#3e546e" + readonly property color highlightProgressBar : "#3d8eef" + readonly property color highlightMedProgressBar : "#1b2b3e" + readonly property color textProgressBar : "#88a3c5" - readonly property color textRangeMarker : "white" - readonly property color rangeMarker : "white" - readonly property color rangeMarkerShort : "#9fb6d1" + readonly property color textRangeMarker : "white" + readonly property color rangeMarker : "white" + readonly property color rangeMarkerShort : "#9fb6d1" - readonly property color textMain : "#FCFCFC" - readonly property color textButton : "#FCFCFC" //"#E8E8E8" - readonly property color textDisableButton : "#607A91" - readonly property color textTickMark : "#438FEB" - readonly property color textInvalid : "red" + readonly property color textMain : "#FCFCFC" + readonly property color textButton : "#FCFCFC" //"#E8E8E8" + readonly property color textDisableButton : "#607A91" + readonly property color textTickMark : "#438FEB" + readonly property color textInvalid : "red" - readonly property color borderButton : "#4290EC" //K:D //"#438FEB" - readonly property color borderDisableButton : "#607A91" - readonly property color boderSeparatorLine : "#476982" - readonly property color borderDialog : "transparent" // "#D01A344D" // "#D00F0F0F" //"#F51A344D" + readonly property color borderButton : "#4290EC" //K:D //"#438FEB" + readonly property color borderDisableButton : "#607A91" + readonly property color boderSeparatorLine : "#476982" + readonly property color borderDialog : "transparent" // "#D01A344D" // "#D00F0F0F" //"#F51A344D" - readonly property color touchTextAreaTitle : "#a0b6d0" + readonly property color touchTextAreaTitle : "#a0b6d0" - readonly property color textTextRectTitle : "#ffffff" - readonly property color textTextRectLabel : "#e8e8e8" - readonly property color textTextRectExtra : "#708795" + readonly property color textTextRectTitle : "#ffffff" + readonly property color textTextRectLabel : "#e8e8e8" + readonly property color textTextRectExtra : "#708795" - readonly property color line : "#094266" + readonly property color line : "#094266" - readonly property color pressuresText : "white" - readonly property color pressuresArterialBar : "#31bcdb" - readonly property color pressuresVenousBar : "#c568ed" + readonly property color pressuresText : "white" + readonly property color pressuresArterialBar : "#31bcdb" + readonly property color pressuresVenousBar : "#c568ed" - readonly property color fluidText : "white" - readonly property color fluidValue : "white" - readonly property color fluidUnit : "#708795" + readonly property color fluidText : "white" + readonly property color fluidValue : "white" + readonly property color fluidUnit : "#708795" - readonly property color textNotificationNoneBg : "white" - readonly property color textNotificationNoneFg : "#1b2b3e" + readonly property color textNotificationNoneBg : "white" + readonly property color textNotificationNoneFg : "#1b2b3e" - readonly property color textNotificationLowBg : "#f5a623" // ? - readonly property color textNotificationLowFg : "white" // ? + readonly property color textNotificationLowBg : "#f5a623" // ? + readonly property color textNotificationLowFg : "white" // ? - readonly property color textNotificationMedBg : "#f5a623" // ? - readonly property color textNotificationMedFg : "white" // ? + readonly property color textNotificationMedBg : "#f5a623" // ? + readonly property color textNotificationMedFg : "white" // ? - readonly property color textNotificationHighBg : "#c53b33" // red - readonly property color textNotificationHighFg : "white" + readonly property color textNotificationHighBg : "#c53b33" // red + readonly property color textNotificationHighFg : "white" - readonly property color alarmTopBarHighBg : "#831913" - readonly property color alarmTopBarHighFg : "white" + readonly property color alarmTopBarHighBg : "#831913" + readonly property color alarmTopBarHighFg : "white" - readonly property color alarmTopBarMedBg : "#db8f00" - readonly property color alarmTopBarMedFg : "white" + readonly property color alarmTopBarMedBg : "#db8f00" + readonly property color alarmTopBarMedFg : "white" - readonly property color alarmTopBarLowBg : "#db8f00" - readonly property color alarmTopBarLowFg : "white" + readonly property color alarmTopBarLowBg : "#db8f00" + readonly property color alarmTopBarLowFg : "white" - readonly property color createTreatmentActive : "#3d8eef" - readonly property color createTreatmentInactive : "#3e546e" - readonly property color createTreatmentNotReady : "#1f4974" - readonly property color createTreatmentReady : "#438FEB" - readonly property color createTrTextNotReady : "#507090" - readonly property color createTrTextReady : "white" - readonly property color createTrInvalidParam : "red" - readonly property color createTrProfileID : "#ffbb44" + readonly property color createTrProfileID : "#ffbb44" - readonly property color primingNotReady : "#1f4974" - readonly property color primingReady : "#438FEB" + readonly property color primingNotReady : "#1f4974" + readonly property color primingReady : "#438FEB" - + readonly property color createTreatmentActive : "#3d8eef" + readonly property color createTreatmentInactive : "#3e546e" + readonly property color createTreatmentNotReady : "#1f4974" + readonly property color createTreatmentReady : "#438FEB" + readonly property color createTreatmentTextNotReady : "#507090" + readonly property color createTreatmentTextReady : "white" + readonly property color createTreatmentInvalidParam : "red" } Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -r846a9ebc350e33be4affab3cc4c136248900015d -rf8321d4b6a5489f797122321a4821b4eeaaa50cb --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 846a9ebc350e33be4affab3cc4c136248900015d) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision f8321d4b6a5489f797122321a4821b4eeaaa50cb) @@ -23,12 +23,12 @@ * which is going to be used in the project. */ QtObject { - readonly property int applicationWidth : 1280 - readonly property int applicationHeight : 800 - readonly property int buttonSpacing : 150 - readonly property int dialogSVGHeight : 50 - readonly property int dialogSVGWidth : 50 - readonly property int dialogSVGIconOffset : 25 + readonly property int applicationWidth : 1280 + readonly property int applicationHeight : 800 + readonly property int buttonSpacing : 150 + readonly property int dialogIconHeight : 50 + readonly property int dialogIconWidth : 50 + readonly property int dialogIconHorizontalOffset: 25 readonly property int headerHeight : 100 readonly property int mainMenuHeight : 70 @@ -76,7 +76,7 @@ readonly property int progressbarRectWidth : 620 readonly property int sliderTextMargin : 20 - readonly property int cTreatmentSpacing : 60 + readonly property int treatmentSpacing : 60 readonly property int cTreatmentTableHeight : 800 readonly property int cTreatmentTableWidth : applicationWidth - 50 @@ -129,5 +129,7 @@ // - Fluid readonly property string unitTextSaline : qsTr("mL") readonly property string unitTextHeparin : qsTr("mL") + // - Create Treatment + readonly property string unitTextBPMeasurementInterval : qsTr("min") } Index: sources/gui/qml/pages/treatment/TreatmentBegin.qml =================================================================== diff -u -ra51b1ec80d65c7cf9f7f3b86f45a637a6d42efc1 -rf8321d4b6a5489f797122321a4821b4eeaaa50cb --- sources/gui/qml/pages/treatment/TreatmentBegin.qml (.../TreatmentBegin.qml) (revision a51b1ec80d65c7cf9f7f3b86f45a637a6d42efc1) +++ sources/gui/qml/pages/treatment/TreatmentBegin.qml (.../TreatmentBegin.qml) (revision f8321d4b6a5489f797122321a4821b4eeaaa50cb) @@ -45,8 +45,7 @@ } - Flickable { - id: _flickable + Flickable { id: _flickable anchors.top: _topMenuBar.bottom anchors.left: parent.left anchors.bottom: parent.bottom @@ -55,9 +54,19 @@ contentHeight: _column.implicitHeight clip: true - Column { - id: _column - spacing: Variables.cTreatmentSpacing + ScrollBar.vertical: ScrollBar { id: _scrollBar + anchors.right: _flickable.right + anchors.rightMargin: 3 + contentItem: Rectangle { + color: Colors.backgroundRangeRect + implicitWidth: 6 + radius: width / 2 + width: 3 + } + } + + Column { id: _column + spacing: Variables.treatmentSpacing anchors.horizontalCenter: parent.horizontalCenter; anchors.fill: parent; @@ -93,37 +102,6 @@ } } - states: [ - State { - when: _flickable.movingVertically - PropertyChanges { - target: _verticalScrollBar - opacity: 0.8 - } - } - ] - - ScrollBar { - anchors.top: _flickable.top - anchors.bottom: _flickable.bottom - id: _verticalScrollBar - size: _flickable.height / _column.implicitHeight - active: true - anchors.right: _flickable.right - anchors.rightMargin: 5 - opacity: 0 - orientation: Qt.Vertical - position: _flickable.visibleArea.yPosition - - contentItem: Rectangle { - color: Colors.backgroundRangeRect - implicitWidth: 6 - radius: width / 2 - width: 3 - } - - } - onVisibleChanged: { if (visible) { _mainMenu.hidden = true Index: sources/gui/qml/pages/treatment/TreatmentConfirm.qml =================================================================== diff -u -ra51b1ec80d65c7cf9f7f3b86f45a637a6d42efc1 -rf8321d4b6a5489f797122321a4821b4eeaaa50cb --- sources/gui/qml/pages/treatment/TreatmentConfirm.qml (.../TreatmentConfirm.qml) (revision a51b1ec80d65c7cf9f7f3b86f45a637a6d42efc1) +++ sources/gui/qml/pages/treatment/TreatmentConfirm.qml (.../TreatmentConfirm.qml) (revision f8321d4b6a5489f797122321a4821b4eeaaa50cb) @@ -55,9 +55,20 @@ contentHeight: _column.implicitHeight clip: true + ScrollBar.vertical: ScrollBar { id: _scrollBar + anchors.right: _flickable.right + anchors.rightMargin: 3 + contentItem: Rectangle { + color: Colors.backgroundRangeRect + implicitWidth: 6 + radius: width / 2 + width: 3 + } + } + Column { id: _column - spacing: Variables.cTreatmentSpacing + spacing: Variables.treatmentSpacing anchors.horizontalCenter: parent.horizontalCenter; anchors.fill: parent; @@ -91,37 +102,6 @@ } } - states: [ - State { - when: _flickable.movingVertically - PropertyChanges { - target: _verticalScrollBar - opacity: 0.8 - } - } - ] - - ScrollBar { - anchors.top: _flickable.top - anchors.bottom: _flickable.bottom - id: _verticalScrollBar - size: _flickable.height / _column.implicitHeight - active: true - anchors.right: _flickable.right - anchors.rightMargin: 5 - opacity: 0 - orientation: Qt.Vertical - position: _flickable.visibleArea.yPosition - - contentItem: Rectangle { - color: Colors.backgroundRangeRect - implicitWidth: 6 - radius: width / 2 - width: 3 - } - - } - onVisibleChanged: { if (visible) { _mainMenu.hidden = true Index: sources/gui/qml/pages/treatment/TreatmentCreate.qml =================================================================== diff -u -r6e4cc1f67e9290035b4e3a5be2eac04a85ae0c9a -rf8321d4b6a5489f797122321a4821b4eeaaa50cb --- sources/gui/qml/pages/treatment/TreatmentCreate.qml (.../TreatmentCreate.qml) (revision 6e4cc1f67e9290035b4e3a5be2eac04a85ae0c9a) +++ sources/gui/qml/pages/treatment/TreatmentCreate.qml (.../TreatmentCreate.qml) (revision f8321d4b6a5489f797122321a4821b4eeaaa50cb) @@ -43,8 +43,7 @@ } - Flickable { - id: _flickable + Flickable { id: _flickable anchors.top: _topMenuBar.bottom anchors.left: parent.left anchors.bottom: parent.bottom @@ -53,9 +52,19 @@ contentHeight: _column.implicitHeight clip: true - Column { - id: _column - spacing: Variables.cTreatmentSpacing + ScrollBar.vertical: ScrollBar { id: _scrollBar + anchors.right: _flickable.right + anchors.rightMargin: 3 + contentItem: Rectangle { + color: Colors.backgroundRangeRect + implicitWidth: 6 + radius: width / 2 + width: 3 + } + } + + Column { id: _column + spacing: Variables.treatmentSpacing anchors.horizontalCenter: parent.horizontalCenter; anchors.fill: parent; @@ -75,92 +84,86 @@ } - SliderCreateTreatment { - id: _bloodFlowRate + SliderCreateTreatment { id: _bloodFlowRate objectName: "_bloodFlowRate" sliderObjectName: objectName + "Slider" selectedValueObjectName: objectName + "Value" - text: "Blood Flow Rate" - units: qsTr(" mL/min") min: vTreatmentCreate.bloodFlowRateMin max: vTreatmentCreate.bloodFlowRateMax step: vTreatmentCreate.bloodFlowRateRes + text: qsTr("Blood Flow Rate") + units: qsTr("mL/min") onSliderChanged: { vTreatmentCreate.bloodFlowRate = value; } } - SliderCreateTreatment { - id: _dialysateFlowRate + SliderCreateTreatment { id: _dialysateFlowRate objectName: "_dialysateFlowRate" sliderObjectName: objectName + "Slider" selectedValueObjectName: objectName + "Value" - text: "Dialysate Flow Rate" - units: qsTr(" mL/min") min: vTreatmentCreate.dialysateFlowRateMin max: vTreatmentCreate.dialysateFlowRateMax step: vTreatmentCreate.dialysateFlowRateRes + text: qsTr("Dialysate Flow Rate") + units: qsTr("mL/min") onSliderChanged: { vTreatmentCreate.dialysateFlowRate = value; } } - SliderCreateTreatment { - id: _duration + SliderCreateTreatment { id: _duration objectName: "_duration" sliderObjectName: objectName + "Slider" selectedValueObjectName: objectName + "Value" - text: "Duration" - units: qsTr(" min") min: vTreatmentCreate.durationMin max: vTreatmentCreate.durationMax step: vTreatmentCreate.durationRes + text: qsTr("Duration") + units: qsTr("min") onSliderChanged: { vTreatmentCreate.duration = value; } } - SliderCreateTreatment { - id: _heparinDispensingRate + SliderCreateTreatment { id: _heparinDispensingRate objectName: "_heparinDispensingRate" sliderObjectName: objectName + "Slider" selectedValueObjectName: objectName + "Value" - text: "Heparin Dispensing Rate" - units: qsTr(" mL/hr") min: vTreatmentCreate.heparinDispensingRateMin max: vTreatmentCreate.heparinDispensingRateMax step: vTreatmentCreate.heparinDispensingRateRes - + text: qsTr("Heparin Dispensing Rate") + units: qsTr("mL/hr") onSliderChanged: { vTreatmentCreate.heparinDispensingRate = value; } } - SliderCreateTreatment { - id: _heparinBolusVolume + SliderCreateTreatment { id: _heparinBolusVolume objectName: "_heparinBolusVolume" sliderObjectName: objectName + "Slider" selectedValueObjectName: objectName + "Value" - text: "Heparin Bolus Volume" - units: qsTr(" mL") min: vTreatmentCreate.heparinBolusVolumeMin max: vTreatmentCreate.heparinBolusVolumeMax step: vTreatmentCreate.heparinBolusVolumeRes + + text: qsTr("Heparin Bolus Volume") + units: qsTr("mL") onSliderChanged: { vTreatmentCreate.heparinBolusVolume = value; } } - SliderCreateTreatment { - id: _heparinStopTime + SliderCreateTreatment { id: _heparinStopTime objectName: "_heparinStopTime" sliderObjectName: objectName + "Slider" selectedValueObjectName: objectName + "Value" - text: "Heparin Stop Time" - units: qsTr(" min") min: vTreatmentCreate.heparinStopTimeMin max: vTreatmentCreate.heparinStopTimeMax step: vTreatmentCreate.heparinStopTimeRes + text: qsTr("Heparin Stop Time") + units: qsTr("min") onSliderChanged: { vTreatmentCreate.heparinStopTime = value; } @@ -182,17 +185,16 @@ GridSelection { id: _acidConcentrate objectName: "_acidConcentrateRect" - name: "Acid Concentrate" + name: qsTr("Acid Concentrate") buttonNames: vTreatmentCreate.acidConcentrateOptions; onButtonClicked: { vTreatmentCreate.acidConcentrate = selectedIndex; } } - GridSelection { - id: _bicarbonateConcentrate + GridSelection { id: _bicarbonateConcentrate objectName: "_bicarbonateConcentrateRect" - name: "Bicarbonate Concentrate" + name: qsTr("Bicarbonate Concentrate") numRows: 1 numCols: 2 buttonNames: vTreatmentCreate.bicarbonateConcentrateOptions; @@ -201,10 +203,9 @@ } } - GridSelection { - id: _dialyzerType + GridSelection { id: _dialyzerType objectName: "_dialyzerTypeRect" - name: "Dialyzer Type" + name: qsTr("Dialyzer Type") numRows: 3 numCols: 2 buttonNames: vTreatmentCreate.dialyzerTypeOptions; @@ -213,41 +214,38 @@ } } - SliderCreateTreatment { - id: _dialysateTemperature + SliderCreateTreatment { id: _dialysateTemperature objectName: "_dialysateTemperature" sliderObjectName: objectName + "Slider" selectedValueObjectName: objectName + "Value" - text: "Dialysate Temperature" - units: qsTr(" C") min: vTreatmentCreate.dialysateTempMin max: vTreatmentCreate.dialysateTempMax step: vTreatmentCreate.dialysateTempRes + text: qsTr("Dialysate Temperature") + units: qsTr("C") onSliderChanged: { vTreatmentCreate.dialysateTemp = value; } } - Text { - id: _arterialPressureLimitsTitle - text: "Arterial Pressure Limits" + Text { id: _arterialPressureLimitsTitle + text: qsTr("Arterial Pressure Limits") anchors.left: _arterialPressureLimits.left font.pixelSize: Fonts.fontPixelFluidText color: Colors.textMain; } - SliderDoubleCreateTreatment { - id: _arterialPressureLimits + SliderDoubleCreateTreatment { id: _arterialPressureLimits objectName: "_arterialPressureLimits" lowSliderObjectName: objectName + "LowSlider" lowSelectedValueObjectName: objectName + "LowValue" highSliderObjectName: objectName + "HighSlider" highSelectedValueObjectName: objectName + "HighValue" - lowTitle: "Low" - lowUnits: " mmHg" - highTitle: "High" - highUnits: " mmHg" + lowTitle: qsTr("Low") + lowUnits: qsTr("mmHg") + highTitle: qsTr("High") + highUnits: qsTr("mmHg") lowMin: vTreatmentCreate.arterialPressureLimitLowMin lowMax: vTreatmentCreate.arterialPressureLimitLowMax highMin: vTreatmentCreate.arterialPressureLimitHighMin @@ -265,26 +263,24 @@ } - Text { - id: _venousPressureLimitsTitle - text: "Venous Pressure Limits" + Text { id: _venousPressureLimitsTitle + text: qsTr("Venous Pressure Limits") anchors.left: _venousPressureLimits.left font.pixelSize: Fonts.fontPixelFluidText color: Colors.textMain; } - SliderDoubleCreateTreatment { - id: _venousPressureLimits + SliderDoubleCreateTreatment { id: _venousPressureLimits objectName: "_venousPressureLimits" lowSliderObjectName: objectName + "LowSlider" lowSelectedValueObjectName: objectName + "LowValue" highSliderObjectName: objectName + "HighSlider" highSelectedValueObjectName: objectName + "HighValue" - lowTitle: "Low" - lowUnits: " mmHg" - highTitle: "High" - highUnits: " mmHg" + lowTitle: qsTr("Low") + lowUnits: Variables.unitTextBloodPressure + highTitle: qsTr("High") + highUnits: Variables.unitTextBloodPressure lowMin: vTreatmentCreate.venousPressureLimitLowMin lowMax: vTreatmentCreate.venousPressureLimitLowMax highMin: vTreatmentCreate.venousPressureLimitHighMin @@ -301,13 +297,12 @@ } } - SliderCreateTreatment { - id: _bloodPressureMeasurementInterval + SliderCreateTreatment { id: _bloodPressureMeasurementInterval objectName: "_bloodPressureMeasurementInterval" sliderObjectName: objectName + "Slider" selectedValueObjectName: objectName + "Value" - text: "Blood Pressure Measurement Interval" - units: qsTr(" min") + text: qsTr("Blood Pressure Measurement Interval") + units: Variables.unitTextBPMeasurementInterval min: vTreatmentCreate.bloodPressureMeasureIntervalMin max: vTreatmentCreate.bloodPressureMeasureIntervalMax step: vTreatmentCreate.bloodPressureMeasureIntervalRes @@ -317,13 +312,12 @@ } } - SliderCreateTreatment { - id: _rinsebackFlowRate + SliderCreateTreatment { id: _rinsebackFlowRate objectName: "_rinsebackFlowRate" sliderObjectName: objectName + "Slider" selectedValueObjectName: objectName + "Value" - text: "Rinseback Flow Rate" - units: qsTr(" mL/min") + text: qsTr("Rinseback Flow Rate") + units: Variables.unitTextFlowRate min: vTreatmentCreate.rinsebackFlowRateMin max: vTreatmentCreate.rinsebackFlowRateMax step: vTreatmentCreate.rinsebackFlowRateRes @@ -339,7 +333,7 @@ text.text: qsTr("CONTINUE") backgroundColor: Colors.createTreatmentNotReady borderColor: Colors.createTreatmentNotReady - textColor: Colors.createTrTextNotReady + textColor: Colors.createTreatmentTextNotReady button.onClicked: { vTreatmentCreate.saveTreatmentProfile = false; if (vTreatmentCreate.continueEnabled) { @@ -351,11 +345,11 @@ if (enabled) { backgroundColor = Colors.createTreatmentActive borderColor = Colors.createTreatmentActive - textColor = Colors.createTrTextReady + textColor = Colors.createTreatmentTextReady } else { backgroundColor = Colors.createTreatmentNotReady borderColor = Colors.createTreatmentNotReady - textColor = Colors.createTrTextNotReady + textColor = Colors.createTreatmentTextNotReady } } } @@ -369,37 +363,6 @@ } } - states: [ - State { - when: _flickable.movingVertically - PropertyChanges { - target: _verticalScrollBar - opacity: 0.8 - } - } - ] - - ScrollBar { - anchors.top: _flickable.top - anchors.bottom: _flickable.bottom - id: _verticalScrollBar - size: _flickable.height / _column.implicitHeight - active: true - anchors.right: _flickable.right - anchors.rightMargin: 5 - opacity: 0 - orientation: Qt.Vertical - position: _flickable.visibleArea.yPosition - - contentItem: Rectangle { - color: Colors.backgroundRangeRect - implicitWidth: 6 - radius: width / 2 - width: 3 - } - - } - onVisibleChanged: { if (visible) { _mainMenu.hidden = true @@ -417,7 +380,6 @@ } onResetCreateTreatment: { - console.log("resetting create treatment"); _bloodFlowRate.isActive = false; _dialysateFlowRate.isActive = false; _duration.isActive = false; @@ -442,92 +404,74 @@ } onFwValidationFailed: { - console.debug("Fw validation failed: " + reason) } onBloodFlowRate_ValidationFailed: { - console.debug("Blood flow validation failed: " + reason) _bloodFlowRate.setValid(false) } onDialysateFlowRate_ValidationFailed: { - console.debug("Dialysate flow rate validation failed: " + reason) _dialysateFlowRate.setValid(false) } onDuration_ValidationFailed: { - console.debug("Duration validation failed: " + reason) _duration.setValid(false) } onHeparinDispensingRate_ValidationFailed: { - console.debug("Heparin dispensing rate validation failed: " + reason) _heparinDispensingRate.setValid(false) } onHeparinBolusVolume_ValidationFailed: { - console.debug("Heparin bolus volume validation failed: " + reason) _heparinBolusVolume.setValid(false) } onHeparinStopTime_ValidationFailed: { - console.debug("Heparin stop time validation failed: " + reason) _heparinStopTime.setValid(false) } onSalineBolusVolume_ValidationFailed: { - console.debug("Saline bolus volume validation failed: " + reason) _salineBolus.setValid(false) } onAcidConcentrate_ValidationFailed: { - console.debug("Acid concentrate validation failed: " + reason) _acidConcentrate.setValid(false) } onBicarbonateConcentrate_ValidationFailed: { - console.debug("Bicarbonate concentrate validation failed: " + reason) _bicarbonateConcentrate.setValid(false) } onDialyzerType_ValidationFailed: { - console.debug("Dialyzer type validation failed: " + reason) _dialyzerType.setValid(false) } onDialysateTemp_ValidationFailed: { - console.debug("Dialysate temp validation failed: " + reason) _dialysateTemperature.setValid(false) } onArterialPressureLimitLow_ValidationFailed: { - console.debug("Arterial pressure limit low validation failed: " + reason) _arterialPressureLimits.setLowValid(false) } onArterialPressureLimitHigh_ValidationFailed: { - console.debug("Arterial pressure limit high validation failed: " + reason) _arterialPressureLimits.setHighValid(false) } onVenousPressureLimitLow_ValidationFailed: { - console.debug("Venous pressure limit low validation failed: " + reason) _venousPressureLimits.setLowValid(false) } onVenousPressureLimitHigh_ValidationFailed: { - console.debug("Venous pressure limit high validation failed: " + reason) _venousPressureLimits.setHighValid(false) } onBloodPressureMeasureInterval_ValidationFailed: { - console.debug("Blood pressure measure interval validation failed: " + reason) _bloodPressureMeasurementInterval.setValid(false) } onRinsebackFlowRate_ValidationFailed: { - console.debug("Rinseback flow rate validation failed: " + reason) _rinsebackFlowRate.setValid(false) } Index: sources/gui/qml/pages/treatment/TreatmentPrime.qml =================================================================== diff -u -rfac59d7894468db257f120e58e19324a32fcbe0f -rf8321d4b6a5489f797122321a4821b4eeaaa50cb --- sources/gui/qml/pages/treatment/TreatmentPrime.qml (.../TreatmentPrime.qml) (revision fac59d7894468db257f120e58e19324a32fcbe0f) +++ sources/gui/qml/pages/treatment/TreatmentPrime.qml (.../TreatmentPrime.qml) (revision f8321d4b6a5489f797122321a4821b4eeaaa50cb) @@ -28,16 +28,16 @@ * which is the default screen in the "Manager" stack */ ScreenItem { id: _root - signal backClicked() - signal continueClicked() + signal clickedBack() + signal clickedContinue() backgroundRect.color: Colors.backgroundMainMenu TopMenuBarCreateTreatment { id: _topMenuBar anchors.top: parent.top anchors.left: parent.left width: parent.width - onBackClicked: { - _root.backClicked(); + onClickedBack: { + _root.clickedBack(); } state: "prime" @@ -70,19 +70,84 @@ anchors.fill: parent; Text { id: _titleText - anchors.horizontalCenter: parent.horizontalCenter; + anchors.horizontalCenter: parent.horizontalCenter text: qsTr("Priming") color: Colors.textMain font.pixelSize: Fonts.fontPixelTitle } - TouchRect { + ProgressCircle { id: _circle anchors.horizontalCenter: parent.horizontalCenter - text.text: qsTr("CONTINUE TO TREATMENT") + minimum: 0 + maximum: vPriming.secondsTotal + diameter: 100 + value: vPriming.secondsRemaining + + PrimingTimer { id: _timeText + anchors.centerIn: parent + seconds : vPriming.secondsRemaining + completed: vPriming.currentState >= 4 + } + } + + Column { id: _checklist + spacing: 20 + anchors.horizontalCenter: parent.horizontalCenter + + CheckListItem { id: _checking_installation + anchors.horizontalCenter: parent.horizontalCenter + color: "transparent" + text: "Checking installation" + completed: vPriming.currentState >= 1 + } + + CheckListItem { id: _creating_dialysate + anchors.horizontalCenter: parent.horizontalCenter + color: "transparent" + text: "Creating dialysate" + completed: vPriming.currentState >= 2 + } + + CheckListItem { id: _priming_lines + anchors.horizontalCenter: parent.horizontalCenter + color: "transparent" + text: "Priming lines" + completed: vPriming.currentState >= 3 + } + } + + Text { id: _priming_complete + anchors.horizontalCenter: parent.horizontalCenter + text: "Priming Complete!" + color: vPriming.currentState >= 4 ? Colors.textMain : "transparent" + font.pixelSize: Fonts.primingFontSize + } + + TouchRect { id : _continueRect + anchors.horizontalCenter: parent.horizontalCenter + text.text: vPriming.continueBtnText + enabled: vPriming.currentState >= 4 + onEnabledChanged: { + if (enabled) { + borderColor = Colors.primingReady + textColor = Colors.primingReady + } else { + borderColor = Colors.primingNotReady + textColor = Colors.primingNotReady + } + } + button.onClicked: { - _root.continueClicked() + _root.clickedContinue() } } + + Rectangle { + id: _spacer + height: 75 + width: parent.width + color: "transparent" + } } } Index: sources/storage/filehandler.h =================================================================== diff -u -ra51b1ec80d65c7cf9f7f3b86f45a637a6d42efc1 -rf8321d4b6a5489f797122321a4821b4eeaaa50cb --- sources/storage/filehandler.h (.../filehandler.h) (revision a51b1ec80d65c7cf9f7f3b86f45a637a6d42efc1) +++ sources/storage/filehandler.h (.../filehandler.h) (revision f8321d4b6a5489f797122321a4821b4eeaaa50cb) @@ -16,7 +16,6 @@ // Qt #include -#include #include #include class QDate; Index: sources/storage/storageglobals.cpp =================================================================== diff -u -r846a9ebc350e33be4affab3cc4c136248900015d -rf8321d4b6a5489f797122321a4821b4eeaaa50cb --- sources/storage/storageglobals.cpp (.../storageglobals.cpp) (revision 846a9ebc350e33be4affab3cc4c136248900015d) +++ sources/storage/storageglobals.cpp (.../storageglobals.cpp) (revision f8321d4b6a5489f797122321a4821b4eeaaa50cb) @@ -13,7 +13,7 @@ * */ // Qt -#include + // Project #include "storageglobals.h" using namespace std; @@ -30,16 +30,10 @@ const char *Log_File_Name = "denali.log"; // Treatment -#ifdef QT_DEBUG - const char *Treatment_Base_Path_Name = "/home/denali/Desktop/treatment/"; - const char *Treatment_Profiles_Dir = "/home/denali/Desktop/treatment/profiles/"; - const char *Treatment_Parameter_Ranges_Path = "/home/denali/Desktop/treatment/denali.conf"; - const char *Treatment_Parameter_Ranges_Path_CSV = "/home/denali/Desktop/treatment/denali.csv"; -#else - const char *Treatment_Base_Path_Name = "/media/sd-card/treatment/"; + const char *Treatment_Base_Path_Name = "/media/sd-card/treatment/"; const char *Treatment_Profiles_Dir = "/media/sd-card/treatment/profiles/"; const char *Treatment_Parameter_Ranges_Path = "/media/sd-card/treatment/denali.conf"; const char *Treatment_Parameter_Ranges_Path_CSV = "/media/sd-card/treatment/denali.csv"; -#endif + const char *SDCard_Base_Path_Name = "/media/sd-card/"; } Index: sources/view/VTreatmentCreate.cpp =================================================================== diff -u -r6e4cc1f67e9290035b4e3a5be2eac04a85ae0c9a -rf8321d4b6a5489f797122321a4821b4eeaaa50cb --- sources/view/VTreatmentCreate.cpp (.../VTreatmentCreate.cpp) (revision 6e4cc1f67e9290035b4e3a5be2eac04a85ae0c9a) +++ sources/view/VTreatmentCreate.cpp (.../VTreatmentCreate.cpp) (revision f8321d4b6a5489f797122321a4821b4eeaaa50cb) @@ -32,6 +32,9 @@ this, SLOT(onStartTreatmentResponse(StartTreatmentResponseData))); loadTreatmentParameterRanges(); + + connect(this, SIGNAL(requestConcurrentSave(QString,QString,bool)), + &_FileSaver, SLOT(onConcurrentSave(QString,QString,bool))); } /** @@ -462,7 +465,7 @@ i++; } QString filename = QString("%0treatment%1.json").arg(dir).arg(i); - _FileSaver.concurrentSave(filename, document.toJson(), false); + emit requestConcurrentSave(filename, document.toJson(), false); return filename; } Index: sources/view/VTreatmentCreate.h =================================================================== diff -u -rf7b3e0bcd926f8aabc5caa1e76fce04aa8c5eb89 -rf8321d4b6a5489f797122321a4821b4eeaaa50cb --- sources/view/VTreatmentCreate.h (.../VTreatmentCreate.h) (revision f7b3e0bcd926f8aabc5caa1e76fce04aa8c5eb89) +++ sources/view/VTreatmentCreate.h (.../VTreatmentCreate.h) (revision f8321d4b6a5489f797122321a4821b4eeaaa50cb) @@ -148,6 +148,7 @@ void resetCreateTreatment(); void fwValidationFailed(QString reason); void scrollToParameter(QString parameter); + void requestConcurrentSave(QString, QString, bool); public slots: void onResetCreateTreatment(); Index: unittests/tst_models.cpp =================================================================== diff -u -ra51b1ec80d65c7cf9f7f3b86f45a637a6d42efc1 -rf8321d4b6a5489f797122321a4821b4eeaaa50cb --- unittests/tst_models.cpp (.../tst_models.cpp) (revision a51b1ec80d65c7cf9f7f3b86f45a637a6d42efc1) +++ unittests/tst_models.cpp (.../tst_models.cpp) (revision f8321d4b6a5489f797122321a4821b4eeaaa50cb) @@ -1386,84 +1386,79 @@ { QTest::addColumn("errorIndex"); QTest::addColumn("data"); - QTest::newRow("msg complete") << 0 << QByteArray::fromHex(QByteArray( - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00")); - - QTest::newRow("requestValid") << 1 << QByteArray::fromHex(QByteArray()); - - QTest::newRow("bloodFlowRate") << 2 << QByteArray::fromHex(QByteArray( - "00" "00" "00" "00")); - - QTest::newRow("dialysateFlowRate") << 3 << QByteArray::fromHex(QByteArray( - "00" "00" "00" "00" "00" "00" "00" "00" )); - - QTest::newRow("duration") << 4 << QByteArray::fromHex(QByteArray( - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" )); - - QTest::newRow("heparinDispensingRate") << 5 << QByteArray::fromHex(QByteArray( - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" )); - - QTest::newRow("heparinBolusVolume") << 6 << QByteArray::fromHex(QByteArray( - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" )); - - QTest::newRow("heparinStopTime") << 7 << QByteArray::fromHex(QByteArray( - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" - "00" "00" "00" "00" )); - QTest::newRow("salineBolus") << 8 << QByteArray::fromHex(QByteArray( - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" - "00" "00" "00" "00" "00" "00" "00" "00" )); - - QTest::newRow("acidConcentrate") << 9 << QByteArray::fromHex(QByteArray( - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" )); - - QTest::newRow("bicarbonateConcentrate") << 10 << QByteArray::fromHex(QByteArray( - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" )); - - QTest::newRow("dialyzerType") << 11 << QByteArray::fromHex(QByteArray( - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" )); - - QTest::newRow("dialysateTemp") << 12 << QByteArray::fromHex(QByteArray( - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" - "00" "00" "00" "00" )); - - QTest::newRow("arterialPressureLimitLow") << 13 << QByteArray::fromHex(QByteArray( - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" - "00" "00" "00" "00" "00" "00" "00" "00" )); - - QTest::newRow("arterialPressureLimitHigh") << 14 << QByteArray::fromHex(QByteArray( - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" )); - - QTest::newRow("venousPressureLimitLow") << 15 << QByteArray::fromHex(QByteArray( - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00")); - - QTest::newRow("venousPressureLimitHigh") << 16 << QByteArray::fromHex(QByteArray( - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00")); - - QTest::newRow("bloodPressureMeasureInterval") << 17 << QByteArray::fromHex(QByteArray( - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" - "00" "00" "00" "00" )); - - QTest::newRow("rinsebackFlowRate") << 18 << QByteArray::fromHex(QByteArray( - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" - "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" "00" - "00" "00" "00" "00" "00" "00" "00" "00" )); + QTest::newRow("msg complete") << 0 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2A" "2B" "2C" "2D" "2E" "2F" "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "3A" "3B" "3C" "3D" "3E" "3F" "40" "41" "42" "43" "44" "45" "46" "47")); + QTest::newRow("requestValid") << 1 << QByteArray::fromHex(QByteArray ()); + QTest::newRow("requestValid") << 1 << QByteArray::fromHex(QByteArray ("00")); + QTest::newRow("requestValid") << 1 << QByteArray::fromHex(QByteArray ("00" "01")); + QTest::newRow("requestValid") << 1 << QByteArray::fromHex(QByteArray ("00" "01" "02")); + QTest::newRow("bloodFlowRate") << 2 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" )); + QTest::newRow("bloodFlowRate") << 2 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04")); + QTest::newRow("bloodFlowRate") << 2 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05")); + QTest::newRow("bloodFlowRate") << 2 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06")); + QTest::newRow("dialysateFlowRate") << 3 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07")); + QTest::newRow("dialysateFlowRate") << 3 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08")); + QTest::newRow("dialysateFlowRate") << 3 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09")); + QTest::newRow("dialysateFlowRate") << 3 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A")); + QTest::newRow("duration") << 4 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B")); + QTest::newRow("duration") << 4 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C")); + QTest::newRow("duration") << 4 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D")); + QTest::newRow("duration") << 4 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E")); + QTest::newRow("heparinDispensingRate") << 5 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F")); + QTest::newRow("heparinDispensingRate") << 5 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10")); + QTest::newRow("heparinDispensingRate") << 5 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11")); + QTest::newRow("heparinDispensingRate") << 5 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12")); + QTest::newRow("heparinBolusVolume") << 6 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13")); + QTest::newRow("heparinBolusVolume") << 6 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14")); + QTest::newRow("heparinBolusVolume") << 6 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15")); + QTest::newRow("heparinBolusVolume") << 6 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16")); + QTest::newRow("heparinStopTime") << 7 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17")); + QTest::newRow("heparinStopTime") << 7 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18")); + QTest::newRow("heparinStopTime") << 7 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19")); + QTest::newRow("heparinStopTime") << 7 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A")); + QTest::newRow("salineBolus") << 8 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B")); + QTest::newRow("salineBolus") << 8 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C")); + QTest::newRow("salineBolus") << 8 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D")); + QTest::newRow("salineBolus") << 8 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E")); + QTest::newRow("acidConcentrate") << 9 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F")); + QTest::newRow("acidConcentrate") << 9 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20")); + QTest::newRow("acidConcentrate") << 9 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21")); + QTest::newRow("acidConcentrate") << 9 << QByteArray::fromHex(QByteArray ("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22")); + QTest::newRow("bicarbonateConcentrate") << 10 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23")); + QTest::newRow("bicarbonateConcentrate") << 10 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24")); + QTest::newRow("bicarbonateConcentrate") << 10 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25")); + QTest::newRow("bicarbonateConcentrate") << 10 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26")); + QTest::newRow("dialyzerType") << 11 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27")); + QTest::newRow("dialyzerType") << 11 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28")); + QTest::newRow("dialyzerType") << 11 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29")); + QTest::newRow("dialyzerType") << 11 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2A")); + QTest::newRow("dialysateTemp") << 12 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C")); + QTest::newRow("dialysateTemp") << 12 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D")); + QTest::newRow("dialysateTemp") << 12 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E")); + QTest::newRow("dialysateTemp") << 12 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F")); + QTest::newRow("arterialPressureLimitLow") << 13 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30")); + QTest::newRow("arterialPressureLimitLow") << 13 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30" "31")); + QTest::newRow("arterialPressureLimitLow") << 13 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30" "31" "32")); + QTest::newRow("arterialPressureLimitLow") << 13 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30" "31" "32" "33")); + QTest::newRow("arterialPressureLimitHigh") << 14 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30" "31" "32" "33" "34")); + QTest::newRow("arterialPressureLimitHigh") << 14 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30" "31" "32" "33" "34" "35")); + QTest::newRow("arterialPressureLimitHigh") << 14 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30" "31" "32" "33" "34" "35" "36")); + QTest::newRow("arterialPressureLimitHigh") << 14 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30" "31" "32" "33" "34" "35" "36" "37")); + QTest::newRow("venousPressureLimitLow") << 15 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30" "31" "32" "33" "34" "35" "36" "37" "38")); + QTest::newRow("venousPressureLimitLow") << 15 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30" "31" "32" "33" "34" "35" "36" "37" "38" "39")); + QTest::newRow("venousPressureLimitLow") << 15 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "3A")); + QTest::newRow("venousPressureLimitLow") << 15 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "3A" "3B")); + QTest::newRow("venousPressureLimitHigh") << 16 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "3A" "3B" "3C")); + QTest::newRow("venousPressureLimitHigh") << 16 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "3A" "3B" "3C" "3D")); + QTest::newRow("venousPressureLimitHigh") << 16 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "3A" "3B" "3C" "3D" "3E")); + QTest::newRow("venousPressureLimitHigh") << 16 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "3A" "3B" "3C" "3D" "3E" "3F")); + QTest::newRow("bloodPressureMeasureInterval") << 17 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "3A" "3B" "3C" "3D" "3E" "3F" "40")); + QTest::newRow("bloodPressureMeasureInterval") << 17 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "3A" "3B" "3C" "3D" "3E" "3F" "40" "41")); + QTest::newRow("bloodPressureMeasureInterval") << 17 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "3A" "3B" "3C" "3D" "3E" "3F" "40" "41" "42")); + QTest::newRow("bloodPressureMeasureInterval") << 17 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "3A" "3B" "3C" "3D" "3E" "3F" "40" "41" "42" "43")); + QTest::newRow("rinsebackFlowRate") << 18 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "3A" "3B" "3C" "3D" "3E" "3F" "40" "41" "42" "43" "44")); + QTest::newRow("rinsebackFlowRate") << 18 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "3A" "3B" "3C" "3D" "3E" "3F" "40" "41" "42" "43" "44" "45")); + QTest::newRow("rinsebackFlowRate") << 18 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "3A" "3B" "3C" "3D" "3E" "3F" "40" "41" "42" "43" "44" "45" "46")); + QTest::newRow("rinsebackFlowRate") << 18 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "3A" "3B" "3C" "3D" "3E" "3F" "40" "41" "42" "43" "44" "45" "46" "47")); } Index: unittests/tst_views.cpp =================================================================== diff -u -ra51b1ec80d65c7cf9f7f3b86f45a637a6d42efc1 -rf8321d4b6a5489f797122321a4821b4eeaaa50cb --- unittests/tst_views.cpp (.../tst_views.cpp) (revision a51b1ec80d65c7cf9f7f3b86f45a637a6d42efc1) +++ unittests/tst_views.cpp (.../tst_views.cpp) (revision f8321d4b6a5489f797122321a4821b4eeaaa50cb) @@ -15,12 +15,10 @@ #include "tst_views.h" // Qt -#include // Project #include "vtreatmentadjustmentresponsebase.h" #include "vtreatmentadjustmentultrafiltrationstate.h" -#include "MTreatmentParameters.h" #include "filehandler.h" tst_views::tst_views(QObject *parent) : QObject(parent) { } @@ -567,18 +565,32 @@ QString dir = QString("/tmp/newTreatment_%0.json").arg(QDateTime::currentDateTime().toString(datetimeFormat)); QString oldFilename = view.saveNewTreatment(objectWritten, dir); + QDateTime startTime = QDateTime::currentDateTime(); + int elapsedSeconds = 0; + while (!QFile(oldFilename).exists()) + { + elapsedSeconds = startTime.secsTo(QDateTime::currentDateTime()); + } - QThread::msleep(500); + startTime = QDateTime::currentDateTime(); QString filename = view.saveNewTreatment(objectWritten, dir); QVERIFY(oldFilename != filename); + QVERIFY(elapsedSeconds < 0.5); + elapsedSeconds = 0; + QJsonObject objectReadTemp; + while (!FileHandler::readJSON(filename, objectReadTemp) || (objectWritten != objectReadTemp)) + { + elapsedSeconds = startTime.secsTo(QDateTime::currentDateTime()); + } - QThread::msleep(500); + QVERIFY(elapsedSeconds < 0.5); QJsonObject objectRead; QVERIFY(FileHandler::readJSON(filename, objectRead)); QCOMPARE(objectWritten, objectRead); + } /*! @@ -724,7 +736,7 @@ QString path = QString("/tmp/ranges_%0.json").arg(QDateTime::currentDateTime().toString(datetimeFormat));; - _FileSaver.concurrentSave(path, document.toJson(), false); + _FileSaver.onConcurrentSave(path, document.toJson(), false); QThread::msleep(500); Index: unittests/tst_views.h =================================================================== diff -u -r846a9ebc350e33be4affab3cc4c136248900015d -rf8321d4b6a5489f797122321a4821b4eeaaa50cb --- unittests/tst_views.h (.../tst_views.h) (revision 846a9ebc350e33be4affab3cc4c136248900015d) +++ unittests/tst_views.h (.../tst_views.h) (revision f8321d4b6a5489f797122321a4821b4eeaaa50cb) @@ -28,6 +28,10 @@ explicit tst_views(QObject *parent = nullptr); private: QString datetimeFormat = "MM.dd.yyyy_HH.mm.ss"; + + void VCreateTreatment_init_ranges(QJsonObject &obj); + void VCreateTreatment_simulate_valid_parameters(View::VCreateTreatment &view); + private slots: void VTreatmentAdjustmentsResponse_text_NoReason(); void VTreatmentAdjustmentsResponse_text_WAReason(); @@ -42,7 +46,6 @@ void VCreateTreatment_save_csv(); void VCreateTreatment_enums(); void VCreateTreatment_fw_validation_response(); - void VCreateTreatment_init_ranges(QJsonObject &obj); void VCreateTreatment_load_parameter_ranges(); void VCreateTreatment_check_init(); };