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
inspecttool.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
4#ifndef INSPECTTOOL_H
5#define INSPECTTOOL_H
6
7#include <QtCore/QPointF>
8#include <QtCore/QPointer>
9#include <QtCore/QTimer>
10
12
13class QQuickWindow;
14class QQuickItem;
15class QMouseEvent;
16class QKeyEvent;
17class QTouchEvent;
18class QEnterEvent;
19
20namespace QmlJSDebugger {
21
22class GlobalInspector;
24class HoverHighlight;
25
26class InspectTool : public QObject
27{
29public:
31
32 void enterEvent(QEnterEvent *);
33 void leaveEvent(QEvent *);
34 void mousePressEvent(QMouseEvent *);
35 void mouseMoveEvent(QMouseEvent *);
36 void mouseDoubleClickEvent(QMouseEvent *);
37 void hoverMoveEvent(QMouseEvent *);
38 void keyPressEvent(QKeyEvent *) {}
39 void keyReleaseEvent(QKeyEvent *);
40 void touchEvent(QTouchEvent *event);
41
42private:
43 void selectNextItem();
44 void selectItem();
45 void showItemName();
46
47 QQuickWindowInspector *inspector() const;
48 GlobalInspector *globalInspector() const;
49
50 bool m_tapEvent;
51 QPointer<QQuickItem> m_contentItem;
52 QPointF m_mousePosition;
53 ulong m_touchTimestamp;
54 QTimer m_nameDisplayTimer;
55
56 HoverHighlight *m_hoverHighlight;
57 QQuickItem *m_lastItem;
58 QQuickItem *m_lastClickedItem;
59};
60
61} // namespace QmlJSDebugger
62
63QT_END_NAMESPACE
64
65#endif // INSPECTTOOL_H
void processMessage(const QByteArray &message)
void setParentWindow(QQuickWindow *window, QWindow *parentWindow)
void removeWindow(QQuickWindow *window)
void setQmlEngine(QQuickWindow *window, QQmlEngine *engine)
void showSelectedItemName(QQuickItem *item, const QPointF &point)
void setSelectedItems(const QList< QQuickItem * > &items)
void addWindow(QQuickWindow *window)
QQuickItem * item()
Definition highlight.h:25
QTransform transform()
Definition highlight.h:28
void paint(QPainter *painter) override
This function, which is usually called by the QML Scene Graph, paints the contents of an item in loca...
Definition highlight.cpp:88
void hoverMoveEvent(QMouseEvent *)
void mouseDoubleClickEvent(QMouseEvent *)
void touchEvent(QTouchEvent *event)
void keyReleaseEvent(QKeyEvent *)
void mousePressEvent(QMouseEvent *)
void enterEvent(QEnterEvent *)
void mouseMoveEvent(QMouseEvent *)
void keyPressEvent(QKeyEvent *)
Definition inspecttool.h:38
QQuickItem * topVisibleItemAt(const QPointF &pos) const
QList< QQuickItem * > itemsAt(const QPointF &pos) const
bool eventFilter(QObject *, QEvent *) override
Filters events if this object has been installed as an event filter for the watched object.
void paint(QPainter *painter) override
This function, which is usually called by the QML Scene Graph, paints the contents of an item in loca...
void showName(const QPointF &displayPoint)
const char RESPONSE[]
const char SHOW_APP_ON_TOP[]
const char MOVE_OBJECT[]
const char SET_ANIMATION_SPEED[]
const char SELECT[]
const char DISABLE[]
const char ENABLE[]
const char REQUEST[]
const char CREATE_OBJECT[]
const char EVENT[]
const char DESTROY_OBJECT[]
static bool reparentQmlObject(QObject *object, QObject *newParent)