X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Ftoolbars%2Fsamplingbar.h;h=2c2431c427a71ccb0fa3ff166b38503737d8edb9;hb=d528d3d185ca3bb9a40ec7af0299a83c0d2b76e0;hp=6fc8abd38e0fcdce4bcd6a45f2a4a36233f0b424;hpb=b50ef520745ffb90eb32f27ac6c46c2d5e4baf82;p=pulseview.git diff --git a/pv/toolbars/samplingbar.h b/pv/toolbars/samplingbar.h index 6fc8abd3..2c2431c4 100644 --- a/pv/toolbars/samplingbar.h +++ b/pv/toolbars/samplingbar.h @@ -24,6 +24,8 @@ #include #include +#include +#include #include #include @@ -34,13 +36,16 @@ #include #include -struct st_dev_inst; class QAction; namespace pv { class SigSession; +namespace device { +class DevInst; +} + namespace toolbars { class SamplingBar : public QToolBar @@ -55,10 +60,12 @@ private: public: SamplingBar(SigSession &session, QWidget *parent); - void set_device_list(const std::list &devices); + void set_device_list( + const std::list< std::shared_ptr > + &devices, + std::shared_ptr selected); - struct sr_dev_inst* get_selected_device() const; - void set_selected_device(struct sr_dev_inst *const sdi); + std::shared_ptr get_selected_device() const; void set_capture_state(pv::SigSession::capture_state state); @@ -69,6 +76,7 @@ private: void update_sample_rate_selector(); void update_sample_rate_selector_value(); void update_sample_count_selector(); + void update_device_config_widgets(); void commit_sample_rate(); void commit_sample_count(); @@ -78,10 +86,17 @@ private slots: void on_sample_rate_changed(); void on_run_stop(); + void on_config_changed(); + +protected: + bool eventFilter(QObject *watched, QEvent *event); + private: SigSession &_session; QComboBox _device_selector; + std::map > + _device_selector_map; bool _updating_device_selector; pv::widgets::PopupToolButton _configure_button;