switch(probe->type) {
case SR_PROBE_LOGIC:
signal = shared_ptr<view::Signal>(
- new view::LogicSignal(probe,
+ new view::LogicSignal(*this, probe,
_logic_data));
break;
case SR_PROBE_ANALOG:
signal = shared_ptr<view::Signal>(
- new view::AnalogSignal(probe,
+ new view::AnalogSignal(*this, probe,
_analog_data));
break;
}
const float AnalogSignal::EnvelopeThreshold = 256.0f;
-AnalogSignal::AnalogSignal(const sr_probe *const probe,
+AnalogSignal::AnalogSignal(pv::SigSession &session, const sr_probe *const probe,
shared_ptr<data::Analog> data) :
- Signal(probe),
+ Signal(session, probe),
_data(data),
_scale(1.0f)
{
static const float EnvelopeThreshold;
public:
- AnalogSignal(const sr_probe *const probe,
+ AnalogSignal(pv::SigSession &session, const sr_probe *const probe,
boost::shared_ptr<pv::data::Analog> data);
virtual ~AnalogSignal();
QColor(0xEE, 0xEE, 0xEC), // White
};
-LogicSignal::LogicSignal(const sr_probe *const probe,
+LogicSignal::LogicSignal(pv::SigSession &session, const sr_probe *const probe,
shared_ptr<data::Logic> data) :
- Signal(probe),
+ Signal(session, probe),
_data(data),
_separator(this),
_icon_trigger_none(":/icons/trigger-none.svg"),
static const QColor SignalColours[10];
public:
- LogicSignal(const sr_probe *const probe,
+ LogicSignal(pv::SigSession &session, const sr_probe *const probe,
boost::shared_ptr<pv::data::Logic> data);
virtual ~LogicSignal();
"SCL"
};
-Signal::Signal(const sr_probe *const probe) :
+Signal::Signal(pv::SigSession &session, const sr_probe *const probe) :
+ _session(session),
_probe(probe),
_name(probe->name),
_v_offset(0),
namespace pv {
+class SigSession;
+
namespace data {
class SignalData;
}
static const QPen SignalAxisPen;
protected:
- Signal(const sr_probe *const probe);
+ Signal(pv::SigSession &session, const sr_probe *const probe);
public:
/**
void text_changed();
protected:
+ pv::SigSession &_session;
const sr_probe *const _probe;
QString _name;