X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fmainwindow.hpp;h=3cffb54b47ce85f36a49d5a2c85216714751d0ea;hp=ab0f871e924ad7d90c7203ab91a502f32ea3344d;hb=8ce0e732cfe912e022eb96d06aaaa40390efcd6b;hpb=156f06e95f10587063b97b6b453a603751a0007c diff --git a/pv/mainwindow.hpp b/pv/mainwindow.hpp index ab0f871e..3cffb54b 100644 --- a/pv/mainwindow.hpp +++ b/pv/mainwindow.hpp @@ -30,6 +30,7 @@ #include #include +#include "globalsettings.hpp" #include "session.hpp" #include "views/viewbase.hpp" @@ -61,7 +62,7 @@ class DecoderMenu; #endif } -class MainWindow : public QMainWindow +class MainWindow : public QMainWindow, public GlobalSettingsInterface { Q_OBJECT @@ -70,9 +71,6 @@ private: public: explicit MainWindow(DeviceManager &device_manager, - string open_file_name = string(), - string open_file_format = string(), - bool restore_sessions = true, QWidget *parent = nullptr); ~MainWindow(); @@ -88,12 +86,20 @@ public: void remove_session(shared_ptr session); + void add_session_with_file(string open_file_name, string open_file_format); + + void add_default_session(); + + void save_sessions(); + void restore_sessions(); + + void on_setting_changed(const QString &key, const QVariant &value); + private: void setup_ui(); void save_ui_settings(); - - void restore_ui_settings(bool restore_sessions); + void restore_ui_settings(); shared_ptr get_tab_session(int index) const;