blob: f68e1866f802e9e9204ff38bad3fbe9d3bdfbf4f (
plain) (
tree)
|
|
#ifndef SLXBROWSER_H_
#define SLXBROWSER_H_
#include <QMainWindow>
#include <QList>
#include <QSslError>
#include <QTimer>
class QNetworkReply;
class WebView;
class QProgressBar;
class QNetworkReply;
struct BrowserSettings
{
QString url;
bool fullscreen;
bool ignoreSslErrors;
int reloadInterval;
bool isWhitelist;
QStringList urlList;
};
class SLXbrowser : public QMainWindow
{
Q_OBJECT
public:
SLXbrowser(BrowserSettings settings);
virtual ~SLXbrowser();
private slots:
void loadStarted();
void loadFinished(bool ok);
void loadProgress(int progress);
void sslErrors(QNetworkReply * reply, const QList<QSslError> & errors);
void requestFinished(QNetworkReply *reply);
void reloadInitial();
private:
BrowserSettings _settings;
bool _unsupportedUri;
bool _blockedSite;
WebView *_browser;
QProgressBar *_progress;
QTimer _reset;
QList<QSslError> _sslErrors;
QString _normalError;
qint64 _lastPageLoad;
};
#endif /* SLXBROWSER_H_ */
|