-
Notifications
You must be signed in to change notification settings - Fork 0
/
widget.h
51 lines (40 loc) · 856 Bytes
/
widget.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
#ifndef WIDGET_H
#define WIDGET_H
#include <QWidget>
#include <QtSql>
namespace Ui {
class Widget;
}
class Widget : public QWidget
{
Q_OBJECT
public:
explicit Widget(QWidget *parent = 0);
~Widget();
public slots:
void on_dataFileButton_clicked();
void on_targetButton_clicked();
void on_startButton_clicked();
private:
Ui::Widget *ui;
private:
QSqlDatabase database;
QSqlDatabase destDatabase;
private:
bool OpenDatabase(QSqlDatabase &database, QString name, QString dbName);
void InitInfoTable(QSqlQuery &query);
void Decode(QSqlQuery &query, QSqlQuery &destQuery, int selector);
};
#pragma pack(1)
struct Header
{
char bitOrder;
int blocks;
int datetime1;
int datetime2;
int count;
int data;
};
#pragma pack()
void DecodeHeader(struct Header *header);
#endif // WIDGET_H