mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
23 lines
583 B
C++
23 lines
583 B
C++
#ifndef RESOURCESCHEMEHANDLER_H
|
|
#define RESOURCESCHEMEHANDLER_H
|
|
|
|
#include "article_netmgr.hh"
|
|
|
|
class ResourceSchemeHandler: public QWebEngineUrlSchemeHandler
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
ResourceSchemeHandler( ArticleNetworkAccessManager & articleNetMgr, QObject * parent = nullptr );
|
|
void requestStarted( QWebEngineUrlRequestJob * requestJob );
|
|
|
|
protected:
|
|
void replyJob( sptr< Dictionary::DataRequest > reply, QWebEngineUrlRequestJob * requestJob, QString content_type );
|
|
|
|
private:
|
|
ArticleNetworkAccessManager & mManager;
|
|
QMimeDatabase db;
|
|
};
|
|
|
|
#endif // RESOURCESCHEMEHANDLER_H
|