summaryrefslogtreecommitdiffstats
path: root/tools/qmldebugger/engine.h
blob: 52f0608f819ef930ba8fb4c192cdc4252f22ccbf (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
59
60
61
#ifndef ENGINE_H
#define ENGINE_H

#include <QWidget>
#include <QtDeclarative/qmlengine.h>
#include <QtDeclarative/qmlcontext.h>
#include <QtDeclarative/qfxview.h>
#include <QtDeclarative/qmldebug.h>

QT_BEGIN_NAMESPACE

class QmlDebugConnection;
class EngineClientPlugin;
class QLineEdit;
class QTreeWidget;
class QTreeWidgetItem;
class QTableWidget;
class EnginePane : public QWidget
{
Q_OBJECT
public:
    EnginePane(QmlDebugConnection *, QWidget *parent = 0);

private slots:
    void queryEngines();
    void enginesChanged();

    void queryContext(int);
    void contextChanged();

    void fetchClicked();
    void fetchObject(int);
    void objectFetched();

    void engineSelected(int);

    void itemClicked(QTreeWidgetItem *);
    void showProperties();

private:
    void dump(const QmlDebugContextReference &, int);
    void dump(const QmlDebugObjectReference &, int);
    void buildTree(const QmlDebugObjectReference &, QTreeWidgetItem *parent);

    QmlEngineDebug m_client;
    QmlDebugEnginesQuery *m_engines;
    QmlDebugRootContextQuery *m_context;
    QmlDebugObjectQuery *m_object;

    QLineEdit *m_text;
    QTreeWidget *m_objTree;
    QTableWidget *m_propTable;

    QFxView *m_engineView;
    QList<QObject *> m_engineItems;
};

QT_END_NAMESPACE

#endif // ENGINE_H