mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Merge pull request #711 from RetroPooh/test2
homepage: add webhelp and move quickstartwizard from settings general
This commit is contained in:
commit
556aae6ce7
@ -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)
|
||||||
@ -51,6 +52,7 @@ 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()));
|
||||||
@ -61,6 +63,9 @@ HomePage::HomePage(QWidget *parent) :
|
|||||||
QAction *SendAction = new QAction(QIcon(),tr("Send via Email"), this);
|
QAction *SendAction = new QAction(QIcon(),tr("Send via Email"), this);
|
||||||
connect(SendAction, SIGNAL(triggered()), this, SLOT(runEmailClient()));
|
connect(SendAction, SIGNAL(triggered()), this, SLOT(runEmailClient()));
|
||||||
|
|
||||||
|
QAction *WebMailAction = new QAction(QIcon(),tr("Invite via WebMail"), this);
|
||||||
|
connect(WebMailAction, SIGNAL(triggered()), this, SLOT(webMail()));
|
||||||
|
|
||||||
QAction *RecAction = new QAction(QIcon(),tr("Recommend friends to each others"), this);
|
QAction *RecAction = new QAction(QIcon(),tr("Recommend friends to each others"), this);
|
||||||
connect(RecAction, SIGNAL(triggered()), this, SLOT(recommendFriends()));
|
connect(RecAction, SIGNAL(triggered()), this, SLOT(recommendFriends()));
|
||||||
|
|
||||||
@ -68,10 +73,15 @@ HomePage::HomePage(QWidget *parent) :
|
|||||||
menu->addAction(CopyAction);
|
menu->addAction(CopyAction);
|
||||||
menu->addAction(SaveAction);
|
menu->addAction(SaveAction);
|
||||||
menu->addAction(SendAction);
|
menu->addAction(SendAction);
|
||||||
|
menu->addAction(WebMailAction);
|
||||||
menu->addAction(RecAction);
|
menu->addAction(RecAction);
|
||||||
|
|
||||||
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())) ;
|
||||||
|
ui->runStartWizard_PB->hide(); // until future rework
|
||||||
|
|
||||||
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\"> Welcome to Retroshare!</h1>\
|
" <h1><img width=\"%1\" src=\":/icons/help_64.png\"> Welcome to Retroshare!</h1>\
|
||||||
@ -169,3 +179,29 @@ void HomePage::addFriend()
|
|||||||
connwiz.setStartId(ConnectFriendWizard::Page_Text);
|
connwiz.setStartId(ConnectFriendWizard::Page_Text);
|
||||||
connwiz.exec ();
|
connwiz.exec ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HomePage::webMail()
|
||||||
|
{
|
||||||
|
ConnectFriendWizard connwiz (this);
|
||||||
|
|
||||||
|
connwiz.setStartId(ConnectFriendWizard::Page_WebMail);
|
||||||
|
connwiz.exec ();
|
||||||
|
}
|
||||||
|
|
||||||
|
void HomePage::loadCert()
|
||||||
|
{
|
||||||
|
ConnectFriendWizard connwiz (this);
|
||||||
|
|
||||||
|
connwiz.setStartId(ConnectFriendWizard::Page_Cert);
|
||||||
|
connwiz.exec ();
|
||||||
|
}
|
||||||
|
|
||||||
|
void HomePage::runStartWizard()
|
||||||
|
{
|
||||||
|
QuickStartWizard(this).exec();
|
||||||
|
}
|
||||||
|
|
||||||
|
void HomePage::openWebHelp()
|
||||||
|
{
|
||||||
|
QDesktopServices::openUrl(QUrl(QString("https://retroshare.readthedocs.io")));
|
||||||
|
}
|
||||||
|
@ -47,14 +47,17 @@ 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 recommendFriends();
|
|
||||||
void addFriend();
|
void addFriend();
|
||||||
|
void webMail();
|
||||||
|
void loadCert();
|
||||||
|
void runStartWizard() ;
|
||||||
|
void openWebHelp() ;
|
||||||
|
void recommendFriends();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::HomePage *ui;
|
Ui::HomePage *ui;
|
||||||
|
@ -59,22 +59,49 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="helpButton">
|
<widget class="QToolButton" name="LoadCertFileButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>...</string>
|
<string>Add certificate file</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="icons.qrc">
|
<iconset resource="icons.qrc">
|
||||||
<normaloff>:/icons/help_64.png</normaloff>:/icons/help_64.png</iconset>
|
<normaloff>:/icons/svg/folders1.svg</normaloff>:/icons/svg/folders1.svg</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="checkable">
|
<property name="iconSize">
|
||||||
<bool>true</bool>
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolButtonStyle">
|
||||||
|
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||||
|
</property>
|
||||||
|
<property name="autoRaise">
|
||||||
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
||||||
<item row="3" column="1" colspan="2">
|
<item row="3" column="1" colspan="2">
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
@ -86,7 +113,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 +140,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 +172,43 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item row="1" column="1">
|
||||||
</item>
|
<widget class="QToolButton" name="helpButton">
|
||||||
<item row="4" column="1">
|
<property name="text">
|
||||||
<widget class="QFrame" name="addFrame">
|
<string>...</string>
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="topMargin">
|
<property name="icon">
|
||||||
<number>0</number>
|
<iconset resource="icons.qrc">
|
||||||
|
<normaloff>:/icons/help_64.png</normaloff>:/icons/help_64.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="rightMargin">
|
<property name="checkable">
|
||||||
<number>0</number>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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="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 +245,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"/>
|
||||||
|
@ -82,6 +82,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
|
||||||
setWizardStyle(ModernStyle);
|
setWizardStyle(ModernStyle);
|
||||||
@ -133,12 +135,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 +555,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:
|
||||||
|
@ -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()
|
||||||
{
|
{
|
||||||
|
@ -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();
|
||||||
|
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user