Mon, 06 Jun 2022 20:19:27 +0200
Code cleanup in database functions.
3 | 1 | #ifndef _DATABASE_H |
2 | #define _DATABASE_H | |
3 | ||
4 | #include <QSqlDatabase> | |
5 | #include <QDebug> | |
6 | #include <QSettings> | |
7 | ||
8 | ||
9 | class DataBase : public QObject | |
10 | { | |
11 | Q_OBJECT | |
12 | ||
13 | public: | |
14 | explicit DataBase(QObject *parent = 0); | |
15 | ~DataBase(); | |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
3
diff
changeset
|
16 | bool openDataBase(bool develop); |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
3
diff
changeset
|
17 | void closeDataBase(); |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
3
diff
changeset
|
18 | |
3 | 19 | private: |
20 | QSqlDatabase db; | |
21 | }; | |
22 | ||
23 | ||
24 | static DataBase *db; | |
25 | ||
26 | ||
27 | #endif |