-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmainwindow.h
84 lines (71 loc) · 1.9 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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "aboutme.h"
#include "errorwidget.h"
#include "itemsmanager.h"
#include "login.h"
#include "maininclude.h"
#include "neworder.h"
#include "newitemorder.h"
#include "usermanager.h"
#include "messenger.h"
#include <QMainWindow>
QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE
class MainWindow : public QMainWindow {
Q_OBJECT
public:
MainWindow(QWidget* parent = nullptr);
void setLoginWindow(Login* login);
~MainWindow() override;
private slots:
void initMainWindow();
void flushMainWindow();
void on_newOrder_clicked();
void on_showDeal_clicked();
void on_showNow_clicked();
void changeThisOrder();
void afterChange();
bool changeToByID(QString dowhat, int i);
void agreeTeacher();
void disagreeTeacher();
void agreeHeader();
void disagreeHeader();
void agreeAdmin();
void disagreeAdmin();
void agreeKeeper();
void disagreeKeeper();
void againOrder();
void whenPrintOrder();
void drawPic(QPrinter *printerPixmap);
void finishPost(QNetworkReply* reply);
void on_newItemOrder();
void on_newItemOrderTemplate();
void on_about_me_triggered();
void on_about_writer_triggered();
void on_store_showAll_triggered();
void on_showHistory_clicked();
void on_people_change_triggered();
void on_people_template_triggered();
void closeEvent(QCloseEvent* event) override;
private:
Login* login;
Messenger* messenger;
ErrorWidget* errorW;
Ui::MainWindow* ui;
QPushButton* dealButton[10] = { nullptr };
void setDealButton();
void setNowButton();
void setHistoryButton();
bool changeStatus(int orderID, QString toStatus);
bool finishOrder(int orderID);
void printOrder(OneOrder order);
void createPix(QPixmap *pix);
};
#ifndef ISMAINCPP
extern MainWindow* mainWindow;
#endif
#endif // MAINWINDOW_H