mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-08 23:26:40 +02:00
* Added query/track pages.
This commit is contained in:
@@ -51,6 +51,7 @@
|
|||||||
#include "widgets/infowidgets/SourceInfoWidget.h"
|
#include "widgets/infowidgets/SourceInfoWidget.h"
|
||||||
#include "widgets/infowidgets/ArtistInfoWidget.h"
|
#include "widgets/infowidgets/ArtistInfoWidget.h"
|
||||||
#include "widgets/infowidgets/AlbumInfoWidget.h"
|
#include "widgets/infowidgets/AlbumInfoWidget.h"
|
||||||
|
#include "widgets/infowidgets/TrackInfoWidget.h"
|
||||||
#include "widgets/NewPlaylistWidget.h"
|
#include "widgets/NewPlaylistWidget.h"
|
||||||
#include "widgets/AnimatedSplitter.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*
|
Tomahawk::ViewPage*
|
||||||
ViewManager::show( const Tomahawk::collection_ptr& collection )
|
ViewManager::show( const Tomahawk::collection_ptr& collection )
|
||||||
{
|
{
|
||||||
|
@@ -55,6 +55,7 @@ class TrackView;
|
|||||||
class SourceInfoWidget;
|
class SourceInfoWidget;
|
||||||
class InfoBar;
|
class InfoBar;
|
||||||
class TopBar;
|
class TopBar;
|
||||||
|
class TrackInfoWidget;
|
||||||
class WelcomeWidget;
|
class WelcomeWidget;
|
||||||
class WhatsHotWidget;
|
class WhatsHotWidget;
|
||||||
class QPushButton;
|
class QPushButton;
|
||||||
@@ -151,6 +152,7 @@ public slots:
|
|||||||
Tomahawk::ViewPage* show( const Tomahawk::dynplaylist_ptr& playlist );
|
Tomahawk::ViewPage* show( const Tomahawk::dynplaylist_ptr& playlist );
|
||||||
Tomahawk::ViewPage* show( const Tomahawk::artist_ptr& artist );
|
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::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::collection_ptr& collection );
|
||||||
Tomahawk::ViewPage* show( const Tomahawk::source_ptr& source );
|
Tomahawk::ViewPage* show( const Tomahawk::source_ptr& source );
|
||||||
|
|
||||||
@@ -217,6 +219,7 @@ private:
|
|||||||
QHash< Tomahawk::collection_ptr, QWeakPointer<AlbumView> > m_collectionAlbumViews;
|
QHash< Tomahawk::collection_ptr, QWeakPointer<AlbumView> > m_collectionAlbumViews;
|
||||||
QHash< Tomahawk::artist_ptr, QWeakPointer<ArtistInfoWidget> > m_artistViews;
|
QHash< Tomahawk::artist_ptr, QWeakPointer<ArtistInfoWidget> > m_artistViews;
|
||||||
QHash< Tomahawk::album_ptr, QWeakPointer<AlbumInfoWidget> > m_albumViews;
|
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::playlist_ptr, QWeakPointer<PlaylistView> > m_playlistViews;
|
||||||
QHash< Tomahawk::source_ptr, QWeakPointer<SourceInfoWidget> > m_sourceViews;
|
QHash< Tomahawk::source_ptr, QWeakPointer<SourceInfoWidget> > m_sourceViews;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user