Click tag mentions

You can now click on a username in the main chat to add a "@username"
tag to the chat. Makes communication with other users using tags faster.
This commit is contained in:
Matt Lowe 2015-01-17 14:47:16 +01:00
parent 9b7f488bd7
commit 45112e49b1
4 changed files with 14 additions and 4 deletions

View file

@ -44,6 +44,7 @@ TabRoom::TabRoom(TabSupervisor *_tabSupervisor, AbstractClient *_client, ServerI
connect(chatView, SIGNAL(openMessageDialog(QString, bool)), this, SIGNAL(openMessageDialog(QString, bool)));
connect(chatView, SIGNAL(showCardInfoPopup(QPoint, QString)), this, SLOT(showCardInfoPopup(QPoint, QString)));
connect(chatView, SIGNAL(deleteCardInfoPopup(QString)), this, SLOT(deleteCardInfoPopup(QString)));
connect(chatView, SIGNAL(addMentionTag(QString)), this, SLOT(addMentionTag(QString)));
sayLabel = new QLabel;
sayEdit = new QLineEdit;
sayLabel->setBuddy(sayEdit);
@ -225,6 +226,10 @@ void TabRoom::processRoomSayEvent(const Event_RoomSay &event)
emit userEvent(false);
}
void TabRoom::addMentionTag(QString mentionTag) {
sayEdit->insert(mentionTag + " ");
}
PendingCommand *TabRoom::prepareRoomCommand(const ::google::protobuf::Message &cmd)
{
return client->prepareRoomCommand(cmd, roomId);