X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Ftoolbars%2Fsamplingbar.h;h=94d9344e1e07b4403d474e8b2748fc6c4149c478;hp=41630bcab92703d7a7ff44a1ae02c47192c912db;hb=19adbc2c342b190161ec1223377a3619974b91f7;hpb=d99dc9f29066fba8948f1fca8b18a54b33064837 diff --git a/pv/toolbars/samplingbar.h b/pv/toolbars/samplingbar.h index 41630bca..94d9344e 100644 --- a/pv/toolbars/samplingbar.h +++ b/pv/toolbars/samplingbar.h @@ -24,6 +24,9 @@ #include #include +#include + +#include #include #include @@ -34,11 +37,11 @@ #include #include -struct st_dev_inst; class QAction; namespace pv { +class DevInst; class SigSession; namespace toolbars { @@ -48,15 +51,18 @@ class SamplingBar : public QToolBar Q_OBJECT private: - static const uint64_t DefaultRecordLength; + static const uint64_t MinSampleCount; + static const uint64_t MaxSampleCount; + static const uint64_t DefaultSampleCount; public: SamplingBar(SigSession &session, QWidget *parent); - void set_device_list(const std::list &devices); + void set_device_list( + const std::list< boost::shared_ptr > &devices); - struct sr_dev_inst* get_selected_device() const; - void set_selected_device(struct sr_dev_inst *const sdi); + boost::shared_ptr get_selected_device() const; + void set_selected_device(boost::shared_ptr dev_inst); void set_capture_state(pv::SigSession::capture_state state); @@ -80,6 +86,8 @@ private: SigSession &_session; QComboBox _device_selector; + std::map > + _device_selector_map; bool _updating_device_selector; pv::widgets::PopupToolButton _configure_button; @@ -92,6 +100,8 @@ private: bool _updating_sample_rate; bool _updating_sample_count; + bool _sample_count_supported; + QIcon _icon_red; QIcon _icon_green; QIcon _icon_grey;