goldendict-ng/src/webmultimediadownload.hh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
564 B
C++
Raw Normal View History

2024-11-07 03:53:04 +00:00
#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