Collection::Collection( const source_ptr& source, const QString& name, QObject* parent ) : QObject( parent ) , m_name( name ) , m_lastmodified( 0 ) , m_isLoaded( false ) , m_source( source ) { qDebug() << Q_FUNC_INFO << name << source->friendlyName(); }
Collection::Collection( const source_ptr& source, const QString& name, QObject* parent ) : QObject( parent ) , m_name( name ) , m_lastmodified( 0 ) , m_changed( false ) , m_source( source ) { qDebug() << Q_FUNC_INFO << name << source->friendlyName(); connect( source.data(), SIGNAL( synced() ), SLOT( onSynced() ) ); }
HistoryWidget::HistoryWidget( const source_ptr& source, QWidget* parent ) : FlexibleView( parent ) { setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::RecentlyPlayed ) ); m_model = new RecentlyPlayedModel( this ); m_model->setTitle( tr( "Recently Played Tracks" ) ); if ( source->isLocal() ) m_model->setDescription( tr( "Your recently played tracks" ) ); else m_model->setDescription( tr( "%1's recently played tracks" ).arg( source->friendlyName() ) ); trackView()->setIndentation( 0 ); trackView()->setUniformRowHeights( false ); setPlayableModel( m_model ); setEmptyTip( tr( "Sorry, we could not find any recent plays!" ) ); m_model->setSource( source ); setGuid( QString( "recentplays/%1" ).arg( source->nodeId() ) ); }