From 6f3ae187f8e818263dda4676508b109a3b5e291b Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 18 Feb 2018 15:15:26 +0100 Subject: Add custom handling for WebRadio The general QActions make no sense for Webradion. Add a custom Playlist and QActions. New songs from the stream are added for history, but they can't be edited or double clicked. --- playerwidget.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'playerwidget.h') diff --git a/playerwidget.h b/playerwidget.h index 050418f..07d8c26 100644 --- a/playerwidget.h +++ b/playerwidget.h @@ -26,6 +26,7 @@ class QSystemTrayIcon; class WebDownloader; class QStackedWidget; class QSplashScreen; +class QTabWidget; class PlayerWidget : public QWidget { Q_OBJECT @@ -85,7 +86,8 @@ class PlayerWidget : public QWidget { void recurse(const QModelIndex &parent); void addSong(const QModelIndex &idx); void play(const QString &fullPath); - void playUrl(const QString &url); + //void playUrl(const QString &url); + void playUrl(const QModelIndex &idx); void advance(int numSongs); void adjustVolume(int by); void fillWithText(QTextEdit *te, const TagLib::FileRef &fr); @@ -99,8 +101,10 @@ class PlayerWidget : public QWidget { QTextEdit *mCurrentTE; QTextBrowser *mLeftTE; QTextEdit *mRightTE; - BeetView *mPlayListView; - QStandardItemModel *mPlayListModel; + BeetView *mSongView; + BeetView *mWebRadioView; + QStandardItemModel *mSongModel; + QStandardItemModel *mWebRadioModel; QToolBar *mToolBar; QAction *mPlayA; QAction *mStopA; @@ -116,6 +120,7 @@ class PlayerWidget : public QWidget { WebDownloader *mWebDownloader; QMap mOtherMeta; QStackedWidget *mCollectionStack; + QTabWidget *mPlaylistTab; }; #endif // PLAYERWIDGET_H -- cgit v1.2.3-70-g09d2