/*!
 *
 * Copyright (c) 2021-2022 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    TreatmentBloodPrime.qml
 * \author  (last)      Behrouz NematiPour
 * \date    (last)      23-Oct-2022
 * \author  (original)  Behrouz NematiPour
 * \date    (original)  11-Apr-2021
 *
 */

// Qt
import QtQuick 2.12

// Project
//  Qml imports
import "qrc:/globals"
import "qrc:/components"
import "qrc:/pages/treatment/sections"

/*!
 * \brief   the in-treatment Blood Prime screen
 */
ScreenItem { id: _root
    objectName: "_TreatmentBloodPrime"

    Text { id: _title
        anchors {
            top: parent.top
            topMargin: 65
            horizontalCenter: parent.horizontalCenter
        }
        color: Colors.textMain
        text: qsTr("Blood Priming")
        font.pixelSize: Fonts.fontPixelTitle
    }

    ProgressCircle { id: _circle
        diameter: 335
        anchors.centerIn: parent
        minimum : 0
        maximum : vTreatmentBloodPrime.target
        value   : vTreatmentBloodPrime.current

        Text { id: _textVolume
            anchors.centerIn: parent
            color: Colors.textMain
            text: vTreatmentBloodPrime.current.toFixed(0) + " " + qsTr(Variables.unitTextFluid)
            font.pixelSize: 76
            font.weight: Font.ExtraLight

        }
    }

    TreatmentPressures          { id: _pressuresTouchArea
        arterialMinimum     : vTreatmentRanges.arterialPressureMonitorMin
        arterialMaximum     : vTreatmentRanges.arterialPressureMonitorMax
        venousMinimum       : vTreatmentRanges.venousPressureMonitorMin
        venousMaximum       : vTreatmentRanges.venousPressureMonitorMax

        arterialPressure    : vTreatmentPressureOcclusion.arterialPressure
        venousPressure      : vTreatmentPressureOcclusion.venousPressure

        isTouchable         : false
        valueOutRangeNotify : false
        x       : Variables.screenGridLeftColumnX
        y       : Variables.screenGridRow1Y
        width   : Variables.screenGridAreaWidth
        height  : Variables.screenGridAreaHeightRow1
    }
    Line { x: 0; y: Variables.screenGridRow1LineY; length: Variables.screenGridLineLength }

    onVisibleChanged: {
        if (visible) {
            _mainMenu.hidden = true
        }
    }
}
