Added "Add friends Certificate" Button for Home View, for call easy the Text Page for Paste friends Cert faster.

This commit is contained in:
defnax 2016-12-14 15:20:03 +01:00
parent f3c4de2d3c
commit 96b6cd3d34
4 changed files with 108 additions and 68 deletions

View file

@ -24,6 +24,7 @@
#include "gui/notifyqt.h"
#include "gui/msgs/MessageComposer.h"
#include "gui/connect/ConnectFriendWizard.h"
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
#include <QUrlQuery>
@ -48,6 +49,8 @@ HomePage::HomePage(QWidget *parent) :
updateOwnCert();
connect(ui->addButton, SIGNAL(clicked()), this, SLOT(addFriend()));
QAction *CopyAction = new QAction(QIcon(),tr("Copy your Cert to Clipboard"), this);
connect(CopyAction, SIGNAL(triggered()), this, SLOT(copyCert()));
@ -135,3 +138,11 @@ void HomePage::saveCert()
ts << ui->userCertEdit->document()->toPlainText();
}
/** Add a Friends Text Certificate */
void HomePage::addFriend()
{
ConnectFriendWizard connwiz (this);
connwiz.setStartId(ConnectFriendWizard::Page_Text);
connwiz.exec ();
}