2024-11-07 03:53:04 +00:00
|
|
|
#pragma once
|
2022-05-18 14:31:47 +00:00
|
|
|
|
|
|
|
#include <QWebEnginePage>
|
|
|
|
|
2022-06-08 00:19:23 +00:00
|
|
|
struct LastReqInfo
|
|
|
|
{
|
|
|
|
QString group;
|
|
|
|
QString mutedDicts;
|
|
|
|
};
|
|
|
|
|
2022-05-18 14:31:47 +00:00
|
|
|
class ArticleWebPage: public QWebEnginePage
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2023-07-20 08:02:22 +00:00
|
|
|
|
2022-05-18 14:31:47 +00:00
|
|
|
public:
|
|
|
|
explicit ArticleWebPage( QObject * parent = nullptr );
|
|
|
|
signals:
|
|
|
|
void linkClicked( const QUrl & url );
|
2023-07-20 08:02:22 +00:00
|
|
|
|
2022-05-18 14:31:47 +00:00
|
|
|
protected:
|
|
|
|
virtual bool acceptNavigationRequest( const QUrl & url, NavigationType type, bool isMainFrame );
|
2023-07-20 08:02:22 +00:00
|
|
|
|
2022-06-08 00:19:23 +00:00
|
|
|
private:
|
|
|
|
LastReqInfo lastReq;
|
2022-05-18 14:31:47 +00:00
|
|
|
};
|