Use libsigrok C++ bindings (patch version 7).
[pulseview.git] / pv / view / signal.h
index a8642d244240f501fc39632318218d319f9047eb..7028b29e9fb31cdc182b5396ba2e7fa7f9ba75b8 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef PULSEVIEW_PV_VIEW_SIGNAL_H
 #define PULSEVIEW_PV_VIEW_SIGNAL_H
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 #include <QComboBox>
 #include <QWidgetAction>
 
 #include "trace.h"
 
-struct sr_probe;
+namespace sigrok {
+       class Channel;
+}
 
 namespace pv {
 
-class DevInst;
-
 namespace data {
 class SignalData;
 }
@@ -47,7 +47,7 @@ class Signal : public Trace
        Q_OBJECT
 
 protected:
-       Signal(boost::shared_ptr<pv::DevInst> dev_inst, sr_probe *const probe);
+       Signal(std::shared_ptr<sigrok::Channel> channel);
 
 public:
        /**
@@ -55,7 +55,7 @@ public:
         */
        void set_name(QString name);
 
-       virtual boost::shared_ptr<pv::data::SignalData> data() const = 0;
+       virtual std::shared_ptr<pv::data::SignalData> data() const = 0;
 
        /**
         * Returns true if the trace is visible and enabled.
@@ -64,7 +64,7 @@ public:
 
        void enable(bool enable = true);
 
-       const sr_probe* probe() const;
+       std::shared_ptr<sigrok::Channel> channel() const;
 
        virtual void populate_popup_form(QWidget *parent, QFormLayout *form);
 
@@ -72,12 +72,11 @@ public:
 
        void delete_pressed();
 
-private slots:
+private Q_SLOTS:
        void on_disable();
 
 protected:
-       boost::shared_ptr<pv::DevInst> _dev_inst;
-       sr_probe *const _probe;
+       std::shared_ptr<sigrok::Channel> _channel;
 
        QComboBox *_name_widget;
        bool _updating_name_widget;