]> sigrok.org Git - pulseview.git/blobdiff - pv/mainwindow.cpp
Implement initial version of the settings management
[pulseview.git] / pv / mainwindow.cpp
index 33ebdd648e84e09fd6c6614eeb6a6511ce413047..8b650e1ca00067b0d406b6387a3eab657a2dfae4 100644 (file)
 #include "mainwindow.hpp"
 
 #include "devicemanager.hpp"
 #include "mainwindow.hpp"
 
 #include "devicemanager.hpp"
+#include "globalsettings.hpp"
 #include "util.hpp"
 #include "devices/hardwaredevice.hpp"
 #include "dialogs/about.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"
 #include "toolbars/mainbar.hpp"
 #include "view/view.hpp"
 #include "views/trace/standardbar.hpp"
@@ -65,6 +67,9 @@ class ViewItem;
 
 using toolbars::MainBar;
 
 
 using toolbars::MainBar;
 
+using std::bind;
+using std::placeholders::_1;
+
 const QString MainWindow::WindowTitle = tr("PulseView");
 
 MainWindow::MainWindow(DeviceManager &device_manager,
 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*)));
                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)));
 
        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)
 void MainWindow::on_session_name_changed()
 {
        // Update the corresponding dock widget's name(s)