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
4#ifndef QQUICKWINDOWINSPECTOR_H
5#define QQUICKWINDOWINSPECTOR_H
6
7#include <QtCore/QObject>
8
9QT_BEGIN_NAMESPACE
10
11class QQmlDebugService;
12class QQuickWindow;
13class QQmlEngine;
14class QWindow;
15class QQuickItem;
16
17namespace QmlJSDebugger {
18
19class InspectTool;
20class GlobalInspector;
21
22/*
23 * The common code between QQuickView and QQuickView inspectors lives here,
24 */
25class QQuickWindowInspector : public QObject
26{
27 Q_OBJECT
28
29public:
30 explicit QQuickWindowInspector(QQuickWindow *quickWindow, QObject *parent = nullptr);
31
32 QQuickItem *overlay() const { return m_overlay; }
33 QQuickItem *topVisibleItemAt(const QPointF &pos) const;
34 QList<QQuickItem *> itemsAt(const QPointF &pos) const;
35
36 QQuickWindow *quickWindow() const;
37
38 void setParentWindow(QWindow *parentWindow);
39 void setShowAppOnTop(bool appOnTop);
40
41 bool isEnabled() const;
42 void setEnabled(bool enabled);
43
44protected:
45 bool eventFilter(QObject *, QEvent *) override;
46
47private:
48 QQuickItem *m_overlay;
49 QQuickWindow *m_window;
50 QWindow *m_parentWindow;
51 InspectTool *m_tool;
52};
53
54} // namespace QmlJSDebugger
55
56QT_END_NAMESPACE
57
58#endif // QQUICKWINDOWINSPECTOR_H
59

source code of qtdeclarative/src/plugins/qmltooling/qmldbg_inspector/qquickwindowinspector.h