removed not needed old Preferences

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1876 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2009-12-14 17:13:10 +00:00
parent 34c4e500e4
commit bbe773b91c
73 changed files with 257 additions and 10573 deletions

View File

@ -106,7 +106,6 @@ DEPENDPATH += . \
gui\chat \
gui\connect \
gui\images \
gui\Preferences \
gui\common \
gui\toaster \
gui\help\browser \
@ -189,21 +188,8 @@ HEADERS += rshare.h \
gui/msgs/ChanMsgDialog.h \
gui/msgs/ChanCreateDialog.h \
gui/images/retroshare_win.rc.h \
gui/Preferences/configpage.h \
gui/Preferences/configpagestack.h \
gui/Preferences/CryptographyDialog.h \
gui/Preferences/DirectoriesDialog.h \
gui/Preferences/AppearanceDialog.h \
gui/Preferences/GeneralDialog.h \
gui/Preferences/PreferencesWindow.h \
gui/Preferences/ServerDialog.h \
gui/Preferences/NotifyDialog.h \
gui/Preferences/ConfirmQuitDialog.h \
gui/Preferences/rsharesettings.h \
gui/Preferences/rsettings.h \
gui/Preferences/FileAssotiationsDialog.h \
gui/Preferences/AddFileAssotiationDialog.h \
gui/Preferences/SoundDialog.h \
gui/settings/rsharesettings.h \
gui/settings/rsettings.h \
gui/toaster/MessageToaster.h \
gui/toaster/OnlineToaster.h \
gui/toaster/ChatToaster.h \
@ -280,15 +266,6 @@ FORMS += gui/StartDialog.ui \
gui/connect/ConfCertDialog.ui \
gui/msgs/ChanMsgDialog.ui \
gui/msgs/ChanCreateDialog.ui \
gui/Preferences/CryptographyDialog.ui \
gui/Preferences/DirectoriesDialog.ui \
gui/Preferences/AppearanceDialog.ui \
gui/Preferences/GeneralDialog.ui \
gui/Preferences/PreferencesWindow.ui \
gui/Preferences/ServerDialog.ui \
gui/Preferences/NotifyDialog.ui \
gui/Preferences/SoundDialog.ui \
gui/Preferences/ConfirmQuitDialog.ui \
gui/toaster/CallToaster.ui \
gui/toaster/ChatToaster.ui \
gui/toaster/MessageToaster.ui \
@ -377,23 +354,11 @@ SOURCES += main.cpp \
gui/connect/ConfCertDialog.cpp \
gui/msgs/ChanMsgDialog.cpp \
gui/msgs/ChanCreateDialog.cpp \
gui/Preferences/configpagestack.cpp \
gui/Preferences/CryptographyDialog.cpp \
gui/Preferences/DirectoriesDialog.cpp \
gui/Preferences/AppearanceDialog.cpp \
gui/Preferences/GeneralDialog.cpp \
gui/Preferences/PreferencesWindow.cpp \
gui/Preferences/ServerDialog.cpp \
gui/Preferences/NotifyDialog.cpp \
gui/Preferences/ConfirmQuitDialog.cpp \
gui/Preferences/rsharesettings.cpp \
gui/Preferences/rsettings.cpp \
gui/Preferences/FileAssotiationsDialog.cpp \
gui/Preferences/AddFileAssotiationDialog.cpp \
gui/Preferences/SoundDialog.cpp \
gui/common/vmessagebox.cpp \
gui/common/rwindow.cpp \
gui/common/html.cpp \
gui/settings/rsharesettings.cpp \
gui/settings/rsettings.cpp \
gui/statusbar/peerstatus.cpp \
gui/statusbar/natstatus.cpp \
gui/statusbar/ratesstatus.cpp \
@ -491,7 +456,7 @@ newsettings {
gui/settings/AppearancePage.h \
gui/settings/FileAssociationsPage.h \
gui/settings/SoundPage.h \
gui/settings/AddFileAssociationDialog.h
gui/settings/AddFileAssociationDialog.h\
FORMS += gui/settings/settings.ui \
gui/settings/GeneralPage.ui \

View File

@ -24,7 +24,7 @@
#include <rsiface/rsinit.h>
#include "GenCertDialog.h"
#include "InfoDialog.h"
#include "gui/Preferences/rsharesettings.h"
#include "gui/settings/rsharesettings.h"
#include <QFileDialog>
#include <QMessageBox>
#include <util/WidgetBackgroundImage.h>

View File

@ -26,7 +26,7 @@
#include "mainpage.h"
#include "ui_MessengerWindow.h"
#include "NetworkDialog.h"
#include <gui/Preferences/rsharesettings.h>
#include <gui/settings/rsharesettings.h>
#include <gui/common/rwindow.h>
class LogoBar;

View File

@ -26,7 +26,7 @@
#include <QFileDialog>
#include <QtGui>
#include "Preferences/rsharesettings.h"
#include "settings/rsharesettings.h"
#include "mainpage.h"
#include "ui_NetworkDialog.h"

View File

@ -34,7 +34,7 @@
#include "feeds/BlogMsgItem.h"
#include "feeds/MsgItem.h"
#include "Preferences/rsharesettings.h"
#include "settings/rsharesettings.h"
#include "GeneralMsgDialog.h"

View File

@ -1,228 +0,0 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2009 The RetroShare Team, Oleksiy Bilyanskyy
*
* 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 "AddFileAssotiationDialog.h"
//#include "rshare.h" // for Rshare::dataDirectory() method
//#include "rsharesettings.h"
#include <QSettings> //for win registry access
#include <QApplication>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QGridLayout>
#include <QSizePolicy>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QDialogButtonBox>
#include <QMessageBox>
#include <QDebug>
//============================================================================
AddFileAssotiationDialog::AddFileAssotiationDialog(bool onlyEdit,
QWidget* parent)
:QDialog(parent)
{
fileTypeLabel = new QLabel();
fileTypeLabel->setText(tr("File type(extension):"));
fileTypeEdit = new QLineEdit();
fileTypeEdit->setEnabled( !onlyEdit );
fileTypeEdit->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
fileTypeEdit->setFixedWidth(50);
connect(fileTypeEdit, SIGNAL( textEdited( const QString& )),
this , SLOT( fileTypeEdited(const QString & )) ) ;
loadSystemDefault = new QPushButton();
loadSystemDefault->setText(tr("Use default command"));
loadSystemDefault->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
loadSystemDefault->setEnabled( fileTypeEdit &&
(!(fileTypeEdit->text().isEmpty())) ) ;
connect(loadSystemDefault, SIGNAL(clicked()),
this, SLOT(loadSystemDefaultCommand()));
loadSystemDefault->setVisible(false); //the button sholud remain unvisivle,
//until it will work properly
commandLabel = new QLabel();
commandLabel->setText(tr("Command"));
commandEdit = new QLineEdit;
selectExecutable = new QPushButton();
selectExecutable->setText("...");
selectExecutable->setFixedWidth(30);
QHBoxLayout* ftlay = new QHBoxLayout();
ftlay->addWidget( fileTypeLabel );
ftlay->addWidget( fileTypeEdit );
buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
| QDialogButtonBox::Cancel );
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
QGridLayout* mainLay = new QGridLayout();
mainLay->addWidget(fileTypeLabel,0,0,1,1, Qt::AlignLeft);
mainLay->addWidget(fileTypeEdit,0,1,1,1, Qt::AlignLeft);
mainLay->addWidget(loadSystemDefault, 0,2,1,2,Qt::AlignRight);
mainLay->addWidget( commandLabel, 1,0,1,1, Qt::AlignLeft);
mainLay->addWidget( commandEdit, 1,1,1,2);
mainLay->addWidget( selectExecutable, 1,3,1,1);
mainLay->addWidget( buttonBox, 2,1,1,4, Qt::AlignLeft);
mainLay->setColumnStretch(2,1);
mainLay->setRowStretch(2,1);
this->setLayout( mainLay );
//TODO: in the next line we have to count a real height of the dialog;
// It's not good to use a hardcoded const value;
this->resize(600,200);//this->height());
}
//============================================================================
void
AddFileAssotiationDialog::fileTypeEdited(const QString & text )
{
loadSystemDefault->setEnabled( !( text.isEmpty() ) );
}
//============================================================================
void
AddFileAssotiationDialog::setFileType(QString ft)
{
fileTypeEdit->setText(ft);
}
//============================================================================
void
AddFileAssotiationDialog::loadSystemDefaultCommand()
{
qDebug() << " lsdc is here";
QString fileExt = cleanFileType(fileTypeEdit->text()) ;
//fileExt.prepend('/');
fileExt.append("/.");
qDebug() << " fileExt is " << fileExt;
QSettings reg("HKEY_CLASSES_ROOT", QSettings::NativeFormat);
if (reg.contains(fileExt))
{
QString appKey = reg.value(fileExt).toString();
qDebug() << " got app key " << appKey;
appKey.append("/shell/open/command/.");
QString command = reg.value(appKey, "-").toString();
if (command!="-")
{
qDebug() << " got command :" << command ;
commandEdit->setText( command );
return;
}
}
QMessageBox::warning(this, tr("RetroShare"),
tr("Sorry, can't determine system "
"default command for this file\n"),
QMessageBox::Ok);
}
//============================================================================
QString
AddFileAssotiationDialog::cleanFileType(QString ft)
{
QString result = ft;
//-- first remove possible filder names from received filename. (like
// "like "/moviedir/file.avi", we will leave only "file.avi"
int ti;
// dirs may be separated with "/"
ti = result.lastIndexOf('/');
if (ti > -1)
{
result.remove(0,ti+1);
}
// or "\"
ti = result.lastIndexOf('\\');
if (ti > -1)
{
result.remove(0,ti+1);
}
//-- then, if it is filename (like "file.avi"), we'll have to remove
//-- the name (ans leave just ".avi")
ti = result.lastIndexOf('.');
if (ti > -1)
{
result.remove(0,ti);
return result;
}
//-- also, if filename still is not prepended with dot, do it
if ((!result.isEmpty()) && (result.at(0)!='.'))
result.prepend('.');
//-- that's all
return result;
}
//============================================================================
QString
AddFileAssotiationDialog::resultCommand()
{
return commandEdit->text();
}
//============================================================================
QString
AddFileAssotiationDialog::resultFileType()
{
return cleanFileType( fileTypeEdit->text() ) ;
}
//============================================================================
void
AddFileAssotiationDialog::setCommand(QString cmd)
{
commandEdit->setText( cmd );
}
//============================================================================
//============================================================================

View File

@ -1,80 +0,0 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2009 The RetroShare Team, Oleksiy Bilyanskyy
*
* 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 __AddFileAssotiationDialog__
#define __AddFileAssotiationDialog__
#include <QString>
#include <QDialog>
class QPushButton;
class QDialogButtonBox;
class QLabel;
class QLineEdit;
//=============================================================================
//! A dialog for specifying file type and associated command
class AddFileAssotiationDialog: public QDialog
{
Q_OBJECT
public:
//! constructor
//! if (onlyEdit == true), user woll not be able to change file type,
//! only command (used for editing existing commands)
AddFileAssotiationDialog( bool onlyEdit = false, QWidget *parent = 0 ) ;
virtual ~AddFileAssotiationDialog(){};
void setFileType(QString ft);
void setCommand(QString cmd);
//! Gets file type (file extension) from given filename (or other string)
//! "file type" has to be like '.png'(some symbols, prepended by a dot)
static QString cleanFileType(QString ft);
QString resultCommand();
QString resultFileType();
protected:
//QTabWidget *tabWidget;
QLabel* fileTypeLabel;
QLineEdit* fileTypeEdit;
QPushButton* loadSystemDefault;
QPushButton* selectExecutable;
QLabel* commandLabel;
QLineEdit* commandEdit;
QDialogButtonBox *buttonBox;
protected slots:
void fileTypeEdited(const QString & text );
//! On win32, loads default command from system registry.
//! Unfinished. Is not used in current version.
void loadSystemDefaultCommand();
};
#endif

View File

@ -1,135 +0,0 @@
/****************************************************************
* RShare 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 <rshare.h>
#include "AppearanceDialog.h"
/** Constructor */
AppearanceDialog::AppearanceDialog(QWidget *parent)
: ConfigPage(parent)
{
/* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this);
/* Create RshareSettings object */
_settings = new RshareSettings();
connect(ui.styleSheetCombo, SIGNAL(clicked()), this, SLOT(loadStyleSheet()));
/* Populate combo boxes */
foreach (QString code, LanguageSupport::languageCodes()) {
ui.cmboLanguage->addItem(QIcon(":/images/flags/" + code + ".png"),
LanguageSupport::languageName(code),
code);
}
foreach (QString style, QStyleFactory::keys()) {
ui.cmboStyle->addItem(style, style.toLower());
}
ui.styleSheetCombo->setCurrentIndex(ui.styleSheetCombo->findText("Default"));
//loadStyleSheet("Default");
loadqss();
/* Hide platform specific features */
#ifdef Q_WS_WIN
#endif
}
/** Saves the changes on this page */
bool
AppearanceDialog::save(QString &errmsg)
{
Q_UNUSED(errmsg);
QString languageCode =
LanguageSupport::languageCode(ui.cmboLanguage->currentText());
_settings->setLanguageCode(languageCode);
_settings->setInterfaceStyle(ui.cmboStyle->currentText());
_settings->setSheetName(ui.styleSheetCombo->currentText());
/* Set to new style */
Rshare::setStyle(ui.cmboStyle->currentText());
return true;
}
/** Loads the settings for this page */
void
AppearanceDialog::load()
{
int index = ui.cmboLanguage->findData(_settings->getLanguageCode());
ui.cmboLanguage->setCurrentIndex(index);
index = ui.cmboStyle->findData(Rshare::style().toLower());
ui.cmboStyle->setCurrentIndex(index);
ui.styleSheetCombo->setCurrentIndex(ui.styleSheetCombo->findText(_settings->getSheetName()));
/** load saved internal styleSheet **/
//QFile file(":/qss/" + (_settings->getSheetName().toLower()) + ".qss");
/** load saved extern Stylesheets **/
QFile file(QApplication::applicationDirPath() + "/qss/" + (_settings->getSheetName().toLower()) + ".qss");
file.open(QFile::ReadOnly);
QString styleSheet = QLatin1String(file.readAll());
qApp->setStyleSheet(styleSheet);
}
void AppearanceDialog::on_styleSheetCombo_activated(const QString &sheetName)
{
loadStyleSheet(sheetName);
}
void AppearanceDialog::loadStyleSheet(const QString &sheetName)
{
/** internal Stylesheets **/
//QFile file(":/qss/" + sheetName.toLower() + ".qss");
/** extern Stylesheets **/
QFile file(QApplication::applicationDirPath() + "/qss/" + sheetName.toLower() + ".qss");
file.open(QFile::ReadOnly);
QString styleSheet = QLatin1String(file.readAll());
qApp->setStyleSheet(styleSheet);
}
void AppearanceDialog::loadqss()
{
QFileInfoList slist = QDir(QApplication::applicationDirPath() + "/qss/").entryInfoList();
foreach(QFileInfo st, slist)
{
if(st.fileName() != "." && st.fileName() != ".." && st.isFile())
ui.styleSheetCombo->addItem(st.fileName().remove(".qss"));
}
}

View File

@ -1,65 +0,0 @@
/****************************************************************
* RShare 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 _LOGDIALOG_H
#define _LOGDIALOG_H
#include <QFileDialog>
#include <QStyleFactory>
#include "rsharesettings.h"
#include <lang/languagesupport.h>
#include "configpage.h"
#include "ui_AppearanceDialog.h"
class AppearanceDialog : public ConfigPage
{
Q_OBJECT
public:
/** Default Constructor */
AppearanceDialog(QWidget *parent = 0);
/** Default Destructor */
/** Saves the changes on this page */
bool save(QString &errmsg);
/** Loads the settings for this page */
void load();
private slots:
void on_styleSheetCombo_activated(const QString &styleSheetName);
private:
/** A RshareSettings object used for saving/loading settings */
RshareSettings* _settings;
void loadStyleSheet(const QString &sheetName);
void loadqss();
/** Qt Designer generated object */
Ui::AppearanceDialog ui;
};
#endif

View File

@ -1,786 +0,0 @@
<ui version="4.0" >
<class>AppearanceDialog</class>
<widget class="QWidget" name="AppearanceDialog" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>410</width>
<height>300</height>
</rect>
</property>
<property name="palette" >
<palette>
<active>
<colorrole role="WindowText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>128</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>192</red>
<green>192</green>
<blue>192</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>128</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="font" >
<font>
<family>Arial</family>
<pointsize>8</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>6</number>
</property>
<property name="topMargin" >
<number>6</number>
</property>
<property name="rightMargin" >
<number>6</number>
</property>
<property name="bottomMargin" >
<number>6</number>
</property>
<property name="horizontalSpacing" >
<number>0</number>
</property>
<property name="verticalSpacing" >
<number>0</number>
</property>
<item row="0" column="0" >
<widget class="QGroupBox" name="grpLanguage" >
<property name="minimumSize" >
<size>
<width>0</width>
<height>75</height>
</size>
</property>
<property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum>
</property>
<property name="title" >
<string>Language</string>
</property>
<widget class="QWidget" name="layoutWidget_2" >
<property name="geometry" >
<rect>
<x>10</x>
<y>44</y>
<width>341</width>
<height>26</height>
</rect>
</property>
<layout class="QGridLayout" >
<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>
<property name="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<number>6</number>
</property>
<item row="0" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>300</width>
<height>16</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0" >
<widget class="QComboBox" name="cmboLanguage" >
<property name="minimumSize" >
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum>
</property>
<property name="toolTip" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:10pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Choose the language used in RetroShare&lt;/p>&lt;/body>&lt;/html></string>
</property>
<property name="editable" >
<bool>false</bool>
</property>
<property name="iconSize" >
<size>
<width>24</width>
<height>16</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QLabel" name="label" >
<property name="geometry" >
<rect>
<x>10</x>
<y>27</y>
<width>591</width>
<height>17</height>
</rect>
</property>
<property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum>
</property>
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; font-family:Arial; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;">&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Changes to language will only take effect after restarting RetroShare!&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</widget>
</item>
<item row="1" column="0" >
<widget class="QGroupBox" name="grpStyle" >
<property name="minimumSize" >
<size>
<width>0</width>
<height>64</height>
</size>
</property>
<property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum>
</property>
<property name="toolTip" >
<string/>
</property>
<property name="title" >
<string>Style</string>
</property>
<widget class="QWidget" name="layoutWidget" >
<property name="geometry" >
<rect>
<x>10</x>
<y>24</y>
<width>341</width>
<height>26</height>
</rect>
</property>
<layout class="QGridLayout" >
<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>
<property name="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QComboBox" name="cmboStyle" >
<property name="minimumSize" >
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum>
</property>
<property name="toolTip" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:10pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Choose RetroShare's interface style&lt;/p>&lt;/body>&lt;/html></string>
</property>
<property name="editable" >
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
<item row="2" column="0" >
<widget class="QGroupBox" name="groupBox" >
<property name="minimumSize" >
<size>
<width>0</width>
<height>64</height>
</size>
</property>
<property name="title" >
<string>Style Sheet</string>
</property>
<widget class="QWidget" name="layoutWidget_3" >
<property name="geometry" >
<rect>
<x>11</x>
<y>20</y>
<width>341</width>
<height>25</height>
</rect>
</property>
<layout class="QGridLayout" >
<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>
<property name="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<number>6</number>
</property>
<item row="0" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>181</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0" >
<widget class="QComboBox" name="styleSheetCombo" >
<property name="minimumSize" >
<size>
<width>150</width>
<height>0</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item row="3" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>361</width>
<height>61</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources>
<include location="../images.qrc" />
</resources>
<connections/>
</ui>

View File

@ -1,26 +0,0 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2006, 2007 The RetroShare Team
*
* 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 "ConfirmQuitDialog.h"
ConfirmQuitDialog::ConfirmQuitDialog(QWidget * parent) : QDialog(parent)
{
setupUi(this);
}

View File

@ -1,37 +0,0 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2006, 2007 The RetroShare Team
*
* 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 _ConfirmQuitDialog_h
#define _ConfirmQuitDialog_h_
#include <QDialog>
#include "ui_ConfirmQuitDialog.h"
class ConfirmQuitDialog : public QDialog, public Ui::ConfirmQuitDialog
{
Q_OBJECT
public:
ConfirmQuitDialog(QWidget * parent = 0);
private slots:
};
#endif

View File

@ -1,237 +0,0 @@
<ui version="4.0" >
<class>ConfirmQuitDialog</class>
<widget class="QDialog" name="ConfirmQuitDialog" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>500</width>
<height>160</height>
</rect>
</property>
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>1</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>500</width>
<height>160</height>
</size>
</property>
<property name="windowTitle" >
<string>Exit RetroShare</string>
</property>
<property name="windowIcon" >
<iconset resource="../images.qrc" >:/images/RetroShare16.png</iconset>
</property>
<property name="autoFillBackground" >
<bool>true</bool>
</property>
<widget class="QWidget" name="layoutWidget" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>500</width>
<height>155</height>
</rect>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>5</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="label" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="autoFillBackground" >
<bool>true</bool>
</property>
<property name="text" >
<string/>
</property>
<property name="pixmap" >
<pixmap resource="../images.qrc" >:/images/informations_24x24.png</pixmap>
</property>
<property name="scaledContents" >
<bool>true</bool>
</property>
<property name="alignment" >
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="quitWarnMessage" >
<property name="windowModality" >
<enum>Qt::ApplicationModal</enum>
</property>
<property name="minimumSize" >
<size>
<width>200</width>
<height>50</height>
</size>
</property>
<property name="autoFillBackground" >
<bool>true</bool>
</property>
<property name="text" >
<string>You are about to exit the RetroShare application and therefore stop all transfers. &lt;br>&lt;br>Are you sure you want to stop and exit RetroShare?</string>
</property>
<property name="textFormat" >
<enum>Qt::AutoText</enum>
</property>
<property name="scaledContents" >
<bool>false</bool>
</property>
<property name="alignment" >
<set>Qt::AlignJustify|Qt::AlignTop</set>
</property>
<property name="wordWrap" >
<bool>true</bool>
</property>
<property name="margin" >
<number>6</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0" >
<layout class="QHBoxLayout" >
<property name="margin" >
<number>5</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QCheckBox" name="reminderCheckBox" >
<property name="minimumSize" >
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="text" >
<string>Do not show this message again.</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>80</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons" >
<set>QDialogButtonBox::No|QDialogButtonBox::NoButton|QDialogButtonBox::Yes</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
<resources>
<include location="../images.qrc" />
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>ConfirmQuitDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
<x>462</x>
<y>160</y>
</hint>
<hint type="destinationlabel" >
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>ConfirmQuitDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel" >
<x>462</x>
<y>160</y>
</hint>
<hint type="destinationlabel" >
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -1,136 +0,0 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2006 - 2009 RetroShare Team
*
* 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 "rsiface/rspeers.h" //for rsPeers variable
#include "rsiface/rsiface.h"
#include <QtGui>
#include <QClipboard>
#include <rshare.h>
#include "CryptographyDialog.h"
#include <sstream>
#include <iostream>
#include <set>
/** Constructor */
CryptographyDialog::CryptographyDialog(QWidget *parent)
: ConfigPage(parent)
{
/* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this);
/* Create RshareSettings object */
_settings = new RshareSettings();
connect(ui.copykeyButton, SIGNAL(clicked()), this, SLOT(copyPublicKey()));
connect(ui.exportkeyButton, SIGNAL(clicked()), this, SLOT(exportPublicKey()));
loadPublicKey();
/* Hide platform specific features */
#ifdef Q_WS_WIN
#endif
}
/** Saves the changes on this page */
bool
CryptographyDialog::save(QString &errmsg)
{
return true;
}
/** Loads the settings for this page */
void
CryptographyDialog::load()
{
}
/** Loads ouer default Puplickey */
void
CryptographyDialog::loadPublicKey()
{
//std::cerr << "CryptoPage() getting Invite" << std::endl;
std::string invite = rsPeers->GetRetroshareInvite();
RsPeerDetails ownDetail;
rsPeers->getPeerDetails(rsPeers->getOwnId(), ownDetail);
invite += LOCAL_IP;
invite += ownDetail.localAddr + ":";
std::ostringstream out;
out << ownDetail.localPort;
invite += out.str() + ";";
invite += "\n";
invite += EXT_IP;
invite += ownDetail.extAddr + ":";
std::ostringstream out2;
out2 << ownDetail.extPort;
invite += out2.str() + ";";
ui.certtextEdit->setText(QString::fromStdString(invite));
ui.certtextEdit->setReadOnly(true);
ui.certtextEdit->setMinimumHeight(200);
//std::cerr << "CryptoPage() getting Invite: " << invite << std::endl;
}
void
CryptographyDialog::copyPublicKey()
{
QMessageBox::information(this,
tr("RetroShare"),
tr("Your Public Key is copied to Clipbard, paste and send it to your"
"friend via email or some other way"));
QClipboard *clipboard = QApplication::clipboard();
clipboard->setText(ui.certtextEdit->toPlainText());
}
void
CryptographyDialog::exportPublicKey()
{
qDebug() << " exportPulicKey";
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);
}
else
{
QMessageBox::information(this, tr("RetroShare"),
tr("Sorry, certificate file creation failed"),
QMessageBox::Ok, QMessageBox::Ok);
}
}

View File

@ -1,66 +0,0 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2006 - 2009 RetroShare Team
*
* 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 _CRYPTOGRAPHYDIALOG_H
#define _CRYPTOGRAPHYDIALOG_H
#include <QFileDialog>
#include <gui/Preferences/rsharesettings.h>
#include "gui/connect/ConnectFriendWizard.h"
#include "configpage.h"
#include "ui_CryptographyDialog.h"
class CryptographyDialog : public ConfigPage
{
Q_OBJECT
public:
/** Default Constructor */
CryptographyDialog(QWidget *parent = 0);
/** Default Destructor */
/** Saves the changes on this page */
bool save(QString &errmsg);
/** Loads the settings for this page */
void load();
private slots:
void loadPublicKey();
void copyPublicKey();
void exportPublicKey();
private:
/** A RshareSettings object used for saving/loading settings */
RshareSettings* _settings;
/** Qt Designer generated object */
Ui::CryptographyDialog ui;
};
#endif

View File

@ -1,590 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CryptographyDialog</class>
<widget class="QWidget" name="CryptographyDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>542</width>
<height>355</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>128</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>192</red>
<green>192</green>
<blue>192</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>128</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="font">
<font>
<family>Arial</family>
<pointsize>8</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Public Key</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QTextEdit" name="certtextEdit"/>
</item>
</layout>
</widget>
</item>
<item row="0" column="1">
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_2">
<item row="3" column="0">
<widget class="QPushButton" name="exportkeyButton">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Export my Key as file&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Export Key</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="copykeyButton">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Copy my Key to Clipboard&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Copy Key</string>
</property>
</widget>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>58</width>
<height>298</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<resources>
<include location="../images.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -1,234 +0,0 @@
/****************************************************************
* RShare 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 <rshare.h>
#include "rsiface/rsfiles.h"
#include "DirectoriesDialog.h"
#include "gui/ShareManager.h"
#include <algorithm>
/** Constructor */
DirectoriesDialog::DirectoriesDialog(QWidget *parent)
: ConfigPage(parent)
{
/* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this);
/* Create RshareSettings object */
_settings = new RshareSettings();
// connect(ui.addButton, SIGNAL(clicked( bool ) ), this , SLOT( addShareDirectory() ) );
// connect(ui.removeButton, SIGNAL(clicked( bool ) ), this , SLOT( removeShareDirectory() ) );
connect(ui.incomingButton, SIGNAL(clicked( bool ) ), this , SLOT( setIncomingDirectory() ) );
connect(ui.partialButton, SIGNAL(clicked( bool ) ), this , SLOT( setPartialsDirectory() ) );
connect(ui.checkBox, SIGNAL(stateChanged(int)), this, SLOT(shareDownloadDirectory(int)));
connect(ui.editButton, SIGNAL(clicked()), this, SLOT(editDirectories()));
#ifdef TO_REMOVE
ui.addButton->setToolTip(tr("Add a Share Directory"));
ui.removeButton->setToolTip(tr("Remove Shared Directory"));
#endif
ui.incomingButton->setToolTip(tr("Browse"));
ui.partialButton->setToolTip(tr("Browse"));
if (rsFiles->getShareDownloadDirectory())
{
ui.checkBox->setDown(true); /* signal not emitted */
}
else
{
ui.checkBox->setDown(false); /* signal not emitted */
}
/* Hide platform specific features */
#ifdef Q_WS_WIN
#endif
}
void DirectoriesDialog::editDirectories()
{
ShareManager::showYourself() ;
}
/** Saves the changes on this page */
bool DirectoriesDialog::save(QString &errmsg)
{
/* this is usefull especially when shared incoming files is
* default option and when the user don't check/uncheck the
* checkBox, so no signal is emitted to update the shared list */
if (ui.checkBox->isChecked())
{
std::list<SharedDirInfo>::const_iterator it;
std::list<SharedDirInfo> dirs;
rsFiles->getSharedDirectories(dirs);
bool found = false ;
for(std::list<SharedDirInfo>::const_iterator it(dirs.begin());it!=dirs.end();++it)
if((*it).filename == rsFiles->getDownloadDirectory())
{
found=true ;
break ;
}
if(!found)
rsFiles->shareDownloadDirectory();
rsFiles->setShareDownloadDirectory(true);
}
else
{
rsFiles->unshareDownloadDirectory();
rsFiles->setShareDownloadDirectory(false);
}
return true;
}
/** Loads the settings for this page */
void DirectoriesDialog::load()
{
std::list<SharedDirInfo>::const_iterator it;
std::list<SharedDirInfo> dirs;
rsFiles->getSharedDirectories(dirs);
/* get a link to the table */
QListWidget *listWidget = ui.dirList;
/* remove old items ??? */
listWidget->clear();
for(it = dirs.begin(); it != dirs.end(); it++)
{
/* (0) Dir Name */
listWidget->addItem(QString::fromStdString((*it).filename));
}
ui.incomingDir->setText(QString::fromStdString(rsFiles->getDownloadDirectory()));
ui.partialsDir->setText(QString::fromStdString(rsFiles->getPartialsDirectory()));
listWidget->update(); /* update display */
}
#ifdef TO_REMOVE
void DirectoriesDialog::addShareDirectory()
{
/* select a dir
*/
int ind;
QString qdir = QFileDialog::getExistingDirectory(this, tr("Add Shared Directory"), "",
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
ind=qdir.lastIndexOf("/");
/* add it to the server */
std::string dir = qdir.toStdString();
if (dir != "")
{
rsFiles->addSharedDirectory(dir);
load();
}
}
void DirectoriesDialog::removeShareDirectory()
{
/* id current dir */
/* ask for removal */
QListWidget *listWidget = ui.dirList;
QListWidgetItem *qdir = listWidget -> currentItem();
if (qdir)
{
rsFiles->removeSharedDirectory( qdir->text().toStdString());
load();
}
}
#endif
void DirectoriesDialog::setIncomingDirectory()
{
QString qdir = QFileDialog::getExistingDirectory(this, tr("Set Incoming Directory"), "",
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
std::string dir = qdir.toStdString();
if (dir != "")
{
rsFiles->setDownloadDirectory(dir);
if (ui.checkBox->isChecked())
{
std::list<SharedDirInfo>::const_iterator it;
std::list<SharedDirInfo> dirs;
rsFiles->getSharedDirectories(dirs);
bool found = false ;
for(std::list<SharedDirInfo>::const_iterator it(dirs.begin());it!=dirs.end();++it)
if((*it).filename == rsFiles->getDownloadDirectory())
{
found=true ;
break ;
}
if(!found)
rsFiles->shareDownloadDirectory();
}
}
load();
}
void DirectoriesDialog::setPartialsDirectory()
{
QString qdir = QFileDialog::getExistingDirectory(this, tr("Set Partials Directory"), "",
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
std::string dir = qdir.toStdString();
if (dir != "")
{
rsFiles->setPartialsDirectory(dir);
}
load();
}
void DirectoriesDialog::shareDownloadDirectory(int state)
{
if (state == Qt::Checked)
{
std::list<SharedDirInfo>::const_iterator it;
std::list<SharedDirInfo> dirs;
rsFiles->getSharedDirectories(dirs);
bool found = false ;
for(std::list<SharedDirInfo>::const_iterator it(dirs.begin());it!=dirs.end();++it)
if((*it).filename == rsFiles->getDownloadDirectory())
{
found=true ;
break ;
}
if(!found)
rsFiles->shareDownloadDirectory();
rsFiles->setShareDownloadDirectory(true);
}
else
{
rsFiles->unshareDownloadDirectory();
rsFiles->setShareDownloadDirectory(false);
}
load();
}

View File

@ -1,66 +0,0 @@
/****************************************************************
* RShare 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 _DIRECTORIESDIALOG_H
#define _DIRECTORIESDIALOG_H
#include <QFileDialog>
#include "rsharesettings.h"
#include "configpage.h"
#include "ui_DirectoriesDialog.h"
class DirectoriesDialog : public ConfigPage
{
Q_OBJECT
public:
/** Default Constructor */
DirectoriesDialog(QWidget *parent = 0);
/** Default Destructor */
/** Saves the changes on this page */
bool save(QString &errmsg);
/** Loads the settings for this page */
void load();
private slots:
#ifdef TO_REMOVE
void addShareDirectory();
void removeShareDirectory();
#endif
void editDirectories() ;
void setIncomingDirectory();
void setPartialsDirectory();
void shareDownloadDirectory(int state);
private:
/** A RshareSettings object used for saving/loading settings */
RshareSettings* _settings;
/** Qt Designer generated object */
Ui::DirectoriesDialog ui;
};
#endif

View File

@ -1,649 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DirectoriesDialog</class>
<widget class="QWidget" name="DirectoriesDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>483</width>
<height>337</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>128</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>192</red>
<green>192</green>
<blue>192</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>128</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="font">
<font>
<family>Arial</family>
<pointsize>10</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="mouseTracking">
<bool>true</bool>
</property>
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
<layout class="QGridLayout">
<property name="margin">
<number>6</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Incoming Directory</string>
</property>
<layout class="QGridLayout">
<item row="0" column="0">
<widget class="QLineEdit" name="incomingDir">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="incomingButton">
<property name="minimumSize">
<size>
<width>31</width>
<height>31</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>31</width>
<height>31</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/directoryselect_24x24_shadow.png</normaloff>:/images/directoryselect_24x24_shadow.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Partials Direcrtory</string>
</property>
<layout class="QGridLayout">
<item row="0" column="0">
<widget class="QLineEdit" name="partialsDir">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="partialButton">
<property name="minimumSize">
<size>
<width>31</width>
<height>31</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>31</width>
<height>31</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/directoryselect_24x24_shadow.png</normaloff>:/images/directoryselect_24x24_shadow.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Shared Directories</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QListWidget" name="dirList"/>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="editButton">
<property name="text">
<string>Edit</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Automatically share incoming directory (Recommanded)</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<tabstops>
<tabstop>incomingDir</tabstop>
<tabstop>incomingButton</tabstop>
<tabstop>dirList</tabstop>
</tabstops>
<resources>
<include location="../images.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -1,379 +0,0 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2009 The RetroShare Team, Oleksiy Bilyanskyy
*
* 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 "FileAssotiationsDialog.h"
#include "AddFileAssotiationDialog.h"
//#include "rshare.h" // for Rshare::dataDirectory() method
#include "rsharesettings.h"
#include <QSettings>
#include <QApplication>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QGridLayout>
#include <QSizePolicy>
//#include <QLabel>
//#include <QLineEdit>
#include <QToolBar>
#include <QTableWidget>
#include <QTableWidgetItem>
#include <QPushButton>
#include <QDialogButtonBox>
#include <QStringList>
#include <QAction>
#include <QMessageBox>
#include <QProcess>
#include <QDebug>
#include <QMessageBox>
//#include <iostream>
//============================================================================
FileAssotiationsDialog::FileAssotiationsDialog(QWidget* parent)
:ConfigPage(parent)
//:QFrame()
{
QVBoxLayout* pageLay = new QVBoxLayout(this);
toolBar = new QToolBar("actions", this);
newAction = new QAction(QIcon(":/images/add_24x24.png"), tr("&New"), this);
//newAction->setShortcut(tr("Ctrl+N"));
newAction->setStatusTip(tr("Add new assotiation"));
connect(newAction, SIGNAL(triggered()), this, SLOT(addnew()));
toolBar->addAction(newAction);
editAction = new QAction(QIcon(":/images/kcmsystem24.png"),
tr("&Edit"), this);
editAction->setStatusTip(tr("Edit this assotiation"));
connect(editAction, SIGNAL(triggered()), this, SLOT(edit()));
toolBar->addAction(editAction);
removeAction = new QAction(QIcon(":/images/edit_remove24.png"),
tr("&Remove"), this);
removeAction->setStatusTip(tr("Remove this assotiation"));
connect(removeAction, SIGNAL(triggered()), this, SLOT(remove()));
toolBar->addAction( removeAction );
pageLay->addWidget( toolBar );
table = new QTableWidget(5,2,this);//default 5 rows, 2 columns
table->setHorizontalHeaderItem(0, new QTableWidgetItem(tr("File type") ) );
table->setHorizontalHeaderItem(1, new QTableWidgetItem("Command") );
connect( table, SIGNAL( cellActivated(int, int)),
this, SLOT( tableCellActivated(int, int)) );
connect( table, SIGNAL( cellClicked(int, int)),
this, SLOT( tableCellActivated(int, int)) );
// connect( table, SIGNAL( cellChanged(int, int)),
// this, SLOT( tableCellActivated(int, int)) );
//
// connect( table, SIGNAL( cellDoubleClicked(int, int)),
// this, SLOT( tableCellActivated(int, int)) );
//
// connect( table, SIGNAL( cellEntered(int, int)),
// this, SLOT( tableCellActivated(int, int)) );
//
// connect( table, SIGNAL( cellPressed(int, int)),
// this, SLOT( tableCellActivated(int, int)) );
// connect( table, SIGNAL( itemClicked(QTableWidgetItem*)),
// this, SLOT( tableItemActivated(QTableWidgetItem*)) );
pageLay->addWidget(table);
// addNewAssotiationButton = new QPushButton;
// addNewAssotiationButton->setText(tr("Add.."));
// QHBoxLayout* anbLay = new QHBoxLayout;
// anbLay->addStretch();
// anbLay->addWidget(addNewAssotiationButton);
// pageLay->addLayout(anbLay);
// connect( addNewAssotiationButton, SIGNAL( clicked() ),
// this, SLOT( testButtonClicked() ) );
settings = new RshareSettings();
//new QSettings( qApp->applicationDirPath()+"/sett.ini",
// QSettings::IniFormat);
settings->beginGroup("FileAssotiations");
}
//============================================================================
FileAssotiationsDialog::~FileAssotiationsDialog()
{
delete settings ;
}
//============================================================================
bool
FileAssotiationsDialog::save (QString &errmsg)
{
//RshareSettings* settings = new RshareSettings();
// settings->beginGroup("FileAssotiations");
// settings->setValue(".s01", "s01 test");
// settings->setValue(".s02", "s02 test");
// settings->setValue(".s03", "s03 test");
// settings->setValue(".s04", "s04 test");
// QMap<QString, QString>::const_iterator ati = ations.constBegin();
// while (ati != ations.constEnd())
// {
// settings->setValue( ati.key(), ati.value() );
// qDebug() << " - " << ati.key() << ati.value() << "\n" ;
// ati++;
// }
//
// settings->endGroup();
settings->sync();
// delete settings;
/* */
return true;
}
//============================================================================
void
FileAssotiationsDialog::load()
{
//RshareSettings* settings = new RshareSettings();
// QSettings* settings = new QSettings( qApp->applicationDirPath()+"/sett.ini",
// QSettings::IniFormat);
//
// settings->beginGroup("FileAssotiations");
QStringList keys = settings->allKeys();
table->setRowCount( keys.count() );
int rowi = 0;
QStringList::const_iterator ki;
for(ki=keys.constBegin(); ki!=keys.constEnd(); ki++)
{
QString val = (settings->value(*ki, "")).toString();
addNewItemToTable( rowi, 0, *ki );
addNewItemToTable( rowi, 1, val );
rowi++;
}
//delete settings;
if (keys.count()==0)
{
removeAction->setEnabled(false);
editAction->setEnabled(false);
}
table->selectRow(0);
}
//============================================================================
void
FileAssotiationsDialog::remove()
{
int currentRow = table->currentRow() ;
QTableWidgetItem const * titem = table->item( currentRow,0);
QString key = (titem->data(QTableWidgetItem::Type)).toString();
settings->remove(key);
table->removeRow( currentRow );
if ( table->rowCount()==0 )
{
removeAction->setEnabled(false);
editAction->setEnabled(false);
}
}
//============================================================================
void
FileAssotiationsDialog::addnew()
{
AddFileAssotiationDialog afad(false, this);//'add file assotiations' dialog
int currentRow = table->currentRow() ;
QTableWidgetItem* titem;
int ti = afad.exec();
if (ti==QDialog::Accepted)
{
QString currType = afad.resultFileType() ;
QString currCmd = afad.resultCommand() ;
if ( !settings->contains(currType) )//new item should be added only if
{ // it wasn't entered before.
int nridx = table->rowCount();//new row index
table->setRowCount(nridx+1);
addNewItemToTable(nridx,0, currType) ;
addNewItemToTable(nridx,1, currCmd);
}
else
{
for(int rowi=0; rowi<table->rowCount(); rowi++)
{
titem = table->item( rowi, 0);
if (titem->data(QTableWidgetItem::Type).toString()==currType)
{
titem = table->item( rowi, 1);
titem->setData(QTableWidgetItem::Type, currCmd);
break;
}
}
}
settings->setValue(currType, currCmd);
removeAction->setEnabled(true);
editAction->setEnabled(true);
}
}
//============================================================================
void
FileAssotiationsDialog::edit()
{
AddFileAssotiationDialog afad(true, this);//'add file assotiations' dialog
int currentRow = table->currentRow() ;
QTableWidgetItem* titem;
titem = table->item( currentRow,0);
QString currType = (titem->data(QTableWidgetItem::Type)).toString();
titem = table->item( currentRow,1);
QString currCmd = (titem->data(QTableWidgetItem::Type)).toString();
afad.setCommand(currCmd);
afad.setFileType(currType);
int ti = afad.exec();
if (ti==QDialog::Accepted)
{
currCmd = afad.resultCommand() ;
titem = table->item( currentRow,1);
titem->setData(QTableWidgetItem::Type, currCmd);
settings->setValue(currType, currCmd);
}
}
//============================================================================
void
FileAssotiationsDialog::tableCellActivated ( int row, int column )
{
table->selectRow(row);
}
//============================================================================
void
FileAssotiationsDialog::tableItemActivated ( QTableWidgetItem * item )
{
qDebug() << "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy\n";
QMessageBox::information(this,
tr(" Friend Help"),
tr("You this"));
table->selectRow(table->row(item));
}
//============================================================================
void
FileAssotiationsDialog::addNewItemToTable(int row, int column,
QString itemText)
{
QTableWidgetItem* tmpitem ;
tmpitem = new QTableWidgetItem(itemText) ;
tmpitem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
// | Qt::ItemIsUserCheckable);
table->setItem(row, column, tmpitem );
}
//============================================================================
void
FileAssotiationsDialog::testButtonClicked()
{
AddFileAssotiationDialog afad(this);// = new AddFileAssotiationDialog();
// commented code below is a test for
// AddFileAssotiationDialog::loadSystemDefaultCommand(QString ft) method
// QString tmps;
// tmps = "/home/folder/file";
// qDebug() << " for " << tmps <<" is " << afad.cleanFileType(tmps);
// tmps = "/home/folder/file.avi";
// qDebug() << " for " << tmps <<" is " << afad.cleanFileType(tmps);
// tmps = "file.avi";
// qDebug() << " for " << tmps <<" is " << afad.cleanFileType(tmps);
// tmps = ".file";
// qDebug() << " for " << tmps <<" is " << afad.cleanFileType(tmps);
// tmps = "c:\\home\\folder\\file";
// qDebug() << " for " << tmps <<" is " << afad.cleanFileType(tmps);
// tmps = "/home/folder/.file";
// qDebug() << " for " << tmps <<" is " << afad.cleanFileType(tmps);
// tmps = "D:\\folder\\file.asd.avi";
// qDebug() << " for " << tmps <<" is " << afad.cleanFileType(tmps);
int ti = afad.exec();
if (ti==QDialog::Accepted)
{
qDebug() << " dialog was accepted";
QProcess::execute(afad.resultCommand());//,
//QStringList("D:\\prog\\eclipse_workspace\\tapp-fa\\tt.txt") );
qDebug() << " process finished?";
}
else
if (ti == QDialog::Rejected)
qDebug() << " dialog rejected" ;
else
qDebug() << "dialog returned something else" ;
}
//============================================================================

View File

@ -1,90 +0,0 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2009 The RetroShare Team, Oleksiy Bilyanskyy
*
* 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 __FileAssotiationsDialog__
#define __FileAssotiationsDialog__
#include "configpage.h"
#include <QString>
//#include <QMap>
//#include <QFrame>
//#include <QDialog>
class QToolBar;
class QAction;
class QTableWidget;
class QTableWidgetItem;
class QPushButton;
class QDialogButtonBox;
class QLabel;
class QLineEdit;
//class QSettings;
class RshareSettings;
//=============================================================================
//! Dialog for setting file assotiations for RS
//! With this config page user can specify, what programs should be executed
//! to open some types of files. Here 'type' means 'file extension'(and
//! 'file extension' means 'some symbols after last dot in filename').
class FileAssotiationsDialog : public ConfigPage
{
Q_OBJECT
public:
FileAssotiationsDialog(QWidget* parent = 0);
virtual ~FileAssotiationsDialog();
void load();
bool save (QString &errmsg);
protected:
QToolBar* toolBar;
QAction* newAction;
QAction* editAction;
QAction* removeAction;
QTableWidget* table;
QPushButton* addNewAssotiationButton;
QString settingsFileName;
RshareSettings* settings;
// QSettings* settings;
void addNewItemToTable(int row, int column, QString itemText);
protected slots:
void remove();
void addnew();
void edit();
void tableCellActivated ( int row, int column );
void tableItemActivated ( QTableWidgetItem * item ) ;
void testButtonClicked();//! slot for debuggin purposes, nnot really used
};
#endif

View File

@ -1,96 +0,0 @@
/****************************************************************
* This file is distributed under the following license:
*
* Copyright (c) 2006-2007, crypton
* Copyright (c) 2006, Matt Edman, Justin Hipple
*
* 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 "rshare.h"
#include "GeneralDialog.h"
#include <util/stringutil.h>
#include <QSystemTrayIcon>
/** Constructor */
GeneralDialog::GeneralDialog(QWidget *parent)
: ConfigPage(parent)
{
/* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this);
/* Create RshareSettings object */
_settings = new RshareSettings();
/* Hide platform specific features */
#ifndef Q_WS_WIN
ui.chkRunRetroshareAtSystemStartup->setVisible(false);
//ui.autologincheckBox->setEnabled(false) ;
//ui.autologincheckBox->setChecked(false) ;
#endif
}
/** Destructor */
GeneralDialog::~GeneralDialog()
{
delete _settings;
}
/** Saves the changes on this page */
bool
GeneralDialog::save(QString &errmsg)
{
_settings->setValue(QString::fromUtf8("StartMinimized"), startMinimized());
_settings->setValue(QString::fromUtf8("doQuit"), quit());
_settings->setRunRetroshareOnBoot(
ui.chkRunRetroshareAtSystemStartup->isChecked());
return true;
}
/** Loads the settings for this page */
void
GeneralDialog::load()
{
ui.chkRunRetroshareAtSystemStartup->setChecked(
_settings->runRetroshareOnBoot());
ui.checkStartMinimized->setChecked(_settings->value(QString::fromUtf8("StartMinimized"), false).toBool());
ui.checkQuit->setChecked(_settings->value(QString::fromUtf8("doQuit"), false).toBool());
}
bool GeneralDialog::quit() const {
if(ui.checkQuit->isChecked()) return true;
return ui.checkQuit->isChecked();
}
bool GeneralDialog::startMinimized() const {
if(ui.checkStartMinimized->isChecked()) return true;
return ui.checkStartMinimized->isChecked();
}
/** Called when the "show on startup" checkbox is toggled. */
void
GeneralDialog::toggleShowOnStartup(bool checked)
{
//RshareSettings _settings;
_settings->setShowMainWindowAtStart(checked);
}

View File

@ -1,69 +0,0 @@
/****************************************************************
* This file is distributed under the following license:
*
* Copyright (c) 2006-2007, crypton
* Copyright (c) 2006, Matt Edman, Justin Hipple
*
* 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 _GENERALDIALOG_H
#define _GENERALDIALOG_H
#include <QtGui>
#include <QFileDialog>
#include <QLineEdit>
#include "rsharesettings.h"
#include "configpage.h"
#include "ui_GeneralDialog.h"
class GeneralDialog : public ConfigPage
{
Q_OBJECT
public:
/** Default Constructor */
GeneralDialog(QWidget *parent = 0);
/** Default Destructor */
~GeneralDialog();
/** Saves the changes on this page */
bool save(QString &errmsg);
/** Loads the settings for this page */
void load();
bool startMinimized() const;
bool quit() const;
private slots:
/** Called when the "show on startup" checkbox is toggled. */
void toggleShowOnStartup(bool checked);
private:
/** A RetroShare Settings object used for saving/loading settings */
RshareSettings *_settings;
/** Qt Designer generated object */
Ui::GeneralDialog ui;
};
#endif

View File

@ -1,570 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GeneralDialog</class>
<widget class="QWidget" name="GeneralDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>413</width>
<height>267</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>64</height>
</size>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>128</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>192</red>
<green>192</green>
<blue>192</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>128</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="font">
<font>
<family>Arial</family>
<pointsize>10</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_2">
<property name="minimumSize">
<size>
<width>0</width>
<height>80</height>
</size>
</property>
<property name="title">
<string>Startup</string>
</property>
<layout class="QGridLayout">
<item row="0" column="0">
<widget class="QCheckBox" name="chkRunRetroshareAtSystemStartup">
<property name="text">
<string>Start RetroShare when my system starts</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="checkStartMinimized">
<property name="text">
<string>Start minimized</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Misc</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QCheckBox" name="checkQuit">
<property name="text">
<string>Do not show the Quit RetroShare MessageBox</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>178</width>
<height>95</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources>
<include location="../images.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -1,58 +0,0 @@
/****************************************************************
* RShare 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 <rshare.h>
#include "LogDialog.h"
/** Constructor */
LogDialog::LogDialog(QWidget *parent)
: ConfigPage(parent)
{
/* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this);
/* Create RshareSettings object */
_settings = new RshareSettings();
/* Hide platform specific features */
#ifdef Q_WS_WIN
#endif
}
/** Saves the changes on this page */
bool
LogDialog::save(QString &errmsg)
{
return true;
}
/** Loads the settings for this page */
void
LogDialog::load()
{
}

View File

@ -1,58 +0,0 @@
/****************************************************************
* RShare 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 _LOGDIALOG_H
#define _LOGDIALOG_H
#include <QFileDialog>
#include <config/rsharesettings.h>
#include "configpage.h"
#include "ui_LogDialog.h"
class LogDialog : public ConfigPage
{
Q_OBJECT
public:
/** Default Constructor */
LogDialog(QWidget *parent = 0);
/** Default Destructor */
/** Saves the changes on this page */
bool save(QString &errmsg);
/** Loads the settings for this page */
void load();
private slots:
private:
/** A RshareSettings object used for saving/loading settings */
RshareSettings* _settings;
/** Qt Designer generated object */
Ui::LogDialog ui;
};
#endif

View File

@ -1,732 +0,0 @@
<ui version="4.0" >
<class>LogDialog</class>
<widget class="QWidget" name="LogDialog" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>440</width>
<height>311</height>
</rect>
</property>
<property name="palette" >
<palette>
<active>
<colorrole role="WindowText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>128</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>192</red>
<green>192</green>
<blue>192</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>128</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="font" >
<font>
<family>Arial</family>
<pointsize>8</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum>
</property>
<widget class="QTextEdit" name="textEdit" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>441</width>
<height>311</height>
</rect>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
<property name="html" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;table border="0" width="100%" cellspacing="2" cellpadding="2">
&lt;tr>
&lt;td bgcolor="#aaaaaa">
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:medium; font-weight:600; background-color:#aaaaaa;">&lt;a name="ABOUT">&lt;/a>&lt;span style=" font-size:medium;"> &lt;/span>&lt;span style=" font-size:medium;">About RetroShare &lt;/span>&lt;span style=" font-size:medium;"> &lt;/span>&lt;/p>&lt;/td>&lt;/tr>&lt;/table>
&lt;table border="0" width="100%" cellspacing="2" cellpadding="2">
&lt;tr>
&lt;td bgcolor="#aaaaaa">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#aaaaaa;">Quick Links: &lt;/p>&lt;/td>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#cccccc;">&lt;a href="#ABOUT">&lt;span style=" text-decoration: underline; color:#0000ff;">About&lt;/span>&lt;/a>&lt;/p>&lt;/td>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#cccccc;">&lt;a href="#START">&lt;span style=" text-decoration: underline; color:#0000ff;">Getting Started&lt;/span>&lt;/a>&lt;/p>&lt;/td>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#cccccc;">&lt;a href="#GUI">&lt;span style=" text-decoration: underline; color:#0000ff;">Gui Basics&lt;/span>&lt;/a>&lt;/p>&lt;/td>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#cccccc;">&lt;a href="#FAQ">&lt;span style=" text-decoration: underline; color:#0000ff;">FAQ&lt;/span>&lt;/a>&lt;/p>&lt;/td>&lt;/tr>&lt;/table>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;br />&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">RetroShare is a private peer to peer communication platform created by Dr. Bob.This program enables you to securely share files and chat with your friends (and no-one else!).&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;br />&lt;br />&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">For more information, and the latest release go to http://www.lunamutt.com.&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;br />&lt;br />&lt;/p>
&lt;table border="0" width="100%" cellspacing="2" cellpadding="2">
&lt;tr>
&lt;td bgcolor="#aaaaaa">
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:medium; font-weight:600; background-color:#aaaaaa;">&lt;a name="START">&lt;/a>&lt;span style=" font-size:medium;"> &lt;/span>&lt;span style=" font-size:medium;">Quick Start Guide to RetroShare &lt;/span>&lt;span style=" font-size:medium;"> &lt;/span>&lt;/p>&lt;/td>&lt;/tr>&lt;/table>
&lt;table border="0" width="100%" cellspacing="2" cellpadding="2">
&lt;tr>
&lt;td bgcolor="#aaaaaa">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#aaaaaa;">Quick Links: &lt;/p>&lt;/td>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#cccccc;">&lt;a href="#ABOUT">&lt;span style=" text-decoration: underline; color:#0000ff;">About&lt;/span>&lt;/a>&lt;/p>&lt;/td>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#cccccc;">&lt;a href="#START">&lt;span style=" text-decoration: underline; color:#0000ff;">Getting Started&lt;/span>&lt;/a>&lt;/p>&lt;/td>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#cccccc;">&lt;a href="#GUI">&lt;span style=" text-decoration: underline; color:#0000ff;">Gui Basics&lt;/span>&lt;/a>&lt;/p>&lt;/td>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#cccccc;">&lt;a href="#FAQ">&lt;span style=" text-decoration: underline; color:#0000ff;">FAQ&lt;/span>&lt;/a>&lt;/p>&lt;/td>&lt;/tr>&lt;/table>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;br />&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If this is your first time using Retroshare, it is recommended that you readthis guide for instructions on how to get started. The first step is:&lt;a href="#START-CONNECT">&lt;span style=" text-decoration: underline; color:#0000ff;">Connecting to Your Friends&lt;/span>&lt;/a>. Once you have managed this you can &lt;a href="#START-DOWNLOAD">&lt;span style=" text-decoration: underline; color:#0000ff;">Download Files&lt;/span>&lt;/a> and&lt;a href="#START-SHARE">&lt;span style=" text-decoration: underline; color:#0000ff;">Share with Others&lt;/span>&lt;/a>&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;br />&lt;br />&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Some of the key concepts related to ensuring your sharing remains private aredescribed in the &lt;a href="#FAQ">&lt;span style=" text-decoration: underline; color:#0000ff;">Frequently Asked Questions&lt;/span>&lt;/a>. Some Key security questions are:&lt;a href="#FAQ-WEBOFTRUST">&lt;span style=" text-decoration: underline; color:#0000ff;">What is a Web of Trust?&lt;/span>&lt;/a>, &lt;a href="#FAQ-SIGN">&lt;span style=" text-decoration: underline; color:#0000ff;">Should I Sign this Certificate?&lt;/span>&lt;/a>, and finally&lt;a href="#FAQ-TRUST">&lt;span style=" text-decoration: underline; color:#0000ff;">What does "Trust" Mean?&lt;/span>&lt;/a>.&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;br />&lt;br />&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">It is also worthwhile reading the &lt;a href="#GUI">&lt;span style=" text-decoration: underline; color:#0000ff;">GUI Overview&lt;/span>&lt;/a>which describes the featureson available through the User Interface.&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;br />&lt;br />&lt;/p>
&lt;table border="0" width="100%" cellspacing="2" cellpadding="2">
&lt;tr>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:12px; margin-bottom:4px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:small; font-weight:600; background-color:#cccccc;">&lt;a name="START-CONNECT">&lt;/a>&lt;span style=" font-size:small;"> &lt;/span>&lt;span style=" font-size:small;">Connecting to your Friends &lt;/span>&lt;span style=" font-size:small;"> &lt;/span>&lt;/p>&lt;/td>&lt;/tr>&lt;/table>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;br />&lt;br />&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">There are four steps to connecting to a Friend:&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:1; text-indent:1px;"> &lt;/p>
&lt;ul style="-qt-list-indent: 1;">&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Get Friend's Certificate &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Load Certificate &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Sign Certificate &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Connect to Friend.&lt;/li>&lt;/ul>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The instructions might initially appear long and daunting, however thesesteps are required to ensure that your sharing is private and secure.These steps are only required a couple of times, to add new friends, and become quite straight forward after the first time.&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:4px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:small; font-weight:600;">&lt;span style=" font-size:small;"> (1) EXCHANGE CERTIFICATES &lt;/span>&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Before you can connect, you need send your certificate to your friend, and get your friends certificate. Follow these steps to get your certificate:&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:1; text-indent:1px;"> &lt;/p>
&lt;ul style="-qt-list-indent: 1;">&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Go to the "Connect" Tab &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Click on Your Certificate to Select it. &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Click on the "Export Friend" Button to bring up a file save dialog. &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Select directory to save the certificate to. &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Enter desired filename. (with a file type of .pqi), and Click OK. &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Email this File to your Friend. (It is recommended you put the certificate in a zip file before sending, as some email programs don't transmit the file correctly). &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Ask your friend to do the same. &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Once you have received your friend's certificate, removed it from the zip file and saved it to disk, you can proceed to step (2).&lt;/li>&lt;/ul>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Note: This exchange of certificates is only necessary to get you started.Once you are connected to some friends the exchange of certificates becomeautomated by the autoDiscovery system. See&lt;a href="#GUI-CONNECT">&lt;span style=" text-decoration: underline; color:#0000ff;">GUI: Connecting&lt;/span>&lt;/a> for more information.------------------------------------------------------------------------&lt;br />&lt;br />&lt;br />&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:4px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:small; font-weight:600;">&lt;span style=" font-size:small;"> (2) LOAD YOUR FRIEND'S CERTIFICATE &lt;/span>&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:1; text-indent:1px;"> &lt;/p>
&lt;ul style="-qt-list-indent: 1;">&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Go to the "Connect" Tab &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Click "Import Friend" &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Select your friends certificate file, then click "Okay". Their certificate should appear in the top window of the "Connect" Tab.&lt;/li>&lt;/ul>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">------------------------------------------------------------------------&lt;br />&lt;br />&lt;br />&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:4px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:small; font-weight:600;">&lt;span style=" font-size:small;"> (3) SIGN CERTIFICATE &lt;/span>&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:1; text-indent:1px;"> &lt;/p>
&lt;ul style="-qt-list-indent: 1;">&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Select their Certificate by clicking on their name. &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Click "Configure Friend" Button. This will bring up a configuration window. which allows you to look at the details of the certificate. &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Click the "Sign Certificate" button near the bottom of the "Certificate Configuration" Window. &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Now close the window by clicking on the "Done" button. &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Your Friends certificate should now say "Trusted (S)", indicating it is ready for connections.&lt;/li>&lt;/ul>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You can only share with "Trusted" Peers. You must sign your Friend'scertificate to prove that you know the certificate belongs to your Friend. Do not sign any/all certificates - only the people youtrust. For more information see: &lt;br />&lt;a href="#FAQ-SIGN">&lt;span style=" text-decoration: underline; color:#0000ff;">FAQ: Should I Sign this Certificate?&lt;/span>&lt;/a>.&lt;br />&lt;a href="#FAQ-TRUST">&lt;span style=" text-decoration: underline; color:#0000ff;">FAQ: What does "Trust" Mean?&lt;/span>&lt;/a>.&lt;br />&lt;a href="#FAQ-WEBOFTRUST">&lt;span style=" text-decoration: underline; color:#0000ff;">FAQ: What is a Web of Trust?&lt;/span>&lt;/a>. &lt;br />------------------------------------------------------------------------&lt;br />&lt;br /> &lt;br />&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:4px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:small; font-weight:600;">&lt;span style=" font-size:small;"> (4) AUTOCONNECT TO PEER &lt;/span>&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Finally You need to activate the connection: &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:1; text-indent:1px;"> &lt;/p>
&lt;ul style="-qt-list-indent: 1;">&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Click in the Box, next to your friends Name. &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> A Tick should appear in the box, a connection will be started. &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> The "Offline" will change to "Online" when you have successfully connected.&lt;/li>&lt;/ul>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Remember: Your initial connection attempts will fail, until your friend has signed your certificate and ticked the Auto-Connect Box.This ensures that both peers trust each other, and stops random peopleaccessing your files.&lt;br />&lt;a href="#FAQ-CONNECT">&lt;span style=" text-decoration: underline; color:#0000ff;">FAQ: Why won't it Connect?&lt;/span>&lt;/a>. &lt;br />------------------------------------------------------------------------&lt;br />&lt;br />&lt;br />&lt;/p>
&lt;table border="0" width="100%" cellspacing="2" cellpadding="2">
&lt;tr>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:12px; margin-bottom:4px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:small; font-weight:600; background-color:#cccccc;">&lt;a name="START-DOWNLOAD">&lt;/a>&lt;span style=" font-size:small;"> &lt;/span>&lt;span style=" font-size:small;">Downloading Files &lt;/span>&lt;span style=" font-size:small;"> &lt;/span>&lt;/p>&lt;/td>&lt;/tr>&lt;/table>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Once you have connected to friends, you can download their shared files.&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;br />&lt;br />&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You can search for the files you want using either:&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(1) File Listing Tab: This gives you a directory view of the files being shared by your peers. Double clickon the directory name (not the arrow) to diplay its subdirectories and files.&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">NOTE 1: This can take up to 5 seconds to fetch the information for your peer.&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">NOTE 2: If the directory is empty, or the person is offline, then the request will silently fail.&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(2) Search Tab: Retroshare also allows you to search your peers computers for filenames. Enter yourterm(s) in the search box at the top of the TAB and click the "Search" button. This willsearch all of the peers that you are currently connected to.&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">NOTE 3: If any matching files are found they will be displayed within 5 - 10 seconds.&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Once you have found the files you want, Select the file(s), and click "Download" to begin the download process.If you click over the "File Transfer" TAB, the status of the files will appear.&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">NOTE 4: The files can take up to 10 seconds to appear in the transfer window.&lt;/p>
&lt;table border="0" width="100%" cellspacing="2" cellpadding="2">
&lt;tr>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:12px; margin-bottom:4px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:small; font-weight:600; background-color:#cccccc;">&lt;a name="START-SHARING">&lt;/a>&lt;span style=" font-size:small;"> &lt;/span>&lt;span style=" font-size:small;">Sharing Files &lt;/span>&lt;span style=" font-size:small;"> &lt;/span>&lt;/p>&lt;/td>&lt;/tr>&lt;/table>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You can specify which files you want to share in the "Config" Tab.In the "Share Directories" section, click the "Add Directory" Button, and select the directory you want to share.The files and subdirectories will become available for you peers.&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;br />&lt;br />&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You can remove a directory from the Shared Directories List by clicking onthe directory name in the list, and then clicking "Remove Directory".&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;br />&lt;br />&lt;/p>
&lt;table border="0" width="100%" cellspacing="2" cellpadding="2">
&lt;tr>
&lt;td bgcolor="#aaaaaa">
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:medium; font-weight:600; background-color:#aaaaaa;">&lt;a name="GUI">&lt;/a>&lt;span style=" font-size:medium;"> &lt;/span>&lt;span style=" font-size:medium;">Gui Overview (Tab Description) &lt;/span>&lt;span style=" font-size:medium;"> &lt;/span>&lt;/p>&lt;/td>&lt;/tr>&lt;/table>
&lt;table border="0" width="100%" cellspacing="2" cellpadding="2">
&lt;tr>
&lt;td bgcolor="#aaaaaa">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#aaaaaa;">Quick Links: &lt;/p>&lt;/td>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#cccccc;">&lt;a href="#ABOUT">&lt;span style=" text-decoration: underline; color:#0000ff;">About&lt;/span>&lt;/a>&lt;/p>&lt;/td>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#cccccc;">&lt;a href="#START">&lt;span style=" text-decoration: underline; color:#0000ff;">Getting Started&lt;/span>&lt;/a>&lt;/p>&lt;/td>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#cccccc;">&lt;a href="#GUI">&lt;span style=" text-decoration: underline; color:#0000ff;">Gui Basics&lt;/span>&lt;/a>&lt;/p>&lt;/td>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#cccccc;">&lt;a href="#FAQ">&lt;span style=" text-decoration: underline; color:#0000ff;">FAQ&lt;/span>&lt;/a>&lt;/p>&lt;/td>&lt;/tr>&lt;/table>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The GUI is divided up into several sections which can be accessed by clicking on the Tabs along the top of the main window. &lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;br />&lt;br />&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:1; text-indent:1px;"> &lt;/p>
&lt;ul style="-qt-list-indent: 1;">&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Connect: Manage Connections and Friends. (&lt;a href="#START-CONNECT">&lt;span style=" text-decoration: underline; color:#0000ff;">getting started&lt;/span>&lt;/a> and &lt;a href="#GUI-CONNECT">&lt;span style=" text-decoration: underline; color:#0000ff;">more info&lt;/span>&lt;/a>) &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> File Listing: A directory view of available files. (&lt;a href="#START-DOWNLOAD">&lt;span style=" text-decoration: underline; color:#0000ff;">downloading&lt;/span>&lt;/a>) &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Search: Search for available files. (&lt;a href="#START-DOWNLOAD">&lt;span style=" text-decoration: underline; color:#0000ff;">downloading&lt;/span>&lt;/a>) &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Messages: For Sending/Recving Message. (Coming Soon) &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Channels: A broadcast/subscription system. (Coming Soon) &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> File Transfer: Listing of Current and completed Transfers. &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Config: Specify of share diectories and IP Addresses. (&lt;a href="#GUI-CONFIG">&lt;span style=" text-decoration: underline; color:#0000ff;">more info&lt;/span>&lt;/a>) &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> About: Help and other Information. &lt;/li>
&lt;li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Chat: Accessed by the clicking on the "Chat" button.&lt;/li>&lt;/ul>
&lt;table border="0" width="100%" cellspacing="2" cellpadding="2">
&lt;tr>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:12px; margin-bottom:4px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:small; font-weight:600; background-color:#cccccc;">&lt;a name="GUI-CONNECT">&lt;/a>&lt;span style=" font-size:small;"> &lt;/span>&lt;span style=" font-size:small;">The Connect Tab &lt;/span>&lt;span style=" font-size:small;"> &lt;/span>&lt;/p>&lt;/td>&lt;/tr>&lt;/table>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The Connect TAB consists of two windows. The upper windowshows a list of your friends. This window indicates each friendscurrent trust level, as well as their connection state.The "Trust_Lvl" Column indicates if the certificate has beenAuthenticated using the web of trust. You can only connect to "Trusted" certificates. Tick the "Auto_Connect" box to connect to your trusted friends.&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The lower window provides a list of the friends of your friends.This window shows the neighbour's name and how long ago they attempted to connect to you. This window is automatically populatedby the autoDiscovery system, and should be used to expand yourretroShare network. A word of warning: Do not automatically trust (or sign) anyonethat appears in this window. First verify by some other means (email/phone)that certificate belongs to the person you think it does.&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Use the "Neighbour List" window to expand your friend list. Select the desired entry in the lower window by clicking on it, then click the "Add to Friends" Button to move it to the upper window.Likewise the "Remove from Friends" button moved a person from the upper window to the lower window.&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The "Configure Friend" Button opens a Certificate Configuration window.This window can be used to examine the certificate details, sign the certificate or manually change the peer's IP Address.&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">See Also:&lt;br />&lt;a href="#START-CONNECT">&lt;span style=" text-decoration: underline; color:#0000ff;">Getting Started: Connecting to your friends&lt;/span>&lt;/a>.&lt;br />&lt;a href="#FAQ-CONNECT">&lt;span style=" text-decoration: underline; color:#0000ff;">FAQ: Why won't it Connect?&lt;/span>&lt;/a>.&lt;br />&lt;a href="#FAQ-SIGN">&lt;span style=" text-decoration: underline; color:#0000ff;">FAQ: Should I Sign this Certificate?&lt;/span>&lt;/a>.&lt;br />&lt;a href="#FAQ-TRUST">&lt;span style=" text-decoration: underline; color:#0000ff;">FAQ: What does "Trust" Mean?&lt;/span>&lt;/a>.&lt;br />&lt;a href="#FAQ-WEBOFTRUST">&lt;span style=" text-decoration: underline; color:#0000ff;">FAQ: What is a Web of Trust?&lt;/span>&lt;/a>. &lt;br />&lt;/p>
&lt;table border="0" width="100%" cellspacing="2" cellpadding="2">
&lt;tr>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:12px; margin-bottom:4px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:small; font-weight:600; background-color:#cccccc;">&lt;a name="GUI-CONFIG">&lt;/a>&lt;span style=" font-size:small;"> &lt;/span>&lt;span style=" font-size:small;">The Config Tab &lt;/span>&lt;span style=" font-size:small;"> &lt;/span>&lt;/p>&lt;/td>&lt;/tr>&lt;/table>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The Configuration Tab allows you to select the share directories, as well as the directory that downloaded files are saved to.&lt;br />See &lt;a href="#STARTUP-SHARING">&lt;span style=" text-decoration: underline; color:#0000ff;">Sharing you Files&lt;/span>&lt;/a> for details. &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The Config Tab also allows you to control the IP Address and Portused by RetroShare. Under most cirumstances you do not need to changethese setting. If you are behind a firewall and can setup a forwarded port, the selected IP Address and Port should be specified here.&lt;/p>
&lt;table border="0" width="100%" cellspacing="2" cellpadding="2">
&lt;tr>
&lt;td bgcolor="#aaaaaa">
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:medium; font-weight:600; background-color:#aaaaaa;">&lt;a name="FAQ">&lt;/a>&lt;span style=" font-size:medium;"> &lt;/span>&lt;span style=" font-size:medium;">Frequently Asked Questions &lt;/span>&lt;span style=" font-size:medium;"> &lt;/span>&lt;/p>&lt;/td>&lt;/tr>&lt;/table>
&lt;table border="0" width="100%" cellspacing="2" cellpadding="2">
&lt;tr>
&lt;td bgcolor="#aaaaaa">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#aaaaaa;">Quick Links: &lt;/p>&lt;/td>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#cccccc;">&lt;a href="#ABOUT">&lt;span style=" text-decoration: underline; color:#0000ff;">About&lt;/span>&lt;/a>&lt;/p>&lt;/td>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#cccccc;">&lt;a href="#START">&lt;span style=" text-decoration: underline; color:#0000ff;">Getting Started&lt;/span>&lt;/a>&lt;/p>&lt;/td>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#cccccc;">&lt;a href="#GUI">&lt;span style=" text-decoration: underline; color:#0000ff;">Gui Basics&lt;/span>&lt;/a>&lt;/p>&lt;/td>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#cccccc;">&lt;a href="#FAQ">&lt;span style=" text-decoration: underline; color:#0000ff;">FAQ&lt;/span>&lt;/a>&lt;/p>&lt;/td>&lt;/tr>&lt;/table>
&lt;table border="0" width="100%" cellspacing="2" cellpadding="2">
&lt;tr>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:12px; margin-bottom:4px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:small; font-weight:600; background-color:#cccccc;">&lt;a name="FAQ-WEBOFTRUST">&lt;/a>&lt;span style=" font-size:small;"> &lt;/span>&lt;span style=" font-size:small;">How does the security/privacy work? &lt;/span>&lt;span style=" font-size:small;"> &lt;/span>&lt;/p>&lt;/td>&lt;/tr>&lt;/table>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">RetroShares uses a Web of Trust Authentication system to ensurethat your "friends" are your friends, and uses SSL to encryptthe communcications between peers. &lt;/p>
&lt;table border="0" width="100%" cellspacing="2" cellpadding="2">
&lt;tr>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:12px; margin-bottom:4px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:small; font-weight:600; background-color:#cccccc;">&lt;a name="FAQ-WEBOFTRUST">&lt;/a>&lt;span style=" font-size:small;"> &lt;/span>&lt;span style=" font-size:small;">What is a Web of Trust? &lt;/span>&lt;span style=" font-size:small;"> &lt;/span>&lt;/p>&lt;/td>&lt;/tr>&lt;/table>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A Web of Trust relies on a collection of peers to identify eachother. Look it up on the Web!&lt;/p>
&lt;table border="0" width="100%" cellspacing="2" cellpadding="2">
&lt;tr>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:12px; margin-bottom:4px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:small; font-weight:600; background-color:#cccccc;">&lt;a name="FAQ-TRUST">&lt;/a>&lt;span style=" font-size:small;"> &lt;/span>&lt;span style=" font-size:small;">What does "Trust" Mean in RetroShare?&lt;/span>&lt;span style=" font-size:small;"> &lt;/span>&lt;/p>&lt;/td>&lt;/tr>&lt;/table>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Anyone can generate a certificate, with any name on it. So howdo you know that the certificate that claims to be from "Joe Bloggs"is really from your mate Joe. This is the "AuthenticationProblem". RetroShare uses a Web of Trust to Authenticate your peers.&lt;/p>
&lt;table border="0" width="100%" cellspacing="2" cellpadding="2">
&lt;tr>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:12px; margin-bottom:4px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:small; font-weight:600; background-color:#cccccc;">&lt;a name="FAQ-SIGN">&lt;/a>&lt;span style=" font-size:small;"> &lt;/span>&lt;span style=" font-size:small;">Should I Sign this Certificate? &lt;/span>&lt;span style=" font-size:small;"> &lt;/span>&lt;/p>&lt;/td>&lt;/tr>&lt;/table>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You should only sign a certificate if you are completely surethat it comes from the "right" person. If you sign a certificateyou are "Authenticating" the person to yourself and others.If you sign certificates that you haven't checked, then you aredestroying your own privacy and security.&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">How do you verify a certificate? Use an alternative method ofcommunication to send the certificate: E.g. email or USB stick. This will improve you confidence that the certificate belongsto the correct person. &lt;/p>
&lt;table border="0" width="100%" cellspacing="2" cellpadding="2">
&lt;tr>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:12px; margin-bottom:4px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:small; font-weight:600; background-color:#cccccc;">&lt;span style=" font-size:small;"> &lt;/span>&lt;a name="FAQ-CONNECT">&lt;/a>&lt;span style=" font-size:small;">W&lt;/span>&lt;span style=" font-size:small;">hy won't it Connect?&lt;/span>&lt;span style=" font-size:small;"> &lt;/span>&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> &lt;/p>&lt;/td>&lt;/tr>&lt;/table>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A connection can fail for a number of reasons:&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(1) Failed Authentication. Have both peers signed each otherscertificates? &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(2) Firewalls. If both peers are behind firewalls then they cannotconnect directly. RetroShare has a built in proxy system to circumventfirewalls - However this can only function if both peers can connect to a common third party that is not behind a firewall. Thisis the most likely reason for initial connections to fail. The only solution to find a common friend that isn't firewalled (know anyone with Broadband?)&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(3) IP Addresses are wrong. You can manually examine and change these using the Certificate configuration.&lt;/p>
&lt;table border="0" width="100%" cellspacing="2" cellpadding="2">
&lt;tr>
&lt;td bgcolor="#aaaaaa">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#aaaaaa;">Quick Links: &lt;/p>&lt;/td>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#cccccc;">&lt;a href="#ABOUT">&lt;span style=" text-decoration: underline; color:#0000ff;">About&lt;/span>&lt;/a>&lt;/p>&lt;/td>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#cccccc;">&lt;a href="#START">&lt;span style=" text-decoration: underline; color:#0000ff;">Getting Started&lt;/span>&lt;/a>&lt;/p>&lt;/td>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#cccccc;">&lt;a href="#GUI">&lt;span style=" text-decoration: underline; color:#0000ff;">Gui Basics&lt;/span>&lt;/a>&lt;/p>&lt;/td>
&lt;td bgcolor="#cccccc">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#cccccc;">&lt;a href="#FAQ">&lt;span style=" text-decoration: underline; color:#0000ff;">FAQ&lt;/span>&lt;/a>&lt;/p>&lt;/td>&lt;/tr>&lt;/table>
&lt;/body>&lt;/html></string>
</property>
</widget>
</widget>
<resources>
<include location="../images.qrc" />
</resources>
<connections/>
</ui>

View File

@ -1,154 +0,0 @@
/****************************************************************
* RShare 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 <rshare.h>
#include "NotifyDialog.h"
#include <iostream>
#include <sstream>
#include "rsiface/rsnotify.h"
#include <QTimer>
/** Constructor */
NotifyDialog::NotifyDialog(QWidget *parent)
: ConfigPage(parent)
{
/* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this);
/* Create RshareSettings object */
_settings = new RshareSettings();
//QTimer *timer = new QTimer(this);
//timer->connect(timer, SIGNAL(timeout()), this, SLOT(updateStatus()));
//timer->start(1000);
/* Hide platform specific features */
#ifdef Q_WS_WIN
#endif
}
/** Saves the changes on this page */
bool
NotifyDialog::save(QString &errmsg)
{
/* extract from rsNotify the flags */
uint notifyflags = 0;
uint newsflags = 0;
uint chatflags = 0;
if (ui.popup_Connect->isChecked())
notifyflags |= RS_POPUP_CONNECT;
if (ui.popup_NewMsg->isChecked())
notifyflags |= RS_POPUP_MSG;
// if (ui.popup_NewChat->isChecked())
notifyflags |= RS_POPUP_CHAT;
//if (ui.popup_Call->isChecked())
// notifyflags |= RS_POPUP_CALL;
if (ui.notify_Peers->isChecked())
newsflags |= RS_FEED_TYPE_PEER;
if (ui.notify_Channels->isChecked())
newsflags |= RS_FEED_TYPE_CHAN;
if (ui.notify_Forums->isChecked())
newsflags |= RS_FEED_TYPE_FORUM;
if (ui.notify_Blogs->isChecked())
newsflags |= RS_FEED_TYPE_BLOG;
if (ui.notify_Chat->isChecked())
newsflags |= RS_FEED_TYPE_CHAT;
if (ui.notify_Messages->isChecked())
newsflags |= RS_FEED_TYPE_MSG;
if (ui.notify_Downloads->isChecked())
newsflags |= RS_FEED_TYPE_FILES;
if (ui.chat_NewWindow->isChecked())
chatflags |= RS_CHAT_OPEN_NEW;
if (ui.chat_Reopen->isChecked())
chatflags |= RS_CHAT_REOPEN;
if (ui.chat_Focus->isChecked())
chatflags |= RS_CHAT_FOCUS;
_settings->setNotifyFlags(notifyflags);
_settings->setNewsFeedFlags(newsflags);
_settings->setChatFlags(chatflags);
load();
return true;
}
/** Loads the settings for this page */
void NotifyDialog::load()
{
/* extract from rsNotify the flags */
uint notifyflags = _settings->getNotifyFlags();
uint newsflags = _settings->getNewsFeedFlags();
uint chatflags = _settings->getChatFlags();
ui.popup_Connect->setChecked(notifyflags & RS_POPUP_CONNECT);
ui.popup_NewMsg->setChecked(notifyflags & RS_POPUP_MSG);
ui.systray_GroupChat->setChecked(true) ;
// ui.popup_NewChat->setChecked(notifyflags & RS_POPUP_CHAT);
//ui.popup_Call->setChecked(notifyflags & RS_POPUP_CALL);
ui.notify_Peers->setChecked(newsflags & RS_FEED_TYPE_PEER);
ui.notify_Channels->setChecked(newsflags & RS_FEED_TYPE_CHAN);
ui.notify_Forums->setChecked(newsflags & RS_FEED_TYPE_FORUM);
ui.notify_Blogs->setChecked(newsflags & RS_FEED_TYPE_BLOG);
ui.notify_Chat->setChecked(newsflags & RS_FEED_TYPE_CHAT);
ui.notify_Messages->setChecked(newsflags & RS_FEED_TYPE_MSG);
ui.notify_Downloads->setChecked(newsflags & RS_FEED_TYPE_FILES);
ui.chat_NewWindow->setChecked(chatflags & RS_CHAT_OPEN_NEW);
ui.chat_Reopen->setChecked(chatflags & RS_CHAT_REOPEN);
ui.chat_Focus->setChecked(chatflags & RS_CHAT_FOCUS);
/* disable ones that don't work yet */
ui.notify_Chat->setEnabled(false);
ui.notify_Blogs->setEnabled(false);
ui.notify_Downloads->setEnabled(false);
ui.systray_GroupChat->setEnabled(false);
// ui.popup_NewChat->setEnabled(false);
}
/** Loads the settings for this page */
void NotifyDialog::updateStatus()
{
}

View File

@ -1,61 +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 _NOTIFYDIALOG_H
#define _NOTIFYDIALOG_H
#include <QFileDialog>
#include "rsharesettings.h"
#include "configpage.h"
#include "ui_NotifyDialog.h"
class NotifyDialog : public ConfigPage
{
Q_OBJECT
public:
/** Default Constructor */
NotifyDialog(QWidget *parent = 0);
/** Default Destructor */
/** Saves the changes on this page */
bool save(QString &errmsg);
/** Loads the settings for this page */
void load();
public slots:
void updateStatus();
private slots:
private:
/** A RshareSettings object used for saving/loading settings */
RshareSettings* _settings;
/** Qt Designer generated object */
Ui::NotifyDialog ui;
};
#endif

View File

@ -1,686 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>NotifyDialog</class>
<widget class="QWidget" name="NotifyDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>388</width>
<height>425</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>128</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>192</red>
<green>192</green>
<blue>192</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>128</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="font">
<font>
<family>Arial</family>
<pointsize>10</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QGroupBox" name="notify_ForumNewMsg">
<property name="title">
<string>News Feed</string>
</property>
<layout class="QVBoxLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>6</number>
</property>
<item>
<widget class="QCheckBox" name="notify_Peers">
<property name="text">
<string>Peers</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="notify_Channels">
<property name="text">
<string>Channels</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="notify_Forums">
<property name="text">
<string>Forums</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="notify_Chat">
<property name="text">
<string>Chat</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="notify_Blogs">
<property name="text">
<string>Blogs</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="notify_Messages">
<property name="text">
<string>Messages</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="notify_Downloads">
<property name="text">
<string>Downloads</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Toasters</string>
</property>
<layout class="QVBoxLayout">
<property name="leftMargin">
<number>9</number>
</property>
<property name="topMargin">
<number>9</number>
</property>
<item>
<widget class="QCheckBox" name="popup_Connect">
<property name="text">
<string>Peer Connect</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="popup_NewMsg">
<property name="text">
<string>New Message</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Private Chat</string>
</property>
<layout class="QVBoxLayout">
<item>
<widget class="QCheckBox" name="chat_NewWindow">
<property name="text">
<string>Open Window for new Peer Chat</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chat_Reopen">
<property name="text">
<string>Reopen if closed by user:</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chat_Focus">
<property name="text">
<string>Grab Focus when chat arrives</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Group chat</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="systray_GroupChat">
<property name="text">
<string>Display systray message</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>130</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources>
<include location="../images.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -1,265 +0,0 @@
/****************************************************************
* RShare 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 <QMessageBox>
#include <rshare.h>
#include "PreferencesWindow.h"
#include "rsiface/rsiface.h"
#define FONT QFont(tr("Arial"), 9)
/* Images for toolbar icons */
#define IMAGE_PREFERENCES ":/images/kcmsystem24.png"
#define IMAGE_SERVER ":/images/server_24x24.png"
#define IMAGE_DIRECTORIES ":/images/folder_doments.png"
#define IMAGE_CRYPTOGRAPHY ":/images/encrypted32.png"
#define IMAGE_LOG ":/images/log_24x24.png"
#define IMAGE_ABOUT ":/images/informations_24x24.png"
#define IMAGE_SAVE ":/images/media-floppy.png"
#define IMAGE_HELP ":/images/help24.png"
#define IMAGE_APPEARRANCE ":/images/looknfeel.png"
#define IMAGE_FILE_ASSOTIATIONS ":/images/filetype-association.png"
#define IMAGE_NOTIFY ":/images/status_unknown.png"
#define IMAGE_SOUND ":/images/sound.png"
/** Constructor */
PreferencesWindow::PreferencesWindow(QWidget *parent, Qt::WFlags flags)
: RWindow("PreferencesWindow", parent, flags)
{
/* Invoke the Qt Designer generated QObject setup routine */
ui.setupUi(this);
/* Create the config pages and actions */
QActionGroup *grp = new QActionGroup(this);
ui.stackPages->add(new GeneralDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_PREFERENCES), tr("General"), grp));
ui.stackPages->add(new ServerDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_SERVER), tr("Server"), grp));
ui.stackPages->add(new DirectoriesDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_DIRECTORIES), tr("Directories"), grp));
ui.stackPages->add(new AppearanceDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_APPEARRANCE), tr("Appearance"), grp));
ui.stackPages->add(new NotifyDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_NOTIFY), tr("Notify"), grp));
ui.stackPages->add(new CryptographyDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_CRYPTOGRAPHY), tr("Security"), grp));
ui.stackPages->add(new FileAssotiationsDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_FILE_ASSOTIATIONS),
tr("File Associations"), grp));
#ifdef RS_RELEASE_VERSION
#else
ui.stackPages->add(new SoundDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_SOUND), tr("Sound"), grp));
#endif
/*foreach (ConfigPage *page, ui.stackPages->pages()) {
connect(page, SIGNAL(helpRequested(QString)),
this, SLOT(help(QString)));
} */
/* Create the toolbar */
ui.toolBar->addActions(grp->actions());
ui.toolBar->addSeparator();
connect(grp, SIGNAL(triggered(QAction *)), ui.stackPages, SLOT(showPage(QAction *)));
/* Create and bind the Help button */
QAction *helpAct = new QAction(QIcon(IMAGE_HELP), tr("Help"), ui.toolBar);
addAction(helpAct, SLOT(showHelp()));
/* Select the first action */
grp->actions()[0]->setChecked(true);
connect(ui.okButton, SIGNAL(clicked( bool )), this, SLOT( saveChanges()) );
connect(ui.cancelprefButton, SIGNAL(clicked( bool )), this, SLOT( cancelpreferences()) );
#if defined(Q_WS_WIN)
helpAct->setShortcut(QString("F1"));
#else
helpAct->setShortcut(QString("Ctrl+?"));
#endif
}
/** Creates a new action associated with a config page. */
QAction*
PreferencesWindow::createPageAction(QIcon img, QString text, QActionGroup *group)
{
QAction *action = new QAction(img, text, group);
action->setCheckable(true);
action->setFont(FONT);
return action;
}
/** Adds the given action to the toolbar and hooks its triggered() signal to
* the specified slot (if given). */
void
PreferencesWindow::addAction(QAction *action, const char *slot)
{
action->setFont(FONT);
ui.toolBar->addAction(action);
connect(action, SIGNAL(triggered()), this, slot);
}
/** Overloads the default show so we can load settings */
/*void
PreferencesWindow::show()
{*/
/* Load saved settings */
/*loadSettings();
if (!this->isVisible()) {
QMainWindow::show();
} else {
QMainWindow::activateWindow();
setWindowState(windowState() & ~Qt::WindowMinimized | Qt::WindowActive);
QMainWindow::raise();
}
}*/
/** Shows the Preferences dialog with focus set to the given page. */
void
PreferencesWindow::showWindow(Page page)
{
/* Load saved settings */
loadSettings();
/* Show the dialog. */
RWindow::showWindow();
/* Set the focus to the specified page. */
ui.stackPages->setCurrentIndex((int)page);
}
/** Loads the saved PreferencesWindow settings. */
void
PreferencesWindow::loadSettings()
{
/* Call each config page's load() method to load its data */
foreach (ConfigPage *page, ui.stackPages->pages()) {
page->load();
}
}
/** Saves changes made to settings. */
void
PreferencesWindow::saveChanges()
{
QString errmsg;
/* Call each config page's save() method to save its data */
foreach (ConfigPage *page, ui.stackPages->pages()) {
if (!page->save(errmsg)) {
/* Display the offending page */
ui.stackPages->setCurrentPage(page);
/* Show the user what went wrong */
QMessageBox::warning(this,
tr("Error Saving Configuration"), errmsg,
QMessageBox::Ok, QMessageBox::NoButton);
/* Don't process the rest of the pages */
return;
}
}
/* call to RsIface save function.... */
//rsicontrol -> ConfigSave();
QMainWindow::close();
}
/** Cancel and close the Preferences Window. */
void
PreferencesWindow::cancelpreferences()
{
QMainWindow::close();
}
void
PreferencesWindow::closeEvent (QCloseEvent * event)
{
hide();
event->ignore();
}
/** Displays the help browser and displays the most recently viewed help
* topic. */
void
PreferencesWindow::showHelp()
{
showHelp(QString());
}
/**< Shows the help browser and displays the given help <b>topic</b>. */
void
PreferencesWindow::showHelp(const QString &topic)
{
static HelpBrowser *helpBrowser = 0;
if (!helpBrowser)
helpBrowser = new HelpBrowser(this);
helpBrowser->showWindow(topic);
}
/** Shows help information for whichever settings page the user is currently
* viewing. */
/*void
PreferencesWindow::help()
{
Page currentPage = static_cast<Page>(ui.stackPages->currentIndex());
switch (currentPage) {
case General:
help("config.general"); break;
case Server:
help("config.server"); break;
case Directories:
help("config.directories"); break;
default:
help("config.general"); break;
}
}*/
/** Called when a ConfigPage in the dialog requests help on a specific
* <b>topic</b>. */
/*void
PreferencesWindow::help(const QString &topic)
{
emit helpRequested(topic);
}*/

View File

@ -1,107 +0,0 @@
/****************************************************************
* RShare 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 _PreferencesWindow_H
#define _PreferencesWindow_H
#include <QMainWindow>
#include <QFileDialog>
#include "GeneralDialog.h"
#include "DirectoriesDialog.h"
#include "ServerDialog.h"
#include "CryptographyDialog.h"
#include "AppearanceDialog.h"
#include "NotifyDialog.h"
#include "FileAssotiationsDialog.h"
#include "SoundDialog.h"
#include "gui/help/browser/helpbrowser.h"
#include <gui/common/rwindow.h>
#include "ui_PreferencesWindow.h"
class PreferencesWindow : public RWindow
{
Q_OBJECT
public:
/** Preferences dialog pages. */
enum Page {
General = 0, /** Preferences page. */
Server, /** Server page. */
Directories, /** Directories page. */
Appearance, /** Appearance page. */
Notify, /** Notify page. */
Security, /** Security page. */
FileAssotiations, /** File assotiations page. */
Sound /** Sound page. */
};
/** Default Constructor */
PreferencesWindow(QWidget *parent = 0, Qt::WFlags flags = 0);
/** Default destructor */
//~PreferencesWindow();
protected:
void closeEvent (QCloseEvent * event);
public slots:
/** Called when this dialog is to be displayed */
//void show();
/** Shows the Preferences dialog with focus set to the given page. */
void showWindow(Page page);
private slots:
/** Called when user clicks "Save Settings" */
void saveChanges();
/**void preferences();*/
void cancelpreferences();
/** Called when a ConfigPage in the dialog requests help on a specific
* <b>topic</b>. */
//void help(const QString &topic);
/** Shows general help information for whichever settings page the user is
* currently viewing. */
//void help();
/** Displays the help browser and displays the most recently viewed help
* topic. */
void showHelp();
/** Called when a child window requests the given help <b>topic</b>. */
void showHelp(const QString &topic);
private:
/** Loads the current configuration settings */
void loadSettings();
/** Creates a new action for a config page. */
QAction* createPageAction(QIcon img, QString text, QActionGroup *group);
/** Adds a new action to the toolbar. */
void addAction(QAction *action, const char *slot = 0);
/** Qt Designer generated object */
Ui::PreferencesWindow ui;
};
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,374 +0,0 @@
/****************************************************************
* RShare 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 <rshare.h>
#include "ServerDialog.h"
#include <gui/TurtleRouterDialog.h>
#include <iostream>
#include <sstream>
#include "rsiface/rsiface.h"
#include "rsiface/rspeers.h"
#include <QTimer>
/** Constructor */
ServerDialog::ServerDialog(QWidget *parent)
: ConfigPage(parent)
{
/* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this);
/* Create RshareSettings object */
_settings = new RshareSettings();
connect( ui.netModeComboBox, SIGNAL( activated ( int ) ), this, SLOT( toggleUPnP( ) ) );
connect( ui.allowIpDeterminationCB, SIGNAL( toggled( bool ) ), this, SLOT( toggleIpDetermination(bool) ) );
connect( ui._showTurtleDialogPB,SIGNAL(clicked()),this,SLOT( showTurtleRouterDialog() )) ;
ui._enableTurtleCB->setChecked(true) ;
ui._enableTurtleCB->setEnabled(false) ;
QTimer *timer = new QTimer(this);
timer->connect(timer, SIGNAL(timeout()), this, SLOT(updateStatus()));
timer->start(1000);
load();
updateStatus();
bool b = rsPeers->getAllowServerIPDetermination() ;
ui.allowIpDeterminationCB->setChecked(b) ;
ui.IPServersLV->setEnabled(b) ;
std::list<std::string> ip_servers ;
rsPeers->getIPServersList(ip_servers) ;
for(std::list<std::string>::const_iterator it(ip_servers.begin());it!=ip_servers.end();++it)
ui.IPServersLV->addItem(QString::fromStdString(*it)) ;
/* Hide platform specific features */
#ifdef Q_WS_WIN
#endif
}
void ServerDialog::showTurtleRouterDialog()
{
TurtleRouterDialog::showUp() ;
}
void ServerDialog::toggleIpDetermination(bool b)
{
rsPeers->allowServerIPDetermination(b) ;
ui.IPServersLV->setEnabled(b) ;
}
/** Saves the changes on this page */
bool
ServerDialog::save(QString &errmsg)
{
/* save the server address */
/* save local address */
/* save the url for DNS access */
/* restart server */
/* save all? */
saveAddresses();
return true;
}
/** Loads the settings for this page */
void ServerDialog::load()
{
/* load up configuration from rsPeers */
RsPeerDetails detail;
if (!rsPeers->getPeerDetails(rsPeers->getOwnId(), detail))
{
return;
}
/* set net mode */
int netIndex = 0;
switch(detail.tryNetMode)
{
case RS_NETMODE_EXT:
netIndex = 2;
break;
case RS_NETMODE_UDP:
netIndex = 1;
break;
default:
case RS_NETMODE_UPNP:
netIndex = 0;
break;
}
ui.netModeComboBox->setCurrentIndex(netIndex);
/* set dht/disc */
netIndex = 1;
if (detail.visState & RS_VS_DHT_ON)
{
netIndex = 0;
}
ui.dhtComboBox->setCurrentIndex(netIndex);
netIndex = 1;
if (detail.visState & RS_VS_DISC_ON)
{
netIndex = 0;
}
ui.discComboBox->setCurrentIndex(netIndex);
rsiface->lockData(); /* Lock Interface */
ui.totalDownloadRate->setValue(rsiface->getConfig().maxDownloadDataRate);
ui.totalUploadRate->setValue(rsiface->getConfig().maxUploadDataRate);
rsiface->unlockData(); /* UnLock Interface */
toggleUPnP();
/* Addresses must be set here - otherwise can't edit it */
/* set local address */
ui.localAddress->setText(QString::fromStdString(detail.localAddr));
ui.localPort -> setValue(detail.localPort);
/* set the server address */
ui.extAddress->setText(QString::fromStdString(detail.extAddr));
ui.extPort -> setValue(detail.extPort);
}
/** Loads the settings for this page */
void ServerDialog::updateStatus()
{
/* load up configuration from rsPeers */
RsPeerDetails detail;
if (!rsPeers->getPeerDetails(rsPeers->getOwnId(), detail))
{
return;
}
/* only update if can't edit */
if (!ui.localPort->isEnabled())
{
/* set local address */
ui.localPort -> setValue(detail.localPort);
ui.extPort -> setValue(detail.extPort);
}
/* set local address */
ui.localAddress->setText(QString::fromStdString(detail.localAddr));
/* set the server address */
ui.extAddress->setText(QString::fromStdString(detail.extAddr));
#if 0
/* set status */
std::ostringstream out;
out << "Attempted Network Mode: ";
switch(detail.tryNetMode)
{
case RS_NETMODE_EXT:
out << "External Forwarded Port (UltraPEER Mode)";
break;
case RS_NETMODE_UDP:
out << "Firewalled";
break;
default:
case RS_NETMODE_UPNP:
out << "Automatic: UPnP Forwarded Port";
break;
}
out << std::endl;
out << "Actual Network Mode: ";
switch(detail.netMode)
{
case RS_NETMODE_EXT:
out << "External Forwarded Port (UltraPEER Mode)";
break;
case RS_NETMODE_UDP:
out << "Firewalled";
break;
case RS_NETMODE_UPNP:
out << "Automatic: UPnP Forwarded Port";
break;
default:
case RS_NETMODE_UNREACHABLE:
out << "Unreachable: Firewalled by Symmetric NAT";
break;
}
out << std::endl;
out << "\tLocal Address: " << detail.localAddr;
out << ":" << detail.localPort;
out << std::endl;
out << "\tExternal Address: " << detail.extAddr;
out << ":" << detail.extPort;
out << std::endl;
out << "UPnP Status: ";
out << std::endl;
out << "DHT Status: ";
if (detail.visState & RS_VS_DHT_ON)
out << " Enabled";
else
out << " Disabled";
out << std::endl;
out << "Discovery Status: ";
if (detail.visState & RS_VS_DISC_ON)
out << " Enabled";
else
out << " Disabled";
out << std::endl;
if (detail.netMode == RS_NETMODE_UNREACHABLE)
{
ui.netStatusBox->setTextColor( Qt::red );
}
else
{
ui.netStatusBox->setTextColor( Qt::black );
}
ui.netStatusBox->setText(QString::fromStdString(out.str()));
ui.netStatusBox ->setReadOnly(true);
#endif
}
void ServerDialog::toggleUPnP()
{
/* switch on the radioButton */
bool settingChangeable = false;
if (0 != ui.netModeComboBox->currentIndex())
{
settingChangeable = true;
}
if (settingChangeable)
{
ui.dhtComboBox->setEnabled(true);
// disabled until we've got it all working.
//ui.discComboBox->setEnabled(true);
ui.discComboBox->setEnabled(false);
ui.localAddress->setReadOnly (true);
ui.localPort -> setEnabled (true);
ui.extAddress -> setReadOnly (true);
ui.extPort -> setEnabled (true);
}
else
{
ui.dhtComboBox->setEnabled(false);
ui.discComboBox->setEnabled(false);
ui.localAddress->setEnabled(false);
ui.localPort -> setEnabled(false);
ui.extAddress -> setEnabled(false);
ui.extPort -> setEnabled(false);
}
}
void ServerDialog::saveAddresses()
{
QString str;
bool saveAddr = false;
RsPeerDetails detail;
std::string ownId = rsPeers->getOwnId();
if (!rsPeers->getPeerDetails(ownId, detail))
{
return;
}
int netIndex = ui.netModeComboBox->currentIndex();
/* Check if netMode has changed */
int netMode = 0;
switch(netIndex)
{
case 2:
netMode = RS_NETMODE_EXT;
break;
case 1:
netMode = RS_NETMODE_UDP;
break;
default:
case 0:
netMode = RS_NETMODE_UPNP;
break;
}
if (detail.tryNetMode != netMode)
{
rsPeers->setNetworkMode(ownId, netMode);
}
int visState = 0;
/* Check if vis has changed */
if (0 == ui.discComboBox->currentIndex())
{
visState |= RS_VS_DISC_ON;
}
if (0 == ui.dhtComboBox->currentIndex())
{
visState |= RS_VS_DHT_ON;
}
if (visState != detail.visState)
{
rsPeers->setVisState(ownId, visState);
}
if (0 != netIndex)
{
saveAddr = true;
}
if (saveAddr)
{
rsPeers->setLocalAddress(rsPeers->getOwnId(), ui.localAddress->text().toStdString(), ui.localPort->value());
rsPeers->setExtAddress(rsPeers->getOwnId(), ui.extAddress->text().toStdString(), ui.extPort->value());
}
rsicontrol->ConfigSetDataRates( ui.totalDownloadRate->value(), ui.totalUploadRate->value() );
load();
}

View File

@ -1,64 +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 _SERVERDIALOG_H
#define _SERVERDIALOG_H
#include <QFileDialog>
#include "rsharesettings.h"
#include "configpage.h"
#include "ui_ServerDialog.h"
class ServerDialog : public ConfigPage
{
Q_OBJECT
public:
/** Default Constructor */
ServerDialog(QWidget *parent = 0);
/** Default Destructor */
/** Saves the changes on this page */
bool save(QString &errmsg);
/** Loads the settings for this page */
void load();
public slots:
void updateStatus();
private slots:
void saveAddresses();
void toggleUPnP();
void toggleIpDetermination(bool) ;
void showTurtleRouterDialog();
private:
/** A RshareSettings object used for saving/loading settings */
RshareSettings* _settings;
/** Qt Designer generated object */
Ui::ServerDialog ui;
};
#endif

View File

@ -1,864 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ServerDialog</class>
<widget class="QWidget" name="ServerDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>467</width>
<height>448</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>128</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>192</red>
<green>192</green>
<blue>192</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>128</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
<layout class="QGridLayout">
<property name="margin">
<number>6</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Network Configuration (takes effect after restart)</string>
</property>
<layout class="QHBoxLayout">
<item>
<layout class="QVBoxLayout">
<item>
<widget class="QComboBox" name="netModeComboBox">
<item>
<property name="text">
<string>Automatic</string>
</property>
</item>
<item>
<property name="text">
<string>Firewalled</string>
</property>
</item>
<item>
<property name="text">
<string>Forwarded Port</string>
</property>
</item>
</widget>
</item>
<item>
<layout class="QHBoxLayout">
<item>
<widget class="QComboBox" name="dhtComboBox">
<item>
<property name="text">
<string>DHT Enabled</string>
</property>
</item>
<item>
<property name="text">
<string>DHT Disabled</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QComboBox" name="discComboBox">
<item>
<property name="text">
<string>Discovery Enabled</string>
</property>
</item>
<item>
<property name="text">
<string>Discovery Disabled</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Network Configuration</string>
</attribute>
<layout class="QGridLayout">
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Network Configuration</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout">
<item>
<layout class="QVBoxLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Local Address</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>External Address</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout">
<item row="0" column="0">
<widget class="QLineEdit" name="localAddress"/>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Port:</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QSpinBox" name="localPort">
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>65535</number>
</property>
<property name="value">
<number>7812</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLineEdit" name="extAddress"/>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Port:</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QSpinBox" name="extPort">
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>65535</number>
</property>
<property name="value">
<number>7812</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>IP Service</string>
</attribute>
<layout class="QGridLayout">
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>IP check service</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QCheckBox" name="allowIpDeterminationCB">
<property name="toolTip">
<string>If you unckeck this, RetroShare can only determine your IP
when you connect to somebody. Leaving this checked helps
connecting when you have few friends. It also helps if you're
behind a firewall or a VPN.</string>
</property>
<property name="text">
<string>Allow RetroShare to ask my ip to these websites:</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QListWidget" name="IPServersLV">
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_3">
<attribute name="title">
<string>F2F routing</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QCheckBox" name="_enableTurtleCB">
<property name="text">
<string>enable anonymous F2F routing</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="_showTurtleDialogPB">
<property name="text">
<string>Show router statistics</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QTextEdit" name="textEdit">
<property name="readOnly">
<bool>true</bool>
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt; font-weight:600;&quot;&gt;RetroShare&lt;/span&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; is capable of transfering data and search requests between peers that are not necessarily friends. This traffic however only transits through a connected list of friends and is anonymous.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;If want to you use &lt;/span&gt;&lt;span style=&quot; font-size:8pt; font-weight:600;&quot;&gt;RetroShare&lt;/span&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; to anonymously share and download files, leaving this checked drastically increases your download scope, and participate into the overall network bandwidth. &lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;You can separately setup share flags for each shared directory:&lt;/span&gt;&lt;/p&gt;
&lt;ul style=&quot;-qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; font-size:8pt;&quot; style=&quot; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Browsable by friends&lt;/span&gt;: files are browsable from your direct friends.&lt;/li&gt;
&lt;li style=&quot; font-size:8pt;&quot; style=&quot; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Anonymously shared&lt;/span&gt;: files can be downloaded by anybody through anonymous tunnels.&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="groupBox_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Transfer Rates</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label_14">
<property name="text">
<string>Download (KB/s) </string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="totalDownloadRate">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>12500</number>
</property>
<property name="value">
<number>1</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="_2">
<property name="spacing">
<number>6</number>
</property>
<item>
<widget class="QLabel" name="label_15">
<property name="text">
<string>Upload (KB/s) </string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="totalUploadRate">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>12500</number>
</property>
<property name="value">
<number>1</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<tabstops>
<tabstop>localAddress</tabstop>
<tabstop>localPort</tabstop>
<tabstop>extPort</tabstop>
<tabstop>totalDownloadRate</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>

View File

@ -1,174 +0,0 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2006 - 2009 RetroShare Team
*
* 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 <rshare.h>
#include "SoundDialog.h"
/** Constructor */
SoundDialog::SoundDialog(QWidget *parent)
: ConfigPage(parent)
{
/* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this);
/* Create RshareSettings object */
_settings = new RshareSettings();
connect(ui.cmd_openFile, SIGNAL(clicked(bool) ),this,SLOT(on_cmd_openFile()));
connect(ui.cmd_openFile_2,SIGNAL(clicked(bool) ),this,SLOT(on_cmd_openFile2()));
connect(ui.cmd_openFile_3,SIGNAL(clicked(bool) ),this,SLOT(on_cmd_openFile3()));
connect(ui.cmd_openFile_4,SIGNAL(clicked(bool) ),this,SLOT(on_cmd_openFile4()));
connect(ui.cmd_openFile_5,SIGNAL(clicked(bool) ),this,SLOT(on_cmd_openFile5()));
connect(ui.cmd_openFile_6,SIGNAL(clicked(bool) ),this,SLOT(on_cmd_openFile6()));
/* Hide platform specific features */
#ifdef Q_WS_WIN
#endif
}
/** Saves the changes on this page */
bool
SoundDialog::save(QString &errmsg)
{
_settings->beginGroup("Sound");
_settings->beginGroup("Enable");
_settings->setValue("User_go_Online",ui.checkBoxSound->isChecked());
_settings->setValue("User_go_Offline",ui.checkBoxSound_2->isChecked());
_settings->setValue("FileSend_Finished",ui.checkBoxSound_3->isChecked());
_settings->setValue("FileRecive_Incoming",ui.checkBoxSound_4->isChecked());
_settings->setValue("FileRecive_Finished",ui.checkBoxSound_5->isChecked());
_settings->setValue("NewChatMessage",ui.checkBoxSound_6->isChecked());
_settings->endGroup();
_settings->beginGroup("SoundFilePath");
_settings->setValue("User_go_Online",ui.txt_SoundFile->text());
_settings->setValue("User_go_Offline",ui.txt_SoundFile2->text());
_settings->setValue("FileSend_Finished",ui.txt_SoundFile3->text());
_settings->setValue("FileRecive_Incoming",ui.txt_SoundFile4->text());
_settings->setValue("FileRecive_Finished",ui.txt_SoundFile5->text());
_settings->setValue("NewChatMessage",ui.txt_SoundFile6->text());
_settings->endGroup();
_settings->endGroup();
return true;
}
/** Loads the settings for this page */
void
SoundDialog::load()
{
_settings->beginGroup("Sound");
_settings->beginGroup("SoundFilePath");
ui.txt_SoundFile->setText(_settings->value("User_go_Online","").toString());
ui.txt_SoundFile2->setText(_settings->value("User_go_Offline","").toString());
ui.txt_SoundFile3->setText(_settings->value("FileSend_Finished","").toString());
ui.txt_SoundFile4->setText(_settings->value("FileRecive_Incoming","").toString());
ui.txt_SoundFile5->setText(_settings->value("FileRecive_Finished","").toString());
ui.txt_SoundFile6->setText(_settings->value("NewChatMessage","").toString());
if(!ui.txt_SoundFile->text().isEmpty())ui.checkBoxSound->setEnabled(true);
if(!ui.txt_SoundFile2->text().isEmpty())ui.checkBoxSound_2->setEnabled(true);
if(!ui.txt_SoundFile3->text().isEmpty())ui.checkBoxSound_3->setEnabled(true);
if(!ui.txt_SoundFile4->text().isEmpty())ui.checkBoxSound_4->setEnabled(true);
if(!ui.txt_SoundFile5->text().isEmpty())ui.checkBoxSound_5->setEnabled(true);
if(!ui.txt_SoundFile6->text().isEmpty())ui.checkBoxSound_6->setEnabled(true);
_settings->endGroup();
_settings->beginGroup("Enable");
ui.checkBoxSound->setChecked(_settings->value("User_go_Online",false).toBool());
ui.checkBoxSound_2->setChecked(_settings->value("User_go_Offline",false).toBool());
ui.checkBoxSound_3->setChecked(_settings->value("FileSend_Finished",false).toBool());
ui.checkBoxSound_4->setChecked(_settings->value("FileRecive_Incoming",false).toBool());
ui.checkBoxSound_5->setChecked(_settings->value("FileRecive_Finished",false).toBool());
ui.checkBoxSound_6->setChecked(_settings->value("NewChatMessage",false).toBool());
_settings->endGroup();
_settings->endGroup();
}
void SoundDialog::on_cmd_openFile()
{
ui.txt_SoundFile->setText(QFileDialog::getOpenFileName(this,"Open File", ".", "wav (*.wav)"));
if(ui.txt_SoundFile->text().isEmpty()){
ui.checkBoxSound->setChecked(false);
ui.checkBoxSound->setEnabled(false);
}
else
ui.checkBoxSound->setEnabled(true);
}
void SoundDialog::on_cmd_openFile2()
{
ui.txt_SoundFile2->setText(QFileDialog::getOpenFileName(this,"Open File", ".", "wav (*.wav)"));
if(ui.txt_SoundFile2->text().isEmpty()){
ui.checkBoxSound_2->setChecked(false);
ui.checkBoxSound_2->setEnabled(false);
}
else
ui.checkBoxSound_2->setEnabled(true);
}
void SoundDialog::on_cmd_openFile3()
{
ui.txt_SoundFile3->setText(QFileDialog::getOpenFileName(this,"Open File", ".", "wav (*.wav)"));
if(ui.txt_SoundFile3->text().isEmpty()){
ui.checkBoxSound_3->setChecked(false);
ui.checkBoxSound_3->setEnabled(false);
}
else
ui.checkBoxSound_3->setEnabled(true);
}
void SoundDialog::on_cmd_openFile4()
{
ui.txt_SoundFile4->setText(QFileDialog::getOpenFileName(this,"Open File", ".", "wav (*.wav)"));
if(ui.txt_SoundFile4->text().isEmpty()){
ui.checkBoxSound_4->setChecked(false);
ui.checkBoxSound_4->setEnabled(false);
}
else
ui.checkBoxSound_4->setEnabled(true);
}
void SoundDialog::on_cmd_openFile5()
{
ui.txt_SoundFile5->setText(QFileDialog::getOpenFileName(this,"Open File", ".", "wav (*.wav)"));
if(ui.txt_SoundFile5->text().isEmpty()){
ui.checkBoxSound_5->setChecked(false);
ui.checkBoxSound_5->setEnabled(false);
}
else
ui.checkBoxSound_5->setEnabled(true);
}
void SoundDialog::on_cmd_openFile6()
{
ui.txt_SoundFile6->setText(QFileDialog::getOpenFileName(this,"Open File", ".", "wav (*.wav)"));
if(ui.txt_SoundFile6->text().isEmpty()){
ui.checkBoxSound_6->setChecked(false);
ui.checkBoxSound_6->setEnabled(false);
}
else
ui.checkBoxSound_6->setEnabled(true);
}

View File

@ -1,64 +0,0 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2006 - 2009 RetroShare Team
*
* 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 _SOUNDDIALOG_H
#define _SOUNDDIALOG_H
#include <QFileDialog>
#include <gui/Preferences/rsharesettings.h>
#include "configpage.h"
#include "ui_SoundDialog.h"
class SoundDialog : public ConfigPage
{
Q_OBJECT
public:
/** Default Constructor */
SoundDialog(QWidget *parent = 0);
/** Default Destructor */
/** Saves the changes on this page */
bool save(QString &errmsg);
/** Loads the settings for this page */
void load();
private slots:
void on_cmd_openFile();
void on_cmd_openFile2();
void on_cmd_openFile3();
void on_cmd_openFile4();
void on_cmd_openFile5();
void on_cmd_openFile6();
private:
/** A RshareSettings object used for saving/loading settings */
RshareSettings* _settings;
/** Qt Designer generated object */
Ui::SoundDialog ui;
};
#endif

View File

@ -1,814 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SoundDialog</class>
<widget class="QWidget" name="SoundDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>468</width>
<height>407</height>
</rect>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>128</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>192</red>
<green>192</green>
<blue>192</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>128</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="font">
<font>
<family>Arial</family>
<pointsize>8</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_11">
<property name="title">
<string>Sound Events</string>
</property>
<widget class="QGroupBox" name="groupBox_12">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>421</width>
<height>81</height>
</rect>
</property>
<property name="title">
<string>User</string>
</property>
<widget class="QCheckBox" name="checkBoxSound">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>80</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>go Online</string>
</property>
</widget>
<widget class="QCheckBox" name="checkBoxSound_2">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>50</y>
<width>80</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>go Offline</string>
</property>
</widget>
<widget class="QLineEdit" name="txt_SoundFile">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>90</x>
<y>20</y>
<width>281</width>
<height>24</height>
</rect>
</property>
</widget>
<widget class="QLineEdit" name="txt_SoundFile2">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>90</x>
<y>50</y>
<width>281</width>
<height>24</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="cmd_openFile">
<property name="geometry">
<rect>
<x>380</x>
<y>20</y>
<width>31</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
<widget class="QPushButton" name="cmd_openFile_2">
<property name="geometry">
<rect>
<x>380</x>
<y>50</y>
<width>31</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_13">
<property name="geometry">
<rect>
<x>10</x>
<y>100</y>
<width>421</width>
<height>61</height>
</rect>
</property>
<property name="title">
<string>FileSend</string>
</property>
<widget class="QLineEdit" name="txt_SoundFile3">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>90</x>
<y>20</y>
<width>281</width>
<height>24</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="cmd_openFile_3">
<property name="geometry">
<rect>
<x>380</x>
<y>20</y>
<width>31</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
<widget class="QCheckBox" name="checkBoxSound_3">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>80</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Finished</string>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_14">
<property name="geometry">
<rect>
<x>10</x>
<y>160</y>
<width>421</width>
<height>91</height>
</rect>
</property>
<property name="title">
<string>FileRecive</string>
</property>
<widget class="QCheckBox" name="checkBoxSound_4">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>80</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Incoming</string>
</property>
</widget>
<widget class="QLineEdit" name="txt_SoundFile4">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>90</x>
<y>20</y>
<width>281</width>
<height>24</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="cmd_openFile_4">
<property name="geometry">
<rect>
<x>380</x>
<y>20</y>
<width>31</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
<widget class="QPushButton" name="cmd_openFile_5">
<property name="geometry">
<rect>
<x>380</x>
<y>50</y>
<width>31</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
<widget class="QCheckBox" name="checkBoxSound_5">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>50</y>
<width>80</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Finished</string>
</property>
</widget>
<widget class="QLineEdit" name="txt_SoundFile5">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>90</x>
<y>50</y>
<width>281</width>
<height>24</height>
</rect>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_15">
<property name="geometry">
<rect>
<x>10</x>
<y>260</y>
<width>421</width>
<height>111</height>
</rect>
</property>
<property name="title">
<string>Chatmessage</string>
</property>
<widget class="QPushButton" name="cmd_openFile_6">
<property name="geometry">
<rect>
<x>380</x>
<y>20</y>
<width>31</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
<widget class="QCheckBox" name="checkBoxSound_6">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>80</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>New</string>
</property>
</widget>
<widget class="QLineEdit" name="txt_SoundFile6">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>90</x>
<y>20</y>
<width>281</width>
<height>24</height>
</rect>
</property>
</widget>
</widget>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="../images.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -1,43 +0,0 @@
/****************************************************************
* This file is distributed under the following license:
*
* Copyright (c) 2006-2007, crypton
* Copyright (c) 2006, Matt Edman, Justin Hipple
*
* 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 _CONFIGPAGE_H
#define _CONFIGPAGE_H
#include <QWidget>
class ConfigPage : public QWidget
{
public:
/** Default Constructor */
ConfigPage(QWidget *parent = 0) : QWidget(parent) {}
/** Pure virtual method. Subclassed pages load their config settings here. */
virtual void load() = 0;
/** Pure virtual method. Subclassed pages save their config settings here
* and return true if everything was saved successfully. */
virtual bool save(QString &errmsg) = 0;
};
#endif

View File

@ -1,63 +0,0 @@
/****************************************************************
* This file is distributed under the following license:
*
* Copyright (c) 2006-2007, crypton
* Copyright (c) 2006, Matt Edman, Justin Hipple
*
* 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 <QAction>
#include "configpagestack.h"
/** Default constructor. */
ConfigPageStack::ConfigPageStack(QWidget *parent)
: QStackedWidget(parent)
{
}
/** Adds a page to the stack. */
void
ConfigPageStack::add(ConfigPage *page, QAction *action)
{
_pages.insert(action, page);
insertWidget(count(), page);
}
/** Sets the current config page and checks its action. */
void
ConfigPageStack::setCurrentPage(ConfigPage *page)
{
foreach (QAction *action, _pages.keys(page)) {
action->setChecked(true);
}
setCurrentWidget(page);
}
/** Sets the current config page index and checks its action. */
void
ConfigPageStack::setCurrentIndex(int index)
{
setCurrentPage((ConfigPage *)widget(index));
}
/** Shows the config page associated with the activated action. */
void
ConfigPageStack::showPage(QAction *pageAction)
{
setCurrentWidget(_pages.value(pageAction));
}

View File

@ -1,60 +0,0 @@
/****************************************************************
* This file is distributed under the following license:
*
* Copyright (c) 2006-2007, crypton
* Copyright (c) 2006, Matt Edman, Justin Hipple
*
* 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 _CONFIGPAGESTACK_H
#define _CONFIGPAGESTACK_H
#include <QStackedWidget>
#include <QHash>
#include "configpage.h"
class ConfigPageStack : public QStackedWidget
{
Q_OBJECT
public:
/** Constructor. */
ConfigPageStack(QWidget *parent = 0);
/** Adds a configuration page to the stack. */
void add(ConfigPage *page, QAction *action);
/** Sets the current config page and checks its action. */
void setCurrentPage(ConfigPage *page);
/** Sets the current config page index and checks its action. */
void setCurrentIndex(int index);
/** Returns a list of all pages in the stack. */
QList<ConfigPage*> pages() { return _pages.values(); }
public slots:
/** Displays the page associated with the activated action. */
void showPage(QAction *pageAction);
private:
/** Maps an action to a config page. */
QHash<QAction*, ConfigPage*> _pages;
};
#endif

View File

@ -33,7 +33,7 @@
#include "mainpage.h"
#include "ui_SearchDialog.h"
#include "advsearch/advancedsearchdialog.h"
#include "Preferences/rsharesettings.h"
#include "settings/rsharesettings.h"
class SearchDialog : public MainPage
{

View File

@ -22,14 +22,14 @@
#include "rshare.h"
#include "SharedFilesDialog.h"
#include "Preferences/AddFileAssotiationDialog.h"
#include "settings/AddFileAssociationDialog.h"
#include "rsiface/rsiface.h"
#include "rsiface/rspeers.h"
#include "rsiface/rsfiles.h"
#include "util/RsAction.h"
#include "msgs/ChanMsgDialog.h"
#include "Preferences/rsharesettings.h"
#include "settings/rsharesettings.h"
#include "AddLinksDialog.h"
#ifndef RETROSHARE_LINK_ANALYZER
@ -662,7 +662,7 @@ SharedFilesDialog::fileAssotiationAction(const QString fileName)
// QSettings::IniFormat);
settings->beginGroup("FileAssotiations");
QString key = AddFileAssotiationDialog::cleanFileType(currentFile) ;
QString key = AddFileAssociationDialog::cleanFileType(currentFile) ;
if ( settings->contains(key) )
{
result = new QAction(QIcon(IMAGE_PLAY), tr( "Open File" ), this );
@ -704,9 +704,9 @@ SharedFilesDialog::runCommandForFile()
void
SharedFilesDialog::tryToAddNewAssotiation()
{
AddFileAssotiationDialog afad(true, this);//'add file assotiations' dialog
AddFileAssociationDialog afad(true, this);//'add file assotiations' dialog
afad.setFileType(AddFileAssotiationDialog::cleanFileType(currentFile));
afad.setFileType(AddFileAssociationDialog::cleanFileType(currentFile));
int ti = afad.exec();

View File

@ -25,7 +25,7 @@
#include <QSettings>
#include <QtGui>
#include <gui/Preferences/rsharesettings.h>
#include "settings/rsharesettings.h"
class SoundManager :public QObject

View File

@ -23,7 +23,7 @@
#ifndef _STARTDIALOG_H
#define _STARTDIALOG_H
#include <gui/Preferences/rsharesettings.h>
#include "settings/rsharesettings.h"
#include "rsiface/rsiface.h"
/********
#if (QT_VERSION >= 040300)

View File

@ -28,7 +28,7 @@
#include <QEvent>
#include <QTimer>
#include <gui/Preferences/rsharesettings.h>
#include <gui/settings/rsharesettings.h>
#include <gui/common/rwindow.h>
#include "ui_bwgraph.h"

View File

@ -27,7 +27,7 @@
#include <QDialog>
#include "ui_PopupChatDialog.h"
#include <gui/Preferences/rsharesettings.h>
#include <gui/settings/rsharesettings.h>
#include "rsiface/rsiface.h"
#include "gui/feeds/SubFileItem.h"

View File

@ -28,7 +28,7 @@
#include <QWidget>
#include <QVariant>
#include <QMainWindow>
#include <gui/Preferences/rsettings.h>
#include <gui/settings/rsettings.h>
class RWindow : public QMainWindow

View File

@ -23,7 +23,7 @@
#ifndef _CONNECTDIALOG_H
#define _CONNECTDIALOG_H
#include <gui/Preferences/rsharesettings.h>
#include <gui/settings/rsharesettings.h>
#include "ui_ConnectDialog.h"

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>517</width>
<height>57</height>
<width>640</width>
<height>87</height>
</rect>
</property>
<property name="windowTitle">
@ -39,211 +39,213 @@ background: white;}
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="fileLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>300</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>File Name</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>100</width>
<height>26</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QProgressBar" name="progressBar">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>50</width>
<height>0</height>
</size>
</property>
<property name="value">
<number>24</number>
</property>
<property name="format">
<string>%p Kb</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="expandButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Expand</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/textedit/zoomin.png</normaloff>:/images/textedit/zoomin.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="saveButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Save File</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/save24.png</normaloff>:/images/save24.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cancelButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Cancel Download</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/delete.png</normaloff>:/images/delete.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="downloadButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Download File</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/download.png</normaloff>:/images/download.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="playButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Play File</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/start.png</normaloff>:/images/start.png</iconset>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0" rowspan="2" colspan="2">
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="fileLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>300</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>File Name</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>100</width>
<height>26</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="2">
<widget class="QProgressBar" name="progressBar">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>50</width>
<height>0</height>
</size>
</property>
<property name="value">
<number>24</number>
</property>
<property name="format">
<string>%p Kb</string>
</property>
</widget>
</item>
<item row="0" column="3">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="3">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QPushButton" name="expandButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Expand</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/textedit/zoomin.png</normaloff>:/images/textedit/zoomin.png</iconset>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="saveButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Save File</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/save24.png</normaloff>:/images/save24.png</iconset>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="cancelButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Cancel Download</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/delete.png</normaloff>:/images/delete.png</iconset>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QPushButton" name="downloadButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Download File</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/download.png</normaloff>:/images/download.png</iconset>
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QPushButton" name="playButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Play File</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/start.png</normaloff>:/images/start.png</iconset>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0" colspan="3">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>398</width>
<height>17</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>

View File

@ -22,7 +22,7 @@
#include "CreateForumMsg.h"
#include <gui/Preferences/rsharesettings.h>
#include <gui/settings/rsharesettings.h>
#include "rsiface/rsforums.h"

View File

@ -26,7 +26,7 @@
#include "rsiface/rspeers.h"
#include "rsiface/rsmsgs.h"
#include <gui/Preferences/rsharesettings.h>
#include <gui/settings/rsharesettings.h>
#include "util/misc.h"
#include <sstream>

View File

@ -26,7 +26,7 @@
#include <QMainWindow>
#include <QMap>
#include <QPointer>
#include <gui/Preferences/rsharesettings.h>
#include <gui/settings/rsharesettings.h>
#include "ui_ChanMsgDialog.h"
#include "rsiface/rsfiles.h"

View File

@ -25,7 +25,7 @@
#include <QDialog>
#include <gui/Preferences/rsharesettings.h>
#include <gui/settings/rsharesettings.h>
#include "ui_StatusMessage.h"

View File

@ -26,7 +26,7 @@
#include <QStyleFactory>
#include <QtGui>
#include "gui/Preferences/rsharesettings.h"
#include "rsharesettings.h"
#include <lang/languagesupport.h>
#include "configpage.h"

View File

@ -25,7 +25,7 @@
#include <QFileDialog>
#include <QtGui/QWidget>
#include <gui/Preferences/rsharesettings.h>
#include "rsharesettings.h"
#include "gui/connect/ConnectFriendWizard.h"
#include "configpage.h"

View File

@ -22,7 +22,7 @@
#include "FileAssociationsPage.h"
#include "AddFileAssociationDialog.h"
//#include "rshare.h" // for Rshare::dataDirectory() method
#include "gui/Preferences/rsharesettings.h"
#include "rsharesettings.h"
#include <QSettings>
#include <QApplication>

View File

@ -27,7 +27,7 @@
#include <QFileDialog>
#include <QLineEdit>
#include "gui/Preferences/rsharesettings.h"
#include "rsharesettings.h"
#include "configpage.h"
#include "ui_GeneralPage.h"

View File

@ -25,7 +25,7 @@
#include <QFileDialog>
#include <QtGui/QWidget>
#include "gui/Preferences/rsharesettings.h"
#include "rsharesettings.h"
#include "configpage.h"
#include "ui_NotifyPage.h"

View File

@ -24,7 +24,7 @@
#include <QFileDialog>
#include <gui/Preferences/rsharesettings.h>
#include "rsharesettings.h"
#include "configpage.h"
#include "ui_SoundPage.h"

View File

@ -31,7 +31,6 @@
#include "ui_ApplicationWindow.h"
#include "gui/Preferences/rsharesettings.h"
class ApplicationWindow : public QMainWindow
{

View File

@ -24,8 +24,6 @@
#include <QFileDialog>
//#include <config/rsharesettings.h>
#include "gui/mainpage.h"
#include "ui_ExampleDialog.h"

View File

@ -24,8 +24,6 @@
#include <QFileDialog>
//#include <config/rsharesettings.h>
#include "gui/mainpage.h"
#include "ui_LibraryDialog.h"

View File

@ -27,9 +27,6 @@
#include <QEvent>
#include <QTimer>
#include <gui/Preferences/rsharesettings.h>
#include "gui/mainpage.h"
#include "ui_StatisticDialog.h"
#include "gui/linetypes.h"

View File

@ -25,8 +25,7 @@
#include <gui/MainWindow.h>
#include <gui/StartDialog.h>
#include <gui/GenCertDialog.h>
#include <gui/Preferences/GeneralDialog.h>
#include <gui/Preferences/rsharesettings.h>
#include <gui/settings/rsharesettings.h>
#include <gui/connect/ConfCertDialog.h>
/*** WINDOWS DON'T LIKE THIS - REDEFINES VER numbers.

View File

@ -33,7 +33,7 @@
#include <stdlib.h>
#include <lang/languagesupport.h>
#include "gui/Preferences/rsharesettings.h"
#include "gui/settings/rsharesettings.h"
#include "rshare.h"

View File

@ -36,7 +36,7 @@
#include <QKeySequence>
#include "util/log.h"
#include "gui/Preferences/rsharesettings.h"
#include "gui/settings/rsharesettings.h"
/** Rshare's version string */
#define RSHARE_VERSION "0.7"

View File

@ -11,7 +11,6 @@
#include "gui/PeersDialog.h"
#include "gui/SharedFilesDialog.h"
#include "gui/TransfersDialog.h"
//#include "gui/ChatDialog.h"
#include "gui/MessagesDialog.h"
#include "gui/MessengerWindow.h"
@ -20,7 +19,7 @@
#include "gui/toaster/ChatToaster.h"
#include "gui/toaster/CallToaster.h"
#include "gui/Preferences/rsharesettings.h"
#include "gui/settings/rsharesettings.h"
#include <iostream>
#include <sstream>