8#include <private/qqmldebugserviceinterfaces_p.h>
9#include <private/qabstractanimation_p.h>
10#include <private/qqmlcomponent_p.h>
11#include <private/qqmldebugconnector_p.h>
12#include <private/qversionedpacket_p.h>
14#include <QtGui/qwindow.h>
15#if QT_CONFIG(regularexpression)
16# include <QtCore/qregularexpression.h>
49void GlobalInspector::removeFromSelectedItems(
QObject *
object)
53 delete m_highlightItems.take(
item);
59 if (!syncSelectedItems(
items))
67 sendCurrentObjects(objectList);
97 object->setParent(newParent);
100 if (newParentItem &&
item)
117 m_component.
setData(qml, filename);
130 if (!parentContext) {
183 i != m_windowInspectors.end();) {
184 if ((*i)->quickWindow() ==
window) {
186 i = m_windowInspectors.erase(
i);
196 if (inspector->quickWindow() ==
window)
197 inspector->setParentWindow(parentWindow);
203 bool selectionChanged =
false;
206 const auto selectedItemsCopy = m_selectedItems;
211 selectionChanged =
true;
212 item->disconnect(
this);
214 delete m_highlightItems.take(
item);
222 selectionChanged =
true;
225 for (QQuickWindowInspector *inspector :
std::as_const(m_windowInspectors)) {
226 if (inspector->isEnabled() && inspector->quickWindow() ==
item->
window()) {
227 m_highlightItems.insert(
item,
new SelectionHighlight(titleForItem(
item),
item,
228 inspector->overlay()));
234 return selectionChanged;
242#if QT_CONFIG(regularexpression)
251 if (!objectStringId.
isEmpty()) {
253 }
else if (!
item->objectName().isEmpty()) {
259 return constructedName;
268 return cdata->findObjectId(
obj);
288 inspector->setEnabled(
true);
289 success = !m_windowInspectors.isEmpty();
290 }
else if (command ==
DISABLE) {
293 inspector->setEnabled(
false);
294 success = !m_windowInspectors.isEmpty();
295 }
else if (command ==
SELECT) {
300 for (
int debugId : std::as_const(debugIds)) {
303 selectedObjects <<
obj;
305 syncSelectedItems(selectedObjects);
315 inspector->setShowAppOnTop(showOnTop);
316 success = !m_windowInspectors.isEmpty();
322 ds >> qml >> parentId >> imports >> filename;
342 int debugId, newParent;
343 ds >> debugId >> newParent;
347 qWarning() <<
"Warning: Not handling command:" << command;
358void GlobalInspector::sendResult(
int requestId,
bool success)
375#include "moc_globalinspector.cpp"
377#include <globalinspector.moc>
QGraphicsWidget * window() const
void setParentItem(QGraphicsItem *parent)
Sets this item's parent item to newParent.
qsizetype size() const noexcept
bool removeOne(const AT &t)
void reserve(qsizetype size)
void append(parameter_type t)
QObject * parent() const
Returns a pointer to the parent object.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
void destroyed(QObject *=nullptr)
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointe...
void deleteLater()
\threadsafe
const QByteArray & data() const
Returns a reference to the raw packet data.
\inmodule QtCore\reentrant
The QQmlComponent class encapsulates a QML component definition.
void setData(const QByteArray &, const QUrl &baseUrl)
Sets the QQmlComponent to use the given QML data.
virtual QObject * create(QQmlContext *context=nullptr)
Create an object instance from this component, within the specified context.
void statusChanged(QQmlComponent::Status)
Emitted whenever the component's status changes.
static QQmlRefPointer< QQmlContextData > get(QQmlContext *context)
The QQmlContext class defines a context within a QML engine.
QQmlEngine * engine() const
Return the context's QQmlEngine, or \nullptr if the context has no QQmlEngine or the QQmlEngine was d...
static QObject * objectForId(int id)
The QQmlEngine class provides an environment for instantiating QML components.
static QQmlContext * contextForObject(const QObject *)
Returns the QQmlContext for the object, or nullptr if no context has been set.
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
\inmodule QtCore \reentrant
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
void setSlowModeEnabled(bool enabled)
void setSlowdownFactor(qreal factor)
static QUnifiedTimer * instance()
static QUrl fromLocalFile(const QString &localfile)
Returns a QUrl representation of localFile, interpreted as a local file.
void processMessage(const QByteArray &message)
void setParentWindow(QQuickWindow *window, QWindow *parentWindow)
void removeWindow(QQuickWindow *window)
void messageToClient(const QString &name, const QByteArray &data)
void showSelectedItemName(QQuickItem *item, const QPointF &point)
void setSelectedItems(const QList< QQuickItem * > &items)
void addWindow(QQuickWindow *window)
void run(const QByteArray &qml, const QUrl &filename)
ObjectCreator(int requestId, QQmlEngine *engine, QObject *parent)
void result(int requestId, bool success)
void tryCreateObject(QQmlComponent::Status status)
void showName(const QPointF &displayPoint)
qDeleteAll(list.begin(), list.end())
const char SET_ANIMATION_SPEED[]
const char CREATE_OBJECT[]
const char SHOW_APP_ON_TOP[]
const char DESTROY_OBJECT[]
Combined button and popup list for selecting options.
static bool reparentQmlObject(QObject *object, QObject *newParent)
QNearFieldTarget::RequestId requestId
GLuint GLsizei const GLchar * message
QQmlContext * qmlContext(const QObject *obj)
QQuickItem * qobject_cast< QQuickItem * >(QObject *o)
QLatin1StringView QLatin1String
const char className[16]
[1]
\inmodule QtCore \reentrant
bool contains(const AT &t) const noexcept
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent