id: root
property int pid: -1
signal languageChanged
+ signal disconnect
Image {
anchors.fill: parent
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
SequentialAnimation on opacity {
id: animation2
loops: 1;
+ running: false
NumberAnimation { from: 1; to: 0; duration: 2600 }
PauseAnimation { duration: 400 }
}
}
}
}
+ 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
+ }
+ }
}
UserManagement::UserManagement(QObject *root) : QObject()
{
home = root->findChild<QObject *>("Home");
+ QObject::connect(home, SIGNAL(disconnect()),
+ this, SLOT(slot_disconnect()));
logo = root->findChild<QObject *>("Logo_colour");
shortcutArea = root->findChild<QObject *>("ShortcutArea");
statusArea = root->findChild<QObject *>("StatusArea");
launchServer();
#endif
}
+void UserManagement::slot_disconnect()
+{
+ appModel->changeOrder(-1);
+ timerRed.stop();
+ slot_turnOffRed();
+ QMetaObject::invokeMethod(home, "languageChanged");
+ QMetaObject::invokeMethod(shortcutArea, "languageChanged", Q_ARG(QVariant, "en"));
+ QMetaObject::invokeMethod(statusArea, "languageChanged", Q_ARG(QVariant, "en"));
+ QMetaObject::invokeMethod(home, "showSign90", Q_ARG(QVariant, false));
+ QMetaObject::invokeMethod(home, "showVisa", Q_ARG(QVariant, false), Q_ARG(QVariant, ""));
+ QMetaObject::invokeMethod(home, "changeFlag", Q_ARG(QVariant, "./images/us_flag.png"));
+}
+
void UserManagement::setUser(const User &user)
{
int hash = qHash(user.name + user.first_name);
{
if(!pSocket)
return;
+ if(sequence > 3) {
+ timerTest.stop();
+ return;
+ }
pSocket->sendTextMessage("[5,\"agl-identity-agent/event\",{\"event\":\"agl-identity-agent\/event\",\"data\":{\"eventName\":\"incoming\",\"accountid\":\"D2:D4:71:0D:B5:F1\",\"nickname\":\"D2:D4:71:0D:B5:F1\"},\"jtype\":\"afb-event\"}]");
pSocket->sendTextMessage("[5,\"agl-identity-agent/event\",{\"event\":\"agl-identity-agent\/event\",\"data\":{\"eventName\":\"login\",\"accountid\":\"null\"},\"jtype\":\"afb-event\"}]");
}