Merge pull request #685 from poixen/mentions_in_om

Added click mentions to PMs
This commit is contained in:
Gavin Bisesi 2015-02-04 18:18:08 -05:00
commit 6d499bdad2
2 changed files with 7 additions and 0 deletions

View file

@ -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()
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"));

View file

@ -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();