-
Notifications
You must be signed in to change notification settings - Fork 1
/
mainwindow.h
71 lines (60 loc) · 1.78 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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include "LoginWindow.h"
#include "ui_LoginWindow.h"
#include "RegisterWindow.h"
#include "ui_RegisterWindow.h"
#include "StatusWindow.h"
#include "ui_StatusWindow.h"
#include "EditWindow.h"
#include "ui_EditWindow.h"
#include "UserWindow.h"
#include "ui_UserWindow.h"
#include <QStackedWidget>
#include "APIHandler.h"
#include <QJsonObject>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private:
Ui::MainWindow *ui;
Ui::LoginWindow *loginWindowUi;
Ui::RegisterWindow *registerWindowUi;
Ui::StatusWindow *statusWindowUi;
Ui::EditWindow *editWindowUi;
Ui::UserWindow *userWindowUi;
QStackedWidget *stackedWidget;
APIHandler *api;
void adjustWindowSize();
private slots:
void moveToLogin();
void moveToRegister();
void moveToStatus();
void moveToEdit();
void moveToProfile();
void closeSession();
void doLogin(QString user, QString passwd);
void doRegister(QString user, QString passwd1, QString passwd2, QString email);
void doPublish(QString message);
void doEditProfile();
void doUploadImage(QString profileImage);
void doProfile(int);
void doStatus();
void responseCheck(QJsonObject json);
void responseLogin(QJsonObject json);
void responseRegister(QJsonObject json);
void responseLogout(QJsonObject json);
void responsePublish(QJsonObject json);
void responseStatus(QJsonObject json);
void responseEditProfile(QJsonObject json);
void responseGetUser(QJsonObject json);
void responseError(QJsonObject json);
};
#endif // MAINWINDOW_H