colorhandler.h 455 B

12345678910111213141516171819202122232425262728
  1. #ifndef COLORHANDLER_H
  2. #define COLORHANDLER_H
  3. #include <QString>
  4. #include <QMap>
  5. #include <gitoid.h>
  6. class ColorHandler
  7. {
  8. public:
  9. static ColorHandler& instance() {
  10. static ColorHandler _instance;
  11. return _instance;
  12. }
  13. void updateColors(GitRepository* repo);
  14. QString color(const GitOid& oid);
  15. private:
  16. ColorHandler();
  17. Q_DISABLE_COPY(ColorHandler)
  18. QMap<GitOid, QString> m_colors;
  19. };
  20. #endif // COLORHANDLER_H