-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmainwindow.h
97 lines (73 loc) · 2.73 KB
/
mainwindow.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QListView>
#include <QStringListModel>
#include <QStringList>
#include <QTcpSocket>
#include <QtSql>
#include <QListView>
#include <QStandardItemModel>
#include <QStandardItem>
#include "addnewitem.h"
#include "addnewequipment.h"
#include "typedef.h"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(int userlevel, QWidget *parent = 0);
~MainWindow();
QSqlDatabase db;
QStandardItemModel *TableModel;
QStringListModel *Listmodel;
CalOrVer CalVerCat;
int UserLevel;
bool B_SendMail;
QString FileName_ATTACH;
// QTranslator trans;
QString SQLString_ConsumableMaterial,SQLString_EquipmentAll,SQLString_EquipmentCAL,SQLString_EquipmentVER,SQLString_EquipmentOther;
void dbOpen();
void dbClose();
void updateData2Tableview(QString SQLString);
void ExportToCsv(QAbstractItemModel* view, QString fileName);
//void readWelcome(QTcpSocket & socket);
//void smtpCommunication(QTcpSocket & socket);
//void communication(QTcpSocket & socket, const char *msg);
void SendEmail();
signals:
void Signal_ModifyUI_Item(QList <QString>,DB_Update_Catgroy);
void Signal_ModifyUI_Equipment(QList <QString>,DB_Update_Catgroy);
void Signal_UpdateDateUI(CalOrVer,QString,int);
void Signal_UpdateViewMoreInforDlgUI(QString);
private slots:
void ListView_itemClicked();
void TableView_itemClicked();
void Addnew_itemClicked();
void Modify_itemClicked();
void Delete_Clicked();
void UpdateVerCalDate_ButtonClicked();
void Search_ButtonClicked();
void AboutThis();
void Translate_to_Chinese();
void Translate_to_English();
//void AboutQT();
void on_pushButton_Export_clicked();
void on_pushButton_ViewMoreInfo_clicked();
public slots://
// void updateSQLdb(int, QList <QStandardItem*>);//ItemList 用于存放从add对话框传递过来的字段数据;
void updateSQLdb_AddnewItem(int, QList<QString>);//ItemList 用于存放从add对话框传递过来的字段数据;
void updateSQLdb_AddnewEquipment(int, QList <QStandardItem*>);//ItemList 用于存放从add对话框传递过来的字段数据;
void updateSQLdb_ModifyItem(int, QList<QString>);//ItemList 用于存放从add对话框传递过来的字段数据;
void updateSQLdb_ModifyEquipment(int, QList <QStandardItem*>);//ItemList 用于存放从add对话框传递过来的字段数据;
//void updateSQLdb_UpdateDate(QList <QStandardItem*>);
void Slot_UpdateTableViewfromCalVerDateDlg();
void ExportToXlsx(QAbstractItemModel* view, QString fileName);
private:
Ui::MainWindow *ui;
QTranslator trans;
};
#endif // MAINWINDOW_H