mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 16:32:16 -07:00
Use QAbstractButton::toggled
Also, fix dbconverter build
This commit is contained in:
parent
688720bfac
commit
5d8ebff892
3 changed files with 7 additions and 17 deletions
|
|
@ -166,12 +166,7 @@ WndSets::WndSets(QWidget *parent) : QMainWindow(parent)
|
|||
includeOnlineOnlyCards = SettingsCache::instance().getIncludeOnlineOnlyCards();
|
||||
QCheckBox *onlineOnly = new QCheckBox(tr("Include online-only (Arena) cards [requires restart]"));
|
||||
onlineOnly->setChecked(includeOnlineOnlyCards);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
|
||||
connect(onlineOnly, &QCheckBox::checkStateChanged, this, &WndSets::onlineOnlyCheckStateChanged);
|
||||
#else
|
||||
connect(onlineOnly, &QCheckBox::stateChanged, this,
|
||||
[this](int state) { onlineOnlyCheckStateChanged(static_cast<Qt::CheckState>(state)); });
|
||||
#endif
|
||||
connect(onlineOnly, &QAbstractButton::toggled, this, &WndSets::includeOnlineOnlyCardsChanged);
|
||||
|
||||
buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
||||
connect(buttonBox, SIGNAL(accepted()), this, SLOT(actSave()));
|
||||
|
|
@ -251,17 +246,9 @@ void WndSets::rebuildMainLayout(int actionToTake)
|
|||
}
|
||||
}
|
||||
|
||||
void WndSets::onlineOnlyCheckStateChanged(Qt::CheckState state)
|
||||
void WndSets::includeOnlineOnlyCardsChanged(bool _includeOnlineOnlyCards)
|
||||
{
|
||||
switch (state) {
|
||||
case Qt::Unchecked:
|
||||
includeOnlineOnlyCards = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
includeOnlineOnlyCards = true;
|
||||
break;
|
||||
}
|
||||
includeOnlineOnlyCards = _includeOnlineOnlyCards;
|
||||
}
|
||||
|
||||
void WndSets::actSave()
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ private slots:
|
|||
void actDisableResetButton(const QString &filterText);
|
||||
void actSort(int index);
|
||||
void actIgnoreWarning();
|
||||
void onlineOnlyCheckStateChanged(Qt::CheckState state);
|
||||
void includeOnlineOnlyCardsChanged(bool _includeOnlineOnlyCardsChanged);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -199,6 +199,9 @@ void SettingsCache::setPrintingSelectorSortOrder(int /* _printingSelectorSortOrd
|
|||
void SettingsCache::setPrintingSelectorCardSize(int /* _printingSelectorCardSize */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setIncludeOnlineOnlyCards(bool /* _includeOnlineOnlyCards */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setPrintingSelectorNavigationButtonsVisible(QT_STATE_CHANGED_T /* _navigationButtonsVisible */)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue