Commit 6d499bda authored by Gavin Bisesi's avatar Gavin Bisesi
Browse files

Merge pull request #685 from poixen/mentions_in_om

Added click mentions to PMs
parents 0c32cfaa ef607eeb
...@@ -18,6 +18,7 @@ TabMessage::TabMessage(TabSupervisor *_tabSupervisor, AbstractClient *_client, c ...@@ -18,6 +18,7 @@ TabMessage::TabMessage(TabSupervisor *_tabSupervisor, AbstractClient *_client, c
chatView = new ChatView(tabSupervisor, 0, true); chatView = new ChatView(tabSupervisor, 0, true);
connect(chatView, SIGNAL(showCardInfoPopup(QPoint, QString)), this, SLOT(showCardInfoPopup(QPoint, QString))); connect(chatView, SIGNAL(showCardInfoPopup(QPoint, QString)), this, SLOT(showCardInfoPopup(QPoint, QString)));
connect(chatView, SIGNAL(deleteCardInfoPopup(QString)), this, SLOT(deleteCardInfoPopup(QString))); connect(chatView, SIGNAL(deleteCardInfoPopup(QString)), this, SLOT(deleteCardInfoPopup(QString)));
connect(chatView, SIGNAL(addMentionTag(QString)), this, SLOT(addMentionTag(QString)));
sayEdit = new QLineEdit; sayEdit = new QLineEdit;
connect(sayEdit, SIGNAL(returnPressed()), this, SLOT(sendMessage())); connect(sayEdit, SIGNAL(returnPressed()), this, SLOT(sendMessage()));
...@@ -43,6 +44,11 @@ TabMessage::~TabMessage() ...@@ -43,6 +44,11 @@ TabMessage::~TabMessage()
delete otherUserInfo; delete otherUserInfo;
} }
void TabMessage::addMentionTag(QString mentionTag) {
sayEdit->insert(mentionTag + " ");
sayEdit->setFocus();
}
void TabMessage::retranslateUi() void TabMessage::retranslateUi()
{ {
messageMenu->setTitle(tr("Personal &talk")); messageMenu->setTitle(tr("Personal &talk"));
......
...@@ -29,6 +29,7 @@ private slots: ...@@ -29,6 +29,7 @@ private slots:
void sendMessage(); void sendMessage();
void actLeave(); void actLeave();
void messageSent(const Response &response); void messageSent(const Response &response);
void addMentionTag(QString mentionTag);
public: public:
TabMessage(TabSupervisor *_tabSupervisor, AbstractClient *_client, const ServerInfo_User &_ownUserInfo, const ServerInfo_User &_otherUserInfo); TabMessage(TabSupervisor *_tabSupervisor, AbstractClient *_client, const ServerInfo_User &_ownUserInfo, const ServerInfo_User &_otherUserInfo);
~TabMessage(); ~TabMessage();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment