33#ifdef NDEVR_SUPPORTS_SOCKET_IO
36#include <QPlainTextEdit>
38#include <sio_client.h>
39#include "UsernameDialog.h>
47 class ChatDialog :
public QWidget
52 explicit ChatDialog(QWidget *parent = 0);
56 void SendBtnClicked();
58 void OnMessageReturn();
60 void showEvent(QShowEvent* event);
63 void RequestAddListItem(QListWidgetItem *item);
64 void RequestRemoveListItem(QListWidgetItem *item);
65 void RequestToggleInputs(
bool loginOrNot);
67 void AddListItem(QListWidgetItem *item);
68 void RemoveListItem(QListWidgetItem *item);
69 void ToggleInputs(
bool loginOrNot);
71 void NicknameAccept();
72 void NicknameCancelled();
74 void OnNewMessage(std::string
const& name, message::ptr
const& data,
bool hasAck, message::list &ack_resp);
75 void OnUserJoined(std::string
const& name, message::ptr
const& data,
bool hasAck, message::list &ack_resp);
76 void OnUserLeft(std::string
const& name, message::ptr
const& data,
bool hasAck, message::list &ack_resp);
77 void OnTyping(std::string
const& name, message::ptr
const& data,
bool hasAck, message::list &ack_resp);
78 void OnStopTyping(std::string
const& name, message::ptr
const& data,
bool hasAck, message::list &ack_resp);
79 void OnLogin(std::string
const& name, message::ptr
const& data,
bool hasAck, message::list &ack_resp);
80 void OnConnected(std::string
const& nsp);
81 void OnClosed(client::close_reason
const& reason);
83 void ShowLoginDialog();
87 std::unique_ptr<client> _io;
89 std::unique_ptr<UsernameDialog> m_dialog;
93 std::unique_ptr<QTimer> m_timer;
95 QListWidgetItem *m_typingItem;
Definition FontEditor.h:6