本文整理汇总了C++中tomahawk::source_ptr::friendlyName方法的典型用法代码示例。如果您正苦于以下问题:C++ source_ptr::friendlyName方法的具体用法?C++ source_ptr::friendlyName怎么用?C++ source_ptr::friendlyName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tomahawk::source_ptr
的用法示例。
在下文中一共展示了source_ptr::friendlyName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QWidget
SourceInfoWidget::SourceInfoWidget( const Tomahawk::source_ptr& source, QWidget* parent )
: QWidget( parent )
, ui( new Ui::SourceInfoWidget )
, m_source( source )
{
ui->setupUi( this );
ui->historyView->setFrameShape( QFrame::NoFrame );
ui->historyView->setAttribute( Qt::WA_MacShowFocusRect, 0 );
ui->recentAlbumView->setFrameShape( QFrame::NoFrame );
ui->recentAlbumView->setAttribute( Qt::WA_MacShowFocusRect, 0 );
ui->recentCollectionView->setFrameShape( QFrame::NoFrame );
ui->recentCollectionView->setAttribute( Qt::WA_MacShowFocusRect, 0 );
TomahawkUtils::unmarginLayout( layout() );
ui->historyView->overlay()->setEnabled( false );
m_recentCollectionModel = new CollectionFlatModel( ui->recentCollectionView );
m_recentCollectionModel->setStyle( TrackModel::Short );
ui->recentCollectionView->setTrackModel( m_recentCollectionModel );
ui->recentCollectionView->sortByColumn( TrackModel::Age, Qt::DescendingOrder );
m_historyModel = new PlaylistModel( ui->historyView );
m_historyModel->setStyle( TrackModel::Short );
ui->historyView->setPlaylistModel( m_historyModel );
m_historyModel->loadHistory( source, 25 );
m_recentAlbumModel = new AlbumModel( ui->recentAlbumView );
ui->recentAlbumView->setAlbumModel( m_recentAlbumModel );
ui->recentAlbumView->proxyModel()->sort( -1 );
onCollectionChanged();
connect( source->collection().data(), SIGNAL( changed() ), SLOT( onCollectionChanged() ) );
connect( source.data(), SIGNAL( playbackFinished( Tomahawk::query_ptr ) ), SLOT( onPlaybackFinished( Tomahawk::query_ptr ) ) );
m_title = tr( "New Additions" );
if ( source->isLocal() )
{
m_description = tr( "My recent activity" );
}
else
{
m_description = tr( "Recent activity from %1" ).arg( source->friendlyName() );
}
m_pixmap.load( RESPATH "images/new-additions.png" );
}
示例2: QWidget
SourceInfoWidget::SourceInfoWidget( const Tomahawk::source_ptr& source, QWidget* parent )
: QWidget( parent )
, ui( new Ui::SourceInfoWidget )
, m_source( source )
{
ui->setupUi( this );
TomahawkUtils::unmarginLayout( layout() );
TomahawkUtils::unmarginLayout( ui->horizontalLayout );
TomahawkUtils::unmarginLayout( ui->verticalLayout );
TomahawkUtils::unmarginLayout( ui->verticalLayout_2 );
TomahawkUtils::unmarginLayout( ui->verticalLayout_3 );
ui->splitter->setStretchFactor( 0, 0 );
ui->splitter->setStretchFactor( 1, 1 );
ui->historyView->overlay()->setEnabled( false );
m_recentTracksModel = new RecentlyAddedModel( source, ui->recentCollectionView );
m_recentTracksModel->setStyle( PlayableModel::Short );
ui->recentCollectionView->setPlayableModel( m_recentTracksModel );
ui->recentCollectionView->sortByColumn( PlayableModel::Age, Qt::DescendingOrder );
m_historyModel = new RecentlyPlayedModel( source, ui->historyView );
m_historyModel->setStyle( PlayableModel::Short );
ui->historyView->setPlaylistModel( m_historyModel );
m_recentAlbumModel = new AlbumModel( ui->recentAlbumView );
ui->recentAlbumView->setAlbumModel( m_recentAlbumModel );
ui->recentAlbumView->proxyModel()->sort( -1 );
onCollectionChanged();
connect( source->collection().data(), SIGNAL( changed() ), SLOT( onCollectionChanged() ) );
m_title = tr( "New Additions" );
if ( source->isLocal() )
{
m_description = tr( "My recent activity" );
}
else
{
m_description = tr( "Recent activity from %1" ).arg( source->friendlyName() );
}
m_pixmap.load( RESPATH "images/new-additions.png" );
}
示例3: QWidget
SourceInfoWidget::SourceInfoWidget( const Tomahawk::source_ptr& source, QWidget* parent )
: QWidget( parent )
, ui( new Ui::SourceInfoWidget )
{
ui->setupUi( this );
ui->historyView->overlay()->setEnabled( false );
m_recentCollectionModel = new CollectionFlatModel( ui->recentCollectionView );
ui->recentCollectionView->setModel( m_recentCollectionModel );
m_recentCollectionModel->addFilteredCollection( source->collection(), 250, DatabaseCommand_AllTracks::ModificationTime );
m_historyModel = new PlaylistModel( ui->historyView );
ui->historyView->setModel( m_historyModel );
m_historyModel->loadHistory( source );
connect( source.data(), SIGNAL( playbackFinished( Tomahawk::query_ptr ) ), SLOT( onPlaybackFinished( Tomahawk::query_ptr ) ) );
ui->recentCollectionView->setColumnHidden( TrackModel::Bitrate, true );
ui->recentCollectionView->setColumnHidden( TrackModel::Origin, true );
ui->recentCollectionView->setColumnHidden( TrackModel::Filesize, true );
ui->historyView->setColumnHidden( TrackModel::Bitrate, true );
ui->historyView->setColumnHidden( TrackModel::Origin, true );
ui->historyView->setColumnHidden( TrackModel::Filesize, true );
m_recentAlbumModel = new AlbumModel( ui->recentAlbumView );
ui->recentAlbumView->setModel( m_recentAlbumModel );
m_recentAlbumModel->addFilteredCollection( source->collection(), 20, DatabaseCommand_AllAlbums::ModificationTime );
m_title = tr( "Info about %1" ).arg( source->isLocal() ? tr( "Your Collection" ) : source->friendlyName() );
}
示例4: QWidget
SourceInfoWidget::SourceInfoWidget( const Tomahawk::source_ptr& source, QWidget* parent )
: QWidget( parent )
, ui( new Ui::SourceInfoWidget )
{
ui->setupUi( this );
ui->historyView->setFrameShape( QFrame::NoFrame );
ui->historyView->setAttribute( Qt::WA_MacShowFocusRect, 0 );
ui->recentAlbumView->setFrameShape( QFrame::NoFrame );
ui->recentAlbumView->setAttribute( Qt::WA_MacShowFocusRect, 0 );
ui->recentCollectionView->setFrameShape( QFrame::NoFrame );
ui->recentCollectionView->setAttribute( Qt::WA_MacShowFocusRect, 0 );
TomahawkUtils::unmarginLayout( layout() );
ui->historyView->overlay()->setEnabled( false );
m_recentCollectionModel = new CollectionFlatModel( ui->recentCollectionView );
m_recentCollectionModel->setStyle( TrackModel::Short );
ui->recentCollectionView->setTrackModel( m_recentCollectionModel );
m_recentCollectionModel->addFilteredCollection( source->collection(), 250, DatabaseCommand_AllTracks::ModificationTime );
m_historyModel = new PlaylistModel( ui->historyView );
m_historyModel->setStyle( TrackModel::Short );
ui->historyView->setPlaylistModel( m_historyModel );
m_historyModel->loadHistory( source, 25 );
connect( source.data(), SIGNAL( playbackFinished( Tomahawk::query_ptr ) ), SLOT( onPlaybackFinished( Tomahawk::query_ptr ) ) );
m_recentAlbumModel = new AlbumModel( ui->recentAlbumView );
ui->recentAlbumView->setAlbumModel( m_recentAlbumModel );
m_recentAlbumModel->addFilteredCollection( source->collection(), 20, DatabaseCommand_AllAlbums::ModificationTime );
m_title = tr( "New Additions" );
m_description = tr( "Recent activity from %1" ).arg( source->isLocal() ? tr( "Your Collection" ) : source->friendlyName() );
m_pixmap.load( RESPATH "images/new-additions.png" );
}