blob: 59fdd8cecb5fa612a42dad719ec901911d806072 [file] [log] [blame]
Yingdi Yuf4aaa8b2014-03-10 11:24:31 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2/*
3 * Copyright (c) 2013, Regents of the University of California
4 * Yingdi Yu
5 *
6 * BSD license, See the LICENSE file for more information
7 *
8 * Author: Yingdi Yu <yingdi@cs.ucla.edu>
9 */
10
11#ifndef TRUST_TREE_SCENE_H
12#define TRUST_TREE_SCENE_H
13
14
15
16#include <QtGui/QGraphicsScene>
17#include <QColor>
18#include <QMap>
19
20#ifndef Q_MOC_RUN
21#include <vector>
22#include "trust-tree-node.h"
23#include "tree-layout.h"
24#endif
25
26class QGraphicsTextItem;
27
28class TrustTreeScene : public QGraphicsScene
29{
30 Q_OBJECT
31
32public:
33 TrustTreeScene(QWidget *parent = 0);
34
35 void plotTrustTree(TrustTreeNodeList& nodeList);
36
37private:
38 void plotEdge(const TrustTreeNodeList& nodeList, int nodeSize);
39 void plotNode(const TrustTreeNodeList& nodeList, int nodeSize);
40};
41
42#endif // TRUST_TREE_SCENE_H