syncthingtray/gui/webpage.h

49 lines
1.2 KiB
C
Raw Normal View History

2016-08-25 00:45:32 +02:00
#ifndef WEBPAGE_H
#define WEBPAGE_H
2016-09-03 19:39:43 +02:00
#ifndef SYNCTHINGTRAY_NO_WEBVIEW
2016-08-25 00:45:32 +02:00
#include "./webviewprovider.h"
#if defined(SYNCTHINGTRAY_USE_WEBENGINE)
# include <QWebEnginePage>
#elif defined(SYNCTHINGTRAY_USE_WEBKIT)
# include <QWebPage>
#endif
QT_FORWARD_DECLARE_CLASS(WEB_VIEW_PROVIDER)
QT_FORWARD_DECLARE_CLASS(QAuthenticator)
QT_FORWARD_DECLARE_CLASS(QNetworkReply)
2016-09-01 16:34:30 +02:00
QT_FORWARD_DECLARE_CLASS(QSslError)
2016-08-25 00:45:32 +02:00
namespace QtGui {
class WebPage : public WEB_PAGE_PROVIDER
{
Q_OBJECT
public:
WebPage(WEB_VIEW_PROVIDER *view = nullptr);
protected:
WEB_PAGE_PROVIDER *createWindow(WebWindowType type);
2016-09-01 16:34:30 +02:00
#ifdef SYNCTHINGTRAY_USE_WEBENGINE
bool certificateError(const QWebEngineCertificateError &certificateError);
#endif
2016-08-25 00:45:32 +02:00
private slots:
void delegateToExternalBrowser(const QUrl &url);
void supplyCredentials(const QUrl &requestUrl, QAuthenticator *authenticator);
void supplyCredentials(QNetworkReply *reply, QAuthenticator *authenticator);
void supplyCredentials(QAuthenticator *authenticator);
2016-09-01 16:34:30 +02:00
#ifdef SYNCTHINGTRAY_USE_WEBKIT
void handleSslErrors(QNetworkReply *, const QList<QSslError> &errors);
#endif
2016-08-25 00:45:32 +02:00
private:
WEB_VIEW_PROVIDER *m_view;
};
}
2016-09-03 19:39:43 +02:00
#endif // SYNCTHINGTRAY_NO_WEBVIEW
2016-08-25 00:45:32 +02:00
#endif // WEBPAGE_H