Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
globalinspector.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 GLOBALINSPECTOR_H
5#define GLOBALINSPECTOR_H
6
8
9#include <QtCore/QObject>
10#include <QtCore/QPointer>
11#include <QtCore/QHash>
12#include <QtQuick/QQuickItem>
13
15
16namespace QmlJSDebugger {
17
18class SelectionHighlight;
19
21{
23public:
24 GlobalInspector(QObject *parent = nullptr) : QObject(parent), m_eventId(0) {}
26
27 void setSelectedItems(const QList<QQuickItem *> &items);
28 void showSelectedItemName(QQuickItem *item, const QPointF &point);
29
31 void setParentWindow(QQuickWindow *window, QWindow *parentWindow);
35
38
39private:
40 void sendResult(int requestId, bool success);
41 void sendCurrentObjects(const QList<QObject *> &objects);
42 void removeFromSelectedItems(QObject *object);
43 QString titleForItem(QQuickItem *item) const;
44 QString idStringForObject(QObject *obj) const;
45 bool createQmlObject(int requestId, const QString &qml, QObject *parent,
46 const QStringList &importList, const QString &filename);
47 bool destroyQmlObject(QObject *object, int requestId, int debugId);
48 bool syncSelectedItems(const QList<QQuickItem *> &items);
49
50 // Hash< object to be destroyed, QPair<destroy eventId, object debugId> >
51 QList<QQuickItem *> m_selectedItems;
52 QHash<QQuickItem *, SelectionHighlight *> m_highlightItems;
53 QList<QQuickWindowInspector *> m_windowInspectors;
54 int m_eventId;
55};
56
57} // QmlJSDebugger
58
60
61#endif // GLOBALINSPECTOR_H
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
\inmodule QtCore\reentrant
Definition qpoint.h:217
The QQmlEngine class provides an environment for instantiating QML components.
Definition qqmlengine.h:57
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtGui
Definition qwindow.h:63
void processMessage(const QByteArray &message)
void setParentWindow(QQuickWindow *window, QWindow *parentWindow)
void removeWindow(QQuickWindow *window)
GlobalInspector(QObject *parent=nullptr)
void messageToClient(const QString &name, const QByteArray &data)
void setQmlEngine(QQuickWindow *window, QQmlEngine *engine)
void showSelectedItemName(QQuickItem *item, const QPointF &point)
void setSelectedItems(const QList< QQuickItem * > &items)
void addWindow(QQuickWindow *window)
Combined button and popup list for selecting options.
QNearFieldTarget::RequestId requestId
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLuint GLsizei const GLchar * message
GLuint name
GLhandleARB obj
[2]
#define Q_OBJECT
#define Q_SIGNALS
QGraphicsItem * item
QList< QTreeWidgetItem * > items
aWidget window() -> setWindowTitle("New Window Title")
[2]
QJSEngine engine
[0]