mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-12 00:23:08 -04:00
merged branch 0.5.0 commits 2576, 2579, 2581-2583 into trunk
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2592 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
294f4207ed
commit
b000245ef5
14 changed files with 201 additions and 247 deletions
|
@ -26,9 +26,9 @@
|
|||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
#include "rsiface/rsiface.h"
|
||||
#include "rsiface/rsfiles.h"
|
||||
#include "rsiface/rspeers.h"
|
||||
#include <rsiface/rsiface.h>
|
||||
#include <rsiface/rsfiles.h>
|
||||
#include <rsiface/rspeers.h>
|
||||
|
||||
#include <QTimer>
|
||||
|
||||
|
@ -38,15 +38,15 @@ TransferPage::TransferPage(QWidget * parent, Qt::WFlags flags)
|
|||
/* Invoke the Qt Designer generated object setup routine */
|
||||
ui.setupUi(this);
|
||||
|
||||
// QTimer *timer = new QTimer(this);
|
||||
// timer->connect(timer, SIGNAL(timeout()), this, SLOT(updateStatus()));
|
||||
// timer->start(1000);
|
||||
|
||||
updateStatus();
|
||||
|
||||
ui._queueSize_SB->setValue(rsFiles->getQueueSize()) ;
|
||||
|
||||
if(rsFiles->defaultChunkStrategy() == FileChunksInfo::CHUNK_STRATEGY_STREAMING)
|
||||
ui._defaultStrategy_CB->setCurrentIndex(0) ;
|
||||
else
|
||||
ui._defaultStrategy_CB->setCurrentIndex(1) ;
|
||||
|
||||
QObject::connect(ui._queueSize_SB,SIGNAL(valueChanged(int)),this,SLOT(updateQueueSize(int))) ;
|
||||
QObject::connect(ui._defaultStrategy_CB,SIGNAL(activated(int)),this,SLOT(updateDefaultStrategy(int))) ;
|
||||
|
||||
/* Hide platform specific features */
|
||||
#ifdef Q_WS_WIN
|
||||
|
@ -54,6 +54,20 @@ TransferPage::TransferPage(QWidget * parent, Qt::WFlags flags)
|
|||
#endif
|
||||
}
|
||||
|
||||
void TransferPage::updateDefaultStrategy(int i)
|
||||
{
|
||||
switch(i)
|
||||
{
|
||||
case 0: rsFiles->setDefaultChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_STREAMING) ;
|
||||
break ;
|
||||
|
||||
case 1: rsFiles->setDefaultChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_RANDOM) ;
|
||||
break ;
|
||||
|
||||
default: ;
|
||||
}
|
||||
}
|
||||
|
||||
void TransferPage::updateQueueSize(int s)
|
||||
{
|
||||
rsFiles->setQueueSize(s) ;
|
||||
|
@ -65,46 +79,3 @@ void TransferPage::closeEvent (QCloseEvent * event)
|
|||
}
|
||||
|
||||
|
||||
/** Saves the changes on this page */
|
||||
bool
|
||||
TransferPage::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 TransferPage::load()
|
||||
{
|
||||
|
||||
/* load up configuration from rsPeers */
|
||||
// RsPeerDetails detail;
|
||||
// if (!rsPeers->getPeerDetails(rsPeers->getOwnId(), detail))
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
/** Loads the settings for this page */
|
||||
void TransferPage::updateStatus()
|
||||
{
|
||||
/* load up configuration from rsPeers */
|
||||
// RsPeerDetails detail;
|
||||
// if (!rsPeers->getPeerDetails(rsPeers->getOwnId(), detail))
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -36,13 +36,13 @@ class TransferPage: public ConfigPage
|
|||
~TransferPage() {}
|
||||
|
||||
/** Saves the changes on this page */
|
||||
bool save(QString &errmsg);
|
||||
virtual bool save(QString &errmsg) {}
|
||||
/** Loads the settings for this page */
|
||||
void load();
|
||||
virtual void load() {}
|
||||
|
||||
public slots:
|
||||
void updateStatus();
|
||||
void updateQueueSize(int) ;
|
||||
void updateDefaultStrategy(int) ;
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -13,31 +13,36 @@
|
|||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Transfer options</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="Seite">
|
||||
<attribute name="title">
|
||||
<string>Transfer</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Transfer options</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Queue Size:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Default chunk strategy:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QSpinBox" name="_queueSize_SB">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
|
@ -53,40 +58,10 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Maximum Download speed per file:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="downspeedspinBox">
|
||||
<item>
|
||||
<widget class="QComboBox" name="_defaultStrategy_CB">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> kB/s</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1024</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Default chunk strategy:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="strategycomboBox">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
|
@ -100,46 +75,17 @@
|
|||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show Cache Transfers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>248</width>
|
||||
<height>138</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_3">
|
||||
<attribute name="title">
|
||||
<string>F2F Routing</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="html">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="html">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;">
|
||||
|
@ -148,11 +94,10 @@ p, li { white-space: pre-wrap; }
|
|||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">You can separately setup share flags for each shared directory in the shared files dialog to be:</span></p>
|
||||
<ul style="-qt-list-indent: 1;"><li style=" font-size:8pt;" style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Browsable by friends</span>: files are seen by your friends.</li>
|
||||
<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Anonymously shared</span>: files are anonymously reachable through distant F2F tunnels.</li></ul></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue