feat: add deep shuffle in genre browse and tighten toolbar layout
Some checks failed
Build for Windows / build-windows (push) Has been cancelled
Some checks failed
Build for Windows / build-windows (push) Has been cancelled
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "../backend/qobuzbackend.hpp"
|
||||
#include "../playqueue.hpp"
|
||||
#include "albumlistview.hpp"
|
||||
|
||||
#include <QComboBox>
|
||||
@@ -24,15 +25,17 @@ public:
|
||||
PlaylistSearch,
|
||||
};
|
||||
|
||||
explicit GenreBrowserView(QobuzBackend *backend, QWidget *parent = nullptr);
|
||||
explicit GenreBrowserView(QobuzBackend *backend, PlayQueue *queue, QWidget *parent = nullptr);
|
||||
|
||||
void ensureGenresLoaded();
|
||||
void setBrowseMode(BrowseMode mode);
|
||||
bool tryHandleDeepShuffleTracks(const QJsonArray &tracks);
|
||||
|
||||
signals:
|
||||
void albumSelected(const QString &albumId);
|
||||
void artistSelected(qint64 artistId);
|
||||
void playlistSelected(qint64 playlistId);
|
||||
void playTrackRequested(qint64 trackId);
|
||||
|
||||
private slots:
|
||||
void onGenresLoaded(const QJsonObject &result);
|
||||
@@ -44,9 +47,11 @@ private slots:
|
||||
void onAlbumContextMenu(const QPoint &pos);
|
||||
void onPlaylistActivated(QTreeWidgetItem *item, int column);
|
||||
void onPlaylistContextMenu(const QPoint &pos);
|
||||
void onDeepShuffleClicked();
|
||||
|
||||
private:
|
||||
QobuzBackend *m_backend = nullptr;
|
||||
PlayQueue *m_queue = nullptr;
|
||||
QLabel *m_browseLabel = nullptr;
|
||||
QLabel *m_genreLabel = nullptr;
|
||||
QLabel *m_typeLabel = nullptr;
|
||||
@@ -58,6 +63,7 @@ private:
|
||||
QComboBox *m_typeCombo = nullptr;
|
||||
QLineEdit *m_playlistSearchBox = nullptr;
|
||||
QPushButton *m_playlistSearchBtn = nullptr;
|
||||
QPushButton *m_deepShuffleBtn = nullptr;
|
||||
QStackedWidget *m_resultsStack = nullptr;
|
||||
AlbumListView *m_albumList = nullptr;
|
||||
QTreeWidget *m_playlistList = nullptr;
|
||||
@@ -65,10 +71,12 @@ private:
|
||||
bool m_genresLoaded = false;
|
||||
int m_lastGenreComboIndex = 0;
|
||||
QSet<qint64> m_multiGenreIds;
|
||||
bool m_waitingDeepShuffle = false;
|
||||
|
||||
void refreshModeUi();
|
||||
void refreshGenreTypeChoices();
|
||||
QString currentGenreIds() const;
|
||||
QStringList currentAlbumIds() const;
|
||||
bool chooseMultiGenres();
|
||||
void updateMultiGenreLabel();
|
||||
void setPlaylistItems(const QJsonArray &items);
|
||||
|
||||
Reference in New Issue
Block a user