2019-09-26 22:34:51 +02:00
|
|
|
|
|
|
|
import QtQuick 2.12
|
|
|
|
import QtQuick.Controls 2.12
|
|
|
|
import QtQuick.Dialogs 1.3
|
|
|
|
import QtAndroidTools 1.0
|
|
|
|
|
|
|
|
Page {
|
|
|
|
id: page
|
|
|
|
padding: 0
|
|
|
|
|
2019-09-29 21:49:23 +02:00
|
|
|
Connections {
|
|
|
|
target: QtAndroidGoogleAccount
|
2019-10-01 23:13:20 +02:00
|
|
|
onSignedInAccountChanged: accountPhoto.source = "image://SignedInAccountPhoto"
|
2019-09-29 21:49:23 +02:00
|
|
|
onSignedIn: {
|
|
|
|
if(signInSuccessfully === true)
|
2019-10-01 23:13:20 +02:00
|
|
|
{
|
2019-09-29 21:49:23 +02:00
|
|
|
}
|
|
|
|
}
|
2019-09-30 22:10:35 +02:00
|
|
|
onSignedOut: {
|
|
|
|
accountPhoto.source = "";
|
|
|
|
}
|
2019-09-29 21:49:23 +02:00
|
|
|
}
|
|
|
|
|
2019-09-26 22:34:51 +02:00
|
|
|
Column {
|
2019-09-29 21:49:23 +02:00
|
|
|
width: parent.width * 0.9
|
|
|
|
height: parent.height * 0.9
|
|
|
|
anchors.centerIn: parent
|
2019-09-26 22:34:51 +02:00
|
|
|
spacing: 5
|
|
|
|
|
|
|
|
Label {
|
|
|
|
font.pixelSize: 15
|
2019-10-01 23:13:20 +02:00
|
|
|
text: "<b>Id:</b> " + QtAndroidGoogleAccount.signedInAccount.id
|
2019-09-26 22:34:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
font.pixelSize: 15
|
2019-10-01 23:13:20 +02:00
|
|
|
text: "<b>DisplayName:</b> " + QtAndroidGoogleAccount.signedInAccount.displayName
|
2019-09-26 22:34:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
font.pixelSize: 15
|
2019-10-01 23:13:20 +02:00
|
|
|
text: "<b>Email:</b> " + QtAndroidGoogleAccount.signedInAccount.email
|
2019-09-26 22:34:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
font.pixelSize: 15
|
2019-10-01 23:13:20 +02:00
|
|
|
text: "<b>FamilyName:</b> " + QtAndroidGoogleAccount.signedInAccount.familyName
|
2019-09-26 22:34:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
font.pixelSize: 15
|
2019-10-01 23:13:20 +02:00
|
|
|
text: "<b>GivenName:</b> " + QtAndroidGoogleAccount.signedInAccount.givenName
|
2019-09-26 22:34:51 +02:00
|
|
|
}
|
2019-09-30 22:10:35 +02:00
|
|
|
|
2019-09-26 22:34:51 +02:00
|
|
|
Label {
|
|
|
|
font.pixelSize: 15
|
2019-09-30 22:10:35 +02:00
|
|
|
text: "<b>Photo:</b> "
|
2019-09-26 22:34:51 +02:00
|
|
|
}
|
2019-09-27 16:13:24 +02:00
|
|
|
Image {
|
2019-09-29 21:49:23 +02:00
|
|
|
id: accountPhoto
|
2019-09-30 22:10:35 +02:00
|
|
|
width: 100
|
|
|
|
height: 100
|
2019-09-27 16:13:24 +02:00
|
|
|
}
|
|
|
|
|
2019-09-26 22:34:51 +02:00
|
|
|
Button {
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2019-10-01 23:13:20 +02:00
|
|
|
text: "sigIn"
|
2020-01-07 04:40:17 +01:00
|
|
|
onClicked: QtAndroidGoogleAccount.signIn(QtAndroidGoogleDrive.SCOPE_DRIVE)
|
2019-09-30 22:10:35 +02:00
|
|
|
}
|
|
|
|
Button {
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2019-10-01 23:13:20 +02:00
|
|
|
text: "sigIn select account"
|
2020-01-07 04:40:17 +01:00
|
|
|
onClicked: QtAndroidGoogleAccount.signInSelectAccount(QtAndroidGoogleDrive.SCOPE_DRIVE)
|
2019-09-30 22:10:35 +02:00
|
|
|
}
|
|
|
|
Button {
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
text: "signOut"
|
|
|
|
onClicked: QtAndroidGoogleAccount.signOut()
|
2019-09-26 22:34:51 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|