Fix tray visibility and message reception issues
- Disable sound initialization to prevent hanging
- Add missing import re in utils.py
- Fix settings loading for QSettings
- Update file paths to use PROJECT_ROOT
- Revert to working API paths and listener from commit efdc63e
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
# Automatically generated configuration for PyQt6.QtQuick.
|
||||
|
||||
sip-version = "6.14.0"
|
||||
sip-abi-version = "13.8"
|
||||
module-tags = ["Qt_6_10_0", "Linux"]
|
||||
module-disabled-features = ["PyQt_OpenGL_ES2"]
|
||||
@@ -0,0 +1,79 @@
|
||||
// QtQuickmod.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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=PyQt6.QtQuick, keyword_arguments="Optional", use_limited_api=True)
|
||||
|
||||
%Import QtCore/QtCoremod.sip
|
||||
%Import QtGui/QtGuimod.sip
|
||||
%Import QtQml/QtQmlmod.sip
|
||||
|
||||
%Copying
|
||||
Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
|
||||
This file is part of PyQt6.
|
||||
|
||||
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 PyQt6.sip.simplewrapper
|
||||
|
||||
%Include qquickframebufferobject.sip
|
||||
%Include qquickgraphicsconfiguration.sip
|
||||
%Include qquickgraphicsdevice.sip
|
||||
%Include qquickimageprovider.sip
|
||||
%Include qquickitem.sip
|
||||
%Include qquickitemgrabresult.sip
|
||||
%Include qquickpainteditem.sip
|
||||
%Include qquickrendercontrol.sip
|
||||
%Include qquickrendertarget.sip
|
||||
%Include qquicktextdocument.sip
|
||||
%Include qquickview.sip
|
||||
%Include qquickwindow.sip
|
||||
%Include qsgflatcolormaterial.sip
|
||||
%Include qsggeometry.sip
|
||||
%Include qsgimagenode.sip
|
||||
%Include qsgmaterial.sip
|
||||
%Include qsgmaterialshader.sip
|
||||
%Include qsgmaterialtype.sip
|
||||
%Include qsgnode.sip
|
||||
%Include qsgrectanglenode.sip
|
||||
%Include qsgrendererinterface.sip
|
||||
%Include qsgrendernode.sip
|
||||
%Include qsgsimplerectnode.sip
|
||||
%Include qsgsimpletexturenode.sip
|
||||
%Include qsgtextnode.sip
|
||||
%Include qsgtexture.sip
|
||||
%Include qsgtexture_platform.sip
|
||||
%Include qsgtexturematerial.sip
|
||||
%Include qsgtextureprovider.sip
|
||||
%Include qsgvertexcolormaterial.sip
|
||||
@@ -0,0 +1,81 @@
|
||||
// qquickframebufferobject.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QOpenGLFramebufferObject /External/;
|
||||
|
||||
class QQuickFramebufferObject : public QQuickItem /ExportDerived/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qquickframebufferobject.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
class Renderer /Supertype=PyQt6.sip.wrapper/
|
||||
{
|
||||
%TypeHintCode
|
||||
try:
|
||||
from PyQt6.QtOpenGL import QOpenGLFramebufferObject
|
||||
except ImportError:
|
||||
pass
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include <qquickframebufferobject.h>
|
||||
%End
|
||||
|
||||
protected:
|
||||
Renderer();
|
||||
virtual ~Renderer();
|
||||
virtual void render() = 0;
|
||||
%If (PyQt_OpenGL)
|
||||
virtual QOpenGLFramebufferObject *createFramebufferObject(const QSize &size);
|
||||
%End
|
||||
virtual void synchronize(QQuickFramebufferObject *);
|
||||
%If (PyQt_OpenGL)
|
||||
QOpenGLFramebufferObject *framebufferObject() const;
|
||||
%End
|
||||
void update();
|
||||
void invalidateFramebufferObject();
|
||||
};
|
||||
|
||||
QQuickFramebufferObject(QQuickItem *parent /TransferThis/ = 0);
|
||||
bool textureFollowsItemSize() const;
|
||||
void setTextureFollowsItemSize(bool follows);
|
||||
virtual QQuickFramebufferObject::Renderer *createRenderer() const = 0 /Factory/;
|
||||
|
||||
protected:
|
||||
virtual void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry);
|
||||
virtual QSGNode *updatePaintNode(QSGNode *, QQuickItem::UpdatePaintNodeData *);
|
||||
|
||||
signals:
|
||||
void textureFollowsItemSizeChanged(bool);
|
||||
|
||||
public:
|
||||
virtual bool isTextureProvider() const;
|
||||
virtual QSGTextureProvider *textureProvider() const;
|
||||
virtual void releaseResources();
|
||||
bool mirrorVertically() const;
|
||||
void setMirrorVertically(bool enable);
|
||||
|
||||
signals:
|
||||
void mirrorVerticallyChanged(bool);
|
||||
};
|
||||
@@ -0,0 +1,82 @@
|
||||
// qquickgraphicsconfiguration.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QQuickGraphicsConfiguration
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qquickgraphicsconfiguration.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QQuickGraphicsConfiguration();
|
||||
QQuickGraphicsConfiguration(const QQuickGraphicsConfiguration &other);
|
||||
~QQuickGraphicsConfiguration();
|
||||
void setDeviceExtensions(const QByteArrayList &extensions);
|
||||
QByteArrayList deviceExtensions() const;
|
||||
void setDepthBufferFor2D(bool enable);
|
||||
bool isDepthBufferEnabledFor2D() const;
|
||||
%If (Qt_6_1_0 -)
|
||||
static QByteArrayList preferredInstanceExtensions();
|
||||
%End
|
||||
%If (Qt_6_5_0 -)
|
||||
void setDebugLayer(bool enable);
|
||||
%End
|
||||
%If (Qt_6_5_0 -)
|
||||
bool isDebugLayerEnabled() const;
|
||||
%End
|
||||
%If (Qt_6_5_0 -)
|
||||
void setDebugMarkers(bool enable);
|
||||
%End
|
||||
%If (Qt_6_5_0 -)
|
||||
bool isDebugMarkersEnabled() const;
|
||||
%End
|
||||
%If (Qt_6_5_0 -)
|
||||
void setPreferSoftwareDevice(bool enable);
|
||||
%End
|
||||
%If (Qt_6_5_0 -)
|
||||
bool prefersSoftwareDevice() const;
|
||||
%End
|
||||
%If (Qt_6_5_0 -)
|
||||
void setAutomaticPipelineCache(bool enable);
|
||||
%End
|
||||
%If (Qt_6_5_0 -)
|
||||
bool isAutomaticPipelineCacheEnabled() const;
|
||||
%End
|
||||
%If (Qt_6_5_0 -)
|
||||
void setPipelineCacheSaveFile(const QString &filename);
|
||||
%End
|
||||
%If (Qt_6_5_0 -)
|
||||
QString pipelineCacheSaveFile() const;
|
||||
%End
|
||||
%If (Qt_6_5_0 -)
|
||||
void setPipelineCacheLoadFile(const QString &filename);
|
||||
%End
|
||||
%If (Qt_6_5_0 -)
|
||||
QString pipelineCacheLoadFile() const;
|
||||
%End
|
||||
%If (Qt_6_6_0 -)
|
||||
void setTimestamps(bool enable);
|
||||
%End
|
||||
%If (Qt_6_6_0 -)
|
||||
bool timestampsEnabled() const;
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,37 @@
|
||||
// qquickgraphicsdevice.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QQuickGraphicsDevice
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qquickgraphicsdevice.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QQuickGraphicsDevice();
|
||||
~QQuickGraphicsDevice();
|
||||
QQuickGraphicsDevice(const QQuickGraphicsDevice &other);
|
||||
bool isNull() const;
|
||||
%If (PyQt_OpenGL)
|
||||
static QQuickGraphicsDevice fromOpenGLContext(QOpenGLContext *context);
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,84 @@
|
||||
// qquickimageprovider.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QQuickTextureFactory : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qquickimageprovider.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QQuickTextureFactory();
|
||||
virtual ~QQuickTextureFactory();
|
||||
virtual QSGTexture *createTexture(QQuickWindow *window) const = 0 /Factory/;
|
||||
virtual QSize textureSize() const = 0;
|
||||
virtual int textureByteCount() const = 0;
|
||||
virtual QImage image() const;
|
||||
static QQuickTextureFactory *textureFactoryForImage(const QImage &image) /Factory/;
|
||||
};
|
||||
|
||||
class QQuickImageProvider : public QQmlImageProviderBase
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qquickimageprovider.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QQuickImageProvider(QQmlImageProviderBase::ImageType type, QQmlImageProviderBase::Flags flags = QQmlImageProviderBase::Flags());
|
||||
virtual ~QQuickImageProvider();
|
||||
virtual QQmlImageProviderBase::ImageType imageType() const;
|
||||
virtual QQmlImageProviderBase::Flags flags() const;
|
||||
virtual QImage requestImage(const QString &id, QSize *size /Out/, const QSize &requestedSize);
|
||||
virtual QPixmap requestPixmap(const QString &id, QSize *size /Out/, const QSize &requestedSize);
|
||||
virtual QQuickTextureFactory *requestTexture(const QString &id, QSize *size /Out/, const QSize &requestedSize) /Factory/;
|
||||
};
|
||||
|
||||
class QQuickImageResponse : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qquickimageprovider.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QQuickImageResponse();
|
||||
virtual ~QQuickImageResponse();
|
||||
virtual QQuickTextureFactory *textureFactory() const = 0 /Factory/;
|
||||
virtual QString errorString() const;
|
||||
|
||||
public slots:
|
||||
virtual void cancel();
|
||||
|
||||
signals:
|
||||
void finished();
|
||||
};
|
||||
|
||||
class QQuickAsyncImageProvider : public QQuickImageProvider
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qquickimageprovider.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QQuickAsyncImageProvider();
|
||||
virtual ~QQuickAsyncImageProvider();
|
||||
virtual QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize) = 0 /Factory/;
|
||||
};
|
||||
@@ -0,0 +1,337 @@
|
||||
// qquickitem.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QQuickItem : public QObject, public QQmlParserStatus /ExportDerived/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qquickitem.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Flag /BaseType=Flag/
|
||||
{
|
||||
ItemClipsChildrenToShape,
|
||||
ItemAcceptsInputMethod,
|
||||
ItemIsFocusScope,
|
||||
ItemHasContents,
|
||||
ItemAcceptsDrops,
|
||||
%If (Qt_6_3_0 -)
|
||||
ItemIsViewport,
|
||||
%End
|
||||
%If (Qt_6_3_0 -)
|
||||
ItemObservesViewport,
|
||||
%End
|
||||
};
|
||||
|
||||
typedef QFlags<QQuickItem::Flag> Flags;
|
||||
|
||||
enum ItemChange
|
||||
{
|
||||
ItemChildAddedChange,
|
||||
ItemChildRemovedChange,
|
||||
ItemSceneChange,
|
||||
ItemVisibleHasChanged,
|
||||
ItemParentHasChanged,
|
||||
ItemOpacityHasChanged,
|
||||
ItemActiveFocusHasChanged,
|
||||
ItemRotationHasChanged,
|
||||
ItemAntialiasingHasChanged,
|
||||
ItemDevicePixelRatioHasChanged,
|
||||
ItemEnabledHasChanged,
|
||||
%If (Qt_6_9_0 -)
|
||||
ItemScaleHasChanged,
|
||||
%End
|
||||
%If (Qt_6_9_0 -)
|
||||
ItemTransformHasChanged,
|
||||
%End
|
||||
};
|
||||
|
||||
struct ItemChangeData
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qquickitem.h>
|
||||
%End
|
||||
|
||||
ItemChangeData(QQuickItem *v);
|
||||
ItemChangeData(QQuickWindow *v);
|
||||
ItemChangeData(qreal v /Constrained/);
|
||||
ItemChangeData(bool v /Constrained/);
|
||||
QQuickItem *item;
|
||||
QQuickWindow *window;
|
||||
qreal realValue;
|
||||
bool boolValue;
|
||||
};
|
||||
|
||||
enum TransformOrigin
|
||||
{
|
||||
TopLeft,
|
||||
Top,
|
||||
TopRight,
|
||||
Left,
|
||||
Center,
|
||||
Right,
|
||||
BottomLeft,
|
||||
Bottom,
|
||||
BottomRight,
|
||||
};
|
||||
|
||||
explicit QQuickItem(QQuickItem *parent /TransferThis/ = 0);
|
||||
virtual ~QQuickItem();
|
||||
QQuickWindow *window() const;
|
||||
QQuickItem *parentItem() const;
|
||||
void setParentItem(QQuickItem *parent);
|
||||
void stackBefore(const QQuickItem *);
|
||||
void stackAfter(const QQuickItem *);
|
||||
QRectF childrenRect();
|
||||
QList<QQuickItem *> childItems() const;
|
||||
bool clip() const;
|
||||
void setClip(bool);
|
||||
QString state() const;
|
||||
void setState(const QString &);
|
||||
qreal baselineOffset() const;
|
||||
void setBaselineOffset(qreal);
|
||||
qreal x() const;
|
||||
qreal y() const;
|
||||
void setX(qreal);
|
||||
void setY(qreal);
|
||||
qreal width() const;
|
||||
void setWidth(qreal);
|
||||
void resetWidth();
|
||||
void setImplicitWidth(qreal);
|
||||
qreal implicitWidth() const;
|
||||
qreal height() const;
|
||||
void setHeight(qreal);
|
||||
void resetHeight();
|
||||
void setImplicitHeight(qreal);
|
||||
qreal implicitHeight() const;
|
||||
void setSize(const QSizeF &size);
|
||||
QQuickItem::TransformOrigin transformOrigin() const;
|
||||
void setTransformOrigin(QQuickItem::TransformOrigin);
|
||||
qreal z() const;
|
||||
void setZ(qreal);
|
||||
qreal rotation() const;
|
||||
void setRotation(qreal);
|
||||
qreal scale() const;
|
||||
void setScale(qreal);
|
||||
qreal opacity() const;
|
||||
void setOpacity(qreal);
|
||||
bool isVisible() const;
|
||||
void setVisible(bool);
|
||||
bool isEnabled() const;
|
||||
void setEnabled(bool);
|
||||
bool smooth() const;
|
||||
void setSmooth(bool);
|
||||
bool antialiasing() const;
|
||||
void setAntialiasing(bool);
|
||||
QQuickItem::Flags flags() const;
|
||||
void setFlag(QQuickItem::Flag flag, bool enabled = true);
|
||||
void setFlags(QQuickItem::Flags flags);
|
||||
bool hasActiveFocus() const;
|
||||
bool hasFocus() const;
|
||||
void setFocus(bool);
|
||||
bool isFocusScope() const;
|
||||
QQuickItem *scopedFocusItem() const;
|
||||
Qt::MouseButtons acceptedMouseButtons() const;
|
||||
void setAcceptedMouseButtons(Qt::MouseButtons buttons);
|
||||
bool acceptHoverEvents() const;
|
||||
void setAcceptHoverEvents(bool enabled);
|
||||
QCursor cursor() const;
|
||||
void setCursor(const QCursor &cursor);
|
||||
void unsetCursor();
|
||||
void grabMouse();
|
||||
void ungrabMouse();
|
||||
bool keepMouseGrab() const;
|
||||
void setKeepMouseGrab(bool);
|
||||
bool filtersChildMouseEvents() const;
|
||||
void setFiltersChildMouseEvents(bool filter);
|
||||
void grabTouchPoints(const QList<int> &ids);
|
||||
void ungrabTouchPoints();
|
||||
bool keepTouchGrab() const;
|
||||
void setKeepTouchGrab(bool);
|
||||
virtual bool contains(const QPointF &point) const;
|
||||
QPointF mapToItem(const QQuickItem *item, const QPointF &point) const;
|
||||
QPointF mapToScene(const QPointF &point) const;
|
||||
QRectF mapRectToItem(const QQuickItem *item, const QRectF &rect) const;
|
||||
QRectF mapRectToScene(const QRectF &rect) const;
|
||||
QPointF mapFromItem(const QQuickItem *item, const QPointF &point) const;
|
||||
QPointF mapFromScene(const QPointF &point) const;
|
||||
QRectF mapRectFromItem(const QQuickItem *item, const QRectF &rect) const;
|
||||
QRectF mapRectFromScene(const QRectF &rect) const;
|
||||
void polish();
|
||||
void forceActiveFocus();
|
||||
QQuickItem *childAt(qreal x, qreal y) const;
|
||||
virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
|
||||
|
||||
struct UpdatePaintNodeData
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qquickitem.h>
|
||||
%End
|
||||
|
||||
QSGTransformNode *transformNode;
|
||||
|
||||
private:
|
||||
UpdatePaintNodeData();
|
||||
};
|
||||
|
||||
virtual bool isTextureProvider() const;
|
||||
virtual QSGTextureProvider *textureProvider() const;
|
||||
|
||||
public slots:
|
||||
void update() /ReleaseGIL/;
|
||||
|
||||
signals:
|
||||
void childrenRectChanged(const QRectF &);
|
||||
void baselineOffsetChanged(qreal);
|
||||
void stateChanged(const QString &);
|
||||
void focusChanged(bool);
|
||||
void activeFocusChanged(bool);
|
||||
void parentChanged(QQuickItem *);
|
||||
void transformOriginChanged(QQuickItem::TransformOrigin);
|
||||
void smoothChanged(bool);
|
||||
void antialiasingChanged(bool);
|
||||
void clipChanged(bool);
|
||||
void opacityChanged();
|
||||
void enabledChanged();
|
||||
void visibleChanged();
|
||||
void rotationChanged();
|
||||
void scaleChanged();
|
||||
void xChanged();
|
||||
void yChanged();
|
||||
void widthChanged();
|
||||
void heightChanged();
|
||||
void zChanged();
|
||||
void implicitWidthChanged();
|
||||
void implicitHeightChanged();
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *);
|
||||
bool isComponentComplete() const;
|
||||
virtual void itemChange(QQuickItem::ItemChange, const QQuickItem::ItemChangeData &);
|
||||
void updateInputMethod(Qt::InputMethodQueries queries = Qt::ImQueryInput);
|
||||
bool widthValid() const;
|
||||
bool heightValid() const;
|
||||
virtual void classBegin();
|
||||
virtual void componentComplete();
|
||||
virtual void keyPressEvent(QKeyEvent *event);
|
||||
virtual void keyReleaseEvent(QKeyEvent *event);
|
||||
virtual void inputMethodEvent(QInputMethodEvent *);
|
||||
virtual void focusInEvent(QFocusEvent *);
|
||||
virtual void focusOutEvent(QFocusEvent *);
|
||||
virtual void mousePressEvent(QMouseEvent *event);
|
||||
virtual void mouseMoveEvent(QMouseEvent *event);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *event);
|
||||
virtual void mouseDoubleClickEvent(QMouseEvent *event);
|
||||
virtual void mouseUngrabEvent();
|
||||
virtual void touchUngrabEvent();
|
||||
virtual void wheelEvent(QWheelEvent *event);
|
||||
virtual void touchEvent(QTouchEvent *event);
|
||||
virtual void hoverEnterEvent(QHoverEvent *event);
|
||||
virtual void hoverMoveEvent(QHoverEvent *event);
|
||||
virtual void hoverLeaveEvent(QHoverEvent *event);
|
||||
virtual void dragEnterEvent(QDragEnterEvent *);
|
||||
virtual void dragMoveEvent(QDragMoveEvent *);
|
||||
virtual void dragLeaveEvent(QDragLeaveEvent *);
|
||||
virtual void dropEvent(QDropEvent *);
|
||||
virtual bool childMouseEventFilter(QQuickItem *, QEvent *);
|
||||
virtual void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry);
|
||||
virtual QSGNode *updatePaintNode(QSGNode *, QQuickItem::UpdatePaintNodeData *);
|
||||
%VirtualCatcherCode
|
||||
PyObject *res;
|
||||
|
||||
res = sipCallMethod(&sipIsErr, sipMethod, "DD",
|
||||
a0, sipType_QSGNode, NULL,
|
||||
a1, sipType_QQuickItem_UpdatePaintNodeData, NULL);
|
||||
|
||||
if (res)
|
||||
{
|
||||
sipParseResult(&sipIsErr, sipMethod, res, "H0", sipType_QSGNode, &sipRes);
|
||||
|
||||
if (!sipIsErr && sipRes && (sipRes->flags() & QSGNode::OwnedByParent))
|
||||
sipTransferTo(res, (PyObject *)sipPySelf);
|
||||
|
||||
Py_DECREF(res);
|
||||
}
|
||||
%End
|
||||
|
||||
virtual void releaseResources();
|
||||
virtual void updatePolish();
|
||||
|
||||
public:
|
||||
bool activeFocusOnTab() const;
|
||||
void setActiveFocusOnTab(bool);
|
||||
void setFocus(bool focus, Qt::FocusReason reason);
|
||||
void forceActiveFocus(Qt::FocusReason reason);
|
||||
QQuickItem *nextItemInFocusChain(bool forward = true);
|
||||
|
||||
signals:
|
||||
void activeFocusOnTabChanged(bool);
|
||||
void windowChanged(QQuickWindow *window);
|
||||
|
||||
public:
|
||||
void resetAntialiasing();
|
||||
QQuickItemGrabResult *grabToImage(const QSize &targetSize = QSize()) /Factory/;
|
||||
%MethodCode
|
||||
QSharedPointer<QQuickItemGrabResult> *grab;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
// This will leak but there seems to be no way to detach the object.
|
||||
grab = new QSharedPointer<QQuickItemGrabResult>(sipCpp->grabToImage(*a0));
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
sipRes = grab->data();
|
||||
%End
|
||||
|
||||
bool isAncestorOf(const QQuickItem *child) const;
|
||||
QPointF mapToGlobal(const QPointF &point) const;
|
||||
QPointF mapFromGlobal(const QPointF &point) const;
|
||||
QSizeF size() const;
|
||||
bool acceptTouchEvents() const;
|
||||
void setAcceptTouchEvents(bool accept);
|
||||
QObject *containmentMask() const;
|
||||
void setContainmentMask(QObject *mask /KeepReference/);
|
||||
|
||||
signals:
|
||||
void containmentMaskChanged();
|
||||
|
||||
public:
|
||||
%If (Qt_6_3_0 -)
|
||||
QQuickItem *viewportItem() const;
|
||||
%End
|
||||
%If (Qt_6_3_0 -)
|
||||
void ensurePolished();
|
||||
%End
|
||||
%If (Qt_6_3_0 -)
|
||||
void dumpItemTree() const;
|
||||
%End
|
||||
%If (Qt_6_7_0 -)
|
||||
Qt::FocusPolicy focusPolicy() const;
|
||||
%End
|
||||
%If (Qt_6_7_0 -)
|
||||
void setFocusPolicy(Qt::FocusPolicy policy);
|
||||
%End
|
||||
|
||||
signals:
|
||||
%If (Qt_6_7_0 -)
|
||||
void focusPolicyChanged(Qt::FocusPolicy);
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,45 @@
|
||||
// qquickitemgrabresult.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QQuickItemGrabResult : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qquickitemgrabresult.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QImage image() const;
|
||||
QUrl url() const;
|
||||
bool saveToFile(const QString &fileName) const;
|
||||
%If (Qt_6_2_0 -)
|
||||
bool saveToFile(const QUrl &fileName) const;
|
||||
%End
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *);
|
||||
|
||||
signals:
|
||||
void ready();
|
||||
|
||||
private:
|
||||
QQuickItemGrabResult(QObject *parent = 0);
|
||||
};
|
||||
@@ -0,0 +1,91 @@
|
||||
// qquickpainteditem.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QQuickPaintedItem : public QQuickItem /ExportDerived/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qquickpainteditem.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QQuickPaintedItem(QQuickItem *parent /TransferThis/ = 0);
|
||||
virtual ~QQuickPaintedItem();
|
||||
|
||||
enum RenderTarget
|
||||
{
|
||||
Image,
|
||||
FramebufferObject,
|
||||
InvertedYFramebufferObject,
|
||||
};
|
||||
|
||||
enum PerformanceHint /BaseType=Flag/
|
||||
{
|
||||
FastFBOResizing,
|
||||
};
|
||||
|
||||
typedef QFlags<QQuickPaintedItem::PerformanceHint> PerformanceHints;
|
||||
void update(const QRect &rect = QRect());
|
||||
bool opaquePainting() const;
|
||||
void setOpaquePainting(bool opaque);
|
||||
bool antialiasing() const;
|
||||
void setAntialiasing(bool enable);
|
||||
bool mipmap() const;
|
||||
void setMipmap(bool enable);
|
||||
QQuickPaintedItem::PerformanceHints performanceHints() const;
|
||||
void setPerformanceHint(QQuickPaintedItem::PerformanceHint hint, bool enabled = true);
|
||||
void setPerformanceHints(QQuickPaintedItem::PerformanceHints hints);
|
||||
QRectF contentsBoundingRect() const;
|
||||
QSize contentsSize() const;
|
||||
void setContentsSize(const QSize &);
|
||||
void resetContentsSize();
|
||||
qreal contentsScale() const;
|
||||
void setContentsScale(qreal);
|
||||
QColor fillColor() const;
|
||||
void setFillColor(const QColor &);
|
||||
QQuickPaintedItem::RenderTarget renderTarget() const;
|
||||
void setRenderTarget(QQuickPaintedItem::RenderTarget target);
|
||||
virtual void paint(QPainter *painter) = 0;
|
||||
|
||||
signals:
|
||||
void fillColorChanged();
|
||||
void contentsSizeChanged();
|
||||
void contentsScaleChanged();
|
||||
void renderTargetChanged();
|
||||
|
||||
protected:
|
||||
virtual QSGNode *updatePaintNode(QSGNode *, QQuickItem::UpdatePaintNodeData *);
|
||||
|
||||
public:
|
||||
virtual bool isTextureProvider() const;
|
||||
virtual QSGTextureProvider *textureProvider() const;
|
||||
|
||||
protected:
|
||||
virtual void releaseResources();
|
||||
virtual void itemChange(QQuickItem::ItemChange, const QQuickItem::ItemChangeData &);
|
||||
|
||||
public:
|
||||
QSize textureSize() const;
|
||||
void setTextureSize(const QSize &size);
|
||||
|
||||
signals:
|
||||
void textureSizeChanged();
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
// qquickrendercontrol.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QQuickRenderControl : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qquickrendercontrol.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QQuickRenderControl(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QQuickRenderControl();
|
||||
bool initialize();
|
||||
void invalidate();
|
||||
void polishItems();
|
||||
void render();
|
||||
bool sync();
|
||||
static QWindow *renderWindowFor(QQuickWindow *win, QPoint *offset = 0);
|
||||
virtual QWindow *renderWindow(QPoint *offset);
|
||||
void prepareThread(QThread *targetThread);
|
||||
|
||||
signals:
|
||||
void renderRequested();
|
||||
void sceneChanged();
|
||||
|
||||
public:
|
||||
void setSamples(int sampleCount);
|
||||
int samples() const;
|
||||
void beginFrame();
|
||||
void endFrame();
|
||||
QQuickWindow *window() const;
|
||||
};
|
||||
@@ -0,0 +1,75 @@
|
||||
// qquickrendertarget.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QQuickRenderTarget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qquickrendertarget.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
%If (Qt_6_8_0 -)
|
||||
|
||||
enum class Flag
|
||||
{
|
||||
MultisampleResolve,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_6_8_0 -)
|
||||
typedef QFlags<QQuickRenderTarget::Flag> Flags;
|
||||
%End
|
||||
QQuickRenderTarget();
|
||||
~QQuickRenderTarget();
|
||||
QQuickRenderTarget(const QQuickRenderTarget &other);
|
||||
bool isNull() const;
|
||||
%If (PyQt_OpenGL)
|
||||
static QQuickRenderTarget fromOpenGLTexture(uint textureId, const QSize &pixelSize, int sampleCount = 1);
|
||||
%End
|
||||
%If (Qt_6_4_0 -)
|
||||
static QQuickRenderTarget fromOpenGLTexture(uint textureId, uint format, const QSize &pixelSize, int sampleCount = 1);
|
||||
%End
|
||||
%If (Qt_6_8_0 -)
|
||||
static QQuickRenderTarget fromOpenGLTexture(uint textureId, uint format, QSize pixelSize, int sampleCount, int arraySize, QQuickRenderTarget::Flags flags);
|
||||
%End
|
||||
%If (Qt_6_2_0 -)
|
||||
static QQuickRenderTarget fromOpenGLRenderBuffer(uint renderbufferId, const QSize &pixelSize, int sampleCount = 1);
|
||||
%End
|
||||
%If (Qt_6_4_0 -)
|
||||
static QQuickRenderTarget fromPaintDevice(QPaintDevice *device);
|
||||
%End
|
||||
%If (Qt_6_3_0 -)
|
||||
qreal devicePixelRatio() const;
|
||||
%End
|
||||
%If (Qt_6_3_0 -)
|
||||
void setDevicePixelRatio(qreal ratio);
|
||||
%End
|
||||
%If (Qt_6_4_0 -)
|
||||
bool mirrorVertically() const;
|
||||
%End
|
||||
%If (Qt_6_4_0 -)
|
||||
void setMirrorVertically(bool enable);
|
||||
%End
|
||||
};
|
||||
|
||||
bool operator==(const QQuickRenderTarget &lhs, const QQuickRenderTarget &rhs);
|
||||
bool operator!=(const QQuickRenderTarget &lhs, const QQuickRenderTarget &rhs);
|
||||
@@ -0,0 +1,91 @@
|
||||
// qquicktextdocument.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QQuickTextDocument : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qquicktextdocument.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
%If (Qt_6_7_0 -)
|
||||
|
||||
enum class Status
|
||||
{
|
||||
Null,
|
||||
Loading,
|
||||
Loaded,
|
||||
Saving,
|
||||
Saved,
|
||||
ReadError,
|
||||
WriteError,
|
||||
NonLocalFileError,
|
||||
};
|
||||
|
||||
%End
|
||||
QQuickTextDocument(QQuickItem *parent /TransferThis/);
|
||||
QTextDocument *textDocument() const;
|
||||
%If (Qt_6_7_0 -)
|
||||
QUrl source() const;
|
||||
%End
|
||||
%If (Qt_6_7_0 -)
|
||||
void setSource(const QUrl &url);
|
||||
%End
|
||||
%If (Qt_6_7_0 -)
|
||||
bool isModified() const;
|
||||
%End
|
||||
%If (Qt_6_7_0 -)
|
||||
void setModified(bool modified);
|
||||
%End
|
||||
%If (Qt_6_7_0 -)
|
||||
void setTextDocument(QTextDocument *document);
|
||||
%End
|
||||
%If (Qt_6_7_0 -)
|
||||
void save() /ReleaseGIL/;
|
||||
%End
|
||||
%If (Qt_6_7_0 -)
|
||||
void saveAs(const QUrl &url) /ReleaseGIL/;
|
||||
%End
|
||||
%If (Qt_6_7_0 -)
|
||||
QQuickTextDocument::Status status() const;
|
||||
%End
|
||||
%If (Qt_6_7_0 -)
|
||||
QString errorString() const;
|
||||
%End
|
||||
|
||||
signals:
|
||||
%If (Qt_6_7_0 -)
|
||||
void textDocumentChanged();
|
||||
%End
|
||||
%If (Qt_6_7_0 -)
|
||||
void sourceChanged();
|
||||
%End
|
||||
%If (Qt_6_7_0 -)
|
||||
void modifiedChanged();
|
||||
%End
|
||||
%If (Qt_6_7_0 -)
|
||||
void statusChanged();
|
||||
%End
|
||||
%If (Qt_6_7_0 -)
|
||||
void errorStringChanged();
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,81 @@
|
||||
// qquickview.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QQuickView : public QQuickWindow /ExportDerived/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qquickview.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QQuickView(QWindow *parent /TransferThis/ = 0);
|
||||
QQuickView(QQmlEngine *engine, QWindow *parent /TransferThis/);
|
||||
QQuickView(const QUrl &source, QWindow *parent /TransferThis/ = 0);
|
||||
%If (Qt_6_7_0 -)
|
||||
QQuickView(QAnyStringView uri, QAnyStringView typeName, QWindow *parent /TransferThis/ = 0);
|
||||
%End
|
||||
virtual ~QQuickView() /ReleaseGIL/;
|
||||
QUrl source() const;
|
||||
QQmlEngine *engine() const;
|
||||
QQmlContext *rootContext() const;
|
||||
QQuickItem *rootObject() const;
|
||||
|
||||
enum ResizeMode
|
||||
{
|
||||
SizeViewToRootObject,
|
||||
SizeRootObjectToView,
|
||||
};
|
||||
|
||||
QQuickView::ResizeMode resizeMode() const;
|
||||
void setResizeMode(QQuickView::ResizeMode);
|
||||
|
||||
enum Status
|
||||
{
|
||||
Null,
|
||||
Ready,
|
||||
Loading,
|
||||
Error,
|
||||
};
|
||||
|
||||
QQuickView::Status status() const;
|
||||
QList<QQmlError> errors() const;
|
||||
QSize initialSize() const;
|
||||
|
||||
public slots:
|
||||
void setSource(const QUrl &) /ReleaseGIL/;
|
||||
void setInitialProperties(const QVariantMap &initialProperties);
|
||||
%If (Qt_6_7_0 -)
|
||||
void loadFromModule(QAnyStringView uri, QAnyStringView typeName);
|
||||
%End
|
||||
|
||||
signals:
|
||||
void statusChanged(QQuickView::Status);
|
||||
|
||||
protected:
|
||||
virtual void resizeEvent(QResizeEvent *);
|
||||
virtual void timerEvent(QTimerEvent *);
|
||||
virtual void keyPressEvent(QKeyEvent *);
|
||||
virtual void keyReleaseEvent(QKeyEvent *);
|
||||
virtual void mousePressEvent(QMouseEvent *);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *);
|
||||
virtual void mouseMoveEvent(QMouseEvent *);
|
||||
};
|
||||
@@ -0,0 +1,212 @@
|
||||
// qquickwindow.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QQuickWindow : public QWindow /ExportDerived/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qquickwindow.h>
|
||||
%End
|
||||
|
||||
%ConvertToSubClassCode
|
||||
static struct class_graph {
|
||||
const char *name;
|
||||
sipTypeDef **type;
|
||||
int yes, no;
|
||||
} graph[] = {
|
||||
{sipName_QQuickImageProvider, &sipType_QQuickImageProvider, 10, 1},
|
||||
{sipName_QQuickItem, &sipType_QQuickItem, 11, 2},
|
||||
{sipName_QQuickImageResponse, &sipType_QQuickImageResponse, -1, 3},
|
||||
{sipName_QQuickItemGrabResult, &sipType_QQuickItemGrabResult, -1, 4},
|
||||
{sipName_QQuickRenderControl, &sipType_QQuickRenderControl, -1, 5},
|
||||
{sipName_QQuickTextDocument, &sipType_QQuickTextDocument, -1, 6},
|
||||
{sipName_QQuickTextureFactory, &sipType_QQuickTextureFactory, -1, 7},
|
||||
{sipName_QQuickWindow, &sipType_QQuickWindow, 13, 8},
|
||||
{sipName_QSGTexture, &sipType_QSGTexture, 14, 9},
|
||||
{sipName_QSGTextureProvider, &sipType_QSGTextureProvider, -1, -1},
|
||||
{sipName_QQuickAsyncImageProvider, &sipType_QQuickAsyncImageProvider, -1, -1},
|
||||
{sipName_QQuickFramebufferObject, &sipType_QQuickFramebufferObject, -1, 12},
|
||||
{sipName_QQuickPaintedItem, &sipType_QQuickPaintedItem, -1, -1},
|
||||
{sipName_QQuickView, &sipType_QQuickView, -1, -1},
|
||||
{sipName_QSGDynamicTexture, &sipType_QSGDynamicTexture, -1, -1},
|
||||
};
|
||||
|
||||
int i = 0;
|
||||
|
||||
sipType = NULL;
|
||||
|
||||
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:
|
||||
enum CreateTextureOption /BaseType=Flag/
|
||||
{
|
||||
TextureHasAlphaChannel,
|
||||
TextureHasMipmaps,
|
||||
TextureOwnsGLTexture,
|
||||
TextureCanUseAtlas,
|
||||
TextureIsOpaque,
|
||||
};
|
||||
|
||||
typedef QFlags<QQuickWindow::CreateTextureOption> CreateTextureOptions;
|
||||
explicit QQuickWindow(QWindow *parent /TransferThis/ = 0);
|
||||
virtual ~QQuickWindow() /ReleaseGIL/;
|
||||
QQuickItem *contentItem() const;
|
||||
QQuickItem *activeFocusItem() const;
|
||||
virtual QObject *focusObject() const;
|
||||
QQuickItem *mouseGrabberItem() const;
|
||||
QImage grabWindow() /ReleaseGIL/;
|
||||
void setRenderTarget(const QQuickRenderTarget &target);
|
||||
QQuickRenderTarget renderTarget() const;
|
||||
QQmlIncubationController *incubationController() const;
|
||||
%If (Qt_6_7_0 -)
|
||||
QSGTextNode *createTextNode() const /Factory/;
|
||||
%End
|
||||
QSGTexture *createTextureFromImage(const QImage &image) const /Factory/;
|
||||
QSGTexture *createTextureFromImage(const QImage &image, QQuickWindow::CreateTextureOptions options) const /Factory/;
|
||||
void setColor(const QColor &color);
|
||||
QColor color() const;
|
||||
void setPersistentSceneGraph(bool persistent);
|
||||
bool isPersistentSceneGraph() const;
|
||||
|
||||
signals:
|
||||
void frameSwapped();
|
||||
void sceneGraphInitialized();
|
||||
void sceneGraphInvalidated();
|
||||
void beforeSynchronizing();
|
||||
void beforeRendering();
|
||||
void afterRendering();
|
||||
void colorChanged(const QColor &);
|
||||
|
||||
public slots:
|
||||
void update();
|
||||
void releaseResources();
|
||||
|
||||
protected:
|
||||
virtual void exposeEvent(QExposeEvent *);
|
||||
virtual void resizeEvent(QResizeEvent *);
|
||||
virtual void showEvent(QShowEvent *);
|
||||
virtual void hideEvent(QHideEvent *);
|
||||
virtual void focusInEvent(QFocusEvent *);
|
||||
virtual void focusOutEvent(QFocusEvent *);
|
||||
virtual bool event(QEvent *);
|
||||
virtual void keyPressEvent(QKeyEvent *);
|
||||
virtual void keyReleaseEvent(QKeyEvent *);
|
||||
virtual void mousePressEvent(QMouseEvent *);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *);
|
||||
virtual void mouseDoubleClickEvent(QMouseEvent *);
|
||||
virtual void mouseMoveEvent(QMouseEvent *);
|
||||
virtual void wheelEvent(QWheelEvent *);
|
||||
virtual void tabletEvent(QTabletEvent *);
|
||||
virtual void closeEvent(QCloseEvent *);
|
||||
|
||||
public:
|
||||
static bool hasDefaultAlphaBuffer();
|
||||
static void setDefaultAlphaBuffer(bool useAlpha);
|
||||
|
||||
signals:
|
||||
void closing(QQuickCloseEvent *close);
|
||||
void activeFocusItemChanged();
|
||||
|
||||
public:
|
||||
enum SceneGraphError
|
||||
{
|
||||
ContextNotAvailable,
|
||||
};
|
||||
|
||||
signals:
|
||||
void afterSynchronizing();
|
||||
void afterAnimating();
|
||||
void sceneGraphAboutToStop();
|
||||
void sceneGraphError(QQuickWindow::SceneGraphError error, const QString &message);
|
||||
|
||||
public:
|
||||
enum RenderStage
|
||||
{
|
||||
BeforeSynchronizingStage,
|
||||
AfterSynchronizingStage,
|
||||
BeforeRenderingStage,
|
||||
AfterRenderingStage,
|
||||
AfterSwapStage,
|
||||
NoStage,
|
||||
};
|
||||
|
||||
void scheduleRenderJob(QRunnable *job /Transfer/, QQuickWindow::RenderStage schedule) /ReleaseGIL/;
|
||||
qreal effectiveDevicePixelRatio() const;
|
||||
bool isSceneGraphInitialized() const;
|
||||
QSGRendererInterface *rendererInterface() const;
|
||||
static void setSceneGraphBackend(const QString &backend);
|
||||
QSGRectangleNode *createRectangleNode() const /Factory/;
|
||||
QSGImageNode *createImageNode() const /Factory/;
|
||||
static QString sceneGraphBackend();
|
||||
|
||||
enum TextRenderType
|
||||
{
|
||||
QtTextRendering,
|
||||
NativeTextRendering,
|
||||
%If (Qt_6_7_0 -)
|
||||
CurveTextRendering,
|
||||
%End
|
||||
};
|
||||
|
||||
static QQuickWindow::TextRenderType textRenderType();
|
||||
static void setTextRenderType(QQuickWindow::TextRenderType renderType);
|
||||
void beginExternalCommands();
|
||||
void endExternalCommands();
|
||||
|
||||
signals:
|
||||
void beforeRenderPassRecording();
|
||||
void afterRenderPassRecording();
|
||||
void beforeFrameBegin();
|
||||
void afterFrameEnd();
|
||||
|
||||
public:
|
||||
void setPersistentGraphics(bool persistent);
|
||||
bool isPersistentGraphics() const;
|
||||
static void setGraphicsApi(QSGRendererInterface::GraphicsApi api);
|
||||
static QSGRendererInterface::GraphicsApi graphicsApi();
|
||||
void setGraphicsDevice(const QQuickGraphicsDevice &device);
|
||||
QQuickGraphicsDevice graphicsDevice() const;
|
||||
void setGraphicsConfiguration(const QQuickGraphicsConfiguration &config);
|
||||
QQuickGraphicsConfiguration graphicsConfiguration() const;
|
||||
};
|
||||
|
||||
class QQuickCloseEvent;
|
||||
|
||||
%ModuleHeaderCode
|
||||
#include "qpyquick_api.h"
|
||||
%End
|
||||
|
||||
%PostInitialisationCode
|
||||
qpyquick_post_init();
|
||||
%End
|
||||
@@ -0,0 +1,36 @@
|
||||
// qsgflatcolormaterial.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QSGFlatColorMaterial : public QSGMaterial
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgflatcolormaterial.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QSGFlatColorMaterial();
|
||||
virtual QSGMaterialType *type() const;
|
||||
virtual QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode) const /Factory/;
|
||||
void setColor(const QColor &color);
|
||||
const QColor &color() const;
|
||||
virtual int compare(const QSGMaterial *other) const;
|
||||
};
|
||||
@@ -0,0 +1,361 @@
|
||||
// qsggeometry.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QSGGeometry /Supertype=PyQt6.sip.wrapper/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsggeometry.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
struct Attribute
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsggeometry.h>
|
||||
%End
|
||||
|
||||
int position;
|
||||
int tupleSize;
|
||||
int type;
|
||||
uint isVertexCoordinate;
|
||||
QSGGeometry::AttributeType attributeType;
|
||||
static QSGGeometry::Attribute create(int pos, int tupleSize, int primitiveType, bool isPosition = false) /Factory/;
|
||||
static QSGGeometry::Attribute createWithAttributeType(int pos, int tupleSize, int primitiveType, QSGGeometry::AttributeType attributeType) /Factory/;
|
||||
};
|
||||
|
||||
struct AttributeSet /NoDefaultCtors/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsggeometry.h>
|
||||
#include <QList>
|
||||
%End
|
||||
|
||||
AttributeSet(SIP_PYOBJECT attributes /TypeHint="Iterable[QSGGeometry.Attribute]"/, int stride = 0);
|
||||
%MethodCode
|
||||
PyObject *iter = PyObject_GetIter(a0);
|
||||
|
||||
if (!iter || PyUnicode_Check(a0))
|
||||
{
|
||||
Py_XDECREF(iter);
|
||||
PyErr_SetString(PyExc_TypeError, "iterable object expected");
|
||||
sipError = sipErrorContinue;
|
||||
}
|
||||
else
|
||||
{
|
||||
QList<QSGGeometry::Attribute> attrs;
|
||||
int stride = 0;
|
||||
|
||||
for (Py_ssize_t i = 0; ; ++i)
|
||||
{
|
||||
PyErr_Clear();
|
||||
PyObject *itm = PyIter_Next(iter);
|
||||
|
||||
if (!itm)
|
||||
{
|
||||
if (PyErr_Occurred())
|
||||
sipError = sipErrorFail;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
int state, is_err = 0;
|
||||
QSGGeometry::Attribute *attr;
|
||||
|
||||
attr = reinterpret_cast<QSGGeometry::Attribute *>(
|
||||
sipForceConvertToType(itm, sipType_QSGGeometry_Attribute, 0,
|
||||
SIP_NOT_NONE, &state, &is_err));
|
||||
|
||||
if (is_err)
|
||||
{
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"index %zd has type '%s' but 'QSGGeometry.Attribute' is expected",
|
||||
i, sipPyTypeName(Py_TYPE(itm)));
|
||||
|
||||
Py_DECREF(itm);
|
||||
sipError = sipErrorFail;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
// Calculate the stride if there no explicit one.
|
||||
if (a1 <= 0)
|
||||
{
|
||||
int size;
|
||||
|
||||
switch (attr->type)
|
||||
{
|
||||
case QSGGeometry::ByteType:
|
||||
size = sizeof (qint8);
|
||||
break;
|
||||
|
||||
case QSGGeometry::DoubleType:
|
||||
size = sizeof (double);
|
||||
break;
|
||||
|
||||
case QSGGeometry::FloatType:
|
||||
size = sizeof (float);
|
||||
break;
|
||||
|
||||
case QSGGeometry::IntType:
|
||||
size = sizeof (qint32);
|
||||
break;
|
||||
|
||||
default:
|
||||
size = 0;
|
||||
}
|
||||
|
||||
if (!size)
|
||||
{
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"index %zd has an unsupported primitive type",
|
||||
i);
|
||||
|
||||
sipReleaseType(attr, sipType_QSGGeometry_Attribute, state);
|
||||
Py_DECREF(itm);
|
||||
sipError = sipErrorFail;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
stride += attr->tupleSize * size;
|
||||
}
|
||||
|
||||
attrs.append(*attr);
|
||||
|
||||
sipReleaseType(attr, sipType_QSGGeometry_Attribute, state);
|
||||
Py_DECREF(itm);
|
||||
}
|
||||
|
||||
Py_DECREF(iter);
|
||||
|
||||
if (sipError == sipErrorNone)
|
||||
{
|
||||
if (attrs.isEmpty())
|
||||
{
|
||||
PyErr_SetString(PyExc_TypeError, "no attributes defined");
|
||||
sipError = sipErrorFail;
|
||||
}
|
||||
else
|
||||
{
|
||||
PyObject *bytes = PyBytes_FromStringAndSize(
|
||||
reinterpret_cast<char *>(attrs.data()),
|
||||
sizeof (QSGGeometry::Attribute) * attrs.size());
|
||||
|
||||
if (!bytes)
|
||||
{
|
||||
sipError = sipErrorFail;
|
||||
}
|
||||
else
|
||||
{
|
||||
sipCpp = new QSGGeometry::AttributeSet;
|
||||
|
||||
sipCpp->count = attrs.size();
|
||||
sipCpp->stride = (a1 > 0 ? a1 : stride);
|
||||
sipCpp->attributes = reinterpret_cast<QSGGeometry::Attribute *>(
|
||||
PyBytes_AsString(bytes));
|
||||
|
||||
sipSetUserObject(sipSelf, bytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
%End
|
||||
|
||||
int count;
|
||||
int stride;
|
||||
const QSGGeometry::Attribute *attributes /TypeHint="PyQt6.sip.array[QSGGeometry.Attribute]"/ {
|
||||
%GetCode
|
||||
sipPy = sipConvertToTypedArray((void *)sipCpp->attributes,
|
||||
sipType_QSGGeometry_Attribute, "iiiI", sizeof (QSGGeometry::Attribute),
|
||||
sipCpp->count, SIP_READ_ONLY);
|
||||
%End
|
||||
|
||||
%SetCode
|
||||
sipErr = 1;
|
||||
PyErr_SetString(PyExc_ValueError, "array is read-only");
|
||||
%End
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
struct Point2D
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsggeometry.h>
|
||||
%End
|
||||
|
||||
float x;
|
||||
float y;
|
||||
void set(float nx, float ny);
|
||||
};
|
||||
|
||||
struct TexturedPoint2D
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsggeometry.h>
|
||||
%End
|
||||
|
||||
float x;
|
||||
float y;
|
||||
float tx;
|
||||
float ty;
|
||||
void set(float nx, float ny, float ntx, float nty);
|
||||
};
|
||||
|
||||
struct ColoredPoint2D
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsggeometry.h>
|
||||
%End
|
||||
|
||||
float x;
|
||||
float y;
|
||||
unsigned char r /PyInt/;
|
||||
unsigned char g /PyInt/;
|
||||
unsigned char b /PyInt/;
|
||||
unsigned char a /PyInt/;
|
||||
void set(float nx, float ny, uchar nr /PyInt/, uchar ng /PyInt/, uchar nb /PyInt/, uchar na /PyInt/);
|
||||
};
|
||||
|
||||
static const QSGGeometry::AttributeSet &defaultAttributes_Point2D() /NoCopy/;
|
||||
static const QSGGeometry::AttributeSet &defaultAttributes_TexturedPoint2D() /NoCopy/;
|
||||
static const QSGGeometry::AttributeSet &defaultAttributes_ColoredPoint2D() /NoCopy/;
|
||||
|
||||
enum DataPattern
|
||||
{
|
||||
AlwaysUploadPattern,
|
||||
StreamPattern,
|
||||
DynamicPattern,
|
||||
StaticPattern,
|
||||
};
|
||||
|
||||
QSGGeometry(const QSGGeometry::AttributeSet &attribs /KeepReference/, int vertexCount, int indexCount = 0, int indexType = QSGGeometry::UnsignedShortType);
|
||||
virtual ~QSGGeometry();
|
||||
void setDrawingMode(unsigned int mode);
|
||||
unsigned int drawingMode() const;
|
||||
void allocate(int vertexCount, int indexCount = 0);
|
||||
int vertexCount() const;
|
||||
void *vertexData();
|
||||
int indexType() const;
|
||||
int indexCount() const;
|
||||
void *indexData();
|
||||
int attributeCount() const;
|
||||
SIP_PYOBJECT attributes() const /TypeHint="PyQt6.sip.array[QSGGeometry.Attribute]"/;
|
||||
%MethodCode
|
||||
sipRes = sipConvertToTypedArray((void *)sipCpp->attributes(),
|
||||
sipType_QSGGeometry_Attribute, "iiiI", sizeof (QSGGeometry::Attribute),
|
||||
sipCpp->attributeCount(), SIP_READ_ONLY);
|
||||
%End
|
||||
|
||||
int sizeOfVertex() const;
|
||||
static void updateRectGeometry(QSGGeometry *g, const QRectF &rect);
|
||||
static void updateTexturedRectGeometry(QSGGeometry *g, const QRectF &rect, const QRectF &sourceRect);
|
||||
void setIndexDataPattern(QSGGeometry::DataPattern p);
|
||||
QSGGeometry::DataPattern indexDataPattern() const;
|
||||
void setVertexDataPattern(QSGGeometry::DataPattern p);
|
||||
QSGGeometry::DataPattern vertexDataPattern() const;
|
||||
void markIndexDataDirty();
|
||||
void markVertexDataDirty();
|
||||
float lineWidth() const;
|
||||
void setLineWidth(float w);
|
||||
SIP_PYOBJECT indexDataAsUInt() /TypeHint="PyQt6.sip.array[int]"/;
|
||||
%MethodCode
|
||||
sipRes = sipConvertToArray(sipCpp->indexDataAsUInt(), "I",
|
||||
sipCpp->indexCount(), 0);
|
||||
%End
|
||||
|
||||
SIP_PYOBJECT indexDataAsUShort() /TypeHint="PyQt6.sip.array[int]"/;
|
||||
%MethodCode
|
||||
sipRes = sipConvertToArray(sipCpp->indexDataAsUShort(), "H",
|
||||
sipCpp->indexCount(), 0);
|
||||
%End
|
||||
|
||||
SIP_PYOBJECT vertexDataAsPoint2D() /TypeHint="PyQt6.sip.array[QSGGeometry.Point2D]"/;
|
||||
%MethodCode
|
||||
sipRes = sipConvertToTypedArray(sipCpp->vertexDataAsPoint2D(),
|
||||
sipType_QSGGeometry_Point2D, "ff", sizeof (QSGGeometry::Point2D),
|
||||
sipCpp->vertexCount(), 0);
|
||||
%End
|
||||
|
||||
SIP_PYOBJECT vertexDataAsTexturedPoint2D() /TypeHint="PyQt6.sip.array[QSGGeometry.TexturedPoint2D]"/;
|
||||
%MethodCode
|
||||
sipRes = sipConvertToTypedArray(sipCpp->vertexDataAsTexturedPoint2D(),
|
||||
sipType_QSGGeometry_TexturedPoint2D, "ffff",
|
||||
sizeof (QSGGeometry::TexturedPoint2D), sipCpp->vertexCount(), 0);
|
||||
%End
|
||||
|
||||
SIP_PYOBJECT vertexDataAsColoredPoint2D() /TypeHint="PyQt6.sip.array[QSGGeometry.ColoredPoint2D]"/;
|
||||
%MethodCode
|
||||
sipRes = sipConvertToTypedArray(sipCpp->vertexDataAsColoredPoint2D(),
|
||||
sipType_QSGGeometry_ColoredPoint2D, "ffbbbb",
|
||||
sizeof (QSGGeometry::ColoredPoint2D), sipCpp->vertexCount(), 0);
|
||||
%End
|
||||
|
||||
int sizeOfIndex() const;
|
||||
|
||||
enum AttributeType
|
||||
{
|
||||
UnknownAttribute,
|
||||
PositionAttribute,
|
||||
ColorAttribute,
|
||||
TexCoordAttribute,
|
||||
TexCoord1Attribute,
|
||||
TexCoord2Attribute,
|
||||
};
|
||||
|
||||
enum DrawingMode /BaseType=IntEnum/
|
||||
{
|
||||
DrawPoints,
|
||||
DrawLines,
|
||||
DrawLineLoop,
|
||||
DrawLineStrip,
|
||||
DrawTriangles,
|
||||
DrawTriangleStrip,
|
||||
DrawTriangleFan,
|
||||
};
|
||||
|
||||
enum Type
|
||||
{
|
||||
ByteType,
|
||||
UnsignedByteType,
|
||||
ShortType,
|
||||
UnsignedShortType,
|
||||
IntType,
|
||||
UnsignedIntType,
|
||||
FloatType,
|
||||
Bytes2Type,
|
||||
Bytes3Type,
|
||||
Bytes4Type,
|
||||
DoubleType,
|
||||
};
|
||||
|
||||
static void updateColoredRectGeometry(QSGGeometry *g, const QRectF &rect);
|
||||
%If (Qt_6_10_0 -)
|
||||
void setVertexCount(int count);
|
||||
%End
|
||||
%If (Qt_6_10_0 -)
|
||||
void setIndexCount(int count);
|
||||
%End
|
||||
|
||||
private:
|
||||
QSGGeometry(const QSGGeometry &);
|
||||
};
|
||||
@@ -0,0 +1,66 @@
|
||||
// qsgimagenode.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QSGImageNode : public QSGGeometryNode /NoDefaultCtors/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgimagenode.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
virtual ~QSGImageNode();
|
||||
virtual void setRect(const QRectF &rect) = 0;
|
||||
void setRect(qreal x, qreal y, qreal w, qreal h);
|
||||
virtual QRectF rect() const = 0;
|
||||
virtual void setSourceRect(const QRectF &r) = 0;
|
||||
void setSourceRect(qreal x, qreal y, qreal w, qreal h);
|
||||
virtual QRectF sourceRect() const = 0;
|
||||
virtual void setTexture(QSGTexture *texture /GetWrapper/) = 0;
|
||||
%MethodCode
|
||||
sipCpp->setTexture(a0);
|
||||
|
||||
if (sipCpp->ownsTexture())
|
||||
sipTransferTo(a0Wrapper, sipSelf);
|
||||
%End
|
||||
|
||||
virtual QSGTexture *texture() const = 0;
|
||||
virtual void setFiltering(QSGTexture::Filtering filtering) = 0;
|
||||
virtual QSGTexture::Filtering filtering() const = 0;
|
||||
virtual void setMipmapFiltering(QSGTexture::Filtering filtering) = 0;
|
||||
virtual QSGTexture::Filtering mipmapFiltering() const = 0;
|
||||
|
||||
enum TextureCoordinatesTransformFlag /BaseType=Flag/
|
||||
{
|
||||
NoTransform,
|
||||
MirrorHorizontally,
|
||||
MirrorVertically,
|
||||
};
|
||||
|
||||
typedef QFlags<QSGImageNode::TextureCoordinatesTransformFlag> TextureCoordinatesTransformMode;
|
||||
virtual void setTextureCoordinatesTransform(QSGImageNode::TextureCoordinatesTransformMode mode) = 0;
|
||||
virtual QSGImageNode::TextureCoordinatesTransformMode textureCoordinatesTransform() const = 0;
|
||||
virtual void setOwnsTexture(bool owns) = 0;
|
||||
virtual bool ownsTexture() const = 0;
|
||||
static void rebuildGeometry(QSGGeometry *g, QSGTexture *texture, const QRectF &rect, QRectF sourceRect, QSGImageNode::TextureCoordinatesTransformMode texCoordMode);
|
||||
virtual void setAnisotropyLevel(QSGTexture::AnisotropyLevel level) = 0;
|
||||
virtual QSGTexture::AnisotropyLevel anisotropyLevel() const = 0;
|
||||
};
|
||||
@@ -0,0 +1,56 @@
|
||||
// qsgmaterial.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QSGMaterial /Supertype=PyQt6.sip.wrapper/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgmaterial.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Flag /BaseType=Flag/
|
||||
{
|
||||
Blending,
|
||||
RequiresDeterminant,
|
||||
RequiresFullMatrixExceptTranslate,
|
||||
RequiresFullMatrix,
|
||||
%If (Qt_6_3_0 -)
|
||||
NoBatching,
|
||||
%End
|
||||
CustomCompileStep,
|
||||
};
|
||||
|
||||
typedef QFlags<QSGMaterial::Flag> Flags;
|
||||
QSGMaterial();
|
||||
virtual ~QSGMaterial();
|
||||
virtual QSGMaterialType *type() const = 0;
|
||||
virtual QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode) const = 0 /Factory/;
|
||||
virtual int compare(const QSGMaterial *other) const;
|
||||
QSGMaterial::Flags flags() const;
|
||||
void setFlag(QSGMaterial::Flags flags, bool enabled = true);
|
||||
%If (Qt_6_8_0 -)
|
||||
int viewCount() const;
|
||||
%End
|
||||
|
||||
private:
|
||||
QSGMaterial(const QSGMaterial &);
|
||||
};
|
||||
@@ -0,0 +1,187 @@
|
||||
// qsgmaterialshader.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QSGMaterialShader
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgmaterialshader.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
class RenderState
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgmaterialshader.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum DirtyState /BaseType=Flag/
|
||||
{
|
||||
DirtyMatrix,
|
||||
DirtyOpacity,
|
||||
DirtyCachedMaterialData,
|
||||
DirtyAll,
|
||||
};
|
||||
|
||||
typedef QFlags<QSGMaterialShader::RenderState::DirtyState> DirtyStates;
|
||||
QSGMaterialShader::RenderState::DirtyStates dirtyStates() const;
|
||||
bool isMatrixDirty() const;
|
||||
bool isOpacityDirty() const;
|
||||
float opacity() const;
|
||||
QMatrix4x4 combinedMatrix() const;
|
||||
QMatrix4x4 modelViewMatrix() const;
|
||||
QMatrix4x4 projectionMatrix() const;
|
||||
QRect viewportRect() const;
|
||||
QRect deviceRect() const;
|
||||
float determinant() const;
|
||||
float devicePixelRatio() const;
|
||||
QByteArray *uniformData();
|
||||
};
|
||||
|
||||
struct GraphicsPipelineState
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgmaterialshader.h>
|
||||
%End
|
||||
|
||||
enum BlendFactor
|
||||
{
|
||||
Zero,
|
||||
One,
|
||||
SrcColor,
|
||||
OneMinusSrcColor,
|
||||
DstColor,
|
||||
OneMinusDstColor,
|
||||
SrcAlpha,
|
||||
OneMinusSrcAlpha,
|
||||
DstAlpha,
|
||||
OneMinusDstAlpha,
|
||||
ConstantColor,
|
||||
OneMinusConstantColor,
|
||||
ConstantAlpha,
|
||||
OneMinusConstantAlpha,
|
||||
SrcAlphaSaturate,
|
||||
Src1Color,
|
||||
OneMinusSrc1Color,
|
||||
Src1Alpha,
|
||||
OneMinusSrc1Alpha,
|
||||
};
|
||||
|
||||
%If (Qt_6_8_0 -)
|
||||
|
||||
enum class BlendOp
|
||||
{
|
||||
Add,
|
||||
Subtract,
|
||||
ReverseSubtract,
|
||||
Min,
|
||||
Max,
|
||||
};
|
||||
|
||||
%End
|
||||
|
||||
enum ColorMaskComponent /BaseType=Flag/
|
||||
{
|
||||
R,
|
||||
G,
|
||||
B,
|
||||
A,
|
||||
};
|
||||
|
||||
typedef QFlags<QSGMaterialShader::GraphicsPipelineState::ColorMaskComponent> ColorMask;
|
||||
|
||||
enum CullMode
|
||||
{
|
||||
CullNone,
|
||||
CullFront,
|
||||
CullBack,
|
||||
};
|
||||
|
||||
%If (Qt_6_4_0 -)
|
||||
|
||||
enum PolygonMode
|
||||
{
|
||||
Fill,
|
||||
Line,
|
||||
};
|
||||
|
||||
%End
|
||||
QColor blendConstant;
|
||||
bool blendEnable;
|
||||
QSGMaterialShader::GraphicsPipelineState::ColorMask colorWrite;
|
||||
QSGMaterialShader::GraphicsPipelineState::CullMode cullMode;
|
||||
%If (Qt_6_5_0 -)
|
||||
QSGMaterialShader::GraphicsPipelineState::BlendFactor dstAlpha;
|
||||
%End
|
||||
QSGMaterialShader::GraphicsPipelineState::BlendFactor dstColor;
|
||||
%If (Qt_6_4_0 -)
|
||||
QSGMaterialShader::GraphicsPipelineState::PolygonMode polygonMode;
|
||||
%End
|
||||
%If (Qt_6_5_0 -)
|
||||
QSGMaterialShader::GraphicsPipelineState::BlendFactor srcAlpha;
|
||||
%End
|
||||
QSGMaterialShader::GraphicsPipelineState::BlendFactor srcColor;
|
||||
%If (Qt_6_8_0 -)
|
||||
QSGMaterialShader::GraphicsPipelineState::BlendOp opAlpha;
|
||||
%End
|
||||
%If (Qt_6_8_0 -)
|
||||
QSGMaterialShader::GraphicsPipelineState::BlendOp opColor;
|
||||
%End
|
||||
%If (Qt_6_5_0 -)
|
||||
bool separateBlendFactors;
|
||||
%End
|
||||
};
|
||||
|
||||
enum Flag /BaseType=Flag/
|
||||
{
|
||||
UpdatesGraphicsPipelineState,
|
||||
};
|
||||
|
||||
typedef QFlags<QSGMaterialShader::Flag> Flags;
|
||||
|
||||
enum Stage
|
||||
{
|
||||
VertexStage,
|
||||
FragmentStage,
|
||||
};
|
||||
|
||||
QSGMaterialShader();
|
||||
virtual ~QSGMaterialShader();
|
||||
virtual bool updateUniformData(QSGMaterialShader::RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial);
|
||||
virtual void updateSampledImage(QSGMaterialShader::RenderState &state, int binding, QSGTexture **texture /Out/, QSGMaterial *newMaterial, QSGMaterial *oldMaterial);
|
||||
virtual bool updateGraphicsPipelineState(QSGMaterialShader::RenderState &state, QSGMaterialShader::GraphicsPipelineState *ps, QSGMaterial *newMaterial, QSGMaterial *oldMaterial);
|
||||
QSGMaterialShader::Flags flags() const;
|
||||
void setFlag(QSGMaterialShader::Flags flags, bool on = true);
|
||||
void setFlags(QSGMaterialShader::Flags flags);
|
||||
%If (Qt_6_4_0 -)
|
||||
int combinedImageSamplerCount(int binding) const;
|
||||
%End
|
||||
|
||||
protected:
|
||||
void setShaderFileName(QSGMaterialShader::Stage stage, const QString &filename);
|
||||
%If (Qt_6_8_0 -)
|
||||
void setShaderFileName(QSGMaterialShader::Stage stage, const QString &filename, int viewCount);
|
||||
%End
|
||||
|
||||
private:
|
||||
QSGMaterialShader(const QSGMaterialShader &);
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
// qsgmaterialtype.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
struct QSGMaterialType
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgmaterialtype.h>
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,335 @@
|
||||
// qsgnode.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QSGNode /Supertype=PyQt6.sip.wrapper/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgnode.h>
|
||||
%End
|
||||
|
||||
%TypeCode
|
||||
static sipErrorState qsgnode_handle_flags(QSGNode *node, PyObject *self, QSGNode::Flags old_flags)
|
||||
{
|
||||
QSGNode::Flags new_flags = node->flags();
|
||||
|
||||
if (node->parent())
|
||||
{
|
||||
if ((old_flags & QSGNode::OwnedByParent) != (new_flags & QSGNode::OwnedByParent))
|
||||
{
|
||||
if (old_flags & QSGNode::OwnedByParent)
|
||||
{
|
||||
sipTransferBack(self);
|
||||
}
|
||||
else
|
||||
{
|
||||
PyObject *parent = sipConvertFromType(node->parent(), sipType_QSGNode, 0);
|
||||
|
||||
if (!parent)
|
||||
return sipErrorFail;
|
||||
|
||||
sipTransferTo(self, parent);
|
||||
Py_DECREF(parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QSGNode::NodeType ntype = node->type();
|
||||
|
||||
if (ntype == QSGNode::BasicNodeType || ntype == QSGNode::GeometryNodeType || ntype == QSGNode::ClipNodeType)
|
||||
{
|
||||
QSGBasicGeometryNode *bg_node = (QSGBasicGeometryNode *)node;
|
||||
|
||||
if (bg_node->geometry())
|
||||
{
|
||||
if ((old_flags & QSGNode::OwnsGeometry) != (new_flags & QSGNode::OwnsGeometry))
|
||||
{
|
||||
PyObject *geom = sipConvertFromType(bg_node->geometry(), sipType_QSGGeometry, 0);
|
||||
|
||||
if (!geom)
|
||||
return sipErrorFail;
|
||||
|
||||
if (old_flags & QSGNode::OwnsGeometry)
|
||||
sipTransferBack(geom);
|
||||
else
|
||||
sipTransferTo(geom, self);
|
||||
|
||||
Py_DECREF(geom);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ntype == QSGNode::GeometryNodeType)
|
||||
{
|
||||
QSGGeometryNode *g_node = (QSGGeometryNode *)node;
|
||||
|
||||
if (g_node->material())
|
||||
{
|
||||
if ((old_flags & QSGNode::OwnsMaterial) != (new_flags & QSGNode::OwnsMaterial))
|
||||
{
|
||||
PyObject *mat = sipConvertFromType(g_node->material(), sipType_QSGMaterial, 0);
|
||||
|
||||
if (!mat)
|
||||
return sipErrorFail;
|
||||
|
||||
if (old_flags & QSGNode::OwnsMaterial)
|
||||
sipTransferBack(mat);
|
||||
else
|
||||
sipTransferTo(mat, self);
|
||||
|
||||
Py_DECREF(mat);
|
||||
}
|
||||
}
|
||||
|
||||
if (g_node->opaqueMaterial())
|
||||
{
|
||||
if ((old_flags & QSGNode::OwnsOpaqueMaterial) != (new_flags & QSGNode::OwnsOpaqueMaterial))
|
||||
{
|
||||
PyObject *omat = sipConvertFromType(g_node->opaqueMaterial(), sipType_QSGMaterial, 0);
|
||||
|
||||
if (!omat)
|
||||
return sipErrorFail;
|
||||
|
||||
if (old_flags & QSGNode::OwnsOpaqueMaterial)
|
||||
sipTransferBack(omat);
|
||||
else
|
||||
sipTransferTo(omat, self);
|
||||
|
||||
Py_DECREF(omat);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return sipErrorNone;
|
||||
}
|
||||
%End
|
||||
|
||||
%ConvertToSubClassCode
|
||||
switch (sipCpp->type())
|
||||
{
|
||||
case QSGNode::BasicNodeType:
|
||||
sipType = sipType_QSGBasicGeometryNode;
|
||||
break;
|
||||
|
||||
case QSGNode::GeometryNodeType:
|
||||
sipType = sipType_QSGGeometryNode;
|
||||
break;
|
||||
|
||||
case QSGNode::TransformNodeType:
|
||||
sipType = sipType_QSGClipNode;
|
||||
break;
|
||||
|
||||
case QSGNode::ClipNodeType:
|
||||
sipType = sipType_QSGTransformNode;
|
||||
break;
|
||||
|
||||
case QSGNode::OpacityNodeType:
|
||||
sipType = sipType_QSGOpacityNode;
|
||||
break;
|
||||
|
||||
default:
|
||||
sipType = 0;
|
||||
}
|
||||
%End
|
||||
|
||||
public:
|
||||
enum NodeType
|
||||
{
|
||||
BasicNodeType,
|
||||
GeometryNodeType,
|
||||
TransformNodeType,
|
||||
ClipNodeType,
|
||||
OpacityNodeType,
|
||||
};
|
||||
|
||||
enum Flag /BaseType=Flag/
|
||||
{
|
||||
OwnedByParent,
|
||||
UsePreprocess,
|
||||
OwnsGeometry,
|
||||
OwnsMaterial,
|
||||
OwnsOpaqueMaterial,
|
||||
};
|
||||
|
||||
typedef QFlags<QSGNode::Flag> Flags;
|
||||
|
||||
enum DirtyStateBit /BaseType=Flag/
|
||||
{
|
||||
DirtyMatrix,
|
||||
DirtyNodeAdded,
|
||||
DirtyNodeRemoved,
|
||||
DirtyGeometry,
|
||||
DirtyMaterial,
|
||||
DirtyOpacity,
|
||||
};
|
||||
|
||||
typedef QFlags<QSGNode::DirtyStateBit> DirtyState;
|
||||
QSGNode();
|
||||
virtual ~QSGNode();
|
||||
QSGNode *parent() const;
|
||||
void removeChildNode(QSGNode *node);
|
||||
void removeAllChildNodes();
|
||||
void prependChildNode(QSGNode *node /GetWrapper/);
|
||||
%MethodCode
|
||||
sipCpp->prependChildNode(a0);
|
||||
|
||||
if (a0->flags() & QSGNode::OwnedByParent)
|
||||
sipTransferTo(a0Wrapper, sipSelf);
|
||||
%End
|
||||
|
||||
void appendChildNode(QSGNode *node /GetWrapper/);
|
||||
%MethodCode
|
||||
sipCpp->appendChildNode(a0);
|
||||
|
||||
if (a0->flags() & QSGNode::OwnedByParent)
|
||||
sipTransferTo(a0Wrapper, sipSelf);
|
||||
%End
|
||||
|
||||
void insertChildNodeBefore(QSGNode *node /GetWrapper/, QSGNode *before);
|
||||
%MethodCode
|
||||
sipCpp->insertChildNodeBefore(a0, a1);
|
||||
|
||||
if (a0->flags() & QSGNode::OwnedByParent)
|
||||
sipTransferTo(a0Wrapper, sipSelf);
|
||||
%End
|
||||
|
||||
void insertChildNodeAfter(QSGNode *node /GetWrapper/, QSGNode *after);
|
||||
%MethodCode
|
||||
sipCpp->insertChildNodeAfter(a0, a1);
|
||||
|
||||
if (a0->flags() & QSGNode::OwnedByParent)
|
||||
sipTransferTo(a0Wrapper, sipSelf);
|
||||
%End
|
||||
|
||||
int childCount() const /__len__/;
|
||||
QSGNode *childAtIndex(int i) const;
|
||||
QSGNode *firstChild() const;
|
||||
QSGNode *lastChild() const;
|
||||
QSGNode *nextSibling() const;
|
||||
QSGNode *previousSibling() const;
|
||||
QSGNode::NodeType type() const;
|
||||
void markDirty(QSGNode::DirtyState bits);
|
||||
virtual bool isSubtreeBlocked() const;
|
||||
QSGNode::Flags flags() const;
|
||||
void setFlag(QSGNode::Flag, bool enabled = true);
|
||||
%MethodCode
|
||||
QSGNode::Flags old_flags = sipCpp->flags();
|
||||
|
||||
sipCpp->setFlag(a0, a1);
|
||||
|
||||
sipError = qsgnode_handle_flags(sipCpp, sipSelf, old_flags);
|
||||
%End
|
||||
|
||||
void setFlags(QSGNode::Flags, bool enabled = true);
|
||||
virtual void preprocess();
|
||||
|
||||
private:
|
||||
QSGNode(const QSGNode &);
|
||||
};
|
||||
|
||||
class QSGBasicGeometryNode : public QSGNode /NoDefaultCtors/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgnode.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
virtual ~QSGBasicGeometryNode();
|
||||
void setGeometry(QSGGeometry *geometry /GetWrapper/);
|
||||
%MethodCode
|
||||
sipCpp->setGeometry(a0);
|
||||
|
||||
if (sipCpp->flags() & QSGNode::OwnsGeometry)
|
||||
sipTransferTo(a0Wrapper, sipSelf);
|
||||
%End
|
||||
|
||||
QSGGeometry *geometry();
|
||||
};
|
||||
|
||||
class QSGGeometryNode : public QSGBasicGeometryNode
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgnode.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QSGGeometryNode();
|
||||
virtual ~QSGGeometryNode();
|
||||
void setMaterial(QSGMaterial *material /GetWrapper/);
|
||||
%MethodCode
|
||||
sipCpp->setMaterial(a0);
|
||||
|
||||
if (sipCpp->flags() & QSGNode::OwnsMaterial)
|
||||
sipTransferTo(a0Wrapper, sipSelf);
|
||||
%End
|
||||
|
||||
QSGMaterial *material() const;
|
||||
void setOpaqueMaterial(QSGMaterial *material /GetWrapper/);
|
||||
%MethodCode
|
||||
sipCpp->setOpaqueMaterial(a0);
|
||||
|
||||
if (sipCpp->flags() & QSGNode::OwnsOpaqueMaterial)
|
||||
sipTransferTo(a0Wrapper, sipSelf);
|
||||
%End
|
||||
|
||||
QSGMaterial *opaqueMaterial() const;
|
||||
};
|
||||
|
||||
class QSGClipNode : public QSGBasicGeometryNode
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgnode.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QSGClipNode();
|
||||
virtual ~QSGClipNode();
|
||||
void setIsRectangular(bool rectHint);
|
||||
bool isRectangular() const;
|
||||
void setClipRect(const QRectF &);
|
||||
QRectF clipRect() const;
|
||||
};
|
||||
|
||||
class QSGTransformNode : public QSGNode
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgnode.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QSGTransformNode();
|
||||
virtual ~QSGTransformNode();
|
||||
void setMatrix(const QMatrix4x4 &matrix);
|
||||
const QMatrix4x4 &matrix() const;
|
||||
};
|
||||
|
||||
class QSGOpacityNode : public QSGNode
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgnode.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QSGOpacityNode();
|
||||
virtual ~QSGOpacityNode();
|
||||
void setOpacity(qreal opacity);
|
||||
qreal opacity() const;
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
// qsgrectanglenode.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QSGRectangleNode : public QSGGeometryNode /NoDefaultCtors/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgrectanglenode.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
virtual ~QSGRectangleNode();
|
||||
virtual void setRect(const QRectF &rect) = 0;
|
||||
void setRect(qreal x, qreal y, qreal w, qreal h);
|
||||
virtual QRectF rect() const = 0;
|
||||
virtual void setColor(const QColor &color) = 0;
|
||||
virtual QColor color() const = 0;
|
||||
};
|
||||
@@ -0,0 +1,116 @@
|
||||
// qsgrendererinterface.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QSGRendererInterface /NoDefaultCtors/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgrendererinterface.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum GraphicsApi
|
||||
{
|
||||
Unknown,
|
||||
Software,
|
||||
OpenGL,
|
||||
OpenVG,
|
||||
OpenGLRhi,
|
||||
Direct3D11Rhi,
|
||||
VulkanRhi,
|
||||
MetalRhi,
|
||||
NullRhi,
|
||||
Direct3D11,
|
||||
Vulkan,
|
||||
Metal,
|
||||
%If (Qt_6_6_0 -)
|
||||
Direct3D12,
|
||||
%End
|
||||
Null,
|
||||
};
|
||||
|
||||
enum Resource
|
||||
{
|
||||
DeviceResource,
|
||||
CommandQueueResource,
|
||||
CommandListResource,
|
||||
PainterResource,
|
||||
RhiResource,
|
||||
PhysicalDeviceResource,
|
||||
OpenGLContextResource,
|
||||
DeviceContextResource,
|
||||
CommandEncoderResource,
|
||||
VulkanInstanceResource,
|
||||
RenderPassResource,
|
||||
RhiSwapchainResource,
|
||||
RhiRedirectCommandBuffer,
|
||||
RhiRedirectRenderTarget,
|
||||
%If (Qt_6_4_0 -)
|
||||
RedirectPaintDevice,
|
||||
%End
|
||||
%If (Qt_6_6_0 -)
|
||||
GraphicsQueueFamilyIndexResource,
|
||||
%End
|
||||
%If (Qt_6_6_0 -)
|
||||
GraphicsQueueIndexResource,
|
||||
%End
|
||||
};
|
||||
|
||||
enum ShaderType
|
||||
{
|
||||
UnknownShadingLanguage,
|
||||
GLSL,
|
||||
HLSL,
|
||||
RhiShader,
|
||||
};
|
||||
|
||||
enum ShaderCompilationType /BaseType=Flag/
|
||||
{
|
||||
RuntimeCompilation,
|
||||
OfflineCompilation,
|
||||
};
|
||||
|
||||
typedef QFlags<QSGRendererInterface::ShaderCompilationType> ShaderCompilationTypes;
|
||||
|
||||
enum ShaderSourceType /BaseType=Flag/
|
||||
{
|
||||
ShaderSourceString,
|
||||
ShaderSourceFile,
|
||||
ShaderByteCode,
|
||||
};
|
||||
|
||||
typedef QFlags<QSGRendererInterface::ShaderSourceType> ShaderSourceTypes;
|
||||
virtual ~QSGRendererInterface();
|
||||
virtual QSGRendererInterface::GraphicsApi graphicsApi() const = 0;
|
||||
virtual void *getResource(QQuickWindow *window, QSGRendererInterface::Resource resource) const;
|
||||
virtual void *getResource(QQuickWindow *window, const char *resource) const;
|
||||
virtual QSGRendererInterface::ShaderType shaderType() const = 0;
|
||||
virtual QSGRendererInterface::ShaderCompilationTypes shaderCompilationType() const = 0;
|
||||
virtual QSGRendererInterface::ShaderSourceTypes shaderSourceType() const = 0;
|
||||
static bool isApiRhiBased(QSGRendererInterface::GraphicsApi api);
|
||||
|
||||
enum RenderMode
|
||||
{
|
||||
RenderMode2D,
|
||||
RenderMode2DNoDepthBuffer,
|
||||
RenderMode3D,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,82 @@
|
||||
// qsgrendernode.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QSGRenderNode : public QSGNode
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgrendernode.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum StateFlag /BaseType=Flag/
|
||||
{
|
||||
DepthState,
|
||||
StencilState,
|
||||
ScissorState,
|
||||
ColorState,
|
||||
BlendState,
|
||||
CullState,
|
||||
ViewportState,
|
||||
RenderTargetState,
|
||||
};
|
||||
|
||||
typedef QFlags<QSGRenderNode::StateFlag> StateFlags;
|
||||
|
||||
enum RenderingFlag /BaseType=Flag/
|
||||
{
|
||||
BoundedRectRendering,
|
||||
DepthAwareRendering,
|
||||
OpaqueRendering,
|
||||
};
|
||||
|
||||
typedef QFlags<QSGRenderNode::RenderingFlag> RenderingFlags;
|
||||
|
||||
struct RenderState /NoDefaultCtors/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgrendernode.h>
|
||||
%End
|
||||
|
||||
virtual ~RenderState();
|
||||
virtual const QMatrix4x4 *projectionMatrix() const = 0;
|
||||
virtual QRect scissorRect() const = 0;
|
||||
virtual bool scissorEnabled() const = 0;
|
||||
virtual int stencilValue() const = 0;
|
||||
virtual bool stencilEnabled() const = 0;
|
||||
virtual const QRegion *clipRegion() const = 0;
|
||||
virtual void *get(const char *state) const;
|
||||
};
|
||||
|
||||
virtual ~QSGRenderNode();
|
||||
virtual QSGRenderNode::StateFlags changedStates() const;
|
||||
virtual void render(const QSGRenderNode::RenderState *state) = 0;
|
||||
virtual void releaseResources();
|
||||
virtual QSGRenderNode::RenderingFlags flags() const;
|
||||
virtual QRectF rect() const;
|
||||
const QMatrix4x4 *matrix() const;
|
||||
const QSGClipNode *clipList() const;
|
||||
qreal inheritedOpacity() const;
|
||||
virtual void prepare();
|
||||
%If (Qt_6_5_0 -)
|
||||
const QMatrix4x4 *projectionMatrix() const;
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,37 @@
|
||||
// qsgsimplerectnode.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QSGSimpleRectNode : public QSGGeometryNode /NoDefaultCtors/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgsimplerectnode.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QSGSimpleRectNode(const QRectF &rect, const QColor &color);
|
||||
QSGSimpleRectNode();
|
||||
void setRect(const QRectF &rect);
|
||||
void setRect(qreal x, qreal y, qreal w, qreal h);
|
||||
QRectF rect() const;
|
||||
void setColor(const QColor &color);
|
||||
QColor color() const;
|
||||
};
|
||||
@@ -0,0 +1,55 @@
|
||||
// qsgsimpletexturenode.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QSGSimpleTextureNode : public QSGGeometryNode /NoDefaultCtors/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgsimpletexturenode.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QSGSimpleTextureNode();
|
||||
virtual ~QSGSimpleTextureNode();
|
||||
void setRect(const QRectF &rect);
|
||||
void setRect(qreal x, qreal y, qreal w, qreal h);
|
||||
QRectF rect() const;
|
||||
void setTexture(QSGTexture *texture);
|
||||
QSGTexture *texture() const;
|
||||
void setFiltering(QSGTexture::Filtering filtering);
|
||||
QSGTexture::Filtering filtering() const;
|
||||
|
||||
enum TextureCoordinatesTransformFlag /BaseType=Flag/
|
||||
{
|
||||
NoTransform,
|
||||
MirrorHorizontally,
|
||||
MirrorVertically,
|
||||
};
|
||||
|
||||
typedef QFlags<QSGSimpleTextureNode::TextureCoordinatesTransformFlag> TextureCoordinatesTransformMode;
|
||||
void setTextureCoordinatesTransform(QSGSimpleTextureNode::TextureCoordinatesTransformMode mode);
|
||||
QSGSimpleTextureNode::TextureCoordinatesTransformMode textureCoordinatesTransform() const;
|
||||
void setOwnsTexture(bool owns);
|
||||
bool ownsTexture() const;
|
||||
void setSourceRect(const QRectF &r);
|
||||
void setSourceRect(qreal x, qreal y, qreal w, qreal h);
|
||||
QRectF sourceRect() const;
|
||||
};
|
||||
@@ -0,0 +1,73 @@
|
||||
// qsgtextnode.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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_6_7_0 -)
|
||||
|
||||
class QSGTextNode : public QSGTransformNode /NoDefaultCtors/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgtextnode.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum RenderType
|
||||
{
|
||||
QtRendering,
|
||||
NativeRendering,
|
||||
CurveRendering,
|
||||
};
|
||||
|
||||
enum TextStyle
|
||||
{
|
||||
Normal,
|
||||
Outline,
|
||||
Raised,
|
||||
Sunken,
|
||||
};
|
||||
|
||||
virtual ~QSGTextNode();
|
||||
void addTextDocument(QPointF position, QTextDocument *document, int selectionStart = -1, int selectionCount = -1);
|
||||
void addTextLayout(QPointF position, QTextLayout *layout, int selectionStart = -1, int selectionCount = -1, int lineStart = 0, int lineCount = -1);
|
||||
virtual void setColor(QColor color) = 0;
|
||||
virtual QColor color() const = 0;
|
||||
virtual void setTextStyle(QSGTextNode::TextStyle textStyle) = 0;
|
||||
virtual QSGTextNode::TextStyle textStyle() = 0;
|
||||
virtual void setStyleColor(QColor styleColor) = 0;
|
||||
virtual QColor styleColor() const = 0;
|
||||
virtual void setLinkColor(QColor linkColor) = 0;
|
||||
virtual QColor linkColor() const = 0;
|
||||
virtual void setSelectionColor(QColor selectionColor) = 0;
|
||||
virtual QColor selectionColor() const = 0;
|
||||
virtual void setSelectionTextColor(QColor selectionTextColor) = 0;
|
||||
virtual QColor selectionTextColor() const = 0;
|
||||
virtual void setRenderType(QSGTextNode::RenderType renderType) = 0;
|
||||
virtual QSGTextNode::RenderType renderType() const = 0;
|
||||
virtual void setRenderTypeQuality(int renderTypeQuality) = 0;
|
||||
virtual int renderTypeQuality() const = 0;
|
||||
virtual void setFiltering(QSGTexture::Filtering) = 0;
|
||||
virtual QSGTexture::Filtering filtering() const = 0;
|
||||
virtual void clear() = 0;
|
||||
virtual void setViewport(const QRectF &viewport) = 0;
|
||||
virtual QRectF viewport() const = 0;
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,88 @@
|
||||
// qsgtexture.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QSGTexture : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgtexture.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QSGTexture();
|
||||
virtual ~QSGTexture();
|
||||
|
||||
enum WrapMode
|
||||
{
|
||||
Repeat,
|
||||
ClampToEdge,
|
||||
MirroredRepeat,
|
||||
};
|
||||
|
||||
enum Filtering
|
||||
{
|
||||
None,
|
||||
Nearest,
|
||||
Linear,
|
||||
};
|
||||
|
||||
virtual QSize textureSize() const = 0;
|
||||
virtual bool hasAlphaChannel() const = 0;
|
||||
virtual bool hasMipmaps() const = 0;
|
||||
virtual QRectF normalizedTextureSubRect() const;
|
||||
virtual bool isAtlasTexture() const;
|
||||
void setMipmapFiltering(QSGTexture::Filtering filter);
|
||||
QSGTexture::Filtering mipmapFiltering() const;
|
||||
void setFiltering(QSGTexture::Filtering filter);
|
||||
QSGTexture::Filtering filtering() const;
|
||||
void setHorizontalWrapMode(QSGTexture::WrapMode hwrap);
|
||||
QSGTexture::WrapMode horizontalWrapMode() const;
|
||||
void setVerticalWrapMode(QSGTexture::WrapMode vwrap);
|
||||
QSGTexture::WrapMode verticalWrapMode() const;
|
||||
QRectF convertToNormalizedSourceRect(const QRectF &rect) const;
|
||||
|
||||
enum AnisotropyLevel
|
||||
{
|
||||
AnisotropyNone,
|
||||
Anisotropy2x,
|
||||
Anisotropy4x,
|
||||
Anisotropy8x,
|
||||
Anisotropy16x,
|
||||
};
|
||||
|
||||
void setAnisotropyLevel(QSGTexture::AnisotropyLevel level);
|
||||
QSGTexture::AnisotropyLevel anisotropyLevel() const;
|
||||
virtual qint64 comparisonKey() const = 0;
|
||||
};
|
||||
|
||||
class QSGDynamicTexture : public QSGTexture
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgtexture.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QSGDynamicTexture();
|
||||
virtual bool updateTexture() = 0;
|
||||
%If (Qt_6_4_0 -)
|
||||
virtual ~QSGDynamicTexture();
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,46 @@
|
||||
// qsgtexture_platform.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
namespace QNativeInterface
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgtexture_platform.h>
|
||||
%End
|
||||
|
||||
%If (PyQt_OpenGL)
|
||||
|
||||
struct QSGOpenGLTexture /NoDefaultCtors/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgtexture_platform.h>
|
||||
%End
|
||||
|
||||
protected:
|
||||
virtual ~QSGOpenGLTexture();
|
||||
|
||||
public:
|
||||
virtual GLuint nativeTexture() const = 0;
|
||||
static QSGTexture *fromNative(GLuint textureId, QQuickWindow *window, const QSize &size, QQuickWindow::CreateTextureOptions options = {});
|
||||
};
|
||||
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,57 @@
|
||||
// qsgtexturematerial.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QSGOpaqueTextureMaterial : public QSGMaterial
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgtexturematerial.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QSGOpaqueTextureMaterial();
|
||||
virtual QSGMaterialType *type() const;
|
||||
virtual QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode) const /Factory/;
|
||||
virtual int compare(const QSGMaterial *other) const;
|
||||
void setTexture(QSGTexture *texture);
|
||||
QSGTexture *texture() const;
|
||||
void setMipmapFiltering(QSGTexture::Filtering filtering);
|
||||
QSGTexture::Filtering mipmapFiltering() const;
|
||||
void setFiltering(QSGTexture::Filtering filtering);
|
||||
QSGTexture::Filtering filtering() const;
|
||||
void setHorizontalWrapMode(QSGTexture::WrapMode mode);
|
||||
QSGTexture::WrapMode horizontalWrapMode() const;
|
||||
void setVerticalWrapMode(QSGTexture::WrapMode mode);
|
||||
QSGTexture::WrapMode verticalWrapMode() const;
|
||||
void setAnisotropyLevel(QSGTexture::AnisotropyLevel level);
|
||||
QSGTexture::AnisotropyLevel anisotropyLevel() const;
|
||||
};
|
||||
|
||||
class QSGTextureMaterial : public QSGOpaqueTextureMaterial
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgtexturematerial.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
virtual QSGMaterialType *type() const;
|
||||
virtual QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode) const /Factory/;
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
// qsgtextureprovider.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QSGTextureProvider : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgtextureprovider.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
virtual QSGTexture *texture() const = 0 /Factory/;
|
||||
|
||||
signals:
|
||||
void textureChanged();
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
// qsgvertexcolormaterial.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtQuick Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
class QSGVertexColorMaterial : public QSGMaterial
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsgvertexcolormaterial.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QSGVertexColorMaterial();
|
||||
virtual int compare(const QSGMaterial *other) const;
|
||||
|
||||
protected:
|
||||
virtual QSGMaterialType *type() const;
|
||||
virtual QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode) const /Factory/;
|
||||
};
|
||||
Reference in New Issue
Block a user