From ff7e948a9494b82ac3daae00e2c35675a2bb7233 Mon Sep 17 00:00:00 2001 From: Arno Date: Thu, 21 Sep 2017 19:53:05 +0200 Subject: Implement Favorites view And make it possible to remove songs from favorites! --- playerwidget.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'playerwidget.h') diff --git a/playerwidget.h b/playerwidget.h index 44896db..e5764e5 100644 --- a/playerwidget.h +++ b/playerwidget.h @@ -31,6 +31,7 @@ class PlayerWidget : public QWidget { enum ItemType { Artist, Album, Song, Genre, WebRadio }; 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, LengthRole = Qt::UserRole + 8, UrlRole = Qt::UserRole + 9, RemoteRole = Qt::UserRole + 10 }; + enum ModelType { Webradio, Favorites, Folders, DoNotCare }; explicit PlayerWidget(QWidget *parent = 0); ~PlayerWidget(); const QMediaPlayer* player() const { return mPlayer; } @@ -65,6 +66,7 @@ class PlayerWidget : public QWidget { void addToPlayList(); void addToPlayListAndClear(); void removeFromPlayList(); + void removeFromFavorites(); void addToFavorites(); void clearPlayList(); void shufflePlayList(); @@ -149,6 +151,7 @@ class PlayerWidget : public QWidget { QAction *mDeselectAllA; QAction *mDeleteFilesA; QAction *mRefreshA; + QAction *mRemoveFromFavoritesA; qint64 mDurSecs; quint64 mPlayListLength; QString mCurDir; @@ -161,6 +164,7 @@ class PlayerWidget : public QWidget { WebDownloader *mWebDownloader; QMap mOtherMeta; bool mIsStream; + int mModelType; }; #endif // PLAYERWIDGET_H -- cgit v1.2.3-70-g09d2