]> sigrok.org Git - pulseview.git/blobdiff - pv/toolbars/samplingbar.h
Use libsigrok C++ bindings (patch version 7).
[pulseview.git] / pv / toolbars / samplingbar.h
index b2e7def25f7c4d1a2f112b4c3838f24bae7e7328..7c0ec9af2d75a2d29577e7d5126f1b2c78c717ee 100644 (file)
@@ -23,7 +23,6 @@
 
 #include <stdint.h>
 
-#include <list>
 #include <map>
 #include <memory>
 
 #include <pv/widgets/popuptoolbutton.h>
 #include <pv/widgets/sweeptimingwidget.h>
 
+namespace sigrok {
+       class Device;
+}
+
+Q_DECLARE_METATYPE(std::shared_ptr<sigrok::Device>)
+
 class QAction;
 
 namespace pv {
 
 class SigSession;
 
-namespace device {
-class DevInst;
-}
-
 namespace toolbars {
 
 class SamplingBar : public QToolBar
@@ -61,11 +62,11 @@ public:
        SamplingBar(SigSession &session, QWidget *parent);
 
        void set_device_list(
-               const std::list< std::shared_ptr<pv::device::DevInst> >
-                       &devices,
-               std::shared_ptr<pv::device::DevInst> selected);
+               const std::map< std::shared_ptr<sigrok::Device>, std::string >
+                       &device_names,
+               std::shared_ptr<sigrok::Device> selected);
 
-       std::shared_ptr<pv::device::DevInst> get_selected_device() const;
+       std::shared_ptr<sigrok::Device> get_selected_device() const;
 
        void set_capture_state(pv::SigSession::capture_state state);
 
@@ -95,8 +96,6 @@ private:
        SigSession &_session;
 
        QComboBox _device_selector;
-       std::map<const sr_dev_inst*, std::weak_ptr<device::DevInst> >
-               _device_selector_map;
        bool _updating_device_selector;
 
        pv::widgets::PopupToolButton _configure_button;