chatwindow.h
661 Bytes
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
#ifndef CHATWINDOW_H
#define CHATWINDOW_H
#include <QMainWindow>
#include <string>
#include "chatroom.h"
using namespace std;
namespace Ui {
class ChatWindow;
}
class ChatWindow : public QMainWindow
{
Q_OBJECT
public:
explicit ChatWindow(QString nick, QWidget *parent = 0);
void notifyPrint(string& msg);
void notifyClose();
~ChatWindow();
public slots:
void sendMsg();
private:
Ui::ChatWindow *ui;
QString nickName;
QString myNickname;
private slots:
void printMsg(QString str);
protected:
void closeEvent(QCloseEvent *event);
signals:
void msgToPrint(QString msg);
};
#endif // CHATWINDOW_H