mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-04 13:17:34 +02:00
* Show a loading spinner for 'Newest Stations / Playlists'.
This commit is contained in:
@@ -32,6 +32,7 @@
|
|||||||
#include "playlist/AlbumModel.h"
|
#include "playlist/AlbumModel.h"
|
||||||
#include "playlist/RecentlyPlayedModel.h"
|
#include "playlist/RecentlyPlayedModel.h"
|
||||||
#include "widgets/OverlayWidget.h"
|
#include "widgets/OverlayWidget.h"
|
||||||
|
#include "utils/AnimatedSpinner.h"
|
||||||
#include "utils/TomahawkUtils.h"
|
#include "utils/TomahawkUtils.h"
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
#include "dynamic/GeneratorInterface.h"
|
#include "dynamic/GeneratorInterface.h"
|
||||||
@@ -307,4 +308,14 @@ PlaylistWidget::PlaylistWidget( QWidget* parent )
|
|||||||
: QListView( parent )
|
: QListView( parent )
|
||||||
{
|
{
|
||||||
m_overlay = new OverlayWidget( this );
|
m_overlay = new OverlayWidget( this );
|
||||||
|
LoadingSpinner* spinner = new LoadingSpinner( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
PlaylistWidget::setModel( QAbstractItemModel* model )
|
||||||
|
{
|
||||||
|
QListView::setModel( model );
|
||||||
|
emit modelChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -64,13 +64,21 @@ private:
|
|||||||
QPixmap m_playlistIcon, m_autoIcon, m_stationIcon, m_defaultAvatar;
|
QPixmap m_playlistIcon, m_autoIcon, m_stationIcon, m_defaultAvatar;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class DLLEXPORT PlaylistWidget : public QListView
|
class DLLEXPORT PlaylistWidget : public QListView
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PlaylistWidget( QWidget* parent = 0 );
|
PlaylistWidget( QWidget* parent = 0 );
|
||||||
|
|
||||||
OverlayWidget* overlay() const { return m_overlay; }
|
OverlayWidget* overlay() const { return m_overlay; }
|
||||||
|
|
||||||
|
virtual void setModel( QAbstractItemModel* model );
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void modelChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
OverlayWidget* m_overlay;
|
OverlayWidget* m_overlay;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user