mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 21:57:41 +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 )
|
: SourceTreeItem( model, parent, SourcesModel::Collection )
|
||||||
, m_sortValue( -150 )
|
, m_sortValue( -150 )
|
||||||
, m_collection( collection )
|
, m_collection( collection )
|
||||||
|
, m_page( nullptr )
|
||||||
{
|
{
|
||||||
m_text = tr( "Collection" );
|
m_text = tr( "Collection" );
|
||||||
m_icon = ImageRegistry::instance()->icon( RESPATH "images/collection.svg" );
|
m_icon = ImageRegistry::instance()->icon( RESPATH "images/collection.svg" );
|
||||||
@@ -81,6 +82,6 @@ CollectionItem::trackCount() const
|
|||||||
void
|
void
|
||||||
CollectionItem::activate()
|
CollectionItem::activate()
|
||||||
{
|
{
|
||||||
Tomahawk::ViewPage* page = ViewManager::instance()->show( m_collection );
|
m_page = ViewManager::instance()->show( m_collection );
|
||||||
model()->linkSourceItemToPage( this, page );
|
model()->linkSourceItemToPage( this, m_page );
|
||||||
}
|
}
|
||||||
|
@@ -45,6 +45,12 @@ private:
|
|||||||
QIcon m_icon;
|
QIcon m_icon;
|
||||||
QString m_text;
|
QString m_text;
|
||||||
Tomahawk::collection_ptr m_collection;
|
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
|
#endif // COLLECTIONITEM_H
|
||||||
|
Reference in New Issue
Block a user