-
Notifications
You must be signed in to change notification settings - Fork 2
/
multiimporthelper.h
39 lines (30 loc) · 1001 Bytes
/
multiimporthelper.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
#ifndef IKOOSKAR_BLL_MULTIIMPORTHELPER_H
#define IKOOSKAR_BLL_MULTIIMPORTHELPER_H
#include "DAL/MultiImport/multiimport.h"
#include "Shared/student.h"
#include <QList>
#include <QObject>
#include <QRunnable>
namespace ikoOSKAR {
namespace BLL {
using namespace Shared;
class MultiImportHelper : public QObject, public QRunnable {
Q_OBJECT
private:
ikoOSKAR::DAL::MultiImport* dal;
QString xlsFilePath;
QList<Student*>* parseXls();
bool matchesHeaderRow(const QStringList& line);
bool matchesSectionFooter(const QStringList& line);
bool matchesFileFooter(const QList<QStringList>& lines);
public:
MultiImportHelper(const QString& xlsFilePath);
void run() override;
~MultiImportHelper();
signals:
void parsingFinished(QList<Student*>* result);
void error(const QString& errorMessage);
};
} // namespace BLL
} // namespace ikoOSKAR
#endif // IKOOSKAR_BLL_MULTIIMPORTHELPER_H