chatwindow.h 661 Bytes
#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