Index: denali.pro.user =================================================================== diff -u -rc8eb6d0e29f8951a793b2f52d11a08b9902470ee -r305d411b4bc617d858075f5750dea487d707bebb --- denali.pro.user (.../denali.pro.user) (revision c8eb6d0e29f8951a793b2f52d11a08b9902470ee) +++ denali.pro.user (.../denali.pro.user) (revision 305d411b4bc617d858075f5750dea487d707bebb) @@ -1,6 +1,6 @@ - + EnvironmentId @@ -60,28 +60,15 @@ ProjectExplorer.Project.PluginSettings - - - true - Builtin.Questionable - - true - Builtin.DefaultTidyAndClazy - 2 - - - - true - - + ProjectExplorer.Project.Target.0 Desktop Qt 5.12.5 GCC 64bit Desktop Qt 5.12.5 GCC 64bit qt.qt5.5125.gcc_64_kit - 11 + 1 0 0 @@ -1177,7 +1164,7 @@ false true - /home/denali/Project/tmp/build/unittest/tst_messaging + /home/denali/Project/tmp/build/denali-Desktop_Qt_5_12_5_GCC_64bit-Release 1 @@ -1188,7 +1175,7 @@ Qt 5.12.5 (iMX8) Qt 5.12.5 (iMX8) {5d6458ef-f917-4aef-a092-c77bbe106149} - 1 + 0 0 0 @@ -1257,7 +1244,7 @@ QtProjectManager.QMakeBuildStep false - false + true false false @@ -1466,8 +1453,8 @@ 1 - denali (on Generic Linux Device) - denali (on Generic Linux Device) + denali (on Generic Linux Device (iMX8)) + denali (on Generic Linux Device (iMX8)) RemoteLinuxRunConfiguration:/home/denali/Project/application/denali.pro 1 Index: sources/gui/qml/components/TouchRect.qml =================================================================== diff -u -r44a85c96ab55e424866ec4cca0270aa218355f82 -r305d411b4bc617d858075f5750dea487d707bebb --- sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision 44a85c96ab55e424866ec4cca0270aa218355f82) +++ sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision 305d411b4bc617d858075f5750dea487d707bebb) @@ -33,6 +33,8 @@ property int duration : 200 property bool disabled : false + property bool selectable : false + property bool selected : false property color textColor : Colors.textButton property color borderColor : Colors.borderButton @@ -82,10 +84,26 @@ color: textColor font.pixelSize: Fonts.fontPixelButton } + + function setSelected(isSelected) { + _root.selected = isSelected + if (_root.selected) { + _root.color = Colors.backgroundBtnSelectDark + } + else { + _root.color = backgroundColor + } + } + MouseArea { id: _mouseArea anchors.fill: parent onClicked : { if ( disabled ) { return } + if (selectable) { + setSelected(!selected) + _root.clicked() + return + } animate(true) _root.clicked() } Index: sources/gui/qml/globals/Colors.qml =================================================================== diff -u -r44a85c96ab55e424866ec4cca0270aa218355f82 -r305d411b4bc617d858075f5750dea487d707bebb --- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 44a85c96ab55e424866ec4cca0270aa218355f82) +++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 305d411b4bc617d858075f5750dea487d707bebb) @@ -26,6 +26,7 @@ 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" Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -rc8eb6d0e29f8951a793b2f52d11a08b9902470ee -r305d411b4bc617d858075f5750dea487d707bebb --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision c8eb6d0e29f8951a793b2f52d11a08b9902470ee) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 305d411b4bc617d858075f5750dea487d707bebb) @@ -78,7 +78,6 @@ readonly property int sliderTextMargin : 20 readonly property int cTreatmentSpacing : 60 - readonly property real scrollBarSize : 0.2 readonly property int notificationHeight : 50 readonly property int notificationIconSize : 36 Index: sources/gui/qml/pages/treatment/TreatmentCreate.qml =================================================================== diff -u -rc8eb6d0e29f8951a793b2f52d11a08b9902470ee -r305d411b4bc617d858075f5750dea487d707bebb --- sources/gui/qml/pages/treatment/TreatmentCreate.qml (.../TreatmentCreate.qml) (revision c8eb6d0e29f8951a793b2f52d11a08b9902470ee) +++ sources/gui/qml/pages/treatment/TreatmentCreate.qml (.../TreatmentCreate.qml) (revision 305d411b4bc617d858075f5750dea487d707bebb) @@ -30,6 +30,7 @@ // Qt import QtQuick 2.12 import QtQuick.Controls 2.12 +import QtQuick.Layouts 1.12 // Project // Qml imports @@ -67,95 +68,162 @@ anchors.bottom: parent.bottom width: parent.width contentWidth: parent.width - contentHeight: parent.height + contentHeight: _column.implicitHeight clip: true - Rectangle { - color: "transparent"; + Column { + id: _column + spacing: Variables.cTreatmentSpacing + anchors.horizontalCenter: parent.horizontalCenter; anchors.fill: parent; - Column { - spacing: Variables.cTreatmentSpacing + + Text { id: _titleText anchors.horizontalCenter: parent.horizontalCenter; - anchors.fill: parent; + text: qsTr("Create a Custom Treatment") + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } - Text { id: _titleText - anchors.horizontalCenter: parent.horizontalCenter; - text: qsTr("Create a Custom Treatment") - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } + Text { + anchors.horizontalCenter: parent.horizontalCenter; + text: qsTr("PRESCRIPTION"); + color: Colors.textMain; + font.pixelSize: Fonts.fontPixelButton + font.bold: true + } + + SliderCreateTreatment { + id: _bloodFlowRate + text: "Blood Flow Rate" + units: qsTr(" mL/min") + min: 100 + max: 500 + } + + SliderCreateTreatment { + id: _dialysateFlowRate + text: "Dialysate Flow Rate" + units: qsTr(" mL/min") + min: 100 + max: 600 + } + + SliderCreateTreatment { + id: _duration + text: "Duration" + units: qsTr(" min") + min: 60 + max: 480 + } + + SliderCreateTreatment { + id: _heparinDispensingRate + text: "Heparin Dispensing Rate" + units: qsTr(" IU/hr") + min: 0 + max: 1000 + } + + SliderCreateTreatment { + id: _heparinBolusVolume + text: "Heparin Bolus Volume" + units: qsTr(" IU") + min: 100 + max: 2000 + } + + // TODO: if possible, make this a component + Rectangle { + id: _rectInfusionSolBolus + anchors.horizontalCenter: parent.horizontalCenter + color: "transparent" + property int numRows: 1 + property int numCols: 3 + property int buttonHeight: 96 + property int buttonWidth: 214 + height: numRows * buttonHeight + width: numCols * buttonWidth + Text { - anchors.horizontalCenter: parent.horizontalCenter; - text: qsTr("PRESCRIPTION"); + id: _infusionSolutionBolus + text: "Infusion Solution Bolus" + font.pixelSize: Fonts.fontPixelFluidText color: Colors.textMain; - font.pixelSize: Fonts.fontPixelButton - font.bold: true - } - SliderCreateTreatment { - id: _bloodFlowRate - text: "Blood Flow Rate" - units: qsTr(" mL/min") - min: 100 - max: 500 - } + GridLayout { + id: _grid + anchors.top: _infusionSolutionBolus.bottom + anchors.topMargin: Variables.sliderTextMargin + rows: parent.numRows + columns: parent.numCols - SliderCreateTreatment { - id: _dialysateFlowRate - text: "Dialysate Flow Rate" - units: qsTr(" mL/min") - min: 100 - max: 600 - } + TouchRect { + id: _100mL + text.text: "100 mL"; + selectable: true + height: _rectInfusionSolBolus.buttonHeight + width: _rectInfusionSolBolus.buttonWidth + radius: 0 + onClicked: { + _200mL.setSelected(false) + _300mL.setSelected(false) + } + } - SliderCreateTreatment { - id: _duration - text: "Duration" - units: qsTr(" min") - min: 60 - max: 480 - } + TouchRect { + id: _200mL + text.text: "200 mL"; + selectable: true + height: _rectInfusionSolBolus.buttonHeight + width: _rectInfusionSolBolus.buttonWidth + radius: 0 + onClicked: { + _300mL.setSelected(false) + _100mL.setSelected(false) + } + } - SliderCreateTreatment { - id: _heparinDispensingRate - text: "Heparin Dispensing Rate" - units: qsTr(" IU/hr") - min: 0 - max: 1000 + TouchRect { + id: _300mL + text.text: "300 mL"; + selectable: true + height: _rectInfusionSolBolus.buttonHeight + width: _rectInfusionSolBolus.buttonWidth + radius: 0 + animated: true + duration: 50 + onClicked: { + _100mL.setSelected(false) + _200mL.setSelected(false) + } + } } - SliderCreateTreatment { - id: _heparinBolusVolume - text: "Heparin Bolus Volume" - units: qsTr(" IU") - min: 100 - max: 2000 - } + } - TouchRect { id : _continueRect - anchors.horizontalCenter: parent.horizontalCenter - text.text: qsTr("CONTINUE") - button.onClicked: _root.clickedContinue() - } + TouchRect { id : _continueRect + anchors.horizontalCenter: parent.horizontalCenter + text.text: qsTr("CONTINUE") + button.onClicked: _root.clickedContinue() } } + } - states: State { - when: _flickable.movingVertically - PropertyChanges { - target: _verticalScrollBar - opacity: 0.8 - } + states: State { + when: _flickable.movingVertically + PropertyChanges { + target: _verticalScrollBar + opacity: 0.8 } } ScrollBar { anchors.top: _flickable.top anchors.bottom: _flickable.bottom id: _verticalScrollBar - size: Variables.scrollBarSize + size: _flickable.height / _column.implicitHeight active: true anchors.right: _flickable.right anchors.rightMargin: 5