-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlibrarianinterface.h
More file actions
73 lines (54 loc) · 2.65 KB
/
librarianinterface.h
File metadata and controls
73 lines (54 loc) · 2.65 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#ifndef LIBRARIANINTERFACE_H
#define LIBRARIANINTERFACE_H
#include <QMainWindow>
#include <QSqlDatabase>
#include "Common.h"
#include "bookmanagement.h"
#include "bookdetail.h"
namespace Ui {
class LibrarianInterface;
}
class LibrarianInterface : public QMainWindow
{
Q_OBJECT
public:
explicit LibrarianInterface(QWidget *parent = nullptr);
~LibrarianInterface();
void setUserID(QString userID); // 设置用户ID
private slots:
void on_tabWidget_tabBarClicked(int index);
void on_editInfoBtn_clicked();
void on_publishBtn_clicked();
void on_bookSearchBtn_clicked();
void on_addBookBtn_clicked();
void on_bookInfoClear_clicked();
void on_deleteSearchBtn_clicked();
void on_deleteBookBtn_clicked();
void on_bookList_clicked(const QModelIndex &index);
void on_pushButton_clicked();
void on_returnUserIDSearchBtn_clicked();
void on_returnBookBtn_clicked();
private:
Ui::LibrarianInterface *ui;
QString stringItemList;
QSqlQueryModel *model;
QString userID; // 用户ID
BookManagement *bookManagement;
BookDetail *bookDetail;
int requestRowIndex; // 请求列表当前选中行
void pullBookInfoList(); // 拉取数据库所有书本信息
bool checkInput(); // 审查输入的个人信息
void modifyUserInfo(); // 修改个人信息
void getUserInfo(); // 获取个人信息
void searchAndShow(QWidget *inputUI, QWidget *showUI, SearchWay way); // 查询数据并显示到UI上
QString getPublisherName(); // 获取发布公告的图书管理员的姓名
void publishAnnouncement(); // 发布公告
void addNewBook(); // 添加书籍
void clearAddInfo(); // 清除填写的添加信息
void showDetails(QString isbn); // 展示书本详情
void getRequestList(); // 获取借书请求列表
void confirmRequest(QString isbn); // 通过请求
void getReturnBookList(); // 获取还书列表
void returnBook(QString isbn); // 还书
};
#endif // LIBRARIANINTERFACE_H