X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Ftoolbars%2Fsamplingbar.h;h=db4e856e26dfff48a59a80bae7f41909aa124e30;hb=945745012eb57cefa1ef457daf48cfffa99f9ec2;hp=41630bcab92703d7a7ff44a1ae02c47192c912db;hpb=d99dc9f29066fba8948f1fca8b18a54b33064837;p=pulseview.git diff --git a/pv/toolbars/samplingbar.h b/pv/toolbars/samplingbar.h index 41630bc..db4e856 100644 --- a/pv/toolbars/samplingbar.h +++ b/pv/toolbars/samplingbar.h @@ -24,6 +24,9 @@ #include #include +#include + +#include #include #include @@ -34,13 +37,16 @@ #include #include -struct st_dev_inst; class QAction; namespace pv { class SigSession; +namespace device { +class DevInst; +} + namespace toolbars { class SamplingBar : public QToolBar @@ -48,15 +54,20 @@ 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); @@ -76,10 +87,14 @@ private slots: void on_sample_rate_changed(); void on_run_stop(); + void on_config_changed(); + private: SigSession &_session; QComboBox _device_selector; + std::map > + _device_selector_map; bool _updating_device_selector; pv::widgets::PopupToolButton _configure_button; @@ -92,6 +107,8 @@ private: bool _updating_sample_rate; bool _updating_sample_count; + bool _sample_count_supported; + QIcon _icon_red; QIcon _icon_green; QIcon _icon_grey;