feat: expand toolbar now-playing context menu to full track actions
- Replace bare "Go to Album"/"Go to Artist" with the full unified menu: Play next, Add to queue, Add to favorites, Open album/artist with names, Add to playlist submenu — all with icons - Wire up new favTrackRequested/addToPlaylistRequested signals through MainWindow - Pass user playlists to toolbar so the submenu is populated Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QJsonObject>
|
||||
#include <QPair>
|
||||
#include <QVector>
|
||||
|
||||
class MainToolBar : public QToolBar
|
||||
@@ -27,11 +28,15 @@ public:
|
||||
void setQueueToggleChecked(bool checked);
|
||||
void setSearchToggleChecked(bool checked);
|
||||
|
||||
void setUserPlaylists(const QVector<QPair<qint64, QString>> &playlists) { m_userPlaylists = playlists; }
|
||||
|
||||
signals:
|
||||
void searchToggled(bool visible);
|
||||
void queueToggled(bool visible);
|
||||
void albumRequested(const QString &albumId);
|
||||
void artistRequested(qint64 artistId);
|
||||
void addToPlaylistRequested(qint64 trackId, qint64 playlistId);
|
||||
void favTrackRequested(qint64 trackId);
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
@@ -93,5 +98,7 @@ private:
|
||||
qint64 m_pendingSeekStartedMs = 0;
|
||||
bool m_fetchingAutoplay = false;
|
||||
|
||||
QVector<QPair<qint64, QString>> m_userPlaylists;
|
||||
|
||||
void requestAutoplaySuggestions();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user