5#ifndef QGRAPHICSPROXYWIDGET_H
6#define QGRAPHICSPROXYWIDGET_H
8#include <QtWidgets/qtwidgetsglobal.h>
9#include <QtWidgets/qgraphicswidget.h>
15class QGraphicsProxyWidgetPrivate;
21 QGraphicsProxyWidget(QGraphicsItem *parent =
nullptr, Qt::WindowFlags wFlags = Qt::WindowFlags());
22 ~QGraphicsProxyWidget();
24 void setWidget(QWidget *widget);
25 QWidget *widget()
const;
27 QRectF subWidgetRect(
const QWidget *widget)
const;
29 void setGeometry(
const QRectF &rect) override;
31 void paint(QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget) override;
36 int type()
const override;
38 QGraphicsProxyWidget *createProxyForChildWidget(QWidget *child);
41 QVariant itemChange(GraphicsItemChange change,
const QVariant &value) override;
43 bool event(QEvent *event) override;
44 bool eventFilter(QObject *object, QEvent *event) override;
46 void showEvent(QShowEvent *event) override;
47 void hideEvent(QHideEvent *event) override;
49#ifndef QT_NO_CONTEXTMENU
50 void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) override;
53#if QT_CONFIG(draganddrop)
54 void dragEnterEvent(QGraphicsSceneDragDropEvent *event) override;
55 void dragLeaveEvent(QGraphicsSceneDragDropEvent *event) override;
56 void dragMoveEvent(QGraphicsSceneDragDropEvent *event) override;
57 void dropEvent(QGraphicsSceneDragDropEvent *event) override;
60 void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
61 void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
62 void hoverMoveEvent(QGraphicsSceneHoverEvent *event) override;
63 void grabMouseEvent(QEvent *event) override;
64 void ungrabMouseEvent(QEvent *event) override;
66 void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
67 void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
68 void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
69 void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
70#if QT_CONFIG(wheelevent)
71 void wheelEvent(QGraphicsSceneWheelEvent *event) override;
74 void keyPressEvent(QKeyEvent *event) override;
75 void keyReleaseEvent(QKeyEvent *event) override;
77 void focusInEvent(QFocusEvent *event) override;
78 void focusOutEvent(QFocusEvent *event) override;
79 bool focusNextPrevChild(
bool next) override;
81 QVariant inputMethodQuery(Qt::InputMethodQuery query)
const override;
82 void inputMethodEvent(QInputMethodEvent *event) override;
84 QSizeF sizeHint(Qt::SizeHint which,
const QSizeF &constraint = QSizeF())
const override;
85 void resizeEvent(QGraphicsSceneResizeEvent *event) override;
88 QGraphicsProxyWidget *newProxyWidget(
const QWidget *);
91 Q_DISABLE_COPY(QGraphicsProxyWidget)
92 Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QGraphicsProxyWidget)
93 Q_PRIVATE_SLOT(d_func(),
void _q_removeWidgetSlot())
96 friend class QWidgetPrivate;
97 friend class QGraphicsItem;
The QAbstractGraphicsShapeItem class provides a common base for all path items.
The QGraphicsEllipseItem class provides an ellipse item that you can add to a QGraphicsScene.
QHash< QPaintDevice *, DeviceData > deviceData
QHash< const QGraphicsItem *, QMap< int, QVariant > > data
The QGraphicsItemGroup class provides a container that treats a group of items as a single item.
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
The QGraphicsLineItem class provides a line item that you can add to a QGraphicsScene.
The QGraphicsObject class provides a base class for all graphics items that require signals,...
QGraphicsPixmapItem::ShapeMode shapeMode
Qt::TransformationMode transformationMode
The QGraphicsPixmapItem class provides a pixmap item that you can add to a QGraphicsScene.
The QGraphicsPolygonItem class provides a polygon item that you can add to a QGraphicsScene.
The QGraphicsRectItem class provides a rectangle item that you can add to a QGraphicsScene.
The QGraphicsRotation class provides a rotation transformation around a given axis.
The QGraphicsScale class provides a scale transformation.
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...
The QGraphicsSceneEvent class provides a base class for all graphics view related events.
The QGraphicsSceneHelpEvent class provides events when a tooltip is requested.
The QGraphicsSceneHoverEvent class provides hover events in the graphics view framework.
The QGraphicsSceneMouseEvent class provides mouse events in the graphics view framework.
The QGraphicsSceneMoveEvent class provides events for widget moving in the graphics view framework.
The QGraphicsSceneResizeEvent class provides events for widget resizing in the graphics view framewor...
The QGraphicsSceneWheelEvent class provides wheel events in the graphics view framework.
The QGraphicsScene class provides a surface for managing a large number of 2D graphical items.
void updateBoundingRect()
The QGraphicsSimpleTextItem class provides a simple text item that you can add to a QGraphicsScene.
void _q_updateBoundingRect(const QSizeF &)
void _q_ensureVisible(QRectF)
QPointF controlOffset() const
QGraphicsTextItemPrivate()
bool _q_mouseOnEdge(QGraphicsSceneMouseEvent *)
QWidgetTextControl * control
QWidgetTextControl * textControl() const
void sendControlEvent(QEvent *e)
The QGraphicsTextItem class provides a text item that you can add to a QGraphicsScene to display form...
The QGraphicsView class provides a widget for displaying the contents of a QGraphicsScene.
\inmodule QtCore\reentrant
The QPolygonF class provides a list of points using floating point precision.
QT_REQUIRE_CONFIG(animation)
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)
static void formatGraphicsItemHelper(QDebug debug, const QGraphicsItem *item)
bool _qt_movableAncestorIsSelected(const QGraphicsItem *item)
static QRectF setupTextLayout(QTextLayout *layout)
QDebug operator<<(QDebug debug, const QGraphicsObject *item)
static QPainterPath qt_graphicsItem_shapeFromPath(const QPainterPath &path, const QPen &pen)
QDebug operator<<(QDebug debug, const QGraphicsItem *item)
static bool qt_QGraphicsItem_isObscured(const QGraphicsItem *item, const QGraphicsItem *other, const QRectF &rect)
bool qt_closestItemLast(const QGraphicsItem *item1, const QGraphicsItem *item2)
Returns true if item2 is on top of item1.
bool qt_closestLeaf(const QGraphicsItem *item1, const QGraphicsItem *item2)
bool qt_notclosestLeaf(const QGraphicsItem *item1, const QGraphicsItem *item2)
bool qt_closestItemFirst(const QGraphicsItem *item1, const QGraphicsItem *item2)
Returns true if item1 is on top of item2.
QT_REQUIRE_CONFIG(graphicsview)
static QRectF adjustedItemBoundingRect(const QGraphicsItem *item)
static QRectF adjustedItemEffectiveBoundingRect(const QGraphicsItem *item)
static void _q_adjustRect(QRectF *rect)
QDebug operator<<(QDebug debug, QIODevice::OpenMode modes)
Q_DECLARE_TYPEINFO(QObjectPrivate::ConnectionList, Q_RELOCATABLE_TYPE)
const QTransform * transformPtr
const QTransform * effectTransform
quint32 wasDirtySceneTransform
QStyleOptionGraphicsItem * option
const QTransform * viewTransform