X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fmainwindow.hpp;h=493e3a55cc0dec32b3ca6e1471138dd0a0bdeac7;hp=06eba40ac212760373defba5fbdac8b7c46b9037;hb=HEAD;hpb=baf867eddd4efbc465f5a3490b1ea21dfe7ba597 diff --git a/pv/mainwindow.hpp b/pv/mainwindow.hpp index 06eba40a..493e3a55 100644 --- a/pv/mainwindow.hpp +++ b/pv/mainwindow.hpp @@ -26,13 +26,11 @@ #include #include -#include #include #include #include "session.hpp" #include "subwindows/subwindowbase.hpp" -#include "views/viewbase.hpp" using std::list; using std::map; @@ -54,6 +52,7 @@ class MainBar; namespace view { class View; +class ViewBase; } namespace widgets { @@ -62,6 +61,9 @@ class DecoderMenu; #endif } +using pv::views::ViewBase; +using pv::views::ViewType; + class MainWindow : public QMainWindow { Q_OBJECT @@ -79,9 +81,9 @@ public: shared_ptr get_active_view() const; - shared_ptr add_view(views::ViewType type, Session &session); + shared_ptr add_view(ViewType type, Session &session); - void remove_view(shared_ptr view); + void remove_view(shared_ptr view); shared_ptr add_subwindow( subwindows::SubWindowType type, Session &session); @@ -100,6 +102,7 @@ public: private: void setup_ui(); + void update_acq_button(Session *session); void save_ui_settings(); void restore_ui_settings(); @@ -112,18 +115,25 @@ private: virtual bool restoreState(const QByteArray &state, int version = 0); +Q_SIGNALS: + void session_error_raised(const QString text, const QString info_text); + +public Q_SLOTS: + void on_run_stop_clicked(); + void on_session_error_raised(const QString text, const QString info_text); + private Q_SLOTS: - void on_add_view(views::ViewType type, Session *session); + void on_add_view(ViewType type, Session *session); void on_focus_changed(); void on_focused_session_changed(shared_ptr session); void on_new_session_clicked(); - void on_run_stop_clicked(); void on_settings_clicked(); void on_session_name_changed(); - void on_capture_state_changed(QObject *obj); + void on_session_device_changed(); + void on_session_capture_state_changed(int state); void on_new_view(Session *session, int view_type); void on_view_close_clicked(); @@ -155,7 +165,6 @@ private: QWidget *static_tab_widget_; QToolButton *new_session_button_, *run_stop_button_, *settings_button_; QTabWidget session_selector_; - QSignalMapper session_state_mapper_; QIcon icon_red_; QIcon icon_green_;