blob: 90be20e2645d109e2efaf1d8c8f21ffc096dc12b [file] [log] [blame]
Yingdi Yu0b0a7362014-08-05 16:31:30 -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 CHRONOS_TRUST_TREE_SCENE_HPP
12#define CHRONOS_TRUST_TREE_SCENE_HPP
13
14#include <QtGui/QGraphicsScene>
15#include <QColor>
16#include <QMap>
17
18#ifndef Q_MOC_RUN
19#include "trust-tree-node.hpp"
20#include "tree-layout.hpp"
21#endif
22
23class QGraphicsTextItem;
24
25namespace chronos {
26
27class TrustTreeScene : public QGraphicsScene
28{
29 Q_OBJECT
30
31public:
32 TrustTreeScene(QWidget* parent = 0);
33
34 void
35 plotTrustTree(chronos::TrustTreeNodeList& nodeList);
36
37private:
38 void
39 plotEdge(const chronos::TrustTreeNodeList& nodeList, int nodeSize);
40
41 void
42 plotNode(const chronos::TrustTreeNodeList& nodeList, int nodeSize);
43};
44
45} // namespace chronos
46
47#endif // CHRONOS_TRUST_TREE_SCENE_HPP