#ifndef PYTHONQTWRAPPER_QWEBPAGE_H #define PYTHONQTWRAPPER_QWEBPAGE_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include class PythonQtShell_QWebPage : public QWebPage { public: PythonQtShell_QWebPage(QObject* parent = 0):QWebPage(parent),_wrapper(NULL) {}; virtual bool acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest& request, QWebPage::NavigationType type); virtual void childEvent(QChildEvent* arg__1); virtual QString chooseFile(QWebFrame* originatingFrame, const QString& oldFile); virtual QObject* createPlugin(const QString& classid, const QUrl& url, const QStringList& paramNames, const QStringList& paramValues); virtual QWebPage* createWindow(QWebPage::WebWindowType type); virtual void customEvent(QEvent* arg__1); virtual bool event(QEvent* arg__1); virtual bool eventFilter(QObject* arg__1, QEvent* arg__2); virtual void javaScriptAlert(QWebFrame* originatingFrame, const QString& msg); virtual bool javaScriptConfirm(QWebFrame* originatingFrame, const QString& msg); virtual void javaScriptConsoleMessage(const QString& message, int lineNumber, const QString& sourceID); virtual bool javaScriptPrompt(QWebFrame* originatingFrame, const QString& msg, const QString& defaultValue, QString* result); virtual bool supportsExtension(QWebPage::Extension extension) const; virtual void timerEvent(QTimerEvent* arg__1); virtual void triggerAction(QWebPage::WebAction action, bool checked = false); virtual QString userAgentForUrl(const QUrl& url) const; PythonQtInstanceWrapper* _wrapper; }; class PythonQtPublicPromoter_QWebPage : public QWebPage { public: inline bool promoted_javaScriptPrompt(QWebFrame* originatingFrame, const QString& msg, const QString& defaultValue, QString* result) { return QWebPage::javaScriptPrompt(originatingFrame, msg, defaultValue, result); } inline bool promoted_event(QEvent* arg__1) { return QWebPage::event(arg__1); } inline void promoted_javaScriptAlert(QWebFrame* originatingFrame, const QString& msg) { QWebPage::javaScriptAlert(originatingFrame, msg); } inline QWebPage* promoted_createWindow(QWebPage::WebWindowType type) { return QWebPage::createWindow(type); } inline bool promoted_javaScriptConfirm(QWebFrame* originatingFrame, const QString& msg) { return QWebPage::javaScriptConfirm(originatingFrame, msg); } inline bool promoted_acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest& request, QWebPage::NavigationType type) { return QWebPage::acceptNavigationRequest(frame, request, type); } inline QString promoted_userAgentForUrl(const QUrl& url) const { return QWebPage::userAgentForUrl(url); } inline void promoted_triggerAction(QWebPage::WebAction action, bool checked = false) { QWebPage::triggerAction(action, checked); } inline void promoted_javaScriptConsoleMessage(const QString& message, int lineNumber, const QString& sourceID) { QWebPage::javaScriptConsoleMessage(message, lineNumber, sourceID); } inline QString promoted_chooseFile(QWebFrame* originatingFrame, const QString& oldFile) { return QWebPage::chooseFile(originatingFrame, oldFile); } inline bool promoted_supportsExtension(QWebPage::Extension extension) const { return QWebPage::supportsExtension(extension); } inline QObject* promoted_createPlugin(const QString& classid, const QUrl& url, const QStringList& paramNames, const QStringList& paramValues) { return QWebPage::createPlugin(classid, url, paramNames, paramValues); } }; class PythonQtWrapper_QWebPage : public QObject { Q_OBJECT public: Q_ENUMS(WebWindowType FindFlag Extension ) Q_FLAGS(FindFlags ) enum WebWindowType{ WebBrowserWindow = QWebPage::WebBrowserWindow, WebModalDialog = QWebPage::WebModalDialog}; enum FindFlag{ FindBackward = QWebPage::FindBackward, FindCaseSensitively = QWebPage::FindCaseSensitively, FindWrapsAroundDocument = QWebPage::FindWrapsAroundDocument}; enum Extension{ }; Q_DECLARE_FLAGS(FindFlags, FindFlag) public slots: QWebPage* new_QWebPage(QObject* parent = 0); void delete_QWebPage(QWebPage* obj) { delete obj; } QSize viewportSize(QWebPage* theWrappedObject) const; bool javaScriptPrompt(QWebPage* theWrappedObject, QWebFrame* originatingFrame, const QString& msg, const QString& defaultValue, QString* result); bool event(QWebPage* theWrappedObject, QEvent* arg__1); QVariant inputMethodQuery(QWebPage* theWrappedObject, Qt::InputMethodQuery property) const; bool focusNextPrevChild(QWebPage* theWrappedObject, bool next); bool forwardUnsupportedContent(QWebPage* theWrappedObject) const; void setPalette(QWebPage* theWrappedObject, const QPalette& palette); QWebSettings* settings(QWebPage* theWrappedObject) const; QWebPluginFactory* pluginFactory(QWebPage* theWrappedObject) const; QWebFrame* mainFrame(QWebPage* theWrappedObject) const; void javaScriptAlert(QWebPage* theWrappedObject, QWebFrame* originatingFrame, const QString& msg); QWebPage* createWindow(QWebPage* theWrappedObject, QWebPage::WebWindowType type); QUndoStack* undoStack(QWebPage* theWrappedObject) const; bool findText(QWebPage* theWrappedObject, const QString& subString, QWebPage::FindFlags options = 0); bool javaScriptConfirm(QWebPage* theWrappedObject, QWebFrame* originatingFrame, const QString& msg); QNetworkAccessManager* networkAccessManager(QWebPage* theWrappedObject) const; QPalette palette(QWebPage* theWrappedObject) const; void setPluginFactory(QWebPage* theWrappedObject, QWebPluginFactory* factory); bool isModified(QWebPage* theWrappedObject) const; void setForwardUnsupportedContent(QWebPage* theWrappedObject, bool forward); bool acceptNavigationRequest(QWebPage* theWrappedObject, QWebFrame* frame, const QNetworkRequest& request, QWebPage::NavigationType type); quint64 totalBytes(QWebPage* theWrappedObject) const; QString userAgentForUrl(QWebPage* theWrappedObject, const QUrl& url) const; void setViewportSize(QWebPage* theWrappedObject, const QSize& size) const; void setLinkDelegationPolicy(QWebPage* theWrappedObject, QWebPage::LinkDelegationPolicy policy); void triggerAction(QWebPage* theWrappedObject, QWebPage::WebAction action, bool checked = false); void javaScriptConsoleMessage(QWebPage* theWrappedObject, const QString& message, int lineNumber, const QString& sourceID); QAction* action(QWebPage* theWrappedObject, QWebPage::WebAction action) const; quint64 bytesReceived(QWebPage* theWrappedObject) const; void updatePositionDependentActions(QWebPage* theWrappedObject, const QPoint& pos); QWidget* view(QWebPage* theWrappedObject) const; void setNetworkAccessManager(QWebPage* theWrappedObject, QNetworkAccessManager* manager); void setView(QWebPage* theWrappedObject, QWidget* view); QWebHistory* history(QWebPage* theWrappedObject) const; QWebPage::LinkDelegationPolicy linkDelegationPolicy(QWebPage* theWrappedObject) const; bool swallowContextMenuEvent(QWebPage* theWrappedObject, QContextMenuEvent* event); QString chooseFile(QWebPage* theWrappedObject, QWebFrame* originatingFrame, const QString& oldFile); QWebFrame* currentFrame(QWebPage* theWrappedObject) const; QString selectedText(QWebPage* theWrappedObject) const; bool supportsExtension(QWebPage* theWrappedObject, QWebPage::Extension extension) const; QObject* createPlugin(QWebPage* theWrappedObject, const QString& classid, const QUrl& url, const QStringList& paramNames, const QStringList& paramValues); }; #endif // PYTHONQTWRAPPER_QWEBPAGE_H