comparison: src/database/database.h
src/database/database.h
- changeset 3
- 4b95e33ee476
- child 6
- f8474f2c5db9
equal
deleted
inserted
replaced
|
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(); |
|
16 void connectToDataBase(); |
|
17 |
|
18 private: |
|
19 QSqlDatabase db; |
|
20 |
|
21 private: |
|
22 bool openDataBase(); |
|
23 void closeDataBase(); |
|
24 }; |
|
25 |
|
26 |
|
27 static DataBase *db; |
|
28 |
|
29 |
|
30 #endif |