2011-08-01 17:09:08 +00:00
|
|
|
#ifndef JHW_PAGE
|
|
|
|
#define JHW_PAGE
|
|
|
|
|
|
|
|
#include <QtGui>
|
2013-04-10 07:22:24 +00:00
|
|
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
|
|
|
#include <QtWebKitWidgets>
|
|
|
|
#else
|
|
|
|
#include <QtWebKit>
|
|
|
|
#endif
|
2011-08-01 17:09:08 +00:00
|
|
|
|
2011-10-25 19:41:22 +00:00
|
|
|
class Page: public QWebPage {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
Page();
|
|
|
|
protected:
|
|
|
|
void javaScriptConsoleMessage(const QString & message, int lineNumber, const QString & sourceID);
|
2011-10-26 02:22:29 +00:00
|
|
|
void javaScriptAlert(QWebFrame *, const QString &);
|
|
|
|
bool javaScriptConfirm(QWebFrame *, const QString &);
|
2012-01-09 16:09:34 +00:00
|
|
|
bool javaScriptPrompt(QWebFrame *, const QString &, const QString &, QString *);
|
2011-10-25 19:41:22 +00:00
|
|
|
signals:
|
|
|
|
void handleError(const QString & message, int lineNumber, const QString & sourceID);
|
|
|
|
};
|
2011-08-01 17:09:08 +00:00
|
|
|
|
|
|
|
#endif
|