Skip to content

Commit

Permalink
debian packaging update: add internal QtWebKit bindings
Browse files Browse the repository at this point in the history
jef-n committed Sep 6, 2016
1 parent 02af8b5 commit c2f0fff
Showing 21 changed files with 2,001 additions and 6 deletions.
3 changes: 0 additions & 3 deletions cmake/SIPMacros.cmake
Original file line number Diff line number Diff line change
@@ -137,9 +137,6 @@ MACRO(BUILD_SIP_PYTHON_MODULE MODULE_NAME SIP_FILES EXTRA_OBJECTS)

IF (WIN32)
SET_TARGET_PROPERTIES(${_logical_name} PROPERTIES SUFFIX ".pyd")
ENDIF (WIN32)

IF(WIN32)
GET_TARGET_PROPERTY(_runtime_output ${_logical_name} RUNTIME_OUTPUT_DIRECTORY)
ADD_CUSTOM_COMMAND(TARGET ${_logical_name} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E echo "Copying extension ${_child_module_name}"
2 changes: 1 addition & 1 deletion debian/control.in
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ Build-Depends:
libqt4-opengl-dev,
libqca2-dev,
libqca2-plugin-ossl,
#jessie precise trusty utopic xenial# libqtwebkit-dev,
libqtwebkit-dev,
#stretch jessie# libqwt-dev,
#precise trusty xenial sid# libqwt5-qt4-dev,
#sid stretch jessie trusty xenial# libqjson-dev,
1 change: 1 addition & 0 deletions debian/python-qgis.install.in
Original file line number Diff line number Diff line change
@@ -9,3 +9,4 @@ usr/lib/python*/*-packages/qgis/server/*
usr/lib/python*/*-packages/qgis/testing/*
#precise#usr/lib/python*/*-packages/pyspatialite/*.py
#precise#usr/lib/python*/*-packages/pyspatialite/*.so
#sid stretch xenial#usr/lib/python*/*-packages/PyQt4/*.so
4 changes: 2 additions & 2 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -125,8 +125,8 @@ ifneq (,$(findstring $(DISTRIBUTION),"sid stretch"))
CMAKE_OPTS += -DPOSTGRES_LIBRARY=/usr/lib/$(DEB_BUILD_MULTIARCH)/libpq.so
endif

ifneq (,$(findstring $(DISTRIBUTION),"sid stretch"))
CMAKE_OPTS += -DWITH_QTWEBKIT=FALSE
ifneq (,$(findstring $(DISTRIBUTION),"sid stretch xenial"))
CMAKE_OPTS += -DWITH_INTERNAL_WEBKIT_BINDINGS=TRUE
endif

ifneq (,$(findstring $(DISTRIBUTION),"sid"))
14 changes: 14 additions & 0 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -338,3 +338,17 @@ FOREACH(module ${PY_MODULES})
ENDFOREACH(pyfile)
PY_COMPILE(py${module} "${QGIS_PYTHON_OUTPUT_DIRECTORY}/${module}")
ENDFOREACH(module)

SET (WITH_INTERNAL_WEBKIT_BINDINGS FALSE CACHE BOOL "Build internal QtWebKit bindings")
IF(WITH_INTERNAL_WEBKIT_BINDINGS)
INCLUDE_DIRECTORIES(${QT_QTWEBKIT_INCLUDE_DIR})
FILE(GLOB_RECURSE sip_files_qtwebkit QtWebKit/*.sip)
SET(SIP_EXTRA_FILES_DEPEND ${sip_files_qtwebkit})
SET(SIP_EXTRA_OPTIONS ${PYQT_SIP_FLAGS} -o -a ${CMAKE_BINARY_DIR}/python/PyQt4.QtWebKit.api)

SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PYTHON_OUTPUT_DIRECTORY}/PyQt4)
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PYTHON_OUTPUT_DIRECTORY}/PyQt4)
GENERATE_SIP_PYTHON_MODULE_CODE(PyQt4.QtWebKit QtWebKit/QtWebKitmod.sip cpp_files)
BUILD_SIP_PYTHON_MODULE(PyQt4.QtWebKit QtWebKitmod.sip ${cpp_files} "" QtWebKit QtCore QtGui QtNetwork)
SET(SIP_QTWEBKIT_CPP_FILES ${cpp_files})
ENDIF(WITH_INTERNAL_WEBKIT_BINDINGS)
63 changes: 63 additions & 0 deletions python/QtWebKit/QtWebKitmod.sip
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// QtWebKitmod.sip generated by MetaSIP
//
// This file is part of the QtWebKit Python extension module.
//
// Copyright (c) 2015 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt4.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


%Module(name=PyQt4.QtWebKit, keyword_arguments="Optional")

%Import QtCore/QtCoremod.sip
%Import QtGui/QtGuimod.sip
%Import QtNetwork/QtNetworkmod.sip

%Copying
Copyright (c) 2015 Riverbank Computing Limited <info@riverbankcomputing.com>

This file is part of PyQt4.

This file may be used under the terms of the GNU General Public License
version 3.0 as published by the Free Software Foundation and appearing in
the file LICENSE included in the packaging of this file. Please review the
following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.

If you do not wish to use this file under the terms of the GPL version 3.0
then you may purchase a commercial license. For more information contact
info@riverbankcomputing.com.

This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%End

%DefaultSupertype sip.simplewrapper

%Include qgraphicswebview.sip
%Include qwebdatabase.sip
%Include qwebelement.sip
%Include qwebframe.sip
%Include qwebkitglobal.sip
%Include qwebhistory.sip
%Include qwebhistoryinterface.sip
%Include qwebinspector.sip
%Include qwebkitversion.sip
%Include qwebpage.sip
%Include qwebpluginfactory.sip
%Include qwebsecurityorigin.sip
%Include qwebsettings.sip
%Include qwebview.sip
Empty file added python/QtWebKit/__init__.py
Empty file.
150 changes: 150 additions & 0 deletions python/QtWebKit/qgraphicswebview.sip
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
// qgraphicswebview.sip generated by MetaSIP
//
// This file is part of the QtWebKit Python extension module.
//
// Copyright (c) 2015 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt4.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


%If (Qt_4_6_0 -)

class QGraphicsWebView : QGraphicsWidget
{
%TypeHeaderCode
#include <qgraphicswebview.h>
%End

%ConvertToSubClassCode
sipType = 0;

// For some reason Qt doesn't allocate a new type for this so we have to test
// the numeric and QObject types.
if (sipCpp->type() == 11)
{
QGraphicsWidget *gw = static_cast<QGraphicsWidget *>(sipCpp);

if (gw->inherits("QGraphicsWebView"))
{
*sipCppRet = static_cast<QGraphicsWebView *>(gw);
sipType = sipType_QGraphicsWebView;
}
}
%End

public:
explicit QGraphicsWebView(QGraphicsItem *parent /TransferThis/ = 0);
virtual ~QGraphicsWebView();
QWebPage *page() const;
void setPage(QWebPage * /KeepReference/);
QUrl url() const;
void setUrl(const QUrl &);
QString title() const;
QIcon icon() const;
qreal zoomFactor() const;
void setZoomFactor(qreal);
bool isModified() const;
void load(const QUrl &url) /ReleaseGIL/;
void load(const QNetworkRequest &request, QNetworkAccessManager::Operation operation = QNetworkAccessManager::GetOperation, const QByteArray &body = QByteArray()) /ReleaseGIL/;
void setHtml(const QString &html, const QUrl &baseUrl = QUrl());
void setContent(const QByteArray &data, const QString &mimeType = QString(), const QUrl &baseUrl = QUrl());
QWebHistory *history() const;
QWebSettings *settings() const;
QAction *pageAction(QWebPage::WebAction action) const;
void triggerPageAction(QWebPage::WebAction action, bool checked = false);
bool findText(const QString &subString, QFlags<QWebPage::FindFlag> options = 0);
virtual void setGeometry(const QRectF &rect);
virtual void updateGeometry();
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value);
virtual bool event(QEvent *);
virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const;
virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;

public slots:
void stop();
void back();
void forward();
void reload();

signals:
void loadStarted();
void loadFinished(bool);
void loadProgress(int progress);
void urlChanged(const QUrl &);
void titleChanged(const QString &);
void iconChanged();
void statusBarMessage(const QString &message);
void linkClicked(const QUrl &);

protected:
virtual void mousePressEvent(QGraphicsSceneMouseEvent *);
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *);
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *);
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *);
virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *);
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *);
virtual void wheelEvent(QGraphicsSceneWheelEvent *);
virtual void keyPressEvent(QKeyEvent *);
virtual void keyReleaseEvent(QKeyEvent *);
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *);
virtual void dragEnterEvent(QGraphicsSceneDragDropEvent *);
virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent *);
virtual void dragMoveEvent(QGraphicsSceneDragDropEvent *);
virtual void dropEvent(QGraphicsSceneDragDropEvent *);
virtual void focusInEvent(QFocusEvent *);
virtual void focusOutEvent(QFocusEvent *);
virtual void inputMethodEvent(QInputMethodEvent *);
virtual bool focusNextPrevChild(bool next);
virtual bool sceneEvent(QEvent *);

public:
%If (Qt_4_7_0 -)
bool resizesToContents() const;
%End
%If (Qt_4_7_0 -)
void setResizesToContents(bool enabled);
%End
%If (Qt_4_7_0 -)
bool isTiledBackingStoreFrozen() const;
%End
%If (Qt_4_7_0 -)
void setTiledBackingStoreFrozen(bool frozen);
%End
%If (Qt_4_8_0 -)
QFlags<QPainter::RenderHint> renderHints() const;
%End
%If (Qt_4_8_0 -)
void setRenderHints(QFlags<QPainter::RenderHint> hints);
%End
%If (Qt_4_8_0 -)
void setRenderHint(QPainter::RenderHint hint, bool enabled = true);
%End
};

%End

%ModuleHeaderCode
#if QT_VERSION >= 0x040600
// This is needed by the %ConvertSubClassCode.
#include <QGraphicsWebView>
#endif

// This is needed for Qt v5.0.0.
#if defined(B0)
#undef B0
#endif
%End
46 changes: 46 additions & 0 deletions python/QtWebKit/qwebdatabase.sip
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// qwebdatabase.sip generated by MetaSIP
//
// This file is part of the QtWebKit Python extension module.
//
// Copyright (c) 2015 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt4.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


%If (Qt_4_5_0 -)

class QWebDatabase
{
%TypeHeaderCode
#include <qwebdatabase.h>
%End

public:
QWebDatabase(const QWebDatabase &other);
~QWebDatabase();
QString name() const;
QString displayName() const;
qint64 expectedSize() const;
qint64 size() const;
QString fileName() const;
QWebSecurityOrigin origin() const;
static void removeDatabase(const QWebDatabase &db);
%If (Qt_4_6_0 -)
static void removeAllDatabases();
%End
};

%End
144 changes: 144 additions & 0 deletions python/QtWebKit/qwebelement.sip
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
// qwebelement.sip generated by MetaSIP
//
// This file is part of the QtWebKit Python extension module.
//
// Copyright (c) 2015 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt4.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


%If (Qt_4_6_0 -)

class QWebElement
{
%TypeHeaderCode
#include <qwebelement.h>
%End

public:
QWebElement();
QWebElement(const QWebElement &);
~QWebElement();
bool operator==(const QWebElement &o) const;
bool operator!=(const QWebElement &o) const;
bool isNull() const;
QWebElementCollection findAll(const QString &selectorQuery) const;
QWebElement findFirst(const QString &selectorQuery) const;
void setPlainText(const QString &text);
QString toPlainText() const;
void setOuterXml(const QString &markup);
QString toOuterXml() const;
void setInnerXml(const QString &markup);
QString toInnerXml() const;
void setAttribute(const QString &name, const QString &value);
void setAttributeNS(const QString &namespaceUri, const QString &name, const QString &value);
QString attribute(const QString &name, const QString &defaultValue = QString()) const;
QString attributeNS(const QString &namespaceUri, const QString &name, const QString &defaultValue = QString()) const;
bool hasAttribute(const QString &name) const;
bool hasAttributeNS(const QString &namespaceUri, const QString &name) const;
void removeAttribute(const QString &name);
void removeAttributeNS(const QString &namespaceUri, const QString &name);
bool hasAttributes() const;
QStringList attributeNames(const QString &namespaceUri = QString()) const;
QStringList classes() const;
bool hasClass(const QString &name) const;
void addClass(const QString &name);
void removeClass(const QString &name);
void toggleClass(const QString &name);
bool hasFocus() const;
void setFocus();
QRect geometry() const;
QString tagName() const;
QString prefix() const;
QString localName() const;
QString namespaceUri() const;
QWebElement parent() const;
QWebElement firstChild() const;
QWebElement lastChild() const;
QWebElement nextSibling() const;
QWebElement previousSibling() const;
QWebElement document() const;
QWebFrame *webFrame() const;
void appendInside(const QString &markup);
void appendInside(const QWebElement &element);
void prependInside(const QString &markup);
void prependInside(const QWebElement &element);
void appendOutside(const QString &markup);
void appendOutside(const QWebElement &element);
void prependOutside(const QString &markup);
void prependOutside(const QWebElement &element);
void encloseContentsWith(const QWebElement &element);
void encloseContentsWith(const QString &markup);
void encloseWith(const QString &markup);
void encloseWith(const QWebElement &element);
void replace(const QString &markup);
void replace(const QWebElement &element);
QWebElement clone() const;
QWebElement &takeFromDocument();
void removeFromDocument();
void removeAllChildren();
QVariant evaluateJavaScript(const QString &scriptSource);

enum StyleResolveStrategy
{
InlineStyle,
CascadedStyle,
ComputedStyle,
};

QString styleProperty(const QString &name, QWebElement::StyleResolveStrategy strategy) const;
void setStyleProperty(const QString &name, const QString &value);
void render(QPainter *painter);
%If (Qt_4_8_0 -)
void render(QPainter *painter, const QRect &clip);
%End
};

%End
%If (Qt_4_6_0 -)

class QWebElementCollection
{
%TypeHeaderCode
#include <qwebelement.h>
%End

public:
QWebElementCollection();
QWebElementCollection(const QWebElement &contextElement, const QString &query);
QWebElementCollection(const QWebElementCollection &);
~QWebElementCollection();
QWebElementCollection operator+(const QWebElementCollection &other) const;
QWebElementCollection &operator+=(const QWebElementCollection &other);
void append(const QWebElementCollection &collection);
int count() const /__len__/;
QWebElement at(int i) const;
QWebElement operator[](int i) const;
%MethodCode
SIP_SSIZE_T idx = sipConvertFromSequenceIndex(a0, sipCpp->count());

if (idx < 0)
sipIsErr = 1;
else
sipRes = new QWebElement(sipCpp->operator[]((int)idx));
%End

QWebElement first() const;
QWebElement last() const;
QList<QWebElement> toList() const;
};

%End
244 changes: 244 additions & 0 deletions python/QtWebKit/qwebframe.sip
Original file line number Diff line number Diff line change
@@ -0,0 +1,244 @@
// qwebframe.sip generated by MetaSIP
//
// This file is part of the QtWebKit Python extension module.
//
// Copyright (c) 2015 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt4.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


%If (Qt_4_4_0 -)
%ModuleCode
#include <qwebframe.h>
%End
%End

%If (Qt_4_4_0 -)

class QWebHitTestResult
{
%TypeHeaderCode
#include <qwebframe.h>
%End

public:
QWebHitTestResult();
QWebHitTestResult(const QWebHitTestResult &other);
~QWebHitTestResult();
bool isNull() const;
QPoint pos() const;
QString title() const;
QString linkText() const;
QUrl linkUrl() const;
QUrl linkTitle() const;
QWebFrame *linkTargetFrame() const;
QString alternateText() const;
QUrl imageUrl() const;
QPixmap pixmap() const;
bool isContentEditable() const;
bool isContentSelected() const;
QWebFrame *frame() const;
%If (Qt_4_5_0 -)
QRect boundingRect() const;
%End
%If (Qt_4_6_0 -)
QWebElement enclosingBlockElement() const;
%End
%If (Qt_4_6_0 -)
QWebElement linkElement() const;
%End
%If (Qt_4_6_0 -)
QWebElement element() const;
%End
};

%End
%If (Qt_4_4_0 -)

class QWebFrame : QObject /NoDefaultCtors/
{
%TypeHeaderCode
#include <qwebframe.h>
%End

virtual ~QWebFrame();

public:
QWebPage *page() const;
void load(const QUrl &url);
void load(const QNetworkRequest &request, QNetworkAccessManager::Operation operation = QNetworkAccessManager::GetOperation, const QByteArray &body = QByteArray());
void setHtml(const QString &html, const QUrl &baseUrl = QUrl());
void setContent(const QByteArray &data, const QString &mimeType /DocValue="Py_v3:''"/ = QString(), const QUrl &baseUrl = QUrl());
%If (Qt_5_0_0 -)

enum ValueOwnership
{
QtOwnership,
ScriptOwnership,
AutoOwnership,
};

%End
%If (Qt_5_0_0 -)
void addToJavaScriptWindowObject(const QString &name, QObject *object, QWebFrame::ValueOwnership ownership = QWebFrame::QtOwnership);
%End
%If (- Qt_5_0_0)
void addToJavaScriptWindowObject(const QString &name, QObject *object);
%End
QString toHtml() const;
QString toPlainText() const;
%If (- Qt_5_0_0)
QString renderTreeDump() const;
%End
QString title() const;
void setUrl(const QUrl &url);
QUrl url() const;
QIcon icon() const;
QString frameName() const;
QWebFrame *parentFrame() const;
QList<QWebFrame*> childFrames() const;
Qt::ScrollBarPolicy scrollBarPolicy(Qt::Orientation orientation) const;
void setScrollBarPolicy(Qt::Orientation orientation, Qt::ScrollBarPolicy policy);
void setScrollBarValue(Qt::Orientation orientation, int value);
int scrollBarValue(Qt::Orientation orientation) const;
int scrollBarMinimum(Qt::Orientation orientation) const;
int scrollBarMaximum(Qt::Orientation orientation) const;
%If (- Qt_5_0_0)
void render(QPainter *painter, const QRegion &clip);
%End
%If (- Qt_5_0_0)
void render(QPainter *painter);
%End
void setTextSizeMultiplier(qreal factor);
qreal textSizeMultiplier() const;
QPoint pos() const;
QRect geometry() const;
QSize contentsSize() const;
QWebHitTestResult hitTestContent(const QPoint &pos) const;
virtual bool event(QEvent *);

public slots:
QVariant evaluateJavaScript(const QString &scriptSource);
%If (PyQt_Printer)
void print(QPrinter *printer) const /PyName=print_/;
%End
%If (Py_v3)
%If (PyQt_Printer)
void print(QPrinter *printer) const;
%End
%End

signals:
void javaScriptWindowObjectCleared();
void titleChanged(const QString &title);
void urlChanged(const QUrl &url);
void initialLayoutCompleted();
void iconChanged();

public:
%If (Qt_4_5_0 -)
QMultiMap<QString, QString> metaData() const;
%End
%If (Qt_4_5_0 -)
void scroll(int, int);
%End
%If (Qt_4_5_0 -)
QPoint scrollPosition() const;
%End
%If (Qt_4_5_0 -)
void setScrollPosition(const QPoint &pos);
%End
%If (Qt_4_5_0 -)
qreal zoomFactor() const;
%End
%If (Qt_4_5_0 -)
void setZoomFactor(qreal factor);
%End
%If (Qt_4_5_0 -)
QWebSecurityOrigin securityOrigin() const;
%End
%If (Qt_4_6_0 -)
QUrl requestedUrl() const;
%End
%If (Qt_4_6_0 -)
QUrl baseUrl() const;
%End
%If (Qt_4_6_0 -)
QRect scrollBarGeometry(Qt::Orientation orientation) const;
%End
%If (Qt_4_6_0 -)

enum RenderLayer
{
ContentsLayer,
ScrollBarLayer,
PanIconLayer,
AllLayers,
};

%End
%If (Qt_5_0_0 -)
typedef QFlags<QWebFrame::RenderLayer> RenderLayers;
%End
%If (Qt_4_6_0 - Qt_5_0_0)
void render(QPainter *, QWebFrame::RenderLayer layer, const QRegion &clip = QRegion());
%End
%If (Qt_5_0_0 -)
void render(QPainter *, const QRegion &clip = QRegion());
%End
%If (Qt_5_0_0 -)
void render(QPainter *, QFlags<QWebFrame::RenderLayer> layer, const QRegion &clip = QRegion());
%End
%If (Qt_4_6_0 -)
bool hasFocus() const;
%End
%If (Qt_4_6_0 -)
void setFocus();
%End
%If (Qt_4_6_0 -)
QWebElement documentElement() const;
%End
%If (Qt_4_6_0 -)
QWebElementCollection findAllElements(const QString &selectorQuery) const;
%End
%If (Qt_4_6_0 -)
QWebElement findFirstElement(const QString &selectorQuery) const;
%End

signals:
%If (Qt_4_6_0 -)
void contentsSizeChanged(const QSize &size);
%End
%If (Qt_4_6_0 -)
void loadStarted();
%End
%If (Qt_4_6_0 -)
void loadFinished(bool ok);
%End
%If (Qt_4_7_0 -)
void pageChanged();
%End

public:
%If (Qt_4_7_0 -)
void scrollToAnchor(const QString &anchor);
%End
};

%End
%If (Qt_5_0_0 -)
QFlags<QWebFrame::RenderLayer> operator|(QWebFrame::RenderLayer f1, QFlags<QWebFrame::RenderLayer> f2);
%End
104 changes: 104 additions & 0 deletions python/QtWebKit/qwebhistory.sip
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
// qwebhistory.sip generated by MetaSIP
//
// This file is part of the QtWebKit Python extension module.
//
// Copyright (c) 2015 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt4.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


%If (Qt_4_4_0 -)
%ModuleCode
#include <qwebhistory.h>
%End
%End

%If (Qt_4_4_0 -)

class QWebHistoryItem
{
%TypeHeaderCode
#include <qwebhistory.h>
%End

public:
QWebHistoryItem(const QWebHistoryItem &other);
~QWebHistoryItem();
QUrl originalUrl() const;
QUrl url() const;
QString title() const;
QDateTime lastVisited() const;
QIcon icon() const;
%If (Qt_4_5_0 -)
QVariant userData() const;
%End
%If (Qt_4_5_0 -)
void setUserData(const QVariant &userData);
%End
%If (Qt_4_5_0 -)
bool isValid() const;
%End
};

%End
%If (Qt_4_4_0 -)

class QWebHistory
{
%TypeHeaderCode
#include <qwebhistory.h>
%End

public:
void clear();
QList<QWebHistoryItem> items() const;
QList<QWebHistoryItem> backItems(int maxItems) const;
QList<QWebHistoryItem> forwardItems(int maxItems) const;
bool canGoBack() const;
bool canGoForward() const;
void back();
void forward();
void goToItem(const QWebHistoryItem &item);
QWebHistoryItem backItem() const;
QWebHistoryItem currentItem() const;
QWebHistoryItem forwardItem() const;
QWebHistoryItem itemAt(int i) const;
int count() const /__len__/;

private:
QWebHistory();
QWebHistory(const QWebHistory &);
~QWebHistory();

public:
%If (Qt_4_5_0 -)
int currentItemIndex() const;
%End
%If (Qt_4_5_0 -)
int maximumItemCount() const;
%End
%If (Qt_4_5_0 -)
void setMaximumItemCount(int count);
%End
};

%End
%If (Qt_4_6_0 -)
QDataStream &operator<<(QDataStream &, const QWebHistory & /Constrained/);
%End
%If (Qt_4_6_0 -)
QDataStream &operator>>(QDataStream &, QWebHistory & /Constrained/);
%End
40 changes: 40 additions & 0 deletions python/QtWebKit/qwebhistoryinterface.sip
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// qwebhistoryinterface.sip generated by MetaSIP
//
// This file is part of the QtWebKit Python extension module.
//
// Copyright (c) 2015 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt4.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


%If (Qt_4_4_0 -)

class QWebHistoryInterface : QObject
{
%TypeHeaderCode
#include <qwebhistoryinterface.h>
%End

public:
QWebHistoryInterface(QObject *parent /TransferThis/ = 0);
virtual ~QWebHistoryInterface();
static void setDefaultInterface(QWebHistoryInterface *defaultInterface /KeepReference/);
static QWebHistoryInterface *defaultInterface();
virtual bool historyContains(const QString &url) const = 0;
virtual void addHistoryEntry(const QString &url) = 0;
};

%End
48 changes: 48 additions & 0 deletions python/QtWebKit/qwebinspector.sip
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// qwebinspector.sip generated by MetaSIP
//
// This file is part of the QtWebKit Python extension module.
//
// Copyright (c) 2015 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt4.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


%If (Qt_4_6_0 -)

class QWebInspector : QWidget
{
%TypeHeaderCode
#include <qwebinspector.h>
%End

public:
QWebInspector(QWidget *parent /TransferThis/ = 0);
virtual ~QWebInspector();
void setPage(QWebPage *page /KeepReference/);
QWebPage *page() const;
virtual QSize sizeHint() const;
virtual bool event(QEvent *);

protected:
virtual void resizeEvent(QResizeEvent *event);
virtual void showEvent(QShowEvent *event);
virtual void hideEvent(QHideEvent *event);
%If (Qt_4_7_0 -)
virtual void closeEvent(QCloseEvent *event);
%End
};

%End
37 changes: 37 additions & 0 deletions python/QtWebKit/qwebkitglobal.sip
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// qwebkitglobal.sip generated by MetaSIP
//
// This file is part of the QtWebKit Python extension module.
//
// Copyright (c) 2015 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt4.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


%If (Qt_5_0_0 -)
%ModuleCode
#include <qwebkitglobal.h>
%End
%End

%If (Qt_5_0_0 -)
QString qWebKitVersion();
%End
%If (Qt_5_0_0 -)
int qWebKitMajorVersion();
%End
%If (Qt_5_0_0 -)
int qWebKitMinorVersion();
%End
37 changes: 37 additions & 0 deletions python/QtWebKit/qwebkitversion.sip
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// qwebkitversion.sip generated by MetaSIP
//
// This file is part of the QtWebKit Python extension module.
//
// Copyright (c) 2015 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt4.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


%If (Qt_4_6_0 - Qt_5_0_0)
%ModuleCode
#include <qwebkitversion.h>
%End
%End

%If (Qt_4_6_0 - Qt_5_0_0)
QString qWebKitVersion();
%End
%If (Qt_4_6_0 - Qt_5_0_0)
int qWebKitMajorVersion();
%End
%If (Qt_4_6_0 - Qt_5_0_0)
int qWebKitMinorVersion();
%End
522 changes: 522 additions & 0 deletions python/QtWebKit/qwebpage.sip

Large diffs are not rendered by default.

88 changes: 88 additions & 0 deletions python/QtWebKit/qwebpluginfactory.sip
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
// qwebpluginfactory.sip generated by MetaSIP
//
// This file is part of the QtWebKit Python extension module.
//
// Copyright (c) 2015 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt4.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


%If (Qt_4_4_0 -)

class QWebPluginFactory : QObject
{
%TypeHeaderCode
#include <qwebpluginfactory.h>
%End

public:
struct MimeType
{
%TypeHeaderCode
#include <qwebpluginfactory.h>
%End

QString name;
QString description;
QStringList fileExtensions;
%If (Qt_4_6_0 -)
bool operator==(const QWebPluginFactory::MimeType &other) const;
%End
%If (Qt_4_6_0 -)
bool operator!=(const QWebPluginFactory::MimeType &other) const;
%End
};

struct Plugin
{
%TypeHeaderCode
#include <qwebpluginfactory.h>
%End

QString name;
QString description;
QList<QWebPluginFactory::MimeType> mimeTypes;
};

explicit QWebPluginFactory(QObject *parent /TransferThis/ = 0);
virtual ~QWebPluginFactory();
virtual QList<QWebPluginFactory::Plugin> plugins() const = 0;
virtual void refreshPlugins();
virtual QObject *create(const QString &mimeType, const QUrl &url, const QStringList &argumentNames, const QStringList &argumentValues) const = 0 /Factory/;

enum Extension
{
};

class ExtensionOption
{
%TypeHeaderCode
#include <qwebpluginfactory.h>
%End
};

class ExtensionReturn
{
%TypeHeaderCode
#include <qwebpluginfactory.h>
%End
};

virtual bool extension(QWebPluginFactory::Extension extension, const QWebPluginFactory::ExtensionOption *option = 0, QWebPluginFactory::ExtensionReturn *output = 0);
virtual bool supportsExtension(QWebPluginFactory::Extension extension) const;
};

%End
56 changes: 56 additions & 0 deletions python/QtWebKit/qwebsecurityorigin.sip
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// qwebsecurityorigin.sip generated by MetaSIP
//
// This file is part of the QtWebKit Python extension module.
//
// Copyright (c) 2015 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt4.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


%If (Qt_4_5_0 -)

class QWebSecurityOrigin
{
%TypeHeaderCode
#include <qwebsecurityorigin.h>
%End

public:
QWebSecurityOrigin(const QWebSecurityOrigin &other);
~QWebSecurityOrigin();
static QList<QWebSecurityOrigin> allOrigins();
QString scheme() const;
QString host() const;
int port() const;
qint64 databaseUsage() const;
qint64 databaseQuota() const;
void setDatabaseQuota(qint64 quota);
QList<QWebDatabase> databases() const;
%If (Qt_4_6_0 -)
static void addLocalScheme(const QString &scheme);
%End
%If (Qt_4_6_0 -)
static void removeLocalScheme(const QString &scheme);
%End
%If (Qt_4_6_0 -)
static QStringList localSchemes();
%End
%If (Qt_4_8_0 -)
void setApplicationCacheQuota(qint64 quota);
%End
};

%End
237 changes: 237 additions & 0 deletions python/QtWebKit/qwebsettings.sip
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
// qwebsettings.sip generated by MetaSIP
//
// This file is part of the QtWebKit Python extension module.
//
// Copyright (c) 2015 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt4.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


%If (Qt_4_4_0 -)

class QWebSettings
{
%TypeHeaderCode
#include <qwebsettings.h>
%End

public:
enum FontFamily
{
StandardFont,
FixedFont,
SerifFont,
SansSerifFont,
CursiveFont,
FantasyFont,
};

enum WebAttribute
{
AutoLoadImages,
JavascriptEnabled,
JavaEnabled,
PluginsEnabled,
PrivateBrowsingEnabled,
JavascriptCanOpenWindows,
%If (Qt_4_8_0 -)
JavascriptCanCloseWindows,
%End
JavascriptCanAccessClipboard,
DeveloperExtrasEnabled,
LinksIncludedInFocusChain,
%If (Qt_4_5_0 -)
ZoomTextOnly,
%End
%If (Qt_4_5_0 -)
PrintElementBackgrounds,
%End
%If (Qt_4_5_0 -)
OfflineStorageDatabaseEnabled,
%End
%If (Qt_4_5_0 -)
OfflineWebApplicationCacheEnabled,
%End
%If (Qt_4_5_0 -)
LocalStorageDatabaseEnabled,
%End
%If (Qt_4_6_0 -)
LocalStorageEnabled,
%End
%If (Qt_4_6_0 -)
LocalContentCanAccessRemoteUrls,
%End
%If (Qt_4_6_0 -)
DnsPrefetchEnabled,
%End
%If (Qt_4_7_0 -)
XSSAuditingEnabled,
%End
%If (Qt_4_7_0 -)
AcceleratedCompositingEnabled,
%End
%If (Qt_4_7_0 -)
SpatialNavigationEnabled,
%End
%If (Qt_4_7_0 -)
LocalContentCanAccessFileUrls,
%End
%If (Qt_4_7_0 -)
TiledBackingStoreEnabled,
%End
%If (Qt_4_7_0 -)
FrameFlatteningEnabled,
%End
%If (Qt_4_7_0 -)
SiteSpecificQuirksEnabled,
%End
%If (Qt_4_8_0 -)
WebGLEnabled,
%End
%If (Qt_4_8_0 -)
HyperlinkAuditingEnabled,
%End
%If (Qt_5_0_0 -)
CSSRegionsEnabled,
%End
%If (Qt_5_0_0 -)
CSSGridLayoutEnabled,
%End
%If (Qt_5_0_0 -)
ScrollAnimatorEnabled,
%End
%If (Qt_5_0_0 -)
CaretBrowsingEnabled,
%End
%If (Qt_5_0_0 -)
NotificationsEnabled,
%End
};

enum WebGraphic
{
MissingImageGraphic,
MissingPluginGraphic,
DefaultFrameIconGraphic,
TextAreaSizeGripCornerGraphic,
%If (Qt_4_8_0 -)
InputSpeechButtonGraphic,
%End
%If (Qt_4_8_0 -)
SearchCancelButtonGraphic,
%End
%If (Qt_4_8_0 -)
SearchCancelButtonPressedGraphic,
%End
};

enum FontSize
{
MinimumFontSize,
MinimumLogicalFontSize,
DefaultFontSize,
DefaultFixedFontSize,
};

static QWebSettings *globalSettings();
void setFontFamily(QWebSettings::FontFamily which, const QString &family);
QString fontFamily(QWebSettings::FontFamily which) const;
void resetFontFamily(QWebSettings::FontFamily which);
void setFontSize(QWebSettings::FontSize type, int size);
int fontSize(QWebSettings::FontSize type) const;
void resetFontSize(QWebSettings::FontSize type);
void setAttribute(QWebSettings::WebAttribute attr, bool on);
bool testAttribute(QWebSettings::WebAttribute attr) const;
void resetAttribute(QWebSettings::WebAttribute attr);
void setUserStyleSheetUrl(const QUrl &location);
QUrl userStyleSheetUrl() const;
static void setIconDatabasePath(const QString &location);
static QString iconDatabasePath();
static void clearIconDatabase();
static QIcon iconForUrl(const QUrl &url);
static void setWebGraphic(QWebSettings::WebGraphic type, const QPixmap &graphic);
static QPixmap webGraphic(QWebSettings::WebGraphic type);
static void setMaximumPagesInCache(int pages);
static int maximumPagesInCache();
static void setObjectCacheCapacities(int cacheMinDeadCapacity, int cacheMaxDead, int totalCapacity);

private:
QWebSettings();
QWebSettings(const QWebSettings &);
~QWebSettings();

public:
%If (Qt_4_5_0 -)
static void setOfflineStoragePath(const QString &path);
%End
%If (Qt_4_5_0 -)
static QString offlineStoragePath();
%End
%If (Qt_4_5_0 -)
static void setOfflineStorageDefaultQuota(qint64 maximumSize);
%End
%If (Qt_4_5_0 -)
static qint64 offlineStorageDefaultQuota();
%End
%If (Qt_4_6_0 -)
void setDefaultTextEncoding(const QString &encoding);
%End
%If (Qt_4_6_0 -)
QString defaultTextEncoding() const;
%End
%If (Qt_4_6_0 -)
static void setOfflineWebApplicationCachePath(const QString &path);
%End
%If (Qt_4_6_0 -)
static QString offlineWebApplicationCachePath();
%End
%If (Qt_4_6_0 -)
static void setOfflineWebApplicationCacheQuota(qint64 maximumSize);
%End
%If (Qt_4_6_0 -)
static qint64 offlineWebApplicationCacheQuota();
%End
%If (Qt_4_6_0 -)
void setLocalStoragePath(const QString &path);
%End
%If (Qt_4_6_0 -)
QString localStoragePath() const;
%End
%If (Qt_4_6_0 -)
static void clearMemoryCaches();
%End
%If (Qt_4_6_0 -)
static void enablePersistentStorage(const QString &path = QString());
%End
%If (Qt_5_0_0 -)

enum ThirdPartyCookiePolicy
{
AlwaysAllowThirdPartyCookies,
AlwaysBlockThirdPartyCookies,
AllowThirdPartyWithExistingCookies,
};

%End
%If (Qt_5_0_0 -)
void setThirdPartyCookiePolicy(QWebSettings::ThirdPartyCookiePolicy);
%End
%If (Qt_5_0_0 -)
QWebSettings::ThirdPartyCookiePolicy thirdPartyCookiePolicy() const;
%End
};

%End
167 changes: 167 additions & 0 deletions python/QtWebKit/qwebview.sip
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
// qwebview.sip generated by MetaSIP
//
// This file is part of the QtWebKit Python extension module.
//
// Copyright (c) 2015 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt4.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


%If (Qt_4_4_0 -)

class QWebView : QWidget
{
%TypeHeaderCode
#include <qwebview.h>
%End

%ConvertToSubClassCode
static struct class_graph {
const char *name;
sipTypeDef **type;
int yes, no;
} graph[] = {
{sipName_QWebPluginFactory, &sipType_QWebPluginFactory, -1, 1},
{sipName_QWebFrame, &sipType_QWebFrame, -1, 2},
{sipName_QWebPage, &sipType_QWebPage, -1, 3},
{sipName_QWebHistoryInterface, &sipType_QWebHistoryInterface, -1, 4},
{sipName_QWebView, &sipType_QWebView, -1, 5},
#if QT_VERSION >= 0x040600
{sipName_QWebInspector, &sipType_QWebInspector, -1, 6},
{sipName_QGraphicsWebView, &sipType_QGraphicsWebView, -1, -1},
#else
{0, 0, -1, 6},
{0, 0, -1, -1},
#endif
};

int i = 0;

sipType = 0;

do
{
struct class_graph *cg = &graph[i];

if (cg->name != NULL && sipCpp->inherits(cg->name))
{
sipType = *cg->type;
i = cg->yes;
}
else
i = cg->no;
}
while (i >= 0);
%End

public:
explicit QWebView(QWidget *parent /TransferThis/ = 0);
virtual ~QWebView();
QWebPage *page() const;
void setPage(QWebPage *page /KeepReference/);
void load(const QUrl &url) /ReleaseGIL/;
void load(const QNetworkRequest &request, QNetworkAccessManager::Operation operation = QNetworkAccessManager::GetOperation, const QByteArray &body = QByteArray()) /ReleaseGIL/;
void setHtml(const QString &html, const QUrl &baseUrl = QUrl());
void setContent(const QByteArray &data, const QString &mimeType /DocValue="Py_v3:''"/ = QString(), const QUrl &baseUrl = QUrl());
QWebHistory *history() const;
QWebSettings *settings() const;
QString title() const;
void setUrl(const QUrl &url);
QUrl url() const;
QIcon icon() const;
QString selectedText() const;
QAction *pageAction(QWebPage::WebAction action) const;
void triggerPageAction(QWebPage::WebAction action, bool checked = false);
bool isModified() const;
virtual QVariant inputMethodQuery(Qt::InputMethodQuery property) const;
virtual QSize sizeHint() const;
void setTextSizeMultiplier(qreal factor);
qreal textSizeMultiplier() const;
bool findText(const QString &subString, QFlags<QWebPage::FindFlag> options = 0);
virtual bool event(QEvent *);

public slots:
void stop();
void back();
void forward();
void reload();
%If (PyQt_Printer)
void print(QPrinter *printer) const /PyName=print_/;
%End
%If (Py_v3)
%If (PyQt_Printer)
void print(QPrinter *printer) const;
%End
%End

signals:
void loadStarted();
void loadProgress(int progress);
void loadFinished(bool);
void titleChanged(const QString &title);
void statusBarMessage(const QString &text);
void linkClicked(const QUrl &url);
void selectionChanged();
void iconChanged();
void urlChanged(const QUrl &url);

protected:
virtual QWebView *createWindow(QWebPage::WebWindowType type);
virtual void resizeEvent(QResizeEvent *e);
virtual void paintEvent(QPaintEvent *ev);
virtual void changeEvent(QEvent *);
virtual void mouseMoveEvent(QMouseEvent *);
virtual void mousePressEvent(QMouseEvent *);
virtual void mouseDoubleClickEvent(QMouseEvent *);
virtual void mouseReleaseEvent(QMouseEvent *);
virtual void contextMenuEvent(QContextMenuEvent *);
virtual void wheelEvent(QWheelEvent *);
virtual void keyPressEvent(QKeyEvent *);
virtual void keyReleaseEvent(QKeyEvent *);
virtual void dragEnterEvent(QDragEnterEvent *);
virtual void dragLeaveEvent(QDragLeaveEvent *);
virtual void dragMoveEvent(QDragMoveEvent *);
virtual void dropEvent(QDropEvent *);
virtual void focusInEvent(QFocusEvent *);
virtual void focusOutEvent(QFocusEvent *);
virtual void inputMethodEvent(QInputMethodEvent *);
virtual bool focusNextPrevChild(bool next);

public:
%If (Qt_4_5_0 -)
qreal zoomFactor() const;
%End
%If (Qt_4_5_0 -)
void setZoomFactor(qreal factor);
%End
%If (Qt_4_6_0 -)
QFlags<QPainter::RenderHint> renderHints() const;
%End
%If (Qt_4_6_0 -)
void setRenderHints(QFlags<QPainter::RenderHint> hints);
%End
%If (Qt_4_6_0 -)
void setRenderHint(QPainter::RenderHint hint, bool enabled = true);
%End
%If (Qt_4_8_0 -)
bool hasSelection() const;
%End
%If (Qt_4_8_0 -)
QString selectedHtml() const;
%End
};

%End

0 comments on commit c2f0fff

Please sign in to comment.