commitmodel.h 551 B

1234567891011121314151617181920212223242526272829
  1. #ifndef COMMITMODEL_H
  2. #define COMMITMODEL_H
  3. #include <universallistmodel.h>
  4. #include <gitcommit.h>
  5. //GitBranch;
  6. class CommitGraph;
  7. class CommitModel : public UniversalListModel<GitCommit>
  8. {
  9. Q_OBJECT
  10. Q_PROPERTY(QString head READ head CONSTANT)
  11. public:
  12. CommitModel(const QString& head, QObject* parent = 0);
  13. static CommitModel* fromBranch(GitBranch* branch);
  14. static CommitModel* fromGraph(CommitGraph* graph);
  15. QString head() const
  16. {
  17. return m_head;
  18. }
  19. private:
  20. QString m_head;
  21. };
  22. #endif // COMMITMODEL_H