X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Ftoolbars%2Fsamplingbar.h;h=7c0ec9af2d75a2d29577e7d5126f1b2c78c717ee;hb=e8d009288de28cb194bc7964f96677c2baf900c9;hp=2c2431c427a71ccb0fa3ff166b38503737d8edb9;hpb=f9abf97e78bc4825d80926b0ebc6cbaef40768b1;p=pulseview.git diff --git a/pv/toolbars/samplingbar.h b/pv/toolbars/samplingbar.h index 2c2431c..7c0ec9a 100644 --- a/pv/toolbars/samplingbar.h +++ b/pv/toolbars/samplingbar.h @@ -23,7 +23,6 @@ #include -#include #include #include @@ -36,16 +35,18 @@ #include #include +namespace sigrok { + class Device; +} + +Q_DECLARE_METATYPE(std::shared_ptr) + class QAction; namespace pv { class SigSession; -namespace device { -class DevInst; -} - namespace toolbars { class SamplingBar : public QToolBar @@ -61,15 +62,15 @@ public: SamplingBar(SigSession &session, QWidget *parent); void set_device_list( - const std::list< std::shared_ptr > - &devices, - std::shared_ptr selected); + const std::map< std::shared_ptr, std::string > + &device_names, + std::shared_ptr selected); - std::shared_ptr get_selected_device() const; + std::shared_ptr get_selected_device() const; void set_capture_state(pv::SigSession::capture_state state); -signals: +Q_SIGNALS: void run_stop(); private: @@ -80,7 +81,7 @@ private: void commit_sample_rate(); void commit_sample_count(); -private slots: +private Q_SLOTS: void on_device_selected(); void on_sample_count_changed(); void on_sample_rate_changed(); @@ -95,14 +96,12 @@ private: SigSession &_session; QComboBox _device_selector; - std::map > - _device_selector_map; bool _updating_device_selector; pv::widgets::PopupToolButton _configure_button; QAction *_configure_button_action; - pv::widgets::PopupToolButton _probes_button; + pv::widgets::PopupToolButton _channels_button; pv::widgets::SweepTimingWidget _sample_count; pv::widgets::SweepTimingWidget _sample_rate;