]> sigrok.org Git - pulseview.git/blobdiff - pv/dialogs/settings.cpp
Add "start acquisition for all devices" option
[pulseview.git] / pv / dialogs / settings.cpp
index efe854af4efea9c916153a419b86a47d197992bb..b07a63696fb4b11d3c6c69cbf8b5beb79d7da60d 100644 (file)
@@ -276,6 +276,11 @@ QWidget *Settings::get_general_settings_form(QWidget *parent) const
                SLOT(on_general_save_with_setup_changed(int)));
        general_layout->addRow(tr("Save session &setup along with .sr file"), cb);
 
+       cb = create_checkbox(GlobalSettings::Key_General_StartAllSessions,
+               SLOT(on_general_start_all_sessions_changed(int)));
+       general_layout->addRow(tr("Start acquisition for all open sessions when clicking 'Run'"), cb);
+
+
        return form;
 }
 
@@ -679,6 +684,12 @@ void Settings::on_general_save_with_setup_changed(int state)
        settings.setValue(GlobalSettings::Key_General_SaveWithSetup, state ? true : false);
 }
 
+void Settings::on_general_start_all_sessions_changed(int state)
+{
+       GlobalSettings settings;
+       settings.setValue(GlobalSettings::Key_General_StartAllSessions, state ? true : false);
+}
+
 void Settings::on_view_zoomToFitDuringAcq_changed(int state)
 {
        GlobalSettings settings;