X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fmainwindow.hpp;h=3cffb54b47ce85f36a49d5a2c85216714751d0ea;hp=6541ccc6dff181e2cf386ed75657f5c0ecf11d1c;hb=b51310723cafcb7ab805ed528eb29fb4402d6d43;hpb=8ad61f4071a69445a6917d214b6592878447ddb1 diff --git a/pv/mainwindow.hpp b/pv/mainwindow.hpp index 6541ccc6..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,8 +71,6 @@ private: public: explicit MainWindow(DeviceManager &device_manager, - string open_file_name = string(), - string open_file_format = string(), QWidget *parent = nullptr); ~MainWindow(); @@ -87,11 +86,19 @@ 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(); shared_ptr get_tab_session(int index) const;