PopupWarning.qml 1.15 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
import QtQuick 2.9
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import App 1.0

Popup {
    id: popup
    modal: true
    focus: true
    closePolicy: Popup.CloseOnEscape
    leftMargin: 125
    topPadding: 50
    leftPadding: 20
    rightPadding: 140


    background: Image {
        id: backImage
        width: 550
        height: 368
        fillMode: Image.PreserveAspectFit
        source: "Assets/Background/EVCS_infobox_550x368.png"
        MouseArea
        {
            anchors.fill: parent
            onClicked:
            {
                if ( mouse.x > 485 && mouse.x < 524 && mouse.y > 17 && mouse.y < 56 )
                    popup.close();
            }
        }
    }

    contentItem: Item {
        ColumnLayout {
            anchors.centerIn: parent
            SwitchBase {
                text: qsTr("Wi-Fi")

                onSignalError: console.log( "WifiErrror" );
            }
            SwitchBase {
                text: qsTr("Bluetooth")
            }
            SwitchBase {
                text: qsTr("Connection")
            }
            SwitchBase {
                text: qsTr("Unknown")
            }
        }
    }
}