refactor: resync with qbqt baseline and restore genre browser
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:
36
src/view/genrebrowser.hpp
Normal file
36
src/view/genrebrowser.hpp
Normal file
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#include "../backend/qobuzbackend.hpp"
|
||||
#include "albumlistview.hpp"
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
#include <QWidget>
|
||||
|
||||
class GenreBrowserView : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit GenreBrowserView(QobuzBackend *backend, QWidget *parent = nullptr);
|
||||
|
||||
void ensureGenresLoaded();
|
||||
|
||||
signals:
|
||||
void albumSelected(const QString &albumId);
|
||||
void artistSelected(qint64 artistId);
|
||||
|
||||
private slots:
|
||||
void onGenresLoaded(const QJsonObject &result);
|
||||
void onFeaturedAlbumsLoaded(const QJsonObject &result);
|
||||
void onSelectionChanged();
|
||||
void onAlbumContextMenu(const QPoint &pos);
|
||||
|
||||
private:
|
||||
QobuzBackend *m_backend = nullptr;
|
||||
QComboBox *m_genreCombo = nullptr;
|
||||
QComboBox *m_typeCombo = nullptr;
|
||||
AlbumListView *m_albumList = nullptr;
|
||||
bool m_genresLoaded = false;
|
||||
};
|
||||
Reference in New Issue
Block a user