mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-21 16:29:43 +01:00
* Added query/track pages.
This commit is contained in:
parent
2b139103d0
commit
f40500452b
@ -51,6 +51,7 @@
|
||||
#include "widgets/infowidgets/SourceInfoWidget.h"
|
||||
#include "widgets/infowidgets/ArtistInfoWidget.h"
|
||||
#include "widgets/infowidgets/AlbumInfoWidget.h"
|
||||
#include "widgets/infowidgets/TrackInfoWidget.h"
|
||||
#include "widgets/NewPlaylistWidget.h"
|
||||
#include "widgets/AnimatedSplitter.h"
|
||||
|
||||
@ -256,6 +257,25 @@ ViewManager::show( const Tomahawk::album_ptr& album, Tomahawk::ModelMode initial
|
||||
}
|
||||
|
||||
|
||||
Tomahawk::ViewPage*
|
||||
ViewManager::show( const Tomahawk::query_ptr& query )
|
||||
{
|
||||
TrackInfoWidget* swidget;
|
||||
if ( !m_trackViews.contains( query ) || m_trackViews.value( query ).isNull() )
|
||||
{
|
||||
swidget = new TrackInfoWidget( query );
|
||||
m_trackViews.insert( query, swidget );
|
||||
}
|
||||
else
|
||||
{
|
||||
swidget = m_trackViews.value( query ).data();
|
||||
}
|
||||
|
||||
setPage( swidget );
|
||||
return swidget;
|
||||
}
|
||||
|
||||
|
||||
Tomahawk::ViewPage*
|
||||
ViewManager::show( const Tomahawk::collection_ptr& collection )
|
||||
{
|
||||
|
@ -55,6 +55,7 @@ class TrackView;
|
||||
class SourceInfoWidget;
|
||||
class InfoBar;
|
||||
class TopBar;
|
||||
class TrackInfoWidget;
|
||||
class WelcomeWidget;
|
||||
class WhatsHotWidget;
|
||||
class QPushButton;
|
||||
@ -151,6 +152,7 @@ public slots:
|
||||
Tomahawk::ViewPage* show( const Tomahawk::dynplaylist_ptr& playlist );
|
||||
Tomahawk::ViewPage* show( const Tomahawk::artist_ptr& artist );
|
||||
Tomahawk::ViewPage* show( const Tomahawk::album_ptr& album, Tomahawk::ModelMode withInitialMode = Tomahawk::InfoSystemMode );
|
||||
Tomahawk::ViewPage* show( const Tomahawk::query_ptr& query );
|
||||
Tomahawk::ViewPage* show( const Tomahawk::collection_ptr& collection );
|
||||
Tomahawk::ViewPage* show( const Tomahawk::source_ptr& source );
|
||||
|
||||
@ -217,6 +219,7 @@ private:
|
||||
QHash< Tomahawk::collection_ptr, QWeakPointer<AlbumView> > m_collectionAlbumViews;
|
||||
QHash< Tomahawk::artist_ptr, QWeakPointer<ArtistInfoWidget> > m_artistViews;
|
||||
QHash< Tomahawk::album_ptr, QWeakPointer<AlbumInfoWidget> > m_albumViews;
|
||||
QHash< Tomahawk::query_ptr, QWeakPointer<TrackInfoWidget> > m_trackViews;
|
||||
QHash< Tomahawk::playlist_ptr, QWeakPointer<PlaylistView> > m_playlistViews;
|
||||
QHash< Tomahawk::source_ptr, QWeakPointer<SourceInfoWidget> > m_sourceViews;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user