84 lines
1.6 KiB
C++
84 lines
1.6 KiB
C++
#ifndef GLOBAL_H
|
|
#define GLOBAL_H
|
|
|
|
#include <QDialog>
|
|
#include <QDialogButtonBox>
|
|
#include <QPushButton>
|
|
#include <QCheckBox>
|
|
#include <QTextEdit>
|
|
#include <QLabel>
|
|
#include <QComboBox>
|
|
#include <QTableWidget>
|
|
|
|
// *** dialogLogin ***
|
|
struct structCheckBox {
|
|
QCheckBox *rememberMe = nullptr;
|
|
};
|
|
extern structCheckBox checkBox;
|
|
|
|
struct structComboBox{
|
|
QComboBox *findBy = nullptr;
|
|
};
|
|
extern structComboBox comboBox;
|
|
|
|
struct structTextEdit {
|
|
QTextEdit *username = nullptr;
|
|
QTextEdit *passwd = nullptr;
|
|
QTextEdit *search = nullptr;
|
|
};
|
|
extern structTextEdit textEdit;
|
|
|
|
struct structPushButton {
|
|
QPushButton *ok = nullptr;
|
|
QPushButton *cancel = nullptr;
|
|
QPushButton *seacrh = nullptr;
|
|
QPushButton *clear = nullptr;
|
|
QPushButton *submit = nullptr;
|
|
QPushButton *remove = nullptr;
|
|
};
|
|
extern structPushButton pushButton;
|
|
|
|
struct structLabel {
|
|
QLabel *connStatus = nullptr;
|
|
QLabel *salaryShould = nullptr;
|
|
QLabel *salaryDiscount = nullptr;
|
|
QLabel *salaryActual = nullptr;
|
|
};
|
|
extern structLabel label;
|
|
|
|
struct structTableWidget {
|
|
QTableWidget *teacherInfo = nullptr;
|
|
QTableWidget *teacherSalary = nullptr;
|
|
};
|
|
extern structTableWidget tableWidget;
|
|
|
|
namespace Ui {
|
|
class DialogLogin;
|
|
}
|
|
// *******************
|
|
|
|
|
|
// *** main ***
|
|
struct structIs{
|
|
bool debug = true;
|
|
bool loggedIn = false;
|
|
bool connected = false;
|
|
};
|
|
extern structIs is;
|
|
|
|
struct structSession{
|
|
std::string token;
|
|
std::string userName;
|
|
std::string userID;
|
|
};
|
|
extern structSession session;
|
|
|
|
struct structUserInfo{
|
|
std::string userName;
|
|
std::string passwd;
|
|
};
|
|
extern structUserInfo userInfo;
|
|
// ************
|
|
|
|
#endif // GLOBAL_H
|