Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qgraphicsproxywidget_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QGRAPHICSPROXYWIDGET_P_H
6#define QGRAPHICSPROXYWIDGET_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists for the convenience
13// of other Qt classes. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtWidgets/private/qtwidgetsglobal_p.h>
21#include "private/qgraphicswidget_p.h"
22
23#include <QtCore/qpointer.h>
24
26
28
29class Q_AUTOTEST_EXPORT QGraphicsProxyWidgetPrivate : public QGraphicsWidgetPrivate
30{
31 Q_DECLARE_PUBLIC(QGraphicsProxyWidget)
32public:
33 QGraphicsProxyWidgetPrivate();
34 ~QGraphicsProxyWidgetPrivate();
35
36 void init();
37 void sendWidgetMouseEvent(QGraphicsSceneMouseEvent *event);
38 void sendWidgetMouseEvent(QGraphicsSceneHoverEvent *event);
39 void sendWidgetKeyEvent(QKeyEvent *event);
40 void setWidget_helper(QWidget *widget, bool autoShow);
41
42 QWidget *findFocusChild(QWidget *child, bool next) const;
43 void removeSubFocusHelper(QWidget *widget, Qt::FocusReason reason);
44
45 void _q_removeWidgetSlot();
46
47 void embedSubWindow(QWidget *);
48 void unembedSubWindow(QWidget *);
49
50 bool isProxyWidget() const override;
51
52 QPointer<QWidget> widget;
53 QPointer<QWidget> lastWidgetUnderMouse;
54 QPointer<QWidget> embeddedMouseGrabber;
55 QWidget *dragDropWidget;
56 Qt::DropAction lastDropAction;
57
58 void updateWidgetGeometryFromProxy();
59 void updateProxyGeometryFromWidget();
60
61 void updateProxyInputMethodAcceptanceFromWidget();
62
63 QPointF mapToReceiver(const QPointF &pos, const QWidget *receiver) const;
64
65 enum ChangeMode {
66 NoMode,
67 ProxyToWidgetMode,
68 WidgetToProxyMode
69 };
70 quint32 posChangeMode : 2;
71 quint32 sizeChangeMode : 2;
72 quint32 visibleChangeMode : 2;
73 quint32 enabledChangeMode : 2;
74 quint32 styleChangeMode : 2;
75 quint32 paletteChangeMode : 2;
76 quint32 tooltipChangeMode : 2;
77 quint32 focusFromWidgetToProxy : 1;
78 quint32 proxyIsGivingFocus : 1;
79};
80
81QT_END_NAMESPACE
82
83#endif
QT_REQUIRE_CONFIG(animation)
QT_REQUIRE_CONFIG(graphicsview)