diff options
author | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2019-06-06 15:55:19 +0900 |
---|---|---|
committer | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2019-06-06 15:55:19 +0900 |
commit | e3767af1a9d44abe2ea88ba85ff004cbdaefc21c (patch) | |
tree | a37b5acf083661b56b5db8fa114faf060d3af221 /homescreen/qml | |
parent | f266dcd35564ea649ed1435a3ab7a3abbef900d9 (diff) |
add vui buttonsandbox/wangzhiqiang/als2019
Diffstat (limited to 'homescreen/qml')
-rw-r--r-- | homescreen/qml/images/images.qrc | 1 | ||||
-rw-r--r-- | homescreen/qml/images/voice.png | bin | 0 -> 6581 bytes | |||
-rw-r--r-- | homescreen/qml/main.qml | 40 |
3 files changed, 39 insertions, 2 deletions
diff --git a/homescreen/qml/images/images.qrc b/homescreen/qml/images/images.qrc index 39f7eb6..2e09cc9 100644 --- a/homescreen/qml/images/images.qrc +++ b/homescreen/qml/images/images.qrc @@ -11,5 +11,6 @@ <file>fullscreen.png</file> <file>normal.png</file> <file>normal_disable.png</file> + <file>voice.png</file> </qresource> </RCC> diff --git a/homescreen/qml/images/voice.png b/homescreen/qml/images/voice.png Binary files differnew file mode 100644 index 0000000..80f2a5a --- /dev/null +++ b/homescreen/qml/images/voice.png diff --git a/homescreen/qml/main.qml b/homescreen/qml/main.qml index a8d095b..de833a9 100644 --- a/homescreen/qml/main.qml +++ b/homescreen/qml/main.qml @@ -142,13 +142,15 @@ Window { container.state = 'fullscreen' touchArea.switchArea(1) homescreenHandler.tapShortcut(appName, true) - container.opacity = 0.0 + container.visible = false + voiceBtn.visible = false } else { image.source = './images/normal.png' container.state = 'normal' touchArea.switchArea(0) homescreenHandler.tapShortcut(appName, false) - container.opacity = 1.0 + container.visible = true + voiceBtn.visible = true } } } @@ -189,6 +191,7 @@ Window { image.visible = true touchArea.switchArea(0) container.opacity = 1.0 + voiceBtn.visible = true } } @@ -199,6 +202,7 @@ Window { image.visible = false touchArea.switchArea(1) container.opacity = 0.0 + voiceBtn.visible = false } } @@ -293,4 +297,36 @@ Window { notificationTimer.restart() } } + + Connections { + target: homescreenVoice + onStatusChanged: { + voiceBtn.visible = status + } + } + + Item { + id: voiceBtn + width: 110 + height: 110 + anchors.bottom: parent.bottom + anchors.right: parent.right + anchors.bottomMargin: 50 + anchors.rightMargin: 0 + visible: true + Image { + id: voiceimage + anchors.left: parent.left + anchors.top: parent.top + width: 110 + height: 110 + source: './images/voice.png' + } + MouseArea { + anchors.fill: parent + onClicked: { + homescreenVoice.startListening(); + } + } + } } |