-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
59 lines (54 loc) · 1.32 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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QPushButton>
#include <QDebug>
#include "loginwidget.h"
#include <QMessageBox>
#include <QTcpSocket>
#include <QHostAddress>
#include <QThread>
#include <memory>
#include <sstream>
#include <iostream>
#include <QPropertyAnimation>
#include "chatwindow.h"
#include "loginhint.h"
#include "signup.h"
#include "utility.h"
#include <style.h>
#include <variable.h>
#include "ui_signup.h"
#include "ui_chatwindow.h"
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
private:
bool can_login;
QPushButton* button1;
QPushButton* button2;
Ui::MainWindow *ui;
LoginWidget* log_in;
QTcpSocket* client;
void my_slot();
void recover_login_btn();
void process_response(QByteArray& bytes);
SignUp* sign_up;
ChatWindow* chat_window;
Style* style;
QPoint z;
QPropertyAnimation* animation_close;
QPropertyAnimation* animation_minimize;
protected:
void mouseMoveEvent(QMouseEvent *event) override;
void mousePressEvent(QMouseEvent *event) override;
void mouseReleaseEvent(QMouseEvent *event) override;
void keyPressEvent(QKeyEvent* event) override;
};
#endif // MAINWINDOW_H