homepage - add friend from cert file button

This commit is contained in:
RetroPooh 2017-03-04 00:12:36 +03:00
parent cb960a358d
commit d6870b45e9
4 changed files with 36 additions and 1 deletions

View File

@ -52,7 +52,8 @@ HomePage::HomePage(QWidget *parent) :
updateOwnCert(); updateOwnCert();
connect(ui->addButton, SIGNAL(clicked()), this, SLOT(addFriend())); connect(ui->addButton, SIGNAL(clicked()), this, SLOT(addFriend()));
connect(ui->LoadCertFileButton, SIGNAL(clicked()), this, SLOT(loadCert()));
QAction *CopyAction = new QAction(QIcon(),tr("Copy your Cert to Clipboard"), this); QAction *CopyAction = new QAction(QIcon(),tr("Copy your Cert to Clipboard"), this);
connect(CopyAction, SIGNAL(triggered()), this, SLOT(copyCert())); connect(CopyAction, SIGNAL(triggered()), this, SLOT(copyCert()));
@ -187,6 +188,14 @@ void HomePage::webMail()
connwiz.exec (); connwiz.exec ();
} }
void HomePage::loadCert()
{
ConnectFriendWizard connwiz (this);
connwiz.setStartId(ConnectFriendWizard::Page_Cert);
connwiz.exec ();
}
void HomePage::runStartWizard() void HomePage::runStartWizard()
{ {
QuickStartWizard(this).exec(); QuickStartWizard(this).exec();

View File

@ -54,6 +54,7 @@ private slots:
void saveCert(); void saveCert();
void addFriend(); void addFriend();
void webMail(); void webMail();
void loadCert();
void runStartWizard() ; void runStartWizard() ;
void openWebHelp() ; void openWebHelp() ;
void recommendFriends(); void recommendFriends();

View File

@ -58,6 +58,29 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QToolButton" name="LoadCertFileButton">
<property name="text">
<string>Add certificate file</string>
</property>
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/svg/folders1.svg</normaloff>:/icons/svg/folders1.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
<property name="autoRaise">
<bool>false</bool>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>

View File

@ -81,6 +81,8 @@ ConnectFriendWizard::ConnectFriendWizard(QWidget *parent) :
// (csoler) I'm hiding this, since it is not needed anymore with the new Home page. // (csoler) I'm hiding this, since it is not needed anymore with the new Home page.
ui->userFrame->hide(); ui->userFrame->hide();
ui->userFileFrame->hide(); // in homepage dropmenu now
// this define comes from Qt example. I don't have mac, so it wasn't tested // this define comes from Qt example. I don't have mac, so it wasn't tested
#ifndef Q_OS_MAC #ifndef Q_OS_MAC