2010-01-31 18:11:15 +03:00
|
|
|
#ifndef ADVANCEDSETTINGS_H
|
|
|
|
#define ADVANCEDSETTINGS_H
|
|
|
|
|
|
|
|
#include <QTableWidget>
|
|
|
|
#include <QHeaderView>
|
|
|
|
#include <QSpinBox>
|
2011-02-05 18:44:48 +03:00
|
|
|
#include <QHostAddress>
|
2010-01-31 18:42:24 +03:00
|
|
|
#include <QCheckBox>
|
2011-02-05 18:44:48 +03:00
|
|
|
#include <QLineEdit>
|
2010-05-11 19:53:14 +04:00
|
|
|
#include <QComboBox>
|
|
|
|
#include <QNetworkInterface>
|
2010-06-07 12:32:41 +04:00
|
|
|
#include <libtorrent/version.hpp>
|
2010-01-31 18:11:15 +03:00
|
|
|
#include "preferences.h"
|
|
|
|
|
|
|
|
enum AdvSettingsCols {PROPERTY, VALUE};
|
2014-08-07 23:30:54 +04:00
|
|
|
enum AdvSettingsRows {DISK_CACHE, DISK_CACHE_TTL, OS_CACHE, OUTGOING_PORT_MIN, OUTGOING_PORT_MAX, IGNORE_LIMIT_LAN, RECHECK_COMPLETED, LIST_REFRESH, RESOLVE_COUNTRIES, RESOLVE_HOSTS, MAX_HALF_OPEN, SUPER_SEEDING, NETWORK_IFACE, NETWORK_ADDRESS, PROGRAM_NOTIFICATIONS, TRACKER_STATUS, TRACKER_PORT,
|
2013-09-21 11:59:58 +04:00
|
|
|
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
2010-12-21 20:41:11 +03:00
|
|
|
UPDATE_CHECK,
|
2011-01-01 16:05:28 +03:00
|
|
|
#endif
|
2013-09-21 11:59:58 +04:00
|
|
|
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC))
|
2011-01-01 16:05:28 +03:00
|
|
|
USE_ICON_THEME,
|
2011-09-18 21:05:30 +04:00
|
|
|
#endif
|
2011-09-20 19:56:11 +04:00
|
|
|
CONFIRM_DELETE_TORRENT, TRACKER_EXCHANGE,
|
2011-09-18 21:05:30 +04:00
|
|
|
ANNOUNCE_ALL_TRACKERS,
|
2011-01-16 18:29:44 +03:00
|
|
|
ROW_COUNT};
|
2010-01-31 18:11:15 +03:00
|
|
|
|
|
|
|
class AdvancedSettings: public QTableWidget {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
private:
|
2011-03-12 21:57:11 +03:00
|
|
|
QSpinBox spin_cache, outgoing_ports_min, outgoing_ports_max, spin_list_refresh, spin_maxhalfopen, spin_tracker_port;
|
2014-08-07 23:30:54 +04:00
|
|
|
QCheckBox cb_os_cache, cb_ignore_limits_lan, cb_recheck_completed, cb_resolve_countries, cb_resolve_hosts,
|
2011-06-05 20:08:30 +04:00
|
|
|
cb_super_seeding, cb_program_notifications, cb_tracker_status, cb_confirm_torrent_deletion,
|
|
|
|
cb_enable_tracker_ext;
|
2011-03-12 21:57:11 +03:00
|
|
|
QComboBox combo_iface;
|
2013-03-18 13:45:30 +04:00
|
|
|
QSpinBox spin_cache_ttl;
|
2013-09-21 11:59:58 +04:00
|
|
|
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
2011-03-12 21:57:11 +03:00
|
|
|
QCheckBox cb_update_check;
|
2010-12-21 20:41:11 +03:00
|
|
|
#endif
|
2013-09-21 11:59:58 +04:00
|
|
|
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC))
|
2011-03-12 21:57:11 +03:00
|
|
|
QCheckBox cb_use_icon_theme;
|
2011-09-18 21:05:30 +04:00
|
|
|
#endif
|
2012-02-18 18:44:20 +04:00
|
|
|
QCheckBox cb_announce_all_trackers;
|
2011-03-12 21:57:11 +03:00
|
|
|
QLineEdit txt_network_address;
|
2010-01-31 18:11:15 +03:00
|
|
|
|
|
|
|
public:
|
|
|
|
AdvancedSettings(QWidget *parent=0): QTableWidget(parent) {
|
|
|
|
// Set visual appearance
|
2010-01-31 18:31:41 +03:00
|
|
|
setEditTriggers(QAbstractItemView::NoEditTriggers);
|
2010-01-31 19:43:19 +03:00
|
|
|
setAlternatingRowColors(true);
|
2010-01-31 18:11:15 +03:00
|
|
|
setColumnCount(2);
|
|
|
|
QStringList header;
|
2011-04-11 23:48:06 +04:00
|
|
|
header << tr("Setting") << tr("Value", "Value set for this setting");
|
2010-01-31 18:11:15 +03:00
|
|
|
setHorizontalHeaderLabels(header);
|
|
|
|
setColumnWidth(0, width()/2);
|
|
|
|
horizontalHeader()->setStretchLastSection(true);
|
2010-01-31 19:34:38 +03:00
|
|
|
verticalHeader()->setVisible(false);
|
2010-01-31 18:11:15 +03:00
|
|
|
setRowCount(ROW_COUNT);
|
2012-10-07 20:14:53 +04:00
|
|
|
// Signals
|
|
|
|
connect(&spin_cache, SIGNAL(valueChanged(int)), SLOT(updateCacheSpinSuffix(int)));
|
2010-01-31 18:11:15 +03:00
|
|
|
// Load settings
|
|
|
|
loadAdvancedSettings();
|
|
|
|
}
|
|
|
|
|
|
|
|
~AdvancedSettings() {
|
|
|
|
}
|
|
|
|
|
2010-01-31 19:14:56 +03:00
|
|
|
public slots:
|
2010-01-31 18:11:15 +03:00
|
|
|
void saveAdvancedSettings() {
|
2014-07-05 16:44:13 +04:00
|
|
|
Preferences* const pref = Preferences::instance();
|
2010-01-31 18:27:54 +03:00
|
|
|
// Disk write cache
|
2014-07-05 16:44:13 +04:00
|
|
|
pref->setDiskCacheSize(spin_cache.value());
|
|
|
|
pref->setDiskCacheTTL(spin_cache_ttl.value());
|
2014-08-07 23:30:54 +04:00
|
|
|
// Enable OS cache
|
|
|
|
pref->setOsCache(cb_os_cache.isChecked());
|
2010-01-31 18:27:54 +03:00
|
|
|
// Outgoing ports
|
2014-07-05 16:44:13 +04:00
|
|
|
pref->setOutgoingPortsMin(outgoing_ports_min.value());
|
|
|
|
pref->setOutgoingPortsMax(outgoing_ports_max.value());
|
2010-01-31 18:42:24 +03:00
|
|
|
// Ignore limits on LAN
|
2014-07-05 16:44:13 +04:00
|
|
|
pref->ignoreLimitsOnLAN(cb_ignore_limits_lan.isChecked());
|
2010-01-31 19:14:56 +03:00
|
|
|
// Recheck torrents on completion
|
2014-07-05 16:44:13 +04:00
|
|
|
pref->recheckTorrentsOnCompletion(cb_recheck_completed.isChecked());
|
2010-01-31 19:25:04 +03:00
|
|
|
// Transfer list refresh interval
|
2014-07-05 16:44:13 +04:00
|
|
|
pref->setRefreshInterval(spin_list_refresh.value());
|
2010-01-31 19:43:19 +03:00
|
|
|
// Peer resolution
|
2014-07-05 16:44:13 +04:00
|
|
|
pref->resolvePeerCountries(cb_resolve_countries.isChecked());
|
|
|
|
pref->resolvePeerHostNames(cb_resolve_hosts.isChecked());
|
2010-03-25 22:16:43 +03:00
|
|
|
// Max Half-Open connections
|
2014-07-05 16:44:13 +04:00
|
|
|
pref->setMaxHalfOpenConnections(spin_maxhalfopen.value());
|
2010-03-25 22:31:48 +03:00
|
|
|
// Super seeding
|
2014-07-05 16:44:13 +04:00
|
|
|
pref->enableSuperSeeding(cb_super_seeding.isChecked());
|
2010-05-11 19:53:14 +04:00
|
|
|
// Network interface
|
2012-02-20 21:30:53 +04:00
|
|
|
if (combo_iface.currentIndex() == 0) {
|
2010-05-11 19:53:14 +04:00
|
|
|
// All interfaces (default)
|
2014-07-05 16:44:13 +04:00
|
|
|
pref->setNetworkInterface(QString::null);
|
|
|
|
pref->setNetworkInterfaceName(QString::null);
|
2010-05-11 19:53:14 +04:00
|
|
|
} else {
|
2014-07-05 16:44:13 +04:00
|
|
|
pref->setNetworkInterface(combo_iface.itemData(combo_iface.currentIndex()).toString());
|
|
|
|
pref->setNetworkInterfaceName(combo_iface.currentText());
|
2010-05-11 19:53:14 +04:00
|
|
|
}
|
2011-02-05 18:44:48 +03:00
|
|
|
// Network address
|
2011-03-12 21:57:11 +03:00
|
|
|
QHostAddress addr(txt_network_address.text().trimmed());
|
2012-02-20 21:30:53 +04:00
|
|
|
if (addr.isNull())
|
2014-07-05 16:44:13 +04:00
|
|
|
pref->setNetworkAddress("");
|
2011-02-05 18:44:48 +03:00
|
|
|
else
|
2014-07-05 16:44:13 +04:00
|
|
|
pref->setNetworkAddress(addr.toString());
|
2010-07-22 13:39:51 +04:00
|
|
|
// Program notification
|
2014-07-05 16:44:13 +04:00
|
|
|
pref->useProgramNotification(cb_program_notifications.isChecked());
|
2010-10-16 01:55:56 +04:00
|
|
|
// Tracker
|
2014-07-05 16:44:13 +04:00
|
|
|
pref->setTrackerEnabled(cb_tracker_status.isChecked());
|
|
|
|
pref->setTrackerPort(spin_tracker_port.value());
|
2013-09-21 11:59:58 +04:00
|
|
|
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
2014-07-05 16:44:13 +04:00
|
|
|
pref->setUpdateCheckEnabled(cb_update_check.isChecked());
|
2011-01-01 16:05:28 +03:00
|
|
|
#endif
|
|
|
|
// Icon theme
|
2013-09-21 11:59:58 +04:00
|
|
|
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC))
|
2014-07-05 16:44:13 +04:00
|
|
|
pref->useSystemIconTheme(cb_use_icon_theme.isChecked());
|
2010-12-21 20:41:11 +03:00
|
|
|
#endif
|
2014-07-05 16:44:13 +04:00
|
|
|
pref->setConfirmTorrentDeletion(cb_confirm_torrent_deletion.isChecked());
|
2011-06-05 20:08:30 +04:00
|
|
|
// Tracker exchange
|
2014-07-05 16:44:13 +04:00
|
|
|
pref->setTrackerExchangeEnabled(cb_enable_tracker_ext.isChecked());
|
|
|
|
pref->setAnnounceToAllTrackers(cb_announce_all_trackers.isChecked());
|
2010-01-31 18:11:15 +03:00
|
|
|
}
|
|
|
|
|
2011-04-11 23:48:06 +04:00
|
|
|
signals:
|
|
|
|
void settingsChanged();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void setRow(int row, const QString &property, QSpinBox* editor) {
|
|
|
|
setItem(row, PROPERTY, new QTableWidgetItem(property));
|
|
|
|
bool ok; Q_UNUSED(ok);
|
|
|
|
ok = connect(editor, SIGNAL(valueChanged(int)), SIGNAL(settingsChanged()));
|
|
|
|
Q_ASSERT(ok);
|
|
|
|
setCellWidget(row, VALUE, editor);
|
|
|
|
}
|
|
|
|
|
|
|
|
void setRow(int row, const QString &property, QComboBox* editor) {
|
|
|
|
setItem(row, PROPERTY, new QTableWidgetItem(property));
|
|
|
|
bool ok; Q_UNUSED(ok);
|
|
|
|
ok = connect(editor, SIGNAL(currentIndexChanged(int)), SIGNAL(settingsChanged()));
|
|
|
|
Q_ASSERT(ok);
|
|
|
|
setCellWidget(row, VALUE, editor);
|
|
|
|
}
|
|
|
|
|
|
|
|
void setRow(int row, const QString &property, QCheckBox* editor) {
|
|
|
|
setItem(row, PROPERTY, new QTableWidgetItem(property));
|
|
|
|
bool ok; Q_UNUSED(ok);
|
|
|
|
ok = connect(editor, SIGNAL(stateChanged(int)), SIGNAL(settingsChanged()));
|
|
|
|
Q_ASSERT(ok);
|
|
|
|
setCellWidget(row, VALUE, editor);
|
|
|
|
}
|
|
|
|
|
|
|
|
void setRow(int row, const QString &property, QLineEdit* editor) {
|
|
|
|
setItem(row, PROPERTY, new QTableWidgetItem(property));
|
|
|
|
bool ok; Q_UNUSED(ok);
|
|
|
|
ok = connect(editor, SIGNAL(textChanged(QString)), SIGNAL(settingsChanged()));
|
|
|
|
Q_ASSERT(ok);
|
|
|
|
setCellWidget(row, VALUE, editor);
|
|
|
|
}
|
|
|
|
|
|
|
|
private slots:
|
2012-10-07 20:14:53 +04:00
|
|
|
void updateCacheSpinSuffix(int value)
|
|
|
|
{
|
|
|
|
if (value <= 0)
|
|
|
|
spin_cache.setSuffix(tr(" (auto)"));
|
|
|
|
else
|
|
|
|
spin_cache.setSuffix(tr(" MiB"));
|
|
|
|
}
|
|
|
|
|
|
|
|
void loadAdvancedSettings()
|
|
|
|
{
|
2014-07-05 16:44:13 +04:00
|
|
|
const Preferences* const pref = Preferences::instance();
|
2010-01-31 18:11:15 +03:00
|
|
|
// Disk write cache
|
2012-10-07 20:14:53 +04:00
|
|
|
spin_cache.setMinimum(0);
|
2014-08-08 00:05:47 +04:00
|
|
|
// When build as 32bit binary, set the maximum at less than 2GB to prevent crashes.
|
|
|
|
// These macros may not be available on compilers other than MSVC and GCC
|
|
|
|
#if !defined(_M_X64) || !defined(__amd64__)
|
|
|
|
//1800MiB to leave 248MiB room to the rest of program data in RAM
|
|
|
|
spin_cache.setMaximum(1800);
|
|
|
|
#else
|
|
|
|
// 4GiB
|
|
|
|
spin_cache.setMaximum(4*1024);
|
|
|
|
#endif
|
2014-07-05 16:44:13 +04:00
|
|
|
spin_cache.setValue(pref->diskCacheSize());
|
2012-10-07 20:14:53 +04:00
|
|
|
updateCacheSpinSuffix(spin_cache.value());
|
2011-04-11 23:48:06 +04:00
|
|
|
setRow(DISK_CACHE, tr("Disk write cache size"), &spin_cache);
|
2013-03-18 13:45:30 +04:00
|
|
|
// Disk cache expiry
|
|
|
|
spin_cache_ttl.setMinimum(15);
|
|
|
|
spin_cache_ttl.setMaximum(600);
|
2014-07-05 16:44:13 +04:00
|
|
|
spin_cache_ttl.setValue(pref->diskCacheTTL());
|
2013-03-18 13:45:30 +04:00
|
|
|
spin_cache_ttl.setSuffix(tr(" s", " seconds"));
|
|
|
|
setRow(DISK_CACHE_TTL, tr("Disk cache expiry interval"), &spin_cache_ttl);
|
2014-08-07 23:30:54 +04:00
|
|
|
// Enable OS cache
|
|
|
|
cb_os_cache.setChecked(pref->osCache());
|
|
|
|
setRow(OS_CACHE, tr("Enable OS cache"), &cb_os_cache);
|
2010-01-31 18:27:54 +03:00
|
|
|
// Outgoing port Min
|
2011-03-12 21:57:11 +03:00
|
|
|
outgoing_ports_min.setMinimum(0);
|
|
|
|
outgoing_ports_min.setMaximum(65535);
|
2014-07-05 16:44:13 +04:00
|
|
|
outgoing_ports_min.setValue(pref->outgoingPortsMin());
|
2011-04-11 23:48:06 +04:00
|
|
|
setRow(OUTGOING_PORT_MIN, tr("Outgoing ports (Min) [0: Disabled]"), &outgoing_ports_min);
|
2010-01-31 18:27:54 +03:00
|
|
|
// Outgoing port Min
|
2011-03-12 21:57:11 +03:00
|
|
|
outgoing_ports_max.setMinimum(0);
|
|
|
|
outgoing_ports_max.setMaximum(65535);
|
2014-07-05 16:44:13 +04:00
|
|
|
outgoing_ports_max.setValue(pref->outgoingPortsMax());
|
2011-04-11 23:48:06 +04:00
|
|
|
setRow(OUTGOING_PORT_MAX, tr("Outgoing ports (Max) [0: Disabled]"), &outgoing_ports_max);
|
2010-01-31 18:42:24 +03:00
|
|
|
// Ignore transfer limits on local network
|
2014-07-05 16:44:13 +04:00
|
|
|
cb_ignore_limits_lan.setChecked(pref->ignoreLimitsOnLAN());
|
2011-04-11 23:48:06 +04:00
|
|
|
setRow(IGNORE_LIMIT_LAN, tr("Ignore transfer limits on local network"), &cb_ignore_limits_lan);
|
2010-01-31 19:14:56 +03:00
|
|
|
// Recheck completed torrents
|
2014-07-05 16:44:13 +04:00
|
|
|
cb_recheck_completed.setChecked(pref->recheckTorrentsOnCompletion());
|
2011-04-11 23:48:06 +04:00
|
|
|
setRow(RECHECK_COMPLETED, tr("Recheck torrents on completion"), &cb_recheck_completed);
|
2010-01-31 19:25:04 +03:00
|
|
|
// Transfer list refresh interval
|
2011-03-12 21:57:11 +03:00
|
|
|
spin_list_refresh.setMinimum(30);
|
|
|
|
spin_list_refresh.setMaximum(99999);
|
2014-07-05 16:44:13 +04:00
|
|
|
spin_list_refresh.setValue(pref->getRefreshInterval());
|
2011-03-12 21:57:11 +03:00
|
|
|
spin_list_refresh.setSuffix(tr(" ms", " milliseconds"));
|
2011-04-11 23:48:06 +04:00
|
|
|
setRow(LIST_REFRESH, tr("Transfer list refresh interval"), &spin_list_refresh);
|
2010-01-31 19:43:19 +03:00
|
|
|
// Resolve Peer countries
|
2014-07-05 16:44:13 +04:00
|
|
|
cb_resolve_countries.setChecked(pref->resolvePeerCountries());
|
2011-04-11 23:48:06 +04:00
|
|
|
setRow(RESOLVE_COUNTRIES, tr("Resolve peer countries (GeoIP)"), &cb_resolve_countries);
|
2010-01-31 19:43:19 +03:00
|
|
|
// Resolve peer hosts
|
2014-07-05 16:44:13 +04:00
|
|
|
cb_resolve_hosts.setChecked(pref->resolvePeerHostNames());
|
2011-04-11 23:48:06 +04:00
|
|
|
setRow(RESOLVE_HOSTS, tr("Resolve peer host names"), &cb_resolve_hosts);
|
2010-03-25 22:16:43 +03:00
|
|
|
// Max Half Open connections
|
2011-03-12 21:57:11 +03:00
|
|
|
spin_maxhalfopen.setMinimum(0);
|
|
|
|
spin_maxhalfopen.setMaximum(99999);
|
2014-07-05 16:44:13 +04:00
|
|
|
spin_maxhalfopen.setValue(pref->getMaxHalfOpenConnections());
|
2011-04-11 23:48:06 +04:00
|
|
|
setRow(MAX_HALF_OPEN, tr("Maximum number of half-open connections [0: Disabled]"), &spin_maxhalfopen);
|
2010-03-25 22:31:48 +03:00
|
|
|
// Super seeding
|
2014-07-05 16:44:13 +04:00
|
|
|
cb_super_seeding.setChecked(pref->isSuperSeedingEnabled());
|
2011-04-11 23:48:06 +04:00
|
|
|
setRow(SUPER_SEEDING, tr("Strict super seeding"), &cb_super_seeding);
|
2010-05-11 19:53:14 +04:00
|
|
|
// Network interface
|
2011-03-12 21:57:11 +03:00
|
|
|
combo_iface.addItem(tr("Any interface", "i.e. Any network interface"));
|
2014-07-05 16:44:13 +04:00
|
|
|
const QString current_iface = pref->getNetworkInterface();
|
2012-10-07 17:04:07 +04:00
|
|
|
bool interface_exists = current_iface.isEmpty();
|
2010-05-11 19:53:14 +04:00
|
|
|
int i = 1;
|
2012-02-20 21:30:53 +04:00
|
|
|
foreach (const QNetworkInterface& iface, QNetworkInterface::allInterfaces()) {
|
|
|
|
if (iface.flags() & QNetworkInterface::IsLoopBack) continue;
|
2013-01-13 17:44:14 +04:00
|
|
|
combo_iface.addItem(iface.humanReadableName(),iface.name());
|
2012-10-07 17:04:07 +04:00
|
|
|
if (!current_iface.isEmpty() && iface.name() == current_iface) {
|
2011-03-12 21:57:11 +03:00
|
|
|
combo_iface.setCurrentIndex(i);
|
2012-10-07 17:04:07 +04:00
|
|
|
interface_exists = true;
|
|
|
|
}
|
2010-05-11 19:53:14 +04:00
|
|
|
++i;
|
|
|
|
}
|
2012-10-07 17:04:07 +04:00
|
|
|
// Saved interface does not exist, show it anyway
|
|
|
|
if (!interface_exists) {
|
2014-07-05 16:44:13 +04:00
|
|
|
combo_iface.addItem(pref->getNetworkInterfaceName(),current_iface);
|
2012-10-07 17:04:07 +04:00
|
|
|
combo_iface.setCurrentIndex(i);
|
|
|
|
}
|
2011-04-11 23:48:06 +04:00
|
|
|
setRow(NETWORK_IFACE, tr("Network Interface (requires restart)"), &combo_iface);
|
2011-02-05 18:44:48 +03:00
|
|
|
// Network address
|
2014-07-05 16:44:13 +04:00
|
|
|
txt_network_address.setText(pref->getNetworkAddress());
|
2011-04-11 23:48:06 +04:00
|
|
|
setRow(NETWORK_ADDRESS, tr("IP Address to report to trackers (requires restart)"), &txt_network_address);
|
2010-07-22 13:39:51 +04:00
|
|
|
// Program notifications
|
2014-07-05 16:44:13 +04:00
|
|
|
cb_program_notifications.setChecked(pref->useProgramNotification());
|
2011-05-01 11:15:44 +04:00
|
|
|
setRow(PROGRAM_NOTIFICATIONS, tr("Display program on-screen notifications"), &cb_program_notifications);
|
2010-10-16 01:55:56 +04:00
|
|
|
// Tracker State
|
2014-07-05 16:44:13 +04:00
|
|
|
cb_tracker_status.setChecked(pref->isTrackerEnabled());
|
2011-04-11 23:48:06 +04:00
|
|
|
setRow(TRACKER_STATUS, tr("Enable embedded tracker"), &cb_tracker_status);
|
2010-10-16 01:55:56 +04:00
|
|
|
// Tracker port
|
2011-03-12 21:57:11 +03:00
|
|
|
spin_tracker_port.setMinimum(1);
|
|
|
|
spin_tracker_port.setMaximum(65535);
|
2014-07-05 16:44:13 +04:00
|
|
|
spin_tracker_port.setValue(pref->getTrackerPort());
|
2011-04-11 23:48:06 +04:00
|
|
|
setRow(TRACKER_PORT, tr("Embedded tracker port"), &spin_tracker_port);
|
2013-09-21 11:59:58 +04:00
|
|
|
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
2014-07-05 16:44:13 +04:00
|
|
|
cb_update_check.setChecked(pref->isUpdateCheckEnabled());
|
2011-04-11 23:48:06 +04:00
|
|
|
setRow(UPDATE_CHECK, tr("Check for software updates"), &cb_update_check);
|
2011-01-01 16:05:28 +03:00
|
|
|
#endif
|
2013-09-21 11:59:58 +04:00
|
|
|
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC))
|
2014-07-05 16:44:13 +04:00
|
|
|
cb_use_icon_theme.setChecked(pref->useSystemIconTheme());
|
2011-04-11 23:48:06 +04:00
|
|
|
setRow(USE_ICON_THEME, tr("Use system icon theme"), &cb_use_icon_theme);
|
2010-12-21 20:41:11 +03:00
|
|
|
#endif
|
2011-01-16 18:29:44 +03:00
|
|
|
// Torrent deletion confirmation
|
2014-07-05 16:44:13 +04:00
|
|
|
cb_confirm_torrent_deletion.setChecked(pref->confirmTorrentDeletion());
|
2011-04-11 23:48:06 +04:00
|
|
|
setRow(CONFIRM_DELETE_TORRENT, tr("Confirm torrent deletion"), &cb_confirm_torrent_deletion);
|
2011-06-05 20:08:30 +04:00
|
|
|
// Tracker exchange
|
2014-07-05 16:44:13 +04:00
|
|
|
cb_enable_tracker_ext.setChecked(pref->trackerExchangeEnabled());
|
2011-06-05 20:08:30 +04:00
|
|
|
setRow(TRACKER_EXCHANGE, tr("Exchange trackers with other peers"), &cb_enable_tracker_ext);
|
2011-09-18 21:05:30 +04:00
|
|
|
// Announce to all trackers
|
2014-07-05 16:44:13 +04:00
|
|
|
cb_announce_all_trackers.setChecked(pref->announceToAllTrackers());
|
2011-09-18 21:05:30 +04:00
|
|
|
setRow(ANNOUNCE_ALL_TRACKERS, tr("Always announce to all trackers"), &cb_announce_all_trackers);
|
2010-01-31 18:11:15 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ADVANCEDSETTINGS_H
|