switch(probe->type) {
case SR_PROBE_LOGIC:
signal = shared_ptr<view::Signal>(
- new view::LogicSignal(*this, dev_inst,
+ new view::LogicSignal(dev_inst,
probe, _logic_data));
break;
shared_ptr<data::Analog> data(
new data::Analog());
signal = shared_ptr<view::Signal>(
- new view::AnalogSignal(*this, dev_inst,
+ new view::AnalogSignal(dev_inst,
probe, data));
break;
}
const float AnalogSignal::EnvelopeThreshold = 256.0f;
-AnalogSignal::AnalogSignal(pv::SigSession &session,
- shared_ptr<pv::DevInst> dev_inst, sr_probe *const probe,
- shared_ptr<data::Analog> data) :
- Signal(session, dev_inst, probe),
+AnalogSignal::AnalogSignal(shared_ptr<pv::DevInst> dev_inst,
+ sr_probe *const probe, shared_ptr<data::Analog> data) :
+ Signal(dev_inst, probe),
_data(data),
_scale(1.0f)
{
static const float EnvelopeThreshold;
public:
- AnalogSignal(pv::SigSession &session,
- boost::shared_ptr<pv::DevInst> dev_inst, sr_probe *const probe,
+ AnalogSignal(boost::shared_ptr<pv::DevInst> dev_inst,
+ sr_probe *const probe,
boost::shared_ptr<pv::data::Analog> data);
virtual ~AnalogSignal();
DecodeTrace::DecodeTrace(pv::SigSession &session,
boost::shared_ptr<pv::data::DecoderStack> decoder_stack, int index) :
- Trace(session, QString::fromUtf8(
+ Trace(QString::fromUtf8(
decoder_stack->stack().front()->decoder()->name)),
+ _session(session),
_decoder_stack(decoder_stack),
_delete_mapper(this),
_show_hide_mapper(this)
namespace pv {
+class SigSession;
+
namespace data {
class DecoderStack;
void on_show_hide_decoder(int index);
private:
+ pv::SigSession &_session;
boost::shared_ptr<pv::data::DecoderStack> _decoder_stack;
uint64_t _decode_start, _decode_end;
QColor(0xEE, 0xEE, 0xEC), // White
};
-LogicSignal::LogicSignal(pv::SigSession &session,
- shared_ptr<pv::DevInst> dev_inst, sr_probe *const probe,
- shared_ptr<data::Logic> data) :
- Signal(session, dev_inst, probe),
+LogicSignal::LogicSignal(shared_ptr<pv::DevInst> dev_inst,
+ sr_probe *const probe, shared_ptr<data::Logic> data) :
+ Signal(dev_inst, probe),
_data(data),
_trigger_none(NULL),
_trigger_rising(NULL),
static const QColor SignalColours[10];
public:
- LogicSignal(pv::SigSession &session,
- boost::shared_ptr<pv::DevInst> dev_inst, sr_probe *const probe,
+ LogicSignal(boost::shared_ptr<pv::DevInst> dev_inst,
+ sr_probe *const probe,
boost::shared_ptr<pv::data::Logic> data);
virtual ~LogicSignal();
"SCL"
};
-Signal::Signal(pv::SigSession &session, shared_ptr<pv::DevInst> dev_inst,
+Signal::Signal(shared_ptr<pv::DevInst> dev_inst,
sr_probe *const probe) :
- Trace(session, probe->name),
+ Trace(probe->name),
_dev_inst(dev_inst),
_probe(probe),
_name_widget(NULL),
Q_OBJECT
protected:
- Signal(pv::SigSession &session, boost::shared_ptr<pv::DevInst> dev_inst,
- sr_probe *const probe);
+ Signal(boost::shared_ptr<pv::DevInst> dev_inst, sr_probe *const probe);
public:
/**
const QPen Trace::AxisPen(QColor(128, 128, 128, 64));
const int Trace::LabelHitPadding = 2;
-Trace::Trace(pv::SigSession &session, QString name) :
- _session(session),
+Trace::Trace(QString name) :
_name(name),
_v_offset(0),
_popup(NULL),
class QFormLayout;
namespace pv {
-
-class SigSession;
-
namespace view {
class View;
static const int LabelHitPadding;
protected:
- Trace(SigSession &session, QString name);
+ Trace(QString name);
public:
/**
void colour_changed();
protected:
- pv::SigSession &_session;
pv::view::View *_view;
QString _name;