diff options
author | Arno <arno@disconnect.de> | 2017-02-27 00:33:18 +0100 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2017-02-27 00:33:18 +0100 |
commit | 423652c3b1e9adabf9c93c48a4eb778eb03b0755 (patch) | |
tree | b936b40a6a194e7bf5fb0519e9a819f801c2a6bf /playerwidget.h | |
parent | 03534db307eead153283252a0d9ea4c30f7810ee (diff) | |
download | BeetPlayer-423652c3b1e9adabf9c93c48a4eb778eb03b0755.tar.gz BeetPlayer-423652c3b1e9adabf9c93c48a4eb778eb03b0755.tar.bz2 BeetPlayer-423652c3b1e9adabf9c93c48a4eb778eb03b0755.zip |
Implement add to Playlist
Diffstat (limited to 'playerwidget.h')
-rw-r--r-- | playerwidget.h | 6 |
1 files changed, 5 insertions, 1 deletions
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; |