|
1
2
3
4
|
#ifndef CHATWINDOW_H
#define CHATWINDOW_H
#include <QMainWindow>
|
|
5
|
#include <string>
|
|
6
|
#include "chatroom.h"
|
|
7
8
|
using namespace std;
|
|
9
10
11
12
13
14
15
16
17
18
|
namespace Ui {
class ChatWindow;
}
class ChatWindow : public QMainWindow
{
Q_OBJECT
public:
|
|
19
20
|
explicit ChatWindow(QString nick, QWidget *parent = 0);
void notifyPrint(string& msg);
|
|
21
|
~ChatWindow();
|
|
22
23
24
|
public slots:
void sendMsg();
|
|
25
26
27
|
private:
Ui::ChatWindow *ui;
|
|
28
29
30
31
32
33
34
35
36
37
38
39
|
QString nickName;
QString myNickname;
private slots:
void printMsg(QString str);
protected:
void closeEvent(QCloseEvent *event);
signals:
void msgToPrint(QString msg);
|
|
40
41
42
|
};
#endif // CHATWINDOW_H
|