void AuthPlugin::onDataUpdated(const QVariantMap &map) { QString command = map["command"].toString(); if (command == "login") { QString key = map["token"].toString(); if (key.isEmpty() || key.isNull()) { //request login UI if (mWidget) { Q_EMIT spawnView(mWidget); mWidget->setVisible(true); mWidget->createAuthDialog(); } } } if (command == "friends") { qDebug() << map.keys(); mContactUI->setFacebookContactData(map["data"].toHash()); } if (command == "userinfo") { mContactUI->addContact(map); } }
void MacBackgroundController::init() { QSizeF desktopSize = mDesktopScreenRect.size(); mMacDesktopRectItem->setContentRect( QRectF(0.0, 0, desktopSize.width(), desktopSize.height())); mMacDesktopRectItem->setLayerType( PlexyDesk::AbstractDesktopWidget::Background); Q_EMIT spawnView(mMacDesktopRectItem); }