blob: 4c2433541360c76aed2e9f4430f31b32136c1797 [file] [log] [blame]
Zhenkai Zhu6d589aa2012-05-29 17:34:35 -07001#ifndef CHATDIALOG_H
2#define CHATDIALOG_H
3#include "ui_chatdialog.h"
Zhenkai Zhu5a8d5aa2012-05-30 21:25:23 -07004#include "chatbuf.pb.h"
Zhenkai Zhu6d589aa2012-05-29 17:34:35 -07005
6class ChatDialog : public QDialog, private Ui::ChatDialog
7{
8 Q_OBJECT
9
10public:
11 ChatDialog(QWidget *parent = 0);
Zhenkai Zhu5a8d5aa2012-05-30 21:25:23 -070012
13public slots:
Zhenkai Zhub6338822012-05-31 13:27:24 -070014 void appendMessage(const SyncDemo::ChatMessage &msg);
Zhenkai Zhu5a8d5aa2012-05-30 21:25:23 -070015 void updateTreeView();
16
17private slots:
18 void returnPressed();
19 void formChatMessage(const QString &text, SyncDemo::ChatMessage &msg);
20
21private:
22 QString m_nick;
23 QString m_chatroom;
Zhenkai Zhu6d589aa2012-05-29 17:34:35 -070024};
25#endif