diff options
author | Philippe Lelong <lelong.ph@meltemus.com> | 2016-12-20 10:19:29 +0100 |
---|---|---|
committer | Philippe Lelong <lelong.ph@meltemus.com> | 2016-12-20 10:19:29 +0100 |
commit | 4eb645957cea169d10dd7543c5bb5a294fc737ad (patch) | |
tree | ffed73d274ef7086939901e34d91ca3fc3747e57 /HomeScreen/qml | |
parent | e64b4751e3a6fc70b7a83c6aae2cd180a4284807 (diff) |
Add logout button in home screen
Signed-off-by: Philippe Lelong <lelong.ph@meltemus.com>
Diffstat (limited to 'HomeScreen/qml')
-rw-r--r-- | HomeScreen/qml/Home.qml | 38 | ||||
-rwxr-xr-x | HomeScreen/qml/images/Home/Logout-01.png | bin | 0 -> 8868 bytes | |||
-rw-r--r-- | HomeScreen/qml/images/Home/home.qrc | 1 |
3 files changed, 36 insertions, 3 deletions
diff --git a/HomeScreen/qml/Home.qml b/HomeScreen/qml/Home.qml index 7d6fb74..ba7e1af 100644 --- a/HomeScreen/qml/Home.qml +++ b/HomeScreen/qml/Home.qml @@ -24,6 +24,7 @@ Item { id: root property int pid: -1 signal languageChanged + signal disconnect Image { anchors.fill: parent @@ -82,14 +83,15 @@ Item { Text { id: helloText anchors.centerIn: parent - color: "white" - text: "No Authenticated User" + color: 'white' + text: 'No Authenticated User' font.pixelSize: 40 - font.family: "Roboto" + font.family: 'Roboto' SequentialAnimation on font.letterSpacing { id: animation1 loops: 1; NumberAnimation { from: 0; to: 50; easing.type: Easing.InQuad; duration: 3000 } + running: false onRunningChanged: { if(running) { hello.visible = true @@ -103,6 +105,7 @@ Item { SequentialAnimation on opacity { id: animation2 loops: 1; + running: false NumberAnimation { from: 1; to: 0; duration: 2600 } PauseAnimation { duration: 400 } } @@ -175,4 +178,33 @@ Item { } } } + Image { + id: logout + width: sourceSize.width + height: sourceSize.height + anchors.bottom: parent.bottom + anchors.right: parent.right + anchors.bottomMargin: 10 + anchors.rightMargin: 20 + source: './images/Logout-01.png' + visible: true + MouseArea { + anchors.fill: parent + onClicked: { + rotateLogout.start() + disconnect() + helloText.text= 'No Authenticated User' + + } + } + RotationAnimator { + id: rotateLogout + target: logout; + from: 0; + to: 360; + loops: 1 + duration: 500 + running: false + } + } } diff --git a/HomeScreen/qml/images/Home/Logout-01.png b/HomeScreen/qml/images/Home/Logout-01.png Binary files differnew file mode 100755 index 0000000..0183565 --- /dev/null +++ b/HomeScreen/qml/images/Home/Logout-01.png diff --git a/HomeScreen/qml/images/Home/home.qrc b/HomeScreen/qml/images/Home/home.qrc index 8bef69d..a9d1dc3 100644 --- a/HomeScreen/qml/images/Home/home.qrc +++ b/HomeScreen/qml/images/Home/home.qrc @@ -23,5 +23,6 @@ <file>visa.png</file> <file>french_flag.png</file> <file>us_flag.png</file> + <file>Logout-01.png</file> </qresource> </RCC> |