Blame view

QChatClient/chatwindow.h 661 Bytes
1
2
3
4
#ifndef CHATWINDOW_H
#define CHATWINDOW_H

#include <QMainWindow>
5
#include <string>
Imanol-Mikel Barba Sabariego authored
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:
Imanol-Mikel Barba Sabariego authored
19
20
    explicit ChatWindow(QString nick, QWidget *parent = 0);
    void notifyPrint(string& msg);
21
    void notifyClose();
22
    ~ChatWindow();
Imanol-Mikel Barba Sabariego authored
23
24
25

public slots:
    void sendMsg();
26
27
28

private:
    Ui::ChatWindow *ui;
Imanol-Mikel Barba Sabariego authored
29
30
31
32
33
34
35
36
37
38
39
40
    QString nickName;
    QString myNickname;

private slots:
    void printMsg(QString str);

protected:
    void closeEvent(QCloseEvent *event);

signals:
    void msgToPrint(QString msg);
41
42
43
};

#endif // CHATWINDOW_H