X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fmainwindow.hpp;h=6f3676c214f24c7343ed62bde29fe1446d1d036f;hb=8ba6f8b7541409dd33fd4ddd1b51494f555773c9;hp=6541ccc6dff181e2cf386ed75657f5c0ecf11d1c;hpb=8ad61f4071a69445a6917d214b6592878447ddb1;p=pulseview.git diff --git a/pv/mainwindow.hpp b/pv/mainwindow.hpp index 6541ccc6..6f3676c2 100644 --- a/pv/mainwindow.hpp +++ b/pv/mainwindow.hpp @@ -31,6 +31,7 @@ #include #include "session.hpp" +#include "subwindows/subwindowbase.hpp" #include "views/viewbase.hpp" using std::list; @@ -70,12 +71,12 @@ private: public: explicit MainWindow(DeviceManager &device_manager, - string open_file_name = string(), - string open_file_format = string(), QWidget *parent = nullptr); ~MainWindow(); + static void show_session_error(const QString text, const QString info_text); + shared_ptr get_active_view() const; shared_ptr add_view(const QString &title, @@ -83,15 +84,25 @@ public: void remove_view(shared_ptr view); + shared_ptr add_subwindow( + subwindows::SubWindowType type, Session &session); + shared_ptr add_session(); void remove_session(shared_ptr session); + void add_session_with_file(string open_file_name, string open_file_format, + string open_setup_file_name); + + void add_default_session(); + + void save_sessions(); + void restore_sessions(); + private: void setup_ui(); void save_ui_settings(); - void restore_ui_settings(); shared_ptr get_tab_session(int index) const; @@ -102,11 +113,7 @@ private: virtual bool restoreState(const QByteArray &state, int version = 0); - void session_error(const QString text, const QString info_text); - private Q_SLOTS: - void show_session_error(const QString text, const QString info_text); - void on_add_view(const QString &title, views::ViewType type, Session *session); @@ -126,15 +133,14 @@ private Q_SLOTS: void on_tab_changed(int index); void on_tab_close_requested(int index); - void on_view_coloured_bg_shortcut(); + void on_show_decoder_selector(Session *session); + void on_sub_window_close_clicked(); + + void on_view_colored_bg_shortcut(); void on_view_sticky_scrolling_shortcut(); void on_view_show_sampling_points_shortcut(); void on_view_show_analog_minor_grid_shortcut(); - void on_settingViewColouredBg_changed(const QVariant new_value); - void on_settingViewShowSamplingPoints_changed(const QVariant new_value); - void on_settingViewShowAnalogMinorGrid_changed(const QVariant new_value); - void on_close_current_tab(); private: @@ -144,6 +150,7 @@ private: shared_ptr last_focused_session_; map< QDockWidget*, shared_ptr > view_docks_; + map< QDockWidget*, shared_ptr > sub_windows_; map< shared_ptr, QMainWindow*> session_windows_; @@ -159,7 +166,7 @@ private: QShortcut *view_sticky_scrolling_shortcut_; QShortcut *view_show_sampling_points_shortcut_; QShortcut *view_show_analog_minor_grid_shortcut_; - QShortcut *view_coloured_bg_shortcut_; + QShortcut *view_colored_bg_shortcut_; QShortcut *run_stop_shortcut_; QShortcut *close_application_shortcut_; QShortcut *close_current_tab_shortcut_;