-
Notifications
You must be signed in to change notification settings - Fork 60
/
datamodel.h
48 lines (34 loc) · 1012 Bytes
/
datamodel.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
46
47
48
#pragma once
#include <QObject>
#include <QString>
#include <QTableView>
#include <QLineEdit>
#include <QStandardItemModel>
#include <QDir>
#include "inputfilemodel.h"
class DataModel : public QObject {
Q_OBJECT
private:
QTableView* tbvInputList;
QLineEdit* txtOutputDir;
QDir outputDir;
QVector<InputFileModel> files;
QStandardItemModel* inputFileModel;
int globalStatus;
QString targetFormat;
public:
DataModel(QTableView* tbvInputList, QLineEdit* txtOutputDir);
void appendInputFile(const QString& filePath);
void removeInputFile(int rowIndex);
void clearInputFile();
const QDir& getOutputDir() const;
void setOutputDir(const QString& value);
int getGlobalStatus() const;
void setGlobalStatus(int value);
QVector<InputFileModel>* getInputFiles();
const QString& getTargetFormat() const;
void setTargetFormat(const QString& value);
public slots:
void fileStatusChanged(int rowIndex);
};
extern DataModel* dataModel;