gitdiff.h 586 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef GITDIFF_H
  2. #define GITDIFF_H
  3. #include <QObject>
  4. #include <QHash>
  5. #include <QString>
  6. struct git_commit;
  7. class GitRepository;
  8. class GitDiff : public QObject
  9. {
  10. Q_OBJECT
  11. Q_PROPERTY(QStringList files READ files CONSTANT)
  12. public:
  13. GitDiff(git_commit* a, git_commit* b, GitRepository* repository);
  14. ~GitDiff(){}
  15. void readBody(git_commit* a, git_commit* b);
  16. void reset();
  17. Q_INVOKABLE QString unified(const QString& file);
  18. QStringList files();
  19. private:
  20. QHash<QString, QString> m_diffList;
  21. GitRepository* m_repository;
  22. };
  23. #endif // GITDIFF_H