goldendict-ng/src/webmultimediadownload.hh
shenleban tongying 618310f772
Some checks are pending
SonarCloud / Build and analyze (push) Waiting to run
clean: just use #pragma once
2024-11-06 22:53:04 -05:00

30 lines
564 B
C++

#pragma once
#include "dict/dictionary.hh"
#include <QtNetwork>
namespace Dictionary {
/// Downloads data from the web, wrapped as a dictionary's DataRequest. This
/// is useful for multimedia files, like sounds and pronunciations.
class WebMultimediaDownload: public DataRequest
{
Q_OBJECT
QNetworkReply * reply;
QNetworkAccessManager & mgr;
int redirectCount;
public:
WebMultimediaDownload( QUrl const &, QNetworkAccessManager & );
virtual void cancel();
private slots:
void replyFinished( QNetworkReply * );
};
} // namespace Dictionary