Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/QtWidgets/qgraphicsproxywidget.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Copyright (C) 2016 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 
0004 #ifndef QGRAPHICSPROXYWIDGET_H
0005 #define QGRAPHICSPROXYWIDGET_H
0006 
0007 #include <QtWidgets/qtwidgetsglobal.h>
0008 #include <QtWidgets/qgraphicswidget.h>
0009 
0010 QT_REQUIRE_CONFIG(graphicsview);
0011 
0012 QT_BEGIN_NAMESPACE
0013 
0014 class QGraphicsProxyWidgetPrivate;
0015 
0016 class Q_WIDGETS_EXPORT QGraphicsProxyWidget : public QGraphicsWidget
0017 {
0018     Q_OBJECT
0019 public:
0020     QGraphicsProxyWidget(QGraphicsItem *parent = nullptr, Qt::WindowFlags wFlags = Qt::WindowFlags());
0021     ~QGraphicsProxyWidget();
0022 
0023     void setWidget(QWidget *widget);
0024     QWidget *widget() const;
0025 
0026     QRectF subWidgetRect(const QWidget *widget) const;
0027 
0028     void setGeometry(const QRectF &rect) override;
0029 
0030     void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
0031 
0032     enum {
0033         Type = 12
0034     };
0035     int type() const override;
0036 
0037     QGraphicsProxyWidget *createProxyForChildWidget(QWidget *child);
0038 
0039 protected:
0040     QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
0041 
0042     bool event(QEvent *event) override;
0043     bool eventFilter(QObject *object, QEvent *event) override;
0044 
0045     void showEvent(QShowEvent *event) override;
0046     void hideEvent(QHideEvent *event) override;
0047 
0048 #ifndef QT_NO_CONTEXTMENU
0049     void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) override;
0050 #endif
0051 
0052 #if QT_CONFIG(draganddrop)
0053     void dragEnterEvent(QGraphicsSceneDragDropEvent *event) override;
0054     void dragLeaveEvent(QGraphicsSceneDragDropEvent *event) override;
0055     void dragMoveEvent(QGraphicsSceneDragDropEvent *event) override;
0056     void dropEvent(QGraphicsSceneDragDropEvent *event) override;
0057 #endif
0058 
0059     void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
0060     void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
0061     void hoverMoveEvent(QGraphicsSceneHoverEvent *event) override;
0062     void grabMouseEvent(QEvent *event) override;
0063     void ungrabMouseEvent(QEvent *event) override;
0064 
0065     void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
0066     void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
0067     void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
0068     void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
0069 #if QT_CONFIG(wheelevent)
0070     void wheelEvent(QGraphicsSceneWheelEvent *event) override;
0071 #endif
0072 
0073     void keyPressEvent(QKeyEvent *event) override;
0074     void keyReleaseEvent(QKeyEvent *event) override;
0075 
0076     void focusInEvent(QFocusEvent *event) override;
0077     void focusOutEvent(QFocusEvent *event) override;
0078     bool focusNextPrevChild(bool next) override;
0079 
0080     QVariant inputMethodQuery(Qt::InputMethodQuery query) const override;
0081     void inputMethodEvent(QInputMethodEvent *event) override;
0082 
0083     QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const override;
0084     void resizeEvent(QGraphicsSceneResizeEvent *event) override;
0085 
0086 protected Q_SLOTS:
0087     QGraphicsProxyWidget *newProxyWidget(const QWidget *);
0088 
0089 private:
0090     Q_DISABLE_COPY(QGraphicsProxyWidget)
0091     Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QGraphicsProxyWidget)
0092     Q_PRIVATE_SLOT(d_func(), void _q_removeWidgetSlot())
0093 
0094     friend class QWidget;
0095     friend class QWidgetPrivate;
0096     friend class QGraphicsItem;
0097 };
0098 
0099 QT_END_NAMESPACE
0100 
0101 #endif