-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
45 lines (35 loc) · 1.16 KB
/
mainwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <iostream>
#include <vector>
#include <map>
using std::vector;
using std::map;
namespace Ui {
class MainWindow;
}
struct Student{
QString id;
QString name;
};
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow();
private slots:
void on_freshButton_clicked();
void on_studentButton_clicked();
void on_importButton_clicked();
private:
Ui::MainWindow *ui;
map<QString, QString> loadCSVFile(QString fileName);
vector<Student> loadCSVFileVector(QString fileName);
Student splitCSVLine(QString lineStr);
vector<Student> calculate(vector<Student>freshData, map<QString, QString>studentData, vector<Student> &collideFresh, vector<Student> &collideStudent, vector<Student> &repeat);
vector<Student> newStudent(vector<Student>freshData, map<QString, QString>studentData, vector<Student> collideFresh, vector<Student> collideStudent, vector<Student> repeat);
void importToCSV(QString fileName, vector<Student> import);
};
#endif // MAINWINDOW_H