Yingdi Yu | f4aaa8b | 2014-03-10 11:24:31 -0700 | [diff] [blame] | 1 | /* -*- 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 | |
Yingdi Yu | f4aaa8b | 2014-03-10 11:24:31 -0700 | [diff] [blame] | 14 | #include <QtGui/QGraphicsScene> |
| 15 | #include <QColor> |
| 16 | #include <QMap> |
| 17 | |
| 18 | #ifndef Q_MOC_RUN |
| 19 | #include <vector> |
| 20 | #include "trust-tree-node.h" |
| 21 | #include "tree-layout.h" |
| 22 | #endif |
| 23 | |
| 24 | class QGraphicsTextItem; |
| 25 | |
| 26 | class TrustTreeScene : public QGraphicsScene |
| 27 | { |
| 28 | Q_OBJECT |
| 29 | |
| 30 | public: |
| 31 | TrustTreeScene(QWidget *parent = 0); |
| 32 | |
| 33 | void plotTrustTree(TrustTreeNodeList& nodeList); |
| 34 | |
| 35 | private: |
| 36 | void plotEdge(const TrustTreeNodeList& nodeList, int nodeSize); |
| 37 | void plotNode(const TrustTreeNodeList& nodeList, int nodeSize); |
| 38 | }; |
| 39 | |
| 40 | #endif // TRUST_TREE_SCENE_H |