Пример #1
0
ProfileWidget::ProfileWidget(QWidget *parent)
    :QFrame(parent), ui( new Ui::ProfileWidget )
{
    ui->setupUi( this );

    connect( aApp, SIGNAL(sessionChanged(unicorn::Session*)), SLOT(onSessionChanged(unicorn::Session*)) );
    connect( aApp, SIGNAL(gotUserInfo(lastfm::User)), SLOT(onGotUserInfo(lastfm::User)) );

    connect( &ScrobbleService::instance(), SIGNAL(scrobblesCached(QList<lastfm::Track>)), SLOT(onScrobblesCached(QList<lastfm::Track>)));

    onSessionChanged( aApp->currentSession() );
}
Пример #2
0
ProfileWidget::ProfileWidget(QWidget *parent)
    :StylableWidget(parent)
{
    QVBoxLayout* layout = new QVBoxLayout( this );
    layout->setContentsMargins( 0, 0, 0, 0 );
    layout->setSpacing( 0 );

    connect( aApp, SIGNAL(sessionChanged(unicorn::Session*)), SLOT(onSessionChanged(unicorn::Session*)) );
    connect( aApp, SIGNAL(gotUserInfo(lastfm::User)), SLOT(onGotUserInfo(lastfm::User)) );

    connect( &ScrobbleService::instance(), SIGNAL(scrobblesCached(QList<lastfm::Track>)), SLOT(onScrobblesCached(QList<lastfm::Track>)));

    onSessionChanged( aApp->currentSession() );
}
Пример #3
0
AnalyticsService::AnalyticsService()
    :m_customVarsSet( false ), m_pageLoaded( false )
{
#ifdef LASTFM_ANALYTICS
    m_webView = new QWebView();
    m_cookieJar = new PersistentCookieJar( this );
    m_webView->page()->networkAccessManager()->setCookieJar( m_cookieJar );

    connect( m_webView, SIGNAL(loadFinished(bool)), m_cookieJar, SLOT(save()) );
    connect( m_webView, SIGNAL(loadFinished(bool)), SLOT(onLoadFinished()) );
    connect( aApp, SIGNAL(gotUserInfo(lastfm::User)), SLOT(onGotUserInfo(lastfm::User)) );

    m_webView->load( QString( "http://cdn.last.fm/client/ga.html" ) );
#endif
}
Пример #4
0
void
ProfileWidget::onSessionChanged( unicorn::Session* session )
{  
    onGotUserInfo( session->userInfo() );
}