qquickwidget.sip 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. // qquickwidget.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtQuickWidgets Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  8. //
  9. // This file may be used under the terms of the GNU General Public License
  10. // version 3.0 as published by the Free Software Foundation and appearing in
  11. // the file LICENSE included in the packaging of this file. Please review the
  12. // following information to ensure the GNU General Public License version 3.0
  13. // requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  14. //
  15. // If you do not wish to use this file under the terms of the GPL version 3.0
  16. // then you may purchase a commercial license. For more information contact
  17. // info@riverbankcomputing.com.
  18. //
  19. // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  20. // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21. class QQuickWidget : public QWidget
  22. {
  23. %TypeHeaderCode
  24. #include <qquickwidget.h>
  25. %End
  26. %ConvertToSubClassCode
  27. sipType = (sipCpp->inherits(sipName_QQuickWidget) ? sipType_QQuickWidget : 0);
  28. %End
  29. public:
  30. explicit QQuickWidget(QWidget *parent /TransferThis/ = 0);
  31. QQuickWidget(QQmlEngine *engine, QWidget *parent /TransferThis/);
  32. QQuickWidget(const QUrl &source, QWidget *parent /TransferThis/ = 0);
  33. %If (Qt_6_9_0 -)
  34. QQuickWidget(QAnyStringView uri, QAnyStringView typeName, QWidget *parent /TransferThis/ = 0);
  35. %End
  36. virtual ~QQuickWidget();
  37. QUrl source() const;
  38. QQmlEngine *engine() const;
  39. QQmlContext *rootContext() const;
  40. QQuickItem *rootObject() const;
  41. enum ResizeMode
  42. {
  43. SizeViewToRootObject,
  44. SizeRootObjectToView,
  45. };
  46. QQuickWidget::ResizeMode resizeMode() const;
  47. void setResizeMode(QQuickWidget::ResizeMode);
  48. enum Status
  49. {
  50. Null,
  51. Ready,
  52. Loading,
  53. Error,
  54. };
  55. QQuickWidget::Status status() const;
  56. QList<QQmlError> errors() const;
  57. virtual QSize sizeHint() const;
  58. QSize initialSize() const;
  59. void setFormat(const QSurfaceFormat &format);
  60. QSurfaceFormat format() const;
  61. public slots:
  62. void setSource(const QUrl &) /ReleaseGIL/;
  63. signals:
  64. void statusChanged(QQuickWidget::Status);
  65. void sceneGraphError(QQuickWindow::SceneGraphError error, const QString &message);
  66. protected:
  67. virtual void resizeEvent(QResizeEvent *);
  68. virtual void timerEvent(QTimerEvent *);
  69. virtual void keyPressEvent(QKeyEvent *);
  70. virtual void keyReleaseEvent(QKeyEvent *);
  71. virtual void mousePressEvent(QMouseEvent *);
  72. virtual void mouseReleaseEvent(QMouseEvent *);
  73. virtual void mouseMoveEvent(QMouseEvent *);
  74. virtual void mouseDoubleClickEvent(QMouseEvent *);
  75. virtual void showEvent(QShowEvent *);
  76. virtual void hideEvent(QHideEvent *);
  77. virtual void wheelEvent(QWheelEvent *);
  78. virtual bool event(QEvent *);
  79. virtual void focusInEvent(QFocusEvent *event);
  80. virtual void focusOutEvent(QFocusEvent *event);
  81. virtual void dragEnterEvent(QDragEnterEvent *);
  82. virtual void dragMoveEvent(QDragMoveEvent *);
  83. virtual void dragLeaveEvent(QDragLeaveEvent *);
  84. virtual void dropEvent(QDropEvent *);
  85. virtual void paintEvent(QPaintEvent *event);
  86. virtual bool focusNextPrevChild(bool next);
  87. public:
  88. QImage grabFramebuffer() const;
  89. void setClearColor(const QColor &color);
  90. QQuickWindow *quickWindow() const;
  91. %If (Qt_6_9_0 -)
  92. void setInitialProperties(const QVariantMap &initialProperties);
  93. %End
  94. %If (Qt_6_9_0 -)
  95. void loadFromModule(QAnyStringView uri, QAnyStringView typeName);
  96. %End
  97. };