1 | #pragma once |
---|---|
2 | |
3 | #include <QFrame> |
4 | |
5 | namespace DiffHelper |
6 | { |
7 | struct DiffChange; |
8 | } |
9 | |
10 | class LineNumberArea; |
11 | class FileDiffView; |
12 | |
13 | class PrChangeListItem : public QFrame |
14 | { |
15 | Q_OBJECT |
16 | |
17 | signals: |
18 | void gotoReview(int linkId); |
19 | void addCodeReview(int line, const QString &path, const QString &body); |
20 | |
21 | public: |
22 | explicit PrChangeListItem(DiffHelper::DiffChange change, QWidget *parent = nullptr); |
23 | |
24 | void setBookmarks(const QMap<int, int> &bookmarks); |
25 | int getStartingLine() const { return mNewFileStartingLine; } |
26 | int getEndingLine() const { return mNewFileEndingLine; } |
27 | QString getFileName() const { return mNewFileName; } |
28 | |
29 | private: |
30 | int mNewFileStartingLine = 0; |
31 | int mNewFileEndingLine = 0; |
32 | QString mOldFileName; |
33 | QString mNewFileName; |
34 | FileDiffView *mNewFileDiff = nullptr; |
35 | LineNumberArea *mNewNumberArea = nullptr; |
36 | |
37 | void openReviewDialog(int line); |
38 | }; |
39 |