Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -rab7ffd27ecea1277d8645a8b62ff48c0cb3f6ff4 -r5c21e83a3fdc897cb99ac62e1cec0213f411cd73 --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision ab7ffd27ecea1277d8645a8b62ff48c0cb3f6ff4) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 5c21e83a3fdc897cb99ac62e1cec0213f411cd73) @@ -15,6 +15,7 @@ // Qt import QtQuick 2.12 +import QtCharts 2.3 // Qml imports import "qrc:/globals" @@ -42,8 +43,6 @@ readonly property bool isSBInProgress : ( vHDTreatmentStates.sbRunning || vHDTreatmentStates.sbWaitPump ) - signal backClicked - // Components MainMenu { id: _treatmentMenu y : Variables.mainMenuHeight * -1 @@ -55,6 +54,11 @@ partitionWidth : 100 // Todo Important : max width should be the width for all bottons hasRightText : true hasLogo : true + onCurrentIndexChanged: { + console.debug(currentIndex) + if (currentIndex == 1) push(_treatmentTrending) + if (currentIndex == 0) pop() + } } TreatmentBloodPrime { id: _treatmentBloodPrime } @@ -78,6 +82,60 @@ } } + ScreenItem { id: _treatmentTrending + Timer { id: _timer + property real x1: 0 + property real x2: 0 + interval: 500 + running: _treatmentTrending.visible + repeat: true + onTriggered: { + x1 = x1 + 1 + x2 = x2 + 0.1 + + var r = Math.random() + _lineSerries1.append(x1, r * 10 ) + _lineSerries2.append(x2, r ) + } + } + ChartView { + title: "Line" + anchors.fill: parent + antialiasing: true + backgroundColor: Colors.transparent + ValueAxis { id: xAxis1 + color: Colors.white + min: 0 + max: _timer.x1 + } + ValueAxis { id: yAxis1 + color: Colors.white + min: 0 + max: 10 + } + SplineSeries { id: _lineSerries1 + name: "LineSeries" + axisX: xAxis1 + axisY: yAxis1 + } + ValueAxis { id: xAxis2 + color: Colors.white + min: 0 + max: _timer.x2 + } + ValueAxis { id: yAxis2 + color: Colors.white + min: 0 + max: 10 + } + SplineSeries { id: _lineSerries2 + name: "LineSeries" + axisX: xAxis2 + axisY: yAxis2 + } + } + } + //// Treatment Adjustment Dialogs TreatmentAdjustmentFlow { id: _treatmentAdjustmentFlow onConfirmClicked : vTreatmentAdjustmentFlows.doAdjustment(bloodFlowRateValue, dialysateFlowRateValue)