import QtQuick 2.11
import QtQuick.Controls 2.14
Item {
    id:root
    anchors.fill: parent

    property string  positiveOpenPressure1
    property string  positiveOpenPressure2
    property string  positiveOpenPressure3
    property string  positiveSealPressure1
    property string  positiveSealPressure2
    property string  positiveSealPressure3

    property string  negativeOpenPressure1
    property string  negativeOpenPressure2
    property string  negativeOpenPressure3
    property string  negativeSealPressure1
    property string  negativeSealPressure2
    property string  negativeSealPressure3

    property string  capsizeSealPressure1
    property string  capsizeSealPressure2
    property string  capsizeSealPressure3

    property alias  swipeview:view


    SwipeView {
        id: view
        currentIndex: pageIndicator.currentIndex
        anchors.fill: parent
        clip: true

        Rectangle {
            Item {
                id:positiveReuslt
                anchors.fill: parent
                anchors.margins: 10
                property int resultHeight: 25
                Column{
                    anchors.centerIn: parent
                    ResultDisplayText{
                        width: positiveReuslt.width
                        height: positiveReuslt.resultHeight
                        color: "white"
                        paraName: "正压开启压力"
                        paraResult:""
                        paraUnit:""
                    }
                    ResultDisplayText{
                        width: positiveReuslt.width
                        height: positiveReuslt.resultHeight
                        color: "#D2D5D9"
                        paraName: "第一次："
                        paraResult:positiveOpenPressure1
                        paraUnit:"kPa"
                    }
                    ResultDisplayText{
                        width: positiveReuslt.width
                        height: positiveReuslt.resultHeight
                        color: "#DFE2E6"
                        paraName: "第二次："
                        paraResult:positiveOpenPressure2
                        paraUnit:"kPa"
                    }
                    ResultDisplayText{
                        width: positiveReuslt.width
                        height: positiveReuslt.resultHeight
                        color: "#D2D5D9"
                        paraName: "第三次："
                        paraResult:positiveOpenPressure3
                        paraUnit:"kPa"
                    }
                    ResultDisplayText{
                        width: positiveReuslt.width
                        height: positiveReuslt.resultHeight
                        color: "white"
                        paraName: ""
                        paraResult:""
                        paraUnit:""
                    }
                    ResultDisplayText{
                        width: positiveReuslt.width
                        height: positiveReuslt.resultHeight
                        color: "white"
                        paraName: "正压密封压力"
                        paraResult:""
                        paraUnit:""
                    }
                    ResultDisplayText{
                        width: positiveReuslt.width
                        height: positiveReuslt.resultHeight
                        color: "#DFE2E6"
                        paraName: "第一次："
                        paraResult:positiveSealPressure1
                        paraUnit:"kPa"
                    }
                    ResultDisplayText{
                        width: positiveReuslt.width
                        height: positiveReuslt.resultHeight
                        color: "#D2D5D9"
                        paraName: "第二次："
                        paraResult:positiveSealPressure2
                        paraUnit:"kPa"
                    }
                    ResultDisplayText{
                        width: positiveReuslt.width
                        height: positiveReuslt.resultHeight
                        color: "#DFE2E6"
                        paraName: "第三次："
                        paraResult:positiveSealPressure3
                        paraUnit:"kPa"
                    }

                }
            }

        }
        Rectangle {
            Item {
                id:negativeReuslt
                anchors.fill: parent
                anchors.margins: 10
                property int resultHeight: 25
                Column{
                    anchors.centerIn: parent
                    ResultDisplayText{
                        width: negativeReuslt.width
                        height: negativeReuslt.resultHeight
                        color: "white"
                        paraName: "负压开启压力"
                        paraResult:""
                        paraUnit:""
                    }
                    ResultDisplayText{
                        width: negativeReuslt.width
                        height: negativeReuslt.resultHeight
                        color: "#D2D5D9"
                        paraName: "第一次："
                        paraResult:negativeOpenPressure1
                        paraUnit:"kPa"
                    }
                    ResultDisplayText{
                        width: negativeReuslt.width
                        height: negativeReuslt.resultHeight
                        color: "#DFE2E6"
                        paraName: "第二次："
                        paraResult:negativeOpenPressure2
                        paraUnit:"kPa"
                    }
                    ResultDisplayText{
                        width: negativeReuslt.width
                        height: negativeReuslt.resultHeight
                        color: "#D2D5D9"
                        paraName: "第三次："
                        paraResult:negativeOpenPressure3
                        paraUnit:"kPa"
                    }
                    ResultDisplayText{
                        width: negativeReuslt.width
                        height: negativeReuslt.resultHeight
                        color: "white"
                        paraName: ""
                        paraResult:""
                        paraUnit:""
                    }
                    ResultDisplayText{
                        width: negativeReuslt.width
                        height: negativeReuslt.resultHeight
                        color: "white"
                        paraName: "负压密封压力"
                        paraResult:""
                        paraUnit:""
                    }
                    ResultDisplayText{
                        width: negativeReuslt.width
                        height: negativeReuslt.resultHeight
                        color: "#DFE2E6"
                        paraName: "第一次："
                        paraResult:negativeSealPressure1
                        paraUnit:"kPa"
                    }
                    ResultDisplayText{
                        width: negativeReuslt.width
                        height: negativeReuslt.resultHeight
                        color: "#D2D5D9"
                        paraName: "第二次："
                        paraResult:negativeSealPressure2
                        paraUnit:"kPa"
                    }
                    ResultDisplayText{
                        width: negativeReuslt.width
                        height: negativeReuslt.resultHeight
                        color: "#DFE2E6"
                        paraName: "第三次："
                        paraResult:negativeSealPressure3
                        paraUnit:"kPa"
                    }

                }
            }

        }
        Rectangle {
            Item {
                id:capsizeReuslt
                anchors.fill: parent
                anchors.margins: 10
                property int resultHeight: 25
                Column{
                    anchors.centerIn: parent
                    ResultDisplayText{
                        width: capsizeReuslt.width
                        height: capsizeReuslt.resultHeight
                        color: "white"
                        paraName: "倾覆密封压力"
                        paraResult:""
                        paraUnit:""
                    }
                    ResultDisplayText{
                        width: capsizeReuslt.width
                        height: capsizeReuslt.resultHeight
                        color: "#D2D5D9"
                        paraName: "90°:"
                        paraResult:capsizeSealPressure1
                        paraUnit:"kPa"
                    }
                    ResultDisplayText{
                        width: capsizeReuslt.width
                        height: capsizeReuslt.resultHeight
                        color: "#DFE2E6"
                        paraName: "180°:"
                        paraResult:capsizeSealPressure2
                        paraUnit:"kPa"
                    }
                    ResultDisplayText{
                        width: capsizeReuslt.width
                        height: capsizeReuslt.resultHeight
                        color: "#D2D5D9"
                        paraName: "270°:"
                        paraResult:capsizeSealPressure3
                        paraUnit:"kPa"
                    }
                }
            }
        }

    }

    PageIndicator {
        id: pageIndicator
        interactive: true
        count: view.count
        currentIndex: view.currentIndex

        anchors.bottom: parent.bottom
        anchors.horizontalCenter: parent.horizontalCenter
    }
}




