|
|
@ -206,8 +206,6 @@ options_imp::options_imp(QWidget *parent): |
|
|
|
connect(checkDHT, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); |
|
|
|
connect(checkDHT, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); |
|
|
|
connect(checkAnonymousMode, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); |
|
|
|
connect(checkAnonymousMode, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); |
|
|
|
connect(checkPeX, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); |
|
|
|
connect(checkPeX, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); |
|
|
|
connect(checkDifferentDHTPort, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); |
|
|
|
|
|
|
|
connect(spinDHTPort, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton())); |
|
|
|
|
|
|
|
connect(checkLSD, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); |
|
|
|
connect(checkLSD, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); |
|
|
|
connect(comboEncryption, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton())); |
|
|
|
connect(comboEncryption, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton())); |
|
|
|
connect(checkMaxRatio, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); |
|
|
|
connect(checkMaxRatio, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); |
|
|
@ -432,8 +430,6 @@ void options_imp::saveOptions() { |
|
|
|
pref.setMaxUploadsPerTorrent(getMaxUploadsPerTorrent()); |
|
|
|
pref.setMaxUploadsPerTorrent(getMaxUploadsPerTorrent()); |
|
|
|
pref.setDHTEnabled(isDHTEnabled()); |
|
|
|
pref.setDHTEnabled(isDHTEnabled()); |
|
|
|
pref.setPeXEnabled(checkPeX->isChecked()); |
|
|
|
pref.setPeXEnabled(checkPeX->isChecked()); |
|
|
|
pref.setDHTPortSameAsBT(isDHTPortSameAsBT()); |
|
|
|
|
|
|
|
pref.setDHTPort(getDHTPort()); |
|
|
|
|
|
|
|
pref.setLSDEnabled(isLSDEnabled()); |
|
|
|
pref.setLSDEnabled(isLSDEnabled()); |
|
|
|
pref.setEncryptionSetting(getEncryptionSetting()); |
|
|
|
pref.setEncryptionSetting(getEncryptionSetting()); |
|
|
|
pref.enableAnonymousMode(checkAnonymousMode->isChecked()); |
|
|
|
pref.enableAnonymousMode(checkAnonymousMode->isChecked()); |
|
|
@ -695,8 +691,6 @@ void options_imp::loadOptions() { |
|
|
|
spinMaxUploadsPerTorrent->setEnabled(false); |
|
|
|
spinMaxUploadsPerTorrent->setEnabled(false); |
|
|
|
} |
|
|
|
} |
|
|
|
checkDHT->setChecked(pref.isDHTEnabled()); |
|
|
|
checkDHT->setChecked(pref.isDHTEnabled()); |
|
|
|
checkDifferentDHTPort->setChecked(!pref.isDHTPortSameAsBT()); |
|
|
|
|
|
|
|
spinDHTPort->setValue(pref.getDHTPort()); |
|
|
|
|
|
|
|
checkPeX->setChecked(pref.isPeXEnabled()); |
|
|
|
checkPeX->setChecked(pref.isPeXEnabled()); |
|
|
|
checkLSD->setChecked(pref.isLSDEnabled()); |
|
|
|
checkLSD->setChecked(pref.isLSDEnabled()); |
|
|
|
comboEncryption->setCurrentIndex(pref.getEncryptionSetting()); |
|
|
|
comboEncryption->setCurrentIndex(pref.getEncryptionSetting()); |
|
|
@ -825,10 +819,6 @@ bool options_imp::systrayIntegration() const { |
|
|
|
return checkShowSystray->isChecked(); |
|
|
|
return checkShowSystray->isChecked(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int options_imp::getDHTPort() const { |
|
|
|
|
|
|
|
return spinDHTPort->value(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Return Share ratio
|
|
|
|
// Return Share ratio
|
|
|
|
qreal options_imp::getMaxRatio() const { |
|
|
|
qreal options_imp::getMaxRatio() const { |
|
|
|
if (checkMaxRatio->isChecked()) { |
|
|
|
if (checkMaxRatio->isChecked()) { |
|
|
@ -979,10 +969,6 @@ bool options_imp::addTorrentsInPause() const { |
|
|
|
return checkStartPaused->isChecked(); |
|
|
|
return checkStartPaused->isChecked(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool options_imp::isDHTPortSameAsBT() const { |
|
|
|
|
|
|
|
return !checkDifferentDHTPort->isChecked(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Proxy settings
|
|
|
|
// Proxy settings
|
|
|
|
bool options_imp::isProxyEnabled() const { |
|
|
|
bool options_imp::isProxyEnabled() const { |
|
|
|
return comboProxyType->currentIndex(); |
|
|
|
return comboProxyType->currentIndex(); |
|
|
@ -1342,7 +1328,6 @@ void options_imp::toggleAnonymousMode(bool enabled) |
|
|
|
if (enabled) { |
|
|
|
if (enabled) { |
|
|
|
// Disable DHT, LSD, UPnP / NAT-PMP
|
|
|
|
// Disable DHT, LSD, UPnP / NAT-PMP
|
|
|
|
checkDHT->setEnabled(false); |
|
|
|
checkDHT->setEnabled(false); |
|
|
|
checkDifferentDHTPort->setEnabled(false); |
|
|
|
|
|
|
|
checkDHT->setChecked(false); |
|
|
|
checkDHT->setChecked(false); |
|
|
|
checkLSD->setEnabled(false); |
|
|
|
checkLSD->setEnabled(false); |
|
|
|
checkLSD->setChecked(false); |
|
|
|
checkLSD->setChecked(false); |
|
|
@ -1350,7 +1335,6 @@ void options_imp::toggleAnonymousMode(bool enabled) |
|
|
|
checkUPnP->setChecked(false); |
|
|
|
checkUPnP->setChecked(false); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
checkDHT->setEnabled(true); |
|
|
|
checkDHT->setEnabled(true); |
|
|
|
checkDifferentDHTPort->setEnabled(true); |
|
|
|
|
|
|
|
checkLSD->setEnabled(true); |
|
|
|
checkLSD->setEnabled(true); |
|
|
|
checkUPnP->setEnabled(true); |
|
|
|
checkUPnP->setEnabled(true); |
|
|
|
} |
|
|
|
} |
|
|
|