knowledgegraphwidgetitem.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #ifndef KNOWLEDGEGRAPHWIDGETITEM_H
  2. #define KNOWLEDGEGRAPHWIDGETITEM_H
  3. #include <QColor>
  4. #include <QObject>
  5. #include <QRect>
  6. class KnowledgeGraphWidgetItem : public QObject {
  7. Q_OBJECT
  8. public:
  9. explicit KnowledgeGraphWidgetItem(QObject* parent = nullptr);
  10. int id() const;
  11. void setId(int id);
  12. QString name() const;
  13. void setName(const QString& name);
  14. QString value() const;
  15. void setValue(const QString& value);
  16. KnowledgeGraphWidgetItem* parentItem() const;
  17. void setParentItem(KnowledgeGraphWidgetItem* parentItem);
  18. QRect rect;
  19. QPoint center;
  20. int childsNum() const;
  21. void setChildsNum(int childsNum);
  22. QColor color() const;
  23. void setColor(const QColor& color);
  24. QColor childColor() const;
  25. void setChildColor(const QColor& childColor);
  26. int index() const;
  27. void setIndex(int index);
  28. int startAngle() const;
  29. void setStartAngle(int startAngle);
  30. bool hasCheck() const;
  31. void setHasCheck(bool hasCheck);
  32. signals:
  33. private:
  34. int m_id;
  35. QString m_name;
  36. QString m_value;
  37. int m_childsNum;
  38. QColor m_color;
  39. QColor m_childColor;
  40. KnowledgeGraphWidgetItem* m_parentItem;
  41. int m_index;
  42. int m_startAngle;
  43. bool m_hasCheck;
  44. };
  45. #endif // KNOWLEDGEGRAPHWIDGETITEM_H