- Started work on program preferences in Web UI

This commit is contained in:
Christophe Dumez 2009-11-26 08:10:23 +00:00
parent 52ac94cc73
commit 9a16a9d11b
8 changed files with 121 additions and 14 deletions

View file

@ -32,6 +32,7 @@
#include "eventmanager.h"
#include "bittorrent.h"
#include "misc.h"
#include "preferences.h"
#include "proplistdelegate.h"
#include "torrentpersistentdata.h"
#include <QDebug>
@ -118,6 +119,17 @@ QList<QVariantMap> EventManager::getPropFilesInfo(QString hash) const {
return files;
}
QVariantMap EventManager::getGlobalPreferences() const {
QVariantMap data;
data["dl_limit"] = Preferences::getGlobalDownloadLimit();
data["up_limit"] = Preferences::getGlobalUploadLimit();
data["dht"] = Preferences::isDHTEnabled();
data["max_connec"] = Preferences::getMaxConnecs();
data["max_connec_per_torrent"] = Preferences::getMaxConnecsPerTorrent();
data["max_uploads_per_torrent"] = Preferences::getMaxUploadsPerTorrent();
return data;
}
QVariantMap EventManager::getPropGeneralInfo(QString hash) const {
QVariantMap data;
QTorrentHandle h = BTSession->getTorrentHandle(hash);