63 lines
1.3 KiB
C++
63 lines
1.3 KiB
C++
#ifndef EVALUATIONTOOL_H
|
|
#define EVALUATIONTOOL_H
|
|
|
|
#include <Python.h>
|
|
#include <QWidget>
|
|
#include <QStandardItem>
|
|
#include <QStandardItemModel>
|
|
#include <QList>
|
|
#include <QString>
|
|
#include <vector>
|
|
#include "businessObjects/pythoncaller.h"
|
|
#include "businessObjects/tracecalculatedmetrics.h"
|
|
|
|
namespace Ui {
|
|
class EvaluationTool;
|
|
}
|
|
|
|
class EvaluationTool : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit EvaluationTool(QWidget *parent = 0);
|
|
~EvaluationTool();
|
|
|
|
void showForFiles(QList<QString> paths);
|
|
void showAndRunTests(QList<QString> paths);
|
|
void showAndEvaluateMetrics(QList<QString> paths);
|
|
|
|
|
|
private Q_SLOTS:
|
|
void on_btn_test_clicked();
|
|
void setTestMessage(QString message);
|
|
void on_btn_calculateMetrics_clicked();
|
|
|
|
void on_btn_exportCSV_clicked();
|
|
|
|
private:
|
|
void fillFileList(QList<QString> paths);
|
|
void runTests();
|
|
void calculateMetrics();
|
|
void cleanUpUI();
|
|
|
|
|
|
Ui::EvaluationTool *ui;
|
|
QStandardItemModel *traceFilesModel;
|
|
std::vector<TraceCalculatedMetrics> calculatedMetrics;
|
|
QString resourcesRelPath;
|
|
|
|
class TraceFileItem : public QStandardItem
|
|
{
|
|
public:
|
|
TraceFileItem(const QString& path);
|
|
QString getPath(){return path;}
|
|
|
|
private:
|
|
QString path;
|
|
};
|
|
|
|
};
|
|
|
|
#endif // EVALUATIONTOOL_H
|