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/msgs/MessageComposer.h"
#include "gui/connect/ConnectFriendWizard.h"
#include <gui/QuickStartWizard.h>
#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(
" <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.exec ();
}
void HomePage::runStartWizard()
{
QuickStartWizard(this).exec();
}
void HomePage::openWebHelp()
{
QDesktopServices::openUrl(QUrl(QString("https://retroshare.readthedocs.io")));
}

View File

@ -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;

View File

@ -58,20 +58,24 @@
</property>
</widget>
</item>
<item>
<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>
</layout>
</widget>
</item>
<item row="5" 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>
@ -86,7 +90,7 @@
<property name="verticalSpacing">
<number>2</number>
</property>
<item row="2" column="0" colspan="2">
<item row="2" column="0" colspan="4">
<widget class="QPlainTextEdit" name="userCertEdit">
<property name="font">
<font>
@ -113,28 +117,7 @@
</property>
</widget>
</item>
<item row="1" column="0">
<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">
<item row="1" column="3">
<widget class="QToolButton" name="shareButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
@ -166,26 +149,43 @@
</property>
</widget>
</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>
</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">
<widget class="QLabel" name="label_2">
<property name="font">
@ -195,7 +195,7 @@
</property>
<property name="text">
<string>Open Source cross-platform,
private and secure decentralized communication platform.
private and secure decentralized communication platform.
</string>
</property>
<property name="alignment">
@ -222,11 +222,35 @@ private and secure decentralized communication platform.
</property>
</widget>
</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>
<zorder>label</zorder>
<zorder>addFrame</zorder>
<zorder>label_2</zorder>
<zorder>addframe</zorder>
<zorder>runStartWizard_PB</zorder>
<zorder>openwebhelp</zorder>
</widget>
<resources>
<include location="icons.qrc"/>

View File

@ -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:

View File

@ -30,7 +30,6 @@
#include <util/misc.h>
#include <QSystemTrayIcon>
#include "rsharesettings.h"
#include <gui/QuickStartWizard.h>
/** 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()
{

View File

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

View File

@ -217,17 +217,6 @@
</property>
</spacer>
</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>
</widget>
<resources>