X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=mainwindow.cpp;h=50847e2ac1268108b48ee1a0945c28966a39fcda;hp=04f852d92fe053f85b2be6815bc43a567dc6fe7f;hb=274d4f133825cddfc6a42438dd47899db20c7d97;hpb=d4984fe7119c2fc9bf94b13cc38cc735887e377d diff --git a/mainwindow.cpp b/mainwindow.cpp index 04f852d9..50847e2a 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -48,6 +48,8 @@ MainWindow::MainWindow(QWidget *parent) : ui->setupUi(this); _sampling_bar = new SamplingBar(this); + connect(_sampling_bar, SIGNAL(run_stop()), this, + SLOT(run_stop())); addToolBar(_sampling_bar); view = new SigView(session, this); @@ -72,3 +74,10 @@ void MainWindow::on_actionAbout_triggered() About dlg(this); dlg.exec(); } + +void MainWindow::run_stop() +{ + session.start_capture( + _sampling_bar->get_selected_device(), + _sampling_bar->get_sample_rate()); +}