mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-11 08:02:57 -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
retroshare-gui/src/gui/settings
|
@ -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;
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue