mirror of
https://github.com/spalencsar/bearwave.git
synced 2026-07-06 22:24:17 +02:00
Prepare BearWave for public repository
This commit is contained in:
28
src/coverartfetcher.h
Normal file
28
src/coverartfetcher.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef COVERARTFETCHER_H
|
||||
#define COVERARTFETCHER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
|
||||
class CoverArtFetcher : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CoverArtFetcher(QObject *parent = nullptr);
|
||||
|
||||
void fetch(const QString &artist, const QString &title);
|
||||
|
||||
signals:
|
||||
void coverUrlReady(const QString &url);
|
||||
|
||||
private slots:
|
||||
void onReplyFinished();
|
||||
|
||||
private:
|
||||
QNetworkAccessManager *m_networkManager;
|
||||
QNetworkReply *m_currentReply = nullptr;
|
||||
};
|
||||
|
||||
#endif // COVERARTFETCHER_H
|
||||
Reference in New Issue
Block a user