added basic new user popup

This commit is contained in:
fourtf
2018-06-06 10:46:23 +02:00
parent f542a5b999
commit 86e4a669ad
21 changed files with 365 additions and 85 deletions
+11 -4
View File
@@ -12,6 +12,7 @@
#include "ui_accountpopupform.h"
#include "util/benchmark.hpp"
#include "util/distancebetweenpoints.hpp"
#include "widgets/accountpopup2.hpp"
#include "widgets/split.hpp"
#include "widgets/tooltipwidget.hpp"
@@ -1104,10 +1105,16 @@ void ChannelView::handleLinkClick(QMouseEvent *event, const messages::Link &link
switch (link.type) {
case messages::Link::UserInfo: {
auto user = link.value;
this->userPopupWidget.setName(user);
this->userPopupWidget.moveTo(this, event->screenPos().toPoint());
this->userPopupWidget.show();
this->userPopupWidget.setFocus();
auto *userPopup = new AccountPopup2;
userPopup->setChannel(this->channel);
userPopup->setName(user);
userPopup->setAttribute(Qt::WA_DeleteOnClose);
userPopup->show();
// this->userPopupWidget.setName(user);
// this->userPopupWidget.moveTo(this, event->screenPos().toPoint());
// this->userPopupWidget.show();
// this->userPopupWidget.setFocus();
qDebug() << "Clicked " << user << "s message";
break;