diff options
author | Bea Lam <bea.lam@nokia.com> | 2009-10-27 05:43:23 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2009-10-27 05:43:23 (GMT) |
commit | cc4bca61687f6441984ccc58ad177d24b6d3e92f (patch) | |
tree | c861eadc58164b58a92b6c4a2c67ef16ac7a412c /tools/qmldebugger/standalone/objecttree.h | |
parent | b5b6861dd1a82ea9be9b2d2f89ba5cc9dea150ac (diff) | |
download | Qt-cc4bca61687f6441984ccc58ad177d24b6d3e92f.zip Qt-cc4bca61687f6441984ccc58ad177d24b6d3e92f.tar.gz Qt-cc4bca61687f6441984ccc58ad177d24b6d3e92f.tar.bz2 |
Move qmldebugger/ into qmldebugger/standalone dir.
Diffstat (limited to 'tools/qmldebugger/standalone/objecttree.h')
-rw-r--r-- | tools/qmldebugger/standalone/objecttree.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/tools/qmldebugger/standalone/objecttree.h b/tools/qmldebugger/standalone/objecttree.h new file mode 100644 index 0000000..95820f3 --- /dev/null +++ b/tools/qmldebugger/standalone/objecttree.h @@ -0,0 +1,54 @@ +#ifndef OBJECTTREE_H +#define OBJECTTREE_H + +#include <QtGui/qtreewidget.h> + +QT_BEGIN_NAMESPACE + +class QTreeWidgetItem; + +class QmlEngineDebug; +class QmlDebugObjectReference; +class QmlDebugObjectQuery; +class QmlDebugContextReference; +class QmlDebugConnection; + + +class ObjectTree : public QTreeWidget +{ + Q_OBJECT +public: + ObjectTree(QmlEngineDebug *client = 0, QWidget *parent = 0); + + void setEngineDebug(QmlEngineDebug *client); + +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 |