summaryrefslogtreecommitdiffstats
path: root/tools/qmldebugger/canvasscene.h
blob: d9802419f516e60d9432ab32e8e314f7a971fbdc (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
#ifndef CANVASSCENE_H
#define CANVASSCENE_H

#include <QWidget>
#include <QTreeWidget>
#include <QtDeclarative/qsimplecanvas.h>
#include <QtDeclarative/qsimplecanvasitem.h>

class QmlDebugClient;
class CanvasSceneClient;
class QmlDebugClientPlugin;
class CanvasScene : public QWidget
{
Q_OBJECT
public:
    CanvasScene(QmlDebugClient *, QWidget *parent = 0);

    void message(QDataStream &);
private slots:
    void refresh();
    void itemClicked(QTreeWidgetItem *);
    void itemExpanded(QTreeWidgetItem *);
    void itemCollapsed(QTreeWidgetItem *);
    void setX(int);
    void setY(int);

private:
    void setOpacityRecur(QTreeWidgetItem *, qreal);
    void clone(QTreeWidgetItem *item, QSimpleCanvasItem *me, QDataStream &);
    QmlDebugClientPlugin *client;

    QTreeWidget *m_tree;
    QSimpleCanvas *m_canvas;
    QSimpleCanvasItem *m_canvasRoot;
    QTreeWidgetItem *m_selected;
};

#endif // CANVASSCENE_H