1// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#ifndef REPORTPANE_H
6#define REPORTPANE_H
7
8#include <QWidget>
9
10class QTableWidget;
11class CodePorting;
12class ReportPane : public QWidget
13{
14 Q_OBJECT
15public:
16 explicit ReportPane(CodePorting *codePorting, QWidget *parent = nullptr);
17 void refreshDispaly();
18
19signals:
20 void selectedChanged(const QString &filePath, const QString &suggestion, int startLine, int endLiness);
21
22public slots:
23 void srcCellSelected(int row, int col);
24 void libCellSelected(int row, int col);
25
26private:
27 void initTableWidget();
28 void setTableWidgetStyle(QTableWidget *srcTableWidget, const QStringList &colNames);
29 void refreshTableView(QTableWidget *widget, const QList<QStringList> &report);
30
31 QTableWidget *srcTableWidget {nullptr};
32 QTableWidget *libTableWidget {nullptr};
33 CodePorting *codePorting {nullptr};
34};
35
36#endif // REPORTPANE_H
37