Browse Source

Disable `comboHideZero` when `checkHideZero` is unchecked.

Disable `checkLimituTPConnections` when `checkuTP` is unchecked.
Minor code formatting
adaptive-webui-19844
Chocobo1 9 years ago
parent
commit
2c2638c1fe
  1. 8
      src/gui/options_imp.cpp

8
src/gui/options_imp.cpp

@ -62,8 +62,8 @@
// Constructor // Constructor
options_imp::options_imp(QWidget *parent) options_imp::options_imp(QWidget *parent)
: QDialog(parent), : QDialog(parent)
m_refreshingIpFilter(false) , m_refreshingIpFilter(false)
{ {
qDebug("-> Constructing Options"); qDebug("-> Constructing Options");
setupUi(this); setupUi(this);
@ -149,6 +149,7 @@ options_imp::options_imp(QWidget *parent)
connect(confirmDeletion, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); connect(confirmDeletion, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
connect(checkAltRowColors, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); connect(checkAltRowColors, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
connect(checkHideZero, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); connect(checkHideZero, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
connect(checkHideZero, SIGNAL(toggled(bool)), comboHideZero, SLOT(setEnabled(bool)));
connect(comboHideZero, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton())); connect(comboHideZero, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton()));
connect(checkShowSystray, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); connect(checkShowSystray, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
connect(checkCloseToSystray, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); connect(checkCloseToSystray, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
@ -242,6 +243,7 @@ options_imp::options_imp(QWidget *parent)
connect(schedule_to, SIGNAL(timeChanged(QTime)), this, SLOT(enableApplyButton())); connect(schedule_to, SIGNAL(timeChanged(QTime)), this, SLOT(enableApplyButton()));
connect(schedule_days, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton())); connect(schedule_days, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton()));
connect(checkuTP, SIGNAL(toggled(bool)), SLOT(enableApplyButton())); connect(checkuTP, SIGNAL(toggled(bool)), SLOT(enableApplyButton()));
connect(checkuTP, SIGNAL(toggled(bool)), checkLimituTPConnections, SLOT(setEnabled(bool)));
connect(checkLimituTPConnections, SIGNAL(toggled(bool)), SLOT(enableApplyButton())); connect(checkLimituTPConnections, SIGNAL(toggled(bool)), SLOT(enableApplyButton()));
connect(checkLimitTransportOverhead, SIGNAL(toggled(bool)), SLOT(enableApplyButton())); connect(checkLimitTransportOverhead, SIGNAL(toggled(bool)), SLOT(enableApplyButton()));
connect(checkLimitLocalPeerRate, SIGNAL(toggled(bool)), SLOT(enableApplyButton())); connect(checkLimitLocalPeerRate, SIGNAL(toggled(bool)), SLOT(enableApplyButton()));
@ -625,6 +627,7 @@ void options_imp::loadOptions()
confirmDeletion->setChecked(pref->confirmTorrentDeletion()); confirmDeletion->setChecked(pref->confirmTorrentDeletion());
checkAltRowColors->setChecked(pref->useAlternatingRowColors()); checkAltRowColors->setChecked(pref->useAlternatingRowColors());
checkHideZero->setChecked(pref->getHideZeroValues()); checkHideZero->setChecked(pref->getHideZeroValues());
comboHideZero->setEnabled(checkHideZero->isChecked());
comboHideZero->setCurrentIndex(pref->getHideZeroComboValues()); comboHideZero->setCurrentIndex(pref->getHideZeroComboValues());
checkShowSplash->setChecked(!pref->isSplashScreenDisabled()); checkShowSplash->setChecked(!pref->isSplashScreenDisabled());
@ -866,6 +869,7 @@ void options_imp::loadOptions()
} }
checkuTP->setChecked(pref->isuTPEnabled()); checkuTP->setChecked(pref->isuTPEnabled());
checkLimituTPConnections->setEnabled(checkuTP->isChecked());
checkLimituTPConnections->setChecked(pref->isuTPRateLimited()); checkLimituTPConnections->setChecked(pref->isuTPRateLimited());
checkLimitTransportOverhead->setChecked(pref->includeOverheadInLimits()); checkLimitTransportOverhead->setChecked(pref->includeOverheadInLimits());
checkLimitLocalPeerRate->setChecked(!pref->getIgnoreLimitsOnLAN()); checkLimitLocalPeerRate->setChecked(!pref->getIgnoreLimitsOnLAN());

Loading…
Cancel
Save