예제 #1
0
/*!
  \internal

  Sets a screen name for the user.
*/
void Facebook::setScreenName(const QString &screenName)
{
    if (m_screenName != screenName) {
        m_screenName = screenName;
        emit screenNameChanged(m_screenName);
    }
}
예제 #2
0
void STAccount::setUser(STObjectManager::UserRef us){
    m_user=us;

    QString newProfileImageUrl=m_user->data["profile_image_url"].toString();
    QString newScreenName=m_user->data["screen_name"].toString();
    if(newProfileImageUrl!=m_profileImageUrl && !m_profileImageUrl.isEmpty())
        emit iconChanged();
    if(newScreenName!=m_screenName && !m_screenName.isEmpty())
        emit screenNameChanged();
    m_profileImageUrl=newProfileImageUrl;
    m_screenName=newScreenName;
}
/*!
    Constructor
 */
FacebookConnection::FacebookConnection(QObject *parent) :
    SocialConnection(parent),
    m_facebook(new Facebook(this)),
    m_manager(new FacebookDataManager(this)),
    m_apiCall(Undefined)
{
    connect(m_facebook, SIGNAL(requestCompleted(QVariant,QByteArray)),
            this, SLOT(onRequestCompleted(QVariant,QByteArray)));
    connect(m_facebook, SIGNAL(requestFailed(QVariant,QString)),
            this, SLOT(onRequestFailed(QVariant,QString)));
    connect(m_facebook, SIGNAL(clientIdChanged(QString)),
            this, SIGNAL(clientIdChanged(QString)));
    connect(m_facebook, SIGNAL(accessTokenChanged(QString)),
            this, SIGNAL(accessTokenChanged(QString)));
    connect(m_facebook, SIGNAL(authorizedChanged(bool)),
            this, SLOT(onAuthenticationChanged(bool)));
    connect(m_facebook, SIGNAL(screenNameChanged(QString)),
            this, SLOT(onNameChanged(QString)));
}