mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 11:50:37 +02:00
Track collection page
This commit is contained in:
@@ -33,6 +33,7 @@ CollectionItem::CollectionItem( SourcesModel* model, SourceTreeItem* parent, con
|
||||
: SourceTreeItem( model, parent, SourcesModel::Collection )
|
||||
, m_sortValue( -150 )
|
||||
, m_collection( collection )
|
||||
, m_page( nullptr )
|
||||
{
|
||||
m_text = tr( "Collection" );
|
||||
m_icon = ImageRegistry::instance()->icon( RESPATH "images/collection.svg" );
|
||||
@@ -81,6 +82,6 @@ CollectionItem::trackCount() const
|
||||
void
|
||||
CollectionItem::activate()
|
||||
{
|
||||
Tomahawk::ViewPage* page = ViewManager::instance()->show( m_collection );
|
||||
model()->linkSourceItemToPage( this, page );
|
||||
m_page = ViewManager::instance()->show( m_collection );
|
||||
model()->linkSourceItemToPage( this, m_page );
|
||||
}
|
||||
|
@@ -45,6 +45,12 @@ private:
|
||||
QIcon m_icon;
|
||||
QString m_text;
|
||||
Tomahawk::collection_ptr m_collection;
|
||||
|
||||
/**
|
||||
* Reference to the ViewPage for the collection. Until the page is loaded
|
||||
* once on user request, this will be nullptr.
|
||||
*/
|
||||
Tomahawk::ViewPage* m_page;
|
||||
};
|
||||
|
||||
#endif // COLLECTIONITEM_H
|
||||
|
Reference in New Issue
Block a user