Add option to auto hide zero status filters

* Extract transfer list filter classes into separate files
* Add option to auto hide zero status filters

PR #18801.
Closes #13996.
This commit is contained in:
Vladimir Golovnev 2023-04-03 10:38:08 +03:00 committed by GitHub
parent d40be79c69
commit 0dcb65bb7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 1222 additions and 891 deletions

View file

@ -245,6 +245,8 @@ void OptionsDialog::loadBehaviorTabOptions()
actionSeeding = OPEN_DEST;
m_ui->actionTorrentFnOnDblClBox->setCurrentIndex(m_ui->actionTorrentFnOnDblClBox->findData(actionSeeding));
m_ui->checkBoxHideZeroStatusFilters->setChecked(pref->getHideZeroStatusFilters());
#ifndef Q_OS_WIN
m_ui->checkStartup->setVisible(false);
#endif
@ -344,6 +346,7 @@ void OptionsDialog::loadBehaviorTabOptions()
connect(m_ui->comboHideZero, qComboBoxCurrentIndexChanged, this, &ThisType::enableApplyButton);
connect(m_ui->actionTorrentDlOnDblClBox, qComboBoxCurrentIndexChanged, this, &ThisType::enableApplyButton);
connect(m_ui->actionTorrentFnOnDblClBox, qComboBoxCurrentIndexChanged, this, &ThisType::enableApplyButton);
connect(m_ui->checkBoxHideZeroStatusFilters, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
#ifdef Q_OS_WIN
connect(m_ui->checkStartup, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
@ -417,6 +420,8 @@ void OptionsDialog::saveBehaviorTabOptions() const
pref->setActionOnDblClOnTorrentDl(m_ui->actionTorrentDlOnDblClBox->currentData().toInt());
pref->setActionOnDblClOnTorrentFn(m_ui->actionTorrentFnOnDblClBox->currentData().toInt());
pref->setHideZeroStatusFilters(m_ui->checkBoxHideZeroStatusFilters->isChecked());
pref->setSplashScreenDisabled(isSplashScreenDisabled());
pref->setConfirmOnExit(m_ui->checkProgramExitConfirm->isChecked());
pref->setDontConfirmAutoExit(!m_ui->checkProgramAutoExitConfirm->isChecked());