-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathsqlui.h
More file actions
51 lines (42 loc) · 1.14 KB
/
sqlui.h
File metadata and controls
51 lines (42 loc) · 1.14 KB
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
#ifndef SQLUI_H
#define SQLUI_H
#include <QDebug>
#include <QWidget>
#include <Qstring>
#include <QSqlTableModel>
#include <QSqlQuery>
#include <QStringList>
#include <QSqlDatabase>
#include <firstuse.h>
namespace Ui {
class SQLUI;
}
class SQLUI : public QWidget
{
Q_OBJECT
public:
explicit SQLUI(QWidget *parent = 0);
~SQLUI();
private:
void SetDBName(QString table);
bool opendatabase();
public slots:
bool CreatTable(QString &TableName,QStringList &value);
bool insert(QString &table, QStringList &names,QStringList &values);
bool Updata(QString &table, QStringList &names,QStringList &values, QString &expression);
bool del(QString &table, QString &expression);
void GetValues(QString &table, QStringList &values);
void InitDB();
bool CheckPWD(QString PWD);
bool CheckRepeat(QString &TableName,QString &column,QString &value);
void QueryAllDataFromOne(QString column,QString &value,QString &value1);
private slots:
void on_OKPushButton_clicked();
private:
Ui::SQLUI *ui;
QSqlTableModel *model;
QSqlDatabase _db;
QString _tableName;
FirstUSE firstuse;
};
#endif // SQLUI_H