qgraphicsproxywidget.sip 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. // qgraphicsproxywidget.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtWidgets 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 QGraphicsProxyWidget : public QGraphicsWidget
  22. {
  23. %TypeHeaderCode
  24. #include <qgraphicsproxywidget.h>
  25. %End
  26. public:
  27. QGraphicsProxyWidget(QGraphicsItem *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags());
  28. virtual ~QGraphicsProxyWidget();
  29. void setWidget(QWidget *widget /Transfer/);
  30. %MethodCode
  31. // The ownership of any existing widget must be passed back to Python.
  32. QWidget *w = sipCpp->widget();
  33. Py_BEGIN_ALLOW_THREADS
  34. sipCpp->setWidget(a0);
  35. Py_END_ALLOW_THREADS
  36. if (w)
  37. {
  38. PyObject *wo = sipGetPyObject(w, sipType_QWidget);
  39. if (wo)
  40. sipTransferBack(wo);
  41. }
  42. %End
  43. QWidget *widget() const;
  44. QRectF subWidgetRect(const QWidget *widget) const;
  45. virtual void setGeometry(const QRectF &rect);
  46. virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
  47. virtual int type() const;
  48. QGraphicsProxyWidget *createProxyForChildWidget(QWidget *child) /Factory/;
  49. protected:
  50. virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value);
  51. virtual bool event(QEvent *event);
  52. virtual bool eventFilter(QObject *object, QEvent *event);
  53. virtual void showEvent(QShowEvent *event);
  54. virtual void hideEvent(QHideEvent *event);
  55. virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
  56. virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
  57. virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
  58. virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event);
  59. virtual void grabMouseEvent(QEvent *event);
  60. virtual void ungrabMouseEvent(QEvent *event);
  61. virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
  62. virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
  63. virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
  64. virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
  65. virtual void wheelEvent(QGraphicsSceneWheelEvent *event);
  66. virtual void keyPressEvent(QKeyEvent *event);
  67. virtual void keyReleaseEvent(QKeyEvent *event);
  68. virtual void focusInEvent(QFocusEvent *event);
  69. virtual void focusOutEvent(QFocusEvent *event);
  70. virtual bool focusNextPrevChild(bool next);
  71. virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
  72. virtual void resizeEvent(QGraphicsSceneResizeEvent *event);
  73. virtual void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
  74. virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent *event);
  75. virtual void dragMoveEvent(QGraphicsSceneDragDropEvent *event);
  76. virtual void dropEvent(QGraphicsSceneDragDropEvent *event);
  77. QGraphicsProxyWidget *newProxyWidget(const QWidget *) /Factory/;
  78. virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
  79. virtual void inputMethodEvent(QInputMethodEvent *event);
  80. };