summaryrefslogtreecommitdiffstats
path: root/playerwidget.h
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2017-02-27 00:33:18 +0100
committerArno <arno@disconnect.de>2017-02-27 00:33:18 +0100
commit423652c3b1e9adabf9c93c48a4eb778eb03b0755 (patch)
treeb936b40a6a194e7bf5fb0519e9a819f801c2a6bf /playerwidget.h
parent03534db307eead153283252a0d9ea4c30f7810ee (diff)
downloadBeetPlayer-423652c3b1e9adabf9c93c48a4eb778eb03b0755.tar.gz
BeetPlayer-423652c3b1e9adabf9c93c48a4eb778eb03b0755.tar.bz2
BeetPlayer-423652c3b1e9adabf9c93c48a4eb778eb03b0755.zip
Implement add to Playlist
Diffstat (limited to 'playerwidget.h')
-rw-r--r--playerwidget.h6
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;