Created V0.3.x branch and moved the head into the trunk directory.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@246 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2007-11-15 03:18:48 +00:00
commit 935745a08e
1318 changed files with 348809 additions and 0 deletions

View file

@ -0,0 +1,26 @@
/****************************************************************
* 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

@ -0,0 +1,37 @@
/****************************************************************
* 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

@ -0,0 +1,237 @@
<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

@ -0,0 +1,56 @@
/****************************************************************
* 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 "CryptographyDialog.h"
/** Constructor */
CryptographyDialog::CryptographyDialog(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
CryptographyDialog::save(QString &errmsg)
{
}
/** Loads the settings for this page */
void
CryptographyDialog::load()
{
}

View file

@ -0,0 +1,58 @@
/****************************************************************
* 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 _CRYPTOGRAPHYDIALOG_H
#define _CRYPTOGRAPHYDIALOG_H
#include <QFileDialog>
#include <config/rsharesettings.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:
private:
/** A RshareSettings object used for saving/loading settings */
RshareSettings* _settings;
/** Qt Designer generated object */
Ui::CryptographyDialog ui;
};
#endif

View file

@ -0,0 +1,938 @@
<ui version="4.0" >
<class>CryptographyDialog</class>
<widget class="QWidget" name="CryptographyDialog" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>617</width>
<height>332</height>
</rect>
</property>
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<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>
<widget class="QGroupBox" name="groupBox_2" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>611</width>
<height>51</height>
</rect>
</property>
<property name="title" >
<string>RSA Key Size</string>
</property>
<widget class="QLabel" name="label" >
<property name="geometry" >
<rect>
<x>10</x>
<y>20</y>
<width>54</width>
<height>25</height>
</rect>
</property>
<property name="text" >
<string>Key Size:</string>
</property>
</widget>
<widget class="QSpinBox" name="spinBoxkeysize" >
<property name="geometry" >
<rect>
<x>120</x>
<y>20</y>
<width>481</width>
<height>23</height>
</rect>
</property>
<property name="maximum" >
<number>16384</number>
</property>
<property name="minimum" >
<number>384</number>
</property>
<property name="value" >
<number>1024</number>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_7" >
<property name="geometry" >
<rect>
<x>0</x>
<y>200</y>
<width>611</width>
<height>51</height>
</rect>
</property>
<property name="title" >
<string>Rijndael Mode</string>
</property>
<widget class="QRadioButton" name="radioButton_12" >
<property name="geometry" >
<rect>
<x>120</x>
<y>20</y>
<width>83</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>CBC</string>
</property>
</widget>
<widget class="QRadioButton" name="radioButton_13" >
<property name="geometry" >
<rect>
<x>210</x>
<y>20</y>
<width>71</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>ECB</string>
</property>
</widget>
<widget class="QRadioButton" name="radioButton_14" >
<property name="geometry" >
<rect>
<x>300</x>
<y>20</y>
<width>83</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>CFB</string>
</property>
</widget>
<widget class="QLabel" name="label_5" >
<property name="geometry" >
<rect>
<x>10</x>
<y>20</y>
<width>61</width>
<height>25</height>
</rect>
</property>
<property name="text" >
<string>Mode:</string>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_6" >
<property name="geometry" >
<rect>
<x>0</x>
<y>250</y>
<width>611</width>
<height>51</height>
</rect>
</property>
<property name="title" >
<string>Rijndael Padding</string>
</property>
<widget class="QRadioButton" name="radioButton_15" >
<property name="geometry" >
<rect>
<x>120</x>
<y>20</y>
<width>83</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>PKCS7</string>
</property>
</widget>
<widget class="QRadioButton" name="radioButton_16" >
<property name="geometry" >
<rect>
<x>210</x>
<y>20</y>
<width>83</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>Zeros</string>
</property>
</widget>
<widget class="QRadioButton" name="radioButton_17" >
<property name="geometry" >
<rect>
<x>300</x>
<y>20</y>
<width>83</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>ANSIX923</string>
</property>
</widget>
<widget class="QRadioButton" name="radioButton_18" >
<property name="geometry" >
<rect>
<x>400</x>
<y>20</y>
<width>83</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>ISO10126</string>
</property>
</widget>
<widget class="QLabel" name="label_6" >
<property name="geometry" >
<rect>
<x>10</x>
<y>20</y>
<width>61</width>
<height>25</height>
</rect>
</property>
<property name="text" >
<string>Padding:</string>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_3" >
<property name="geometry" >
<rect>
<x>0</x>
<y>100</y>
<width>611</width>
<height>51</height>
</rect>
</property>
<property name="title" >
<string>Rijndael Feedback Size</string>
</property>
<widget class="QRadioButton" name="radioButton_2" >
<property name="geometry" >
<rect>
<x>120</x>
<y>20</y>
<width>83</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>128 Bits</string>
</property>
</widget>
<widget class="QRadioButton" name="radioButton_5" >
<property name="geometry" >
<rect>
<x>210</x>
<y>20</y>
<width>83</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>192 Bits</string>
</property>
</widget>
<widget class="QRadioButton" name="radioButton_10" >
<property name="geometry" >
<rect>
<x>300</x>
<y>20</y>
<width>83</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>256 Bits</string>
</property>
</widget>
<widget class="QLabel" name="label_3" >
<property name="geometry" >
<rect>
<x>10</x>
<y>20</y>
<width>82</width>
<height>25</height>
</rect>
</property>
<property name="text" >
<string>Feedback Size:</string>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_4" >
<property name="geometry" >
<rect>
<x>0</x>
<y>50</y>
<width>611</width>
<height>51</height>
</rect>
</property>
<property name="title" >
<string>Rijndael Block size</string>
</property>
<widget class="QRadioButton" name="radioButton" >
<property name="geometry" >
<rect>
<x>120</x>
<y>20</y>
<width>83</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>128 Bits</string>
</property>
</widget>
<widget class="QRadioButton" name="radioButton_7" >
<property name="geometry" >
<rect>
<x>230</x>
<y>50</y>
<width>83</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>192 Bits</string>
</property>
</widget>
<widget class="QRadioButton" name="radioButton_8" >
<property name="geometry" >
<rect>
<x>240</x>
<y>60</y>
<width>83</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>192 Bits</string>
</property>
</widget>
<widget class="QRadioButton" name="radioButton_4" >
<property name="geometry" >
<rect>
<x>210</x>
<y>20</y>
<width>83</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>192 Bits</string>
</property>
</widget>
<widget class="QRadioButton" name="radioButton_9" >
<property name="geometry" >
<rect>
<x>300</x>
<y>20</y>
<width>83</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>256 Bits</string>
</property>
</widget>
<widget class="QLabel" name="label_2" >
<property name="geometry" >
<rect>
<x>10</x>
<y>20</y>
<width>61</width>
<height>25</height>
</rect>
</property>
<property name="text" >
<string>Block Size:</string>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_5" >
<property name="geometry" >
<rect>
<x>0</x>
<y>150</y>
<width>611</width>
<height>51</height>
</rect>
</property>
<property name="title" >
<string>Rijndael Key Size</string>
</property>
<widget class="QRadioButton" name="radioButton_3" >
<property name="geometry" >
<rect>
<x>120</x>
<y>20</y>
<width>83</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>128 Bits</string>
</property>
</widget>
<widget class="QRadioButton" name="radioButton_11" >
<property name="geometry" >
<rect>
<x>300</x>
<y>20</y>
<width>83</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>256 Bits</string>
</property>
</widget>
<widget class="QRadioButton" name="radioButton_6" >
<property name="geometry" >
<rect>
<x>210</x>
<y>20</y>
<width>83</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>192 Bits</string>
</property>
</widget>
<widget class="QLabel" name="label_4" >
<property name="geometry" >
<rect>
<x>10</x>
<y>20</y>
<width>54</width>
<height>25</height>
</rect>
</property>
<property name="text" >
<string>Key Size:</string>
</property>
</widget>
</widget>
</widget>
<tabstops>
<tabstop>spinBoxkeysize</tabstop>
<tabstop>radioButton</tabstop>
<tabstop>radioButton_4</tabstop>
<tabstop>radioButton_9</tabstop>
<tabstop>radioButton_2</tabstop>
<tabstop>radioButton_5</tabstop>
<tabstop>radioButton_10</tabstop>
<tabstop>radioButton_3</tabstop>
<tabstop>radioButton_6</tabstop>
<tabstop>radioButton_11</tabstop>
<tabstop>radioButton_12</tabstop>
<tabstop>radioButton_13</tabstop>
<tabstop>radioButton_14</tabstop>
<tabstop>radioButton_15</tabstop>
<tabstop>radioButton_16</tabstop>
<tabstop>radioButton_17</tabstop>
<tabstop>radioButton_18</tabstop>
<tabstop>radioButton_8</tabstop>
<tabstop>radioButton_7</tabstop>
</tabstops>
<resources>
<include location="../images.qrc" />
</resources>
<connections/>
</ui>

View file

@ -0,0 +1,130 @@
/****************************************************************
* 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/rsiface.h"
#include "DirectoriesDialog.h"
/** 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() ) );
/* Hide platform specific features */
#ifdef Q_WS_WIN
#endif
}
/** Saves the changes on this page */
bool
DirectoriesDialog::save(QString &errmsg)
{
return true;
}
/** Loads the settings for this page */
void DirectoriesDialog::load()
{
/* get the shared directories */
rsiface->lockData(); /* Lock Interface */
std::list<std::string>::const_iterator it;
const std::list<std::string> &dirs = rsiface->getConfig().sharedDirList;
/* 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));
}
ui.incomingDir->setText(QString::fromStdString(rsiface->getConfig().incomingDir));
rsiface->unlockData(); /* UnLock Interface */
listWidget->update(); /* update display */
}
void DirectoriesDialog::addShareDirectory()
{
/* select a dir
*/
QString qdir = QFileDialog::getExistingDirectory(this, tr("Add Shared Directory"), "",
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
/* add it to the server */
std::string dir = qdir.toStdString();
if (dir != "")
{
rsicontrol -> ConfigAddSharedDir(dir);
load();
}
}
void DirectoriesDialog::removeShareDirectory()
{
/* id current dir */
/* ask for removal */
QListWidget *listWidget = ui.dirList;
QListWidgetItem *qdir = listWidget -> currentItem();
if (qdir)
{
rsicontrol -> ConfigRemoveSharedDir( qdir->text().toStdString());
load();
}
}
void DirectoriesDialog::setIncomingDirectory()
{
QString qdir = QFileDialog::getExistingDirectory(this, tr("Add Shared Directory"), "",
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
std::string dir = qdir.toStdString();
if (dir != "")
{
rsicontrol->ConfigSetIncomingDir(dir);
}
load();
}

View file

@ -0,0 +1,61 @@
/****************************************************************
* 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 <config/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:
void addShareDirectory();
void removeShareDirectory();
void setIncomingDirectory();
private:
/** A RshareSettings object used for saving/loading settings */
RshareSettings* _settings;
/** Qt Designer generated object */
Ui::DirectoriesDialog ui;
};
#endif

View file

@ -0,0 +1,682 @@
<ui version="4.0" >
<class>DirectoriesDialog</class>
<widget class="QWidget" name="DirectoriesDialog" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>470</width>
<height>313</height>
</rect>
</property>
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<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>
<widget class="QGroupBox" name="groupBox_2" >
<property name="geometry" >
<rect>
<x>0</x>
<y>200</y>
<width>441</width>
<height>81</height>
</rect>
</property>
<property name="title" >
<string>Other Directories</string>
</property>
<widget class="QWidget" name="layoutWidget" >
<property name="geometry" >
<rect>
<x>10</x>
<y>30</y>
<width>421</width>
<height>34</height>
</rect>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="1" >
<widget class="QLineEdit" name="incomingDir" >
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label_4" >
<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: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;">&lt;span style=" font-size:8pt;">Incoming Files&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
<item row="0" column="2" >
<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" >:/images/directoryselect_24x24_shadow.png</iconset>
</property>
<property name="iconSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>441</width>
<height>200</height>
</rect>
</property>
<property name="title" >
<string>Shared Directories</string>
</property>
<widget class="QListWidget" name="dirList" >
<property name="geometry" >
<rect>
<x>10</x>
<y>20</y>
<width>381</width>
<height>171</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="addButton" >
<property name="geometry" >
<rect>
<x>400</x>
<y>20</y>
<width>34</width>
<height>34</height>
</rect>
</property>
<property name="minimumSize" >
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="../images.qrc" >:/images/directoryadd_24x24_shadow.png</iconset>
</property>
<property name="iconSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
<widget class="QPushButton" name="removeButton" >
<property name="geometry" >
<rect>
<x>400</x>
<y>60</y>
<width>34</width>
<height>34</height>
</rect>
</property>
<property name="minimumSize" >
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="../images.qrc" >:/images/directoryremove_24x24_shadow.png</iconset>
</property>
<property name="iconSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</widget>
</widget>
<tabstops>
<tabstop>incomingDir</tabstop>
<tabstop>incomingButton</tabstop>
<tabstop>dirList</tabstop>
<tabstop>addButton</tabstop>
<tabstop>removeButton</tabstop>
</tabstops>
<resources>
<include location="../images.qrc" />
</resources>
<connections/>
</ui>

View file

@ -0,0 +1,114 @@
/****************************************************************
* 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 "GeneralDialog.h"
/** Constructor */
GeneralDialog::GeneralDialog(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();
}
/** Destructor */
GeneralDialog::~GeneralDialog()
{
delete _settings;
}
/** Saves the changes on this page */
bool
GeneralDialog::save(QString &errmsg)
{
Q_UNUSED(errmsg);
QString languageCode =
LanguageSupport::languageCode(ui.cmboLanguage->currentText());
_settings->setLanguageCode(languageCode);
_settings->setInterfaceStyle(ui.cmboStyle->currentText());
/* Set to new style */
Rshare::setStyle(ui.cmboStyle->currentText());
return true;
}
/** Loads the settings for this page */
void
GeneralDialog::load()
{
int index = ui.cmboLanguage->findData(_settings->getLanguageCode());
ui.cmboLanguage->setCurrentIndex(index);
index = ui.cmboStyle->findData(Rshare::style().toLower());
ui.cmboStyle->setCurrentIndex(index);
}
void GeneralDialog::on_styleSheetCombo_activated(const QString &sheetName)
{
loadStyleSheet(sheetName);
}
void GeneralDialog::loadStyleSheet(const QString &sheetName)
{
//QFile file(":/qss/" + sheetName.toLower() + ".qss");
QFile file(QApplication::applicationDirPath() + "/qss/" + sheetName.toLower() + ".qss");
file.open(QFile::ReadOnly);
QString styleSheet = QLatin1String(file.readAll());
qApp->setStyleSheet(styleSheet);
}
void GeneralDialog::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

@ -0,0 +1,67 @@
/****************************************************************
* 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 _GENERALDIALOG_H
#define _GENERALDIALOG_H
#include <QtGui>
#include <QFileDialog>
#include <QStyleFactory>
#include <QLineEdit>
#include <config/rsharesettings.h>
#include <lang/languagesupport.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();
private slots:
void on_styleSheetCombo_activated(const QString &styleSheetName);
private:
/** A VidaliaSettings object used for saving/loading settings */
RshareSettings* _settings;
void loadStyleSheet(const QString &sheetName);
void loadqss();
/** Qt Designer generated object */
Ui::GeneralDialog ui;
};
#endif

View file

@ -0,0 +1,749 @@
<ui version="4.0" >
<class>GeneralDialog</class>
<widget class="QWidget" name="GeneralDialog" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>466</width>
<height>405</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>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>
<widget class="QGroupBox" name="grpStyle" >
<property name="geometry" >
<rect>
<x>0</x>
<y>80</y>
<width>441</width>
<height>55</height>
</rect>
</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="margin" >
<number>0</number>
</property>
<property name="spacing" >
<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>
<widget class="QGroupBox" name="grpLanguage" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>441</width>
<height>75</height>
</rect>
</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="margin" >
<number>0</number>
</property>
<property name="spacing" >
<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>
<widget class="QGroupBox" name="groupBox" >
<property name="geometry" >
<rect>
<x>0</x>
<y>140</y>
<width>441</width>
<height>61</height>
</rect>
</property>
<property name="title" >
<string>Style Sheet</string>
</property>
<widget class="QWidget" name="layoutWidget" >
<property name="geometry" >
<rect>
<x>11</x>
<y>20</y>
<width>341</width>
<height>25</height>
</rect>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<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>
<widget class="QGroupBox" name="grpLogin" >
<property name="geometry" >
<rect>
<x>0</x>
<y>210</y>
<width>441</width>
<height>61</height>
</rect>
</property>
<property name="title" >
<string>Login</string>
</property>
<widget class="QPushButton" name="autoButton" >
<property name="geometry" >
<rect>
<x>10</x>
<y>20</y>
<width>151</width>
<height>31</height>
</rect>
</property>
<property name="text" >
<string>Remove Auto Login</string>
</property>
</widget>
</widget>
</widget>
<tabstops>
<tabstop>cmboLanguage</tabstop>
<tabstop>cmboStyle</tabstop>
<tabstop>styleSheetCombo</tabstop>
<tabstop>autoButton</tabstop>
</tabstops>
<resources>
<include location="../images.qrc" />
</resources>
<connections/>
</ui>

View file

@ -0,0 +1,58 @@
/****************************************************************
* 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

@ -0,0 +1,58 @@
/****************************************************************
* 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

@ -0,0 +1,732 @@
<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

@ -0,0 +1,190 @@
/****************************************************************
* 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"), 8)
/* Images for toolbar icons */
#define IMAGE_PREFERENCES ":/images/locale.png"
#define IMAGE_WEBCACHES ":/images/webcache_24x24.png"
#define IMAGE_DIRECTORIES ":/images/folder_doments.png"
#define IMAGE_CRYPTOGRAPHY ":/images/cryptography_24x24.png"
#define IMAGE_LOG ":/images/log_24x24.png"
#define IMAGE_ABOUT ":/images/informations_24x24.png"
#define IMAGE_SAVE ":/images/media-floppy.png"
/** Constructor */
PreferencesWindow::PreferencesWindow(QWidget *parent, Qt::WFlags flags)
: QMainWindow(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_WEBCACHES), tr("Server"), grp));
ui.stackPages->add(new DirectoriesDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_DIRECTORIES), tr("Directories"), grp));
//ui.stackPages->add(new CryptographyDialog(ui.stackPages),
// createPageAction(QIcon(IMAGE_CRYPTOGRAPHY), tr("Cryptography"), grp));
ui.stackPages->add(new LogDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_ABOUT), tr("About"), grp));
/* 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 Save button */
//addAction(new QAction(QIcon(IMAGE_SAVE), tr("Save"), ui.toolBar),
// SLOT(saveChanges()));
/* Select the first action */
grp->actions()[0]->setChecked(true);
setFixedSize(QSize(480, 450));
connect(ui.okButton, SIGNAL(clicked( bool )), this, SLOT( saveChanges()) );
connect(ui.cancelprefButton, SIGNAL(clicked( bool )), this, SLOT( cancelpreferences()) );
}
/** 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 config dialog with focus set to the given page. */
void
PreferencesWindow::show(Page page)
{
/* Show the dialog. */
show();
/* 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();
}

View file

@ -0,0 +1,89 @@
/****************************************************************
* 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 "LogDialog.h"
#include "ui_PreferencesWindow.h"
class PreferencesWindow : public QMainWindow
{
Q_OBJECT
public:
/** Preferences dialog pages. */
enum Page {
General = 0, /** Preferences page. */
Directories = 1, /** Directories page. */
Server = 2, /** Server page. */
Cryptography = 3, /** Cryptography page. */
About = 4 /** About 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 config dialog with focus set to the given page. */
void show(Page page);
private slots:
/** Called when user clicks "Save Settings" */
void saveChanges();
/**void preferences();*/
void cancelpreferences();
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

@ -0,0 +1,208 @@
/****************************************************************
* 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 <iostream>
#include "rsiface/rsiface.h"
/** 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.ManualButton, SIGNAL( toggled( bool ) ), this, SLOT( toggleUPnP( ) ) );
connect( ui.UPnPButton, SIGNAL( toggled( bool ) ), this, SLOT( toggleUPnP( ) ) );
/* Hide platform specific features */
#ifdef Q_WS_WIN
#endif
}
/** 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()
{
/* get the shared directories */
rsiface->lockData(); /* Lock Interface */
/* set local address */
ui.localAddress->setText(QString::fromStdString(rsiface->getConfig().localAddr));
ui.localPort -> setValue(rsiface->getConfig().localPort);
/* set the server address */
ui.extAddress->setText(QString::fromStdString(rsiface->getConfig().extAddr));
ui.extPort -> setValue(rsiface->getConfig().extPort);
/* set the flags */
ui.chkFirewall ->setChecked(rsiface->getConfig().firewalled);
ui.chkForwarded ->setChecked(rsiface->getConfig().forwardPort);
/* now handle networking options */
if (rsiface->getConfig().DHTActive)
{
ui.DHTButton -> setChecked(true);
}
else
{
ui.noDHTButton -> setChecked(true);
}
int dhtPeers = rsiface->getConfig().DHTPeers;
if (!dhtPeers)
{
ui.dhtStatus -> setText("DHT Off/Unavailable");
}
else if (dhtPeers < 20)
{
ui.dhtStatus -> setText("DHT Initialising");
}
else
{
ui.dhtStatus -> setText("DHT Active");
}
switch(rsiface->getConfig().uPnPState)
{
case UPNP_STATE_ACTIVE:
ui.upnpStatus -> setText("Forwarding Active");
break;
case UPNP_STATE_FAILED_UDP:
ui.upnpStatus -> setText("TCP Active/UDP Failed");
break;
case UPNP_STATE_FAILED_TCP:
ui.upnpStatus -> setText("Forwarding Failed");
break;
case UPNP_STATE_READY:
ui.upnpStatus -> setText("uPnP Ready");
break;
case UPNP_STATE_UNAVAILABILE:
ui.upnpStatus -> setText("uPnP Unavailable");
break;
case UPNP_STATE_UNINITIALISED:
default:
ui.upnpStatus -> setText("uPnP Uninitialised");
break;
}
ui.upnpStatus->setReadOnly(true);
ui.dhtStatus ->setReadOnly(true);
if (rsiface->getConfig().uPnPActive)
{
/* flag uPnP */
ui.UPnPButton->setChecked(true);
/* shouldn't fiddle with port */
}
else
{
/* noobie */
ui.ManualButton->setChecked(true);
}
ui.totalRate->setValue(rsiface->getConfig().maxDataRate);
ui.indivRate->setValue(rsiface->getConfig().maxIndivDataRate);
rsiface->unlockData(); /* UnLock Interface */
toggleUPnP();
}
void ServerDialog::toggleUPnP()
{
/* switch on the radioButton */
bool settingChangeable = false;
if (ui.ManualButton->isChecked())
{
settingChangeable = true;
}
if (settingChangeable)
{
ui.localAddress->setEnabled(true);
ui.localPort -> setEnabled(true);
ui.extAddress -> setEnabled(true);
ui.extPort -> setEnabled(true);
ui.chkFirewall-> setEnabled(true);
ui.chkForwarded->setEnabled(true);
}
else
{
ui.localAddress->setEnabled(false);
ui.localPort -> setEnabled(false);
ui.extAddress -> setEnabled(false);
ui.extPort -> setEnabled(false);
ui.chkFirewall-> setEnabled(false);
ui.chkForwarded->setEnabled(false);
}
}
void ServerDialog::saveAddresses()
{
QString str;
bool saveAddr = false;
rsicontrol -> NetworkDHTActive(ui.DHTButton->isChecked());
rsicontrol -> NetworkUPnPActive(ui.UPnPButton->isChecked());
if (ui.ManualButton->isChecked())
{
saveAddr = true;
}
if (saveAddr)
{
rsicontrol->ConfigSetLocalAddr(ui.localAddress->text().toStdString(), ui.localPort->value());
rsicontrol->ConfigSetLanConfig(ui.chkFirewall->isChecked(), ui.chkForwarded->isChecked());
rsicontrol->ConfigSetExtAddr(ui.extAddress->text().toStdString(), ui.extPort->value());
}
rsicontrol->ConfigSetDataRates( ui.totalRate->value(), ui.indivRate->value() );
load();
}

View file

@ -0,0 +1,60 @@
/****************************************************************
* 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 <config/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();
private slots:
void saveAddresses();
void toggleUPnP();
private:
/** A RshareSettings object used for saving/loading settings */
RshareSettings* _settings;
/** Qt Designer generated object */
Ui::ServerDialog ui;
};
#endif

View file

@ -0,0 +1,894 @@
<ui version="4.0" >
<class>ServerDialog</class>
<widget class="QWidget" name="ServerDialog" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>419</width>
<height>371</height>
</rect>
</property>
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<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>
<widget class="QGroupBox" name="groupBox_3" >
<property name="geometry" >
<rect>
<x>0</x>
<y>270</y>
<width>411</width>
<height>71</height>
</rect>
</property>
<property name="title" >
<string>Transfer Rates</string>
</property>
<widget class="QWidget" name="layoutWidget" >
<property name="geometry" >
<rect>
<x>10</x>
<y>20</y>
<width>170</width>
<height>23</height>
</rect>
</property>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="label_14" >
<property name="text" >
<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;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Total Rate (KB/s) &lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="totalRate" >
<property name="maximum" >
<number>4096</number>
</property>
<property name="minimum" >
<number>1</number>
</property>
<property name="value" >
<number>1</number>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="layoutWidget" >
<property name="geometry" >
<rect>
<x>200</x>
<y>20</y>
<width>170</width>
<height>23</height>
</rect>
</property>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="label_12" >
<property name="text" >
<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;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Per Person &lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="indivRate" >
<property name="maximum" >
<number>1024</number>
</property>
<property name="minimum" >
<number>1</number>
</property>
<property name="value" >
<number>1</number>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_4" >
<property name="geometry" >
<rect>
<x>0</x>
<y>40</y>
<width>411</width>
<height>41</height>
</rect>
</property>
<property name="title" >
<string>Firewall/Router Configuration</string>
</property>
<widget class="QRadioButton" name="ManualButton" >
<property name="geometry" >
<rect>
<x>230</x>
<y>20</y>
<width>161</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>Manual router setup.</string>
</property>
</widget>
<widget class="QRadioButton" name="UPnPButton" >
<property name="geometry" >
<rect>
<x>10</x>
<y>20</y>
<width>211</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>Use uPnP to configure router</string>
</property>
<property name="checked" >
<bool>true</bool>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_2" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>411</width>
<height>41</height>
</rect>
</property>
<property name="title" >
<string>Network Address Configuration (takes effect after restart)</string>
</property>
<widget class="QRadioButton" name="DHTButton" >
<property name="geometry" >
<rect>
<x>10</x>
<y>20</y>
<width>211</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>Use DHT to locate friends </string>
</property>
<property name="checked" >
<bool>true</bool>
</property>
</widget>
<widget class="QRadioButton" name="noDHTButton" >
<property name="geometry" >
<rect>
<x>230</x>
<y>20</y>
<width>161</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>Manual IP Addresses</string>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox" >
<property name="geometry" >
<rect>
<x>0</x>
<y>80</y>
<width>411</width>
<height>191</height>
</rect>
</property>
<property name="title" >
<string>Server Status And Network Settings</string>
</property>
<widget class="QWidget" name="layoutWidget" >
<property name="geometry" >
<rect>
<x>110</x>
<y>20</y>
<width>274</width>
<height>159</height>
</rect>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLineEdit" name="dhtStatus" />
</item>
<item>
<widget class="QLineEdit" name="upnpStatus" />
</item>
<item>
<layout class="QGridLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QLineEdit" name="localAddress" />
</item>
<item row="0" column="2" >
<widget class="QSpinBox" name="localPort" >
<property name="maximum" >
<number>65535</number>
</property>
<property name="minimum" >
<number>0</number>
</property>
<property name="value" >
<number>7812</number>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLabel" name="label_5" >
<property name="text" >
<string>Port:</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QCheckBox" name="chkFirewall" >
<property name="text" >
<string>Firewalled</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkForwarded" >
<property name="text" >
<string>Forwarded Port</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QLineEdit" name="extAddress" />
</item>
<item row="0" column="2" >
<widget class="QSpinBox" name="extPort" >
<property name="maximum" >
<number>65535</number>
</property>
<property name="minimum" >
<number>0</number>
</property>
<property name="value" >
<number>7812</number>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLabel" name="label_4" >
<property name="text" >
<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;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Port:&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QLabel" name="label_2" >
<property name="geometry" >
<rect>
<x>10</x>
<y>150</y>
<width>91</width>
<height>21</height>
</rect>
</property>
<property name="text" >
<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;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">External Address:&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
<widget class="QLabel" name="label_6" >
<property name="geometry" >
<rect>
<x>10</x>
<y>30</y>
<width>80</width>
<height>21</height>
</rect>
</property>
<property name="text" >
<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;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">DHT Status&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
<widget class="QLabel" name="label_3" >
<property name="geometry" >
<rect>
<x>10</x>
<y>60</y>
<width>80</width>
<height>21</height>
</rect>
</property>
<property name="text" >
<string>uPnP Status</string>
</property>
</widget>
<widget class="QLabel" name="label" >
<property name="geometry" >
<rect>
<x>10</x>
<y>90</y>
<width>81</width>
<height>21</height>
</rect>
</property>
<property name="text" >
<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;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Local Address:&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</widget>
</widget>
<tabstops>
<tabstop>DHTButton</tabstop>
<tabstop>noDHTButton</tabstop>
<tabstop>UPnPButton</tabstop>
<tabstop>ManualButton</tabstop>
<tabstop>dhtStatus</tabstop>
<tabstop>upnpStatus</tabstop>
<tabstop>localAddress</tabstop>
<tabstop>localPort</tabstop>
<tabstop>chkFirewall</tabstop>
<tabstop>chkForwarded</tabstop>
<tabstop>extAddress</tabstop>
<tabstop>extPort</tabstop>
<tabstop>totalRate</tabstop>
<tabstop>indivRate</tabstop>
</tabstops>
<resources>
<include location="../images.qrc" />
</resources>
<connections/>
</ui>

View file

@ -0,0 +1,42 @@
/****************************************************************
* 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 _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

@ -0,0 +1,62 @@
/****************************************************************
* 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 <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

@ -0,0 +1,59 @@
/****************************************************************
* 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 _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