summaryrefslogtreecommitdiffstats
path: root/tools/qmldebugger/propertyview.h
blob: 6b69bdfd364629d8dd0c059b6f5bfb3d5a81680c (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
#ifndef PROPERTYVIEW_H
#define PROPERTYVIEW_H

#include <QtGui/qwidget.h>
#include <QtCore/qpointer.h>
#include <QtDeclarative/qmldebug.h>

QT_BEGIN_NAMESPACE

class QTreeWidget;
class QTreeWidgetItem;

class PropertyView : public QWidget
{
    Q_OBJECT
public:
    PropertyView(QWidget *parent = 0);

    void setObject(const QmlDebugObjectReference &object);
    const QmlDebugObjectReference &object() const;

    void updateProperty(const QString &name, const QVariant &value);
    void setPropertyIsWatched(const QString &name, bool watched);

    void clear();

signals:
    void propertyActivated(const QmlDebugPropertyReference &property);

private slots:
    void itemActivated(QTreeWidgetItem *);

private:
    QmlDebugObjectReference m_object;
    QTreeWidget *m_tree;
};

QT_END_NAMESPACE

#endif // PROPERTYVIEW_H