diff --git a/qt/DetectorTableModel.cpp b/qt/DetectorTableModel.cpp
index 11eec08d..67388740 100644
--- a/qt/DetectorTableModel.cpp
+++ b/qt/DetectorTableModel.cpp
@@ -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);
+ }
+}
diff --git a/qt/DetectorTableModel.h b/qt/DetectorTableModel.h
index c82a598f..6592d094 100644
--- a/qt/DetectorTableModel.h
+++ b/qt/DetectorTableModel.h
@@ -28,6 +28,7 @@ public:
public slots:
void applySettings();
+ void toggleAll(const bool state);
};
#endif // DETECTORTABLEMODEL_H
diff --git a/qt/OpenRGBSupportedDevicesPage.cpp b/qt/OpenRGBSupportedDevicesPage.cpp
index cfc0f6f1..d3f53bfd 100644
--- a/qt/OpenRGBSupportedDevicesPage.cpp
+++ b/qt/OpenRGBSupportedDevicesPage.cpp
@@ -47,3 +47,8 @@ void OpenRGBSupportedDevicesPage::on_Filter_textChanged(const QString &arg1)
{
detectorSortModel->setFilterRegExp(QRegExp(arg1, Qt::CaseInsensitive));
}
+
+void OpenRGBSupportedDevicesPage::on_ToggleAllCheckbox_toggled(const bool checked)
+{
+ detectorTableModel->toggleAll(checked);
+}
diff --git a/qt/OpenRGBSupportedDevicesPage.h b/qt/OpenRGBSupportedDevicesPage.h
index 2cb826f9..b0bea4c1 100644
--- a/qt/OpenRGBSupportedDevicesPage.h
+++ b/qt/OpenRGBSupportedDevicesPage.h
@@ -25,6 +25,8 @@ private slots:
void on_Filter_textChanged(const QString &arg1);
+ void on_ToggleAllCheckbox_toggled(const bool checked);
+
private:
Ui::OpenRGBSupportedDevicesPageUi *ui;
};
diff --git a/qt/OpenRGBSupportedDevicesPage.ui b/qt/OpenRGBSupportedDevicesPage.ui
index 162eee2c..201b0b64 100644
--- a/qt/OpenRGBSupportedDevicesPage.ui
+++ b/qt/OpenRGBSupportedDevicesPage.ui
@@ -26,6 +26,13 @@
-
+ -
+
+
+ Enable/Disable all
+
+
+
-