-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.h
More file actions
40 lines (28 loc) · 719 Bytes
/
database.h
File metadata and controls
40 lines (28 loc) · 719 Bytes
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
#ifndef DATABASE_H
#define DATABASE_H
#include <QObject>
#include <QtSql>
#define DATABASE_NAME "my_sqllite"
#define USER_NAME "user"
#define HOST_NAME "127.0.0.1"
#define PASSWORD "1"
#define TABLE "xmldata"
/* Вспомогтаельный класс для работы с БД */
class DataBase : public QObject
{
Q_OBJECT
bool restoreDataBase();
bool openDataBase();
QSqlDatabase db;
public:
explicit DataBase(QObject *parent = 0);
void connectToDataBase();
void printTables();
bool createTable();
signals:
void changeProgressInsert(int value);
public slots:
void doInsert(QMultiMap<QString, QString> *arrayXml);
void doCleanData();
};
#endif // DATABASE_H