This repository has been archived by the owner on Sep 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
91 lines (71 loc) · 1.98 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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QAction>
#include <QDateTime>
#include <QDebug>
#include <QDialogButtonBox>
#include <QFormLayout>
#include <QInputDialog>
#include <QLabel>
#include <QMainWindow>
#include <QPushButton>
#include <QSignalMapper>
#include <QSpinBox>
#include <QSqlDatabase>
#include <QSqlError>
#include <QSqlQuery>
#include <QSqlRecord>
#include <QStringList>
#include <QTableWidget>
#include <QTableWidgetItem>
#include <QTextEdit>
#include <QToolBar>
#include <QVBoxLayout>
class MainWindow : public QMainWindow {
Q_OBJECT
public:
MainWindow(QWidget* parent = nullptr);
void setToolBar();
void setAdminUI();
void setStudentUI();
void setUserName(QString userName);
~MainWindow();
private:
QString userName;
QToolBar* toolBar;
QAction* stuBook;
QAction* stuCheckMyBooking;
QAction* adminBookingRecord;
QAction* adminManageSeat;
QAction * adminManageUser;
QAction* adminAddUser;
QAction* adminDeletUser;
QAction* adminModifyUser;
QSqlDatabase mysql;
QSignalMapper* bookSignalMapper;
QSignalMapper* cancelBookingSignalMapper;
QSignalMapper* addSeatSignalMapper;
QSignalMapper* deleteSeatSignalMapper;
QSignalMapper* modifySeatSignalMapper;
QSignalMapper* adminCancelBookingSignalMapper;
QSignalMapper* deleteUserSignalMapper;
QSignalMapper* modifyUserSignalMapper;
QSignalMapper* addUserSignalMapper;
public slots:
void bookView();
void bookSeat(const QString& text);
void cancelBooking(const QString& text);
void checkMyBookingView();
void bookingRecordView();
void manageSeatView();
void adminCancelBooking(const QString& text);
void manageUsersView();
void adminBookSeat(const QString& text);
void addSeat();
void deleteSeat(const QString& text);
void modifySeat(const QString& text);
void addUser();
void deleteUser(const QString& text);
void modifyUser(const QString& text);
};
#endif // MAINWINDOW_H