diff options
author | tiansen <tian_sen@dl.cn.nexty-ele.com> | 2018-11-02 20:16:20 +0800 |
---|---|---|
committer | tiansen <tian_sen@dl.cn.nexty-ele.com> | 2018-11-02 20:16:20 +0800 |
commit | de4e4f75c59b1da4de91a75b3ab7b94d0ab8335f (patch) | |
tree | 16e4181f175748a5aff3f91b48449c37ec361e7a /app/main.qml | |
parent | ec044f44133cad1d12311345437b13b1a953226e (diff) |
restriction for ces2019sandbox/tiansen/ces2019_restrication
Diffstat (limited to 'app/main.qml')
-rw-r--r-- | app/main.qml | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/app/main.qml b/app/main.qml new file mode 100644 index 0000000..15369cf --- /dev/null +++ b/app/main.qml @@ -0,0 +1,67 @@ +import QtQuick 2.6 +import QtQuick.Controls 2.0 + +ApplicationWindow { + id: root + + color: "#00000000" + + Label { + id: message + anchors.top: parent.top + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + anchors.margins: 20 + font.pixelSize: 75 + wrapMode: Text.WordWrap + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + color: "white" + text: "Only the video’s sound will be available while driving." + } + + background : Image { + id: backgroundImg + anchors.fill: parent + anchors.topMargin: 0 + anchors.bottomMargin: 0 + + visible: true + fillMode: Image.Stretch + source: 'images/black_normal.png' + + state: "begin" + states: [ + State { + name: "begin" + PropertyChanges { target: backgroundImg; opacity: 0.25 } + }, + State { + name: "end" + PropertyChanges { target: backgroundImg; opacity: 0.75 } + } + ] + + transitions: [ + Transition { + from: "begin"; to: "end" + PropertyAnimation {target: backgroundImg; properties: "opacity"; duration: 2000} + } + ] + } + + function showImage(area) { + if (area === 'normal') { + backgroundImg.source = 'images/black_normal.png' + } else { + backgroundImg.source = 'images/black_split.png' + } + backgroundImg.state = "end" + } + + + function hideImage() { + backgroundImg.state = "begin" + } +} |