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