Zhenkai Zhu | fd52ab7 | 2012-05-29 17:34:35 -0700 | [diff] [blame] | 1 | #ifndef CHATDIALOG_H |
| 2 | #define CHATDIALOG_H |
| 3 | #include "ui_chatdialog.h" |
Zhenkai Zhu | c71da77 | 2012-05-30 21:25:23 -0700 | [diff] [blame] | 4 | #include "chatbuf.pb.h" |
Zhenkai Zhu | fd52ab7 | 2012-05-29 17:34:35 -0700 | [diff] [blame] | 5 | |
| 6 | class ChatDialog : public QDialog, private Ui::ChatDialog |
| 7 | { |
| 8 | Q_OBJECT |
| 9 | |
| 10 | public: |
| 11 | ChatDialog(QWidget *parent = 0); |
Zhenkai Zhu | c71da77 | 2012-05-30 21:25:23 -0700 | [diff] [blame] | 12 | |
| 13 | public slots: |
Zhenkai Zhu | 2c55b38 | 2012-05-31 13:27:24 -0700 | [diff] [blame] | 14 | void appendMessage(const SyncDemo::ChatMessage &msg); |
Zhenkai Zhu | c71da77 | 2012-05-30 21:25:23 -0700 | [diff] [blame] | 15 | void updateTreeView(); |
| 16 | |
| 17 | private slots: |
| 18 | void returnPressed(); |
| 19 | void formChatMessage(const QString &text, SyncDemo::ChatMessage &msg); |
| 20 | |
| 21 | private: |
| 22 | QString m_nick; |
| 23 | QString m_chatroom; |
Zhenkai Zhu | fd52ab7 | 2012-05-29 17:34:35 -0700 | [diff] [blame] | 24 | }; |
| 25 | #endif |