X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fmainwindow.cpp;h=8b650e1ca00067b0d406b6387a3eab657a2dfae4;hp=33ebdd648e84e09fd6c6614eeb6a6511ce413047;hb=bf9f12687c8d43422455cbdc27ec1cc5d4305149;hpb=3d2d008e8418676e08ca40d58b68d329ee464c66 diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index 33ebdd64..8b650e1c 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -39,9 +39,11 @@ #include "mainwindow.hpp" #include "devicemanager.hpp" +#include "globalsettings.hpp" #include "util.hpp" #include "devices/hardwaredevice.hpp" #include "dialogs/about.hpp" +#include "dialogs/settings.hpp" #include "toolbars/mainbar.hpp" #include "view/view.hpp" #include "views/trace/standardbar.hpp" @@ -65,6 +67,9 @@ class ViewItem; using toolbars::MainBar; +using std::bind; +using std::placeholders::_1; + const QString MainWindow::WindowTitle = tr("PulseView"); MainWindow::MainWindow(DeviceManager &device_manager, @@ -392,6 +397,8 @@ void MainWindow::setup_ui() this, SLOT(on_run_stop_clicked())); connect(&session_state_mapper_, SIGNAL(mapped(QObject*)), this, SLOT(on_capture_state_changed(QObject*))); + connect(settings_button_, SIGNAL(clicked(bool)), + this, SLOT(on_settings_clicked())); connect(&session_selector_, SIGNAL(tabCloseRequested(int)), this, SLOT(on_tab_close_requested(int))); @@ -591,6 +598,12 @@ void MainWindow::on_run_stop_clicked() } } +void MainWindow::on_settings_clicked() +{ + dialogs::Settings dlg; + dlg.exec(); +} + void MainWindow::on_session_name_changed() { // Update the corresponding dock widget's name(s)