CMindView.h 512 B

12345678910111213141516171819202122232425
  1. #ifndef CMINDVIEW_H
  2. #define CMINDVIEW_H
  3. #include <QGraphicsView>
  4. #include "CNode.h"
  5. class CMindView : public QGraphicsView
  6. {
  7. public:
  8. CMindView(QWidget *parent = nullptr);
  9. // 节点数据
  10. QList<CNodeData> nodeList() const;
  11. void setNodeList(QList<CNodeData> list);
  12. void addNode(CNodeData node);
  13. void removeNode(CNodeData data, bool removeChildren = true);
  14. void removeNode(int id, bool remoeChildren = true);
  15. private:
  16. QList<CNodeData> m_nodeList;
  17. };
  18. #endif // CMINDVIEW_H