blob: 3c0a5c64f97dd0120bb37c1d5fb06febfeefe9ca (
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
|
#ifndef OBJECTTREE_H
#define OBJECTTREE_H
#include <QtGui/qtreewidget.h>
QT_BEGIN_NAMESPACE
class QTreeWidgetItem;
class QmlEngineDebug;
class QmlDebugObjectReference;
class QmlDebugObjectQuery;
class QmlDebugContextReference;
class ObjectTree : public QTreeWidget
{
Q_OBJECT
public:
ObjectTree(QmlEngineDebug *client, QWidget *parent = 0);
signals:
void currentObjectChanged(const QmlDebugObjectReference &);
void expressionWatchRequested(const QmlDebugObjectReference &, const QString &);
public slots:
void reload(int objectDebugId);
void setCurrentObject(int debugId);
protected:
virtual void mousePressEvent(QMouseEvent *);
private slots:
void objectFetched();
void currentItemChanged(QTreeWidgetItem *);
private:
QTreeWidgetItem *findItemByObjectId(int debugId) const;
QTreeWidgetItem *findItem(QTreeWidgetItem *item, int debugId) const;
void dump(const QmlDebugContextReference &, int);
void dump(const QmlDebugObjectReference &, int);
void buildTree(const QmlDebugObjectReference &, QTreeWidgetItem *parent);
QmlEngineDebug *m_client;
QmlDebugObjectQuery *m_query;
};
QT_END_NAMESPACE
#endif
|