diff options
author | Arno <arno@disconnect.de> | 2017-03-04 14:27:54 +0100 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2017-03-04 14:27:54 +0100 |
commit | bb26c39d5310c48f8159dbc3490f829d6c62b386 (patch) | |
tree | e0ef52bbe12fd4c1cd41a3b49e80a669983d4335 /playerwidget.h | |
parent | 74810d9fedf93987c4006c9af10114c1c7772083 (diff) | |
download | BeetPlayer-bb26c39d5310c48f8159dbc3490f829d6c62b386.tar.gz BeetPlayer-bb26c39d5310c48f8159dbc3490f829d6c62b386.tar.bz2 BeetPlayer-bb26c39d5310c48f8159dbc3490f829d6c62b386.zip |
Introduce different views
* view by artist (already there)
* view by album
* view by song
* view by genre
Doesn't work as expected, so it's likely gonna change soon.
Diffstat (limited to 'playerwidget.h')
-rw-r--r-- | playerwidget.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/playerwidget.h b/playerwidget.h index 365eec3..bc6ad81 100644 --- a/playerwidget.h +++ b/playerwidget.h @@ -20,11 +20,15 @@ class PlayerWidget : public QWidget { Q_OBJECT public: enum ItemType { Artist, Album, Song, Genre }; + enum PopulateType { FilterType, IdType, EmptyType }; enum CustomRoles { TypeRole = Qt::UserRole + 1, IdRole = Qt::UserRole + 2, FullPathRole = Qt::UserRole + 3, GenreRole = Qt::UserRole + 4, ArtistRole = Qt::UserRole + 5, TitleRole = Qt::UserRole + 6, AlbumRole = Qt::UserRole + 7 }; explicit PlayerWidget(QWidget *parent = 0); public slots: - void populate(); + void doPopulateByArtist(); + void doPopulateByAlbum(); + void doPopulateByGenre(); + void doPopulateBySong(); void doFilter(); void clearFilter(); void reindex(); @@ -47,7 +51,8 @@ class PlayerWidget : public QWidget { void setupGui(); void createActions(); void populateByArtist(QStandardItem *parent, const QString &filter); - void populateBySong(QStandardItem *parent, const QString &filter); + void populateByAlbum(QStandardItem *parent, const QVariant &filter, int type); + void populateBySong(QStandardItem *parent, const QVariant &filter, int type); void populateByGenre(QStandardItem *parent, const QString &filter); void recurse(const QModelIndex &parent); void addSong(const QModelIndex &idx); |