void TabRoom::sendMessage() { if (sayEdit->text().isEmpty()) return; Command_RoomSay cmd; cmd.set_message(sayEdit->text().toStdString()); PendingCommand *pend = prepareRoomCommand(cmd); connect(pend, SIGNAL(finished(Response, CommandContainer, QVariant)), this, SLOT(sayFinished(const Response &))); sendRoomCommand(pend); sayEdit->clear(); }
void TabRoom::actLeaveRoom() { sendRoomCommand(prepareRoomCommand(Command_LeaveRoom())); deleteLater(); }