From 5618358bf1aebc16f8a5d4247961e72501b4f367 Mon Sep 17 00:00:00 2001 From: RetroPooh Date: Wed, 1 Mar 2017 22:36:36 +0300 Subject: [PATCH] homepage quickstartwizard webhelp --- retroshare-gui/src/gui/HomePage.cpp | 14 ++ retroshare-gui/src/gui/HomePage.h | 5 +- retroshare-gui/src/gui/HomePage.ui | 136 ++++++++++-------- .../src/gui/connect/ConnectFriendWizard.cpp | 12 +- .../src/gui/settings/GeneralPage.cpp | 8 +- retroshare-gui/src/gui/settings/GeneralPage.h | 2 +- .../src/gui/settings/GeneralPage.ui | 11 -- 7 files changed, 107 insertions(+), 81 deletions(-) diff --git a/retroshare-gui/src/gui/HomePage.cpp b/retroshare-gui/src/gui/HomePage.cpp index b3ad217a1..2cad2b17e 100644 --- a/retroshare-gui/src/gui/HomePage.cpp +++ b/retroshare-gui/src/gui/HomePage.cpp @@ -25,6 +25,7 @@ #include "gui/notifyqt.h" #include "gui/msgs/MessageComposer.h" #include "gui/connect/ConnectFriendWizard.h" +#include #include "gui/connect/FriendRecommendDialog.h" #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) @@ -72,6 +73,9 @@ HomePage::HomePage(QWidget *parent) : ui->shareButton->setMenu(menu); + connect(ui->runStartWizard_PB,SIGNAL(clicked()), this,SLOT(runStartWizard())) ; + connect(ui->openwebhelp,SIGNAL(clicked()), this,SLOT(openWebHelp())) ; + int S = QFontMetricsF(font()).height(); QString help_str = tr( "

  Welcome to Retroshare!

\ @@ -169,3 +173,13 @@ void HomePage::addFriend() connwiz.setStartId(ConnectFriendWizard::Page_Text); connwiz.exec (); } + +void HomePage::runStartWizard() +{ + QuickStartWizard(this).exec(); +} + +void HomePage::openWebHelp() +{ + QDesktopServices::openUrl(QUrl(QString("https://retroshare.readthedocs.io"))); +} diff --git a/retroshare-gui/src/gui/HomePage.h b/retroshare-gui/src/gui/HomePage.h index a11980ac7..e0ecb2f65 100644 --- a/retroshare-gui/src/gui/HomePage.h +++ b/retroshare-gui/src/gui/HomePage.h @@ -46,15 +46,16 @@ public: virtual QIcon iconPixmap() const { return QPixmap(":/icons/svg/profile.svg") ; } //MainPage virtual QString pageName() const { return tr("Home") ; } //MainPage virtual QString helpText() const { return ""; } //MainPage - private slots: void updateOwnCert(); void runEmailClient(); void copyCert(); void saveCert(); + void addFriend(); + void runStartWizard() ; + void openWebHelp() ; void recommendFriends(); - void addFriend(); private: Ui::HomePage *ui; diff --git a/retroshare-gui/src/gui/HomePage.ui b/retroshare-gui/src/gui/HomePage.ui index 2acbae9ff..9ed8a4ff1 100644 --- a/retroshare-gui/src/gui/HomePage.ui +++ b/retroshare-gui/src/gui/HomePage.ui @@ -58,20 +58,24 @@ - - - - ... - - - - :/icons/help_64.png:/icons/help_64.png - - - true - - - + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + @@ -86,7 +90,7 @@ 2 - + @@ -113,28 +117,7 @@ - - - - - 0 - 0 - - - - - 11 - - - - The text below is your own Retroshare certificate. Send it to your friends - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - + @@ -166,26 +149,43 @@ + + + + ... + + + + :/icons/help_64.png:/icons/help_64.png + + + true + + + + + + + + 0 + 0 + + + + + 11 + + + + The text below is your own Retroshare certificate. Send it to your friends + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - @@ -195,7 +195,7 @@ Open Source cross-platform, -private and secure decentralized communication platform. +private and secure decentralized communication platform. @@ -222,11 +222,35 @@ private and secure decentralized communication platform. + + + + Launch startup wizard + + + + :/images/tools_wizard.png:/images/tools_wizard.png + + + + + + + Open Web Help + + + + :/icons/settings/webinterface.svg:/icons/settings/webinterface.svg + + + label addFrame label_2 addframe + runStartWizard_PB + openwebhelp diff --git a/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp b/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp index e0b4b08a9..488ea159c 100755 --- a/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp +++ b/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp @@ -133,12 +133,8 @@ ConnectFriendWizard::ConnectFriendWizard(QWidget *parent) : else { ui->userFrame->hide(); // certificates page - top half with own cert and it's functions - ui->horizontalLayout_13->hide(); // Advanced options - key sign, whitelist, direct source ... AdvancedVisible=false; - - ui->emailLabel->hide(); // is it ever used? - ui->emailEdit->hide(); ui->trustLabel->hide(); ui->trustEdit->hide(); } @@ -557,6 +553,14 @@ void ConnectFriendWizard::initializePage(int id) ui->ipLabel->setPixmap(QPixmap(":/images/anonymous_128_blue.png").scaledToHeight(S*2,Qt::SmoothTransformation)); ui->ipLabel->setToolTip("This is a Hidden node - you need tor/i2p proxy to connect"); } + + if(peerDetails.email.empty()) + { + ui->emailLabel->hide(); // is it ever used? + ui->emailEdit->hide(); + } + ui->ipEdit->setTextInteractionFlags(Qt::TextSelectableByMouse); + } break; case Page_FriendRequest: diff --git a/retroshare-gui/src/gui/settings/GeneralPage.cpp b/retroshare-gui/src/gui/settings/GeneralPage.cpp index 5d8a8e21b..26e21bf3d 100755 --- a/retroshare-gui/src/gui/settings/GeneralPage.cpp +++ b/retroshare-gui/src/gui/settings/GeneralPage.cpp @@ -30,7 +30,6 @@ #include #include #include "rsharesettings.h" -#include /** Constructor */ GeneralPage::GeneralPage(QWidget * parent, Qt::WindowFlags flags) : @@ -39,7 +38,6 @@ GeneralPage::GeneralPage(QWidget * parent, Qt::WindowFlags flags) : /* Invoke the Qt Designer generated object setup routine */ ui.setupUi(this); - /* Hide platform specific features */ #ifdef Q_OS_WIN @@ -91,7 +89,7 @@ GeneralPage::GeneralPage(QWidget * parent, Qt::WindowFlags flags) : connect(ui.autoLogin, SIGNAL(toggled(bool)), this,SLOT(updateAutoLogin())) ; connect(ui.chkRunRetroshareAtSystemStartup, SIGNAL(toggled(bool)), this,SLOT(updateRunRSOnBoot())) ; connect(ui.chkRunRetroshareAtSystemStartupMinimized, SIGNAL(toggled(bool)), this,SLOT(updateRunRSOnBoot())) ; - connect(ui.runStartWizard_PB, SIGNAL(clicked()), this,SLOT(runStartWizard())) ; + //connect(ui.runStartWizard_PB, SIGNAL(clicked()), this,SLOT(runStartWizard())) ; connect(ui.checkAdvanced, SIGNAL(toggled(bool)), this,SLOT(updateAdvancedMode())) ; connect(ui.registerRetroShareProtocol, SIGNAL(toggled(bool)), this,SLOT(updateRegisterRSProtocol())) ; } @@ -100,10 +98,6 @@ GeneralPage::GeneralPage(QWidget * parent, Qt::WindowFlags flags) : GeneralPage::~GeneralPage() { } -void GeneralPage::runStartWizard() -{ - QuickStartWizard(this).exec(); -} void GeneralPage::updateAdvancedMode() { diff --git a/retroshare-gui/src/gui/settings/GeneralPage.h b/retroshare-gui/src/gui/settings/GeneralPage.h index d28146915..7fcc1adf0 100755 --- a/retroshare-gui/src/gui/settings/GeneralPage.h +++ b/retroshare-gui/src/gui/settings/GeneralPage.h @@ -45,7 +45,7 @@ public: virtual QString helpText() const { return ""; } public slots: - void runStartWizard() ; + //void runStartWizard() ; void updateAdvancedMode(); void updateUseLocalServer() ; void updateMaxTimeBeforeIdle(); diff --git a/retroshare-gui/src/gui/settings/GeneralPage.ui b/retroshare-gui/src/gui/settings/GeneralPage.ui index c7f6aebff..f5be1e386 100755 --- a/retroshare-gui/src/gui/settings/GeneralPage.ui +++ b/retroshare-gui/src/gui/settings/GeneralPage.ui @@ -217,17 +217,6 @@ - - - - Launch startup wizard - - - - :/images/tools_wizard.png:/images/tools_wizard.png - - -