homepage quickstartwizard webhelp

This commit is contained in:
RetroPooh 2017-03-01 22:36:36 +03:00
parent 91f2cf720f
commit 5618358bf1
7 changed files with 107 additions and 81 deletions

View File

@ -25,6 +25,7 @@
#include "gui/notifyqt.h" #include "gui/notifyqt.h"
#include "gui/msgs/MessageComposer.h" #include "gui/msgs/MessageComposer.h"
#include "gui/connect/ConnectFriendWizard.h" #include "gui/connect/ConnectFriendWizard.h"
#include <gui/QuickStartWizard.h>
#include "gui/connect/FriendRecommendDialog.h" #include "gui/connect/FriendRecommendDialog.h"
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0) #if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
@ -72,6 +73,9 @@ HomePage::HomePage(QWidget *parent) :
ui->shareButton->setMenu(menu); 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(); int S = QFontMetricsF(font()).height();
QString help_str = tr( QString help_str = tr(
" <h1><img width=\"%1\" src=\":/icons/help_64.png\">&nbsp;&nbsp;Welcome to Retroshare!</h1>\ " <h1><img width=\"%1\" src=\":/icons/help_64.png\">&nbsp;&nbsp;Welcome to Retroshare!</h1>\
@ -169,3 +173,13 @@ void HomePage::addFriend()
connwiz.setStartId(ConnectFriendWizard::Page_Text); connwiz.setStartId(ConnectFriendWizard::Page_Text);
connwiz.exec (); connwiz.exec ();
} }
void HomePage::runStartWizard()
{
QuickStartWizard(this).exec();
}
void HomePage::openWebHelp()
{
QDesktopServices::openUrl(QUrl(QString("https://retroshare.readthedocs.io")));
}

View File

@ -47,14 +47,15 @@ public:
virtual QString pageName() const { return tr("Home") ; } //MainPage virtual QString pageName() const { return tr("Home") ; } //MainPage
virtual QString helpText() const { return ""; } //MainPage virtual QString helpText() const { return ""; } //MainPage
private slots: private slots:
void updateOwnCert(); void updateOwnCert();
void runEmailClient(); void runEmailClient();
void copyCert(); void copyCert();
void saveCert(); void saveCert();
void addFriend();
void runStartWizard() ;
void openWebHelp() ;
void recommendFriends(); void recommendFriends();
void addFriend();
private: private:
Ui::HomePage *ui; Ui::HomePage *ui;

View File

@ -58,20 +58,24 @@
</property> </property>
</widget> </widget>
</item> </item>
<item> </layout>
<widget class="QToolButton" name="helpButton"> </widget>
<property name="text"> </item>
<string>...</string> <item row="5" column="1">
</property> <widget class="QFrame" name="addFrame">
<property name="icon"> <layout class="QGridLayout" name="gridLayout_3">
<iconset resource="icons.qrc"> <property name="leftMargin">
<normaloff>:/icons/help_64.png</normaloff>:/icons/help_64.png</iconset> <number>0</number>
</property> </property>
<property name="checkable"> <property name="topMargin">
<bool>true</bool> <number>0</number>
</property> </property>
</widget> <property name="rightMargin">
</item> <number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout> </layout>
</widget> </widget>
</item> </item>
@ -86,7 +90,7 @@
<property name="verticalSpacing"> <property name="verticalSpacing">
<number>2</number> <number>2</number>
</property> </property>
<item row="2" column="0" colspan="2"> <item row="2" column="0" colspan="4">
<widget class="QPlainTextEdit" name="userCertEdit"> <widget class="QPlainTextEdit" name="userCertEdit">
<property name="font"> <property name="font">
<font> <font>
@ -113,28 +117,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="3">
<widget class="QLabel" name="userCertLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string>The text below is your own Retroshare certificate. Send it to your friends</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QToolButton" name="shareButton"> <widget class="QToolButton" name="shareButton">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
@ -166,26 +149,43 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1">
<widget class="QToolButton" name="helpButton">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/help_64.png</normaloff>:/icons/help_64.png</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="userCertLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string>The text below is your own Retroshare certificate. Send it to your friends</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
<item row="4" column="1">
<widget class="QFrame" name="addFrame">
<layout class="QGridLayout" name="gridLayout_3">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout>
</widget>
</item>
<item row="1" column="1" colspan="2"> <item row="1" column="1" colspan="2">
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_2">
<property name="font"> <property name="font">
@ -222,11 +222,35 @@ private and secure decentralized communication platform.
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="1">
<widget class="QPushButton" name="runStartWizard_PB">
<property name="text">
<string>Launch startup wizard</string>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/tools_wizard.png</normaloff>:/images/tools_wizard.png</iconset>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QPushButton" name="openwebhelp">
<property name="text">
<string>Open Web Help</string>
</property>
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/settings/webinterface.svg</normaloff>:/icons/settings/webinterface.svg</iconset>
</property>
</widget>
</item>
</layout> </layout>
<zorder>label</zorder> <zorder>label</zorder>
<zorder>addFrame</zorder> <zorder>addFrame</zorder>
<zorder>label_2</zorder> <zorder>label_2</zorder>
<zorder>addframe</zorder> <zorder>addframe</zorder>
<zorder>runStartWizard_PB</zorder>
<zorder>openwebhelp</zorder>
</widget> </widget>
<resources> <resources>
<include location="icons.qrc"/> <include location="icons.qrc"/>

View File

@ -133,12 +133,8 @@ ConnectFriendWizard::ConnectFriendWizard(QWidget *parent) :
else else
{ {
ui->userFrame->hide(); // certificates page - top half with own cert and it's functions 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 ... ui->horizontalLayout_13->hide(); // Advanced options - key sign, whitelist, direct source ...
AdvancedVisible=false; AdvancedVisible=false;
ui->emailLabel->hide(); // is it ever used?
ui->emailEdit->hide();
ui->trustLabel->hide(); ui->trustLabel->hide();
ui->trustEdit->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->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"); 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; break;
case Page_FriendRequest: case Page_FriendRequest:

View File

@ -30,7 +30,6 @@
#include <util/misc.h> #include <util/misc.h>
#include <QSystemTrayIcon> #include <QSystemTrayIcon>
#include "rsharesettings.h" #include "rsharesettings.h"
#include <gui/QuickStartWizard.h>
/** Constructor */ /** Constructor */
GeneralPage::GeneralPage(QWidget * parent, Qt::WindowFlags flags) : 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 */ /* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this); ui.setupUi(this);
/* Hide platform specific features */ /* Hide platform specific features */
#ifdef Q_OS_WIN #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.autoLogin, SIGNAL(toggled(bool)), this,SLOT(updateAutoLogin())) ;
connect(ui.chkRunRetroshareAtSystemStartup, SIGNAL(toggled(bool)), this,SLOT(updateRunRSOnBoot())) ; connect(ui.chkRunRetroshareAtSystemStartup, SIGNAL(toggled(bool)), this,SLOT(updateRunRSOnBoot())) ;
connect(ui.chkRunRetroshareAtSystemStartupMinimized, 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.checkAdvanced, SIGNAL(toggled(bool)), this,SLOT(updateAdvancedMode())) ;
connect(ui.registerRetroShareProtocol, SIGNAL(toggled(bool)), this,SLOT(updateRegisterRSProtocol())) ; connect(ui.registerRetroShareProtocol, SIGNAL(toggled(bool)), this,SLOT(updateRegisterRSProtocol())) ;
} }
@ -100,10 +98,6 @@ GeneralPage::GeneralPage(QWidget * parent, Qt::WindowFlags flags) :
GeneralPage::~GeneralPage() GeneralPage::~GeneralPage()
{ {
} }
void GeneralPage::runStartWizard()
{
QuickStartWizard(this).exec();
}
void GeneralPage::updateAdvancedMode() void GeneralPage::updateAdvancedMode()
{ {

View File

@ -45,7 +45,7 @@ public:
virtual QString helpText() const { return ""; } virtual QString helpText() const { return ""; }
public slots: public slots:
void runStartWizard() ; //void runStartWizard() ;
void updateAdvancedMode(); void updateAdvancedMode();
void updateUseLocalServer() ; void updateUseLocalServer() ;
void updateMaxTimeBeforeIdle(); void updateMaxTimeBeforeIdle();

View File

@ -217,17 +217,6 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item>
<widget class="QPushButton" name="runStartWizard_PB">
<property name="text">
<string>Launch startup wizard</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/tools_wizard.png</normaloff>:/images/tools_wizard.png</iconset>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<resources> <resources>