mindmapobject.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. #ifndef MINDMAPOBJECT_H
  2. #define MINDMAPOBJECT_H
  3. #include "api/color/colortable.h"
  4. #include <QColor>
  5. #include <QObject>
  6. #include <QPixmap>
  7. #include <QRect>
  8. #include <QSet>
  9. #include <QtDebug>
  10. const int SET_BOLD = 0;
  11. const int SET_ITALICS = 1;
  12. const int SET_UNDERLINE = 2;
  13. const int SET_OVERLINE = 3;
  14. const int SET_STRIKEOUT = 4;
  15. const int SET_FONT_BACKCOLOR = 5;
  16. const int SET_FONT_COLOR = 6;
  17. class MindMapObject : public QObject
  18. {
  19. Q_OBJECT
  20. public:
  21. explicit MindMapObject(QObject *parent = nullptr);
  22. void setPid(int pid);
  23. int id();
  24. int pid();
  25. void setId(int id);
  26. void setName(QString name);
  27. QString name();
  28. QRect rect;
  29. QRect addRect;
  30. int childNum;
  31. void setParentObj(MindMapObject *parentObj);
  32. MindMapObject *parentObj();
  33. QColor lineColor();
  34. QColor rootColor();
  35. void setRemark(QString remark);
  36. QString remark();
  37. QRect remarkRect;
  38. void setLink(QString link);
  39. QString link();
  40. QSet<int> markNodes;
  41. void setFontColor(int fontColor);
  42. int fontColor();
  43. void setBackColor(int backColor);
  44. int backColor();
  45. ~MindMapObject();
  46. void setSxh(int sxh);
  47. int sxh();
  48. void setShowNum(int showNum);
  49. bool showNum();
  50. void setBold(bool bold);
  51. bool bold();
  52. void setItalics(bool italics);
  53. bool italics();
  54. void setOverline(bool overline);
  55. bool overline();
  56. void setUnderline(bool underline);
  57. bool underline();
  58. void setStrikeOut(bool strikeOut);
  59. bool strikOut();
  60. void setMessage(QString msg);
  61. QString message();
  62. bool value(int setType);
  63. void setValue(int setType, bool value);
  64. MindMapObject *newObj();
  65. MindMapObject *srcObj();
  66. void setHasImg(bool hasImg);
  67. bool hasImg();
  68. void setImg(QPixmap &img);
  69. QPixmap & img();
  70. QRect imgRect;
  71. bool shrink() const;
  72. void setShrink(bool shrink);
  73. private:
  74. int m_pid;
  75. int m_id;
  76. QString m_name;
  77. MindMapObject *m_parentObj;
  78. QColor m_lineColor;
  79. QColor m_rootColor;
  80. QString m_remark;
  81. QString m_link;
  82. int m_fontColor;
  83. int m_backColor;
  84. int m_sxh;
  85. bool m_showNum;
  86. bool m_bold;
  87. bool m_italics;
  88. bool m_overline;
  89. bool m_underline;
  90. bool m_strikeOut;
  91. QString m_message;
  92. MindMapObject *m_newObj;
  93. MindMapObject *m_srcObj;
  94. bool m_hasImg;
  95. QPixmap m_img;
  96. bool m_shrink;
  97. signals:
  98. public slots:
  99. };
  100. #endif // MINDMAPOBJECT_H