Add a toggle all checkbox on supported devices page

This commit is contained in:
morg 2021-02-01 21:59:23 +01:00 committed by Adam Honse
parent 065bbd249c
commit 5b35e64fbe
5 changed files with 23 additions and 0 deletions

View file

@ -145,3 +145,11 @@ void DetectorTableModel::applySettings()
ResourceManager::get()->GetSettingsManager()->SetSettings("Detectors", settings);
ResourceManager::get()->GetSettingsManager()->SaveSettings();
}
void DetectorTableModel::toggleAll(const bool state)
{
for(unsigned int detector_idx = 0; detector_idx < detectors.size(); detector_idx++)
{
setData(index(detector_idx,1), state, Qt::CheckStateRole);
}
}