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