From 0837cc86eff138e1cad0152f1df2b4eade35728a Mon Sep 17 00:00:00 2001 From: defnax Date: Mon, 23 Nov 2009 20:27:02 +0000 Subject: [PATCH] removed not need more old dialogs git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1842 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- .../src/gui/connect/AddFriendDialog.cpp | 147 ---- .../src/gui/connect/AddFriendDialog.h | 58 -- .../src/gui/connect/AddFriendDialog.ui | 611 ------------- .../src/gui/connect/AddFriendWizard.cpp | 207 ----- .../src/gui/connect/AddFriendWizard.h | 71 -- .../src/gui/connect/AddFriendWizard.ui | 806 ------------------ .../src/gui/connect/InviteDialog.cpp | 75 -- retroshare-gui/src/gui/connect/InviteDialog.h | 56 -- .../src/gui/connect/InviteDialog.ui | 519 ----------- 9 files changed, 2550 deletions(-) delete mode 100644 retroshare-gui/src/gui/connect/AddFriendDialog.cpp delete mode 100644 retroshare-gui/src/gui/connect/AddFriendDialog.h delete mode 100644 retroshare-gui/src/gui/connect/AddFriendDialog.ui delete mode 100644 retroshare-gui/src/gui/connect/AddFriendWizard.cpp delete mode 100644 retroshare-gui/src/gui/connect/AddFriendWizard.h delete mode 100644 retroshare-gui/src/gui/connect/AddFriendWizard.ui delete mode 100644 retroshare-gui/src/gui/connect/InviteDialog.cpp delete mode 100644 retroshare-gui/src/gui/connect/InviteDialog.h delete mode 100644 retroshare-gui/src/gui/connect/InviteDialog.ui diff --git a/retroshare-gui/src/gui/connect/AddFriendDialog.cpp b/retroshare-gui/src/gui/connect/AddFriendDialog.cpp deleted file mode 100644 index 4f627e0ee..000000000 --- a/retroshare-gui/src/gui/connect/AddFriendDialog.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/**************************************************************** - * RetroShare is distributed under the following license: - * - * Copyright (C) 2006, 2007 crypton - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - ****************************************************************/ -#include "AddFriendDialog.h" - -#include "rsiface/rsiface.h" -#include "rsiface/rspeers.h" - -#include "gui/NetworkDialog.h" -#include - -#include - -//============================================================================ -/** Default constructor */ -AddFriendDialog::AddFriendDialog(NetworkDialog *cd, QWidget *parent, Qt::WFlags flags) - : QDialog(parent, flags), cDialog(cd) -{ - /* Invoke Qt Designer generated QObject setup routine */ - ui.setupUi(this); - - /* add a Background image for Add Friend Label */ - //WidgetBackgroundImage::setBackgroundImage(ui.addfriendLabel, ":images/new-contact.png", WidgetBackgroundImage::AdjustHeight); - - connect(ui.afcancelButton, SIGNAL(clicked()), this, SLOT(afcancelbutton())); - connect(ui.fileButton, SIGNAL(clicked()), this, SLOT(filebutton())); - connect(ui.doneButton, SIGNAL(clicked()), this, SLOT(donebutton())); - - //maybe, it was already set somewere, but just in case. This settings should - //prevent some bugs... - ui.emailText->setLineWrapMode(QTextEdit::NoWrap); - ui.emailText->setAcceptRichText(false); - - //setFixedSize(QSize(434, 462)); -} - -//============================================================================ - -void AddFriendDialog::donebutton() -{ - std::string id; - std::string certstr; - - QString fn = ui.fileSelectEdit->text() ; - if (fn.isEmpty()) - { - //load certificate from text box - certstr = ui.emailText->toPlainText().toStdString(); - - if ((cDialog) && (rsPeers->LoadCertificateFromString(certstr, id))) - { - close(); - cDialog->showpeerdetails(id); - } - else - { - /* error message */ - QMessageBox::warning(this, tr("RetroShare"), - tr("Certificate Load Failed"), - QMessageBox::Ok, QMessageBox::Ok); - - close(); - return; - } - } - else - { - //=== try to load selected certificate file - if (QFile::exists(fn)) - { - std::string fnstr = fn.toStdString(); - if ( (cDialog) && (rsPeers->LoadCertificateFromFile(fnstr, id)) ) - { - close(); - cDialog->showpeerdetails(id); - } - else - { - QString mbxmess = - QString(tr("Certificate Load Failed:something is wrong with %1 ")) - .arg(fn); - - QMessageBox::warning(this, tr("RetroShare"), - mbxmess, QMessageBox::Ok, QMessageBox::Ok); - close(); - return; - } - } - else - { - QString mbxmess = - QString(tr("Certificate Load Failed:file %1 not found")) - .arg(fn); - - QMessageBox::warning(this, tr("RetroShare"), - mbxmess, QMessageBox::Ok, QMessageBox::Ok); - - close(); - return; - } - } -} - -//============================================================================ - -void AddFriendDialog::afcancelbutton() -{ - close(); -} - -//============================================================================ - -void AddFriendDialog::filebutton() -{ - QString fileName = - QFileDialog::getOpenFileName(this, tr("Select Certificate"), - "", tr("Certificates (*.pqi *.pem)")); - - if (!fileName.isNull()) - ui.fileSelectEdit->setText(fileName); -} - -//============================================================================ - -void AddFriendDialog::setInfo(std::string invite) -{ - ui.emailText->setText(QString::fromStdString(invite)); -} - - diff --git a/retroshare-gui/src/gui/connect/AddFriendDialog.h b/retroshare-gui/src/gui/connect/AddFriendDialog.h deleted file mode 100644 index cabd0bee7..000000000 --- a/retroshare-gui/src/gui/connect/AddFriendDialog.h +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************** - * RetroShare is distributed under the following license: - * - * Copyright (C) 2006, crypton - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - ****************************************************************/ - - -#ifndef _ADDFRIENDDIALOG_H -#define _ADDFRIENDDIALOG_H - -#include - -#include "ui_AddFriendDialog.h" -class NetworkDialog; - -class AddFriendDialog : public QDialog -{ - Q_OBJECT - -public: - /** Default constructor */ - AddFriendDialog(NetworkDialog *cd, QWidget *parent = 0, Qt::WFlags flags = 0); - /** Default destructor */ - -void setInfo(std::string text); - -public slots: -protected: -private slots: - - void donebutton(); - void afcancelbutton(); - void filebutton(); - -private: - - /** Qt Designer generated object */ - Ui::AddFriendDialog ui; - NetworkDialog *cDialog; -}; - -#endif - diff --git a/retroshare-gui/src/gui/connect/AddFriendDialog.ui b/retroshare-gui/src/gui/connect/AddFriendDialog.ui deleted file mode 100644 index fee93a0c9..000000000 --- a/retroshare-gui/src/gui/connect/AddFriendDialog.ui +++ /dev/null @@ -1,611 +0,0 @@ - - AddFriendDialog - - - - 0 - 0 - 510 - 350 - - - - Add a Friend - - - - - - - 0 - 0 - - - - - 0 - 74 - - - - - 16777215 - 73 - - - - - - - - - 0 - 0 - 0 - - - - - - - 244 - 244 - 244 - - - - - - - 244 - 244 - 244 - - - - - - - 241 - 239 - 226 - - - - - - - 140 - 140 - 140 - - - - - - - 163 - 163 - 163 - - - - - - - 0 - 0 - 0 - - - - - - - 244 - 244 - 244 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 244 - 244 - 244 - - - - - - - 106 - 106 - 106 - - - - - - - 197 - 231 - 246 - - - - - - - 0 - 0 - 0 - - - - - - - 232 - 232 - 232 - - - - - - - - - 0 - 0 - 0 - - - - - - - 244 - 244 - 244 - - - - - - - 244 - 244 - 244 - - - - - - - 241 - 239 - 226 - - - - - - - 140 - 140 - 140 - - - - - - - 163 - 163 - 163 - - - - - - - 0 - 0 - 0 - - - - - - - 244 - 244 - 244 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 244 - 244 - 244 - - - - - - - 106 - 106 - 106 - - - - - - - 244 - 244 - 244 - - - - - - - 0 - 0 - 0 - - - - - - - 232 - 232 - 232 - - - - - - - - - 122 - 122 - 122 - - - - - - - 244 - 244 - 244 - - - - - - - 244 - 244 - 244 - - - - - - - 244 - 244 - 244 - - - - - - - 140 - 140 - 140 - - - - - - - 163 - 163 - 163 - - - - - - - 122 - 122 - 122 - - - - - - - 244 - 244 - 244 - - - - - - - 122 - 122 - 122 - - - - - - - 244 - 244 - 244 - - - - - - - 244 - 244 - 244 - - - - - - - 0 - 0 - 0 - - - - - - - 197 - 231 - 246 - - - - - - - 0 - 0 - 0 - - - - - - - 232 - 232 - 232 - - - - - - - - background-image: url(:/images/addfriendlabel.png) - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;"><span style=" font-size:16pt; font-weight:600; color:#32cd32;">Add a new Friend</span> </p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;"> </p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;"> </p></body></html> - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - 100 - - - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">To add a new friend, specify path to their sertificate file in the box below and click "Done".</span></p></body></html> - - - true - - - - - - - - - - 12 - - - - - - - - - 77 - 0 - - - - Load... - - - - - - - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">Alternative way, you can copy </span><span style=" font-size:12pt;">and paste your friend's XPGP certificate into the box below. </span></p></body></html> - - - true - - - - - - - - Liberation Mono - - - - false - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Liberation Mono'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Courier New';"><span style=" font-family:'Sans Serif'; font-size:11pt;">-----BEGIN XPGP CERTIFICATE-----</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:11pt;">MIICxQIBADCCAUkCAQAwHhcNMDkwMjI4MTgzODIyWhcNMTQwMjI3MTgzODIyWjCC</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:11pt;">ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANuLs8PuMBipmcrNK/Xd8u/Y</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:11pt;">9/gY5+F/M3OZ7O+UtNI72WpY61XX2P8M/0wyC0oDAzHv/wPH/lXphysBsF13ItC4</p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:11pt;"></p></body></html> - - - false - - - - - - - - - - - - 77 - 0 - - - - Cancel - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 77 - 0 - - - - Done - - - - - - - - - fileButton - doneButton - afcancelButton - - - - diff --git a/retroshare-gui/src/gui/connect/AddFriendWizard.cpp b/retroshare-gui/src/gui/connect/AddFriendWizard.cpp deleted file mode 100644 index d44b3852a..000000000 --- a/retroshare-gui/src/gui/connect/AddFriendWizard.cpp +++ /dev/null @@ -1,207 +0,0 @@ -/**************************************************************** - * RetroShare is distributed under the following license: - * - * Copyright (C) 2006, crypton - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - ****************************************************************/ - -#include "AddFriendWizard.h" -//#include "rshare.h" -//#include "config/gconfig.h" - -#include "rsiface/rsiface.h" -#include "rsiface/rspeers.h" - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "gui/NetworkDialog.h" - -/** Constructor */ -AddFriendWizard::AddFriendWizard(NetworkDialog *cd, QWidget *parent, Qt::WFlags flags) -: QDialog(parent, flags), cDialog(cd) -{ - /* Invoke the Qt Designer generated object setup routine */ - ui.setupUi(this); - - //GConfig config; - //config.loadWidgetInformation(this); - - connect(ui.loadfileButton, SIGNAL(clicked()), this, SLOT(loadfile())); - - - setFixedSize(QSize(508, 312)); - - /* Hide platform specific features */ -#ifdef Q_WS_WIN - -#endif -} - -/*! -* The destructor for AddFriendWizard -*/ -AddFriendWizard::~AddFriendWizard() -{ -} - - -void AddFriendWizard::reset(QSettings *settingsPointer) -{ - // set the labelstackedWidget and textstackedWidget to the first position - //labelstackedWidget->setCurrentIndex(0); - ui.textstackedWidget->setCurrentIndex(0); - // disable the backButton: We don't need it if we are on the first position - ui.backButton->setEnabled(false); - // and we aren't at the last step, were the next button becomes the finish button - lastStep = false; - - settings = settingsPointer; - -} - - -void AddFriendWizard::on_nextButton_clicked() -{ - // The current index position - int index = ui.textstackedWidget->currentIndex(); - // Test the different widgets - switch ( ui.textstackedWidget->currentIndex()) { - // - case 0 : - { - if ( ui.keyradioButton->isChecked() ) - { - ui.textstackedWidget->setCurrentWidget(ui.keypage); - /* something complicated ;) */ - - - std::string id; - - /* get the text from the window */ - /* load into string */ - std::string certstr = ui.keyText->toPlainText().toStdString(); - - /* ask retroshare to load */ - if ((cDialog) && (rsPeers->LoadCertificateFromString(certstr, id))) - { - close(); - cDialog->showpeerdetails(id); - } - else - { - /* error message */ - int ret = QMessageBox::warning(this, tr("RetroShare"), - tr("Certificate Load Failed"), - QMessageBox::Ok, QMessageBox::Ok); - } - - - } - if ( ui.pqipemradioButton->isChecked() ) - { - ui.textstackedWidget->setCurrentWidget(ui.pqipempage); - - } - if ( ui.inviteradioButton->isChecked() ) - { - ui.textstackedWidget->setCurrentWidget(ui.invitepage); - - } - - } - return; - - } - - /* - * move to the next widget, with the signal/slot also labelstackedWidget, - * it's also moved - */ - index++; - // activate the backButton, because we are at the second widget or higher - ui.backButton->setEnabled(true); - - -} - -/*! -* The on_backButton_clicked function is called when the back button is clicked. -* First it set the variable index to the currentIndex of textstackedWidget minus 1. -* So we have the previous position. Then it tests if the index goes lower then 0. -* Because of there is no value prior 0, it sets the index back to 0. -* If we was at the last widget, the button was named "Finish". If we go back, it's -* named "Next" again and the lastStep is set to false. -*/ -void AddFriendWizard::on_backButton_clicked() -{ - int index = ui.textstackedWidget->currentIndex() - 1; - if ( index <= 0 ) - { - index = 0; - ui.backButton->setEnabled(false); - } - //ui.nextButton->setText(tr("Next")); - lastStep = false; - ui.textstackedWidget->setCurrentIndex(0); -} - -/*! -* This function closes the dialog without saving the values -*/ -void AddFriendWizard::on_cancelButton_clicked() -{ - // if cancel is pressed, use the standard settings - //writeSettings(); - // leave but show that cancel was pressed - reject(); -} - -void AddFriendWizard::loadfile() -{ - - /* show file dialog, - * load file into screen, - * push done button! - */ - std::string id; - if (cDialog) - { - id = cDialog->loadneighbour(); - } - - /* call make Friend */ - if (id != "") - { - close(); - cDialog->showpeerdetails(id); - } - else - { - /* error message */ - int ret = QMessageBox::warning(this, tr("RetroShare"), - tr("Certificate Load Failed"), - QMessageBox::Ok, QMessageBox::Ok); - } -} diff --git a/retroshare-gui/src/gui/connect/AddFriendWizard.h b/retroshare-gui/src/gui/connect/AddFriendWizard.h deleted file mode 100644 index a320c2cce..000000000 --- a/retroshare-gui/src/gui/connect/AddFriendWizard.h +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************** - * RetroShare is distributed under the following license: - * - * Copyright (C) 2006, crypton - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - ****************************************************************/ - - -#ifndef _ADDFRIENDWIZARD_H -#define _ADDFRIENDWIZARD_H - -#include -#include - -#include "ui_AddFriendWizard.h" - -class NetworkDialog; - -class AddFriendWizard : public QDialog -{ - Q_OBJECT - -public: - /** Default Constructor */ - - AddFriendWizard(NetworkDialog *cd, QWidget *parent = 0, Qt::WFlags flags = 0); - /** Default Destructor */ - ~AddFriendWizard(); - - void reset(QSettings *settingsPointer); - - -private slots: - -private slots: - void on_nextButton_clicked(); - void on_backButton_clicked(); - void on_cancelButton_clicked(); - - void loadfile(); - - - - -private: - QSettings *settings; - - bool lastStep; - - NetworkDialog *cDialog; - - /** Qt Designer generated object */ - Ui::AddFriendWizard ui; -}; - -#endif - diff --git a/retroshare-gui/src/gui/connect/AddFriendWizard.ui b/retroshare-gui/src/gui/connect/AddFriendWizard.ui deleted file mode 100644 index 359c9faff..000000000 --- a/retroshare-gui/src/gui/connect/AddFriendWizard.ui +++ /dev/null @@ -1,806 +0,0 @@ - - AddFriendWizard - - - - 0 - 0 - 508 - 312 - - - - - 0 - 0 - - - - - - - - - 0 - 0 - 0 - - - - - - - 208 - 208 - 208 - - - - - - - 255 - 255 - 255 - - - - - - - 247 - 247 - 247 - - - - - - - 104 - 104 - 104 - - - - - - - 139 - 139 - 139 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 240 - 240 - 240 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 128 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 255 - - - - - - - 255 - 0 - 255 - - - - - - - 231 - 231 - 231 - - - - - - - - - 0 - 0 - 0 - - - - - - - 208 - 208 - 208 - - - - - - - 255 - 255 - 255 - - - - - - - 247 - 247 - 247 - - - - - - - 104 - 104 - 104 - - - - - - - 139 - 139 - 139 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 240 - 240 - 240 - - - - - - - 0 - 0 - 0 - - - - - - - 192 - 192 - 192 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 255 - - - - - - - 255 - 0 - 255 - - - - - - - 231 - 231 - 231 - - - - - - - - - 104 - 104 - 104 - - - - - - - 208 - 208 - 208 - - - - - - - 255 - 255 - 255 - - - - - - - 247 - 247 - 247 - - - - - - - 104 - 104 - 104 - - - - - - - 139 - 139 - 139 - - - - - - - 104 - 104 - 104 - - - - - - - 255 - 255 - 255 - - - - - - - 104 - 104 - 104 - - - - - - - 240 - 240 - 240 - - - - - - - 240 - 240 - 240 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 128 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 255 - - - - - - - 255 - 0 - 255 - - - - - - - 231 - 231 - 231 - - - - - - - - - Arial - 8 - 50 - false - false - false - false - - - - Qt::NoContextMenu - - - Add Friend to my netowork Wizard - - - - - - - - 0 - 260 - 511 - 20 - - - - Qt::Horizontal - - - - - - 270 - 280 - 75 - 23 - - - - < Back - - - - - - 350 - 280 - 75 - 23 - - - - Next > - - - - - - 430 - 280 - 75 - 23 - - - - Cancel - - - - - - 160 - 10 - 341 - 241 - - - - 0 - - - - - - 10 - 10 - 261 - 16 - - - - This Wizard helps to Connect to your Friends - - - - - - 10 - 100 - 311 - 18 - - - - I have a .pqi/.pem file received from a Friend - - - - - - 10 - 80 - 311 - 18 - - - - I have Key received from a Friend - - - - - - 10 - 120 - 321 - 18 - - - - I want to invite a friend to my RetroShare network - - - - - - - - 10 - 30 - 331 - 161 - - - - - - - 10 - 190 - 401 - 60 - - - - Cut and paste the text below into an email. and send it to all your friends! When you press next, RetroShare will attempt to launch a Email client - - - - - - 10 - 10 - 241 - 16 - - - - Invite your Friends to join with RetroShare - - - - - - - - 10 - 10 - 271 - 16 - - - - Enter the Key code you got from your friend: - - - - - - 10 - 30 - 331 - 161 - - - - false - - - - - - 10 - 200 - 331 - 31 - - - - When you press next RetroShare will attempt to connect using the key. - - - - - - - - 10 - 10 - 211 - 16 - - - - Select a pqi/pem file - - - - - - 10 - 50 - 321 - 27 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 6 - - - 6 - - - - - - - - Browse - - - - - - - - - 10 - 90 - 331 - 31 - - - - When you press next RetroShare will attempt to connect using the .pqi/.pem file. - - - - - - - - 10 - 10 - 151 - 251 - - - - - - - - - - - - backButton - nextButton - cancelButton - keyradioButton - pqipemradioButton - inviteradioButton - keyText - lineEdit - loadfileButton - emailText - - - - - - diff --git a/retroshare-gui/src/gui/connect/InviteDialog.cpp b/retroshare-gui/src/gui/connect/InviteDialog.cpp deleted file mode 100644 index 7c78cdd12..000000000 --- a/retroshare-gui/src/gui/connect/InviteDialog.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************** - * RetroShare is distributed under the following license: - * - * Copyright (C) 2006, 2007 crypton - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - ****************************************************************/ - -#include "InviteDialog.h" - -#include "rsiface/rsiface.h" -#include "rsiface/rspeers.h" -//#include - -#include - -/** Default constructor */ -InviteDialog::InviteDialog(QWidget *parent, Qt::WFlags flags) - : QDialog(parent, flags) -{ - /* Invoke Qt Designer generated QObject setup routine */ - ui.setupUi(this); - - /* add a Background image for Invite a Friend Label */ - //WidgetBackgroundImage::setBackgroundImage(ui.invitefriendLabel, ":images/new-contact.png", WidgetBackgroundImage::AdjustHeight); - - connect(ui.sCertButton, SIGNAL(clicked()), this, SLOT(savecertbutton())); - - //setFixedSize(QSize(434, 462)); -} - -void InviteDialog::setInfo(std::string invite) -{ -// ui.emailText->setCurrentFont(QFont("TypeWriter",10)) ; -// ui.emailText->currentFont().setLetterSpacing(QFont::AbsoluteSpacing,1) ; -// ui.emailText->currentFont().setStyleHint(QFont::TypeWriter,QFont::Courier) ; - ui.emailText->setText(QString::fromStdString(invite)); -} - -void InviteDialog::savecertbutton(void) -{ - QString qdir = QFileDialog::getSaveFileName(this, - "Please choose a filename", - QDir::homePath(), - "RetroShare Certificate (*.pqi)"); - - if ( rsPeers->SaveCertificateToFile(rsPeers->getOwnId(), qdir.toStdString()) ) - { - QMessageBox::information(this, tr("RetroShare"), - tr("Certificate file successfully created"), - QMessageBox::Ok, QMessageBox::Ok); - //close the window after messagebox finished - close(); - } - else - { - QMessageBox::information(this, tr("RetroShare"), - tr("Sorry, certificate file creation failed"), - QMessageBox::Ok, QMessageBox::Ok); - } -} - diff --git a/retroshare-gui/src/gui/connect/InviteDialog.h b/retroshare-gui/src/gui/connect/InviteDialog.h deleted file mode 100644 index f11b68fae..000000000 --- a/retroshare-gui/src/gui/connect/InviteDialog.h +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************** - * RetroShare is distributed under the following license: - * - * Copyright (C) 2006, crypton - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - ****************************************************************/ - - -#ifndef _INVITEDIALOG_H -#define _INVITEDIALOG_H - -#include -#include - -#include "ui_InviteDialog.h" - -class InviteDialog : public QDialog -{ - Q_OBJECT - -public: - /** Default constructor */ - InviteDialog(QWidget *parent = 0, Qt::WFlags flags = 0); - /** Default destructor */ - -void setInfo(std::string text); - -public slots: -protected: -private slots: - - /// saves your certificate to file to send to friends - void savecertbutton(); - -private: - - /** Qt Designer generated object */ - Ui::InviteDialog ui; -}; - -#endif - diff --git a/retroshare-gui/src/gui/connect/InviteDialog.ui b/retroshare-gui/src/gui/connect/InviteDialog.ui deleted file mode 100644 index e0b048a6f..000000000 --- a/retroshare-gui/src/gui/connect/InviteDialog.ui +++ /dev/null @@ -1,519 +0,0 @@ - - InviteDialog - - - - 0 - 0 - 577 - 273 - - - - Invite a Friend - - - - - - - 16777215 - 93 - - - - - - - - - 0 - 0 - 0 - - - - - - - 244 - 244 - 244 - - - - - - - 244 - 244 - 244 - - - - - - - 241 - 239 - 226 - - - - - - - 140 - 140 - 140 - - - - - - - 163 - 163 - 163 - - - - - - - 0 - 0 - 0 - - - - - - - 244 - 244 - 244 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 244 - 244 - 244 - - - - - - - 106 - 106 - 106 - - - - - - - 197 - 231 - 246 - - - - - - - 0 - 0 - 0 - - - - - - - 232 - 232 - 232 - - - - - - - - - 0 - 0 - 0 - - - - - - - 244 - 244 - 244 - - - - - - - 244 - 244 - 244 - - - - - - - 241 - 239 - 226 - - - - - - - 140 - 140 - 140 - - - - - - - 163 - 163 - 163 - - - - - - - 0 - 0 - 0 - - - - - - - 244 - 244 - 244 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 244 - 244 - 244 - - - - - - - 106 - 106 - 106 - - - - - - - 244 - 244 - 244 - - - - - - - 0 - 0 - 0 - - - - - - - 232 - 232 - 232 - - - - - - - - - 122 - 122 - 122 - - - - - - - 244 - 244 - 244 - - - - - - - 244 - 244 - 244 - - - - - - - 244 - 244 - 244 - - - - - - - 140 - 140 - 140 - - - - - - - 163 - 163 - 163 - - - - - - - 122 - 122 - 122 - - - - - - - 244 - 244 - 244 - - - - - - - 122 - 122 - 122 - - - - - - - 244 - 244 - 244 - - - - - - - 244 - 244 - 244 - - - - - - - 0 - 0 - 0 - - - - - - - 197 - 231 - 246 - - - - - - - 0 - 0 - 0 - - - - - - - 232 - 232 - 232 - - - - - - - - background-image: url(:/images/invitefriendlabel.png); - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Arial'; font-size:8pt;"><span style=" font-size:16pt; font-weight:600; color:#32cd32;">Invite a Friend</span><br /><span style=" font-size:10pt;">To invite your friends to your retsoshare network you have to provide them your key. Just send them the text below</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Arial';"></p></body></html> - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - 100 - - - - - - - - Courier New - 10 - false - - - - true - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Courier New'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Arial'; font-size:8pt;"></p></body></html> - - - false - - - - - - - - - Alternatively, you can save the certificate information to a file. Please, press button to do this. - - - true - - - - - - - - 0 - 0 - - - - Save Cert To File - - - - - - - - - emailText - - - -