From 423652c3b1e9adabf9c93c48a4eb778eb03b0755 Mon Sep 17 00:00:00 2001 From: Arno Date: Mon, 27 Feb 2017 00:33:18 +0100 Subject: Implement add to Playlist --- playerwidget.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'playerwidget.h') diff --git a/playerwidget.h b/playerwidget.h index 4de2e38..a6b9373 100644 --- a/playerwidget.h +++ b/playerwidget.h @@ -18,7 +18,7 @@ class PlayerWidget : public QWidget { Q_OBJECT public: enum ItemType { Artist, Album, Song, Genre }; - enum CustomRoles { TypeRole = Qt::UserRole + 1, IdRole = Qt::UserRole + 2, FullPathRole = Qt::UserRole + 3, GenreRole = Qt::UserRole + 4 }; + 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: @@ -26,6 +26,7 @@ class PlayerWidget : public QWidget { void doFilter(); void clearFilter(); void reindex(); + void addToPlayList(); private: void setupGui(); @@ -33,11 +34,14 @@ class PlayerWidget : public QWidget { void populateByArtist(QStandardItem *parent, const QString &filter); void populateBySong(QStandardItem *parent, const QString &filter); void populateByGenre(QStandardItem *parent, const QString &filter); + void recurse(const QModelIndex &parent); + void addSong(const QModelIndex &idx); QLineEdit *mFilter; QMediaPlayer *mPlayer; BeetView *mView; QStandardItemModel *mViewModel; QStandardItemModel *mSearchModel; + QStandardItemModel *currentModel; QLabel *mNowPlayingL; QSlider *mSlider; QTextEdit *mCurrentTE; -- cgit v1.2.3-70-g09d2