#ifndef PULSEVIEW_PV_VIEW_SIGNAL_H
#define PULSEVIEW_PV_VIEW_SIGNAL_H
+#include <memory>
+
#include <QComboBox>
#include <QWidgetAction>
#include <stdint.h>
-#include <libsigrok/libsigrok.h>
-
#include "trace.h"
+namespace sigrok {
+ class Channel;
+}
+
namespace pv {
+class SigSession;
+
namespace data {
class SignalData;
}
Q_OBJECT
protected:
- Signal(pv::SigSession &session, sr_probe *const probe);
+ Signal(pv::SigSession &session,
+ std::shared_ptr<sigrok::Channel> channel);
public:
/**
*/
void set_name(QString name);
+ virtual std::shared_ptr<pv::data::SignalData> data() const = 0;
+
/**
* Returns true if the trace is visible and enabled.
*/
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);
QMenu* create_context_menu(QWidget *parent);
-private slots:
+ void delete_pressed();
+
+private Q_SLOTS:
void on_disable();
protected:
- sr_probe *const _probe;
+ pv::SigSession &_session;
+ std::shared_ptr<sigrok::Channel> _channel;
QComboBox *_name_widget;
bool _updating_name_widget;