-
Notifications
You must be signed in to change notification settings - Fork 0
/
dbManager.h
74 lines (63 loc) · 1.86 KB
/
dbManager.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#ifndef DBMANAGER_H
#define DBMANAGER_H
#include <QObject>
#include <QSqlDatabase>
#include <QDebug>
#include <QDir>
#include "dialogProgress.h"
#include "tool.h"
#include "toollist.h"
#include "mfile.h"
class DBManager : public QObject
{
Q_OBJECT
private:
QSqlDatabase m_db;
QString string_WerkzeugDB;
QString string_MainDB;
QString string_Log;
QStringList stringList_Rustplane;
QStringList stringList_Split;
DialogProgress* dialogProgress;
QString string_Project;
QString string_WiederholFertigung;
ToolList* toolList;
ToolList* searchList;
QTimer* timer;
bool openMainDB();
bool openWerkzeugDB();
int counter;
MFile* mfile;
bool parse_Rustplan(QString string_FileName);
public:
explicit DBManager(QObject *parent = nullptr);
~DBManager();
QString addProject(QMap<QString,QString>);
void clearDB();
QString getGesamtLaenge(QString);
QString getAusspannLaenge(QString toolID);
QString getFreistellLaenge(QString toolID);
QString getHolder(QString toolID);
QString getDescription(QString toolID);
int getCounter(QString toolID);
void getTop100(ToolList*);
int getWiederholFertigung(QString);
QString insertRuestplan(QString, QString);
QString insertRuestplan(QString);
void insertTool(Tool*, QString, QString);
QString insertTool (Tool*);
QString insertHolder(QString);
void insertProject(QString, ToolList*, QMap<QString,QString>);
void insertProject(QString, ToolList*);
void open();
void restore();
void set_DialogProgress(DialogProgress* dp) {dialogProgress = dp;}
QStringList getToolData(QString);
QMap<QString, QString> getProjectData(QString, QString);
signals:
void sig_Log(QString);
void sig_Err(QString);
public slots:
void slot_InsertRPL();
};
#endif // DBMANAGER_H