redmineitemtreedata.h 719 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef REDMINEITEMTREEDATA_H
  2. #define REDMINEITEMTREEDATA_H
  3. #include <QHash>
  4. #include <QList>
  5. #include <QJsonObject>
  6. class RedmineItemTreeData
  7. {
  8. private:
  9. QList<QJsonObject> list;
  10. QHash<int, QJsonObject> id2item;
  11. public:
  12. RedmineItemTreeData();
  13. QList<QJsonObject> get();
  14. QJsonObject get ( int item_id );
  15. QList<QJsonObject> getchildren ( int item_id );
  16. void clear();
  17. void add ( QJsonObject jsonObj );
  18. QHash<int, bool> isToBeUpdated;
  19. QHash<int, int> parent;
  20. // TODO: hierarchy should me moved to private
  21. QHash<int, QList<QJsonObject>> hierarchy;
  22. RedmineItemTreeData &operator= ( const RedmineItemTreeData & );
  23. };
  24. #endif // REDMINEITEMTREEDATA_H