1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
---|---|
2 | // |
3 | // SPDX-License-Identifier: GPL-3.0-or-later |
4 | |
5 | #ifndef HISTORYVIEW_H |
6 | #define HISTORYVIEW_H |
7 | |
8 | #include "basetype.h" |
9 | |
10 | #include <QTableView> |
11 | class QStandardItem; |
12 | class HistoryViewPrivate; |
13 | class HistoryView : public QTableView |
14 | { |
15 | Q_OBJECT |
16 | HistoryViewPrivate *const d; |
17 | |
18 | public: |
19 | explicit HistoryView(QWidget *parent = nullptr); |
20 | HistoryData topData() const; |
21 | void setDatas(const HistoryDatas &datas); |
22 | void insertTopDatas(const HistoryDatas &datas); |
23 | void addData(const HistoryData &one); |
24 | QString description(int row) const; |
25 | RevisionFiles revisionFiles(int row) const; |
26 | HistoryData data(int row) const; |
27 | |
28 | private: |
29 | QList<QStandardItem*> createRow(const HistoryData &data) const; |
30 | HistoryData createData(int row) const; |
31 | }; |
32 | |
33 | #endif // HISTORYVIEW_H |
34 |